From bb91d10b7f03a7b61975df6cb7d2fe13e6276932 Mon Sep 17 00:00:00 2001 From: Kyle Schouviller Date: Mon, 6 May 2019 13:53:41 -0700 Subject: [PATCH] Add initContainers to ambassador (#13424) * Adding initContainers to ambassador Signed-off-by: kyschouv * Bumping chart version to 2.3.0 Signed-off-by: kyschouv --- stable/ambassador/Chart.yaml | 2 +- stable/ambassador/README.md | 15 ++++++++------- stable/ambassador/templates/deployment.yaml | 7 +++++++ stable/ambassador/values.yaml | 5 +++++ 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/stable/ambassador/Chart.yaml b/stable/ambassador/Chart.yaml index 89e4114c72..19f48542d9 100644 --- a/stable/ambassador/Chart.yaml +++ b/stable/ambassador/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 0.60.3 description: A Helm chart for Datawire Ambassador name: ambassador -version: 2.2.5 +version: 2.3.0 icon: https://www.getambassador.io/images/logo.png home: https://www.getambassador.io/ sources: diff --git a/stable/ambassador/README.md b/stable/ambassador/README.md index 16ee927d32..012467f11e 100755 --- a/stable/ambassador/README.md +++ b/stable/ambassador/README.md @@ -48,7 +48,7 @@ The following tables lists the configurable parameters of the Ambassador chart a | `adminService.nodePort` | If explicit NodePort for admin service is required | `true` | | `adminService.type` | Ambassador's admin service type to be used | `ClusterIP` | | `ambassadorConfig` | Config thats mounted to `/ambassador/ambassador-config` | `""` | -| `daemonSet` | If `true`, Create a daemonSet. By default Deployment controller will be created | `false` | +| `daemonSet` | If `true`, Create a daemonSet. By default Deployment controller will be created | `false` | | `env` | Any additional environment variables for ambassador pods | `{}` | | `image.pullPolicy` | Ambassador image pull policy | `IfNotPresent` | | `image.repository` | Ambassador image | `quay.io/datawire/ambassador` | @@ -57,41 +57,42 @@ The following tables lists the configurable parameters of the Ambassador chart a | `namespace.name` | Set the `AMBASSADOR_NAMESPACE` environment variable | `metadata.namespace` | | `scope.singleNamespace` | Set the `AMBASSADOR_SINGLE_NAMESPACE` environment variable | `false` | | `podAnnotations` | Additional annotations for ambassador pods | `{}` | +| `podLabels` | Additional labels for ambassador pods | | | `prometheusExporter.enabled` | Prometheus exporter side-car enabled | `false` | | `prometheusExporter.pullPolicy` | Image pull policy | `IfNotPresent` | | `prometheusExporter.repository` | Prometheus exporter image | `prom/statsd-exporter` | | `prometheusExporter.tag` | Prometheus exporter image | `v0.8.1` | | `rbac.create` | If `true`, create and use RBAC resources | `true` | -| `rbac.namespaced` | If `true`, permissions are namespace-scoped rather than cluster-scoped | `false` | +| `rbac.namespaced` | If `true`, permissions are namespace-scoped rather than cluster-scoped | `false` | | `replicaCount` | Number of Ambassador replicas | `3` | | `resources` | CPU/memory resource requests/limits | `{}` | | `securityContext` | Set security context for pod | `{ "runAsUser": "8888" }` | +| `initContainers` | Containers used to initialize context for pods | `[]` | | `service.annotations` | Annotations to apply to Ambassador service | See "Annotations" below | | `service.externalTrafficPolicy` | Sets the external traffic policy for the service | `""` | | `service.http.enabled` | if port 80 should be opened for service | `true` | | `service.http.nodePort` | If explicit NodePort is required | None | | `service.http.port` | if port 443 should be opened for service | `true` | -| `service.http.targetPort` | Sets the targetPort that maps to the service's cleartext port | `8080` | +| `service.http.targetPort` | Sets the targetPort that maps to the service's cleartext port | `8080` | | `service.https.enabled` | if port 443 should be opened for service | `true` | | `service.https.nodePort` | If explicit NodePort is required | None | | `service.https.port` | if port 443 should be opened for service | `true` | | `service.https.targetPort` | Sets the targetPort that maps to the service's TLS port | `8443` | | `service.loadBalancerIP` | IP address to assign (if cloud provider supports it) | `""` | -| `service.loadBalancerSourceRanges` | Passed to cloud provider load balancer if created (e.g: AWS ELB) | None | +| `service.loadBalancerSourceRanges` | Passed to cloud provider load balancer if created (e.g: AWS ELB) | None | | `service.type` | Service type to be used | `LoadBalancer` | | `serviceAccount.create` | If `true`, create a new service account | `true` | | `serviceAccount.name` | Service account to be used | `ambassador` | | `volumeMounts` | Volume mounts for the ambassador service | `[]` | | `volumes` | Volumes for the ambassador service | `[]` | -| `pro.enabled` | Installs the Ambassador Pro container as a sidecar to Ambassador | `false` | +| `pro.enabled` | Installs the Ambassador Pro container as a sidecar to Ambassador | `false` | | `pro.image.repository` | Ambassador Pro image | `quay.io/datawire/ambassador_pro` | | `pro.image.tag` | Ambassador Pro image tag | `amb-sidecar-0.4.0` | | `pro.ports.auth` | Ambassador Pro authentication port | `8500` | | `pro.ports.ratelimit` | Ambassador Pro ratelimit port | `8501` | | `pro.ports.ratelimitDebug` | Debug port for Ambassador Pro ratelimit | `8502` | | `pro.licenseKey.value` | License key for Ambassador Pro | "" | -| `pro.licenseKey.secret` | Stores the license key as a base64-encoded string in a Kubernetes secret | `false` | - +| `pro.licenseKey.secret` | Stores the license key as a base64-encoded string in a Kubernetes secret | `false` | **NOTE:** Make sure the configured `service.http.targetPort` and `service.https.targetPort` ports match your [Ambassador Module's](https://www.getambassador.io/reference/modules/#the-ambassador-module) `service_port` and `redirect_cleartext_from` configurations. diff --git a/stable/ambassador/templates/deployment.yaml b/stable/ambassador/templates/deployment.yaml index 4a934ff023..3b93a54168 100644 --- a/stable/ambassador/templates/deployment.yaml +++ b/stable/ambassador/templates/deployment.yaml @@ -24,6 +24,9 @@ spec: labels: app.kubernetes.io/name: {{ include "ambassador.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} + {{- if .Values.podLabels }} + {{- toYaml .Values.podLabels | nindent 8 }} + {{- end }} annotations: checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }} {{- if .Values.podAnnotations }} @@ -55,6 +58,10 @@ spec: {{- with .Values.volumes }} {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} containers: {{- if .Values.prometheusExporter.enabled }} - name: prometheus-exporter diff --git a/stable/ambassador/values.yaml b/stable/ambassador/values.yaml index 37cf3ba81f..fb566d640d 100644 --- a/stable/ambassador/values.yaml +++ b/stable/ambassador/values.yaml @@ -91,10 +91,15 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: +initContainers: [] + volumes: [] volumeMounts: [] +podLabels: + {} + podAnnotations: {} # prometheus.io/scrape: "true"