You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
112 lines
4.5 KiB
112 lines
4.5 KiB
4 years ago
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: {{ include "edemocracia.fullname" . }}-nginx
|
||
|
labels:
|
||
|
{{- include "edemocracia.labels" . | nindent 4 }}
|
||
|
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
|
||
|
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
|
||
|
strategy:
|
||
|
type: Recreate
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
|
||
|
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
|
||
|
spec:
|
||
|
{{- with .Values.imagePullSecrets }}
|
||
|
imagePullSecrets:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
containers:
|
||
|
- name: {{ .Chart.Name }}-nginx
|
||
|
image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}"
|
||
|
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
|
||
|
ports:
|
||
|
- name: http
|
||
|
containerPort: 80
|
||
|
protocol: TCP
|
||
|
livenessProbe:
|
||
|
failureThreshold: 3
|
||
|
periodSeconds: 10
|
||
|
successThreshold: 1
|
||
|
tcpSocket:
|
||
|
port: http
|
||
|
timeoutSeconds: 1
|
||
|
readinessProbe:
|
||
|
failureThreshold: 3
|
||
|
periodSeconds: 10
|
||
|
successThreshold: 1
|
||
|
tcpSocket:
|
||
|
port: http
|
||
|
timeoutSeconds: 1
|
||
|
resources:
|
||
|
{{- toYaml .Values.nginx.resources | nindent 12 }}
|
||
|
volumeMounts:
|
||
|
- mountPath: /var/labhacker/edemocracia/src/public/
|
||
|
name: {{ include "edemocracia.fullname" . }}-edemocracia
|
||
|
{{- if eq .Values.wikilegis.enabled "True" }}
|
||
|
- mountPath: /var/labhacker/wikilegis/wikilegis/public/
|
||
|
name: {{ include "edemocracia.fullname" . }}-wikilegis
|
||
|
{{- end }}
|
||
|
{{- if eq .Values.audiencias.enabled "True" }}
|
||
|
- mountPath: /var/labhacker/audiencias/public/
|
||
|
name: {{ include "edemocracia.fullname" . }}-audiencias
|
||
|
{{- end }}
|
||
|
{{- if eq .Values.discourse.enabled "True" }}
|
||
|
- mountPath: /var/www/discourse/public/assets/
|
||
|
name: {{ include "edemocracia.fullname" . }}-discourse-assets
|
||
|
- mountPath: /var/www/discourse/public/javascripts/
|
||
|
name: {{ include "edemocracia.fullname" . }}-discourse-js
|
||
|
- mountPath: /var/www/discourse/public/images/
|
||
|
name: {{ include "edemocracia.fullname" . }}-discourse-img
|
||
|
- mountPath: /var/www/discourse/tmp/stylesheet-cache/
|
||
|
name: {{ include "edemocracia.fullname" . }}-discourse-cache
|
||
|
{{- end }}
|
||
|
restartPolicy: Always
|
||
|
serviceAccountName: ""
|
||
|
volumes:
|
||
|
- name: {{ include "edemocracia.fullname" . }}-edemocracia
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "edemocracia.fullname" . }}-edemocracia
|
||
|
{{- if eq .Values.wikilegis.enabled "True" }}
|
||
|
- name: {{ include "edemocracia.fullname" . }}-wikilegis
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "edemocracia.fullname" . }}-wikilegis
|
||
|
{{- end }}
|
||
|
{{- if eq .Values.audiencias.enabled "True" }}
|
||
|
- name: {{ include "edemocracia.fullname" . }}-audiencias
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "edemocracia.fullname" . }}-audiencias
|
||
|
{{- end }}
|
||
|
{{- if eq .Values.discourse.enabled "True" }}
|
||
|
- name: {{ include "edemocracia.fullname" . }}-discourse-assets
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "edemocracia.fullname" . }}-discourse-assets
|
||
|
- name: {{ include "edemocracia.fullname" . }}-discourse-js
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "edemocracia.fullname" . }}-discourse-js
|
||
|
- name: {{ include "edemocracia.fullname" . }}-discourse-img
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "edemocracia.fullname" . }}-discourse-img
|
||
|
- name: {{ include "edemocracia.fullname" . }}-discourse-cache
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "edemocracia.fullname" . }}-discourse-cache
|
||
|
{{- end }}
|
||
|
{{- with .Values.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.affinity }}
|
||
|
affinity:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|