2023-02-15 06:55:36 +05:30
|
|
|
---
|
|
|
|
{{- if .Values.frontend.enabled -}}
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ include "frontend.names.fullname" . }}
|
2023-03-04 05:22:18 +05:30
|
|
|
{{- with (merge (.Values.frontend.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
2023-02-15 06:55:36 +05:30
|
|
|
labels: {{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
2023-03-04 05:22:18 +05:30
|
|
|
{{- with (merge (.Values.frontend.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
|
2023-02-15 06:55:36 +05:30
|
|
|
annotations: {{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
revisionHistoryLimit: {{ .Values.frontend.revisionHistoryLimit }}
|
|
|
|
replicas: {{ .Values.frontend.replicas }}
|
|
|
|
{{- $strategy := default "Recreate" .Values.frontend.strategy }}
|
|
|
|
{{- if and (ne $strategy "Recreate") (ne $strategy "RollingUpdate") }}
|
|
|
|
{{- fail (printf "Not a valid strategy type for Deployment (%s)" $strategy) }}
|
|
|
|
{{- end }}
|
|
|
|
strategy:
|
|
|
|
type: {{ $strategy }}
|
|
|
|
{{- with .Values.frontend.rollingUpdate }}
|
|
|
|
{{- if and (eq $strategy "RollingUpdate") (or .surge .unavailable) }}
|
|
|
|
rollingUpdate:
|
|
|
|
{{- with .unavailable }}
|
|
|
|
maxUnavailable: {{ . }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .surge }}
|
|
|
|
maxSurge: {{ . }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "frontend.labels.selectorLabels" . | nindent 6 }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
{{- with include ("frontend.podAnnotations") . }}
|
|
|
|
annotations:
|
|
|
|
{{- . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
labels:
|
|
|
|
{{- include "frontend.labels.selectorLabels" . | nindent 8 }}
|
|
|
|
{{- with .Values.podLabels }}
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
{{- include "frontend.controller.pod" . | nindent 6 }}
|
|
|
|
{{- end }}
|