You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by el...@apache.org on 2019/06/20 14:37:03 UTC

[hadoop] branch trunk updated: HDDS-1508. Provide example k8s deployment files for the new CSI server

This is an automated email from the ASF dual-hosted git repository.

elek pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 9c4b15d  HDDS-1508. Provide example k8s deployment files for the new CSI server
9c4b15d is described below

commit 9c4b15d2f4ef6eb600a3f2b36902f232536d7120
Author: Márton Elek <el...@apache.org>
AuthorDate: Thu Jun 20 16:33:59 2019 +0200

    HDDS-1508. Provide example k8s deployment files for the new CSI server
    
    Closes #905
---
 .../om-ss.yaml => ozone-csi/csi-controller.yaml}   | 56 ++++++-------
 .../{ozone/scm-ss.yaml => ozone-csi/csi-crd.yaml}  | 33 +-------
 .../main/k8s/definitions/ozone-csi/csi-node.yaml   | 95 +++++++++++++++++++++
 .../main/k8s/definitions/ozone-csi/csi-rbac.yaml   | 66 +++++++++++++++
 .../csi-storageclass.yaml}                         | 34 +-------
 .../scm-ss.yaml => ozone-csi/definitions/csi.yaml} | 42 +++-------
 .../dist/src/main/k8s/definitions/ozone/om-ss.yaml |  2 +-
 .../src/main/k8s/definitions/ozone/scm-ss.yaml     |  2 +-
 .../{ozone/scm-ss.yaml => pv-test/flekszible.yaml} | 32 +------
 .../nginx-conf-configmap.yaml}                     | 51 +++++------
 .../scm-ss.yaml => pv-test/nginx-deployment.yaml}  | 43 +++++-----
 .../nginx-service-service.yaml}                    | 38 +++------
 .../nginx-storage-persistentvolumeclaim.yaml}      | 40 +++------
 .../scm-ss.yaml => examples/ozone-csi/Flekszible}  | 41 +++------
 .../ozone-csi/LICENSE.header}                      | 31 -------
 .../k8s/examples/ozone-csi/config-configmap.yaml   | 37 ++++++++
 .../k8s/examples/ozone-csi/csi-node-daemonset.yaml | 97 +++++++++++++++++++++
 .../examples/ozone-csi/csi-ozone-clusterrole.yaml  | 98 ++++++++++++++++++++++
 .../ozone-csi/csi-ozone-clusterrolebinding.yaml}   | 42 +++-------
 .../ozone-csi/csi-ozone-serviceaccount.yaml}       | 35 ++------
 .../ozone-csi/csi-provisioner-deployment.yaml}     | 57 ++++++-------
 .../ozone-csi/datanode-daemonset.yaml}             | 51 +++++------
 .../ozone-csi/om-service.yaml}                     | 38 +++------
 .../ozone-csi/om-statefulset.yaml}                 | 32 +++++--
 .../org.apache.hadoop.ozone-csidriver.yaml}        | 34 ++------
 .../ozone-csi/ozone-storageclass.yaml}             | 35 ++------
 .../ozone-csi/pv-test/nginx-conf-configmap.yaml}   | 52 +++++-------
 .../ozone-csi/pv-test/nginx-deployment.yaml}       | 44 +++++-----
 .../ozone-csi/pv-test/nginx-service-service.yaml}  | 39 +++------
 .../nginx-storage-persistentvolumeclaim.yaml}      | 41 +++------
 .../ozone-csi/s3g-service.yaml}                    | 38 +++------
 .../ozone-csi/s3g-statefulset.yaml}                | 35 ++++----
 .../ozone-csi/scm-service.yaml}                    | 36 ++------
 .../ozone-csi/scm-statefulset.yaml}                | 31 +++++--
 34 files changed, 772 insertions(+), 706 deletions(-)

diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-controller.yaml
similarity index 55%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-controller.yaml
index 820d562..e7c2222 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-controller.yaml
@@ -13,41 +13,41 @@
 # 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
-kind: StatefulSet
 metadata:
-  name: om
-  labels:
-    app.kubernetes.io/component: ozone
+  name: csi-provisioner
 spec:
+  replicas: 1
   selector:
     matchLabels:
-      app: ozone
-      component: om
-  serviceName: om
-  replicas: 1
+      app: csi-provisioner
   template:
     metadata:
       labels:
-        app: ozone
-        component: om
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "9874"
-        prometheus.io/path: "/prom"
+        app: csi-provisioner
     spec:
-      initContainers:
-      - name: init
-        image: elek/ozone
-        args: ["ozone","om","--init"]
-        env:
-        - name: WAITFOR
-          value: scm-0.scm:9876
+      serviceAccount: csi-ozone
       containers:
-      - name: om
-        image: "@docker.image@"
-        args: ["ozone","om"]
-        env:
-        - name: WAITFOR
-          value: scm-0.scm:9876
-      volumes: []
+        - 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:
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-crd.yaml
similarity index 56%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-crd.yaml
index a87111c..f0ca37c 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-crd.yaml
@@ -13,34 +13,9 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-apiVersion: apps/v1
-kind: StatefulSet
+apiVersion: storage.k8s.io/v1beta1
+kind: CSIDriver
 metadata:
-  name: scm
-  labels:
-    app.kubernetes.io/component: ozone
+  name: org.apache.hadoop.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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+  attachRequired: false
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-node.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-node.yaml
new file mode 100644
index 0000000..6c3a1ac
--- /dev/null
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-node.yaml
@@ -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
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-rbac.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-rbac.yaml
new file mode 100644
index 0000000..d83ffb3
--- /dev/null
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-rbac.yaml
@@ -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
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-storageclass.yaml
similarity index 55%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-storageclass.yaml
index a87111c..9780160 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/csi-storageclass.yaml
@@ -13,34 +13,8 @@
 # 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
+kind: StorageClass
+apiVersion: storage.k8s.io/v1
 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+  name: ozone
+provisioner: org.apache.hadoop.ozone
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/definitions/csi.yaml
similarity index 56%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/definitions/csi.yaml
index a87111c..14c2ea30 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/ozone-csi/definitions/csi.yaml
@@ -13,34 +13,16 @@
 # 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:
+name: ozone/csi
+description: Configuration for CSI interface
+---
+- type: Add
+  trigger:
     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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+      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
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
index 820d562..9f9d87d 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
@@ -38,7 +38,7 @@ spec:
     spec:
       initContainers:
       - name: init
-        image: elek/ozone
+        image: "@docker.image@"
         args: ["ozone","om","--init"]
         env:
         - name: WAITFOR
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
index a87111c..9329a5f 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
@@ -42,5 +42,5 @@ spec:
         args: ["ozone","scm", "--init"]
       containers:
       - name: scm
-        image: elek/ozone
+        image: "@docker.image@"
         args: ["ozone","scm"]
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/pv-test/flekszible.yaml
similarity index 55%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/definitions/pv-test/flekszible.yaml
index a87111c..bfe82ff 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/pv-test/flekszible.yaml
@@ -13,34 +13,4 @@
 # 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+description: Nginx example deployment with persistent volume claim.
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-conf-configmap.yaml
similarity index 55%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-conf-configmap.yaml
index a87111c..1fd8941 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-conf-configmap.yaml
@@ -13,34 +13,25 @@
 # 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
+apiVersion: v1
+kind: ConfigMap
 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+  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;
+        }
+      }
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-deployment.yaml
similarity index 64%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-deployment.yaml
index a87111c..b6cafc5 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-deployment.yaml
@@ -14,33 +14,36 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 apiVersion: apps/v1
-kind: StatefulSet
+kind: Deployment
 metadata:
-  name: scm
+  name: nginx
   labels:
-    app.kubernetes.io/component: ozone
+    app: nginx
+  annotations: {}
 spec:
+  replicas: 1
   selector:
     matchLabels:
-      app: ozone
-      component: scm
-  serviceName: scm
-  replicas: 1
+      app: nginx
   template:
     metadata:
       labels:
-        app: ozone
-        component: scm
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "9876"
-        prometheus.io/path: "/prom"
+        app: nginx
+      annotations: {}
     spec:
-      initContainers:
-      - name: init
-        image: "@docker.image@"
-        args: ["ozone","scm", "--init"]
       containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+        - 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
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-service-service.yaml
similarity index 57%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-service-service.yaml
index a87111c..3a338ba 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-service-service.yaml
@@ -13,34 +13,16 @@
 # 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
+apiVersion: v1
+kind: Service
 metadata:
-  name: scm
-  labels:
-    app.kubernetes.io/component: ozone
+  name: nginx-service
+  labels: {}
+  annotations: {}
 spec:
+  type: NodePort
+  ports:
+    - port: 80
+      name: web
   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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+    app: csi-s3-test-nginx
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-storage-persistentvolumeclaim.yaml
similarity index 56%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-storage-persistentvolumeclaim.yaml
index a87111c..ec0d76b 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/pv-test/nginx-storage-persistentvolumeclaim.yaml
@@ -13,34 +13,16 @@
 # 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
+apiVersion: v1
+kind: PersistentVolumeClaim
 metadata:
-  name: scm
-  labels:
-    app.kubernetes.io/component: ozone
+  name: nginx-storage
+  labels: {}
+  annotations: {}
 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: 1Gi
+  storageClassName: ozone
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/Flekszible
similarity index 55%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/Flekszible
index a87111c..7e4f3f1 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/Flekszible
@@ -13,34 +13,13 @@
 # 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+
+source:
+  - path: ../../definitions
+import:
+  - path: ozone-csi
+  - path: ozone
+    transformations:
+      - type: ozone/csi
+  - path: pv-test
+    destination: pv-test
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/LICENSE.header
similarity index 55%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/LICENSE.header
index a87111c..635f0d9 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/LICENSE.header
@@ -13,34 +13,3 @@
 # 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
diff --git a/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/config-configmap.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/config-configmap.yaml
new file mode 100644
index 0000000..e554145
--- /dev/null
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/config-configmap.yaml
@@ -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
diff --git a/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-node-daemonset.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-node-daemonset.yaml
new file mode 100644
index 0000000..fe44532
--- /dev/null
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-node-daemonset.yaml
@@ -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
diff --git a/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-clusterrole.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-clusterrole.yaml
new file mode 100644
index 0000000..efcd51f
--- /dev/null
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-clusterrole.yaml
@@ -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
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-clusterrolebinding.yaml
similarity index 55%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-clusterrolebinding.yaml
index a87111c..2f2537c 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-clusterrolebinding.yaml
@@ -13,34 +13,16 @@
 # 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
+
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+  name: csi-ozone
+subjects:
+- kind: ServiceAccount
+  name: csi-ozone
+  namespace: default
+roleRef:
+  kind: ClusterRole
+  name: csi-ozone
+  apiGroup: rbac.authorization.k8s.io
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-serviceaccount.yaml
similarity index 55%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-serviceaccount.yaml
index a87111c..628d2a1 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-ozone-serviceaccount.yaml
@@ -13,34 +13,9 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-apiVersion: apps/v1
-kind: StatefulSet
+
+apiVersion: v1
+kind: ServiceAccount
 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+  namespace: default
+  name: csi-ozone
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-provisioner-deployment.yaml
similarity index 57%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-provisioner-deployment.yaml
index 820d562..03478ff 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/csi-provisioner-deployment.yaml
@@ -13,41 +13,42 @@
 # 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
-kind: StatefulSet
 metadata:
-  name: om
-  labels:
-    app.kubernetes.io/component: ozone
+  name: csi-provisioner
 spec:
+  replicas: 1
   selector:
     matchLabels:
-      app: ozone
-      component: om
-  serviceName: om
-  replicas: 1
+      app: csi-provisioner
   template:
     metadata:
       labels:
-        app: ozone
-        component: om
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "9874"
-        prometheus.io/path: "/prom"
+        app: csi-provisioner
     spec:
-      initContainers:
-      - name: init
-        image: elek/ozone
-        args: ["ozone","om","--init"]
-        env:
-        - name: WAITFOR
-          value: scm-0.scm:9876
+      serviceAccount: csi-ozone
       containers:
-      - name: om
-        image: "@docker.image@"
-        args: ["ozone","om"]
-        env:
-        - name: WAITFOR
-          value: scm-0.scm:9876
-      volumes: []
+      - 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
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/datanode-daemonset.yaml
similarity index 66%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/datanode-daemonset.yaml
index 820d562..6e3b3b9 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/datanode-daemonset.yaml
@@ -13,41 +13,44 @@
 # 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
+kind: DaemonSet
 metadata:
-  name: om
+  name: datanode
   labels:
     app.kubernetes.io/component: ozone
 spec:
   selector:
     matchLabels:
       app: ozone
-      component: om
-  serviceName: om
-  replicas: 1
+      component: datanode
   template:
     metadata:
-      labels:
-        app: ozone
-        component: om
       annotations:
         prometheus.io/scrape: "true"
-        prometheus.io/port: "9874"
-        prometheus.io/path: "/prom"
+        prometheus.io/port: "9882"
+        prometheus.io/path: /prom
+      labels:
+        app: ozone
+        component: datanode
     spec:
-      initContainers:
-      - name: init
-        image: elek/ozone
-        args: ["ozone","om","--init"]
-        env:
-        - name: WAITFOR
-          value: scm-0.scm:9876
       containers:
-      - name: om
-        image: "@docker.image@"
-        args: ["ozone","om"]
-        env:
-        - name: WAITFOR
-          value: scm-0.scm:9876
-      volumes: []
+      - 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: {}
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/om-service.yaml
similarity index 57%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/om-service.yaml
index a87111c..617277d 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/om-service.yaml
@@ -13,34 +13,16 @@
 # 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
+
+apiVersion: v1
+kind: Service
 metadata:
-  name: scm
-  labels:
-    app.kubernetes.io/component: ozone
+  name: om
 spec:
+  ports:
+  - port: 9874
+    name: ui
+  clusterIP: None
   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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+    app: ozone
+    component: om
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/om-statefulset.yaml
similarity index 72%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/om-statefulset.yaml
index 820d562..884dd46 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/om-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/om-statefulset.yaml
@@ -13,6 +13,7 @@
 # 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:
@@ -34,20 +35,39 @@ spec:
       annotations:
         prometheus.io/scrape: "true"
         prometheus.io/port: "9874"
-        prometheus.io/path: "/prom"
+        prometheus.io/path: /prom
     spec:
       initContainers:
       - name: init
-        image: elek/ozone
-        args: ["ozone","om","--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"]
+        image: '@docker.image@'
+        args:
+        - ozone
+        - om
         env:
         - name: WAITFOR
           value: scm-0.scm:9876
-      volumes: []
+        envFrom:
+        - configMapRef:
+            name: config
+        volumeMounts:
+        - name: data
+          mountPath: /data
+      volumes:
+      - name: data
+        emptyDir: {}
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/org.apache.hadoop.ozone-csidriver.yaml
similarity index 56%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/org.apache.hadoop.ozone-csidriver.yaml
index a87111c..e657c50 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/org.apache.hadoop.ozone-csidriver.yaml
@@ -13,34 +13,10 @@
 # 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
+
+apiVersion: storage.k8s.io/v1beta1
+kind: CSIDriver
 metadata:
-  name: scm
-  labels:
-    app.kubernetes.io/component: ozone
+  name: org.apache.hadoop.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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+  attachRequired: false
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/ozone-storageclass.yaml
similarity index 55%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/ozone-storageclass.yaml
index a87111c..c6c1c6c 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/ozone-storageclass.yaml
@@ -13,34 +13,9 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-apiVersion: apps/v1
-kind: StatefulSet
+
+kind: StorageClass
+apiVersion: storage.k8s.io/v1
 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+  name: ozone
+provisioner: org.apache.hadoop.ozone
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-conf-configmap.yaml
similarity index 55%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-conf-configmap.yaml
index a87111c..2f1813c 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-conf-configmap.yaml
@@ -13,34 +13,26 @@
 # 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
+
+apiVersion: v1
+kind: ConfigMap
 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+  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;
+      }
+    }
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-deployment.yaml
similarity index 66%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-deployment.yaml
index a87111c..db6eb10 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-deployment.yaml
@@ -13,34 +13,38 @@
 # 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
+kind: Deployment
 metadata:
-  name: scm
+  name: nginx
   labels:
-    app.kubernetes.io/component: ozone
+    app: nginx
+  annotations: {}
 spec:
+  replicas: 1
   selector:
     matchLabels:
-      app: ozone
-      component: scm
-  serviceName: scm
-  replicas: 1
+      app: nginx
   template:
     metadata:
       labels:
-        app: ozone
-        component: scm
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "9876"
-        prometheus.io/path: "/prom"
+        app: nginx
+      annotations: {}
     spec:
-      initContainers:
-      - name: init
-        image: "@docker.image@"
-        args: ["ozone","scm", "--init"]
       containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+      - 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
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-service-service.yaml
similarity index 57%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-service-service.yaml
index a87111c..b31a510 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-service-service.yaml
@@ -13,34 +13,17 @@
 # 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
+
+apiVersion: v1
+kind: Service
 metadata:
-  name: scm
-  labels:
-    app.kubernetes.io/component: ozone
+  name: nginx-service
+  labels: {}
+  annotations: {}
 spec:
+  type: NodePort
+  ports:
+  - port: 80
+    name: web
   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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+    app: csi-s3-test-nginx
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-storage-persistentvolumeclaim.yaml
similarity index 56%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-storage-persistentvolumeclaim.yaml
index a87111c..5968b92 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/pv-test/nginx-storage-persistentvolumeclaim.yaml
@@ -13,34 +13,17 @@
 # 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
+
+apiVersion: v1
+kind: PersistentVolumeClaim
 metadata:
-  name: scm
-  labels:
-    app.kubernetes.io/component: ozone
+  name: nginx-storage
+  labels: {}
+  annotations: {}
 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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+  accessModes:
+  - ReadWriteOnce
+  resources:
+    requests:
+      storage: 1Gi
+  storageClassName: ozone
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/s3g-service.yaml
similarity index 57%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/s3g-service.yaml
index a87111c..dd1ca83 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/s3g-service.yaml
@@ -13,34 +13,16 @@
 # 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
+
+apiVersion: v1
+kind: Service
 metadata:
-  name: scm
-  labels:
-    app.kubernetes.io/component: ozone
+  name: s3g
 spec:
+  ports:
+  - port: 9878
+    name: rest
+  clusterIP: None
   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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+    app: ozone
+    component: s3g
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/s3g-statefulset.yaml
similarity index 72%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/s3g-statefulset.yaml
index a87111c..b608cde 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/s3g-statefulset.yaml
@@ -13,34 +13,39 @@
 # 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
+  name: s3g
   labels:
     app.kubernetes.io/component: ozone
 spec:
   selector:
     matchLabels:
       app: ozone
-      component: scm
-  serviceName: scm
+      component: s3g
+  serviceName: s3g
   replicas: 1
   template:
     metadata:
       labels:
         app: ozone
-        component: scm
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "9876"
-        prometheus.io/path: "/prom"
+        component: s3g
     spec:
-      initContainers:
-      - name: init
-        image: "@docker.image@"
-        args: ["ozone","scm", "--init"]
       containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+      - name: s3g
+        image: '@docker.image@'
+        args:
+        - ozone
+        - s3g
+        envFrom:
+        - configMapRef:
+            name: config
+        volumeMounts:
+        - name: data
+          mountPath: /data
+      initContainers: []
+      volumes:
+      - name: data
+        emptyDir: {}
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/scm-service.yaml
similarity index 57%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/scm-service.yaml
index a87111c..0df15d6 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/scm-service.yaml
@@ -13,34 +13,16 @@
 # 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
+
+apiVersion: v1
+kind: Service
 metadata:
   name: scm
-  labels:
-    app.kubernetes.io/component: ozone
 spec:
+  ports:
+  - port: 9876
+    name: ui
+  clusterIP: None
   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"]
-      containers:
-      - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+    app: ozone
+    component: scm
diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/scm-statefulset.yaml
similarity index 70%
copy from hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
copy to hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/scm-statefulset.yaml
index a87111c..55b5672 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/scm-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone-csi/scm-statefulset.yaml
@@ -13,6 +13,7 @@
 # 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:
@@ -34,13 +35,33 @@ spec:
       annotations:
         prometheus.io/scrape: "true"
         prometheus.io/port: "9876"
-        prometheus.io/path: "/prom"
+        prometheus.io/path: /prom
     spec:
       initContainers:
       - name: init
-        image: "@docker.image@"
-        args: ["ozone","scm", "--init"]
+        image: '@docker.image@'
+        args:
+        - ozone
+        - scm
+        - --init
+        envFrom:
+        - configMapRef:
+            name: config
+        volumeMounts:
+        - name: data
+          mountPath: /data
       containers:
       - name: scm
-        image: elek/ozone
-        args: ["ozone","scm"]
+        image: '@docker.image@'
+        args:
+        - ozone
+        - scm
+        envFrom:
+        - configMapRef:
+            name: config
+        volumeMounts:
+        - name: data
+          mountPath: /data
+      volumes:
+      - name: data
+        emptyDir: {}


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org