mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Adds stable/drupal ingress support (#813)
* Add Drupal chart ingress * Bump stable/drupal minor version for new ingress feature * stable/drupal Ingress template * Change NOTES to only print hostname if a hostname is set (ingress can be set without it) * Comment out Values.ingress.hostname by default * Fix indentation * Fix indentation on comments. Note we should clea up the wordpress chart, as this indentation problem came from there initially * Add ingress.annotations to README table * Fix markdown table spacing. Not a bug, but for consistency sake
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
name: drupal
|
||||
version: 0.4.6
|
||||
version: 0.5.0
|
||||
description: One of the most versatile open source content management systems.
|
||||
keywords:
|
||||
- drupal
|
||||
|
||||
@@ -52,6 +52,10 @@ The following tables lists the configurable parameters of the Drupal chart and t
|
||||
| `drupalUsername` | User of the application | `user` |
|
||||
| `drupalPassword` | Application password | _random 10 character long alphanumeric string_ |
|
||||
| `drupalEmail` | Admin email | `user@example.com` |
|
||||
| `ingress.annotations` | Specify ingress class | `kubernetes.io/ingress.class: nginx` |
|
||||
| `ingress.enabled` | Enable ingress controller resource | `false` |
|
||||
| `ingress.hostname` | URL for your Drupal installation | `drupal.local` |
|
||||
| `ingress.tls` | Ingress TLS configuration | `[]` |
|
||||
| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` |
|
||||
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
|
||||
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
*** PLEASE BE PATIENT: Drupal may take a few minutes to install ***
|
||||
*******************************************************************
|
||||
|
||||
1. Get the Drupal URL by running:
|
||||
1. Get the Drupal URL:
|
||||
|
||||
{{- if contains "NodePort" .Values.serviceType }}
|
||||
{{- if .Values.ingress.hostname }}
|
||||
|
||||
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}")
|
||||
echo http://$NODE_IP:$NODE_PORT/
|
||||
You should be able to access your new Drupal installation through
|
||||
|
||||
http://{{- .Values.ingress.hostname }}/
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.serviceType }}
|
||||
|
||||
@@ -25,6 +25,16 @@
|
||||
kubectl port-forward $POD_NAME 8080:80
|
||||
{{- end }}
|
||||
|
||||
{{- if contains "NodePort" .Values.serviceType }}
|
||||
|
||||
Or running:
|
||||
|
||||
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}")
|
||||
echo http://$NODE_IP:$NODE_PORT/
|
||||
|
||||
{{- end }}
|
||||
|
||||
2. Login with the following credentials
|
||||
|
||||
echo Username: {{ .Values.drupalUsername }}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.ingress.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
rules:
|
||||
- host: {{ .Values.ingress.hostname }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: {{ template "fullname" . }}
|
||||
servicePort: 80
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.ingress.tls | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -47,9 +47,32 @@ mariadb:
|
||||
|
||||
## Kubernetes configuration
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer
|
||||
## Use ClusterIP if your setup includes ingress controller
|
||||
##
|
||||
serviceType: LoadBalancer
|
||||
|
||||
## Configure Ingress resource that allow you to access the Drupal installation
|
||||
## Set up the URL
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
##
|
||||
ingress:
|
||||
enabled: false
|
||||
# Used to create Ingress record (should used with ServiceType: ClusterIP).
|
||||
# hostname: drupal.local
|
||||
|
||||
## Ingress annotations
|
||||
##
|
||||
# annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## Ingress TLS configuration
|
||||
## Secrets must be manually created in the namespace
|
||||
##
|
||||
# tls:
|
||||
# - secretName: wordpress.local-tls
|
||||
# hosts:
|
||||
# - drupal.local
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user