Skip to content

Commit

Permalink
Merge pull request #40 from whylabs/dev/aberg/gr-cache-endpoint-fix-#…
Browse files Browse the repository at this point in the history
…00000001

fix cache endpoint suffix
  • Loading branch information
AnchorArray authored Dec 10, 2024
2 parents 4cb9a3b + 90e82b1 commit 0d9b239
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions charts/guardrails/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ 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.5.2] - 2024-12-09

### Fixed

- Cache endpoint name now correctly includes the `-nginx` suffix.

## [0.5.1] - 2024-12-09

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion charts/guardrails/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v2
name: guardrails
description: A Helm chart for WhyLabs Guardrails
type: application
version: 0.5.1
version: 0.5.2
appVersion: "2.2.2"
icon: "https://whylabs.ai/_next/static/images/whylabs-favicon-192c009321aebbb96c19921a170fc880.png"
10 changes: 5 additions & 5 deletions charts/guardrails/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# guardrails

![Version: 0.5.1](https://img.shields.io/badge/Version-0.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.2.2](https://img.shields.io/badge/AppVersion-2.2.2-informational?style=flat-square)
![Version: 0.5.2](https://img.shields.io/badge/Version-0.5.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.2.2](https://img.shields.io/badge/AppVersion-2.2.2-informational?style=flat-square)

A Helm chart for WhyLabs Guardrails

Expand Down Expand Up @@ -118,14 +118,14 @@ release_name=""
# the working directory or --destination path
helm pull \
oci://ghcr.io/whylabs/guardrails \
--version 0.5.1
--version 0.5.2

# 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.5.1.tgz
"${release_name}" guardrails-0.5.2.tgz
```

After you've installed the repo you can install the chart.
Expand All @@ -134,7 +134,7 @@ After you've installed the repo you can install the chart.
helm upgrade --install \
--create-namespace \
--namespace "${target_namespace}" \
"${release_name}" guardrails-0.5.1.tgz
"${release_name}" guardrails-0.5.2.tgz
```

## Exposing Guardrails Outside Kubernetes
Expand Down Expand Up @@ -290,7 +290,7 @@ autoscaling:
| cache.labels | object | `{}` | Labels for the cache. |
| cache.replicaCount | int | `1` | Number of replicas for the cache. |
| commonLabels | object | `{}` | Labels to add to all chart resources. |
| env | object | `{"CONFIG_SYNC_INTERVAL":"1","TENANCY_MODE":"{{ .Values.tenancyMode | default \"SINGLE\" }}","WHYLABS_API_CACHE_ENDPOINT":"{{ if .Values.cache.enable }}{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local{{ else }}{{ end }}"}` | [Environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) for the `guardrails` container. **Supports Helm templating syntax**, e.g. you can use `{{ .Release.Name }}` or other templating variables, functions, and conditions within the the value of each environment variable. |
| env | object | `{"CONFIG_SYNC_INTERVAL":"1","TENANCY_MODE":"{{ .Values.tenancyMode | default \"SINGLE\" }}","WHYLABS_API_CACHE_ENDPOINT":"{{ if .Values.cache.enable }}{{ .Release.Name }}-nginx.{{ .Release.Namespace }}.svc.cluster.local{{ else }}{{ end }}"}` | [Environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) for the `guardrails` container. **Supports Helm templating syntax**, e.g. you can use `{{ .Release.Name }}` or other templating variables, functions, and conditions within the the value of each environment variable. |
| 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. |
| envFrom[0].secretRef.name | string | `"whylabs-guardrails-api-key"` | Name of the Kubernetes secret containing the API key. The secret must be in the same namespace as the release and should be created prior to installing the chart. |
| envFrom[1].secretRef.name | string | `"whylabs-guardrails-api-secret"` | Name of the Kubernetes secret containing the container password, the value used when executing requests against the guardrails container. The secret must be in the same namespace as the release and should be created prior to installing the chart. |
Expand Down
2 changes: 1 addition & 1 deletion charts/guardrails/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ commonLabels: {}
# for the `guardrails` container. **Supports Helm templating syntax**, e.g. you can use `{{ .Release.Name }}` or other
# templating variables, functions, and conditions within the the value of each environment variable.
env:
WHYLABS_API_CACHE_ENDPOINT: "{{ if .Values.cache.enable }}{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local{{ else }}{{ end }}"
WHYLABS_API_CACHE_ENDPOINT: "{{ if .Values.cache.enable }}{{ .Release.Name }}-nginx.{{ .Release.Namespace }}.svc.cluster.local{{ else }}{{ end }}"
TENANCY_MODE: "{{ .Values.tenancyMode | default \"SINGLE\" }}"
CONFIG_SYNC_INTERVAL: "1"

Expand Down

0 comments on commit 0d9b239

Please sign in to comment.