aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/templates
diff options
context:
space:
mode:
authorkerenj <keren.joseph@amdocs.com>2017-08-23 11:21:21 +0000
committerkerenj <keren.joseph@amdocs.com>2017-08-24 10:38:58 +0000
commit3b697f6c07a1af4625f3982096e87f2c783f8890 (patch)
treefbfb511671c6751d698321af5fcc7ef737e45822 /kubernetes/policy/templates
parentcbac010dec8633718531423ebe4e3ede0005d36f (diff)
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 <keren.joseph@amdocs.com>
Diffstat (limited to 'kubernetes/policy/templates')
-rw-r--r--kubernetes/policy/templates/all-services.yaml112
-rw-r--r--kubernetes/policy/templates/dep-brmsgw.yaml67
-rw-r--r--kubernetes/policy/templates/dep-drools.yaml81
-rw-r--r--kubernetes/policy/templates/dep-maria.yaml33
-rw-r--r--kubernetes/policy/templates/dep-nexus.yaml51
-rw-r--r--kubernetes/policy/templates/dep-pap.yaml91
-rw-r--r--kubernetes/policy/templates/dep-pdp.yaml70
-rw-r--r--kubernetes/policy/templates/dep-pypdp.yaml72
8 files changed, 577 insertions, 0 deletions
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