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:
Elek, Márton 2019-06-24 21:02:35 +02:00 committed by Anu Engineer
parent 95c94dcca7
commit d023f1f864
42 changed files with 994 additions and 89 deletions

View File

@ -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

View File

@ -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"]

View File

@ -13,6 +13,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
name: ozone/emptydir
description: Add empty dir based ephemeral persistence
---
- type: Add - type: Add
trigger: trigger:
metadata: metadata:
@ -22,22 +25,7 @@
- spec - spec
- template - template
- spec - spec
- containers - (initContainers|containers)
- "*"
- volumeMounts
value:
- name: data
mountPath: /data
- type: Add
trigger:
metadata:
labels:
app.kubernetes.io/component: ozone
path:
- spec
- template
- spec
- initContainers
- "*" - "*"
- volumeMounts - volumeMounts
value: value:

View 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

View File

@ -36,6 +36,8 @@ spec:
prometheus.io/port: "9874" prometheus.io/port: "9874"
prometheus.io/path: "/prom" prometheus.io/path: "/prom"
spec: spec:
securityContext:
fsGroup: 1000
initContainers: initContainers:
- name: init - name: init
image: "@docker.image@" image: "@docker.image@"

View File

@ -36,6 +36,8 @@ spec:
prometheus.io/port: "9876" prometheus.io/port: "9876"
prometheus.io/path: "/prom" prometheus.io/path: "/prom"
spec: spec:
securityContext:
fsGroup: 1000
initContainers: initContainers:
- name: init - name: init
image: "@docker.image@" image: "@docker.image@"

View File

@ -14,14 +14,14 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
source: source:
- path: ../../../definitions - path: ../../definitions
import: import:
- path: ozone - path: ozone
transformations: transformations:
- type: Image - type: Image
image: "@docker.image@" image: "@docker.image@"
- type: DaemonToStatefulSet
- type: PublishStatefulSet - type: PublishStatefulSet
- type: ozone/emptydir
- path: ozone/freon - path: ozone/freon
destination: freon destination: freon
transformations: transformations:

View File

@ -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.

View 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'

View 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

View 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

View 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: {}

View File

@ -13,31 +13,34 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
apiVersion: apps/v1 apiVersion: apps/v1
kind: DaemonSet kind: Deployment
metadata: metadata:
name: datanode name: freon
labels: labels:
app.kubernetes.io/component: ozone app.kubernetes.io/component: ozone
spec: spec:
replicas: 1
selector: selector:
matchLabels: matchLabels:
app: ozone app: ozone
component: datanode component: freon
template: template:
metadata: metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9882"
prometheus.io/path: "/prom"
labels: labels:
app: ozone app: ozone
component: datanode component: freon
spec: spec:
containers: containers:
- name: datanode - name: freon
image: "@docker.image@" image: '@docker.image@'
args: ["ozone","datanode"] args:
ports: - ozone
- containerPort: 9870 - freon
name: rpc - rk
- --factor=THREE
- --replicationType=RATIS
envFrom:
- configMapRef:
name: config

View 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

View 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
spec:
ports:
- port: 9874
name: ui
clusterIP: None
selector:
app: ozone
component: om

View File

@ -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: {}

View 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

View 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
spec:
ports:
- port: 9878
name: rest
clusterIP: None
selector:
app: ozone
component: s3g

View File

@ -15,42 +15,36 @@
# limitations under the License. # limitations under the License.
apiVersion: apps/v1 apiVersion: apps/v1
kind: DaemonSet kind: StatefulSet
metadata: metadata:
name: datanode name: s3g
labels: labels:
app.kubernetes.io/component: ozone app.kubernetes.io/component: ozone
spec: spec:
selector: selector:
matchLabels: matchLabels:
app: ozone app: ozone
component: datanode component: s3g
serviceName: s3g
replicas: 1
template: template:
metadata: metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9882"
prometheus.io/path: /prom
labels: labels:
app: ozone app: ozone
component: datanode component: s3g
spec: spec:
containers: containers:
- name: datanode - name: s3g
image: '@docker.image@' image: '@docker.image@'
args: args:
- ozone - ozone
- datanode - s3g
ports:
- containerPort: 9870
name: rpc
envFrom: envFrom:
- configMapRef: - configMapRef:
name: config name: config
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data
initContainers: []
volumes: volumes:
- name: data - name: data
emptyDir: {} emptyDir: {}

View 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

View 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
spec:
ports:
- port: 9876
name: ui
clusterIP: None
selector:
app: ozone
component: scm

View 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: {}

View File

@ -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.

View 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

View File

@ -19,6 +19,9 @@ kind: Service
metadata: metadata:
name: datanode name: datanode
spec: spec:
ports:
- port: 9870
name: rpc
clusterIP: None clusterIP: None
selector: selector:
app: ozone app: ozone

View File

@ -25,34 +25,42 @@ spec:
matchLabels: matchLabels:
app: ozone app: ozone
component: datanode component: datanode
serviceName: datanode
replicas: 3
template: template:
metadata: metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9882"
prometheus.io/path: /prom
labels: labels:
app: ozone app: ozone
component: datanode component: datanode
annotations:
prdatanodeetheus.io/scrape: "true"
prdatanodeetheus.io/port: "9882"
prdatanodeetheus.io/path: /prom
spec: spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: component
operator: In
values:
- datanode
topologyKey: kubernetes.io/hostname
securityContext:
fsGroup: 1000
containers: containers:
- name: datanode - name: datanode
image: '@docker.image@' image: '@docker.image@'
args: args:
- ozone - ozone
- datanode - datanode
ports:
- containerPort: 9870
name: rpc
envFrom: envFrom:
- configMapRef: - configMapRef:
name: config name: config
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data
initContainers: []
volumes: volumes:
- name: data - name: data
emptyDir: {} emptyDir: {}
serviceName: datanode
replicas: 3

View File

@ -37,6 +37,8 @@ spec:
prometheus.io/port: "9874" prometheus.io/port: "9874"
prometheus.io/path: /prom prometheus.io/path: /prom
spec: spec:
securityContext:
fsGroup: 1000
initContainers: initContainers:
- name: init - name: init
image: '@docker.image@' image: '@docker.image@'
@ -44,6 +46,9 @@ spec:
- ozone - ozone
- om - om
- --init - --init
env:
- name: WAITFOR
value: scm-0.scm:9876
envFrom: envFrom:
- configMapRef: - configMapRef:
name: config name: config
@ -56,6 +61,9 @@ spec:
args: args:
- ozone - ozone
- om - om
env:
- name: WAITFOR
value: scm-0.scm:9876
envFrom: envFrom:
- configMapRef: - configMapRef:
name: config name: config

View File

@ -45,7 +45,6 @@ spec:
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data
initContainers: []
volumes: volumes:
- name: data - name: data
emptyDir: {} emptyDir: {}

View File

@ -37,6 +37,8 @@ spec:
prometheus.io/port: "9876" prometheus.io/port: "9876"
prometheus.io/path: /prom prometheus.io/path: /prom
spec: spec:
securityContext:
fsGroup: 1000
initContainers: initContainers:
- name: init - name: init
image: '@docker.image@' image: '@docker.image@'

View File

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
source: source:
- path: ../../../definitions - path: ../../definitions
import: import:
- path: ozone - path: ozone
transformations: transformations:
@ -24,6 +24,7 @@ import:
- type: PublishStatefulSet - type: PublishStatefulSet
- type: ozone/tracing - type: ozone/tracing
- type: ozone/profiler - type: ozone/profiler
- type: ozone/emptydir
- path: prometheus - path: prometheus
- path: jaeger - path: jaeger
transformations: transformations:
@ -33,4 +34,4 @@ import:
transformations: transformations:
- type: Image - type: Image
image: "@docker.image@" image: "@docker.image@"
- type: ozone/tracing - type: ozone/tracing

View 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

View 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

View File

@ -15,7 +15,7 @@
# limitations under the License. # limitations under the License.
apiVersion: apps/v1 apiVersion: apps/v1
kind: DaemonSet kind: StatefulSet
metadata: metadata:
name: datanode name: datanode
labels: labels:
@ -25,25 +25,39 @@ spec:
matchLabels: matchLabels:
app: ozone app: ozone
component: datanode component: datanode
serviceName: datanode
replicas: 3
template: template:
metadata: metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9882"
prometheus.io/path: /prom
labels: labels:
app: ozone app: ozone
component: datanode component: datanode
annotations:
prdatanodeetheus.io/scrape: "true"
prdatanodeetheus.io/port: "9882"
prdatanodeetheus.io/path: /prom
spec: spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: component
operator: In
values:
- datanode
topologyKey: kubernetes.io/hostname
securityContext:
fsGroup: 1000
containers: containers:
- name: datanode - name: datanode
image: '@docker.image@' image: '@docker.image@'
args: args:
- ozone - ozone
- datanode - datanode
ports: envFrom:
- containerPort: 9870 - configMapRef:
name: rpc name: config
env: env:
- name: JAEGER_SAMPLER_TYPE - name: JAEGER_SAMPLER_TYPE
value: probabilistic value: probabilistic
@ -51,13 +65,9 @@ spec:
value: "0.01" value: "0.01"
- name: JAEGER_AGENT_HOST - name: JAEGER_AGENT_HOST
value: jaeger-0.jaeger value: jaeger-0.jaeger
envFrom:
- configMapRef:
name: config
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data
initContainers: []
volumes: volumes:
- name: data - name: data
emptyDir: {} emptyDir: {}

View File

@ -37,6 +37,8 @@ spec:
prometheus.io/port: "9874" prometheus.io/port: "9874"
prometheus.io/path: /prom prometheus.io/path: /prom
spec: spec:
securityContext:
fsGroup: 1000
initContainers: initContainers:
- name: init - name: init
image: '@docker.image@' image: '@docker.image@'

View File

@ -39,6 +39,9 @@ spec:
args: args:
- ozone - ozone
- s3g - s3g
envFrom:
- configMapRef:
name: config
env: env:
- name: JAEGER_SAMPLER_TYPE - name: JAEGER_SAMPLER_TYPE
value: probabilistic value: probabilistic
@ -46,13 +49,9 @@ spec:
value: "0.01" value: "0.01"
- name: JAEGER_AGENT_HOST - name: JAEGER_AGENT_HOST
value: jaeger-0.jaeger value: jaeger-0.jaeger
envFrom:
- configMapRef:
name: config
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data
initContainers: []
volumes: volumes:
- name: data - name: data
emptyDir: {} emptyDir: {}

View File

@ -37,6 +37,8 @@ spec:
prometheus.io/port: "9876" prometheus.io/port: "9876"
prometheus.io/path: /prom prometheus.io/path: /prom
spec: spec:
securityContext:
fsGroup: 1000
initContainers: initContainers:
- name: init - name: init
image: '@docker.image@' image: '@docker.image@'
@ -56,6 +58,9 @@ spec:
args: args:
- ozone - ozone
- scm - scm
envFrom:
- configMapRef:
name: config
env: env:
- name: JAEGER_SAMPLER_TYPE - name: JAEGER_SAMPLER_TYPE
value: probabilistic value: probabilistic
@ -63,9 +68,6 @@ spec:
value: "0.01" value: "0.01"
- name: JAEGER_AGENT_HOST - name: JAEGER_AGENT_HOST
value: jaeger-0.jaeger value: jaeger-0.jaeger
envFrom:
- configMapRef:
name: config
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data

View File

@ -14,12 +14,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
source: source:
- path: ../../../definitions - path: ../../definitions
import: import:
- path: ozone - path: ozone
transformations: transformations:
- type: Image - type: Image
image: "@docker.image@" image: "@docker.image@"
- type: ozone/persistence
- path: ozone/freon - path: ozone/freon
destination: freon destination: freon
transformations: transformations:

View 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

View File

@ -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

View File

@ -37,6 +37,8 @@ spec:
prometheus.io/port: "9874" prometheus.io/port: "9874"
prometheus.io/path: /prom prometheus.io/path: /prom
spec: spec:
securityContext:
fsGroup: 1000
initContainers: initContainers:
- name: init - name: init
image: '@docker.image@' image: '@docker.image@'
@ -68,6 +70,13 @@ spec:
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data
volumes: volumes: []
- name: data volumeClaimTemplates:
emptyDir: {} - metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi

View File

@ -45,7 +45,12 @@ spec:
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data
initContainers: [] volumeClaimTemplates:
volumes: - metadata:
- name: data name: data
emptyDir: {} spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi

View File

@ -37,6 +37,8 @@ spec:
prometheus.io/port: "9876" prometheus.io/port: "9876"
prometheus.io/path: /prom prometheus.io/path: /prom
spec: spec:
securityContext:
fsGroup: 1000
initContainers: initContainers:
- name: init - name: init
image: '@docker.image@' image: '@docker.image@'
@ -62,6 +64,12 @@ spec:
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data
volumes: volumeClaimTemplates:
- name: data - metadata:
emptyDir: {} name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi