From c7f1e41753f883f7cf9a2947e730c94924938c75 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Wed, 4 Sep 2019 13:36:49 +0000 Subject: [PATCH] Add affinity to tomcat --- bitnami/tomcat/Chart.yaml | 2 +- bitnami/tomcat/README.md | 15 ++++++++------- bitnami/tomcat/templates/deployment.yaml | 4 ++++ bitnami/tomcat/values.yaml | 5 +++++ 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/bitnami/tomcat/Chart.yaml b/bitnami/tomcat/Chart.yaml index 5f354faca2..27f7897a75 100644 --- a/bitnami/tomcat/Chart.yaml +++ b/bitnami/tomcat/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: tomcat -version: 4.3.4 +version: 4.3.5 appVersion: 9.0.24 description: Chart for Apache Tomcat keywords: diff --git a/bitnami/tomcat/README.md b/bitnami/tomcat/README.md index 405a75aded..4da7244ce1 100644 --- a/bitnami/tomcat/README.md +++ b/bitnami/tomcat/README.md @@ -51,7 +51,7 @@ The following tables lists the configurable parameters of the Tomcat chart and t | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | | `global.imageRegistry` | Global Docker image registry | `nil` | | `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | | `image.registry` | Tomcat image registry | `docker.io` | | `image.repository` | Tomcat Image name | `bitnami/tomcat` | | `image.tag` | Tomcat Image tag | `{TAG_NAME}` | @@ -62,7 +62,7 @@ The following tables lists the configurable parameters of the Tomcat chart and t | `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | | `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | | `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `stretch` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `stretch` | | `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | | `volumePermissions.resources` | Init container resource requests/limit | `nil` | | `tomcatUsername` | Tomcat admin user | `user` | @@ -81,11 +81,12 @@ The following tables lists the configurable parameters of the Tomcat chart and t | `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` | -| `ingress.enabled` | Enable the ingress controller | `false` | -| `ingress.certManager` | Add annotations for certManager | `false` | -| `ingress.annotations` | Annotations to set in the ingress controller | - | -| `ingress.hosts` | List of hostnames to be covered with the ingress | `tomcat.local` | -| `ingress.tls` | List with TLS configuration for the ingress | `hosts: tomcat.local, secretName: tomcat.local-tls` | +| `ingress.enabled` | Enable the ingress controller | `false` | +| `ingress.certManager` | Add annotations for certManager | `false` | +| `ingress.annotations` | Annotations to set in the ingress controller | - | +| `ingress.hosts` | List of hostnames to be covered with the ingress | `tomcat.local` | +| `ingress.tls` | List with TLS configuration for the ingress | `hosts: tomcat.local, secretName: tomcat.local-tls` | +| `affinity` | Map of node/pod affinities | `{}` | 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/bitnami/tomcat/templates/deployment.yaml b/bitnami/tomcat/templates/deployment.yaml index 8102a25a93..7c1799d44b 100644 --- a/bitnami/tomcat/templates/deployment.yaml +++ b/bitnami/tomcat/templates/deployment.yaml @@ -82,3 +82,7 @@ spec: {{- else }} emptyDir: {} {{- end -}} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/bitnami/tomcat/values.yaml b/bitnami/tomcat/values.yaml index 3e1cafc956..79f530d573 100644 --- a/bitnami/tomcat/values.yaml +++ b/bitnami/tomcat/values.yaml @@ -152,3 +152,8 @@ ingress: - hosts: - tomcat.local secretName: tomcat.local-tls + +## Affinity for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} \ No newline at end of file