diff --git a/incubator/tomcat/Chart.yaml b/incubator/tomcat/Chart.yaml index 5ac23d539..22bb1f955 100644 --- a/incubator/tomcat/Chart.yaml +++ b/incubator/tomcat/Chart.yaml @@ -1,5 +1,5 @@ name: tomcat -version: 0.4.4 +version: 0.4.5 description: Chart for Apache Tomcat keywords: - tomcat diff --git a/incubator/tomcat/README.md b/incubator/tomcat/README.md index 9e5a490f0..77ff87d04 100644 --- a/incubator/tomcat/README.md +++ b/incubator/tomcat/README.md @@ -43,18 +43,18 @@ The command removes all the Kubernetes components associated with the chart and The following tables lists the configurable parameters of the Tomcat chart and their default values. -| Parameter | Description | Default | -|----------------------------|---------------------------------------|-------------------------------------------| -| `image` | Tomcat image | `bitnami/tomcat:{VERSION}` | -| `imagePullPolicy` | Image pull policy | `IfNotPresent` | -| `tomcatUsername` | Tomcat admin user | `user` | -| `tomcatPassword` | Tomcat admin password | _random 10 character alphanumeric string_ | -| `serviceType` | Kubernetes Service type | `LoadBalancer` | -| `persistence.enabled` | Enable persistence using PVC | `true` | -| `persistence.storageClass` | PVC Storage Class for Tomcat volume | `generic` | -| `persistence.accessMode` | PVC Access Mode for Tomcat volume | `ReadWriteOnce` | -| `persistence.size` | PVC Storage Request for Tomcat volume | `8Gi` | -| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` | +| Parameter | Description | Default | +|----------------------------|---------------------------------------|---------------------------------------------| +| `image` | Tomcat image | `bitnami/tomcat:{VERSION}` | +| `imagePullPolicy` | Image pull policy | `IfNotPresent` | +| `tomcatUsername` | Tomcat admin user | `user` | +| `tomcatPassword` | Tomcat admin password | _random 10 character alphanumeric string_ | +| `serviceType` | Kubernetes Service type | `LoadBalancer` | +| `persistence.enabled` | Enable persistence using PVC | `true` | +| `persistence.storageClass` | PVC Storage Class for Tomcat volume | `nil` (uses alpha storage class annotation) | +| `persistence.accessMode` | PVC Access Mode for Tomcat volume | `ReadWriteOnce` | +| `persistence.size` | PVC Storage Request for Tomcat volume | `8Gi` | +| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` | The above parameters map to the env variables defined in [bitnami/tomcat](http://github.com/bitnami/bitnami-docker-tomcat). For more information please refer to the [bitnami/tomcat](http://github.com/bitnami/bitnami-docker-tomcat) image documentation. diff --git a/incubator/tomcat/templates/NOTES.txt b/incubator/tomcat/templates/NOTES.txt index 01a38bf61..a060426bb 100644 --- a/incubator/tomcat/templates/NOTES.txt +++ b/incubator/tomcat/templates/NOTES.txt @@ -27,4 +27,4 @@ 2. Login with the following credentials echo Username: {{ .Values.tomcatUsername }} - echo Password: $(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.tomcat-password[*]}"`)) + echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.tomcat-password}" | base64 --decode) diff --git a/incubator/tomcat/templates/_helpers.tpl b/incubator/tomcat/templates/_helpers.tpl index 234480de7..f0d83d2ed 100644 --- a/incubator/tomcat/templates/_helpers.tpl +++ b/incubator/tomcat/templates/_helpers.tpl @@ -3,14 +3,14 @@ Expand the name of the chart. */}} {{- define "name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 24 -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Create a default fully qualified app name. -We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "fullname" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 24 -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} {{- end -}} diff --git a/incubator/tomcat/templates/pvc.yaml b/incubator/tomcat/templates/pvc.yaml index 250603780..14c4e2fc0 100644 --- a/incubator/tomcat/templates/pvc.yaml +++ b/incubator/tomcat/templates/pvc.yaml @@ -9,7 +9,11 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" annotations: - volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} + {{- if .Values.persistence.storageClass }} + volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} + {{- else }} + volume.alpha.kubernetes.io/storage-class: default + {{- end }} spec: accessModes: - {{ .Values.persistence.accessMode | quote }} diff --git a/incubator/tomcat/values.yaml b/incubator/tomcat/values.yaml index 355be7c5f..f0455d702 100644 --- a/incubator/tomcat/values.yaml +++ b/incubator/tomcat/values.yaml @@ -1,7 +1,7 @@ ## Bitnami Tomcat image version ## ref: https://hub.docker.com/r/bitnami/tomcat/tags/ ## -image: bitnami/tomcat:9.0.0.M17-r1 +image: bitnami/tomcat:9.0.0.M17-r2 ## Specify a imagePullPolicy ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images @@ -28,7 +28,10 @@ serviceType: LoadBalancer ## persistence: enabled: true - storageClass: generic + ## If defined, volume.beta.kubernetes.io/storage-class: + ## Default: volume.alpha.kubernetes.io/storage-class: default + ## + # storageClass: accessMode: ReadWriteOnce size: 8Gi