mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 03:27:08 +00:00
83 lines
2.5 KiB
YAML
83 lines
2.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ .Chart.Name }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
annotations:
|
|
version-source: {{ index .Chart.Annotations "version-source" }}
|
|
version-pattern: {{ index .Chart.Annotations "version-pattern" | quote }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ .Release.Name }}
|
|
spec:
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
{{- with .Values.args }}
|
|
args:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
ports:
|
|
- containerPort: {{ .Values.port }}
|
|
name: http
|
|
protocol: TCP
|
|
{{- if or .Values.env .Values.secretEnvKeys }}
|
|
env:
|
|
{{- range $key, $value := .Values.env }}
|
|
- name: {{ $key }}
|
|
value: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- range .Values.secretEnvKeys }}
|
|
- name: {{ .envName }}
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ $.Values.existingSecret }}
|
|
key: {{ .secretKey }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.existingSecret }}
|
|
envFrom:
|
|
- secretRef:
|
|
name: {{ .Values.existingSecret }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
{{- if or .Values.config .Values.existingConfigMap }}
|
|
- name: config
|
|
mountPath: /etc/ntfy
|
|
readOnly: true
|
|
{{- end }}
|
|
- name: cache
|
|
mountPath: /var/cache/ntfy
|
|
volumes:
|
|
{{- if or .Values.config .Values.existingConfigMap }}
|
|
- name: config
|
|
configMap:
|
|
name: {{ include "ntfy.configMapName" . }}
|
|
{{- end }}
|
|
- name: cache
|
|
emptyDir: {}
|