Skip to content

Commit

Permalink
feat: add liveness + readiness Probe to deployment (#163)
Browse files Browse the repository at this point in the history
* feat: add liveness + readiness Probe to deployment

* use .Values.certManager.containerPort instead of hard-coded values across the helm-chart
  • Loading branch information
CarstenSon authored Jun 27, 2024
1 parent 2215ebd commit 65c33a0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 12 additions & 1 deletion helm/cert-exporter/templates/cert-manager/cert-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,23 @@ spec:
{{- end}}
ports:
- name: http
containerPort: 8080
containerPort: {{ .Values.certManager.containerPort }}
protocol: TCP
resources:
{{- toYaml .Values.certManager.resources | nindent 12 }}
volumeMounts:
{{- toYaml .Values.certManager.volumeMounts | nindent 12 }}
livenessProbe:
tcpSocket:
port: {{ .Values.certManager.containerPort }}
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /metrics
port: {{ .Values.certManager.containerPort }}
failureThreshold: 1
periodSeconds: 10
{{- with .Values.certManager.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion helm/cert-exporter/templates/cert-manager/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ spec:
ports:
- port: {{ .Values.service.port }}
name: {{ .Values.service.portName }}
targetPort: 8080
targetPort: {{ .Values.certManager.containerPort }}
selector:
{{ include "cert-exporter.certManagerSelectorLabels" . | nindent 6 }}
2 changes: 2 additions & 0 deletions helm/cert-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ certManager:
# name: kubelet
# readOnly: true

containerPort: 8080

service:
type: ClusterIP
port: 8080
Expand Down

0 comments on commit 65c33a0

Please sign in to comment.