0220dd465f
All checks were successful
generate-chart / generate-chart-publish (push) Successful in 20s
82 lines
2.6 KiB
YAML
82 lines
2.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "homebox.fullname" . }}
|
|
namespace: {{ .Values.namespace }}
|
|
labels:
|
|
{{- include "homebox.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "homebox.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "homebox.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.www.image }}:{{ .Values.www.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.www.pullPolicy }}
|
|
envFrom:
|
|
- configMapRef:
|
|
name: {{ .Release.Name }}-config
|
|
ports:
|
|
- name: http
|
|
containerPort: 7745
|
|
protocol: TCP
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
{{- if .Values.persistence.subPath }}
|
|
subPath: {{ .Values.persistence.subPath }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- if gt (len .Values.extraVolumes) 0 }}
|
|
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
|
{{- end }}
|
|
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
{{- with .Values.persistence.existingClaim }}
|
|
claimName: {{ tpl . $ }}
|
|
{{- end }}
|
|
{{- else if not .Values.persistence.enabled }}
|
|
- name: data
|
|
emptyDir: {}
|
|
{{- else if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "homebox.fullname" . }}-pvc
|
|
{{- 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 }}
|
|
{{- with .Values.dnsConfig }}
|
|
dnsConfig:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }} |