Skip to content

HDDS-1668. Add liveness probe to the example k8s resources files #944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2019
Merged
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
13 changes: 6 additions & 7 deletions hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,17 @@ spec:
spec:
securityContext:
fsGroup: 1000
initContainers:
- name: init
image: "@docker.image@"
args: ["ozone","om","--init"]
env:
- name: WAITFOR
value: scm-0.scm:9876
containers:
- name: om
image: "@docker.image@"
args: ["ozone","om"]
env:
- name: WAITFOR
value: scm-0.scm:9876
- name: ENSURE_OM_INITIALIZED
value: /data/metadata/om/current/VERSION
livenessProbe:
tcpSocket:
port: 9862
initialDelaySeconds: 30
volumes: []
5 changes: 5 additions & 0 deletions hadoop-ozone/dist/src/main/k8s/definitions/ozone/s3g-ss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ spec:
- name: s3g
image: "@docker.image@"
args: ["ozone","s3g"]
livenessProbe:
httpGet:
path: /
port: 9878
initialDelaySeconds: 30
4 changes: 4 additions & 0 deletions hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ spec:
- name: scm
image: "@docker.image@"
args: ["ozone","scm"]
livenessProbe:
tcpSocket:
port: 9861
initialDelaySeconds: 30
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ spec:
args:
- ozone
- datanode
envFrom:
- configMapRef:
name: config
volumeMounts:
- name: data
mountPath: /data
envFrom:
- configMapRef:
name: config
volumes:
- name: data
emptyDir: {}
Original file line number Diff line number Diff line change
Expand Up @@ -39,37 +39,27 @@ spec:
spec:
securityContext:
fsGroup: 1000
initContainers:
- name: init
containers:
- name: om
image: '@docker.image@'
args:
- ozone
- om
- --init
env:
- name: WAITFOR
value: scm-0.scm:9876
envFrom:
- configMapRef:
name: config
- name: ENSURE_OM_INITIALIZED
value: /data/metadata/om/current/VERSION
livenessProbe:
tcpSocket:
port: 9862
initialDelaySeconds: 30
volumeMounts:
- name: data
mountPath: /data
containers:
- name: om
image: '@docker.image@'
args:
- ozone
- om
env:
- name: WAITFOR
value: scm-0.scm:9876
envFrom:
- configMapRef:
name: config
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
emptyDir: {}
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@ spec:
args:
- ozone
- s3g
envFrom:
- configMapRef:
name: config
livenessProbe:
httpGet:
path: /
port: 9878
initialDelaySeconds: 30
volumeMounts:
- name: data
mountPath: /data
envFrom:
- configMapRef:
name: config
volumes:
- name: data
emptyDir: {}
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,28 @@ spec:
- ozone
- scm
- --init
envFrom:
- configMapRef:
name: config
volumeMounts:
- name: data
mountPath: /data
envFrom:
- configMapRef:
name: config
containers:
- name: scm
image: '@docker.image@'
args:
- ozone
- scm
envFrom:
- configMapRef:
name: config
livenessProbe:
tcpSocket:
port: 9861
initialDelaySeconds: 30
volumeMounts:
- name: data
mountPath: /data
envFrom:
- configMapRef:
name: config
volumes:
- name: data
emptyDir: {}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ import:
- path: ozone
transformations:
- type: ozone/csi
- type: ozone/emptydir
- path: pv-test
destination: pv-test
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,16 @@ spec:
ports:
- containerPort: 9870
name: rpc
envFrom:
- configMapRef:
name: config
livenessProbe:
tcpSocket:
port: 9858
initialDelaySeconds: 30
volumeMounts:
- name: data
mountPath: /data
envFrom:
- configMapRef:
name: config
initContainers: []
volumes:
- name: data
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: Service
metadata:
name: datanode
spec:
ports:
- port: 9870
name: rpc
clusterIP: None
selector:
app: ozone
component: datanode
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: datanode
labels:
app.kubernetes.io/component: ozone
spec:
selector:
matchLabels:
app: ozone
component: datanode
serviceName: datanode
replicas: 3
template:
metadata:
labels:
app: ozone
component: datanode
annotations:
prdatanodeetheus.io/scrape: "true"
prdatanodeetheus.io/port: "9882"
prdatanodeetheus.io/path: /prom
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: component
operator: In
values:
- datanode
topologyKey: kubernetes.io/hostname
securityContext:
fsGroup: 1000
containers:
- name: datanode
image: '@docker.image@'
args:
- ozone
- datanode
volumeMounts:
- name: data
mountPath: /data
envFrom:
- configMapRef:
name: config
volumes:
- name: data
emptyDir: {}
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,29 @@ spec:
prometheus.io/port: "9874"
prometheus.io/path: /prom
spec:
initContainers:
- name: init
securityContext:
fsGroup: 1000
containers:
- name: om
image: '@docker.image@'
args:
- ozone
- om
- --init
env:
- name: WAITFOR
value: scm-0.scm:9876
envFrom:
- configMapRef:
name: config
- name: ENSURE_OM_INITIALIZED
value: /data/metadata/om/current/VERSION
livenessProbe:
tcpSocket:
port: 9862
initialDelaySeconds: 30
volumeMounts:
- name: data
mountPath: /data
containers:
- name: om
image: '@docker.image@'
args:
- ozone
- om
env:
- name: WAITFOR
value: scm-0.scm:9876
envFrom:
- configMapRef:
name: config
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
emptyDir: {}
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,17 @@ spec:
args:
- ozone
- s3g
envFrom:
- configMapRef:
name: config
livenessProbe:
httpGet:
path: /
port: 9878
initialDelaySeconds: 30
volumeMounts:
- name: data
mountPath: /data
initContainers: []
envFrom:
- configMapRef:
name: config
volumes:
- name: data
emptyDir: {}
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,37 @@ spec:
prometheus.io/port: "9876"
prometheus.io/path: /prom
spec:
securityContext:
fsGroup: 1000
initContainers:
- name: init
image: '@docker.image@'
args:
- ozone
- scm
- --init
envFrom:
- configMapRef:
name: config
volumeMounts:
- name: data
mountPath: /data
envFrom:
- configMapRef:
name: config
containers:
- name: scm
image: '@docker.image@'
args:
- ozone
- scm
envFrom:
- configMapRef:
name: config
livenessProbe:
tcpSocket:
port: 9861
initialDelaySeconds: 30
volumeMounts:
- name: data
mountPath: /data
envFrom:
- configMapRef:
name: config
volumes:
- name: data
emptyDir: {}
Loading