96 lines
2.6 KiB
YAML
96 lines
2.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: privoxyvpn
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: privoxyvpn
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: privoxyvpn
|
|
spec:
|
|
containers:
|
|
- name: privoxyvpn
|
|
image: binhex/arch-privoxyvpn:latest
|
|
securityContext:
|
|
privileged: true
|
|
ports:
|
|
- containerPort: 8118
|
|
- containerPort: 9118
|
|
resources:
|
|
requests:
|
|
cpu: "250m"
|
|
memory: "512Mi"
|
|
limits:
|
|
cpu: "500m"
|
|
memory: "2Gi"
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /config
|
|
- name: logs
|
|
mountPath: /logs
|
|
- name: ovpn
|
|
mountPath: /config/openvpn/<ovpn file>
|
|
subPath: <ovpn file name>
|
|
# - name: ovpn-creds # Only needed if your VPN requires a login with it's ovpn file
|
|
# mountPath: /config/openvpn/credentials.conf
|
|
# subPath: credentials.conf
|
|
env:
|
|
- name: VPN_ENABLED
|
|
value: "yes"
|
|
- name: VPN_PROV
|
|
value: <vpn provider>
|
|
- name: ENABLE_SOCKS
|
|
value: "yes"
|
|
- name: ENABLE_PRIVOXY
|
|
value: "yes"
|
|
- name: STRICT_PORT_FORWARD
|
|
value: "no"
|
|
- name: LAN_NETWORK
|
|
value: <LAN network address. e.g. "192.168.1.0/24"> # If using in minikube, set to the minikube network
|
|
- name: NAME_SERVERS
|
|
value: "8.8.8.8,8.8.4.4"
|
|
volumes:
|
|
- name: config
|
|
persistentVolumeClaim:
|
|
claimName: privoxyvpn-config-pvc
|
|
- name: logs
|
|
persistentVolumeClaim:
|
|
claimName: privoxyvpn-logs-pvc
|
|
- name: ovpn #create with `kubectl create configmap ovpn-creds --from-file=<ovpn file name>=<ovpn file name>`
|
|
configMap:
|
|
name: protonvpn-ovpn-config
|
|
items:
|
|
- key: <ovpn file name>
|
|
path: <ovpn file name>
|
|
# - name: ovpn-creds
|
|
# configMap:
|
|
# name: ovpn-creds
|
|
# items:
|
|
# - key: credentials.conf
|
|
# path: credentials.conf
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: privoxyvpn-config-pvc
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: privoxyvpn-logs-pvc
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 512Mi
|