1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
dragonflydb-dragonfly/contrib/charts/dragonfly/templates/deployment.yaml
Tarun Pothulapati 60d22eba47
fix(charts): Use Release.Namespace everywhere (#884)
This updates all the namespace fields in the Helm chart to use the
`Release.Namespace` template variable. This is the recommended way to
do it in Helm 3, and allows the chart to be installed in a namespace
as set by the user, without having to modify the chart or use
`--namespace` in `kubectl`.
2023-02-28 18:36:20 +05:30

27 lines
867 B
YAML

{{- if not .Values.storage.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "dragonfly.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "dragonfly.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "dragonfly.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
{{- if and (.Values.tls.enabled) (not .Values.tls.existing_secret) }}
checksum/tls-secret: {{ include (print $.Template.BasePath "/tls-secret.yaml") . | sha256sum }}
{{- end }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "dragonfly.selectorLabels" . | nindent 8 }}
spec:
{{- include "dragonfly.pod" . | trim | nindent 6 }}
{{- end }}