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

nanda pushed a commit to branch ozone-0.4.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/ozone-0.4.1 by this push:
     new 658815f  HDDS-1871. Remove anti-affinity rules from k8s minkube example
658815f is described below

commit 658815fd94ef31329697ba5611493f0bedeefade
Author: Márton Elek <e...@apache.org>
AuthorDate: Mon Jul 29 14:44:58 2019 +0200

    HDDS-1871. Remove anti-affinity rules from k8s minkube example
    
    Signed-off-by: Anu Engineer <aengin...@apache.org>
    (cherry picked from commit 8fc6567b946f1d536ffed4798b5403a365021464)
---
 .../main/k8s/definitions/ozone/datanode-ss.yaml    |  6 +++---
 .../getting-started/datanode-statefulset.yaml      |  6 +++---
 .../examples/getting-started/om-statefulset.yaml   | 22 ++++++----------------
 .../examples/getting-started/s3g-statefulset.yaml  |  5 +++++
 .../examples/getting-started/scm-statefulset.yaml  |  4 ++++
 .../dist/src/main/k8s/examples/minikube/Flekszible |  9 +++++++++
 .../examples/minikube/datanode-statefulset.yaml    | 22 ++++++----------------
 .../main/k8s/examples/minikube/om-statefulset.yaml |  6 +++---
 .../k8s/examples/minikube/s3g-statefulset.yaml     |  6 +++---
 .../k8s/examples/minikube/scm-statefulset.yaml     | 12 ++++++------
 .../ozone-dev/csi/csi-ozone-clusterrole.yaml       |  2 +-
 .../csi/csi-ozone-clusterrolebinding.yaml          |  6 +++---
 .../ozone-dev/csi/csi-ozone-serviceaccount.yaml    |  2 +-
 .../examples/ozone-dev/datanode-statefulset.yaml   |  6 +++---
 .../examples/ozone-dev/prometheus-clusterrole.yaml |  2 +-
 .../prometheus-operator-clusterrolebinding.yaml    |  6 +++---
 .../examples/ozone/csi/csi-ozone-clusterrole.yaml  |  2 +-
 .../ozone/csi/csi-ozone-clusterrolebinding.yaml    |  6 +++---
 .../ozone/csi/csi-ozone-serviceaccount.yaml        |  2 +-
 .../k8s/examples/ozone/datanode-statefulset.yaml   |  6 +++---
 20 files changed, 68 insertions(+), 70 deletions(-)

diff --git a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/datanode-ss.yaml 
b/hadoop-ozone/dist/src/main/k8s/definitions/ozone/datanode-ss.yaml
index 94dc570..88a4308 100644
--- a/hadoop-ozone/dist/src/main/k8s/definitions/ozone/datanode-ss.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/definitions/ozone/datanode-ss.yaml
@@ -32,9 +32,9 @@ spec:
         app: ozone
         component: datanode
       annotations:
-        prdatanodeetheus.io/scrape: "true"
-        prdatanodeetheus.io/port: "9882"
-        prdatanodeetheus.io/path: "/prom"
+        prometheus.io/scrape: "true"
+        prometheus.io/port: "9882"
+        prometheus.io/path: "/prom"
     spec:
       affinity:
         podAntiAffinity:
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/getting-started/datanode-statefulset.yaml
 
b/hadoop-ozone/dist/src/main/k8s/examples/getting-started/datanode-statefulset.yaml
index 6c8d1bf..c393ead 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/getting-started/datanode-statefulset.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/getting-started/datanode-statefulset.yaml
@@ -33,9 +33,9 @@ spec:
         app: ozone
         component: datanode
       annotations:
-        prdatanodeetheus.io/scrape: "true"
-        prdatanodeetheus.io/port: "9882"
-        prdatanodeetheus.io/path: /prom
+        prometheus.io/scrape: "true"
+        prometheus.io/port: "9882"
+        prometheus.io/path: /prom
     spec:
       affinity:
         podAntiAffinity:
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/getting-started/om-statefulset.yaml 
b/hadoop-ozone/dist/src/main/k8s/examples/getting-started/om-statefulset.yaml
index c8ff81b..5de01f5 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/getting-started/om-statefulset.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/getting-started/om-statefulset.yaml
@@ -39,22 +39,6 @@ spec:
     spec:
       securityContext:
         fsGroup: 1000
-      initContainers:
-      - name: init
-        image: '@docker.image@'
-        args:
-        - ozone
-        - om
-        - --init
-        env:
-        - name: WAITFOR
-          value: scm-0.scm:9876
-        envFrom:
-        - configMapRef:
-            name: config
-        volumeMounts:
-        - name: data
-          mountPath: /data
       containers:
       - name: om
         image: '@docker.image@'
@@ -64,6 +48,12 @@ spec:
         env:
         - name: WAITFOR
           value: scm-0.scm:9876
+        - name: ENSURE_OM_INITIALIZED
+          value: /data/metadata/om/current/VERSION
+        livenessProbe:
+          tcpSocket:
+            port: 9862
+          initialDelaySeconds: 30
         envFrom:
         - configMapRef:
             name: config
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/getting-started/s3g-statefulset.yaml 
b/hadoop-ozone/dist/src/main/k8s/examples/getting-started/s3g-statefulset.yaml
index c7e13e5..2409583 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/getting-started/s3g-statefulset.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/getting-started/s3g-statefulset.yaml
@@ -39,6 +39,11 @@ spec:
         args:
         - ozone
         - s3g
+        livenessProbe:
+          httpGet:
+            path: /
+            port: 9878
+          initialDelaySeconds: 30
         envFrom:
         - configMapRef:
             name: config
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/getting-started/scm-statefulset.yaml 
b/hadoop-ozone/dist/src/main/k8s/examples/getting-started/scm-statefulset.yaml
index e1deed8..0f8173c 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/getting-started/scm-statefulset.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/getting-started/scm-statefulset.yaml
@@ -58,6 +58,10 @@ spec:
         args:
         - ozone
         - scm
+        livenessProbe:
+          tcpSocket:
+            port: 9861
+          initialDelaySeconds: 30
         envFrom:
         - configMapRef:
             name: config
diff --git a/hadoop-ozone/dist/src/main/k8s/examples/minikube/Flekszible 
b/hadoop-ozone/dist/src/main/k8s/examples/minikube/Flekszible
index e00d9ce..3390db0 100644
--- a/hadoop-ozone/dist/src/main/k8s/examples/minikube/Flekszible
+++ b/hadoop-ozone/dist/src/main/k8s/examples/minikube/Flekszible
@@ -22,6 +22,15 @@ import:
       image: "@docker.image@"
     - type: PublishStatefulSet
     - type: ozone/emptydir
+    - type: Remove
+      trigger:
+         metadata:
+            name: datanode
+      path:
+        - spec
+        - template
+        - spec
+        - affinity
   - path: ozone/freon
     destination: freon
     transformations:
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/minikube/datanode-statefulset.yaml 
b/hadoop-ozone/dist/src/main/k8s/examples/minikube/datanode-statefulset.yaml
index 452e258..db91864 100644
--- a/hadoop-ozone/dist/src/main/k8s/examples/minikube/datanode-statefulset.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/minikube/datanode-statefulset.yaml
@@ -33,20 +33,10 @@ spec:
         app: ozone
         component: datanode
       annotations:
-        prdatanodeetheus.io/scrape: "true"
-        prdatanodeetheus.io/port: "9882"
-        prdatanodeetheus.io/path: /prom
+        prometheus.io/scrape: "true"
+        prometheus.io/port: "9882"
+        prometheus.io/path: /prom
     spec:
-      affinity:
-        podAntiAffinity:
-          requiredDuringSchedulingIgnoredDuringExecution:
-          - labelSelector:
-              matchExpressions:
-              - key: component
-                operator: In
-                values:
-                - datanode
-            topologyKey: kubernetes.io/hostname
       securityContext:
         fsGroup: 1000
       containers:
@@ -55,12 +45,12 @@ spec:
         args:
         - ozone
         - datanode
-        volumeMounts:
-        - name: data
-          mountPath: /data
         envFrom:
         - configMapRef:
             name: config
+        volumeMounts:
+        - name: data
+          mountPath: /data
       volumes:
       - name: data
         emptyDir: {}
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/minikube/om-statefulset.yaml 
b/hadoop-ozone/dist/src/main/k8s/examples/minikube/om-statefulset.yaml
index 172df34..5de01f5 100644
--- a/hadoop-ozone/dist/src/main/k8s/examples/minikube/om-statefulset.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/minikube/om-statefulset.yaml
@@ -54,12 +54,12 @@ spec:
           tcpSocket:
             port: 9862
           initialDelaySeconds: 30
-        volumeMounts:
-        - name: data
-          mountPath: /data
         envFrom:
         - configMapRef:
             name: config
+        volumeMounts:
+        - name: data
+          mountPath: /data
       volumes:
       - name: data
         emptyDir: {}
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/minikube/s3g-statefulset.yaml 
b/hadoop-ozone/dist/src/main/k8s/examples/minikube/s3g-statefulset.yaml
index 1718fed..2409583 100644
--- a/hadoop-ozone/dist/src/main/k8s/examples/minikube/s3g-statefulset.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/minikube/s3g-statefulset.yaml
@@ -44,12 +44,12 @@ spec:
             path: /
             port: 9878
           initialDelaySeconds: 30
-        volumeMounts:
-        - name: data
-          mountPath: /data
         envFrom:
         - configMapRef:
             name: config
+        volumeMounts:
+        - name: data
+          mountPath: /data
       volumes:
       - name: data
         emptyDir: {}
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/minikube/scm-statefulset.yaml 
b/hadoop-ozone/dist/src/main/k8s/examples/minikube/scm-statefulset.yaml
index 7f1606d..0f8173c 100644
--- a/hadoop-ozone/dist/src/main/k8s/examples/minikube/scm-statefulset.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/minikube/scm-statefulset.yaml
@@ -46,12 +46,12 @@ spec:
         - ozone
         - scm
         - --init
-        volumeMounts:
-        - name: data
-          mountPath: /data
         envFrom:
         - configMapRef:
             name: config
+        volumeMounts:
+        - name: data
+          mountPath: /data
       containers:
       - name: scm
         image: '@docker.image@'
@@ -62,12 +62,12 @@ spec:
           tcpSocket:
             port: 9861
           initialDelaySeconds: 30
-        volumeMounts:
-        - name: data
-          mountPath: /data
         envFrom:
         - configMapRef:
             name: config
+        volumeMounts:
+        - name: data
+          mountPath: /data
       volumes:
       - name: data
         emptyDir: {}
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-clusterrole.yaml
 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-clusterrole.yaml
index efcd51f..927ba6f 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-clusterrole.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-clusterrole.yaml
@@ -17,7 +17,7 @@
 kind: ClusterRole
 apiVersion: rbac.authorization.k8s.io/v1
 metadata:
-  name: csi-ozone
+  name: csi-ozone-default
 rules:
 - apiGroups:
   - ""
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-clusterrolebinding.yaml
 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-clusterrolebinding.yaml
index bb8bdf8..948e759 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-clusterrolebinding.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-clusterrolebinding.yaml
@@ -17,12 +17,12 @@
 kind: ClusterRoleBinding
 apiVersion: rbac.authorization.k8s.io/v1
 metadata:
-  name: csi-ozone
+  name: csi-ozone-default
 subjects:
 - kind: ServiceAccount
   name: csi-ozone
-  namespace: weekly-test
+  namespace: default
 roleRef:
   kind: ClusterRole
-  name: csi-ozone
+  name: csi-ozone-default
   apiGroup: rbac.authorization.k8s.io
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-serviceaccount.yaml
 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-serviceaccount.yaml
index 41f7747..628d2a1 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-serviceaccount.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/csi/csi-ozone-serviceaccount.yaml
@@ -17,5 +17,5 @@
 apiVersion: v1
 kind: ServiceAccount
 metadata:
-  namespace: weekly-test
+  namespace: default
   name: csi-ozone
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/datanode-statefulset.yaml 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/datanode-statefulset.yaml
index 843aa94..475ce69 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/datanode-statefulset.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/datanode-statefulset.yaml
@@ -33,9 +33,9 @@ spec:
         app: ozone
         component: datanode
       annotations:
-        prdatanodeetheus.io/scrape: "true"
-        prdatanodeetheus.io/port: "9882"
-        prdatanodeetheus.io/path: /prom
+        prometheus.io/scrape: "true"
+        prometheus.io/port: "9882"
+        prometheus.io/path: /prom
     spec:
       affinity:
         podAntiAffinity:
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/prometheus-clusterrole.yaml 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/prometheus-clusterrole.yaml
index d5df196..bf62be6 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/prometheus-clusterrole.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/prometheus-clusterrole.yaml
@@ -17,7 +17,7 @@
 apiVersion: rbac.authorization.k8s.io/v1beta1
 kind: ClusterRole
 metadata:
-  name: prometheus
+  name: prometheus-default
 rules:
 - apiGroups:
   - ""
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/prometheus-operator-clusterrolebinding.yaml
 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/prometheus-operator-clusterrolebinding.yaml
index 6ee6217..13ac066 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/prometheus-operator-clusterrolebinding.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone-dev/prometheus-operator-clusterrolebinding.yaml
@@ -17,12 +17,12 @@
 apiVersion: rbac.authorization.k8s.io/v1beta1
 kind: ClusterRoleBinding
 metadata:
-  name: prometheus-operator
+  name: prometheus-operator-default
 roleRef:
   apiGroup: rbac.authorization.k8s.io
   kind: ClusterRole
-  name: prometheus
+  name: prometheus-default
 subjects:
 - kind: ServiceAccount
   name: prometheus-operator
-  namespace: weekly-test
+  namespace: default
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
index efcd51f..927ba6f 100644
--- 
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
@@ -17,7 +17,7 @@
 kind: ClusterRole
 apiVersion: rbac.authorization.k8s.io/v1
 metadata:
-  name: csi-ozone
+  name: csi-ozone-default
 rules:
 - apiGroups:
   - ""
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone/csi/csi-ozone-clusterrolebinding.yaml
 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone/csi/csi-ozone-clusterrolebinding.yaml
index bb8bdf8..948e759 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone/csi/csi-ozone-clusterrolebinding.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone/csi/csi-ozone-clusterrolebinding.yaml
@@ -17,12 +17,12 @@
 kind: ClusterRoleBinding
 apiVersion: rbac.authorization.k8s.io/v1
 metadata:
-  name: csi-ozone
+  name: csi-ozone-default
 subjects:
 - kind: ServiceAccount
   name: csi-ozone
-  namespace: weekly-test
+  namespace: default
 roleRef:
   kind: ClusterRole
-  name: csi-ozone
+  name: csi-ozone-default
   apiGroup: rbac.authorization.k8s.io
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone/csi/csi-ozone-serviceaccount.yaml
 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone/csi/csi-ozone-serviceaccount.yaml
index 41f7747..628d2a1 100644
--- 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone/csi/csi-ozone-serviceaccount.yaml
+++ 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone/csi/csi-ozone-serviceaccount.yaml
@@ -17,5 +17,5 @@
 apiVersion: v1
 kind: ServiceAccount
 metadata:
-  namespace: weekly-test
+  namespace: default
   name: csi-ozone
diff --git 
a/hadoop-ozone/dist/src/main/k8s/examples/ozone/datanode-statefulset.yaml 
b/hadoop-ozone/dist/src/main/k8s/examples/ozone/datanode-statefulset.yaml
index b74d58e..a3aa528 100644
--- a/hadoop-ozone/dist/src/main/k8s/examples/ozone/datanode-statefulset.yaml
+++ b/hadoop-ozone/dist/src/main/k8s/examples/ozone/datanode-statefulset.yaml
@@ -33,9 +33,9 @@ spec:
         app: ozone
         component: datanode
       annotations:
-        prdatanodeetheus.io/scrape: "true"
-        prdatanodeetheus.io/port: "9882"
-        prdatanodeetheus.io/path: /prom
+        prometheus.io/scrape: "true"
+        prometheus.io/port: "9882"
+        prometheus.io/path: /prom
     spec:
       affinity:
         podAntiAffinity:


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

Reply via email to