[wordpress] pull in great updates from upstream-- be more alike! (#108)

This commit is contained in:
Kent Rancourt 2018-01-18 21:13:26 -05:00 коммит произвёл GitHub
Родитель d5c60a6832
Коммит cf7acc3071
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 89 добавлений и 93 удалений

Просмотреть файл

@ -1 +1,3 @@
.git
# OWNERS file for Kubernetes
OWNERS

Просмотреть файл

@ -1,6 +1,6 @@
name: wordpress
version: 0.7.0
appVersion: 4.8.1
version: 0.8.0
appVersion: 4.9.2
description: Web publishing platform for building blogs and websites.
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
keywords:

Просмотреть файл

@ -1,23 +1,10 @@
# WordPress
[WordPress](https://wordpress.org/) is one of the most versatile open source
content management and publishing platforms on the market for building blogs
and websites.
[WordPress](https://wordpress.org/) is one of the most versatile open source content management systems on the market. A publishing platform for building blogs and websites.
This chart bootstraps a
[WordPress](https://github.com/bitnami/bitnami-docker-wordpress) deployment on
a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh)
package manager.
## TL;DR;
It is inspired by the
[upstream wordpress chart](https://github.com/kubernetes/charts/tree/master/stable/wordpress),
but, by default, utilizes Open Service Broker For Azure to provision an
[Azure Database for MySQL](https://azure.microsoft.com/en-us/services/mysql/)
database for the Wordpress server to use.
# Basic Installation
Installation of this chart is simple. First, ensure that you've [added the
First, ensure that you've [added the
`azure` repository](../README.md#installing-charts). Then, install from the
`azure` repo:
@ -25,24 +12,35 @@ Installation of this chart is simple. First, ensure that you've [added the
$ helm install azure/wordpress
```
# Prerequisites
## Introduction
This chart bootstraps a [WordPress](https://github.com/bitnami/bitnami-docker-wordpress) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
It is inspired by the
[upstream wordpress chart](https://github.com/kubernetes/charts/tree/master/stable/wordpress),
but, by default, utilizes Open Service Broker For Azure to provision an
[Azure Database for MySQL](https://azure.microsoft.com/en-us/services/mysql/)
database for the Wordpress server to use.
## Prerequisites
You will need the following before you can install this chart:
- Kubernetes 1.7+ with RBAC turned on and beta APIs enabled
- [Service Catalog](https://github.com/kubernetes-incubator/service-catalog) installed
- The [Open Service Broker for Azure](https://github.com/Azure/open-service-broker-azure) installed
- Support for persistent volumes in the underlying infrastructure
- PV provisioner support in the underlying infrastructure
Please see the [prerequisities document](../docs/prerequisities/README.md) for
details on how to install everything.
## Installing the Chart
To install the chart with the release name `my-release` in the namespace `wp`:
To install the chart with the release name `my-release`:
```console
$ helm install --name my-release --namespace wp azure/wordpress
$ helm install --name my-release azure/wordpress
```
Note: when installing the wordpress chart on some versions of Minikube, you
@ -56,9 +54,7 @@ $ helm install --name my-release --namespace wp azure/wordpress \
--set persistence.enabled=false
```
The command deploys WordPress on the Kubernetes cluster in the default
configuration. The [configuration](#configuration) section lists the parameters
that can be configured during installation.
The command deploys WordPress on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
> **Tip**: List all releases using `helm list`
@ -72,9 +68,6 @@ $ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
You also may want to use the `--purge` command line flag to delete the release
name from the helm deployments list.
## Configuration
The following tables lists the configurable parameters of the WordPress chart and their default values.
@ -96,11 +89,18 @@ The following tables lists the configurable parameters of the WordPress chart an
| `smtpPassword` | SMTP password | `nil` |
| `smtpUsername` | User name for SMTP emails | `nil` |
| `smtpProtocol` | SMTP protocol [`tls`, `ssl`] | `nil` |
| `mysql.embeddedMaria` | Whether to fulfill the dependency on MySQL using an embedded (on-cluster) MariaDB database _instead of Azure Database for MySQL_. This option is available to enable local or no-cost evaluation of this chart. | `false` |
| `mariadb.enabled` | Deploy MariaDB container(s) | `false` |
| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` |
| `mariadb.mariadbDatabase` | Database name to create | `bitnami_wordpress` |
| `mariadb.mariadbUser` | Database user to create | `bn_wordpress` |
| `mariadb.mariadbPassword` | Password for the database | _random 10 character long alphanumeric string_ |
| `externalDatabase.azure.location` | The Azure region in which to deploy Azure Database for MySQL | `eastus` |
| `externalDatabase.azure.servicePlan` | The plan to request for Azure Database for MySQL | `standard100` |
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
| `healthcheckHttps` | Use https for liveliness and readiness | `false` |
| `healthcheckHttps` | Use https for liveliness and readiness | `false` |
| `ingress.enabled` | Enable ingress controller resource | `false` |
| `ingress.hosts[0].name` | Hostname to your WordPress installation | `wordpress.local` |
| `ingress.hosts[0].path` | Path within the url structure | `/` |
| `ingress.hosts[0].tls` | Utilize TLS backend in ingress | `false` |
| `ingress.hosts[0].tlsSecret` | TLS Secret (certificates) | `wordpress.local-tls-secret` |
| `ingress.hosts[0].annotations` | Annotations for this host's ingress record | `[]` |
@ -113,22 +113,6 @@ The following tables lists the configurable parameters of the WordPress chart an
| `persistence.size` | PVC Storage Request | `10Gi` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
The following configuration options are utilized only if `mysql.embeddedMaria` is set to `false` (the default):
| Parameter | Description | Default |
| ------------------------------- | ------------------------------- | ---------------------------------------------------------- |
| `mysql.azure.location` | The Azure region in which to deploy Azure Database for MySQL | `eastus` |
| `mysql.azure.servicePlan` | The plan to request for Azure Database for MySQL | `standard100` |
The following configuration options are utilized only if `mysql.embeddedMaria` is set to `true`:
| Parameter | Description | Default |
| ------------------------------- | ------------------------------- | ---------------------------------------------------------- |
| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` |
| `mariadb.mariadbDatabase` | Database name to create | `bitnami_wordpress` |
| `mariadb.mariadbUser` | Database user to create | `bn_wordpress` |
| `mariadb.mariadbPassword` | Password for the database | _random 10 character long alphanumeric string_ |
The above parameters map to the env variables defined in [bitnami/wordpress](http://github.com/bitnami/bitnami-docker-wordpress). For more information please refer to the [bitnami/wordpress](http://github.com/bitnami/bitnami-docker-wordpress) image documentation.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

Просмотреть файл

@ -1,6 +1,6 @@
dependencies:
- name: mariadb
repository: https://kubernetes-charts.storage.googleapis.com/
version: 0.7.0
digest: sha256:073dd4c28e65aafb52fdbce9153c8fa63c171ec7a1f49563ae6328230392f3c7
generated: 2017-11-07T10:31:11.129329-05:00
version: 2.1.1
digest: sha256:abb98724b82fbb89b183dbd016f18c207c3bfb4970d5c8770a884af1c5304dbc
generated: 2017-12-13T12:24:01.108769296Z

Просмотреть файл

@ -1,5 +1,7 @@
dependencies:
- name: mariadb
version: 0.7.0
version: 2.1.1
repository: https://kubernetes-charts.storage.googleapis.com/
condition: mysql.embeddedMaria
condition: mariadb.enabled
tags:
- wordpress-database

Просмотреть файл

@ -19,58 +19,59 @@ spec:
image: "{{ .Values.image }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
env:
- name: ALLOW_EMPTY_PASSWORD
{{- if .Values.allowEmptyPassword }}
value: "yes"
{{- else }}
value: "no"
{{- end }}
{{- if .Values.mysql.embeddedMaria }}
{{- if .Values.mariadb.enabled }}
- name: MARIADB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "mariadb.fullname" . }}
key: mariadb-root-password
{{- end }}
- name: MARIADB_HOST
{{- if .Values.mariadb.enabled }}
value: {{ template "mariadb.fullname" . }}
- name: MARIADB_PORT_NUMBER
value: "3306"
- name: WORDPRESS_DATABASE_NAME
value: {{ default "" .Values.mariadb.mariadbDatabase | quote }}
- name: WORDPRESS_DATABASE_USER
value: {{ default "" .Values.mariadb.mariadbUser | quote }}
- name: WORDPRESS_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "mariadb.fullname" . }}
key: mariadb-password
{{- else }}
- name: MARIADB_HOST
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-mysql-secret
key: host
{{- end }}
- name: MARIADB_PORT_NUMBER
{{- if .Values.mariadb.enabled }}
value: "3306"
{{- else }}
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-mysql-secret
key: port
{{- end }}
- name: WORDPRESS_DATABASE_NAME
{{- if .Values.mariadb.enabled }}
value: {{ .Values.mariadb.mariadbDatabase | quote }}
{{- else }}
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-mysql-secret
key: database
{{- end }}
- name: WORDPRESS_DATABASE_USER
{{- if .Values.mariadb.enabled }}
value: {{ .Values.mariadb.mariadbUser | quote }}
{{- else }}
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-mysql-secret
key: username
{{- end }}
- name: WORDPRESS_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.mariadb.enabled }}
name: {{ template "mariadb.fullname" . }}
key: mariadb-password
{{- else }}
name: {{ template "fullname" . }}-mysql-secret
key: password
{{- end }}
{{- end }}
- name: WORDPRESS_USERNAME
value: {{ default "" .Values.wordpressUsername | quote }}
- name: WORDPRESS_PASSWORD
@ -115,9 +116,7 @@ spec:
port: https
scheme: HTTPS
{{- end }}
initialDelaySeconds: 120
timeoutSeconds: 5
failureThreshold: 6
{{ toYaml .Values.livenessProbe | indent 10 }}
readinessProbe:
httpGet:
path: /wp-login.php
@ -127,9 +126,7 @@ spec:
port: https
scheme: HTTPS
{{- end }}
initialDelaySeconds: 30
timeoutSeconds: 3
periodSeconds: 5
{{ toYaml .Values.readinessProbe | indent 10 }}
volumeMounts:
- mountPath: /bitnami/apache
name: wordpress-data

Просмотреть файл

@ -1,4 +1,4 @@
{{- if not .Values.mysql.embeddedMaria }}
{{- if not .Values.mariadb.enabled }}
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceBinding
metadata:

Просмотреть файл

@ -1,4 +1,4 @@
{{- if not .Values.mysql.embeddedMaria }}
{{- if not .Values.mariadb.enabled }}
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
@ -10,9 +10,9 @@ metadata:
heritage: "{{ .Release.Service }}"
spec:
clusterServiceClassExternalName: azure-mysqldb
clusterServicePlanExternalName: {{ .Values.mysql.azure.servicePlan }}
clusterServicePlanExternalName: {{ .Values.externalDatabase.azure.servicePlan }}
parameters:
location: {{ .Values.mysql.azure.location }}
location: {{ .Values.externalDatabase.azure.location }}
resourceGroup: {{ .Release.Namespace }}
sslEnforcement: disabled
firewallStartIPAddress: 0.0.0.0

Просмотреть файл

@ -1,7 +1,7 @@
## Bitnami WordPress image version
## ref: https://hub.docker.com/r/bitnami/wordpress/tags/
##
image: bitnami/wordpress:4.8.3-r0
image: bitnami/wordpress:4.9.2-r0
## Specify a imagePullPolicy
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
@ -39,10 +39,6 @@ wordpressLastName: LastName
##
wordpressBlogName: User's Blog!
## 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-wordpress/#smtp-configuration
##
@ -53,11 +49,8 @@ allowEmptyPassword: yes
# smtpUsername:
# smtpProtocol:
mysql:
## Whether to fulfill the dependency on MySQL using an embedded (on-cluster)
## MariaDB database _instead of Azure Database for MySQL. This option is
## available to enable local or no-cost evaluation of this chart.
embeddedMaria: false
externalDatabase:
## All of these values are only used when mariadb.enabled is set to false
azure:
## The Azure region in which to deploy Azure Database for MySQL
location: eastus
@ -66,10 +59,13 @@ mysql:
##
## MariaDB chart configuration
## ALL OF THE FOLLOWING CONFIGURATION IS APPLICABLE ONLY IF mysql.embeddedMaria
## is set to true
##
mariadb:
## Whether to use the database specified as a requirement or not.
## If you want to use a MariaDB database deployed to Kubernetes instead of
## Azure Database for MySQL, set this to true.
enabled: false
## MariaDB admin password
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
##
@ -114,6 +110,21 @@ serviceType: LoadBalancer
## Allow health checks to be pointed at the https port
healthcheckHttps: false
## Configure extra options for liveness and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
livenessProbe:
initialDelaySeconds: 120
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
readinessProbe:
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
## Configure ingress resource that allow you to access the
## Wordpress instalation. Set up the URL
## ref: http://kubernetes.io/docs/user-guide/ingress/