2023-02-17 14:19:49 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ include "badhouseplants-net.fullname" . }}
|
|
|
|
labels:
|
|
|
|
{{- include "badhouseplants-net.labels" . | nindent 4 }}
|
|
|
|
{{- with .Values.deployAnnotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
{{- end }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "badhouseplants-net.selectorLabels" . | nindent 6 }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
{{- with .Values.podAnnotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
labels:
|
|
|
|
{{- include "badhouseplants-net.selectorLabels" . | nindent 8 }}
|
|
|
|
spec:
|
2023-02-25 20:25:16 +00:00
|
|
|
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"
|
2023-03-06 20:42:35 +00:00
|
|
|
- {{ .Values.rclone.command }}
|
2023-02-25 20:25:16 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: rclone-config
|
|
|
|
mountPath: "/tmp"
|
|
|
|
readOnly: true
|
|
|
|
- name: {{ .Values.volumes.rclone.name }}
|
2024-02-13 14:33:11 +00:00
|
|
|
mountPath: /assets
|
2023-02-25 20:25:16 +00:00
|
|
|
readOnly: false
|
|
|
|
resources:
|
|
|
|
{{- toYaml .Values.rclone.container.resources | nindent 12 }}
|
|
|
|
- name: {{ .Values.hugo.container.name }}
|
2023-02-26 13:29:29 +00:00
|
|
|
env:
|
2023-02-26 09:06:41 +00:00
|
|
|
{{- range $key, $value := .Values.hugo.env}}
|
2023-02-26 13:29:29 +00:00
|
|
|
- name: {{ $key }}
|
2023-02-26 09:06:41 +00:00
|
|
|
value: {{ $value }}
|
|
|
|
{{- end}}
|
2023-02-25 20:25:16 +00:00
|
|
|
args:
|
|
|
|
- --baseURL
|
|
|
|
- {{ .Values.hugo.baseURL }}
|
|
|
|
{{- if .Values.hugo.buildDrafts }}
|
|
|
|
- --buildDrafts
|
|
|
|
{{- end }}
|
|
|
|
volumeMounts:
|
|
|
|
- name: {{ .Values.volumes.rclone.name }}
|
2024-02-13 14:33:11 +00:00
|
|
|
mountPath: /src/assets
|
|
|
|
readOnly: false
|
2023-02-25 20:25:16 +00:00
|
|
|
- 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 }}
|
2023-02-17 14:19:49 +00:00
|
|
|
containers:
|
2023-02-25 20:25:16 +00:00
|
|
|
- name: {{ .Values.nginx.container.name }}
|
|
|
|
image: "{{ .Values.nginx.image.repository}}:{{ .Values.nginx.image.tag}}"
|
|
|
|
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
|
2023-02-17 14:19:49 +00:00
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
containerPort: {{ .Values.service.port }}
|
|
|
|
protocol: TCP
|
|
|
|
resources:
|
2023-02-25 20:25:16 +00:00
|
|
|
{{- 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:
|
2024-02-13 14:33:11 +00:00
|
|
|
secretName: rclone-config-{{ .Release.Name }}
|
2023-02-25 20:25:16 +00:00
|
|
|
- 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:
|
2024-02-13 14:33:11 +00:00
|
|
|
name: nginx-config-{{ .Release.Name }}
|
2023-02-25 20:25:16 +00:00
|
|
|
|