Skip to content

Commit df758a0

Browse files
committed
fix: set controller probe endpoint handler
Signed-off-by: drivebyer <yang.wu@daocloud.io>
1 parent 89b18fe commit df758a0

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

charts/redis-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
apiVersion: v2
3-
version: 0.18.3
3+
version: 0.18.4
44
appVersion: "0.18.0"
55
description: Provides easy redis setup definitions for Kubernetes services, and deployment.
66
engine: gotpl

charts/redis-operator/templates/operator-deployment.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ spec:
3434
{{- toYaml .Values.securityContext | nindent 10 }}
3535
image: "{{ .Values.redisOperator.imageName }}:{{ .Values.redisOperator.imageTag | default (printf "v%s" .Chart.AppVersion) }}"
3636
imagePullPolicy: {{ .Values.redisOperator.imagePullPolicy }}
37+
livenessProbe:
38+
httpGet:
39+
path: /healthz
40+
port: 8081
41+
readinessProbe:
42+
httpGet:
43+
path: /readyz
44+
port: 8081
3745
command:
3846
- /manager
3947
args:
@@ -46,12 +54,6 @@ spec:
4654
- containerPort: 9443
4755
name: webhook-server
4856
protocol: TCP
49-
readinessProbe:
50-
initialDelaySeconds: 15
51-
timeoutSeconds: 3
52-
livenessProbe:
53-
initialDelaySeconds: 10
54-
timeoutSeconds: 3
5557
volumeMounts:
5658
- mountPath: /tmp/k8s-webhook-server/serving-certs
5759
name: cert

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ func main() {
183183
}
184184
// +kubebuilder:scaffold:builder
185185

186-
if err := mgr.AddHealthzCheck("health", healthz.Ping); err != nil {
186+
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
187187
setupLog.Error(err, "unable to set up health check")
188188
os.Exit(1)
189189
}
190-
if err := mgr.AddReadyzCheck("check", healthz.Ping); err != nil {
190+
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
191191
setupLog.Error(err, "unable to set up ready check")
192192
os.Exit(1)
193193
}

0 commit comments

Comments
 (0)