Implement dynamic envs (#19)
Reviewed-on: https://git.badhouseplants.net/allanger/badhouseplants-net/pulls/19
This commit is contained in:
@ -24,35 +24,73 @@ spec:
|
||||
labels:
|
||||
{{- include "badhouseplants-net.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
initContainers:
|
||||
- name: {{ .Values.rclone.container.name }}
|
||||
image: "{{ .Values.rclone.image.repository}}:{{ .Values.rclone.image.tag}}"
|
||||
imagePullPolicy: {{ .Values.rclone.image.pullPolicy }}
|
||||
env:
|
||||
- name: RCLONE_CONFIG
|
||||
value: /tmp/rclone.conf
|
||||
command:
|
||||
- sh
|
||||
args:
|
||||
- "-c"
|
||||
- "rclone copy -P badhouseplants-public:/badhouseplants-static /static"
|
||||
volumeMounts:
|
||||
- name: rclone-config
|
||||
mountPath: "/tmp"
|
||||
readOnly: true
|
||||
- name: {{ .Values.volumes.rclone.name }}
|
||||
mountPath: /static
|
||||
readOnly: false
|
||||
resources:
|
||||
{{- toYaml .Values.rclone.container.resources | nindent 12 }}
|
||||
- name: {{ .Values.hugo.container.name }}
|
||||
args:
|
||||
- --baseURL
|
||||
- {{ .Values.hugo.baseURL }}
|
||||
{{- if .Values.hugo.buildDrafts }}
|
||||
- --buildDrafts
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: {{ .Values.volumes.rclone.name }}
|
||||
mountPath: /src/static
|
||||
readOnly: true
|
||||
- name: {{ .Values.volumes.public.name }}
|
||||
mountPath: /src/public
|
||||
readOnly: false
|
||||
image: "{{ .Values.hugo.image.repository}}:{{ .Values.hugo.image.tag}}"
|
||||
imagePullPolicy: {{ .Values.hugo.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.hugo.container.resources | nindent 12 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
- name: {{ .Values.nginx.container.name }}
|
||||
image: "{{ .Values.nginx.image.repository}}:{{ .Values.nginx.image.tag}}"
|
||||
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
command:
|
||||
{{ toYaml .Values.command | indent 12 }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- toYaml .Values.nginx.container.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: {{ .Values.volumes.public.name }}
|
||||
mountPath: /var/www
|
||||
readOnly: true
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/conf.d
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: rclone-config
|
||||
secret:
|
||||
secretName: rclone-config
|
||||
- name: {{ .Values.volumes.rclone.name }}
|
||||
emptyDir:
|
||||
sizeLimit: {{ .Values.volumes.rclone.sizeLimit }}
|
||||
- name: {{ .Values.volumes.public.name }}
|
||||
emptyDir:
|
||||
sizeLimit: {{ .Values.volumes.public.sizeLimit }}
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: nginx-config
|
||||
|
||||
|
Reference in New Issue
Block a user