Skip to content

Commit

Permalink
[redmine] add ingress (helm#1336)
Browse files Browse the repository at this point in the history
* [redmine] add ingress

* add ingress for redmine
* simplify (?) options in readme
* upgrade postgres dependency to latest version

* fix warning and version

* add ingress.enabled, hostName to hostname
  • Loading branch information
flah00 authored and prydonius committed Jun 22, 2017
1 parent e8bb6eb commit 9d0c9be
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 30 deletions.
2 changes: 1 addition & 1 deletion stable/redmine/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: redmine
version: 1.0.1
version: 1.1.0
description: A flexible project management web application.
keywords:
- redmine
Expand Down
54 changes: 31 additions & 23 deletions stable/redmine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,36 @@ helm install --name my-release stable/redmine --set databaseType.mariadb=false,d

The following tables lists the configurable parameters of the Redmine chart and their default values.

| Parameter | Description | Default |
| ------------------------------- | ------------------------------- | --------------------------------------------------------- |
| `image` | Redmine image | `bitnami/redmine:{VERSION}` |
| `imagePullPolicy` | Image pull policy | `IfNotPresent` |
| `redmineUsername` | User of the application | `user` |
| `redminePassword` | Application password | _random 10 character long alphanumeric string_ |
| `redmineEmail` | Admin email | `[email protected]` |
| `redmineLanguage` | Redmine default data language | `en` |
| `smtpHost` | SMTP host | `nil` |
| `smtpPort` | SMTP port | `nil` |
| `smtpUser` | SMTP user | `nil` |
| `smtpPassword` | SMTP password | `nil` |
| `smtpTls` | Use TLS encryption with SMTP | `nil` |
| `databaseType.postgresql` | Select postgresql database | `false` |
| `databaseType.mariadb` | Select mariadb database | `true` |
| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` |
| `postgresql.postgresqlPassword` | PostgreSQL admin password | `nil` |
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
| `persistence.enabled` | Enable persistence using PVC | `true` |
| `persistence.existingClaim` | The name of an existing PVC | `nil` |
| `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) |
| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` |
| `persistence.size` | PVC Storage Request | `8Gi` |
| Parameter | Description | Default |
| --------- | ----------- | ------- |
| `image` | Redmine image | `bitnami/redmine:{VERSION}` |
| `imagePullPolicy` | Image pull policy | `IfNotPresent` |
| `redmineUsername` | User of the application | `user` |
| `redminePassword` | Application password | _random 10 character long alphanumeric string_ |
| `redmineEmail` | Admin email | `[email protected]` |
| `redmineLanguage` | Redmine default data language | `en` |
| `smtpHost` | SMTP host | `nil` |
| `smtpPort` | SMTP port | `nil` |
| `smtpUser` | SMTP user | `nil` |
| `smtpPassword` | SMTP password | `nil` |
| `smtpTls` | Use TLS encryption with SMTP | `nil` |
| `databaseType.postgresql` | Select postgresql database | `false` |
| `databaseType.mariadb` | Select mariadb database | `true` |
| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` |
| `postgresql.postgresqlPassword` | PostgreSQL admin password | `nil` |
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
| `serviceLoadBalancerSourceRanges` | An array of load balancer sources | `0.0.0.0/0` |
| `ingress.enabled` | Enable or disable the ingress | `false` |
| `ingress.hostname` | The virtual host name | `redmine.cluster.local` |
| `ingress.annotations` | An array of service annotations | `nil` |
| `ingress.tls[i].secretName | The secret kubernetes.io/tls | `nil` |
| `ingress.tls[i].hosts[j] | The virtual host name | `nil` |
| `networkPolicyApiVersion` | The kubernetes network API version | `extensions/v1beta1` |
| `persistence.enabled` | Enable persistence using PVC | `true` |
| `persistence.existingClaim` | The name of an existing PVC | `nil` |
| `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) |
| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` |
| `persistence.size` | PVC Storage Request | `8Gi` |

The above parameters map to the env variables defined in [bitnami/redmine](https://github.com/bitnami/bitnami-docker-redmine). For more information please refer to the [bitnami/redmine](https://github.com/bitnami/bitnami-docker-redmine) image documentation.

Expand Down Expand Up @@ -117,3 +124,4 @@ The following example includes two PVCs, one for redmine and another for Maria D
```bash
$ helm install --name test --set persistence.existingClaim=PVC_REDMINE,mariadb.persistence.existingClaim=PVC_MARIADB redmine
```

6 changes: 3 additions & 3 deletions stable/redmine/requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ dependencies:
name: postgresql
repository: https://kubernetes-charts.storage.googleapis.com/
tags: null
version: 0.7.0
digest: sha256:fa96513ea021269bf0c60dae013e35e9f433fd6c033fe7b2a0aaba3f3478fab1
generated: 2017-05-22T14:36:45.594988036+01:00
version: 0.7.1
digest: sha256:dee3abb88198c7aacd63b3ea276a56c7c96665cd13f0e299eb883bec04e02f50
generated: 2017-06-21T11:53:59.892629329-04:00
2 changes: 1 addition & 1 deletion stable/redmine/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
repository: https://kubernetes-charts.storage.googleapis.com/
condition: databaseType.mariadb
- name: postgresql
version: 0.7.0
version: 0.7.1
repository: https://kubernetes-charts.storage.googleapis.com/
condition: databaseType.postgresql
6 changes: 5 additions & 1 deletion stable/redmine/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1. Get the Redmine URL by running:
1. Get the Redmine URL:

{{- if contains "NodePort" .Values.serviceType }}

Expand All @@ -14,6 +14,10 @@

export SERVICE_IP=$(kubectl get svc {{ template "fullname" . }} --namespace {{ .Release.Namespace }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP/

{{- else if .Values.ingress.enabled }}
http://{{ .Values.ingress.hostname }}/

{{- else if contains "ClusterIP" .Values.serviceType }}

export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
Expand Down
23 changes: 23 additions & 0 deletions stable/redmine/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if .Values.ingress.enabled }}
apiVersion: {{ required "A valid .Values.networkPolicyApiVersion entry required!" .Values.networkPolicyApiVersion }}
kind: Ingress
metadata:
{{- if .Values.ingress.annotations }}
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- end }}
name: {{ template "fullname" . }}
spec:
rules:
- host: {{ .Values.ingress.hostname | quote }}
http:
paths:
- path: /
backend:
serviceName: {{ template "fullname" . }}
servicePort: 80
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end }}
3 changes: 3 additions & 0 deletions stable/redmine/templates/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ spec:
targetPort: http
selector:
app: {{ template "fullname" . }}
{{if eq .Values.serviceType "LoadBalancer"}}
loadBalancerSourceRanges: {{.Values.serviceLoadBalancerSourceRanges}}
{{end}}
22 changes: 21 additions & 1 deletion stable/redmine/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,29 @@ postgresql:
size: 8Gi

## Kubernetes configuration
## For minikube, set this to NodePort, elsewhere use LoadBalancer
## minikube: NodePort
## ingress: ClusterIP
## elsewhere: LoadBalancer
##
serviceType: LoadBalancer
## Control hosts connecting to "LoadBalancer" only
serviceLoadBalancerSourceRanges:
- 0.0.0.0/0

ingress:
enabled: false
hostname: redmine.cluser.local
annotations:
# kubernetes.io/ingress.class: nginx
# ingress.kubernetes.io/whitelist-source-range: "10.0.0.0/24,172.10.0.1"
tls:
# - secretName: redmine.cluster.local
# hosts:
# - redmine.cluster.local

## For Kubernetes v1.4, v1.5 and v1.6, use 'extensions/v1beta1'
## For Kubernetes v1.7, use 'networking.k8s.io/v1'
networkPolicyApiVersion: extensions/v1beta1

## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
Expand Down

0 comments on commit 9d0c9be

Please sign in to comment.