From 86243b7899c5903c92cb24ff4914da436b528920 Mon Sep 17 00:00:00 2001 From: vasundhra Date: Wed, 22 Nov 2017 11:56:23 +0000 Subject: [PATCH] Update annotations to spec for policy Issue-ID: OOM-406 Change-Id: I23e47dd28502cefc7b64fad7704aacdee51f1fc7 Signed-off-by: vasundhra --- kubernetes/policy/templates/dep-brmsgw.yaml | 55 ++++++++----------- kubernetes/policy/templates/dep-drools.yaml | 59 +++++++++----------- kubernetes/policy/templates/dep-nexus.yaml | 43 ++++++--------- kubernetes/policy/templates/dep-pap.yaml | 83 +++++++++++------------------ kubernetes/policy/templates/dep-pdp.yaml | 51 +++++++----------- 5 files changed, 113 insertions(+), 178 deletions(-) diff --git a/kubernetes/policy/templates/dep-brmsgw.yaml b/kubernetes/policy/templates/dep-brmsgw.yaml index df5d888165..7a1bcdec49 100644 --- a/kubernetes/policy/templates/dep-brmsgw.yaml +++ b/kubernetes/policy/templates/dep-brmsgw.yaml @@ -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 }} diff --git a/kubernetes/policy/templates/dep-drools.yaml b/kubernetes/policy/templates/dep-drools.yaml index 3e9fa014fb..48ef16e3b2 100644 --- a/kubernetes/policy/templates/dep-drools.yaml +++ b/kubernetes/policy/templates/dep-drools.yaml @@ -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 }} diff --git a/kubernetes/policy/templates/dep-nexus.yaml b/kubernetes/policy/templates/dep-nexus.yaml index 07cd334879..4adb05f630 100644 --- a/kubernetes/policy/templates/dep-nexus.yaml +++ b/kubernetes/policy/templates/dep-nexus.yaml @@ -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 }} diff --git a/kubernetes/policy/templates/dep-pap.yaml b/kubernetes/policy/templates/dep-pap.yaml index 0816aa5291..523cfd35ff 100644 --- a/kubernetes/policy/templates/dep-pap.yaml +++ b/kubernetes/policy/templates/dep-pap.yaml @@ -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 }} diff --git a/kubernetes/policy/templates/dep-pdp.yaml b/kubernetes/policy/templates/dep-pdp.yaml index 6cc442b417..3763b95bb2 100644 --- a/kubernetes/policy/templates/dep-pdp.yaml +++ b/kubernetes/policy/templates/dep-pdp.yaml @@ -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 }} -- 2.16.6