-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontroller-deployment.yaml
151 lines (151 loc) · 5.07 KB
/
controller-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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
apiVersion: {{ template "APIVersion" . }}
kind: Deployment
metadata:
name: deis-controller
labels:
heritage: deis
annotations:
component.deis.io/version: {{ .Values.docker_tag }}
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app: deis-controller
template:
metadata:
labels:
app: deis-controller
spec:
serviceAccount: deis-controller
containers:
- name: deis-controller
image: quay.io/{{.Values.org}}/controller:{{.Values.docker_tag}}
imagePullPolicy: {{.Values.pull_policy}}
livenessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 30
timeoutSeconds: 10
readinessProbe:
httpGet:
path: /readiness
port: 8000
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 5
ports:
- containerPort: 8000
name: http
{{- if or (.Values.limits_cpu) (.Values.limits_memory) }}
resources:
limits:
{{- if (.Values.limits_cpu) }}
cpu: {{.Values.limits_cpu}}
{{- end }}
{{- if (.Values.limits_memory) }}
memory: {{.Values.limits_memory}}
{{- end }}
{{- end }}
env:
- name: REGISTRATION_MODE
value: {{ .Values.registration_mode }}
# NOTE(bacongobbler): use deis/registry_proxy to work around Docker --insecure-registry requirements
- name: "DEIS_REGISTRY_SERVICE_HOST"
value: "127.0.0.1"
# Environmental variable value for $NATIVE_INGRESS
- name: "NATIVE_INGRESS"
value: "{{ .Values.global.use_native_ingress }}"
- name: "NATIVE_INGRESS_HOSTNAME"
value: "{{ .Values.platform_domain }}"
- name: "K8S_API_VERIFY_TLS"
value: "{{ .Values.k8s_api_verify_tls }}"
- name: "DEIS_REGISTRY_SERVICE_PORT"
value: "{{ .Values.global.host_port }}"
- name: "APP_STORAGE"
value: "{{ .Values.global.storage}}"
- name: "DEIS_REGISTRY_LOCATION"
value: "{{ .Values.global.registry_location }}"
- name: "DEIS_REGISTRY_SECRET_PREFIX"
value: "{{ .Values.global.secret_prefix }}"
- name: "GUNICORN_WORKERS"
value: "{{ .Values.global.gunicorn_workers }}"
- name: "CONN_MAX_AGE"
value: "{{ .Values.global.conn_max_age }}"
- name: "SLUGRUNNER_IMAGE_NAME"
valueFrom:
configMapKeyRef:
name: slugrunner-config
key: image
- name: "IMAGE_PULL_POLICY"
value: "{{ .Values.app_pull_policy }}"
- name: "TZ"
value: {{ .Values.time_zone | default "UTC" | quote }}
{{- if (.Values.deploy_hook_urls) }}
- name: DEIS_DEPLOY_HOOK_URLS
value: "{{ .Values.deploy_hook_urls }}"
- name: DEIS_DEPLOY_HOOK_SECRET_KEY
valueFrom:
secretKeyRef:
name: deploy-hook-key
key: secret-key
{{- end }}
- name: DEIS_SECRET_KEY
valueFrom:
secretKeyRef:
name: django-secret-key
key: secret-key
- name: DEIS_BUILDER_KEY
valueFrom:
secretKeyRef:
name: builder-key-auth
key: builder-key
{{- if eq .Values.global.database_location "off-cluster" }}
- name: DEIS_DATABASE_NAME
valueFrom:
secretKeyRef:
name: database-creds
key: name
- name: DEIS_DATABASE_SERVICE_HOST
valueFrom:
secretKeyRef:
name: database-creds
key: host
- name: DEIS_DATABASE_SERVICE_PORT
valueFrom:
secretKeyRef:
name: database-creds
key: port
{{- end }}
- name: DEIS_DATABASE_USER
valueFrom:
secretKeyRef:
name: database-creds
key: user
- name: DEIS_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: database-creds
key: password
{{- if (.Values.deis_ignore_scheduling_failure) }}
- name: DEIS_IGNORE_SCHEDULING_FAILURE
value: "{{ .Values.deis_ignore_scheduling_failure }}"
{{- end }}
- name: RESERVED_NAMES
value: "deis, deis-builder, deis-workflow-manager, grafana"
- name: WORKFLOW_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-socket
volumes:
- name: docker-socket
hostPath:
path: /var/run/docker.sock