vvp -- VNF Validation Platform
[oom.git] / kubernetes / vvp / charts / vvp-imagescanner / templates / deployment.yaml
1 # Copyright © 2018 Amdocs, AT&T, Bell Canada
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 apiVersion: extensions/v1beta1
16 kind: Deployment
17 metadata:
18   name: {{ include "common.fullname" . }}
19   namespace: {{ include "common.namespace" . }}
20   labels:
21     app: {{ include "common.name" . }}
22 spec:
23   replicas: {{ .Values.replicaCount }}
24   template:
25     metadata:
26       labels:
27         app: {{ include "common.name" . }}
28       name: {{ .Release.Name }}
29     spec:
30       imagePullSecrets:
31       - name: onapkey
32       containers: 
33       - name: imagescanner-worker
34         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
35         command:
36         - "sh"
37         - "/opt/site-certificate/wrapper.sh"
38         - "/usr/local/bin/imagescanner-worker"
39         securityContext:
40           privileged: true
41         volumeMounts:
42         - name: imagescanner-ssh
43           mountPath: /root/.ssh
44         - name: dev
45           mountPath: /dev
46         - name: logs
47           mountPath: /var/log/imagescanner
48         - name: imagescanner-settings
49           mountPath: /opt/imagescanner-settings
50         - name: site-certificate
51           mountPath: /opt/site-certificate
52         env:
53         - name: PYTHONPATH
54           value: /opt/imagescanner-settings
55         - name: S3_HOST
56           value: "dev-s3.vvp.example.com"
57         - name: S3_PORT
58           value: "443"
59         - name: AWS_ACCESS_KEY_ID
60           valueFrom:
61             secretKeyRef: {name: em-secret, key: aws_access_key_id}
62         - name: AWS_SECRET_ACCESS_KEY
63           valueFrom:
64             secretKeyRef: {name: em-secret, key: aws_secret_access_key}
65         - name: SECRET_JENKINS_PASSWORD
66           value: ''
67         - name: REQUESTS_CA_BUNDLE
68           value: /etc/ssl/certs/ca-certificates.crt
69
70       - name: notifications-worker
71         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
72         command: ["/usr/local/bin/notifications-worker"]
73         securityContext:
74           privileged: true
75         env:
76         - name: SLACK_TOKEN
77           valueFrom:
78             secretKeyRef: {name: slack-tokens, key: notifications}
79         - name: DOMAIN
80           value: "dev-em.vvp.example.com"
81         - name: PYTHONPATH
82           value: /opt/imagescanner-settings
83         - name: SECRET_JENKINS_PASSWORD
84           valueFrom:
85             secretKeyRef: {name: em-secret, key: jenkins_admin_password}
86         volumeMounts:
87         - name: imagescanner-settings
88           mountPath: /opt/imagescanner-settings
89
90       - name: imagescanner-frontend
91         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
92         command: ["/usr/local/bin/imagescanner-frontend"]
93         securityContext:
94           privileged: true
95         ports:
96         - containerPort: 80
97         volumeMounts:
98         - name: logs
99           mountPath: /var/log/imagescanner
100         - name: imagescanner-settings
101           mountPath: /opt/imagescanner-settings
102         env:
103         - name: DEFAULT_SLACK_CHANNEL
104           value: "#notifications"
105         - name: SECRET_JENKINS_PASSWORD
106           value: ''
107
108       volumes:
109       - name: imagescanner-ssh
110         secret:
111           secretName: imagescanner-ssh
112           defaultMode: 0600
113       - name: dev
114         hostPath:
115           path: /dev
116       - name: logs
117         emptyDir: {}
118       - name: imagescanner-settings
119         configMap:
120           name: imagescanner-settings
121       - name: site-certificate
122         configMap:
123           name: site-certificate