Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/ozone/templates/om/om-service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
app.kubernetes.io/component: om
spec:
clusterIP: None
publishNotReadyAddresses: true
ports:
- name: ui
port: {{ .Values.om.service.port }}
Expand Down
14 changes: 14 additions & 0 deletions charts/ozone/templates/om/om-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ metadata:
app.kubernetes.io/component: om
spec:
replicas: {{ .Values.om.replicas }}
podManagementPolicy: Parallel
serviceName: {{ .Release.Name }}-om-headless
selector:
matchLabels:
Expand Down Expand Up @@ -98,6 +99,19 @@ spec:
containerPort: {{ .Values.om.service.port }}
- name: ratis
containerPort: {{ .Values.om.service.ratisPort }}
{{- if gt (int .Values.om.replicas) 1 }}
readinessProbe:
exec:
command:
- sh
- -c
- |
ozone admin om roles -id {{ .Values.clusterId }} 2>/dev/null | grep $(hostname) | grep -qE 'LEADER|FOLLOWER' && exit 0 || exit 1
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 20
failureThreshold: 3
{{- end }}
livenessProbe:
httpGet:
path: /
Expand Down
13 changes: 13 additions & 0 deletions charts/ozone/templates/scm/scm-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,19 @@ spec:
- name: grpc
containerPort: {{ .Values.scm.service.grpcPort }}
{{- end }}
{{- if gt (int .Values.scm.replicas) 1 }}
readinessProbe:
exec:
command:
- sh
- -c
- |
ozone admin scm roles 2>/dev/null | grep $(hostname -f) | grep -qE 'LEADER|FOLLOWER' && exit 0 || exit 1
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 20
failureThreshold: 3
{{- end }}
livenessProbe:
httpGet:
path: /
Expand Down