mirror of
https://github.com/helm/charts.git
synced 2026-08-20 04:47:32 +00:00
Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. In https://github.com/helm/charts/pull/17307 the `apiVersion` of the deployment resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. This major version signifies this change. Signed-off-by: Sameer Naik <sameersbn@vmware.com>
167 lines
5.3 KiB
YAML
167 lines
5.3 KiB
YAML
{{- if or .Values.mariadb.enabled .Values.externalDatabase.host -}}
|
|
apiVersion: {{ template "phpbb.deployment.apiVersion" . }}
|
|
kind: Deployment
|
|
metadata:
|
|
name: "{{ template "phpbb.fullname" . }}"
|
|
labels:
|
|
app: "{{ template "phpbb.fullname" . }}"
|
|
chart: "{{ template "phpbb.chart" . }}"
|
|
release: {{ .Release.Name | quote }}
|
|
heritage: {{ .Release.Service | quote }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: "{{ template "phpbb.fullname" . }}"
|
|
release: {{ .Release.Name | quote }}
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: "{{ template "phpbb.fullname" . }}"
|
|
chart: "{{ template "phpbb.chart" . }}"
|
|
release: {{ .Release.Name | quote }}
|
|
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
|
|
annotations:
|
|
{{- if .Values.podAnnotations }}
|
|
{{ toYaml .Values.podAnnotations | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.metrics.podAnnotations }}
|
|
{{ toYaml .Values.metrics.podAnnotations | indent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
spec:
|
|
{{- include "phpbb.imagePullSecrets" . | indent 6 }}
|
|
hostAliases:
|
|
- ip: "127.0.0.1"
|
|
hostnames:
|
|
- "status.localhost"
|
|
containers:
|
|
- name: "{{ template "phpbb.fullname" . }}"
|
|
image: {{ template "phpbb.image" . }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
|
env:
|
|
- name: ALLOW_EMPTY_PASSWORD
|
|
value: {{ .Values.allowEmptyPassword | quote }}
|
|
- name: MARIADB_HOST
|
|
{{- if .Values.mariadb.enabled }}
|
|
value: {{ template "phpbb.mariadb.fullname" . }}
|
|
{{- else }}
|
|
value: {{ .Values.externalDatabase.host | quote }}
|
|
{{- end }}
|
|
- name: MARIADB_PORT_NUMBER
|
|
{{- if .Values.mariadb.enabled }}
|
|
value: "3306"
|
|
{{- else }}
|
|
value: {{ .Values.externalDatabase.port | quote }}
|
|
{{- end }}
|
|
- name: PHPBB_DATABASE_NAME
|
|
{{- if .Values.mariadb.enabled }}
|
|
value: {{ .Values.mariadb.db.name | quote }}
|
|
{{- else }}
|
|
value: {{ .Values.externalDatabase.database | quote }}
|
|
{{- end }}
|
|
- name: PHPBB_DATABASE_USER
|
|
{{- if .Values.mariadb.enabled }}
|
|
value: {{ .Values.mariadb.db.user | quote }}
|
|
{{- else }}
|
|
value: {{ .Values.externalDatabase.user | quote }}
|
|
{{- end }}
|
|
- name: PHPBB_DATABASE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.mariadb.enabled }}
|
|
name: {{ template "phpbb.mariadb.fullname" . }}
|
|
key: mariadb-password
|
|
{{- else }}
|
|
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
|
key: db-password
|
|
{{- end }}
|
|
- name: PHPBB_USERNAME
|
|
value: {{ .Values.phpbbUser | quote }}
|
|
- name: PHPBB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ template "phpbb.fullname" . }}"
|
|
key: phpbb-password
|
|
- name: PHPBB_EMAIL
|
|
value: {{ .Values.phpbbEmail | quote }}
|
|
{{- if .Values.smtpHost }}
|
|
- name: SMTP_HOST
|
|
value: {{ .Values.smtpHost | quote }}
|
|
{{- end }}
|
|
{{- if .Values.smtpPort }}
|
|
- name: SMTP_PORT
|
|
value: {{ .Values.smtpPort | quote }}
|
|
{{- end }}
|
|
{{- if .Values.smtpUser }}
|
|
- name: SMTP_USER
|
|
value: {{ .Values.smtpUser | quote }}
|
|
{{- end }}
|
|
{{- if .Values.smtpPassword }}
|
|
- name: SMTP_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ template "phpbb.fullname" . }}"
|
|
key: smtp-password
|
|
{{- end }}
|
|
{{- if .Values.smtpProtocol }}
|
|
- name: SMTP_PROTOCOL
|
|
value: {{ default "" .Values.smtpProtocol | quote }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
- name: https
|
|
containerPort: 443
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /ucp.php
|
|
port: http
|
|
initialDelaySeconds: 120
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /ucp.php
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 10 }}
|
|
volumeMounts:
|
|
- name: phpbb-data
|
|
mountPath: /bitnami/phpbb
|
|
{{- if .Values.metrics.enabled }}
|
|
- name: metrics
|
|
image: {{ template "phpbb.metrics.image" . }}
|
|
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
|
command: [ '/bin/apache_exporter', '-scrape_uri', 'http://status.localhost:80/server-status/?auto']
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 9117
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /metrics
|
|
port: metrics
|
|
initialDelaySeconds: 15
|
|
timeoutSeconds: 5
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /metrics
|
|
port: metrics
|
|
initialDelaySeconds: 5
|
|
timeoutSeconds: 1
|
|
resources:
|
|
{{ toYaml .Values.metrics.resources | indent 10 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: phpbb-data
|
|
{{- if .Values.persistence.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: "{{ template "phpbb.fullname" . }}-phpbb"
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|