diff --git a/charts/guardrails/CHANGELOG.md b/charts/guardrails/CHANGELOG.md index e824256..9105ddc 100644 --- a/charts/guardrails/CHANGELOG.md +++ b/charts/guardrails/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning] (https://semver.org/spec/v2.0.0.html). +## [0.3.1] - 2024-10-31 + +### Fixed + +- Converted `envFrom` to be a list rather than a map. These values typically + need to be overridden rather than extended. + ## [0.3.0] - 2024-10-15 ### Updated diff --git a/charts/guardrails/Chart.yaml b/charts/guardrails/Chart.yaml index e2ed022..c8a2349 100644 --- a/charts/guardrails/Chart.yaml +++ b/charts/guardrails/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: guardrails description: A Helm chart for WhyLabs Guardrails type: application -version: 0.3.0 +version: 0.3.1 appVersion: "2.0.1" diff --git a/charts/guardrails/README.md b/charts/guardrails/README.md index 8e605cd..057c59d 100644 --- a/charts/guardrails/README.md +++ b/charts/guardrails/README.md @@ -1,6 +1,6 @@ # guardrails -![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.1](https://img.shields.io/badge/AppVersion-2.0.1-informational?style=flat-square) +![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.1](https://img.shields.io/badge/AppVersion-2.0.1-informational?style=flat-square) A Helm chart for WhyLabs Guardrails @@ -110,14 +110,14 @@ release_name="" # the working directory or --destination path helm pull \ oci://ghcr.io/whylabs/guardrails \ - --version 0.3.0 + --version 0.3.1 # Requires the helm-diff plugin to be installed: # helm plugin install https://github.com/databus23/helm-diff helm diff upgrade \ --allow-unreleased \ --namespace "${target_namespace}" \ - "${release_name}" guardrails-0.3.0.tgz + "${release_name}" guardrails-0.3.1.tgz ``` After you've installed the repo you can install the chart. @@ -126,7 +126,7 @@ After you've installed the repo you can install the chart. helm upgrade --install \ --create-namespace \ --namespace "${target_namespace}" \ - "${release_name}" guardrails-0.3.0.tgz + "${release_name}" guardrails-0.3.1.tgz ``` ## Exposing Guardrails Outside Kubernetes @@ -198,9 +198,7 @@ utilization. | autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":70}` | [Horizontal Pod Autoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) configuration for the `guardrails` container. | | commonLabels | object | `{}` | Labels to add to all chart resources. | | env | object | `{}` | [Environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) for the `guardrails` container. | -| envFrom | object | `{"whylabs-guardrails-api-key":{"optional":true,"type":"secretRef"},"whylabs-guardrails-api-secret":{"optional":true,"type":"secretRef"}}` | Create environment variables from Kubernetes secrets or config maps. | -| envFrom.whylabs-guardrails-api-key | map | `{"optional":true,"type":"secretRef"}` | Comment out or remove this section if using file-based secrets | -| envFrom.whylabs-guardrails-api-secret | map | `{"optional":true,"type":"secretRef"}` | Comment out or remove this section if using file-based secrets | +| envFrom | list | `[{"secretRef":{"name":"whylabs-guardrails-api-key","optional":true}},{"secretRef":{"name":"whylabs-guardrails-api-secret","optional":true}}]` | Create environment variables from Kubernetes secrets or config maps. | | extraVolumeMounts | list | `[]` | Extra [volume mounts](https://kubernetes.io/docs/concepts/storage/volumes/) for the `guardrails` container. | | extraVolumes | list | `[]` | Extra [volumes](https://kubernetes.io/docs/concepts/storage/volumes/) for the `Pod`. | | fullnameOverride | string | `""` | Override the full name of the chart. | diff --git a/charts/guardrails/templates/deployment.yaml b/charts/guardrails/templates/deployment.yaml index c5d1373..55d65af 100644 --- a/charts/guardrails/templates/deployment.yaml +++ b/charts/guardrails/templates/deployment.yaml @@ -52,11 +52,7 @@ spec: {{- end }} {{- if .Values.envFrom }} envFrom: - {{- range $key, $value := .Values.envFrom }} - - {{ $value.type }}: - name: {{ $key }} - optional: {{ $value.optional | default false }} - {{- end }} + {{- toYaml .Values.envFrom | nindent 12 }} {{- end }} ports: - name: http diff --git a/charts/guardrails/values.yaml b/charts/guardrails/values.yaml index 2494875..a9de091 100644 --- a/charts/guardrails/values.yaml +++ b/charts/guardrails/values.yaml @@ -32,14 +32,12 @@ env: {} # -- Create environment variables from Kubernetes secrets or config maps. envFrom: - # -- (map) Comment out or remove this section if using file-based secrets - whylabs-guardrails-api-key: - type: secretRef - optional: true - # -- (map) Comment out or remove this section if using file-based secrets - whylabs-guardrails-api-secret: - type: secretRef - optional: true + - secretRef: + name: whylabs-guardrails-api-key + optional: true + - secretRef: + name: whylabs-guardrails-api-secret + optional: true serviceAccount: # -- If `true`, create a new `ServiceAccount`.