apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "cosmo-router.fullname" . }} labels: {{- include "cosmo-router.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "cosmo-router.selectorLabels" . | nindent 6 }} template: metadata: annotations: # Linkerd sidecar injection linkerd.io/inject: enabled # This "checksum" forces a restart if your config files change checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} labels: {{- include "cosmo-router.selectorLabels" . | nindent 8 }} spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: {{- range $key, $val := .Values.env }} - name: {{ $key }} value: {{ $val | quote }} {{- end }} - name: CONFIG_PATH value: "/etc/cosmo/config.yaml" ports: - name: http containerPort: {{ .Values.service.port }} protocol: TCP # Production health checks livenessProbe: httpGet: path: /health port: http readinessProbe: httpGet: path: /health port: http resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: config-volume mountPath: /etc/cosmo volumes: - name: config-volume configMap: name: {{ include "cosmo-router.fullname" . }}-config