HDDS-1508. Provide example k8s deployment files for the new CSI server
Closes #905
This commit is contained in:
parent
e02eb24e0a
commit
9c4b15d2f4
53
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-controller.yaml
vendored
Normal file
53
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-controller.yaml
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
# 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.
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: csi-provisioner
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: csi-provisioner
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: csi-provisioner
|
||||
spec:
|
||||
serviceAccount: csi-ozone
|
||||
containers:
|
||||
- name: csi-provisioner
|
||||
image: quay.io/k8scsi/csi-provisioner:v1.0.1
|
||||
args:
|
||||
- "--csi-address=/var/lib/csi/csi.sock"
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/
|
||||
- name: ozone-csi
|
||||
image: "@docker.image@"
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
args:
|
||||
- ozone
|
||||
- csi
|
||||
volumes:
|
||||
- name: socket-dir
|
||||
emptyDir:
|
21
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-crd.yaml
vendored
Normal file
21
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-crd.yaml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# 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: storage.k8s.io/v1beta1
|
||||
kind: CSIDriver
|
||||
metadata:
|
||||
name: org.apache.hadoop.ozone
|
||||
spec:
|
||||
attachRequired: false
|
95
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-node.yaml
vendored
Normal file
95
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-node.yaml
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
# 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.
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1beta2
|
||||
metadata:
|
||||
name: csi-node
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: csi-node
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: csi-node
|
||||
spec:
|
||||
serviceAccount: csi-ozone
|
||||
containers:
|
||||
- name: driver-registrar
|
||||
image: quay.io/k8scsi/csi-node-driver-registrar:v1.0.2
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--csi-address=/var/lib/csi/csi.sock"
|
||||
- "--kubelet-registration-path=/var/lib/kubelet/plugins/org.apache.hadoop.ozone/csi.sock"
|
||||
env:
|
||||
- name: KUBE_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /var/lib/csi
|
||||
- name: registration-dir
|
||||
mountPath: /registration/
|
||||
- name: csi-node
|
||||
image: "@docker.image@"
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
args:
|
||||
- ozone
|
||||
- csi
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
imagePullPolicy: "Always"
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /var/lib/csi
|
||||
- name: pods-mount-dir
|
||||
mountPath: /var/lib/kubelet/pods
|
||||
mountPropagation: "Bidirectional"
|
||||
- name: fuse-device
|
||||
mountPath: /dev/fuse
|
||||
- name: dbus
|
||||
mountPath: /var/run/dbus
|
||||
- name: systemd
|
||||
mountPath: /run/systemd
|
||||
volumes:
|
||||
- name: plugin-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/plugins/org.apache.hadoop.ozone
|
||||
type: DirectoryOrCreate
|
||||
- name: registration-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/plugins_registry/
|
||||
type: DirectoryOrCreate
|
||||
- name: pods-mount-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/pods
|
||||
type: Directory
|
||||
- name: fuse-device
|
||||
hostPath:
|
||||
path: /dev/fuse
|
||||
- name: dbus
|
||||
hostPath:
|
||||
path: /var/run/dbus
|
||||
- name: systemd
|
||||
hostPath:
|
||||
path: /run/systemd
|
66
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-rbac.yaml
vendored
Normal file
66
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-rbac.yaml
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
namespace: default
|
||||
name: csi-ozone
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: csi-ozone
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get", "list", "update","watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims"]
|
||||
verbs: ["get", "list", "watch", "update"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "update", "create"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments"]
|
||||
verbs: ["get", "list", "watch", "update"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["csinodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: csi-ozone
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: csi-ozone
|
||||
namespace: default
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: csi-ozone
|
||||
apiGroup: rbac.authorization.k8s.io
|
20
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-storageclass.yaml
vendored
Normal file
20
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-storageclass.yaml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# 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.
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1
|
||||
metadata:
|
||||
name: ozone
|
||||
provisioner: org.apache.hadoop.ozone
|
28
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/definitions/csi.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/definitions/csi.yaml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
name: ozone/csi
|
||||
description: Configuration for CSI interface
|
||||
---
|
||||
- type: Add
|
||||
trigger:
|
||||
metadata:
|
||||
name: config
|
||||
path:
|
||||
- data
|
||||
value:
|
||||
OZONE-SITE.XML_ozone.csi.s3g.address: http://s3g-0.s3g:9878
|
||||
OZONE-SITE.XML_ozone.csi.socket: /var/lib/csi/csi.sock
|
||||
OZONE-SITE.XML_ozone.csi.owner: hadoop
|
@ -38,7 +38,7 @@ spec:
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init
|
||||
image: elek/ozone
|
||||
image: "@docker.image@"
|
||||
args: ["ozone","om","--init"]
|
||||
env:
|
||||
- name: WAITFOR
|
||||
|
@ -42,5 +42,5 @@ spec:
|
||||
args: ["ozone","scm", "--init"]
|
||||
containers:
|
||||
- name: scm
|
||||
image: elek/ozone
|
||||
image: "@docker.image@"
|
||||
args: ["ozone","scm"]
|
||||
|
16
hadoop-ozone/dist/src/main/k8s/definitions/pv-test/flekszible.yaml
vendored
Normal file
16
hadoop-ozone/dist/src/main/k8s/definitions/pv-test/flekszible.yaml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
# 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.
|
||||
description: Nginx example deployment with persistent volume claim.
|
37
hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-conf-configmap.yaml
vendored
Normal file
37
hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-conf-configmap.yaml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# 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: nginx-conf
|
||||
labels: {}
|
||||
annotations: {}
|
||||
data:
|
||||
default.conf: |-
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
49
hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-deployment.yaml
vendored
Normal file
49
hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-deployment.yaml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
# 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: nginx
|
||||
labels:
|
||||
app: nginx
|
||||
annotations: {}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
annotations: {}
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/www/html
|
||||
name: webroot
|
||||
env: []
|
||||
envFrom: []
|
||||
volumes:
|
||||
- name: webroot
|
||||
persistentVolumeClaim:
|
||||
claimName: nginx-storage
|
||||
readOnly: false
|
||||
- name: config
|
||||
configMap:
|
||||
name: nginx-conf
|
28
hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-service-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-service-service.yaml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-service
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
name: web
|
||||
selector:
|
||||
app: csi-s3-test-nginx
|
28
hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-storage-persistentvolumeclaim.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-storage-persistentvolumeclaim.yaml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nginx-storage
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: ozone
|
25
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/Flekszible
vendored
Normal file
25
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/Flekszible
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
# 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-csi
|
||||
- path: ozone
|
||||
transformations:
|
||||
- type: ozone/csi
|
||||
- path: pv-test
|
||||
destination: pv-test
|
15
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/LICENSE.header
vendored
Normal file
15
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/LICENSE.header
vendored
Normal 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.
|
37
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/config-configmap.yaml
vendored
Normal file
37
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/config-configmap.yaml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# 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'
|
||||
OZONE-SITE.XML_ozone.csi.s3g.address: http://s3g-0.s3g:9878
|
||||
OZONE-SITE.XML_ozone.csi.socket: /var/lib/csi/csi.sock
|
||||
OZONE-SITE.XML_ozone.csi.owner: hadoop
|
97
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-node-daemonset.yaml
vendored
Normal file
97
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-node-daemonset.yaml
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
# 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.
|
||||
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1beta2
|
||||
metadata:
|
||||
name: csi-node
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: csi-node
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: csi-node
|
||||
spec:
|
||||
serviceAccount: csi-ozone
|
||||
containers:
|
||||
- name: driver-registrar
|
||||
image: quay.io/k8scsi/csi-node-driver-registrar:v1.0.2
|
||||
args:
|
||||
- --v=4
|
||||
- --csi-address=/var/lib/csi/csi.sock
|
||||
- --kubelet-registration-path=/var/lib/kubelet/plugins/org.apache.hadoop.ozone/csi.sock
|
||||
env:
|
||||
- name: KUBE_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /var/lib/csi
|
||||
- name: registration-dir
|
||||
mountPath: /registration/
|
||||
- name: csi-node
|
||||
image: '@docker.image@'
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
privileged: true
|
||||
capabilities:
|
||||
add:
|
||||
- SYS_ADMIN
|
||||
allowPrivilegeEscalation: true
|
||||
args:
|
||||
- ozone
|
||||
- csi
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /var/lib/csi
|
||||
- name: pods-mount-dir
|
||||
mountPath: /var/lib/kubelet/pods
|
||||
mountPropagation: Bidirectional
|
||||
- name: fuse-device
|
||||
mountPath: /dev/fuse
|
||||
- name: dbus
|
||||
mountPath: /var/run/dbus
|
||||
- name: systemd
|
||||
mountPath: /run/systemd
|
||||
volumes:
|
||||
- name: plugin-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/plugins/org.apache.hadoop.ozone
|
||||
type: DirectoryOrCreate
|
||||
- name: registration-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/plugins_registry/
|
||||
type: DirectoryOrCreate
|
||||
- name: pods-mount-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/pods
|
||||
type: Directory
|
||||
- name: fuse-device
|
||||
hostPath:
|
||||
path: /dev/fuse
|
||||
- name: dbus
|
||||
hostPath:
|
||||
path: /var/run/dbus
|
||||
- name: systemd
|
||||
hostPath:
|
||||
path: /run/systemd
|
98
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-clusterrole.yaml
vendored
Normal file
98
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-clusterrole.yaml
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
# 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.
|
||||
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: csi-ozone
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- storageclasses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- create
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- volumeattachments
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- csinodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
28
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-clusterrolebinding.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-clusterrolebinding.yaml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: csi-ozone
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: csi-ozone
|
||||
namespace: default
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: csi-ozone
|
||||
apiGroup: rbac.authorization.k8s.io
|
21
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-serviceaccount.yaml
vendored
Normal file
21
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-serviceaccount.yaml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# 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: ServiceAccount
|
||||
metadata:
|
||||
namespace: default
|
||||
name: csi-ozone
|
54
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-provisioner-deployment.yaml
vendored
Normal file
54
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-provisioner-deployment.yaml
vendored
Normal 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 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.
|
||||
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: csi-provisioner
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: csi-provisioner
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: csi-provisioner
|
||||
spec:
|
||||
serviceAccount: csi-ozone
|
||||
containers:
|
||||
- name: csi-provisioner
|
||||
image: quay.io/k8scsi/csi-provisioner:v1.0.1
|
||||
args:
|
||||
- --csi-address=/var/lib/csi/csi.sock
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/
|
||||
- name: ozone-csi
|
||||
image: '@docker.image@'
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
args:
|
||||
- ozone
|
||||
- csi
|
||||
volumes:
|
||||
- name: socket-dir
|
||||
emptyDir: null
|
56
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/datanode-daemonset.yaml
vendored
Normal file
56
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/datanode-daemonset.yaml
vendored
Normal file
@ -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: {}
|
28
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/om-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/om-service.yaml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: om
|
||||
spec:
|
||||
ports:
|
||||
- port: 9874
|
||||
name: ui
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: ozone
|
||||
component: om
|
73
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/om-statefulset.yaml
vendored
Normal file
73
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/om-statefulset.yaml
vendored
Normal file
@ -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: {}
|
22
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/org.apache.hadoop.ozone-csidriver.yaml
vendored
Normal file
22
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/org.apache.hadoop.ozone-csidriver.yaml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
# 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: storage.k8s.io/v1beta1
|
||||
kind: CSIDriver
|
||||
metadata:
|
||||
name: org.apache.hadoop.ozone
|
||||
spec:
|
||||
attachRequired: false
|
21
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/ozone-storageclass.yaml
vendored
Normal file
21
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/ozone-storageclass.yaml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# 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.
|
||||
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1
|
||||
metadata:
|
||||
name: ozone
|
||||
provisioner: org.apache.hadoop.ozone
|
38
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-conf-configmap.yaml
vendored
Normal file
38
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-conf-configmap.yaml
vendored
Normal file
@ -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: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-conf
|
||||
labels: {}
|
||||
annotations: {}
|
||||
data:
|
||||
default.conf: |-
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
50
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-deployment.yaml
vendored
Normal file
50
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-deployment.yaml
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
# 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: nginx
|
||||
labels:
|
||||
app: nginx
|
||||
annotations: {}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
annotations: {}
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/www/html
|
||||
name: webroot
|
||||
env: []
|
||||
envFrom: []
|
||||
volumes:
|
||||
- name: webroot
|
||||
persistentVolumeClaim:
|
||||
claimName: nginx-storage
|
||||
readOnly: false
|
||||
- name: config
|
||||
configMap:
|
||||
name: nginx-conf
|
29
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-service-service.yaml
vendored
Normal file
29
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-service-service.yaml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
# 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: nginx-service
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
name: web
|
||||
selector:
|
||||
app: csi-s3-test-nginx
|
@ -0,0 +1,29 @@
|
||||
# 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: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nginx-storage
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: ozone
|
28
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/s3g-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/s3g-service.yaml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: s3g
|
||||
spec:
|
||||
ports:
|
||||
- port: 9878
|
||||
name: rest
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: ozone
|
||||
component: s3g
|
51
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/s3g-statefulset.yaml
vendored
Normal file
51
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/s3g-statefulset.yaml
vendored
Normal file
@ -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: {}
|
28
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/scm-service.yaml
vendored
Normal file
28
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/scm-service.yaml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: scm
|
||||
spec:
|
||||
ports:
|
||||
- port: 9876
|
||||
name: ui
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: ozone
|
||||
component: scm
|
67
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/scm-statefulset.yaml
vendored
Normal file
67
hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/scm-statefulset.yaml
vendored
Normal file
@ -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: {}
|
Loading…
Reference in New Issue
Block a user