diff options
| author | Perflyst <mail@perflyst.de> | 2020-11-12 17:06:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-12 17:06:38 +0100 |
| commit | bb7d8735cbad7916b354412f965d48d886d2365e (patch) | |
| tree | 4def28c6e8de906565d73b0c337d47b6a416e35a /kubernetes/templates/deployment.yaml | |
| parent | 1fc9506442ae18c7c7f0a684a59714e679678a54 (diff) | |
| parent | 557b0d76abe978cd8044a48f89313ef805954713 (diff) | |
| download | invidious-bb7d8735cbad7916b354412f965d48d886d2365e.tar.gz invidious-bb7d8735cbad7916b354412f965d48d886d2365e.tar.bz2 invidious-bb7d8735cbad7916b354412f965d48d886d2365e.zip | |
Merge branch 'master' into patch-1
Diffstat (limited to 'kubernetes/templates/deployment.yaml')
| -rw-r--r-- | kubernetes/templates/deployment.yaml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/kubernetes/templates/deployment.yaml b/kubernetes/templates/deployment.yaml new file mode 100644 index 00000000..bb0b832f --- /dev/null +++ b/kubernetes/templates/deployment.yaml @@ -0,0 +1,61 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "invidious.fullname" . }} + labels: + app: {{ template "invidious.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: {{ .Release.Name }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "invidious.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "invidious.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: {{ .Release.Name }} + spec: + securityContext: + runAsUser: {{ .Values.securityContext.runAsUser }} + runAsGroup: {{ .Values.securityContext.runAsGroup }} + fsGroup: {{ .Values.securityContext.fsGroup }} + initContainers: + - name: wait-for-postgresql + image: postgres + args: + - /bin/sh + - -c + - until pg_isready -h {{ .Values.config.db.host }} -p {{ .Values.config.db.port }} -U {{ .Values.config.db.user }}; do echo waiting for database; sleep 2; done; + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: 3000 + env: + - name: INVIDIOUS_CONFIG + valueFrom: + configMapKeyRef: + key: INVIDIOUS_CONFIG + name: {{ template "invidious.fullname" . }} + securityContext: + allowPrivilegeEscalation: {{ .Values.securityContext.allowPrivilegeEscalation }} + capabilities: + drop: + - ALL + resources: +{{ toYaml .Values.resources | indent 10 }} + readinessProbe: + httpGet: + port: 3000 + path: / + livenessProbe: + httpGet: + port: 3000 + path: / + initialDelaySeconds: 15 + restartPolicy: Always |
