Last active
July 31, 2021 11:21
-
-
Save mmontes11/97eead33fd4c1c4e469827b63740dc8d to your computer and use it in GitHub Desktop.
Operator deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ $fullName := include "echoperator.fullname" . }} | |
{{ $selectorLabels := include "echoperator.selectorLabels" . }} | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: {{ $fullName }} | |
labels: | |
{{ include "echoperator.labels" . | nindent 4 }} | |
spec: | |
{{ if .Values.ha.enabled}} | |
replicas: {{ .Values.ha.replicaCount }} | |
{{ end }} | |
selector: | |
matchLabels: | |
{{ $selectorLabels | nindent 6 }} | |
template: | |
metadata: | |
labels: | |
{{ $selectorLabels | nindent 8 }} | |
spec: | |
serviceAccountName: {{ $fullName }} | |
containers: | |
- name: {{ $fullName }} | |
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | |
imagePullPolicy: {{ .Values.image.pullPolicy }} | |
{{ with .Values.resources }} | |
resources: | |
{{ toYaml . | nindent 12 }} | |
{{ end }} | |
envFrom: | |
- configMapRef: | |
name: {{ $fullName }} | |
{{ with .Values.nodeSelector }} | |
nodeSelector: | |
{{ toYaml . | nindent 8 }} | |
{{ end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment