@@ -4,3 +4,5 @@ namespace: 3x-ui
resources:
- namespace.yaml
- statefulset.yaml
+- service.yaml
+- networkpolicy.yaml
@@ -0,0 +1,24 @@
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: 3x-ui
+ namespace: 3x-ui
+spec:
+ podSelector:
+ matchLabels:
+ app.kubernetes.io/name: 3x-ui
+ policyTypes:
+ - Ingress
+ ingress:
+ - ports:
+ - protocol: TCP
+ port: 2053
+ from:
+ - ipBlock:
+ cidr: 88.201.161.72/32
+ port: 443
+ cidr: 0.0.0.0/0
@@ -0,0 +1,21 @@
+apiVersion: v1
+kind: Service
+ labels:
+ app.kubernetes.io/part-of: 3x-ui
+ ports:
+ - port: 2053
+ protocol: TCP
+ targetPort: 2053
+ name: http
+ - port: 443
+ targetPort: 443
+ selector:
+ type: LoadBalancer
@@ -24,7 +24,6 @@ spec:
name: data
- mountPath: /root/cert
name: certificates
- hostNetwork: true
volumes:
- name: data
hostPath:
@@ -11,3 +11,16 @@ spec:
sourceRef:
kind: GitRepository
name: flux-system
+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
+kind: Kustomization
+ namespace: flux-system
+ interval: 1m0s
+ path: ./apps/base/3x-ui
+ prune: true
+ sourceRef:
+ kind: GitRepository
+ name: flux-system