Change some practice

This commit is contained in:
Marsel Ibraev
2021-09-27 16:59:35 +03:00
parent f44beb51a9
commit f41e7a6611
187 changed files with 33 additions and 72 deletions
+36
View File
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}-{{ .Release.Name }}
labels:
app: {{ .Chart.Name }}-{{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{ if .Values.annotations }}
annotations:
{{ toYaml .Values.annotations | indent 4 }}
{{ end -}}
spec:
replicas: {{ .Values.replicas | default 2 }}
selector:
matchLabels:
app: {{ .Chart.Name }}-{{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Chart.Name }}-{{ .Release.Name }}
spec:
containers:
- name: nginx
image: {{ .Values.image.name }}:{{ .Values.image.tag }}
ports:
- containerPort: {{ .Values.port }}
{{ if .Values.env }}
env:
{{- range $key, $val := .Values.env }}
- name: {{ $key | quote }}
value: {{ $val | quote }}
{{- end }}
{{ end }}
resources:
{{ toYaml .Values.resources | indent 10 -}}