diff --git a/stable/redmine/Chart.yaml b/stable/redmine/Chart.yaml index e286bcc6d9..b2ad6cf061 100644 --- a/stable/redmine/Chart.yaml +++ b/stable/redmine/Chart.yaml @@ -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: diff --git a/stable/redmine/README.md b/stable/redmine/README.md index f58b861d10..30a7efc5a4 100644 --- a/stable/redmine/README.md +++ b/stable/redmine/README.md @@ -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. diff --git a/stable/redmine/templates/_helpers.tpl b/stable/redmine/templates/_helpers.tpl index b3901dbb64..2139bc563e 100644 --- a/stable/redmine/templates/_helpers.tpl +++ b/stable/redmine/templates/_helpers.tpl @@ -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 -}} + diff --git a/stable/redmine/templates/deployment.yaml b/stable/redmine/templates/deployment.yaml index b6506d4443..f1dd15d9ef 100644 --- a/stable/redmine/templates/deployment.yaml +++ b/stable/redmine/templates/deployment.yaml @@ -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 }} diff --git a/stable/redmine/templates/ingress.yaml b/stable/redmine/templates/ingress.yaml index 8b9a2962ff..560a0dbde0 100644 --- a/stable/redmine/templates/ingress.yaml +++ b/stable/redmine/templates/ingress.yaml @@ -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 }} diff --git a/stable/redmine/templates/pdb.yaml b/stable/redmine/templates/pdb.yaml index f545eb4939..2dfea68e47 100644 --- a/stable/redmine/templates/pdb.yaml +++ b/stable/redmine/templates/pdb.yaml @@ -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: diff --git a/stable/redmine/templates/pvc.yaml b/stable/redmine/templates/pvc.yaml index 3fda4c2ecc..2dd5cf0830 100644 --- a/stable/redmine/templates/pvc.yaml +++ b/stable/redmine/templates/pvc.yaml @@ -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: diff --git a/stable/redmine/templates/secrets.yaml b/stable/redmine/templates/secrets.yaml index d2513b6502..4624c9df83 100644 --- a/stable/redmine/templates/secrets.yaml +++ b/stable/redmine/templates/secrets.yaml @@ -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 diff --git a/stable/redmine/templates/svc.yaml b/stable/redmine/templates/svc.yaml index 2725587bad..72cb9f2983 100644 --- a/stable/redmine/templates/svc.yaml +++ b/stable/redmine/templates/svc.yaml @@ -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: diff --git a/stable/redmine/values.yaml b/stable/redmine/values.yaml index 93a5a310c5..4a69cdfb42 100644 --- a/stable/redmine/values.yaml +++ b/stable/redmine/values.yaml @@ -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/