[stable/redmine] Simplify ingress configuration for cert-manager (#8350)

* Fix typo

Signed-off-by: juan131 <juan@bitnami.com>

* [stable/redmine] Simplify ingress configuration for cert-manager

Signed-off-by: juan131 <juan@bitnami.com>

* Fix typo

Signed-off-by: juan131 <juan@bitnami.com>

* Add 'redmine.chart' macro

Signed-off-by: juan131 <juan@bitnami.com>

* Bump minor version

Signed-off-by: juan131 <juan@bitnami.com>

* Removing references to 'networkPolicyApiVersion'

Signed-off-by: juan131 <juan@bitnami.com>
This commit is contained in:
Juan Ariza Toledano
2018-10-17 01:12:05 -07:00
committed by k8s-ci-robot
parent eb5841e38b
commit 610fc5b3ec
10 changed files with 110 additions and 68 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: redmine
version: 5.1.0
version: 5.2.0
appVersion: 3.4.6
description: A flexible project management web application.
keywords:
+44 -40
View File
@@ -55,46 +55,50 @@ helm install --name my-release stable/redmine --set databaseType.mariadb=false,d
The following table lists the configurable parameters of the Redmine chart and their default values.
| Parameter | Description | Default |
| --------------------------------- | ---------------------------------------- | ------------------------------------------------------- |
| `global.imageRegistry` | Global Docker image registry | `nil` |
| `image.registry` | Redmine image registry | `docker.io` |
| `image.repository` | Redmine image name | `bitnami/redmine` |
| `image.tag` | Redmine image tag | `{VERSION}` |
| `image.pullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
| `image.pullSecrets` | Specify image pull secrets | `nil` |
| `redmineUsername` | User of the application | `user` |
| `redminePassword` | Application password | _random 10 character long alphanumeric string_ |
| `redmineEmail` | Admin email | `user@example.com` |
| `redmineLanguage` | Redmine default data language | `en` |
| `extraVars` | Environment variables, passed to redmine | `nil` |
| `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.rootUser.password` | 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` |
| `podDisruptionBudget.enabled` | Pod Disruption Budget toggle | `false` |
| `podDisruptionBudget.minAvailable`| Minimum available pods | `nil` |
| `podDisruptionBudget.maxUnavailable`| Maximum unavailable pods | `nil` |
| `replicas` | The number of pod replicas (See [Replicas](#replicas)) | `1` |
| `resources` | Resources allocation (Requests and Limits) | `{}` |
| Parameter | Description | Default |
| ----------------------------------- | ------------------------------------------ | ------------------------------------------------------- |
| `global.imageRegistry` | Global Docker image registr y | `nil` |
| `image.registry` | Redmine image registry | `docker.io` |
| `image.repository` | Redmine image name | `bitnami/redmine` |
| `image.tag` | Redmine image tag | `{VERSION}` |
| `image.pullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
| `image.pullSecrets` | Specify image pull secrets | `nil` |
| `redmineUsername` | User of the application | `user` |
| `redminePassword` | Application password | _random 10 character long alphanumeric string_ |
| `redmineEmail` | Admin email | `user@example.com` |
| `redmineLanguage` | Redmine default data language | `en` |
| `extraVars` | Environment variables, passed to redmine | `nil` |
| `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.rootUser.password` | 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.hosts[0].name` | Hostname to your Redmine installation | `redmine.local ` |
| `ingress.hosts[0].path` | Path within the url structure | `/` |
| `ingress.hosts[0].tls` | Utilize TLS backend in ingress | `false` |
| `ingress.hosts[0].certManager` | Add annotations for cert-manager | `false` |
| `ingress.hosts[0].tlsSecret` | TLS Secret (certificates) | `redmine.local-tls-secret` |
| `ingress.hosts[0].annotations` | Annotations for this host's ingress record | `[]` |
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
| `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` |
| `podDisruptionBudget.enabled` | Pod Disruption Budget toggle | `false` |
| `podDisruptionBudget.minAvailable` | Minimum available pods | `nil` |
| `podDisruptionBudget.maxUnavailable`| Maximum unavailable pods | `nil` |
| `replicas` | The number of pod replicas | `1` |
| `resources` | Resources allocation (Requests and Limits) | `{}` |
The above parameters map to the env variables defined in [bitnami/redmine](http://github.com/bitnami/bitnami-docker-redmine). For more information please refer to the [bitnami/redmine](http://github.com/bitnami/bitnami-docker-redmine) image documentation.
+8
View File
@@ -53,3 +53,11 @@ Also, we can't use a single if because lazy evaluation is not an option
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "redmine.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+2 -2
View File
@@ -4,7 +4,7 @@ metadata:
name: {{ template "redmine.fullname" . }}
labels:
app: {{ template "redmine.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
chart: {{ template "redmine.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
@@ -17,7 +17,7 @@ spec:
metadata:
labels:
app: {{ template "redmine.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
chart: {{ template "redmine.chart" . }}
release: "{{ .Release.Name }}"
spec:
{{- if .Values.image.pullSecrets }}
+24 -10
View File
@@ -1,23 +1,37 @@
{{- if .Values.ingress.enabled }}
apiVersion: {{ required "A valid .Values.networkPolicyApiVersion entry required!" .Values.networkPolicyApiVersion }}
{{- range .Values.ingress.hosts }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
{{- if .Values.ingress.annotations }}
name: "{{- printf "%s-%s" .name $.Release.Name | trunc 63 | trimSuffix "-" -}}"
labels:
app: {{ template "redmine.fullname" $ }}
chart: {{ template "redmine.chart" $ }}
release: "{{ $.Release.Name }}"
heritage: "{{ $.Release.Service }}"
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- end }}
name: {{ template "redmine.fullname" . }}
{{- if .certManager }}
kubernetes.io/tls-acme: "true"
{{- end }}
{{- range $key, $value := .annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
- host: {{ .Values.ingress.hostname | quote }}
- host: {{ .name }}
http:
paths:
- path: /
- path: {{ default "/" .path }}
backend:
serviceName: {{ template "redmine.fullname" . }}
serviceName: {{ template "redmine.fullname" $ }}
servicePort: 80
{{- if .Values.ingress.tls }}
{{- if .tls }}
tls:
- hosts:
- {{ .name }}
secretName: {{ .tlsSecret }}
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end }}
---
{{- end }}
{{- end }}
+1 -1
View File
@@ -5,7 +5,7 @@ metadata:
name: {{ template "redmine.fullname" . }}
labels:
app: {{ template "redmine.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
chart: {{ template "redmine.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
+1 -1
View File
@@ -5,7 +5,7 @@ metadata:
name: {{ template "redmine.fullname" . }}
labels:
app: {{ template "redmine.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
chart: {{ template "redmine.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
+1 -1
View File
@@ -4,7 +4,7 @@ metadata:
name: {{ template "redmine.fullname" . }}
labels:
app: {{ template "redmine.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
chart: {{ template "redmine.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
+1 -1
View File
@@ -4,7 +4,7 @@ metadata:
name: {{ template "redmine.fullname" . }}
labels:
app: {{ template "redmine.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
chart: {{ template "redmine.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
+27 -11
View File
@@ -151,20 +151,36 @@ serviceType: LoadBalancer
serviceLoadBalancerSourceRanges:
- 0.0.0.0/0
## Configure the ingress resource that allows you to access the
## Redmine installation. Set up the URL
## ref: http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
## Set to true to enable ingress record generation
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
## The list of hostnames to be covered with this ingress record.
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
hosts:
- name: redmine.local
## Set this to true in order to enable TLS on the ingress record
## A side effect of this will be that the backend wordpress service will be connected at port 443
tls: false
## Set this to true in order to add the corresponding annotations for cert-manager
certManager: false
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
tlsSecret: redmine.local-tls
## Ingress annotations done as key:value pairs
## For a full list of possible ingress annotations, please see
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md
##
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
annotations:
# kubernetes.io/ingress.class: nginx
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/