3 Commits 21ce6fe6bb ... c722fa273d

Author SHA1 Message Date
  Oleg Pykhalov c722fa273d apps: base: 3x-ui: Add networkpolicy. 1 month ago
  Oleg Pykhalov 2d647e75ff apps: base: 3x-ui: Expose with a service. 1 month ago
  Oleg Pykhalov edb5bd7fa8 clusters: cluster3: flux-system: apps: Add 3x-ui. 1 month ago

+ 2 - 0
apps/base/3x-ui/kustomization.yaml

@@ -4,3 +4,5 @@ namespace: 3x-ui
 resources:
 - namespace.yaml
 - statefulset.yaml
+- service.yaml
+- networkpolicy.yaml

+ 24 - 0
apps/base/3x-ui/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
+  - ports:
+    - protocol: TCP
+      port: 443
+    from:
+    - ipBlock:
+        cidr: 0.0.0.0/0

+ 21 - 0
apps/base/3x-ui/service.yaml

@@ -0,0 +1,21 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: 3x-ui
+  labels:
+    app.kubernetes.io/name: 3x-ui
+    app.kubernetes.io/part-of: 3x-ui
+spec:
+  ports:
+  - port: 2053
+    protocol: TCP
+    targetPort: 2053
+    name: http
+  - port: 443
+    protocol: TCP
+    targetPort: 443
+    name: http
+  selector:
+    app.kubernetes.io/name: 3x-ui
+    app.kubernetes.io/part-of: 3x-ui
+  type: LoadBalancer

+ 0 - 1
apps/base/3x-ui/statefulset.yaml

@@ -24,7 +24,6 @@ spec:
           name: data
         - mountPath: /root/cert
           name: certificates
-      hostNetwork: true
       volumes:
       - name: data
         hostPath:

+ 13 - 0
clusters/cluster3/flux-system/apps.yaml

@@ -11,3 +11,16 @@ spec:
   sourceRef:
     kind: GitRepository
     name: flux-system
+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
+kind: Kustomization
+metadata:
+  name: 3x-ui
+  namespace: flux-system
+spec:
+  interval: 1m0s
+  path: ./apps/base/3x-ui
+  prune: true
+  sourceRef:
+    kind: GitRepository
+    name: flux-system