deployment.yaml 1.86 KB
Newer Older
Dominik Hebeler's avatar
Dominik Hebeler committed
1
{{- if not .Values.application.initializeCommand -}}
2
apiVersion: {{ default "extensions/v1beta1" .Values.deploymentApiVersion }}
Dominik Hebeler's avatar
Dominik Hebeler committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16
kind: Deployment
metadata:
  name: {{ template "trackableappname" . }}
  annotations:
    {{ if .Values.gitlab.app }}app.gitlab.com/app: {{ .Values.gitlab.app | quote }}{{ end }}
    {{ if .Values.gitlab.env }}app.gitlab.com/env: {{ .Values.gitlab.env | quote }}{{ end }}
  labels:
    app: {{ template "appname" . }}
    track: "{{ .Values.application.track }}"
    tier: "{{ .Values.application.tier }}"
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
17 18 19 20 21 22 23 24
{{- if or .Values.enableSelector (eq (default "extensions/v1beta1" .Values.deploymentApiVersion) "apps/v1") }}
  selector:
    matchLabels:
      app: {{ template "appname" . }}
      track: "{{ .Values.application.track }}"
      tier: "{{ .Values.application.tier }}"
      release: {{ .Release.Name }}
{{- end }}
Dominik Hebeler's avatar
Dominik Hebeler committed
25
  replicas: {{ .Values.replicaCount }}
26 27 28 29
{{- if .Values.strategyType }}
  strategy:
    type: {{ .Values.strategyType | quote }}
{{- end }}
Dominik Hebeler's avatar
Dominik Hebeler committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
  template:
    metadata:
      annotations:
        checksum/application-secrets: "{{ .Values.application.secretChecksum }}"
        {{ if .Values.gitlab.app }}app.gitlab.com/app: {{ .Values.gitlab.app | quote }}{{ end }}
        {{ if .Values.gitlab.env }}app.gitlab.com/env: {{ .Values.gitlab.env | quote }}{{ end }}
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
      labels:
        app: {{ template "appname" . }}
        track: "{{ .Values.application.track }}"
        tier: "{{ .Values.application.tier }}"
        release: {{ .Release.Name }}
    spec:
      imagePullSecrets:
{{ toYaml .Values.image.secrets | indent 10 }}
      containers:
Dominik Hebeler's avatar
Dominik Hebeler committed
48
      - {{ include "mg-templates.php-fpm.yaml" | indent 8}}
Dominik Hebeler's avatar
Dominik Hebeler committed
49
{{- end -}}