diff --git a/stable/wordpress/Chart.yaml b/stable/wordpress/Chart.yaml index a5a010cc7c..6269db98ed 100644 --- a/stable/wordpress/Chart.yaml +++ b/stable/wordpress/Chart.yaml @@ -1,5 +1,5 @@ name: wordpress -version: 3.3.0 +version: 4.0.0 appVersion: 4.9.8 description: Web publishing platform for building blogs and websites. icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png diff --git a/stable/wordpress/README.md b/stable/wordpress/README.md index d9d05c3f81..8f491cb5e1 100644 --- a/stable/wordpress/README.md +++ b/stable/wordpress/README.md @@ -80,10 +80,12 @@ The following table lists the configurable parameters of the WordPress chart and | `externalDatabase.password` | Password for the above username | `nil` | | `externalDatabase.database` | Name of the existing database | `bitnami_wordpress` | | `externalDatabase.port` | Database port number | `3306` | -| `serviceType` | Kubernetes Service type | `LoadBalancer` | -| `serviceExternalTrafficPolicy` | Enable client source IP preservation | `Cluster` | -| `nodePorts.http` | Kubernetes http node port | `""` | -| `nodePorts.https` | Kubernetes https node port | `""` | +| `service.type` | Kubernetes Service type | `LoadBalancer` | +| `service.port` | Service HTTP port | `80` | +| `service.httpsPort` | Service HTTPS port | `443` | +| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | +| `service.nodePorts.http` | Kubernetes http node port | `""` | +| `service.nodePorts.https` | Kubernetes https node port | `""` | | `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` | diff --git a/stable/wordpress/templates/NOTES.txt b/stable/wordpress/templates/NOTES.txt index 9f520118b5..31937e0a52 100644 --- a/stable/wordpress/templates/NOTES.txt +++ b/stable/wordpress/templates/NOTES.txt @@ -8,22 +8,23 @@ {{ if .tls }}https{{ else }}http{{ end }}://{{ .name }}/admin {{- end }} -{{- else if contains "LoadBalancer" .Values.serviceType }} +{{- else if contains "LoadBalancer" .Values.service.type }} 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 "fullname" . }}' +{{- $port:=.Values.service.port | toString }} export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo "WordPress URL: http://$SERVICE_IP/" - echo "WordPress Admin URL: http://$SERVICE_IP/admin" + echo "WordPress URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/" + echo "WordPress Admin URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/admin" -{{- else if contains "ClusterIP" .Values.serviceType }} +{{- else if contains "ClusterIP" .Values.service.type }} echo "WordPress URL: http://127.0.0.1:8080/" echo "WordPress Admin URL: http://127.0.0.1:8080/admin" - kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "fullname" . }} 8080:80 + kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "fullname" . }} 8080:{{ .Values.service.port }} -{{- else if contains "NodePort" .Values.serviceType }} +{{- else if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") diff --git a/stable/wordpress/templates/svc.yaml b/stable/wordpress/templates/svc.yaml index f6c3993130..636f6abf3f 100644 --- a/stable/wordpress/templates/svc.yaml +++ b/stable/wordpress/templates/svc.yaml @@ -8,22 +8,22 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" spec: - type: {{ .Values.serviceType }} - {{- if (or (eq .Values.serviceType "LoadBalancer") (eq .Values.serviceType "NodePort")) }} - externalTrafficPolicy: {{ .Values.serviceExternalTrafficPolicy | quote }} + type: {{ .Values.service.type }} + {{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }} {{- end }} ports: - name: http - port: 80 + port: {{ .Values.service.port }} targetPort: http - {{- if (and (eq .Values.serviceType "NodePort") (not (empty .Values.nodePorts.http)))}} - nodePort: {{ .Values.nodePorts.http }} + {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.http)))}} + nodePort: {{ .Values.service.nodePorts.http }} {{- end }} - name: https - port: 443 + port: {{ .Values.service.httpsPort }} targetPort: https - {{- if (and (eq .Values.serviceType "NodePort") (not (empty .Values.nodePorts.https)))}} - nodePort: {{ .Values.nodePorts.https }} + {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.https)))}} + nodePort: {{ .Values.service.nodePorts.https }} {{- end }} selector: app: {{ template "fullname" . }} diff --git a/stable/wordpress/values-production.yaml b/stable/wordpress/values-production.yaml index c53442aade..13b8436135 100644 --- a/stable/wordpress/values-production.yaml +++ b/stable/wordpress/values-production.yaml @@ -136,23 +136,28 @@ mariadb: ## Kubernetes configuration ## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP ## -serviceType: ClusterIP -## -## serviceType: NodePort -## nodePorts: -## http: -## https: -nodePorts: - http: "" - https: "" -## Enable client source IP preservation -## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip -## -serviceExternalTrafficPolicy: Local +service: + type: ClusterIP + # HTTP Port + port: 80 + # HTTPS Port + httpsPort: 443 + ## + ## nodePorts: + ## http: + ## https: + nodePorts: + http: "" + https: "" + ## Enable client source IP preservation + ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip + ## + externalTrafficPolicy: Local ## 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: diff --git a/stable/wordpress/values.yaml b/stable/wordpress/values.yaml index fdd9070cb2..35293f72fb 100644 --- a/stable/wordpress/values.yaml +++ b/stable/wordpress/values.yaml @@ -140,19 +140,23 @@ mariadb: ## Kubernetes configuration ## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP ## -serviceType: LoadBalancer -## -## serviceType: NodePort -## nodePorts: -## http: -## https: -nodePorts: - http: "" - https: "" -## Enable client source IP preservation -## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip -## -serviceExternalTrafficPolicy: Cluster +service: + type: LoadBalancer + # HTTP Port + port: 80 + # HTTPS Port + httpsPort: 443 + ## + ## nodePorts: + ## http: + ## https: + nodePorts: + http: "" + https: "" + ## Enable client source IP preservation + ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip + ## + externalTrafficPolicy: Cluster ## Allow health checks to be pointed at the https port healthcheckHttps: false