HDDS-1412. Provide example k8s deployment files as part of the release package
Closes #719
This commit is contained in:
parent
f682a171f5
commit
2ab318b603
|
@ -169,4 +169,28 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>k8s-dev</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.fabric8</groupId>
|
||||||
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
|
<version>0.29.0</version>
|
||||||
|
<configuration>
|
||||||
|
<images>
|
||||||
|
<image>
|
||||||
|
<name>${user.name}/ozone:${project.version}</name>
|
||||||
|
<build>
|
||||||
|
<dockerFileDir>${project.basedir}</dockerFileDir>
|
||||||
|
</build>
|
||||||
|
</image>
|
||||||
|
</images>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -120,3 +120,5 @@ cp -r "${ROOT}/hadoop-hdds/docs/target/classes/docs" ./
|
||||||
run cp -p -R "${ROOT}/hadoop-ozone/dist/target/compose" .
|
run cp -p -R "${ROOT}/hadoop-ozone/dist/target/compose" .
|
||||||
run cp -p -r "${ROOT}/hadoop-ozone/dist/src/main/smoketest" .
|
run cp -p -r "${ROOT}/hadoop-ozone/dist/src/main/smoketest" .
|
||||||
run cp -p -r "${ROOT}/hadoop-ozone/dist/src/main/blockade" .
|
run cp -p -r "${ROOT}/hadoop-ozone/dist/src/main/blockade" .
|
||||||
|
run cp -p -r "${ROOT}/hadoop-ozone/dist/target/k8s" kubernetes
|
||||||
|
run cp -p -r "${ROOT}/hadoop-ozone/dist/src/main/Dockerfile" .
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<properties>
|
<properties>
|
||||||
<file.encoding>UTF-8</file.encoding>
|
<file.encoding>UTF-8</file.encoding>
|
||||||
<downloadSources>true</downloadSources>
|
<downloadSources>true</downloadSources>
|
||||||
|
<docker.image>apache/hadoop:${project.version}</docker.image>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -139,7 +140,7 @@
|
||||||
<version>3.1.0</version>
|
<version>3.1.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>copy-resources</id>
|
<id>copy-compose</id>
|
||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>copy-resources</goal>
|
<goal>copy-resources</goal>
|
||||||
|
@ -154,6 +155,22 @@
|
||||||
</resources>
|
</resources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>copy-k8s</id>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${basedir}/target/k8s</outputDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/k8s</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -267,4 +284,62 @@
|
||||||
<artifactId>hadoop-ozone-upgrade</artifactId>
|
<artifactId>hadoop-ozone-upgrade</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>k8s-dev</id>
|
||||||
|
<properties>
|
||||||
|
<docker.image>${user.name}/ozone:${project.version}</docker.image>
|
||||||
|
</properties>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.fabric8</groupId>
|
||||||
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
|
<version>0.29.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>build</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>package</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<images>
|
||||||
|
<image>
|
||||||
|
<name>${docker.image}</name>
|
||||||
|
<build>
|
||||||
|
<dockerFileDir>
|
||||||
|
${project.build.directory}/ozone-${project.version}
|
||||||
|
</dockerFileDir>
|
||||||
|
</build>
|
||||||
|
</image>
|
||||||
|
</images>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>k8s-dev-push</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.fabric8</groupId>
|
||||||
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
|
<version>0.29.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>push</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>package</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -16,6 +16,6 @@
|
||||||
|
|
||||||
FROM apache/hadoop-runner:latest
|
FROM apache/hadoop-runner:latest
|
||||||
|
|
||||||
ADD --chown=hadoop target/ozone-0.4.0-SNAPSHOT /opt/hadoop
|
ADD --chown=hadoop . /opt/hadoop
|
||||||
|
|
||||||
WORKDIR /opt/hadoop
|
WORKDIR /opt/hadoop
|
|
@ -17,9 +17,8 @@ apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: config
|
name: config
|
||||||
labels: {}
|
|
||||||
annotations: {}
|
|
||||||
data:
|
data:
|
||||||
|
OZONE-SITE.XML_hdds.datanode.dir: "/data/storage"
|
||||||
OZONE-SITE.XML_ozone.scm.datanode.id: "/data/datanode.id"
|
OZONE-SITE.XML_ozone.scm.datanode.id: "/data/datanode.id"
|
||||||
OZONE-SITE.XML_ozone.metadata.dirs: "/data/metadata"
|
OZONE-SITE.XML_ozone.metadata.dirs: "/data/metadata"
|
||||||
OZONE-SITE.XML_ozone.scm.block.client.address: "scm-0.scm"
|
OZONE-SITE.XML_ozone.scm.block.client.address: "scm-0.scm"
|
||||||
|
@ -27,7 +26,6 @@ data:
|
||||||
OZONE-SITE.XML_ozone.scm.client.address: "scm-0.scm"
|
OZONE-SITE.XML_ozone.scm.client.address: "scm-0.scm"
|
||||||
OZONE-SITE.XML_ozone.scm.names: "scm-0.scm"
|
OZONE-SITE.XML_ozone.scm.names: "scm-0.scm"
|
||||||
OZONE-SITE.XML_ozone.enabled: "true"
|
OZONE-SITE.XML_ozone.enabled: "true"
|
||||||
OZONE-SITE.XML_hdds.prometheus.endpoint.enabled: "true"
|
|
||||||
LOG4J.PROPERTIES_log4j.rootLogger: "INFO, stdout"
|
LOG4J.PROPERTIES_log4j.rootLogger: "INFO, stdout"
|
||||||
LOG4J.PROPERTIES_log4j.appender.stdout: "org.apache.log4j.ConsoleAppender"
|
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: "org.apache.log4j.PatternLayout"
|
|
@ -0,0 +1,43 @@
|
||||||
|
# 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: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: datanode
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: ozone
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ozone
|
||||||
|
component: datanode
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "9882"
|
||||||
|
prometheus.io/path: "/prom"
|
||||||
|
labels:
|
||||||
|
app: ozone
|
||||||
|
component: datanode
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: datanode
|
||||||
|
image: "@docker.image@"
|
||||||
|
args: ["ozone","datanode"]
|
||||||
|
ports:
|
||||||
|
- containerPort: 9870
|
||||||
|
name: rpc
|
|
@ -13,17 +13,14 @@
|
||||||
# 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: v1
|
name: ozone/prometheus
|
||||||
kind: Service
|
description: Enable prometheus monitoring in Ozone
|
||||||
metadata:
|
---
|
||||||
name: datanode-public
|
- type: Add
|
||||||
labels: {}
|
trigger:
|
||||||
annotations: {}
|
metadata:
|
||||||
spec:
|
name: config
|
||||||
selector:
|
path:
|
||||||
app: ozone
|
- data
|
||||||
component: datanode
|
value:
|
||||||
ports:
|
OZONE-SITE.XML_hdds.prometheus.endpoint.enabled: true
|
||||||
- port: 9870
|
|
||||||
name: rpc
|
|
||||||
type: NodePort
|
|
|
@ -13,7 +13,4 @@
|
||||||
# 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: v1
|
description: Apache Hadoop Ozone
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: prometheus-operator
|
|
|
@ -13,13 +13,4 @@
|
||||||
# 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.
|
||||||
|
description: Load test tool for Apache Hadoop Ozone
|
||||||
apiVersion: skaffold/v1alpha5
|
|
||||||
kind: Config
|
|
||||||
build:
|
|
||||||
artifacts:
|
|
||||||
- image: apache/ozone
|
|
||||||
deploy:
|
|
||||||
kubectl:
|
|
||||||
manifests:
|
|
||||||
- src/main/k8s/ozone/*
|
|
|
@ -14,39 +14,27 @@
|
||||||
# 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: StatefulSet
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: datanode
|
name: freon
|
||||||
labels: {}
|
labels:
|
||||||
annotations: {}
|
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:
|
||||||
labels:
|
labels:
|
||||||
app: ozone
|
app: ozone
|
||||||
component: datanode
|
component: freon
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: datanode
|
- name: freon
|
||||||
image: apache/ozone
|
image: "@docker.image@"
|
||||||
args:
|
args: ["ozone","freon", "rk", "--factor=THREE", "--replicationType=RATIS"]
|
||||||
- ozone
|
|
||||||
- datanode
|
|
||||||
ports:
|
|
||||||
- containerPort: 9870
|
|
||||||
name: rpc
|
|
||||||
volumeMounts:
|
|
||||||
- name: "data"
|
|
||||||
mountPath: "/data"
|
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: config
|
name: config
|
||||||
volumes:
|
|
||||||
- name: "data"
|
|
||||||
emptyDir: {}
|
|
||||||
serviceName: datanode
|
|
||||||
replicas: 3
|
|
|
@ -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: om
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 9874
|
||||||
|
name: ui
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
app: ozone
|
||||||
|
component: om
|
|
@ -17,8 +17,8 @@ apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: om
|
name: om
|
||||||
labels: {}
|
labels:
|
||||||
annotations: {}
|
app.kubernetes.io/component: ozone
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
@ -28,39 +28,26 @@ spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ozone
|
||||||
|
component: om
|
||||||
annotations:
|
annotations:
|
||||||
prometheus.io/scrape: "true"
|
prometheus.io/scrape: "true"
|
||||||
prometheus.io/port: "9874"
|
prometheus.io/port: "9874"
|
||||||
prometheus.io/path: "/prom"
|
prometheus.io/path: "/prom"
|
||||||
labels:
|
|
||||||
app: ozone
|
|
||||||
component: om
|
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init
|
- name: init
|
||||||
image: apache/ozone
|
image: elek/ozone
|
||||||
args:
|
args: ["ozone","om","--init"]
|
||||||
- ozone
|
env:
|
||||||
- om
|
- name: WAITFOR
|
||||||
- --init
|
value: scm-0.scm:9876
|
||||||
volumeMounts:
|
|
||||||
- name: "data"
|
|
||||||
mountPath: "/data"
|
|
||||||
envFrom:
|
|
||||||
- configMapRef:
|
|
||||||
name: config
|
|
||||||
containers:
|
containers:
|
||||||
- name: om
|
- name: om
|
||||||
image: apache/ozone
|
image: "@docker.image@"
|
||||||
args:
|
args: ["ozone","om"]
|
||||||
- ozone
|
env:
|
||||||
- om
|
- name: WAITFOR
|
||||||
volumeMounts:
|
value: scm-0.scm:9876
|
||||||
- name: "data"
|
volumes: []
|
||||||
mountPath: "/data"
|
|
||||||
envFrom:
|
|
||||||
- configMapRef:
|
|
||||||
name: config
|
|
||||||
volumes:
|
|
||||||
- name: "data"
|
|
||||||
emptyDir: {}
|
|
|
@ -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: s3g
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 9878
|
||||||
|
name: rest
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
app: ozone
|
||||||
|
component: s3g
|
|
@ -0,0 +1,38 @@
|
||||||
|
# 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: s3g
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: ozone
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ozone
|
||||||
|
component: s3g
|
||||||
|
serviceName: s3g
|
||||||
|
replicas: 1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ozone
|
||||||
|
component: s3g
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: s3g
|
||||||
|
image: "@docker.image@"
|
||||||
|
args: ["ozone","s3g"]
|
|
@ -17,8 +17,6 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: scm
|
name: scm
|
||||||
labels: {}
|
|
||||||
annotations: {}
|
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 9876
|
- port: 9876
|
|
@ -17,8 +17,8 @@ apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: scm
|
name: scm
|
||||||
labels: {}
|
labels:
|
||||||
annotations: {}
|
app.kubernetes.io/component: ozone
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
@ -28,40 +28,19 @@ spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ozone
|
||||||
|
component: scm
|
||||||
annotations:
|
annotations:
|
||||||
prometheus.io/scrape: "true"
|
prometheus.io/scrape: "true"
|
||||||
prometheus.io/port: "9876"
|
prometheus.io/port: "9876"
|
||||||
prometheus.io/path: "/prom"
|
prometheus.io/path: "/prom"
|
||||||
labels:
|
|
||||||
app: ozone
|
|
||||||
component: scm
|
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init
|
- name: init
|
||||||
image: apache/ozone
|
image: "@docker.image@"
|
||||||
args:
|
args: ["ozone","scm", "--init"]
|
||||||
- ozone
|
|
||||||
- scm
|
|
||||||
- --init
|
|
||||||
env: []
|
|
||||||
volumeMounts:
|
|
||||||
- name: "data"
|
|
||||||
mountPath: "/data"
|
|
||||||
envFrom:
|
|
||||||
- configMapRef:
|
|
||||||
name: config
|
|
||||||
containers:
|
containers:
|
||||||
- name: scm
|
- name: scm
|
||||||
image: apache/ozone
|
image: elek/ozone
|
||||||
args:
|
args: ["ozone","scm"]
|
||||||
- ozone
|
|
||||||
- scm
|
|
||||||
volumeMounts:
|
|
||||||
- name: "data"
|
|
||||||
mountPath: "/data"
|
|
||||||
envFrom:
|
|
||||||
- configMapRef:
|
|
||||||
name: config
|
|
||||||
volumes:
|
|
||||||
- name: "data"
|
|
||||||
emptyDir: {}
|
|
26
hadoop-ozone/dist/src/main/k8s/definitions/ozone/transformations/config.yaml
vendored
Normal file
26
hadoop-ozone/dist/src/main/k8s/definitions/ozone/transformations/config.yaml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# 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.
|
||||||
|
- type: Add
|
||||||
|
path:
|
||||||
|
- spec
|
||||||
|
- template
|
||||||
|
- spec
|
||||||
|
- ".*"
|
||||||
|
- ".*"
|
||||||
|
- envFrom
|
||||||
|
value:
|
||||||
|
- configMapRef:
|
||||||
|
name: config
|
58
hadoop-ozone/dist/src/main/k8s/definitions/ozone/transformations/emptydir.yaml
vendored
Normal file
58
hadoop-ozone/dist/src/main/k8s/definitions/ozone/transformations/emptydir.yaml
vendored
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
# 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.
|
||||||
|
- type: Add
|
||||||
|
trigger:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: ozone
|
||||||
|
path:
|
||||||
|
- 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
|
||||||
|
- "*"
|
||||||
|
- volumeMounts
|
||||||
|
value:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
- type: Add
|
||||||
|
trigger:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: ozone
|
||||||
|
path:
|
||||||
|
- spec
|
||||||
|
- template
|
||||||
|
- spec
|
||||||
|
- volumes
|
||||||
|
value:
|
||||||
|
- name: data
|
||||||
|
emptyDir: {}
|
|
@ -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.
|
|
@ -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: /data/datanode.id
|
||||||
|
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'
|
|
@ -13,17 +13,13 @@
|
||||||
# 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: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: datanode
|
name: datanode
|
||||||
labels: {}
|
|
||||||
annotations: {}
|
|
||||||
spec:
|
spec:
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
selector:
|
selector:
|
||||||
app: ozone
|
app: ozone
|
||||||
component: datanode
|
component: datanode
|
||||||
ports:
|
|
||||||
- port: 9870
|
|
||||||
name: rpc
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
# 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
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "9882"
|
||||||
|
prometheus.io/path: /prom
|
||||||
|
labels:
|
||||||
|
app: ozone
|
||||||
|
component: datanode
|
||||||
|
spec:
|
||||||
|
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
|
|
@ -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: DaemonToStatefulSet
|
||||||
|
- type: PublishStatefulSet
|
||||||
|
- 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.
|
|
@ -13,34 +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/v1beta1
|
|
||||||
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: prometheus
|
name: freon
|
||||||
labels:
|
labels:
|
||||||
app: prometheus
|
app.kubernetes.io/component: ozone
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: prometheus
|
app: ozone
|
||||||
|
component: freon
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: prometheus
|
app: ozone
|
||||||
|
component: freon
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: prometheus-operator
|
|
||||||
containers:
|
containers:
|
||||||
- name: prometheus
|
- name: freon
|
||||||
image: prom/prometheus
|
image: '@docker.image@'
|
||||||
args: ["--config.file=/conf/prometheus.yaml"]
|
args:
|
||||||
ports:
|
- ozone
|
||||||
- containerPort: 9090
|
- freon
|
||||||
volumeMounts:
|
- rk
|
||||||
- name: config
|
- --factor=THREE
|
||||||
mountPath: "/conf"
|
- --replicationType=RATIS
|
||||||
readOnly: true
|
envFrom:
|
||||||
volumes:
|
- configMapRef:
|
||||||
- name: config
|
name: config
|
||||||
configMap:
|
|
||||||
name: prometheusconf
|
|
|
@ -13,12 +13,11 @@
|
||||||
# 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: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: om-public
|
name: om-public
|
||||||
labels: {}
|
|
||||||
annotations: {}
|
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 9874
|
- port: 9874
|
|
@ -13,12 +13,11 @@
|
||||||
# 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: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: om
|
name: om
|
||||||
labels: {}
|
|
||||||
annotations: {}
|
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 9874
|
- port: 9874
|
|
@ -0,0 +1,67 @@
|
||||||
|
# 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:
|
||||||
|
initContainers:
|
||||||
|
- name: init
|
||||||
|
image: '@docker.image@'
|
||||||
|
args:
|
||||||
|
- ozone
|
||||||
|
- om
|
||||||
|
- --init
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: config
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
containers:
|
||||||
|
- name: om
|
||||||
|
image: '@docker.image@'
|
||||||
|
args:
|
||||||
|
- ozone
|
||||||
|
- om
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: config
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
emptyDir: {}
|
|
@ -13,12 +13,11 @@
|
||||||
# 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: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: s3g-public
|
name: s3g-public
|
||||||
labels: {}
|
|
||||||
annotations: {}
|
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 9878
|
- port: 9878
|
|
@ -13,12 +13,11 @@
|
||||||
# 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: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: s3g
|
name: s3g
|
||||||
labels: {}
|
|
||||||
annotations: {}
|
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 9878
|
- port: 9878
|
|
@ -13,12 +13,13 @@
|
||||||
# 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: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: s3g
|
name: s3g
|
||||||
labels: {}
|
labels:
|
||||||
annotations: {}
|
app.kubernetes.io/component: ozone
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
@ -34,16 +35,17 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: s3g
|
- name: s3g
|
||||||
image: apache/ozone
|
image: '@docker.image@'
|
||||||
args:
|
args:
|
||||||
- ozone
|
- ozone
|
||||||
- s3g
|
- s3g
|
||||||
volumeMounts:
|
|
||||||
- name: "data"
|
|
||||||
mountPath: "/data"
|
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: config
|
name: config
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
initContainers: []
|
||||||
volumes:
|
volumes:
|
||||||
- name: "data"
|
- name: data
|
||||||
emptyDir: {}
|
emptyDir: {}
|
|
@ -13,12 +13,11 @@
|
||||||
# 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: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: scm-public
|
name: scm-public
|
||||||
labels: {}
|
|
||||||
annotations: {}
|
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 9876
|
- port: 9876
|
|
@ -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
|
|
@ -0,0 +1,67 @@
|
||||||
|
# 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:
|
||||||
|
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,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.
|
|
@ -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: /data/datanode.id
|
||||||
|
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'
|
|
@ -0,0 +1,56 @@
|
||||||
|
# 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: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: datanode
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: ozone
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ozone
|
||||||
|
component: datanode
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "9882"
|
||||||
|
prometheus.io/path: /prom
|
||||||
|
labels:
|
||||||
|
app: ozone
|
||||||
|
component: datanode
|
||||||
|
spec:
|
||||||
|
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: {}
|
|
@ -0,0 +1,43 @@
|
||||||
|
# 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@"
|
||||||
|
- 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.
|
|
@ -0,0 +1,46 @@
|
||||||
|
# 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: Deployment
|
||||||
|
metadata:
|
||||||
|
name: freon
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: ozone
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ozone
|
||||||
|
component: freon
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ozone
|
||||||
|
component: freon
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: freon
|
||||||
|
image: '@docker.image@'
|
||||||
|
args:
|
||||||
|
- ozone
|
||||||
|
- freon
|
||||||
|
- rk
|
||||||
|
- --factor=THREE
|
||||||
|
- --replicationType=RATIS
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: config
|
|
@ -13,13 +13,16 @@
|
||||||
# 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.
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: prometheus
|
name: om
|
||||||
spec:
|
spec:
|
||||||
selector:
|
|
||||||
app: prometheus
|
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- port: 9874
|
||||||
port: 9090
|
name: ui
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
app: ozone
|
||||||
|
component: om
|
|
@ -0,0 +1,73 @@
|
||||||
|
# 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:
|
||||||
|
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: {}
|
|
@ -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
|
|
@ -0,0 +1,51 @@
|
||||||
|
# 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: s3g
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: ozone
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ozone
|
||||||
|
component: s3g
|
||||||
|
serviceName: s3g
|
||||||
|
replicas: 1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ozone
|
||||||
|
component: s3g
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: s3g
|
||||||
|
image: '@docker.image@'
|
||||||
|
args:
|
||||||
|
- ozone
|
||||||
|
- s3g
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: config
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
initContainers: []
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
emptyDir: {}
|
|
@ -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
|
|
@ -0,0 +1,67 @@
|
||||||
|
# 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:
|
||||||
|
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: {}
|
|
@ -1,51 +0,0 @@
|
||||||
# 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: prometheusconf
|
|
||||||
data:
|
|
||||||
prometheus.yaml: |-
|
|
||||||
global:
|
|
||||||
scrape_interval: 15s
|
|
||||||
scrape_configs:
|
|
||||||
- job_name: jmxexporter
|
|
||||||
kubernetes_sd_configs:
|
|
||||||
- role: pod
|
|
||||||
namespaces:
|
|
||||||
names: ["default"]
|
|
||||||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
||||||
relabel_configs:
|
|
||||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
|
|
||||||
action: keep
|
|
||||||
regex: true
|
|
||||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
|
|
||||||
action: replace
|
|
||||||
target_label: __metrics_path__
|
|
||||||
regex: (.+)
|
|
||||||
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
|
|
||||||
action: replace
|
|
||||||
regex: ([^:]+)(?::\d+)?;(\d+)
|
|
||||||
replacement: $1:$2
|
|
||||||
target_label: __address__
|
|
||||||
- action: labelmap
|
|
||||||
regex: __meta_kubernetes_pod_label_(.+)
|
|
||||||
- source_labels: [__meta_kubernetes_namespace]
|
|
||||||
action: replace
|
|
||||||
target_label: kubernetes_namespace
|
|
||||||
- source_labels: [__meta_kubernetes_pod_name]
|
|
||||||
action: replace
|
|
||||||
target_label: kubernetes_pod_name
|
|
|
@ -1,28 +0,0 @@
|
||||||
# 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: prometheus-public
|
|
||||||
labels: {}
|
|
||||||
annotations: {}
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 9090
|
|
||||||
name: ui
|
|
||||||
selector:
|
|
||||||
app: prometheus
|
|
||||||
type: NodePort
|
|
|
@ -1,31 +0,0 @@
|
||||||
# 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: rbac.authorization.k8s.io/v1beta1
|
|
||||||
kind: Role
|
|
||||||
metadata:
|
|
||||||
name: prometheus
|
|
||||||
rules:
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources:
|
|
||||||
- nodes
|
|
||||||
- services
|
|
||||||
- endpoints
|
|
||||||
- pods
|
|
||||||
verbs: ["get", "list", "watch"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources:
|
|
||||||
- configmaps
|
|
||||||
verbs: ["get"]
|
|
|
@ -1,27 +0,0 @@
|
||||||
# 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: rbac.authorization.k8s.io/v1beta1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: prometheus-operator
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: prometheus
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: prometheus-operator
|
|
||||||
# namespace: default
|
|
|
@ -1,29 +0,0 @@
|
||||||
# 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
|
|
||||||
labels: {}
|
|
||||||
annotations: {}
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 9876
|
|
||||||
name: ui
|
|
||||||
selector:
|
|
||||||
app: ozone
|
|
||||||
component: scm
|
|
||||||
type: NodePort
|
|
Loading…
Reference in New Issue