vvp -- VNF Validation Platform
[oom.git] / kubernetes / vvp / charts / vvp-em-uwsgi / 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: {{ include "common.name" . }}
34         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
35         imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }}
36         ports:
37         - containerPort: 80
38         - containerPort: 9000
39         volumeMounts:
40         - name: em-settings
41           mountPath: /opt/configmaps/settings/
42         - name: site-crt
43           mountPath: /opt/secrets/site-crt/
44         env:
45         - name: ENVIRONMENT
46           value: "development"
47         - name: PROGRAM_NAME_URL_PREFIX
48           value: "vvp"
49         - name: SERVICE_PROVIDER
50           value: "NA"
51         - name: PROGRAM_NAME
52           value: "VVP"
53         - name: SERVICE_PROVIDER_DOMAIN
54           value: "na.com"
55         - name: SECRET_KEY
56           valueFrom:
57             secretKeyRef: {name: em-secret, key: key}
58         - name: EMAIL_HOST
59           value: "localhost"
60         - name: EMAIL_HOST_USER
61           value: "example"
62         - name: EMAIL_PORT
63           value: "25"
64         - name: EMAIL_HOST_PASSWORD
65           valueFrom:
66             secretKeyRef: {name: email-secret, key: password}
67         - name: PGHOST
68           value: vvp-postgres
69         - name: PGPORT
70           value: "5432"
71         - name: PGDATABASE
72           value: icedb
73         - name: PGUSER
74           value: "em_postgresuser"
75         - name: PGPASSWORD
76           valueFrom:
77             secretKeyRef: {name: postgresql-passwords, key: emPassword}
78         - name: DOMAIN
79           value: https://development.vvp.example.com
80         - name: ICE_EM_DOMAIN_NAME
81           value: https://development.vvp.example.com
82         - name: CONTACT_FROM_ADDRESS
83           value: "example"
84         - name: OAUTHLIB_INSECURE_TRANSPORT
85           value: "1"
86         - name: SECRET_WEBHOOK_TOKEN
87           valueFrom:
88             secretKeyRef: {name: em-secret, key: em_webhook_token}
89         - name: SECRET_GITLAB_AUTH_TOKEN
90           valueFrom:
91             secretKeyRef: {name: gitlab-password, key: auth-token}
92         - name: SECRET_JENKINS_PASSWORD
93           valueFrom:
94             secretKeyRef: {name: em-secret, key: jenkins_admin_password}
95         - name: SECRET_CMS_APP_CLIENT_ID
96           valueFrom:
97             secretKeyRef: {name: em-secret, key: cms_app_client_id}
98         - name: SECRET_CMS_APP_CLIENT_SECRET
99           valueFrom:
100             secretKeyRef: {name: em-secret, key: cms_app_client_secret}
101         - name: STATIC_ROOT
102           value: "/app/htdocs"
103         - name: DJANGO_DEBUG_MODE
104           value: "True"
105         - name: SLACK_API_TOKEN
106           valueFrom:
107             secretKeyRef: {name: em-secret, key: slack_api_token}
108         - name: ENGAGEMENTS_CHANNEL
109           value: ""
110         - name: ENGAGEMENTS_NOTIFICATIONS_CHANNEL
111           value: ""
112         - name: DEVOPS_CHANNEL
113           value: ""
114         - name: DEVOPS_NOTIFICATIONS_CHANNEL
115           value: ""
116         - name: S3_HOST
117           value: "dev-s3.vvp.example.com"
118         - name: S3_PORT
119           value: "443"
120         - name: AWS_ACCESS_KEY_ID
121           valueFrom:
122             secretKeyRef: {name: em-secret, key: aws_access_key_id}
123         - name: AWS_SECRET_ACCESS_KEY
124           valueFrom:
125             secretKeyRef: {name: em-secret, key: aws_secret_access_key}
126         command: ["/docker-entrypoint.sh", "/usr/local/bin/gunicorn", "-c", "/opt/configmaps/settings/gunicorn.ini", "vvp.wsgi:application", ]
127       volumes:
128       - name: site-crt
129         secret:
130           secretName: site-crt
131       - name: em-settings
132         configMap:
133           name: {{ include "common.fullname" . }}-settings