HDDS-1646. Support real persistence in the k8s example files (#945)
* HDDS-1646. Support real persistence in the k8s example files * ephemeral clusters can be scaled up
This commit is contained in:
parent
95c94dcca7
commit
d023f1f864
|
@ -0,0 +1,27 @@
|
|||
# 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
|
|
@ -0,0 +1,54 @@
|
|||
# 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 cdatanodepliance
|
||||
# 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"]
|
|
@ -13,6 +13,9 @@
|
|||
# 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.
|
||||
name: ozone/emptydir
|
||||
description: Add empty dir based ephemeral persistence
|
||||
---
|
||||
- type: Add
|
||||
trigger:
|
||||
metadata:
|
||||
|
@ -22,22 +25,7 @@
|
|||
- spec
|
||||
- template
|
||||
- spec
|
||||
- containers
|
||||
- "*"
|
||||
- volumeMounts
|
||||
value:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- type: Add
|
||||
trigger:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
path:
|
||||
- spec
|
||||
- template
|
||||
- spec
|
||||
- initContainers
|
||||
- (initContainers|containers)
|
||||
- "*"
|
||||
- volumeMounts
|
||||
value:
|
66
hadoop-ozone/dist/src/main/k8s/definitions/ozone/definitions/persistence.yaml
vendored
Normal file
66
hadoop-ozone/dist/src/main/k8s/definitions/ozone/definitions/persistence.yaml
vendored
Normal file
|
@ -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.
|
||||
name: ozone/persistence
|
||||
description: Add real PVC based persistence
|
||||
---
|
||||
- type: Add
|
||||
path:
|
||||
- spec
|
||||
trigger:
|
||||
kind: StatefulSet
|
||||
value:
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
- type: Add
|
||||
trigger:
|
||||
metadata:
|
||||
name: datanode
|
||||
path:
|
||||
- spec
|
||||
- template
|
||||
- spec
|
||||
value:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: component
|
||||
operator: In
|
||||
values:
|
||||
- datanode
|
||||
topologyKey: kubernetes.io/hostname
|
||||
- type: Add
|
||||
trigger:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
path:
|
||||
- spec
|
||||
- template
|
||||
- spec
|
||||
- (initContainers|containers)
|
||||
- "*"
|
||||
- volumeMounts
|
||||
value:
|
||||
- name: data
|
||||
mountPath: /data
|
|
@ -36,6 +36,8 @@ spec:
|
|||
prometheus.io/port: "9874"
|
||||
prometheus.io/path: "/prom"
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
initContainers:
|
||||
- name: init
|
||||
image: "@docker.image@"
|
||||
|
|
|
@ -36,6 +36,8 @@ spec:
|
|||
prometheus.io/port: "9876"
|
||||
prometheus.io/path: "/prom"
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
initContainers:
|
||||
- name: init
|
||||
image: "@docker.image@"
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
source:
|
||||
- path: ../../../definitions
|
||||
- path: ../../definitions
|
||||
import:
|
||||
- path: ozone
|
||||
transformations:
|
||||
- type: Image
|
||||
image: "@docker.image@"
|
||||
- type: DaemonToStatefulSet
|
||||
- type: PublishStatefulSet
|
||||
- type: ozone/emptydir
|
||||
- path: ozone/freon
|
||||
destination: freon
|
||||
transformations:
|
|
@ -0,0 +1,15 @@
|
|||
# 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.
|
34
hadoop-ozone/dist/src/main/k8s/examples/getting-started/config-configmap.yaml
vendored
Normal file
34
hadoop-ozone/dist/src/main/k8s/examples/getting-started/config-configmap.yaml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
# 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: ConfigMap
|
||||
metadata:
|
||||
name: config
|
||||
data:
|
||||
OZONE-SITE.XML_hdds.datanode.dir: /data/storage
|
||||
OZONE-SITE.XML_ozone.scm.datanode.id.dir: /data
|
||||
OZONE-SITE.XML_ozone.metadata.dirs: /data/metadata
|
||||
OZONE-SITE.XML_ozone.scm.block.client.address: scm-0.scm
|
||||
OZONE-SITE.XML_ozone.om.address: om-0.om
|
||||
OZONE-SITE.XML_ozone.scm.client.address: scm-0.scm
|
||||
OZONE-SITE.XML_ozone.scm.names: scm-0.scm
|
||||
OZONE-SITE.XML_ozone.enabled: "true"
|
||||
LOG4J.PROPERTIES_log4j.rootLogger: INFO, stdout
|
||||
LOG4J.PROPERTIES_log4j.appender.stdout: org.apache.log4j.ConsoleAppender
|
||||
LOG4J.PROPERTIES_log4j.appender.stdout.layout: org.apache.log4j.PatternLayout
|
||||
LOG4J.PROPERTIES_log4j.appender.stdout.layout.ConversionPattern: '%d{yyyy-MM-dd
|
||||
HH:mm:ss} %-5p %c{1}:%L - %m%n'
|
28
hadoop-ozone/dist/src/main/k8s/examples/getting-started/datanode-public-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/getting-started/datanode-public-service.yaml
vendored
Normal file
|
@ -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-public
|
||||
spec:
|
||||
ports:
|
||||
- port: 9870
|
||||
name: rpc
|
||||
selector:
|
||||
app: ozone
|
||||
component: datanode
|
||||
type: NodePort
|
28
hadoop-ozone/dist/src/main/k8s/examples/getting-started/datanode-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/getting-started/datanode-service.yaml
vendored
Normal file
|
@ -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
|
66
hadoop-ozone/dist/src/main/k8s/examples/getting-started/datanode-statefulset.yaml
vendored
Normal file
66
hadoop-ozone/dist/src/main/k8s/examples/getting-started/datanode-statefulset.yaml
vendored
Normal file
|
@ -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
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
|
@ -13,31 +13,34 @@
|
|||
# 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: DaemonSet
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: datanode
|
||||
name: freon
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ozone
|
||||
component: datanode
|
||||
component: freon
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9882"
|
||||
prometheus.io/path: "/prom"
|
||||
labels:
|
||||
app: ozone
|
||||
component: datanode
|
||||
component: freon
|
||||
spec:
|
||||
containers:
|
||||
- name: datanode
|
||||
image: "@docker.image@"
|
||||
args: ["ozone","datanode"]
|
||||
ports:
|
||||
- containerPort: 9870
|
||||
name: rpc
|
||||
- name: freon
|
||||
image: '@docker.image@'
|
||||
args:
|
||||
- ozone
|
||||
- freon
|
||||
- rk
|
||||
- --factor=THREE
|
||||
- --replicationType=RATIS
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
28
hadoop-ozone/dist/src/main/k8s/examples/getting-started/om-public-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/getting-started/om-public-service.yaml
vendored
Normal file
|
@ -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: om-public
|
||||
spec:
|
||||
ports:
|
||||
- port: 9874
|
||||
name: ui
|
||||
selector:
|
||||
app: ozone
|
||||
component: om
|
||||
type: NodePort
|
|
@ -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: om
|
||||
spec:
|
||||
ports:
|
||||
- port: 9874
|
||||
name: ui
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: ozone
|
||||
component: om
|
|
@ -0,0 +1,75 @@
|
|||
# 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: om
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ozone
|
||||
component: om
|
||||
serviceName: om
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ozone
|
||||
component: om
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9874"
|
||||
prometheus.io/path: /prom
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
initContainers:
|
||||
- name: init
|
||||
image: '@docker.image@'
|
||||
args:
|
||||
- ozone
|
||||
- om
|
||||
- --init
|
||||
env:
|
||||
- name: WAITFOR
|
||||
value: scm-0.scm:9876
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
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: {}
|
28
hadoop-ozone/dist/src/main/k8s/examples/getting-started/s3g-public-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/getting-started/s3g-public-service.yaml
vendored
Normal file
|
@ -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: s3g-public
|
||||
spec:
|
||||
ports:
|
||||
- port: 9878
|
||||
name: rest
|
||||
selector:
|
||||
app: ozone
|
||||
component: s3g
|
||||
type: NodePort
|
|
@ -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: s3g
|
||||
spec:
|
||||
ports:
|
||||
- port: 9878
|
||||
name: rest
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: ozone
|
||||
component: s3g
|
|
@ -15,42 +15,36 @@
|
|||
# limitations under the License.
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: datanode
|
||||
name: s3g
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ozone
|
||||
component: datanode
|
||||
component: s3g
|
||||
serviceName: s3g
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9882"
|
||||
prometheus.io/path: /prom
|
||||
labels:
|
||||
app: ozone
|
||||
component: datanode
|
||||
component: s3g
|
||||
spec:
|
||||
containers:
|
||||
- name: datanode
|
||||
- name: s3g
|
||||
image: '@docker.image@'
|
||||
args:
|
||||
- ozone
|
||||
- datanode
|
||||
ports:
|
||||
- containerPort: 9870
|
||||
name: rpc
|
||||
- s3g
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
initContainers: []
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
28
hadoop-ozone/dist/src/main/k8s/examples/getting-started/scm-public-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/getting-started/scm-public-service.yaml
vendored
Normal file
|
@ -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: scm-public
|
||||
spec:
|
||||
ports:
|
||||
- port: 9876
|
||||
name: ui
|
||||
selector:
|
||||
app: ozone
|
||||
component: scm
|
||||
type: NodePort
|
|
@ -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: scm
|
||||
spec:
|
||||
ports:
|
||||
- port: 9876
|
||||
name: ui
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: ozone
|
||||
component: scm
|
69
hadoop-ozone/dist/src/main/k8s/examples/getting-started/scm-statefulset.yaml
vendored
Normal file
69
hadoop-ozone/dist/src/main/k8s/examples/getting-started/scm-statefulset.yaml
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
# 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: scm
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ozone
|
||||
component: scm
|
||||
serviceName: scm
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ozone
|
||||
component: scm
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
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
|
||||
containers:
|
||||
- name: scm
|
||||
image: '@docker.image@'
|
||||
args:
|
||||
- ozone
|
||||
- scm
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
|
@ -0,0 +1,45 @@
|
|||
# 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.
|
||||
source:
|
||||
- path: ../../definitions
|
||||
import:
|
||||
- path: ozone
|
||||
transformations:
|
||||
- type: Image
|
||||
image: "@docker.image@"
|
||||
- type: PublishStatefulSet
|
||||
- type: ozone/emptydir
|
||||
- path: ozone/freon
|
||||
destination: freon
|
||||
transformations:
|
||||
- type: Image
|
||||
image: "@docker.image@"
|
||||
header: |-
|
||||
# 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.
|
28
hadoop-ozone/dist/src/main/k8s/examples/minikube/datanode-public-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/minikube/datanode-public-service.yaml
vendored
Normal file
|
@ -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-public
|
||||
spec:
|
||||
ports:
|
||||
- port: 9870
|
||||
name: rpc
|
||||
selector:
|
||||
app: ozone
|
||||
component: datanode
|
||||
type: NodePort
|
|
@ -19,6 +19,9 @@ kind: Service
|
|||
metadata:
|
||||
name: datanode
|
||||
spec:
|
||||
ports:
|
||||
- port: 9870
|
||||
name: rpc
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: ozone
|
||||
|
|
|
@ -25,34 +25,42 @@ spec:
|
|||
matchLabels:
|
||||
app: ozone
|
||||
component: datanode
|
||||
serviceName: datanode
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9882"
|
||||
prometheus.io/path: /prom
|
||||
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
|
||||
ports:
|
||||
- containerPort: 9870
|
||||
name: rpc
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
initContainers: []
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
serviceName: datanode
|
||||
replicas: 3
|
||||
|
|
|
@ -37,6 +37,8 @@ spec:
|
|||
prometheus.io/port: "9874"
|
||||
prometheus.io/path: /prom
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
initContainers:
|
||||
- name: init
|
||||
image: '@docker.image@'
|
||||
|
@ -44,6 +46,9 @@ spec:
|
|||
- ozone
|
||||
- om
|
||||
- --init
|
||||
env:
|
||||
- name: WAITFOR
|
||||
value: scm-0.scm:9876
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
|
@ -56,6 +61,9 @@ spec:
|
|||
args:
|
||||
- ozone
|
||||
- om
|
||||
env:
|
||||
- name: WAITFOR
|
||||
value: scm-0.scm:9876
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
|
|
|
@ -45,7 +45,6 @@ spec:
|
|||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
initContainers: []
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
|
|
|
@ -37,6 +37,8 @@ spec:
|
|||
prometheus.io/port: "9876"
|
||||
prometheus.io/path: /prom
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
initContainers:
|
||||
- name: init
|
||||
image: '@docker.image@'
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
source:
|
||||
- path: ../../../definitions
|
||||
- path: ../../definitions
|
||||
import:
|
||||
- path: ozone
|
||||
transformations:
|
||||
|
@ -24,6 +24,7 @@ import:
|
|||
- type: PublishStatefulSet
|
||||
- type: ozone/tracing
|
||||
- type: ozone/profiler
|
||||
- type: ozone/emptydir
|
||||
- path: prometheus
|
||||
- path: jaeger
|
||||
transformations:
|
||||
|
@ -33,4 +34,4 @@ import:
|
|||
transformations:
|
||||
- type: Image
|
||||
image: "@docker.image@"
|
||||
- type: ozone/tracing
|
||||
- type: ozone/tracing
|
28
hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/datanode-public-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/datanode-public-service.yaml
vendored
Normal file
|
@ -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-public
|
||||
spec:
|
||||
ports:
|
||||
- port: 9870
|
||||
name: rpc
|
||||
selector:
|
||||
app: ozone
|
||||
component: datanode
|
||||
type: NodePort
|
|
@ -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
|
|
@ -15,7 +15,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: datanode
|
||||
labels:
|
||||
|
@ -25,25 +25,39 @@ spec:
|
|||
matchLabels:
|
||||
app: ozone
|
||||
component: datanode
|
||||
serviceName: datanode
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9882"
|
||||
prometheus.io/path: /prom
|
||||
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
|
||||
ports:
|
||||
- containerPort: 9870
|
||||
name: rpc
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
env:
|
||||
- name: JAEGER_SAMPLER_TYPE
|
||||
value: probabilistic
|
||||
|
@ -51,13 +65,9 @@ spec:
|
|||
value: "0.01"
|
||||
- name: JAEGER_AGENT_HOST
|
||||
value: jaeger-0.jaeger
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
initContainers: []
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
|
@ -37,6 +37,8 @@ spec:
|
|||
prometheus.io/port: "9874"
|
||||
prometheus.io/path: /prom
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
initContainers:
|
||||
- name: init
|
||||
image: '@docker.image@'
|
||||
|
|
|
@ -39,6 +39,9 @@ spec:
|
|||
args:
|
||||
- ozone
|
||||
- s3g
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
env:
|
||||
- name: JAEGER_SAMPLER_TYPE
|
||||
value: probabilistic
|
||||
|
@ -46,13 +49,9 @@ spec:
|
|||
value: "0.01"
|
||||
- name: JAEGER_AGENT_HOST
|
||||
value: jaeger-0.jaeger
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
initContainers: []
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
|
|
|
@ -37,6 +37,8 @@ spec:
|
|||
prometheus.io/port: "9876"
|
||||
prometheus.io/path: /prom
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
initContainers:
|
||||
- name: init
|
||||
image: '@docker.image@'
|
||||
|
@ -56,6 +58,9 @@ spec:
|
|||
args:
|
||||
- ozone
|
||||
- scm
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
env:
|
||||
- name: JAEGER_SAMPLER_TYPE
|
||||
value: probabilistic
|
||||
|
@ -63,9 +68,6 @@ spec:
|
|||
value: "0.01"
|
||||
- name: JAEGER_AGENT_HOST
|
||||
value: jaeger-0.jaeger
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
|
|
|
@ -14,12 +14,13 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
source:
|
||||
- path: ../../../definitions
|
||||
- path: ../../definitions
|
||||
import:
|
||||
- path: ozone
|
||||
transformations:
|
||||
- type: Image
|
||||
image: "@docker.image@"
|
||||
- type: ozone/persistence
|
||||
- path: ozone/freon
|
||||
destination: freon
|
||||
transformations:
|
|
@ -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
|
|
@ -0,0 +1,72 @@
|
|||
# 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
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
|
@ -37,6 +37,8 @@ spec:
|
|||
prometheus.io/port: "9874"
|
||||
prometheus.io/path: /prom
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
initContainers:
|
||||
- name: init
|
||||
image: '@docker.image@'
|
||||
|
@ -68,6 +70,13 @@ spec:
|
|||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
volumes: []
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
|
|
|
@ -45,7 +45,12 @@ spec:
|
|||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
initContainers: []
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
|
|
|
@ -37,6 +37,8 @@ spec:
|
|||
prometheus.io/port: "9876"
|
||||
prometheus.io/path: /prom
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
initContainers:
|
||||
- name: init
|
||||
image: '@docker.image@'
|
||||
|
@ -62,6 +64,12 @@ spec:
|
|||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
|
|
Loading…
Reference in New Issue