Skip to content

Commit d3a5abe

Browse files
committed
HDDS-1668. Add liveness probe to the example k8s resources files
1 parent 2f4b37b commit d3a5abe

22 files changed

+235
-129
lines changed

hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,17 @@ spec:
3838
spec:
3939
securityContext:
4040
fsGroup: 1000
41-
initContainers:
42-
- name: init
43-
image: "@docker.image@"
44-
args: ["ozone","om","--init"]
45-
env:
46-
- name: WAITFOR
47-
value: scm-0.scm:9876
4841
containers:
4942
- name: om
5043
image: "@docker.image@"
5144
args: ["ozone","om"]
5245
env:
5346
- name: WAITFOR
5447
value: scm-0.scm:9876
48+
- name: ENSURE_OM_INITIALIZED
49+
value: /data/metadata/om/current/VERSION
50+
livenessProbe:
51+
tcpSocket:
52+
port: 9862
53+
initialDelaySeconds: 30
5554
volumes: []

hadoop-ozone/dist/src/main/k8s/definitions/ozone/s3g-ss.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,8 @@ spec:
3636
- name: s3g
3737
image: "@docker.image@"
3838
args: ["ozone","s3g"]
39+
livenessProbe:
40+
httpGet:
41+
path: /
42+
port: 9878
43+
initialDelaySeconds: 30

hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ spec:
4646
- name: scm
4747
image: "@docker.image@"
4848
args: ["ozone","scm"]
49+
livenessProbe:
50+
tcpSocket:
51+
port: 9861
52+
initialDelaySeconds: 30

hadoop-ozone/dist/src/main/k8s/examples/minikube/datanode-statefulset.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ spec:
5555
args:
5656
- ozone
5757
- datanode
58-
envFrom:
59-
- configMapRef:
60-
name: config
6158
volumeMounts:
6259
- name: data
6360
mountPath: /data
61+
envFrom:
62+
- configMapRef:
63+
name: config
6464
volumes:
6565
- name: data
6666
emptyDir: {}

hadoop-ozone/dist/src/main/k8s/examples/minikube/om-statefulset.yaml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,37 +39,27 @@ spec:
3939
spec:
4040
securityContext:
4141
fsGroup: 1000
42-
initContainers:
43-
- name: init
42+
containers:
43+
- name: om
4444
image: '@docker.image@'
4545
args:
4646
- ozone
4747
- om
48-
- --init
4948
env:
5049
- name: WAITFOR
5150
value: scm-0.scm:9876
52-
envFrom:
53-
- configMapRef:
54-
name: config
51+
- name: ENSURE_OM_INITIALIZED
52+
value: /data/metadata/om/current/VERSION
53+
livenessProbe:
54+
tcpSocket:
55+
port: 9862
56+
initialDelaySeconds: 30
5557
volumeMounts:
5658
- name: data
5759
mountPath: /data
58-
containers:
59-
- name: om
60-
image: '@docker.image@'
61-
args:
62-
- ozone
63-
- om
64-
env:
65-
- name: WAITFOR
66-
value: scm-0.scm:9876
6760
envFrom:
6861
- configMapRef:
6962
name: config
70-
volumeMounts:
71-
- name: data
72-
mountPath: /data
7363
volumes:
7464
- name: data
7565
emptyDir: {}

hadoop-ozone/dist/src/main/k8s/examples/minikube/s3g-statefulset.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,17 @@ spec:
3939
args:
4040
- ozone
4141
- s3g
42-
envFrom:
43-
- configMapRef:
44-
name: config
42+
livenessProbe:
43+
httpGet:
44+
path: /
45+
port: 9878
46+
initialDelaySeconds: 30
4547
volumeMounts:
4648
- name: data
4749
mountPath: /data
50+
envFrom:
51+
- configMapRef:
52+
name: config
4853
volumes:
4954
- name: data
5055
emptyDir: {}

hadoop-ozone/dist/src/main/k8s/examples/minikube/scm-statefulset.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,28 @@ spec:
4646
- ozone
4747
- scm
4848
- --init
49-
envFrom:
50-
- configMapRef:
51-
name: config
5249
volumeMounts:
5350
- name: data
5451
mountPath: /data
52+
envFrom:
53+
- configMapRef:
54+
name: config
5555
containers:
5656
- name: scm
5757
image: '@docker.image@'
5858
args:
5959
- ozone
6060
- scm
61-
envFrom:
62-
- configMapRef:
63-
name: config
61+
livenessProbe:
62+
tcpSocket:
63+
port: 9861
64+
initialDelaySeconds: 30
6465
volumeMounts:
6566
- name: data
6667
mountPath: /data
68+
envFrom:
69+
- configMapRef:
70+
name: config
6771
volumes:
6872
- name: data
6973
emptyDir: {}

hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/Flekszible

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ import:
2121
- path: ozone
2222
transformations:
2323
- type: ozone/csi
24+
- type: ozone/emptydir
2425
- path: pv-test
2526
destination: pv-test

hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/datanode-daemonset.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,16 @@ spec:
4444
ports:
4545
- containerPort: 9870
4646
name: rpc
47-
envFrom:
48-
- configMapRef:
49-
name: config
47+
livenessProbe:
48+
tcpSocket:
49+
port: 9858
50+
initialDelaySeconds: 30
5051
volumeMounts:
5152
- name: data
5253
mountPath: /data
54+
envFrom:
55+
- configMapRef:
56+
name: config
5357
initContainers: []
5458
volumes:
5559
- name: data
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
apiVersion: v1
18+
kind: Service
19+
metadata:
20+
name: datanode
21+
spec:
22+
ports:
23+
- port: 9870
24+
name: rpc
25+
clusterIP: None
26+
selector:
27+
app: ozone
28+
component: datanode

0 commit comments

Comments
 (0)