diff --git a/Chart.yaml b/Chart.yaml index 5778010c0a997191ebf0f24d92d76dcc0cbd9f90..87e8892c2b83dfd37998312d707487bfdc3b3683 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,8 +1,9 @@ +--- apiVersion: v1 -appVersion: "5.2.3" +appVersion: "5.4.1" description: WordPress with a replicated MariaDB backend name: wordpress # Please only change the chart version as part of the release procedure: see # RELEASING.md -version: 0.1.0 +version: 0.1.2 icon: https://make.wordpress.org/design/files/2016/09/WordPress-logotype-wmark.png diff --git a/RELEASING.md b/RELEASING.md index 84382326a05d821d6dcb9556681b6b4c8007660e..46da487b9481d07ae7f22d22f81a93a0c090c0ec 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -4,9 +4,9 @@ When releasing a new version of the wordpress-helm chart, please remember to do the following: * change the chart version in `Chart.yaml`; * change the default `image.tag` and `initImage.tag` in `values.yaml` to the new - version (e.g., "0.1.0"); -* create a git tag for the new version (e.g., "0.1.0") and push it to Gitlab + version (e.g., "0.1.2"); +* create a git tag for the new version (e.g., "0.1.2") and push it to Gitlab (any branch will do); the CI will create and push docker images tagged by that same version string. (You can push all git tags using `git push --tags`, or this specific one using - `git push origin 0.1.0`.) + `git push origin 0.1.2`.) diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index 3976adf5be557c4bed082d349cc21d6f5e9af3b4..02ff7ff2114e02d73910f743408f24e65b13987c 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -68,11 +68,29 @@ spec: containerPort: 80 - name: https containerPort: 443 - # livenessProbe: - # httpGet: - # path: /wp-login.php - # port: http - # timeoutSeconds: 2 + {{- if .Values.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: {{ .Values.wordpress.site.probe_path }} + port: http + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: {{ .Values.wordpress.site.probe_path }} + port: http + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + {{- end }} + env: - name: WORDPRESS_DB_HOST value: {{ .Release.Name }}-database diff --git a/values-local.yaml.example b/values-local.yaml.example index 924aac2396eb61948723c5c4620aa8d7f9db0278..897587a08c4686ed1de813a16697cc292026f48a 100644 --- a/values-local.yaml.example +++ b/values-local.yaml.example @@ -42,6 +42,10 @@ wordpress: alt_enabled: false # alt_config: PATH-SETTING-IN-OPTIONS-TABLE # alt_path: SOME-LOGIN-PATH + # # Path used by the liveness and readiness probes to see if the site runs + # # correctly. Defaults to `/wp-login.php`. Be sure to make this the same as + # # alt_path if you use it! + # probe_path: /wp-login.php wp_content: # The directory to mount the files placed in wp-content. You shouldn't have to # change this. diff --git a/values.yaml b/values.yaml index c1fd126e5181a6aa967b77a0fb58712efc8a8829..85cf9ccbb17e8b2b7b57d94ca9625efb048a808e 100644 --- a/values.yaml +++ b/values.yaml @@ -1,3 +1,4 @@ +--- git_repo: enabled: false name: /my/repo @@ -81,20 +82,24 @@ wordpress: multilingual: enabled: false plugins: [] - config: [] + config: [] # NOTE: Use a theme *slug* here theme: twentytwenty theme_fallback: twentytwenty # NOTE: Make sure you use underscore and that the localisation is in full caps locale: en_US - version: 5.2.3 + version: 5.4.1 url: "http://localhost" title: "Wordpress Helm" - ## If including a plugin to alias wp login then set an alt_path and set the alt_config - # NOTE: A value for alt_enabled must be set. Select either true or false - alt_enabled: false + # If including a plugin to alias wp login then set an alt_path and set the + # alt_config + alt_enabled: false # alt_config: PATH-SETTING-IN-OPTIONS-TABLE # alt_path: SOME-LOGIN-PATH + # Path used by the liveness and readiness probes to see if the site runs + # correctly. + probe_path: /wp-login.php + wp_content: ## The directory to mount the files placed in wp-content. You shouldn't have to ## change this. @@ -167,12 +172,12 @@ wpSalts: {} image: repository: docker.greenhost.net/open/wordpress-helm/wordpress - tag: 0.1.0 + tag: 0.1.1 pullPolicy: Always initImage: repository: docker.greenhost.net/open/wordpress-helm/wordpress-cli-ansible - tag: 0.1.0 + tag: 0.1.1 pullPolicy: Always imagePullSecretName: greenhost-registry-pull @@ -189,6 +194,9 @@ nodeSelector: {} tolerations: [] affinity: {} + +podAnnotations: {} + database: db: user: wordpress @@ -333,3 +341,22 @@ ansibleSecrets: | SECURE_AUTH_SALT: {{ .Values.wpSalts.SECURE_AUTH_SALT | default ( randAlphaNum 32) }} WP_CACHE_KEY_SALT: {{ .Values.wpSalts.WP_CACHE_KEY_SALT | default ( randAlphaNum 32) }} WP_CRON_CONTROL_SECRET: {{ .Values.wpSalts.WP_CRON_CONTROL_SECRET | default ( randAlphaNum 32 ) }} + +## Liveness and readiness probe values +## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes +## +livenessProbe: + enabled: true + initialDelaySeconds: 60 + periodSeconds: 15 + timeoutSeconds: 5 + failureThreshold: 3 + successThreshold: 1 + +readinessProbe: + enabled: true + initialDelaySeconds: 10 + periodSeconds: 15 + timeoutSeconds: 5 + failureThreshold: 3 + successThreshold: 1 diff --git a/wp-cli-docker/Dockerfile b/wp-cli-docker/Dockerfile index 3d136ee7ff56284c4d9a490b66c097dff3c92a30..f8e6c7355837e9fd64cdf0485162f4a926f06a76 100644 --- a/wp-cli-docker/Dockerfile +++ b/wp-cli-docker/Dockerfile @@ -1,4 +1,4 @@ -FROM wordpress:cli-2.1.0-php7.3 +FROM wordpress:cli-2.4-php7.3 USER root