feat: add gluetun deployment, service, and configmap configurations

This commit is contained in:
2025-04-15 08:37:59 +05:30
parent 1f1306e0f5
commit 5d4a73a937
3 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: gluetun-config
namespace: default
data:
VPN_SERVICE_PROVIDER: "surfshark"
SERVER_COUNTRIES: "Netherlands"
HTTPPROXY: "ON"
FIREWALL_INPUT_PORTS: "8080,7878,8989,8191,5055,6881"
FIREWALL_VPN_INPUT_PORTS: "8080,7878,8989,8191,5055,6881"
FIREWALL_OUTBOUND_SUBNETS: "192.168.1.0/24"

View File

@@ -0,0 +1,31 @@
---
apiVersion: v1
kind: Service
metadata:
name: gluetun-service
namespace: default
spec:
type: NodePort
selector:
app: gluetun
ports:
- port: 8888
targetPort: 8888
nodePort: 8388
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: gluetun-p2p-service
namespace: default
spec:
type: NodePort
selector:
app: gluetun
ports:
- port: 6881
targetPort: 6881
nodePort: 30881
protocol: TCP

View File

@@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gluetun
namespace: default
spec:
selector:
matchLabels:
app: gluetun
template:
metadata:
labels:
app: gluetun
spec:
containers:
- name: vpn
image: qmcgaw/gluetun:v3.40.0
securityContext:
capabilities:
add:
- NET_ADMIN
ports:
- containerPort: 8888
- containerPort: 8388
- containerPort: 8080
- containerPort: 6881
env:
- name: OPENVPN_PASSWORD
valueFrom:
secretKeyRef:
name: openvpn-secrets
key: OPENVPN_PASSWORD
- name: OPENVPN_USERNAME
valueFrom:
secretKeyRef:
name: openvpn-secrets
key: OPENVPN_USERNAME
- name: HTTPPROXY_PASSWORD
valueFrom:
secretKeyRef:
name: http-secrets
key: HTTPPROXY_PASSWORD
- name: HTTPPROXY_USER
valueFrom:
secretKeyRef:
name: http-secrets
key: HTTPPROXY_USER
envFrom:
- configMapRef:
name: gluetun-config