Files
charts/bitnami/phpbb/templates/deployment.yaml
Ibone González Mauraza de3806f6bd [bitnami/chart] Change in the command of apache-exporter (#2289)
* Change in the command of apache-exporter

* [bitnami/mediawiki] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/opencart] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/moodle] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/phpbb] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/phabricator] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/phpmyadmin] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/osclass] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/prestashop] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/testlink] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/suitecrm] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/owncloud] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/orangehrm] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Bitnami Containers <containers@bitnami.com>
2020-04-13 08:26:45 +02:00

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 }}