Skip to content

Commit

Permalink
fix: set controller probe endpoint handler
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <[email protected]>
  • Loading branch information
drivebyer committed Nov 6, 2024
1 parent 89b18fe commit df758a0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/redis-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
apiVersion: v2
version: 0.18.3
version: 0.18.4
appVersion: "0.18.0"
description: Provides easy redis setup definitions for Kubernetes services, and deployment.
engine: gotpl
Expand Down
14 changes: 8 additions & 6 deletions charts/redis-operator/templates/operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ spec:
{{- toYaml .Values.securityContext | nindent 10 }}
image: "{{ .Values.redisOperator.imageName }}:{{ .Values.redisOperator.imageTag | default (printf "v%s" .Chart.AppVersion) }}"
imagePullPolicy: {{ .Values.redisOperator.imagePullPolicy }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
readinessProbe:
httpGet:
path: /readyz
port: 8081
command:
- /manager
args:
Expand All @@ -46,12 +54,6 @@ spec:
- containerPort: 9443
name: webhook-server
protocol: TCP
readinessProbe:
initialDelaySeconds: 15
timeoutSeconds: 3
livenessProbe:
initialDelaySeconds: 10
timeoutSeconds: 3
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ func main() {
}
// +kubebuilder:scaffold:builder

if err := mgr.AddHealthzCheck("health", healthz.Ping); err != nil {
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
setupLog.Error(err, "unable to set up health check")
os.Exit(1)
}
if err := mgr.AddReadyzCheck("check", healthz.Ping); err != nil {
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
setupLog.Error(err, "unable to set up ready check")
os.Exit(1)
}
Expand Down

0 comments on commit df758a0

Please sign in to comment.