Skip to content

Commit 1706d73

Browse files
committed
chore: update ob with available probe
1 parent 6727222 commit 1706d73

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

addons/oceanbase-ce/templates/componentdefinition.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ spec:
1212
serviceKind: oceanbase-ce
1313
description: {{ .Chart.Description }}
1414
updateStrategy: BestEffortParallel
15+
podManagementPolicy: Parallel
1516
{{- include "oceanbase-ce.spec.vars" . | nindent 2 }}
1617
{{- include "oceanbase-ce.spec.configs" . | nindent 2 }}
1718
exporter:
@@ -47,6 +48,25 @@ spec:
4748
ports:
4849
- http
4950
- pprof
51+
available:
52+
withProbe:
53+
all:
54+
stdout:
55+
equalTo: available
56+
lifecycleActions:
57+
availableProbe:
58+
exec:
59+
command:
60+
- bash
61+
- -c
62+
- |
63+
ret=$(mysql -h 127.0 -uroot -p$OB_ROOT_PASSWD -P$OB_SERVICE_PORT -e 'show databases;')
64+
if [ $? -eq 0 ];then
65+
echo -n "available"
66+
else
67+
echo -n 'notavailable'
68+
fi
69+
initialDelaySeconds: 10
5070
runtime:
5171
containers:
5272
- name: observer-container

addons/oceanbase-ce/templates/componentversion.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ spec:
1919
images:
2020
observer-container: {{ include "oceanbase-ce.observer.repository" . }}:4.3.0.1-100000242024032211
2121
metrics: {{ include "oceanbase-ce.metrics.repository" . }}:4.2.1-100000092023101717
22+
availableProbe: {{ include "oceanbase-ce.observer.repository" . }}:4.3.0.1-100000242024032211

0 commit comments

Comments
 (0)