Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Commit eb1a2a9

Browse files
committed
feat(charts): Add helm charts for controller
1 parent 5f87a24 commit eb1a2a9

6 files changed

Lines changed: 198 additions & 0 deletions

File tree

charts/controller/Chart.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: controller
2+
home: https://github.com/deis/controller
3+
version: <Will be populated by the ci before publishing the chart>
4+
description: Deis Workflow Controller (API).
5+
maintainers:
6+
- name: Deis Team
7+
email: engineering@deis.com
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: deis-controller
5+
labels:
6+
heritage: deis
7+
annotations:
8+
component.deis.io/version: {{ .Values.docker_tag }}
9+
spec:
10+
replicas: 1
11+
strategy:
12+
rollingUpdate:
13+
maxSurge: 1
14+
maxUnavailable: 0
15+
type: RollingUpdate
16+
selector:
17+
matchLabels:
18+
app: deis-controller
19+
template:
20+
metadata:
21+
labels:
22+
app: deis-controller
23+
spec:
24+
serviceAccount: deis-controller
25+
containers:
26+
- name: deis-controller
27+
image: quay.io/{{.Values.org}}/controller:{{.Values.docker_tag}}
28+
imagePullPolicy: {{.Values.pull_policy}}
29+
livenessProbe:
30+
httpGet:
31+
path: /healthz
32+
port: 8000
33+
initialDelaySeconds: 30
34+
timeoutSeconds: 10
35+
readinessProbe:
36+
httpGet:
37+
path: /readiness
38+
port: 8000
39+
initialDelaySeconds: 30
40+
timeoutSeconds: 10
41+
periodSeconds: 5
42+
ports:
43+
- containerPort: 8000
44+
name: http
45+
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
46+
resources:
47+
limits:
48+
{{- if (.Values.limits_cpu) }}
49+
cpu: {{.Values.limits_cpu}}
50+
{{- end}}
51+
{{- if (.Values.limits_memory) }}
52+
memory: {{.Values.limits_memory}}
53+
{{- end}}
54+
{{- end}}
55+
env:
56+
# NOTE(bacongobbler): use deis/registry_proxy to work around Docker --insecure-registry requirements
57+
- name: "DEIS_REGISTRY_SERVICE_HOST"
58+
value: "localhost"
59+
- name: "DEIS_REGISTRY_SERVICE_PORT"
60+
value: "{{ .Values.global.host_port }}"
61+
- name: "APP_STORAGE"
62+
value: "{{ .Values.global.storage}}"
63+
- name: "DEIS_REGISTRY_LOCATION"
64+
value: "{{ .Values.global.registry_location }}"
65+
- name: "DEIS_REGISTRY_SECRET_PREFIX"
66+
value: "{{ .Values.global.secret_prefix }}"
67+
- name: "SLUGRUNNER_IMAGE_NAME"
68+
valueFrom:
69+
configMapKeyRef:
70+
name: slugrunner-config
71+
key: image
72+
- name: "IMAGE_PULL_POLICY"
73+
value: "{{ .Values.app_pull_policy }}"
74+
- name: DEIS_SECRET_KEY
75+
valueFrom:
76+
secretKeyRef:
77+
name: django-secret-key
78+
key: secret-key
79+
- name: DEIS_BUILDER_KEY
80+
valueFrom:
81+
secretKeyRef:
82+
name: builder-key-auth
83+
key: builder-key
84+
{{- if eq .Values.global.database_location "off-cluster" }}
85+
- name: DEIS_DATABASE_NAME
86+
valueFrom:
87+
secretKeyRef:
88+
name: database-creds
89+
key: name
90+
- name: DEIS_DATABASE_SERVICE_HOST
91+
valueFrom:
92+
secretKeyRef:
93+
name: database-creds
94+
key: host
95+
- name: DEIS_DATABASE_SERVICE_PORT
96+
valueFrom:
97+
secretKeyRef:
98+
name: database-creds
99+
key: port
100+
{{- end }}
101+
- name: DEIS_DATABASE_USER
102+
valueFrom:
103+
secretKeyRef:
104+
name: database-creds
105+
key: user
106+
- name: DEIS_DATABASE_PASSWORD
107+
valueFrom:
108+
secretKeyRef:
109+
name: database-creds
110+
key: password
111+
- name: RESERVED_NAMES
112+
value: "deis, deis-builder, deis-workflow-manager, grafana"
113+
volumeMounts:
114+
- mountPath: /var/run/docker.sock
115+
name: docker-socket
116+
volumes:
117+
- name: docker-socket
118+
hostPath:
119+
path: /var/run/docker.sock
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: django-secret-key
5+
labels:
6+
heritage: deis
7+
annotations:
8+
"helm.sh/hook": pre-install
9+
type: Opaque
10+
data:
11+
secret-key: {{ randAscii 64 | b64enc }}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: deis-controller
5+
labels:
6+
heritage: deis
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: deis-controller
5+
labels:
6+
heritage: deis
7+
router.deis.io/routable: "true"
8+
annotations:
9+
router.deis.io/domains: deis
10+
router.deis.io/connectTimeout: "10"
11+
router.deis.io/tcpTimeout: "1200"
12+
spec:
13+
ports:
14+
- name: http
15+
port: 80
16+
targetPort: 8000
17+
selector:
18+
app: deis-controller

charts/controller/values.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
org: "deisci"
2+
pull_policy: "Always"
3+
docker_tag: canary
4+
app_pull_policy: "Always"
5+
# limits_cpu: "100m"
6+
# limits_memory: "50Mi"
7+
8+
global:
9+
# Set the storage backend
10+
#
11+
# Valid values are:
12+
# - s3: Store persistent data in AWS S3 (configure in S3 section)
13+
# - azure: Store persistent data in Azure's object storage
14+
# - gcs: Store persistent data in Google Cloud Storage
15+
# - minio: Store persistent data on in-cluster Minio server
16+
storage: minio
17+
# Set the location of Workflow's PostgreSQL database
18+
#
19+
# Valid values are:
20+
# - on-cluster: Run PostgreSQL within the Kubernetes cluster (credentials are generated
21+
# automatically; backups are sent to object storage
22+
# configured above)
23+
# - off-cluster: Run PostgreSQL outside the Kubernetes cluster (configure in database section)
24+
database_location: "on-cluster"
25+
26+
# Set the location of Workflow's Registry
27+
#
28+
# Valid values are:
29+
# - on-cluster: Run registry within the Kubernetes cluster
30+
# - off-cluster: Use registry outside the Kubernetes cluster (example: dockerhub,quay.io,self-hosted)
31+
# - ecr: Use Amazon's ECR
32+
# - gcr: Use Google's GCR
33+
registry_location: "on-cluster"
34+
# The host port to which registry proxy binds to
35+
host_port: 5555
36+
# Prefix for the imagepull secret created when using private registry
37+
secret_prefix: "private-registry"

0 commit comments

Comments
 (0)