Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/vpn #80

Merged
merged 2 commits into from
Feb 29, 2024
Merged

Feature/vpn #80

merged 2 commits into from
Feb 29, 2024

Conversation

jgilfoil
Copy link
Owner

No description provided.

Copy link

--- kubernetes/apps/network/vpn-gateway/app Kustomization: flux-system/vpn-gateway HelmRelease: network/vpn-gateway

+++ kubernetes/apps/network/vpn-gateway/app Kustomization: flux-system/vpn-gateway HelmRelease: network/vpn-gateway

@@ -20,12 +20,24 @@

       version: 6.5.1
   interval: 5m
   values:
     addons:
       netshoot:
         enabled: true
+        networkPolicy:
+          egress:
+          - ports:
+            - port: ${SECRET_VPN_GATEWAY_PORT}
+              protocol: UDP
+            to:
+            - ipBlock:
+                cidr: 0.0.0.0/0
+          - to:
+            - ipBlock:
+                cidr: 10.0.0.0/8
+          enabled: true
         resources:
           limits:
             memory: 10M
           requests:
             cpu: 5m
             memory: 10M
@@ -48,12 +60,22 @@

         - secretRef:
             name: vpn-gateway-config
         gluetun:
           image:
             repository: docker.io/qmcgaw/gluetun
             tag: v3.35.0@sha256:a98d1ec99e09a1b806aff7f0c3d8a133a8ede7d3d7a250b62029a39a61f01525
+        livenessProbe:
+          exec:
+            command:
+            - sh
+            - -c
+            - if [ '$(wget -q -O- https://ipinfo.io/country)' == 'NO' ]; then echo
+              'NO'; else echo 'not NO'; fi
+          failureThreshold: 3
+          initialDelaySeconds: 30
+          periodSeconds: 60
         resources:
           limits:
             memory: 128M
           requests:
             cpu: 5m
             memory: 64M
--- kubernetes/apps/network/vpn-gateway/app Kustomization: flux-system/vpn-gateway CiliumNetworkPolicy: network/vpn-pod-gateway

+++ kubernetes/apps/network/vpn-gateway/app Kustomization: flux-system/vpn-gateway CiliumNetworkPolicy: network/vpn-pod-gateway

@@ -1,26 +0,0 @@

----
-apiVersion: cilium.io/v2
-kind: CiliumNetworkPolicy
-metadata:
-  labels:
-    app.kubernetes.io/instance: vpn-gateway
-    app.kubernetes.io/name: vpn-gateway
-    kustomize.toolkit.fluxcd.io/name: vpn-gateway
-    kustomize.toolkit.fluxcd.io/namespace: flux-system
-  name: vpn-pod-gateway
-  namespace: network
-spec:
-  egress:
-  - toCIDR:
-    - 0.0.0.0/0
-    toPorts:
-    - ports:
-      - port: '1637'
-        protocol: UDP
-  - toEntities:
-    - cluster
-  endpointSelector:
-    matchLabels:
-      app.kubernetes.io/instance: vpn-gateway
-      app.kubernetes.io/name: pod-gateway
-

Copy link

--- HelmRelease: network/vpn-gateway Deployment: network/vpn-gateway-pod-gateway

+++ HelmRelease: network/vpn-gateway Deployment: network/vpn-gateway-pod-gateway

@@ -74,12 +74,22 @@

           value: 30s
         envFrom:
         - secretRef:
             name: vpn-gateway-config
         image: docker.io/qmcgaw/gluetun:v3.35.0@sha256:a98d1ec99e09a1b806aff7f0c3d8a133a8ede7d3d7a250b62029a39a61f01525
         imagePullPolicy: null
+        livenessProbe:
+          exec:
+            command:
+            - sh
+            - -c
+            - if [ '$(wget -q -O- https://ipinfo.io/country)' == 'NO' ]; then echo
+              'NO'; else echo 'not NO'; fi
+          failureThreshold: 3
+          initialDelaySeconds: 30
+          periodSeconds: 60
         name: gluetun
         resources:
           limits:
             memory: 128M
           requests:
             cpu: 5m

@jgilfoil jgilfoil merged commit 45d6cbe into main Feb 29, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant