Created
May 26, 2019 12:50
-
-
Save tomaustin700/c5ae694a0065b2b0732bdf1437c35280 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: {{ template "api.fullname" . }} | |
labels: | |
app: {{ template "api.name" . }} | |
chart: {{ template "api.chart" . }} | |
release: {{ .Release.Name }} | |
heritage: {{ .Release.Service }} | |
spec: | |
replicas: {{ .Values.replicaCount }} | |
selector: | |
matchLabels: | |
app: {{ template "api.name" . }} | |
release: {{ .Release.Name }} | |
template: | |
metadata: | |
labels: | |
app: {{ template "api.name" . }} | |
release: {{ .Release.Name }} | |
spec: | |
containers: | |
- name: {{ .Chart.Name }} | |
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | |
imagePullPolicy: {{ .Values.image.pullPolicy }} | |
ports: | |
- name: http | |
containerPort: {{ .Values.service.port }} | |
protocol: TCP | |
livenessProbe: | |
httpGet: | |
path: /api/values | |
port: http | |
readinessProbe: | |
httpGet: | |
path: /api/values | |
port: http | |
env: | |
- name: APPINSIGHTS_INSTRUMENTATIONKEY | |
value: {{ .Values.applicationInsights.InstrumentationKey }} | |
{{- $root := . }} | |
{{- range $ref, $values := .Values.secrets }} | |
{{- range $key, $value := $values }} | |
- name: {{ $ref | upper }}_{{ $key | upper }} | |
valueFrom: | |
secretKeyRef: | |
name: {{ template "api.fullname" $root }}-{{ $ref }} | |
key: {{ $key }} | |
{{- end }} | |
{{- end }} | |
resources: | |
{{ toYaml .Values.resources | indent 12 }} | |
{{- if .Values.imagePullSecrets }} | |
imagePullSecrets: | |
{{- range .Values.imagePullSecrets }} | |
- name: {{.}} | |
{{- end}} | |
{{- end }} | |
{{- with .Values.nodeSelector }} | |
nodeSelector: | |
{{ toYaml . | indent 8 }} | |
{{- end }} | |
{{- with .Values.affinity }} | |
affinity: | |
{{ toYaml . | indent 8 }} | |
{{- end }} | |
{{- with .Values.tolerations }} | |
tolerations: | |
{{ toYaml . | indent 8 }} | |
{{- end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment