[stable/phabricator] add ingress and support reverse proxy tls (#3370)

* [stable/phabricator] add ingress and support reverse proxy tls

* updating readme and removing preamble.php volume

* fixing readme

* adding expression to pull pod

* bumping version to fix tests

* adding ingress values to readme

* updated to nil and removed duplicate entry
This commit is contained in:
Sam Merry
2018-02-26 08:15:43 -08:00
committed by k8s-ci-robot
parent 69b5750ddb
commit f616af436b
4 changed files with 71 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: phabricator
version: 0.5.12
version: 0.5.13
appVersion: 2018.7.0
description: Collection of open source web applications that help software companies build better software.
keywords:
+22
View File
@@ -71,6 +71,14 @@ The following tables lists the configurable parameters of the Phabricator chart
| `persistence.phabricator.accessMode` | PVC Access Mode for Phabricator volume | `ReadWriteOnce` |
| `persistence.phabricator.size` | PVC Storage Request for Phabricator volume | `8Gi` |
| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` |
| `ingress.enabled` | enable ingress | `false` |
| `ingress.path` | path to expose on ingress | `nil` |
| `ingress.hosts` | listss of accepted hostnames | `nil` |
| `ingress.annotations` | annotations to use on the ingress | `nil` |
| `ingress.tls.secretName` | tls secret name | `nil` |
| `ingress.tls.hosts` | hostnames the secret applies to | `nil` |
The above parameters map to the env variables defined in [bitnami/phabricator](http://github.com/bitnami/bitnami-docker-phabricator). For more information please refer to the [bitnami/phabricator](http://github.com/bitnami/bitnami-docker-phabricator) image documentation.
@@ -112,3 +120,17 @@ The [Bitnami Phabricator](https://github.com/bitnami/bitnami-docker-phabricator)
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.
## Ingress With Reverse Proxy And Kube Lego
You can define a custom ingress following the example config in values.yaml
`helm install stable/phabricator/ --name my-release --set phabricatorHost=example.com`
Everything looks great but requests over https will cause asset requests to fail. Assuming you want to use HTTPS/TLS you will need to set the base-uri to an https schema.
```
export POD_NAME=$(kubectl get pods -l "app=my-release-phabricator" -o jsonpath="{.items[0].metadata.name}")
kubectl exec $POD_NAME /opt/bitnami/phabricator/bin/config set phabricator.base-uri https://example.com
```
+33
View File
@@ -0,0 +1,33 @@
{{- if .Values.ingress.enabled -}}
{{- $serviceName := include "phabricator.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
labels:
app: {{ template "phabricator.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "phabricator.fullname" . }}
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $serviceName }}
servicePort: 80
{{- end -}}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}
+15
View File
@@ -112,6 +112,21 @@ persistence:
accessMode: ReadWriteOnce
size: 8Gi
ingress:
enabled: false
# path: /
# Used to create an Ingress record.
# hosts:
# - chart-example.local
# annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# tls:
# Secrets must be manually created in the namespace.
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##