diff --git a/stable/phabricator/Chart.yaml b/stable/phabricator/Chart.yaml index 1c4c96b669..d35f3d2318 100644 --- a/stable/phabricator/Chart.yaml +++ b/stable/phabricator/Chart.yaml @@ -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: diff --git a/stable/phabricator/README.md b/stable/phabricator/README.md index 6b919cc06b..97e6be4cec 100644 --- a/stable/phabricator/README.md +++ b/stable/phabricator/README.md @@ -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 +``` + diff --git a/stable/phabricator/templates/ingress.yaml b/stable/phabricator/templates/ingress.yaml new file mode 100644 index 0000000000..52be48f310 --- /dev/null +++ b/stable/phabricator/templates/ingress.yaml @@ -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 -}} + diff --git a/stable/phabricator/values.yaml b/stable/phabricator/values.yaml index 31856ce926..bd4ccda538 100644 --- a/stable/phabricator/values.yaml +++ b/stable/phabricator/values.yaml @@ -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/ ##