Commit 85544a50 by Guangbo Chen

added phpBB chart

parent 1d2af462
name: phpbb
version: 2.0.0
appVersion: 3.2.2
description: Community forum that supports the notion of users and groups, file attachments,
full-text search, notifications and more.
keywords:
- phpbb
- forum
- http
- php
home: https://www.phpbb.com/
icon: https://bitnami.com/assets/stacks/phpbb/img/phpbb-stack-220x234.png
sources:
- https://github.com/bitnami/bitnami-docker-phpbb
maintainers:
- name: bitnami-bot
email: containers@bitnami.com
engine: gotpl
approvers:
- prydonius
- tompizmor
- sameersbn
- carrodher
- juan131
reviewers:
- prydonius
- tompizmor
- sameersbn
- carrodher
- juan131
# phpBB
[phpBB](https://www.phpbb.com/) is an Internet forum package written in the PHP scripting language. The name "phpBB" is an abbreviation of PHP Bulletin Board.
## Introduction
This chart bootstraps a [phpBB](https://github.com/bitnami/bitnami-docker-phpbb) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
It also packages the [Bitnami MariaDB chart](https://github.com/kubernetes/charts/tree/master/stable/mariadb) which is required for bootstrapping a MariaDB deployment for the database requirements of the phpBB application.
## Configuration
The following table lists the configurable parameters of the phpBB chart and their default values.
| Parameter | Description | Default |
|-----------------------------------|---------------------------------------|---------------------------------------------------------|
| `image.registry` | phpBB image registry | `docker.io` |
| `image.repository` | phpBB image name | `bitnami/phpbb` |
| `image.tag` | phpBB image tag | `{VERSION}` |
| `image.pullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
| `image.pullSecrets` | Specify image pull secrets | `nil` |
| `phpbbUser` | User of the application | `user` |
| `phpbbPassword` | Application password | _random 10 character long alphanumeric string_ |
| `phpbbEmail` | Admin email | `user@example.com` |
| `allowEmptyPassword` | Allow DB blank passwords | `yes` |
| `smtpHost` | SMTP host | `nil` |
| `smtpPort` | SMTP port | `nil` |
| `smtpUser` | SMTP user | `nil` |
| `smtpPassword` | SMTP password | `nil` |
| `externalDatabase.host` | Host of the external database | `nil` |
| `externalDatabase.user` | Existing username in the external db | `bn_phpbb` |
| `externalDatabase.password` | Password for the above username | `nil` |
| `externalDatabase.database` | Name of the existing database | `bitnami_phpbb` |
| `mariadb.enabled` | Use or not the MariaDB chart | `true` |
| `mariadb.rootUser.password` | MariaDB admin password | `nil` |
| `mariadb.db.name` | Database name to create | `bitnami_phpbb` |
| `mariadb.db.user` | Database user to create | `bn_phpbb` |
| `mariadb.db.password` | Password for the database | _random 10 character long alphanumeric string_ |
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
| `persistence.enabled` | Enable persistence using PVC | `true` |
| `persistence.apache.storageClass` | PVC Storage Class for Apache volume | `nil` (uses alpha storage class annotation) |
| `persistence.apache.accessMode` | PVC Access Mode for Apache volume | `ReadWriteOnce` |
| `persistence.apache.size` | PVC Storage Request for Apache volume | `1Gi` |
| `persistence.phpbb.storageClass` | PVC Storage Class for phpBB volume | `nil` (uses alpha storage class annotation) |
| `persistence.phpbb.accessMode` | PVC Access Mode for phpBB volume | `ReadWriteOnce` |
| `persistence.phpbb.size` | PVC Storage Request for phpBB volume | `8Gi` |
| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` |
The above parameters map to the env variables defined in [bitnami/phpbb](http://github.com/bitnami/bitnami-docker-phpbb). For more information please refer to the [bitnami/phpbb](http://github.com/bitnami/bitnami-docker-phpbb) image documentation.
## Persistence
The [Bitnami phpBB](https://github.com/bitnami/bitnami-docker-phpbb) image stores the phpBB data and configurations at the `/bitnami/phpbb` and `/bitnami/apache` paths of the container.
Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube.
See the [Configuration](#configuration) section to configure the PVC or to disable persistence.
categories:
questions:
- variable: defaultImage
default: true
description: "Use default Docker image"
label: Use Default Image
type: boolean
show_subquestion_if: false
group: "Container Images"
subquestions:
- variable: image.repository
default: "bitnami/phpbb"
description: "phpBB image name"
type: string
label: phpBB Image Name
- variable: image.tag
default: "3.2.2"
description: "phpBB image tag"
type: string
label: Image Tag
- variable: mariadb.image.repository
default: "bitnami/mariadb"
description: "phpBB image name"
type: string
label: phpBB Image Name
- variable: mariadb.image.tag
default: "10.1.32"
description: "phpBB image tag"
type: string
label: Image Tag
- variable: phpbbUser
default: "admin"
description: "Username of the phpBB"
type: string
required: true
label: phpUser Usernname
group: "phpBB Settings"
- variable: phpbbPassword
default: ""
description: "password will be auto-generated if not specified"
type: password
label: phpBB Password
group: "phpBB Settings"
- variable: phpbbEmail
default: "user@example.com"
description: "phpBB email"
type: string
required: true
label: phpBB Admin Email
group: "phpBB Settings"
- variable: serviceType
default: "NodePort"
description: "phpBB Service type"
type: enum
options:
- "ClusterIP"
- "NodePort"
required: true
label: phpBB Service Type
show_subquestion_if: "NodePort"
group: "phpBB Settings"
- variable: mariadb.enabled
default: true
description: "Deploy a database server as part of this deployment, or set to false and configure an external database connection."
type: boolean
required: true
label: Install MariaDB
show_subquestion_if: true
group: "Database Settings"
- variable: externalDatabase.host
default: ""
description: "Host of the external database"
type: string
label: External Database Host
show_if: "mariadb.enabled=false"
group: "Database Settings"
- variable: externalDatabase.user
default: "bn_phpbb"
description: "Existing username in the external DB"
type: string
label: External Database username
show_if: "mariadb.enabled=false"
group: "Database Settings"
- variable: externalDatabase.password
default: ""
description: "External database password"
type: password
label: External Database password
show_if: "mariadb.enabled=false"
group: "Database Settings"
- variable: externalDatabase.database
default: "bitnami_phpbb"
description: "Name of the existing database"
type: string
label: External Database
show_if: "mariadb.enabled=false"
group: "Database Settings"
- variable: externalDatabase.port
default: "3306"
description: "External database port number"
type: string
label: External Database Port
show_if: "mariadb.enabled=false"
group: "Database Settings"
- variable: mariadb.persistence.enabled
show_if: "mariadb.enabled=true"
default: false
description: "Enable persistent volume for MariaDB"
type: boolean
required: true
label: MariaDB Persistent Volume Enabled
show_if: "mariadb.enabled=true"
show_subquestion_if: true
group: "Database Settings"
subquestions:
- variable: mariadb.persistence.size
default: "10Gi"
description: "MariaDB Persistent Volume Size"
type: string
label: MariaDB Volume Size
- variable: mariadb.persistence.storageClass
default: ""
description: "If undefined or null, uses the default StorageClass. Default to null"
type: storageclass
label: Default StorageClass for MariaDB
- variable: persistence.enabled
default: "false"
description: "Enable persistent volume for phpBB & Apache"
type: boolean
required: true
label: phpBB Persistent Volume Enabled
show_subquestion_if: true
group: "phpBB Persistent Storage"
subquestions:
- variable: persistence.apache.size
default: "2Gi"
description: "Apache Persistent Volume Size"
type: string
label: Apache Volume Size
- variable: persistence.apache.storageClass
default: ""
description: "If undefined or null, uses the default StorageClass. Default to null"
type: storageclass
label: Default StorageClass for Apache
- variable: persistence.phpbb.size
default: "8Gi"
description: "phpBB Persistent Volume Size"
type: string
label: phpBB Volume Size
- variable: persistence.phpbb.storageClass
default: ""
description: "If undefined or null, uses the default StorageClass. Default to null"
type: storageclass
label: Default StorageClass for phpBB
dependencies:
- name: mariadb
repository: http://127.0.0.1:8879/charts
version: 3.0.3
digest: sha256:0b8784cdf7faa8ab3b615f1a29a2a098052dfc19c833cf9696a94969f3675d45
generated: 2018-07-10T15:25:51.627345194+08:00
dependencies:
- name: mariadb
version: 3.0.3
repository: http://127.0.0.1:8879/charts #run ($ helm serve .) for local http helm server
condition: mariadb.enabled
{{- if or .Values.mariadb.enabled .Values.externalDatabase.host -}}
1. Get the phpBB URL by running:
{{- if contains "NodePort" .Values.serviceType }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "phpbb.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/
{{- else if contains "LoadBalancer" .Values.serviceType }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "phpbb.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "phpbb.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP/
{{- else if contains "ClusterIP" .Values.serviceType }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "phpbb.fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
echo http://127.0.0.1:8080/
kubectl port-forward $POD_NAME 8080:80
{{- end }}
2. Get your phpBB login credentials by running:
echo Username: {{ .Values.phpbbUser }}
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "phpbb.fullname" . }} -o jsonpath="{.data.phpbb-password}" | base64 --decode)
{{- else -}}
########################################################################################
### ERROR: You did not provide an external database host in your 'helm install' call ###
########################################################################################
This deployment will be incomplete until you configure phpBB with a resolvable database
host. To configure phpBB to use and external database host:
1. Complete your phpBB deployment by running:
helm upgrade {{ .Release.Name }} --set serviceType={{ .Values.serviceType }},mariadb.enabled=false,externalDatabase.host=YOUR_EXTERNAL_DATABASE_HOST stable/phpbb
{{- end }}
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "phpbb.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "phpbb.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "phpbb.mariadb.fullname" -}}
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- if .Values.persistence.enabled -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "phpbb.fullname" . }}-apache
labels:
app: {{ template "phpbb.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
accessModes:
- {{ .Values.persistence.apache.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.apache.size | quote }}
{{- if .Values.persistence.apache.storageClass }}
{{- if (eq "-" .Values.persistence.apache.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.apache.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}
{{- if or .Values.mariadb.enabled .Values.externalDatabase.host -}}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "phpbb.fullname" . }}
labels:
app: {{ template "phpbb.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
replicas: 1
template:
metadata:
labels:
app: {{ template "phpbb.fullname" . }}
spec:
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . }}
{{- end}}
{{- end }}
containers:
- name: {{ template "phpbb.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
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.mariadbDatabase | quote }}
{{- else }}
value: {{ .Values.externalDatabase.database | quote }}
{{- end }}
- name: PHPBB_DATABASE_USER
{{- if .Values.mariadb.enabled }}
value: {{ .Values.mariadb.mariadbUser | 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 }}
- name: SMTP_HOST
value: {{ .Values.smtpHost | quote }}
- name: SMTP_PORT
value: {{ .Values.smtpPort | quote }}
- name: SMTP_USER
value: {{ .Values.smtpUser | quote }}
- name: SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "phpbb.fullname" . }}
key: smtp-password
- name: SMTP_PROTOCOL
value: {{ default "" .Values.smtpProtocol | quote }}
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
- name: apache-data
mountPath: /bitnami/apache
volumes:
- name: phpbb-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "phpbb.fullname" . }}-phpbb
{{- else }}
emptyDir: {}
{{- end }}
- name: apache-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "phpbb.fullname" . }}-apache
{{- else }}
emptyDir: {}
{{- end }}
{{- end }}
{{- if not .Values.mariadb.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
labels:
app: {{ printf "%s-%s" .Release.Name "externaldb" }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
db-password: {{ default "" .Values.externalDatabase.password | b64enc | quote }}
{{- end }}
{{- if .Values.persistence.enabled -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "phpbb.fullname" . }}-phpbb
labels:
app: {{ template "phpbb.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
accessModes:
- {{ .Values.persistence.phpbb.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.phpbb.size | quote }}
{{- if .Values.persistence.phpbb.storageClass }}
{{- if (eq "-" .Values.persistence.phpbb.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.phpbb.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "phpbb.fullname" . }}
labels:
app: {{ template "phpbb.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
{{ if .Values.phpbbPassword }}
phpbb-password: {{ .Values.phpbbPassword | b64enc | quote }}
{{ else }}
phpbb-password: {{ randAlphaNum 10 | b64enc | quote }}
{{ end }}
smtp-password: {{ default "" .Values.smtpPassword | b64enc | quote }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "phpbb.fullname" . }}
labels:
app: {{ template "phpbb.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
type: {{ .Values.serviceType }}
ports:
- name: http
port: 80
targetPort: http
- name: https
port: 443
targetPort: https
selector:
app: {{ template "phpbb.fullname" . }}
## Bitnami phpBB image version
## ref: https://hub.docker.com/r/bitnami/phpbb/tags/
##
image:
repository: bitnami/phpbb
tag: 3.2.2
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
##
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
# pullSecrets:
# - myRegistrKeySecretName
## User of the application
## ref: https://github.com/bitnami/bitnami-docker-phpbb#environment-variables
##
phpbbUser: user
## Application password
## Defaults to a random 10-character alphanumeric string if not set
## ref: https://github.com/bitnami/bitnami-docker-phpbb#environment-variables
##
# phpbbPassword:
## Admin email
## ref: https://github.com/bitnami/bitnami-docker-phpbb#environment-variables
##
phpbbEmail: user@example.com
## Set to `yes` to allow the container to be started with blank passwords
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
allowEmptyPassword: "yes"
## SMTP mail delivery configuration
## ref: https://github.com/bitnami/bitnami-docker-phpbb#smtp-configuration
##
# smtpHost:
# smtpPort:
# smtpUser:
# smtpPassword:
##
## External database configuration
##
externalDatabase:
## Database host
host:
## Database host
port: 3306
## Database user
user: bn_phpbb
## Database password
password:
## Database name
database: bitnami_phpbb
## Kubernetes configuration
## For minikube, set this to NodePort, elsewhere use LoadBalancer
##
serviceType: LoadBalancer
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
enabled: true
apache:
## apache data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
accessMode: ReadWriteOnce
size: 1Gi
phpbb:
## phpbb data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
accessMode: ReadWriteOnce
size: 8Gi
## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
requests:
memory: 512Mi
cpu: 300m
##
## MariaDB chart configuration
##
mariadb:
## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters
enabled: true
image:
# registry: docker.io
repository: bitnami/mariadb
tag: 10.1.32
## Use password authentication
usePassword: true
## Specify password for root user
## Defaults to a random 10-character alphanumeric string if not set and usePassword is true
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
##
mariadbRootPassword:
## Create a database user
## Password defaults to a random 10-character alphanumeric string if not set and usePassword is true
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
##
mariadbUser: phpbb
mariadbPassword:
## Create a database
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-on-first-run
##
mariadbDatabase: bitnami_phpbb
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
enabled: true
## A manually managed Persistent Volume and Claim
## Requires persistence.enabled: true
## If defined, PVC must be created manually before volume will be bound
# existingClaim:
## mariadb data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
storageClass: ""
accessMode: ReadWriteOnce
size: 8Gi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment