{{- if .Values.hegel.deploy }} apiVersion: apps/v1 kind: Deployment metadata: labels: app: {{ .Values.hegel.name }} name: {{ .Values.hegel.name }} namespace: {{ .Values.namespace }} spec: replicas: {{ .Values.hegel.replicas }} selector: matchLabels: app: {{ .Values.hegel.name }} template: metadata: labels: app: {{ .Values.hegel.name }} spec: containers: - args: {{- range .Values.hegel.args }} - {{ . }} {{- end }} env: {{- range $i, $env := .Values.hegel.env }} - name: {{ $env.name | quote }} value: {{ $env.value | quote }} {{- end }} image: {{ .Values.hegel.image }} imagePullPolicy: {{ .Values.hegel.imagePullPolicy }} name: {{ .Values.hegel.name }} {{- if .Values.hegel.port.hostPortEnabled }} ports: - containerPort: {{ .Values.hegel.port.hostPort }} hostPort: {{ .Values.hegel.port.hostPort }} name: http {{- end }} resources: limits: cpu: {{ .Values.hegel.resources.limits.cpu }} memory: {{ .Values.hegel.resources.limits.memory }} requests: cpu: {{ .Values.hegel.resources.requests.cpu }} memory: {{ .Values.hegel.resources.requests.memory }} serviceAccountName: {{ .Values.hegel.name }} {{- end }}