Merge "Update annotations to spec for policy"
authorMandeep Khinda <Mandeep.Khinda@amdocs.com>
Fri, 15 Dec 2017 14:42:36 +0000 (14:42 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 15 Dec 2017 14:42:36 +0000 (14:42 +0000)
kubernetes/policy/templates/dep-brmsgw.yaml
kubernetes/policy/templates/dep-drools.yaml
kubernetes/policy/templates/dep-nexus.yaml
kubernetes/policy/templates/dep-pap.yaml
kubernetes/policy/templates/dep-pdp.yaml

index df5d888..7a1bcde 100644 (file)
@@ -14,39 +14,28 @@ spec:
       labels:
         app: brmsgw
       name: brmsgw
-      annotations:
-        pod.beta.kubernetes.io/init-containers: '[
-          {
-              "args": [
-                  "--container-name",
-                  "mariadb",
-                  "--container-name",
-                  "nexus",
-                  "--container-name",
-                  "pap",
-                  "--container-name",
-                  "pdp"
-              ],
-              "command": [
-                  "/root/ready.py"
-              ],
-              "env": [
-                  {
-                      "name": "NAMESPACE",
-                      "valueFrom": {
-                          "fieldRef": {
-                              "apiVersion": "v1",
-                              "fieldPath": "metadata.namespace"
-                          }
-                      }
-                  }
-              ],
-              "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
-              "imagePullPolicy": "{{ .Values.pullPolicy }}",
-              "name": "brmsgw-readiness"
-          }
-          ]'
     spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - mariadb
+        - --container-name
+        - nexus
+        - --container-name
+        - pap
+        - --container-name
+        - pdp
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: brmsgw-readiness
       containers:
       - command:
         - /bin/bash
@@ -70,4 +59,4 @@ spec:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
\ No newline at end of file
+#{{ end }}
index 3e9fa01..48ef16e 100644 (file)
@@ -14,41 +14,30 @@ spec:
       labels:
         app: drools
       name: drools
-      annotations:
-        pod.beta.kubernetes.io/init-containers: '[
-          {
-              "args": [
-                  "--container-name",
-                  "mariadb",
-                  "--container-name",
-                  "nexus",
-                  "--container-name",
-                  "pap",
-                  "--container-name",
-                  "pdp",
-                  "--container-name",
-                  "brmsgw"
-              ],
-              "command": [
-                  "/root/ready.py"
-              ],
-              "env": [
-                  {
-                      "name": "NAMESPACE",
-                      "valueFrom": {
-                          "fieldRef": {
-                              "apiVersion": "v1",
-                              "fieldPath": "metadata.namespace"
-                          }
-                      }
-                  }
-              ],
-              "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
-              "imagePullPolicy": "{{ .Values.pullPolicy }}",
-              "name": "drools-readiness"
-          }
-          ]'
     spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - mariadb
+        - --container-name
+        - nexus
+        - --container-name
+        - pap
+        - --container-name
+        - pdp
+        - --container-name
+        - brmsgw
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: drools-readiness
       containers:
       - command:
         - /bin/bash
@@ -112,4 +101,4 @@ spec:
             path:  /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/drools/
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
\ No newline at end of file
+#{{ end }}
index 07cd334..4adb05f 100644 (file)
@@ -13,33 +13,22 @@ spec:
       labels:
         app: nexus
       name: nexus
-      annotations:
-        pod.beta.kubernetes.io/init-containers: '[
-          {
-              "args": [
-                  "--container-name",
-                  "mariadb"
-              ],
-              "command": [
-                  "/root/ready.py"
-              ],
-              "env": [
-                  {
-                      "name": "NAMESPACE",
-                      "valueFrom": {
-                          "fieldRef": {
-                              "apiVersion": "v1",
-                              "fieldPath": "metadata.namespace"
-                          }
-                      }
-                  }
-              ],
-              "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
-              "imagePullPolicy": "{{ .Values.pullPolicy }}",
-              "name": "nexus-readiness"
-          }
-          ]'
     spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - mariadb
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: nexus-readiness
       containers:
       - image: "{{ .Values.image.policyNexus }}:{{ .Values.image.policyNexusVersion }}"
         imagePullPolicy: {{ .Values.pullPolicy }}
@@ -54,4 +43,4 @@ spec:
           path: /etc/localtime
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
\ No newline at end of file
+#{{ end }}
index 0816aa5..523cfd3 100644 (file)
@@ -13,58 +13,37 @@ spec:
       labels:
         app: pap
       name: pap
-      annotations:
-        pod.beta.kubernetes.io/init-containers: '[
-          {
-              "args": [
-                  "--container-name",
-                  "nexus",
-                  "--container-name",
-                  "mariadb"
-              ],
-              "command": [
-                  "/root/ready.py"
-              ],
-              "env": [
-                  {
-                      "name": "NAMESPACE",
-                      "valueFrom": {
-                          "fieldRef": {
-                              "apiVersion": "v1",
-                              "fieldPath": "metadata.namespace"
-                          }
-                      }
-                  }
-              ],
-              "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
-              "imagePullPolicy": "{{ .Values.pullPolicy }}",
-              "name": "pap-readiness"
-          },
-          {
-              "env": [
-                  {
-                      "name": "POD_IP",
-                      "valueFrom": {
-                          "fieldRef": {
-                              "apiVersion": "v1",
-                              "fieldPath": "status.podIP"
-                          }
-                      }
-                  }
-              ],
-              "command": ["/bin/bash", "-c", "echo $POD_IP > /config/ip_addr.txt"],
-              "volumeMounts": [
-                {
-                  "mountPath": "/config/",
-                  "name": "pe"
-                }
-              ],
-              "image": "{{ .Values.image.ubuntu }}",
-              "imagePullPolicy": "{{ .Values.pullPolicy }}",
-              "name": "generate-ip-addr-txt"
-          }
-          ]'
     spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - nexus
+        - --container-name
+        - mariadb
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: pap-readiness
+      - command: ["/bin/bash", "-c", "echo $POD_IP > /config/ip_addr.txt"]
+        env:
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: status.podIP
+        volumeMounts:
+        - mountPath: /config/
+          name: pe
+        image: {{ .Values.image.ubuntu }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: generate-ip-addr-txt
       containers:
       - command:
         - /bin/bash
@@ -129,4 +108,4 @@ spec:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
\ No newline at end of file
+#{{ end }}
index 6cc442b..3763b95 100644 (file)
@@ -14,37 +14,26 @@ spec:
       labels:
         app: pdp
       name: pdp
-      annotations:
-        pod.beta.kubernetes.io/init-containers: '[
-          {
-              "args": [
-                  "--container-name",
-                  "mariadb",
-                  "--container-name",
-                  "nexus",
-                  "--container-name",
-                  "pap"
-              ],
-              "command": [
-                  "/root/ready.py"
-              ],
-              "env": [
-                  {
-                      "name": "NAMESPACE",
-                      "valueFrom": {
-                          "fieldRef": {
-                              "apiVersion": "v1",
-                              "fieldPath": "metadata.namespace"
-                          }
-                      }
-                  }
-              ],
-              "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
-              "imagePullPolicy": "{{ .Values.pullPolicy }}",
-              "name": "pdp-readiness"
-          }
-          ]'
     spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - mariadb
+        - --container-name
+        - nexus
+        - --container-name
+        - pap
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: pdp-readiness
       containers:
       - command:
         - /bin/bash
@@ -103,4 +92,4 @@ spec:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
\ No newline at end of file
+#{{ end }}