2020-02-04 03:49:18 +05:30
|
|
|
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 }}
|
2020-09-06 08:21:58 +05:30
|
|
|
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.port }}; do echo waiting for database; sleep 2; done;
|
2020-02-04 03:49:18 +05:30
|
|
|
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: /
|
2020-09-06 05:42:21 +05:30
|
|
|
initialDelaySeconds: 15
|
2020-02-04 03:49:18 +05:30
|
|
|
restartPolicy: Always
|