Skip to content

Commit

Permalink
Add customizable liveness and readiness probes (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmattox committed Apr 10, 2024
1 parent c5cedf1 commit 9faff4a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,28 @@ spec:
ports:
- containerPort: 8080
name: healthcheck
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /healthz
port: healthcheck
initialDelaySeconds: 6
periodSeconds: 3
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /readyz
port: healthcheck
initialDelaySeconds: 6
periodSeconds: 3
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
env:
- name: WATCH_NAMESPACE
value: {{ template "kubernetes-secret-generator.watchNamespace" . }}
Expand Down
24 changes: 21 additions & 3 deletions deploy/helm-chart/kubernetes-secret-generator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,23 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name:

podSecurityContext: {}
podSecurityContext:
{}
# fsGroup: 2000

priorityClassName: ""

securityContext: {}
securityContext:
{}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

resources: {}
resources:
{}
# limits:
# cpu: 100m
# memory: 128Mi
Expand Down Expand Up @@ -83,3 +86,18 @@ rbac:
# ClusterRole is deployed by Default
clusterRole: true

livenessProbe:
enabled: true
initialDelaySeconds: 6
periodSeconds: 3
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 3

readinessProbe:
enabled: true
initialDelaySeconds: 6
periodSeconds: 3
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 3

0 comments on commit 9faff4a

Please sign in to comment.