-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployment.yaml
64 lines (64 loc) · 2.01 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
apiVersion: networking.k8s.io/v1
kind: Deployment
metadata:
name: {{ STUDIO_DEPLOYMENT_NAME }}
namespace: {{ STUDIO_DEPLOYMENT_NAMESPACE }}
labels:
app: {{ STUDIO_DEPLOYMENT_NAME }}
type: service
spec:
replicas: 1
template:
metadata:
labels:
app: {{ STUDIO_DEPLOYMENT_NAME }}
type: service
spec:
automountServiceAccountToken: false
initContainers:
- name: www-init
image: osixia/ssl-helper:0.2.1
imagePullPolicy: Always
volumeMounts:
- name: ssl-helper-env-volume
mountPath: /container/environment/01-custom
- name: https-certs-volume
mountPath: /ssl-helper/certs/https
env:
- name: CFSSL_HOSTNAME
value: "{{ STUDIO_DEPLOYMENT_NAME }}" #same as service name
- name: SSL_HELPER_PREFIX_TO_GENERATE
value: "https"
- name: HTTPS_CFSSL_PROFILE
value: "server"
- name: HTTPS_SSL_HELPER_CERT_FILE
value: "/ssl-helper/certs/https/cert.crt"
- name: HTTPS_SSL_HELPER_KEY_FILE
value: "/ssl-helper/certs/https/cert.key"
- name: HTTPS_SSL_HELPER_CA_FILE
value: "/ssl-helper/certs/https/ca.crt"
containers:
- name: www
image: {{ DOCKER_IMAGE }}
imagePullPolicy: Always
resources:
requests:
memory: 64Mi
ports:
- containerPort: 443
volumeMounts:
- name: https-certs-volume
mountPath: /container/service/nginx/assets/certs
env:
- name: SSL_CRT_FILENAME
value: "cert.crt"
- name: SSL_KEY_FILENAME
value: "cert.key"
- name: SSL_CA_CRT_FILENAME
value: "ca.crt"
volumes:
- name: "ssl-helper-env-volume"
secret:
secretName: "ssl-helper-env-secret"
- name: "https-certs-volume"
emptyDir: {}