4 name: {{ include "apache.fullname" . }}
5 labels: {{- include "apache.labels" . | nindent 4 }}
8 matchLabels: {{- include "apache.matchLabels" . | nindent 6 }}
9 replicas: {{ .Values.replicaCount }}
12 labels: {{- include "apache.labels" . | nindent 8 }}
13 {{- if or .Values.podAnnotations (and .Values.metrics.enabled .Values.metrics.podAnnotations) }}
15 {{- if .Values.podAnnotations }}
16 {{- include "apache.tplValue" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
18 {{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }}
19 {{- include "apache.tplValue" (dict "value" .Values.metrics.podAnnotations "context" $) | nindent 8 }}
23 {{- include "apache.imagePullSecrets" . | nindent 6 }}
28 {{- if .Values.affinity }}
29 affinity: {{- include "apache.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
32 podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
33 podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
34 nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
36 {{- if .Values.nodeSelector }}
37 nodeSelector: {{- include "apache.tplValue" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
39 {{- if .Values.tolerations }}
40 tolerations: {{- include "apache.tplValue" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
42 {{- if .Values.cloneHtdocsFromGit.enabled }}
44 - name: git-clone-repository
45 image: {{ include "git.image" . }}
46 imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
51 git clone {{ .Values.cloneHtdocsFromGit.repository }} --branch {{ .Values.cloneHtdocsFromGit.branch }} /app
52 resources: {{- toYaml .Values.cloneHtdocsFromGit.resources | nindent 12 }}
57 - name: git-repo-syncer
58 image: {{ include "git.image" . }}
59 imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
65 cd /app && git pull origin {{ .Values.cloneHtdocsFromGit.branch }}
66 sleep {{ .Values.cloneHtdocsFromGit.interval }}
68 resources: {{- toYaml .Values.cloneHtdocsFromGit.resources | nindent 12 }}
76 image: {{ include "apache.image" . }}
77 imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
80 value: {{ ternary "true" "false" .Values.image.debug | quote }}
81 {{- if .Values.extraEnvVars }}
82 {{- include "apache.tplValue" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
89 {{- if .Values.livenessProbe.enabled }}
92 path: {{ .Values.livenessProbe.path }}
94 initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
95 periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
96 timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
97 successThreshold: {{ .Values.livenessProbe.successThreshold }}
98 failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
100 {{- if .Values.readinessProbe.enabled }}
103 path: {{ .Values.readinessProbe.path }}
105 initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
106 periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
107 timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
108 successThreshold: {{ .Values.readinessProbe.successThreshold }}
109 failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
111 {{- if .Values.resources }}
112 resources: {{- toYaml .Values.resources | nindent 12 }}
115 {{- if (include "apache.useHtdocs" .) }}
119 {{- if or (.Files.Glob "files/vhosts/*.conf") (.Values.vhostsConfigMap) }}
123 {{- if or (.Files.Glob "files/httpd.conf") (.Values.httpdConfConfigMap) }}
125 mountPath: /opt/bitnami/apache/conf/httpd.conf
128 {{- if .Values.extraVolumeMounts }}
129 {{- include "common.tplvalues.render" ( dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
131 {{- if .Values.metrics.enabled }}
133 image: {{ template "apache.metrics.image" . }}
134 imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
135 command: ['/bin/apache_exporter', '--scrape_uri', 'http://status.localhost:8080/server-status/?auto']
143 initialDelaySeconds: 15
149 initialDelaySeconds: 5
151 {{- if .Values.metrics.resources }}
152 resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
156 {{- if (include "apache.useHtdocs" .) }}
158 {{- include "apache.htdocsVolume" . | nindent 10 }}
160 {{- if or (.Files.Glob "files/vhosts/*.conf") (.Values.vhostsConfigMap) }}
163 name: {{ include "apache.vhostsConfigMap" . }}
165 {{- if or (.Files.Glob "files/httpd.conf") (.Values.httpdConfConfigMap) }}
168 name: {{ include "apache.httpdConfConfigMap" . }}
170 {{- if .Values.extraVolumes }}
171 {{- include "common.tplvalues.render" ( dict "value" .Values.extraVolumes "context" $) | nindent 8 }}