Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 1 | apiVersion: extensions/v1beta1 |
| 2 | kind: Deployment |
| 3 | metadata: |
| 4 | name: pap |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 5 | namespace: "{{ .Values.nsPrefix }}-policy" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 6 | spec: |
| 7 | selector: |
| 8 | matchLabels: |
| 9 | app: pap |
| 10 | template: |
| 11 | metadata: |
| 12 | labels: |
| 13 | app: pap |
| 14 | name: pap |
| 15 | annotations: |
| 16 | pod.beta.kubernetes.io/init-containers: '[ |
| 17 | { |
| 18 | "args": [ |
| 19 | "--container-name", |
| 20 | "nexus", |
| 21 | "--container-name", |
| 22 | "mariadb" |
| 23 | ], |
| 24 | "command": [ |
| 25 | "/root/ready.py" |
| 26 | ], |
| 27 | "env": [ |
| 28 | { |
| 29 | "name": "NAMESPACE", |
| 30 | "valueFrom": { |
| 31 | "fieldRef": { |
| 32 | "apiVersion": "v1", |
| 33 | "fieldPath": "metadata.namespace" |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | ], |
Eric Au | cdaafde | 2017-08-31 16:18:11 -0400 | [diff] [blame] | 38 | "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}", |
kerenj | 3b697f6 | 2017-08-23 11:21:21 +0000 | [diff] [blame] | 39 | "imagePullPolicy": "{{ .Values.pullPolicy }}", |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 40 | "name": "pap-readiness" |
| 41 | }, |
| 42 | { |
| 43 | "env": [ |
| 44 | { |
| 45 | "name": "POD_IP", |
| 46 | "valueFrom": { |
| 47 | "fieldRef": { |
| 48 | "apiVersion": "v1", |
| 49 | "fieldPath": "status.podIP" |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | ], |
| 54 | "command": ["/bin/bash", "-c", "echo $POD_IP > /config/ip_addr.txt"], |
| 55 | "volumeMounts": [ |
| 56 | { |
| 57 | "mountPath": "/config/", |
| 58 | "name": "pe" |
| 59 | } |
| 60 | ], |
kerenj | 3b697f6 | 2017-08-23 11:21:21 +0000 | [diff] [blame] | 61 | "image": "{{ .Values.image.ubuntu }}", |
| 62 | "imagePullPolicy": "{{ .Values.pullPolicy }}", |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 63 | "name": "generate-ip-addr-txt" |
| 64 | } |
| 65 | ]' |
| 66 | spec: |
| 67 | containers: |
| 68 | - command: |
| 69 | - /bin/bash |
| 70 | - ./do-start.sh |
| 71 | - pap |
Eric Au | cdaafde | 2017-08-31 16:18:11 -0400 | [diff] [blame] | 72 | image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}" |
kerenj | 3b697f6 | 2017-08-23 11:21:21 +0000 | [diff] [blame] | 73 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 74 | name: pap |
| 75 | ports: |
| 76 | - containerPort: 8443 |
| 77 | - containerPort: 9091 |
| 78 | readinessProbe: |
| 79 | tcpSocket: |
| 80 | port: 9091 |
| 81 | initialDelaySeconds: 5 |
| 82 | periodSeconds: 10 |
| 83 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame^] | 84 | - mountPath: /etc/localtime |
| 85 | name: localtime |
| 86 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 87 | - mountPath: /tmp/policy-install/config/ |
| 88 | name: pe |
| 89 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame^] | 90 | - name: localtime |
| 91 | hostPath: |
| 92 | path: /etc/localtime |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 93 | - name: pe |
| 94 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 95 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/ |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 96 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 97 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |