blob: c2408c582427b2640983ec1f1a67958731cce584 [file] [log] [blame]
jasmineWenc2cc5ff2018-06-22 18:16:24 +00001# 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
15apiVersion: extensions/v1beta1
16kind: Deployment
17metadata:
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22spec:
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: {{ .Values.service.internalPort1 }}
38 - containerPort: {{ .Values.service.internalPort2 }}
39 env:
40 - name: ENVIRONMENT
41 value: "development"
42 - name: SECRET_KEY
43 valueFrom:
44 secretKeyRef: {name: {{ include "common.fullname" . }}-secret, key: key}
45 - name: EMAIL_HOST
46 value: "localhost"
47 - name: EMAIL_HOST_USER
48 value: "example"
49 - name: EMAIL_PORT
50 value: "25"
51 - name: EMAIL_HOST_PASSWORD
52 valueFrom:
53 secretKeyRef: {name: email-secret, key: password}
54 - name: PGHOST
55 value: vvp-postgres
56 - name: PGPORT
57 value: "5432"
58 - name: PGDATABASE
59 value: "icecmsdb"
60 - name: PGUSER
61 value: "cms_postgresuser"
62 - name: PGPASSWORD
63 valueFrom:
64 secretKeyRef: {name: postgresql-passwords, key: cmsPassword}
65 - name: ICE_CONTACT_FROM_ADDRESS
66 value: "example"
67 - name: CMS_NEVERCACHE_KEY
68 valueFrom:
69 secretKeyRef: {name: {{ include "common.fullname" . }}-secret, key: nevercache_key}
70 - name: CMS_APP_USER
71 valueFrom:
72 secretKeyRef: {name: {{ include "common.fullname" . }}-secret, key: app_user}
73 - name: CMS_APP_USER_MAIL
74 valueFrom:
75 secretKeyRef: {name: {{ include "common.fullname" . }}-secret, key: app_user_mail}
76 - name: CMS_APP_USER_PASSWORD
77 valueFrom:
78 secretKeyRef: {name: {{ include "common.fullname" . }}-secret, key: app_user_password}
79 - name: CMS_APP_CLIENT_ID
80 valueFrom:
81 secretKeyRef: {name: {{ include "common.fullname" . }}-secret, key: app_client_id}
82 - name: CMS_APP_CLIENT_SECRET
83 valueFrom:
84 secretKeyRef: {name: {{ include "common.fullname" . }}-secret, key: app_client_secret}
85 - name: STATIC_ROOT
86 value: "/app/htdocs"
87 - name: DJANGO_DEBUG_MODE
88 value: "True"
89 - name: S3_HOST
90 value: "dev-s3.vvp.example.com"
91 - name: S3_PORT
92 value: "443"
93 - name: AWS_ACCESS_KEY_ID
94 valueFrom:
95 secretKeyRef: {name: em-secret, key: aws_access_key_id}
96 - name: AWS_SECRET_ACCESS_KEY
97 valueFrom:
98 secretKeyRef: {name: em-secret, key: aws_secret_access_key}
99 command: ["/docker-entrypoint.sh", "/usr/local/bin/gunicorn", "-c", "/opt/configmaps/settings/gunicorn.ini", "cms.wsgi:application", ]
100 volumeMounts:
101 - name: settings
102 mountPath: /opt/configmaps/settings/
103 - name: site-crt
104 mountPath: /opt/secrets/site-crt/
105 volumes:
106 - name: settings
107 configMap:
108 name: {{ include "common.fullname" . }}-settings
109 - name: site-crt
110 secret:
111 secretName: site-crt