From a29a995a19fab711fbfcbe3f710258fbc1d7db50 Mon Sep 17 00:00:00 2001 From: Branden Rolston Date: Wed, 6 Nov 2019 01:01:51 -0800 Subject: [PATCH] [stable/karma] Add certSecretNames parameter (#18433) * stable/karma: Add certSecretNames parameter Signed-off-by: Branden Rolston * stable/karma: Bump version Signed-off-by: Branden Rolston * Update karma version to 1.2.0 Co-Authored-By: David J. M. Karlsen Signed-off-by: Branden Rolston --- stable/karma/Chart.yaml | 2 +- stable/karma/README.md | 55 +++++++++++++------------- stable/karma/templates/deployment.yaml | 15 ++++++- stable/karma/values.yaml | 8 ++++ 4 files changed, 50 insertions(+), 30 deletions(-) diff --git a/stable/karma/Chart.yaml b/stable/karma/Chart.yaml index 8539205a14..97b79f746a 100644 --- a/stable/karma/Chart.yaml +++ b/stable/karma/Chart.yaml @@ -6,7 +6,7 @@ home: https://github.com/prymitive/karma sources: - https://hub.docker.com/r/lmierzwa/karma/ - https://github.com/prymitive/karma -version: 1.1.20 +version: 1.2.0 maintainers: - name: davidkarlsen email: david@davidkarlsen.com diff --git a/stable/karma/README.md b/stable/karma/README.md index b975aca9de..7a73d13ea4 100644 --- a/stable/karma/README.md +++ b/stable/karma/README.md @@ -37,33 +37,34 @@ The command removes all the Kubernetes components associated with the chart and The following table lists the configurable parameters of the karma chart and their default values. -| Parameter | Description | Default | -|-------------------------------------|----------------------------------------|-------------------------------------------| -| `replicaCount` | Number of replicas | `1` | -| `image.repository` | The image to run | `lmierzwa/karma` | -| `image.tag` | The image tag to pull | `v0.48` | -| `image.pullPolicy` | Image pull policy | `IfNotPresent` | -| `nameOverride` | Override name of app | `` | -| `fullnameOverride` | Override full name of app | `` | -| `service.type` | Type of Service | `ClusterIP` | -| `service.port` | Port for kubernetes service | `80` | -| `service.annotations` | Annotations to add to the service | `{}` | -| `resources.requests.cpu` | CPU resource requests | | -| `resources.limits.cpu` | CPU resource limits | | -| `resources.requests.memory` | Memory resource requests | | -| `resources.limits.memory` | Memory resource limits | | -| `ingress` | Settings for ingress | `{}` | -| `nodeSelector` | Settings for nodeselector | `{}` | -| `tolerations` | Settings for toleration | `{}` | -| `affinity` | Settings for affinity | `{}` | -| `securityContext` | Settings for security context | `{}` | -| `serviceAccount.create` | Create service-account | `true` | -| `serviceAccount.name` | Override service-account name | `` | -| `livenessProbe.delay` | Specify delay in executing probe | `5` | -| `livenessProbe.period` | Speicy period of liveness probe | `5` | -| `livenessProbe.path` | Specify path liveness probe should hit | `/` | -| `configMap.enabled` | Provide a custom karma configuration | `false` | -| `configMap.rawConfig` | A karma compatible YAML configuration | `` | +| Parameter | Description | Default | +|-------------------------------------|--------------------------------------------------------|-------------------------------------------| +| `replicaCount` | Number of replicas | `1` | +| `image.repository` | The image to run | `lmierzwa/karma` | +| `image.tag` | The image tag to pull | `v0.48` | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `nameOverride` | Override name of app | `` | +| `fullnameOverride` | Override full name of app | `` | +| `service.type` | Type of Service | `ClusterIP` | +| `service.port` | Port for kubernetes service | `80` | +| `service.annotations` | Annotations to add to the service | `{}` | +| `resources.requests.cpu` | CPU resource requests | | +| `resources.limits.cpu` | CPU resource limits | | +| `resources.requests.memory` | Memory resource requests | | +| `resources.limits.memory` | Memory resource limits | | +| `ingress` | Settings for ingress | `{}` | +| `nodeSelector` | Settings for nodeselector | `{}` | +| `tolerations` | Settings for toleration | `{}` | +| `affinity` | Settings for affinity | `{}` | +| `securityContext` | Settings for security context | `{}` | +| `serviceAccount.create` | Create service-account | `true` | +| `serviceAccount.name` | Override service-account name | `` | +| `livenessProbe.delay` | Specify delay in executing probe | `5` | +| `livenessProbe.period` | Speicy period of liveness probe | `5` | +| `livenessProbe.path` | Specify path liveness probe should hit | `/` | +| `configMap.enabled` | Provide a custom karma configuration | `false` | +| `configMap.rawConfig` | A karma compatible YAML configuration | `` | +| `certSecretNames` | Mount Alertmanager certificates to `/etc/certs/` | `[]` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/stable/karma/templates/deployment.yaml b/stable/karma/templates/deployment.yaml index a5aa3e1e7a..e331f3691c 100644 --- a/stable/karma/templates/deployment.yaml +++ b/stable/karma/templates/deployment.yaml @@ -58,11 +58,16 @@ spec: periodSeconds: {{ .Values.livenessProbe.period }} resources: {{ toYaml .Values.resources | indent 12 }} - {{- if .Values.configMap.enabled }} volumeMounts: + {{- if .Values.configMap.enabled }} - name: karma-config mountPath: /etc/karma {{- end }} + {{- range .Values.certSecretNames }} + - name: {{ . }} + mountPath: /etc/certs/{{ . }} + readOnly: true + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} @@ -75,9 +80,15 @@ spec: tolerations: {{ toYaml . | indent 8 }} {{- end }} - {{- if .Values.configMap.enabled }} volumes: + {{- if .Values.configMap.enabled }} - name: karma-config configMap: name: {{ .Release.Name }}-config {{- end }} + {{- range .Values.certSecretNames }} + - name: {{ . }} + secret: + defaultMode: 420 + secretName: {{ . }} + {{- end }} diff --git a/stable/karma/values.yaml b/stable/karma/values.yaml index 9be6225cc4..6d6f6e2ade 100644 --- a/stable/karma/values.yaml +++ b/stable/karma/values.yaml @@ -126,3 +126,11 @@ configMap: # sentry: # private: secret # public: 123456789 + +# Names of secrets that will be mounted to `/etc/certs/` in the karma container. +# These secrets can be used to configure TLS for Karma's Alertmanagers by passing their paths to +# the appropriate Karma configuration parameters. For example, secret `foo` containing a `ca.crt` +# will yield a file at `/etc/certs/foo/ca.crt`. That path can then be provided as the value to +# `configMap.rawConfig.alertmanager.servers[].tls.ca`. +# See . +certSecretNames: []