Skip to content

Commit

Permalink
adding liveness and readiness probes
Browse files Browse the repository at this point in the history
  • Loading branch information
channel-42 committed Oct 24, 2024
1 parent 706a3bb commit 69ccc6f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
4 changes: 2 additions & 2 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: wg-punchhole
description: Route traffic via a gateway host into your cluster.
type: application
version: 0.0.1
appVersion: "0.0.1"
version: 0.0.2
appVersion: "0.0.2"
12 changes: 10 additions & 2 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ spec:
securityContext:
{{- toYaml .Values.wireguard.containerSecurityContext | nindent 10 }}
resources:
{{- toYaml .Values.wireguard.resources | nindent 12 }}
{{- toYaml .Values.wireguard.resources | nindent 10 }}
livenessProbe:
exec:
command: [/bin/ping, -c1, {{ .Values.wireguard.serverVpnIp }}]
{{- toYaml .Values.wireguard.livenessProbe | nindent 10 }}
readinessProbe:
exec:
command: [/bin/ping, -c1, {{ .Values.wireguard.serverVpnIp }}]
{{- toYaml .Values.wireguard.readinessProbe | nindent 10 }}
volumeMounts:
- name: wireguard-config
mountPath: /config/wg_confs/
Expand All @@ -41,7 +49,7 @@ spec:
securityContext:
{{- toYaml .Values.haproxy.containerSecurityContext | nindent 10 }}
resources:
{{- toYaml .Values.haproxy.resources | nindent 12 }}
{{- toYaml .Values.haproxy.resources | nindent 10 }}
volumeMounts:
- name: haproxy-config
mountPath: /usr/local/etc/haproxy/haproxy.cfg
Expand Down
18 changes: 17 additions & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ wireguard:

configSecretName: wireguard-config

# The IP address of the WireGuard server inside the VPN network. Used for the liveness and readiness probes.
serverVpnIp: ""

image:
pullPolicy: IfNotPresent
repository: linuxserver/wireguard
Expand All @@ -23,6 +26,19 @@ wireguard:
capabilities:
add:
- NET_ADMIN

livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 5
periodSeconds: 3
failureThreshold: 5

readinessProbe:
timeoutSeconds: 1
initialDelaySeconds: 5
periodSeconds: 3
failureThreshold: 5



haproxy:
Expand All @@ -38,6 +54,7 @@ haproxy:
resoures: {}

containerSecurityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
allowPrivilegeEscalation: false
runAsUser: 99
Expand All @@ -49,7 +66,6 @@ podAnnotations: {}
podLabels: {}

podSecurityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true

nodeSelector: {}
Expand Down

0 comments on commit 69ccc6f

Please sign in to comment.