Interlegis Public Rancher Charts for Kubernetes
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.

120 lines
4.6 KiB

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 .Values.wikilegis.enabled }}
- mountPath: /var/labhacker/wikilegis/wikilegis/public/
name: {{ include "edemocracia.fullname" . }}-wikilegis
{{- end }}
{{- if .Values.audiencias.enabled }}
- mountPath: /var/labhacker/audiencias/public/
name: {{ include "edemocracia.fullname" . }}-audiencias
{{- end }}
{{- if .Values.discourse.enabled }}
- mountPath: /var/www/discourse/public/assets/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: assets
- mountPath: /var/www/discourse/public/javascripts/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: javascripts
- mountPath: /var/www/discourse/public/images/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: images
- mountPath: /var/www/discourse/tmp/stylesheet-cache/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: stylesheet-cache
{{- end }}
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-edemocracia
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-edemocracia
{{- if .Values.wikilegis.enabled }}
- name: {{ include "edemocracia.fullname" . }}-wikilegis
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-wikilegis
{{- end }}
{{- if .Values.audiencias.enabled }}
- name: {{ include "edemocracia.fullname" . }}-audiencias
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-audiencias
{{- end }}
{{- if .Values.discourse.enabled }}
- name: {{ include "edemocracia.fullname" . }}-discourse
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-discourse
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}