From 3b697f6c07a1af4625f3982096e87f2c783f8890 Mon Sep 17 00:00:00 2001 From: kerenj Date: Wed, 23 Aug 2017 11:21:21 +0000 Subject: policy K8S-Helm Parameterization changed policy k8s deployment to support helm parameterization. updated images to 1.1 Issue-ID: OOM-52 Change-Id: I4eb0626c7c00ace2c266d6ddbb1313f3b654d69e Signed-off-by: kerenj --- kubernetes/oneclick/setenv.bash | 4 +- kubernetes/policy/Chart.yaml | 4 + kubernetes/policy/all-services.yaml | 105 ------------------------ kubernetes/policy/dep-brmsgw.yaml | 65 --------------- kubernetes/policy/dep-drools.yaml | 79 ------------------ kubernetes/policy/dep-maria.yaml | 31 ------- kubernetes/policy/dep-nexus.yaml | 49 ----------- kubernetes/policy/dep-pap.yaml | 89 -------------------- kubernetes/policy/dep-pdp.yaml | 68 ---------------- kubernetes/policy/dep-pypdp.yaml | 70 ---------------- kubernetes/policy/templates/all-services.yaml | 112 ++++++++++++++++++++++++++ kubernetes/policy/templates/dep-brmsgw.yaml | 67 +++++++++++++++ kubernetes/policy/templates/dep-drools.yaml | 81 +++++++++++++++++++ kubernetes/policy/templates/dep-maria.yaml | 33 ++++++++ kubernetes/policy/templates/dep-nexus.yaml | 51 ++++++++++++ kubernetes/policy/templates/dep-pap.yaml | 91 +++++++++++++++++++++ kubernetes/policy/templates/dep-pdp.yaml | 70 ++++++++++++++++ kubernetes/policy/templates/dep-pypdp.yaml | 72 +++++++++++++++++ kubernetes/policy/values.yaml | 9 +++ 19 files changed, 592 insertions(+), 558 deletions(-) create mode 100644 kubernetes/policy/Chart.yaml delete mode 100644 kubernetes/policy/all-services.yaml delete mode 100644 kubernetes/policy/dep-brmsgw.yaml delete mode 100644 kubernetes/policy/dep-drools.yaml delete mode 100644 kubernetes/policy/dep-maria.yaml delete mode 100644 kubernetes/policy/dep-nexus.yaml delete mode 100644 kubernetes/policy/dep-pap.yaml delete mode 100644 kubernetes/policy/dep-pdp.yaml delete mode 100644 kubernetes/policy/dep-pypdp.yaml create mode 100644 kubernetes/policy/templates/all-services.yaml create mode 100644 kubernetes/policy/templates/dep-brmsgw.yaml create mode 100644 kubernetes/policy/templates/dep-drools.yaml create mode 100644 kubernetes/policy/templates/dep-maria.yaml create mode 100644 kubernetes/policy/templates/dep-nexus.yaml create mode 100644 kubernetes/policy/templates/dep-pap.yaml create mode 100644 kubernetes/policy/templates/dep-pdp.yaml create mode 100644 kubernetes/policy/templates/dep-pypdp.yaml create mode 100644 kubernetes/policy/values.yaml diff --git a/kubernetes/oneclick/setenv.bash b/kubernetes/oneclick/setenv.bash index dd6b22df94..070dce9a7f 100644 --- a/kubernetes/oneclick/setenv.bash +++ b/kubernetes/oneclick/setenv.bash @@ -1,7 +1,7 @@ #!/bin/bash -HELM_APPS=('mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal') -ONAP_APPS=('sdc' 'aai' 'policy' 'appc') +HELM_APPS=('mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy') +ONAP_APPS=('sdc' 'aai' 'appc') ONAP_DOCKER_REGISTRY_KEY=${ONAP_DOCKER_REGISTRY_KEY:-onap-docker-registry-key} ONAP_DOCKER_REGISTRY=${ONAP_DOCKER_REGISTRY:-nexus3.onap.org:10001} ONAP_DOCKER_USER=${ONAP_DOCKER_USER:-docker} diff --git a/kubernetes/policy/Chart.yaml b/kubernetes/policy/Chart.yaml new file mode 100644 index 0000000000..0f877a0ecd --- /dev/null +++ b/kubernetes/policy/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +name: policy +version: 0.1.0 diff --git a/kubernetes/policy/all-services.yaml b/kubernetes/policy/all-services.yaml deleted file mode 100644 index d8d2cfa569..0000000000 --- a/kubernetes/policy/all-services.yaml +++ /dev/null @@ -1,105 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: mariadb - labels: - app: mariadb -spec: - ports: - - name: 3306-port - port: 3306 - selector: - app: mariadb - clusterIP: None ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: nexus - name: nexus -spec: - ports: - - name: nexus-port - port: 8081 - selector: - app: nexus - clusterIP: None ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: drools - name: drools -spec: - ports: - - name: "drools-port" - port: 6969 - nodePort: 30217 - selector: - app: drools - type: NodePort ---- -apiVersion: v1 -kind: Service -metadata: - name: pap - labels: - app: pap -spec: - ports: - - name: 8443-port - port: 8443 - nodePort: 30219 - - name: 9091-port - port: 9091 - nodePort: 30218 - selector: - app: pap - type: NodePort ---- -apiVersion: v1 -kind: Service -metadata: - name: pdp - labels: - app: pdp -spec: - ports: - - name: 8081-port - port: 8081 - nodePort: 30220 - selector: - app: pdp - type: NodePort ---- -apiVersion: v1 -kind: Service -metadata: - name: pypdp - labels: - app: pypdp -spec: - ports: - - name: tcp-31032-8480-bm91k - port: 8480 - nodePort: 30221 - selector: - app: pypdp - type: NodePort ---- -apiVersion: v1 -kind: Service -metadata: - name: brmsgw - labels: - app: brmsgw -spec: - ports: - - name: 9989-port - port: 9989 - nodePort: 30216 - selector: - app: brmsgw - type: NodePort diff --git a/kubernetes/policy/dep-brmsgw.yaml b/kubernetes/policy/dep-brmsgw.yaml deleted file mode 100644 index 6758abf16a..0000000000 --- a/kubernetes/policy/dep-brmsgw.yaml +++ /dev/null @@ -1,65 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: brmsgw -spec: - replicas: 1 - selector: - matchLabels: - app: brmsgw - template: - metadata: - 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", - "--container-name", - "pypdp" - ], - "command": [ - "/root/ready.py" - ], - "env": [ - { - "name": "NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - } - ], - "image": "oomk8s/readiness-check:1.0.0", - "imagePullPolicy": "Always", - "name": "brmsgw-readiness" - } - ]' - spec: - containers: - - command: - - /bin/bash - - ./do-start.sh - - brmsgw - image: nexus3.onap.org:10001/openecomp/policy/policy-pe:1.0-STAGING-latest - name: brmsgw - volumeMounts: - - mountPath: /tmp/policy-install/config - name: pe - volumes: - - name: pe - hostPath: - path: /dockerdata-nfs/onapdemo/policy/opt/policy/config/pe/ - imagePullSecrets: - - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-drools.yaml b/kubernetes/policy/dep-drools.yaml deleted file mode 100644 index fbc8e17601..0000000000 --- a/kubernetes/policy/dep-drools.yaml +++ /dev/null @@ -1,79 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: drools -spec: - replicas: 1 - selector: - matchLabels: - app: drools - template: - metadata: - 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", - "pypdp", - "--container-name", - "brmsgw" - ], - "command": [ - "/root/ready.py" - ], - "env": [ - { - "name": "NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - } - ], - "image": "oomk8s/readiness-check:1.0.0", - "imagePullPolicy": "Always", - "name": "drools-readiness" - } - ]' - spec: - containers: - - command: - - /bin/bash - - -c - - ./do-start.sh - image: nexus3.onap.org:10001/openecomp/policy/policy-drools:1.0-STAGING-latest - name: drools - ports: - - containerPort: 6969 - readinessProbe: - tcpSocket: - port: 6969 - initialDelaySeconds: 5 - periodSeconds: 10 - volumeMounts: - - mountPath: /tmp/policy-install/config - name: drools - - mountPath: /usr/share/maven/conf/settings.xml - name: drools-settingsxml - volumes: - - name: drools-settingsxml - hostPath: - path: /dockerdata-nfs/onapdemo/policy/drools/settings.xml - - name: drools - hostPath: - path: /dockerdata-nfs/onapdemo/policy/opt/policy/config/drools/ - imagePullSecrets: - - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-maria.yaml b/kubernetes/policy/dep-maria.yaml deleted file mode 100644 index 21914c8657..0000000000 --- a/kubernetes/policy/dep-maria.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: mariadb -spec: - replicas: 1 - selector: - matchLabels: - app: mariadb - template: - metadata: - labels: - app: mariadb - spec: - hostname: mariadb - containers: - - command: - - /bin/bash - - -c - - exec bash /tmp/do-start.sh - image: nexus3.onap.org:10001/openecomp/policy/policy-db:1.0-STAGING-latest - name: mariadb - ports: - - containerPort: 3306 - readinessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 5 - periodSeconds: 10 - imagePullSecrets: - - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-nexus.yaml b/kubernetes/policy/dep-nexus.yaml deleted file mode 100644 index 48c289e3e1..0000000000 --- a/kubernetes/policy/dep-nexus.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: nexus -spec: - selector: - matchLabels: - app: nexus - template: - metadata: - 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": "oomk8s/readiness-check:1.0.0", - "imagePullPolicy": "Always", - "name": "nexus-readiness" - } - ]' - spec: - containers: - - command: - - /bin/bash - - -c - - bash -c "/opt/nexus/nexus-2.14.2-01/bin/nexus start && sleep 1000d" - image: nexus3.onap.org:10001/openecomp/policy/policy-nexus:1.0-STAGING-latest - name: nexus - imagePullSecrets: - - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-pap.yaml b/kubernetes/policy/dep-pap.yaml deleted file mode 100644 index 11420da525..0000000000 --- a/kubernetes/policy/dep-pap.yaml +++ /dev/null @@ -1,89 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: pap -spec: - selector: - matchLabels: - app: pap - template: - metadata: - 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": "oomk8s/readiness-check:1.0.0", - "imagePullPolicy": "Always", - "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": "ubuntu:16.04", - "imagePullPolicy": "Always", - "name": "generate-ip-addr-txt" - } - ]' - spec: - containers: - - command: - - /bin/bash - - ./do-start.sh - - pap - image: nexus3.onap.org:10001/openecomp/policy/policy-pe:1.0-STAGING-latest - name: pap - ports: - - containerPort: 8443 - - containerPort: 9091 - readinessProbe: - tcpSocket: - port: 9091 - initialDelaySeconds: 5 - periodSeconds: 10 - volumeMounts: - - mountPath: /tmp/policy-install/config/ - name: pe - volumes: - - name: pe - hostPath: - path: /dockerdata-nfs/onapdemo/policy/opt/policy/config/pe/ - imagePullSecrets: - - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-pdp.yaml b/kubernetes/policy/dep-pdp.yaml deleted file mode 100644 index 0efe5c3773..0000000000 --- a/kubernetes/policy/dep-pdp.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: pdp -spec: - replicas: 1 - selector: - matchLabels: - app: pdp - template: - metadata: - 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": "oomk8s/readiness-check:1.0.0", - "imagePullPolicy": "Always", - "name": "pdp-readiness" - } - ]' - spec: - containers: - - command: - - /bin/bash - - ./do-start.sh - - pdp - image: nexus3.onap.org:10001/openecomp/policy/policy-pe:1.0-STAGING-latest - name: pdp - ports: - - containerPort: 8081 - readinessProbe: - tcpSocket: - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - volumeMounts: - - mountPath: /tmp/policy-install/config - name: pe - volumes: - - name: pe - hostPath: - path: /dockerdata-nfs/onapdemo/policy/opt/policy/config/pe/ - imagePullSecrets: - - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-pypdp.yaml b/kubernetes/policy/dep-pypdp.yaml deleted file mode 100644 index 91d71d56e8..0000000000 --- a/kubernetes/policy/dep-pypdp.yaml +++ /dev/null @@ -1,70 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: pypdp -spec: - replicas: 1 - selector: - matchLabels: - app: pypdp - template: - metadata: - labels: - app: pypdp - name: pypdp - 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": "oomk8s/readiness-check:1.0.0", - "imagePullPolicy": "Always", - "name": "pypdp-readiness" - } - ]' - spec: - containers: - - command: - - /bin/bash - - ./do-start.sh - - pypdp - image: nexus3.onap.org:10001/openecomp/policy/policy-pe:1.0-STAGING-latest - name: pypdp - ports: - - containerPort: 8480 - readinessProbe: - tcpSocket: - port: 8480 - initialDelaySeconds: 5 - periodSeconds: 10 - volumeMounts: - - mountPath: /tmp/policy-install/config - name: pe - volumes: - - name: pe - hostPath: - path: /dockerdata-nfs/onapdemo/policy/opt/policy/config/pe/ - imagePullSecrets: - - name: onap-docker-registry-key diff --git a/kubernetes/policy/templates/all-services.yaml b/kubernetes/policy/templates/all-services.yaml new file mode 100644 index 0000000000..e15b1298d7 --- /dev/null +++ b/kubernetes/policy/templates/all-services.yaml @@ -0,0 +1,112 @@ +apiVersion: v1 +kind: Service +metadata: + name: mariadb + namespace: {{ .Values.NS }} + labels: + app: mariadb +spec: + ports: + - name: 3306-port + port: 3306 + selector: + app: mariadb + clusterIP: None +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: nexus + name: nexus + namespace: {{ .Values.NS }} +spec: + ports: + - name: nexus-port + port: 8081 + selector: + app: nexus + clusterIP: None +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: drools + name: drools + namespace: {{ .Values.NS }} +spec: + ports: + - name: "drools-port" + port: 6969 + nodePort: 30217 + selector: + app: drools + type: NodePort +--- +apiVersion: v1 +kind: Service +metadata: + name: pap + namespace: {{ .Values.NS }} + labels: + app: pap +spec: + ports: + - name: 8443-port + port: 8443 + nodePort: 30219 + - name: 9091-port + port: 9091 + nodePort: 30218 + selector: + app: pap + type: NodePort +--- +apiVersion: v1 +kind: Service +metadata: + name: pdp + namespace: {{ .Values.NS }} + labels: + app: pdp +spec: + ports: + - name: 8081-port + port: 8081 + nodePort: 30220 + selector: + app: pdp + type: NodePort +--- +apiVersion: v1 +kind: Service +metadata: + name: pypdp + namespace: {{ .Values.NS }} + labels: + app: pypdp +spec: + ports: + - name: tcp-31032-8480-bm91k + port: 8480 + nodePort: 30221 + selector: + app: pypdp + type: NodePort +--- +apiVersion: v1 +kind: Service +metadata: + name: brmsgw + namespace: {{ .Values.NS }} + labels: + app: brmsgw +spec: + ports: + - name: 9989-port + port: 9989 + nodePort: 30216 + selector: + app: brmsgw + type: NodePort diff --git a/kubernetes/policy/templates/dep-brmsgw.yaml b/kubernetes/policy/templates/dep-brmsgw.yaml new file mode 100644 index 0000000000..3f59d218da --- /dev/null +++ b/kubernetes/policy/templates/dep-brmsgw.yaml @@ -0,0 +1,67 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: brmsgw + namespace: {{ .Values.NS }} +spec: + replicas: 1 + selector: + matchLabels: + app: brmsgw + template: + metadata: + 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", + "--container-name", + "pypdp" + ], + "command": [ + "/root/ready.py" + ], + "env": [ + { + "name": "NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + } + ], + "image": "{{ .Values.image.readiness }}", + "imagePullPolicy": "{{ .Values.pullPolicy }}", + "name": "brmsgw-readiness" + } + ]' + spec: + containers: + - command: + - /bin/bash + - ./do-start.sh + - brmsgw + image: {{ .Values.image.policyPe }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: brmsgw + volumeMounts: + - mountPath: /tmp/policy-install/config + name: pe + volumes: + - name: pe + hostPath: + path: /dockerdata-nfs/onap/policy/opt/policy/config/pe/ + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/templates/dep-drools.yaml b/kubernetes/policy/templates/dep-drools.yaml new file mode 100644 index 0000000000..101066fb40 --- /dev/null +++ b/kubernetes/policy/templates/dep-drools.yaml @@ -0,0 +1,81 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: drools + namespace: {{ .Values.NS }} +spec: + replicas: 1 + selector: + matchLabels: + app: drools + template: + metadata: + 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", + "pypdp", + "--container-name", + "brmsgw" + ], + "command": [ + "/root/ready.py" + ], + "env": [ + { + "name": "NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + } + ], + "image": "{{ .Values.image.readiness }}", + "imagePullPolicy": "{{ .Values.pullPolicy }}", + "name": "drools-readiness" + } + ]' + spec: + containers: + - command: + - /bin/bash + - -c + - ./do-start.sh + image: {{ .Values.image.policyDrools }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: drools + ports: + - containerPort: 6969 + readinessProbe: + tcpSocket: + port: 6969 + initialDelaySeconds: 5 + periodSeconds: 10 + volumeMounts: + - mountPath: /tmp/policy-install/config + name: drools + - mountPath: /usr/share/maven/conf/settings.xml + name: drools-settingsxml + volumes: + - name: drools-settingsxml + hostPath: + path: /dockerdata-nfs/onap/policy/drools/settings.xml + - name: drools + hostPath: + path: /dockerdata-nfs/onap/policy/opt/policy/config/drools/ + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/templates/dep-maria.yaml b/kubernetes/policy/templates/dep-maria.yaml new file mode 100644 index 0000000000..63306d4f40 --- /dev/null +++ b/kubernetes/policy/templates/dep-maria.yaml @@ -0,0 +1,33 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: mariadb + namespace: {{ .Values.NS }} +spec: + replicas: 1 + selector: + matchLabels: + app: mariadb + template: + metadata: + labels: + app: mariadb + spec: + hostname: mariadb + containers: + - command: + - /bin/bash + - -c + - exec bash /tmp/do-start.sh + image: {{ .Values.image.policyDb }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: mariadb + ports: + - containerPort: 3306 + readinessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 5 + periodSeconds: 10 + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/templates/dep-nexus.yaml b/kubernetes/policy/templates/dep-nexus.yaml new file mode 100644 index 0000000000..d45d77dcfb --- /dev/null +++ b/kubernetes/policy/templates/dep-nexus.yaml @@ -0,0 +1,51 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: nexus + namespace: {{ .Values.NS }} +spec: + selector: + matchLabels: + app: nexus + template: + metadata: + 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 }}", + "imagePullPolicy": "{{ .Values.pullPolicy }}", + "name": "nexus-readiness" + } + ]' + spec: + containers: + - command: + - /bin/bash + - -c + - bash -c "/opt/nexus/nexus-2.14.2-01/bin/nexus start && sleep 1000d" + image: {{ .Values.image.policyNexus }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: nexus + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/templates/dep-pap.yaml b/kubernetes/policy/templates/dep-pap.yaml new file mode 100644 index 0000000000..e7fe90297f --- /dev/null +++ b/kubernetes/policy/templates/dep-pap.yaml @@ -0,0 +1,91 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: pap + namespace: {{ .Values.NS }} +spec: + selector: + matchLabels: + app: pap + template: + metadata: + 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 }}", + "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: + containers: + - command: + - /bin/bash + - ./do-start.sh + - pap + image: {{ .Values.image.policyPe }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: pap + ports: + - containerPort: 8443 + - containerPort: 9091 + readinessProbe: + tcpSocket: + port: 9091 + initialDelaySeconds: 5 + periodSeconds: 10 + volumeMounts: + - mountPath: /tmp/policy-install/config/ + name: pe + volumes: + - name: pe + hostPath: + path: /dockerdata-nfs/onap/policy/opt/policy/config/pe/ + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/templates/dep-pdp.yaml b/kubernetes/policy/templates/dep-pdp.yaml new file mode 100644 index 0000000000..f7d9bf345a --- /dev/null +++ b/kubernetes/policy/templates/dep-pdp.yaml @@ -0,0 +1,70 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: pdp + namespace: {{ .Values.NS }} +spec: + replicas: 1 + selector: + matchLabels: + app: pdp + template: + metadata: + 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 }}", + "imagePullPolicy": "{{ .Values.pullPolicy }}", + "name": "pdp-readiness" + } + ]' + spec: + containers: + - command: + - /bin/bash + - ./do-start.sh + - pdp + image: {{ .Values.image.policyPe }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: pdp + ports: + - containerPort: 8081 + readinessProbe: + tcpSocket: + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + volumeMounts: + - mountPath: /tmp/policy-install/config + name: pe + volumes: + - name: pe + hostPath: + path: /dockerdata-nfs/onap/policy/opt/policy/config/pe/ + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/templates/dep-pypdp.yaml b/kubernetes/policy/templates/dep-pypdp.yaml new file mode 100644 index 0000000000..851438878c --- /dev/null +++ b/kubernetes/policy/templates/dep-pypdp.yaml @@ -0,0 +1,72 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: pypdp + namespace: {{ .Values.NS }} +spec: + replicas: 1 + selector: + matchLabels: + app: pypdp + template: + metadata: + labels: + app: pypdp + name: pypdp + 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 }}", + "imagePullPolicy": "{{ .Values.pullPolicy }}", + "name": "pypdp-readiness" + } + ]' + spec: + containers: + - command: + - /bin/bash + - ./do-start.sh + - pypdp + image: {{ .Values.image.policyPe }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: pypdp + ports: + - containerPort: 8480 + readinessProbe: + tcpSocket: + port: 8480 + initialDelaySeconds: 5 + periodSeconds: 10 + volumeMounts: + - mountPath: /tmp/policy-install/config + name: pe + volumes: + - name: pe + hostPath: + path: /dockerdata-nfs/onap/policy/opt/policy/config/pe/ + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/values.yaml b/kubernetes/policy/values.yaml new file mode 100644 index 0000000000..19ff66c34a --- /dev/null +++ b/kubernetes/policy/values.yaml @@ -0,0 +1,9 @@ +NS: onap-policy +pullPolicy: Always +image: + readiness: oomk8s/readiness-check:1.0.0 + policyPe: nexus3.onap.org:10001/openecomp/policy/policy-pe:1.1-STAGING-latest + policyDrools: nexus3.onap.org:10001/openecomp/policy/policy-drools:1.1-STAGING-latest + policyDb: nexus3.onap.org:10001/openecomp/policy/policy-db:1.1-STAGING-latest + policyNexus: nexus3.onap.org:10001/openecomp/policy/policy-nexus:1.1-STAGING-latest + ubuntu: ubuntu:16.04 -- cgit 1.2.3-korg