|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ template "sampleapp.fullname" . }} |
| 5 | + labels: |
| 6 | + app: {{ template "sampleapp.name" . }} |
| 7 | + chart: {{ template "sampleapp.chart" . }} |
| 8 | + release: {{ .Release.Name }} |
| 9 | + heritage: {{ .Release.Service }} |
| 10 | +spec: |
| 11 | + replicas: {{ .Values.replicaCount }} |
| 12 | + selector: |
| 13 | + matchLabels: |
| 14 | + app: {{ template "sampleapp.name" . }} |
| 15 | + release: {{ .Release.Name }} |
| 16 | + template: |
| 17 | + metadata: |
| 18 | + labels: |
| 19 | + app: {{ template "sampleapp.name" . }} |
| 20 | + release: {{ .Release.Name }} |
| 21 | + spec: |
| 22 | + containers: |
| 23 | + - name: {{ .Chart.Name }} |
| 24 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" |
| 25 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 26 | + ports: |
| 27 | + - name: http |
| 28 | + containerPort: {{ .Values.service.port }} |
| 29 | + protocol: TCP |
| 30 | + livenessProbe: |
| 31 | + httpGet: |
| 32 | + path: / |
| 33 | + port: http |
| 34 | + initialDelaySeconds: 30 |
| 35 | + readinessProbe: |
| 36 | + httpGet: |
| 37 | + path: / |
| 38 | + port: http |
| 39 | + initialDelaySeconds: 30 |
| 40 | + env: |
| 41 | + - name: APPINSIGHTS_INSTRUMENTATIONKEY |
| 42 | + value: {{ .Values.applicationInsights.InstrumentationKey }} |
| 43 | + {{- $root := . }} |
| 44 | + {{- range $ref, $values := .Values.secrets }} |
| 45 | + {{- range $key, $value := $values }} |
| 46 | + - name: {{ $ref | upper }}_{{ $key | upper }} |
| 47 | + valueFrom: |
| 48 | + secretKeyRef: |
| 49 | + name: {{ template "sampleapp.fullname" $root }}-{{ $ref }} |
| 50 | + key: {{ $key }} |
| 51 | + {{- end }} |
| 52 | + {{- end }} |
| 53 | + resources: |
| 54 | +{{ toYaml .Values.resources | indent 12 }} |
| 55 | + {{- if .Values.imagePullSecrets }} |
| 56 | + imagePullSecrets: |
| 57 | + {{- range .Values.imagePullSecrets }} |
| 58 | + - name: {{ . }} |
| 59 | + {{- end}} |
| 60 | + {{- end }} |
| 61 | + {{- with .Values.nodeSelector }} |
| 62 | + nodeSelector: |
| 63 | +{{ toYaml . | indent 8 }} |
| 64 | + {{- end }} |
| 65 | + {{- with .Values.affinity }} |
| 66 | + affinity: |
| 67 | +{{ toYaml . | indent 8 }} |
| 68 | + {{- end }} |
| 69 | + {{- with .Values.tolerations }} |
| 70 | + tolerations: |
| 71 | +{{ toYaml . | indent 8 }} |
| 72 | + {{- end }} |
0 commit comments