mirror of
https://github.com/kerberos-io/helm-charts.git
synced 2026-11-17 22:20:24 +00:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bc4a5c881 | ||
|
|
eca5780c0d | ||
|
|
73861943fb | ||
|
|
38c623f76b | ||
|
|
8b07a747ee | ||
|
|
033ab6ec16 | ||
|
|
9a5a5e2287 | ||
|
|
8c329bb67c | ||
|
|
549dbf707b |
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.186.0
|
||||
version: 0.192.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
+43
-3
@@ -58,7 +58,7 @@ legacy opt-out, TLS/configuration mounts and deployment modes.
|
||||
### Hardened frontend images
|
||||
|
||||
Starting with chart **`0.170.0`**, both frontends default to shell-free
|
||||
`ghcr.io/uug-ai/hub-frontend:v1.19.35`, running as `65532:65532` on port `8080`
|
||||
`ghcr.io/uug-ai/hub-frontend:v1.19.42`, running as `65532:65532` on port `8080`
|
||||
with a read-only root filesystem and writable `/tmp`. The Service and ingress
|
||||
remain on port `80`. Admin retains its legacy image and port `80`; its hardened
|
||||
runtime remains opt-in.
|
||||
@@ -508,6 +508,37 @@ in `all` and `ui` modes. The chart does not change the API image tag.
|
||||
|
||||
Validate rendering with `bash scripts/check-hub-mcp.sh` from the repository root.
|
||||
|
||||
### Ask
|
||||
|
||||
Ask lets signed-in users type a question about their recordings on the
|
||||
dashboard. An Azure OpenAI deployment answers it by calling the MCP recording
|
||||
and device tools with the user's own grants; `/mcp` itself does not need to be
|
||||
enabled. Deploy compatible Hub API and frontend images, then set:
|
||||
|
||||
```yaml
|
||||
kerberoshub:
|
||||
api:
|
||||
ask:
|
||||
enabled: true
|
||||
azureOpenAI:
|
||||
endpoint: https://my-resource.openai.azure.com
|
||||
apiKey: <key>
|
||||
deployment: <deployment>
|
||||
reasoningEffort: low
|
||||
frontend:
|
||||
features:
|
||||
ask:
|
||||
enabled: "true"
|
||||
```
|
||||
|
||||
The deployment must support function calling and structured output. Rendering
|
||||
fails when Ask is enabled without an endpoint, key or deployment. Each question
|
||||
uses up to six model turns; the API limits each user to six questions a minute.
|
||||
Both settings default to off; the API setting applies only to Hub API pods in
|
||||
`all` and `ui` modes.
|
||||
|
||||
Validate rendering with `bash scripts/check-hub-ask.sh` from the repository root.
|
||||
|
||||
### Passkeys
|
||||
|
||||
Users and sub-users can create and manage their own passkeys in **Profile >
|
||||
@@ -862,7 +893,7 @@ kerberospipeline:
|
||||
| `kerberoshub.serviceAccount.labels` | Labels applied to `kerberoshub.serviceAccount` resources. | `""` |
|
||||
| `kerberoshub.api.repository` | The Docker registry where the Kerberos Hub API container is hosted. | `"ghcr.io/uug-ai/hub-api"` |
|
||||
| `kerberoshub.api.pullPolicy` | The Docker registry pull policy. | `"IfNotPresent"` |
|
||||
| `kerberoshub.api.tag` | The Docker image tag/version. | `"v1.11.42"` |
|
||||
| `kerberoshub.api.tag` | The Docker image tag/version. | `"v1.11.43"` |
|
||||
| `kerberoshub.api.replicas` | The number of pods/replicas running for the Kerberos Hub API deployment. | `2` |
|
||||
| `kerberoshub.api.audit.enabled` | Enable audit publishing from Hub API when global auditing is enabled. | `true` |
|
||||
| `kerberoshub.api.logLevel` | Log verbosity level for `kerberoshub.api`. | `"info"` |
|
||||
@@ -870,12 +901,19 @@ kerberospipeline:
|
||||
| `kerberoshub.api.session.accessTokenTimeout` | Lifetime of one access token (Go duration). The frontend renews it silently while the session is valid. | `"15m"` |
|
||||
| `kerberoshub.api.session.idleTimeout` | A session that is not used for this long ends (lifetime of the refresh token). | `"12h"` |
|
||||
| `kerberoshub.api.session.maxLifetime` | Hard session limit counted from login; refreshing never extends a session past it. | `"24h"` |
|
||||
| `kerberoshub.api.session.inactivityTimeout` | Without user interaction for this long, the frontend asks "Are you still there?" and signs the user out after 60 seconds. `"0"` turns the prompt off. Needs hub-api with session claims and a matching frontend. | `"15m"` |
|
||||
| `kerberoshub.api.schema` | The protocol to serve the Kerberos Hub API, `'http'` or `'https'`. | `"https"` |
|
||||
| `kerberoshub.api.url` | The Kerberos Hub API ingress to access the API. | `"api.yourdomain.com"` |
|
||||
| `kerberoshub.api.corsAllowedOrigins` | Additional complete HTTP(S) origins allowed to call the Hub API. Configured frontend origins remain allowed automatically. | `[]` |
|
||||
| `kerberoshub.api.mcp.enabled` | Expose the read-only `/mcp` endpoint; sets `MCP_ENABLED`. Requires a compatible Hub API image. | `false` |
|
||||
| `kerberoshub.api.mcp.allowedOrigins` | Exact HTTP(S) origins for browser MCP clients, joined into `MCP_ALLOWED_ORIGINS`. Independent of REST CORS; no wildcards or trailing slash. | `[]` |
|
||||
| `kerberoshub.api.ask.enabled` | Expose `POST /ask` for dashboard questions about recordings; sets `ASK_ENABLED`. Requires a compatible Hub API image. | `false` |
|
||||
| `kerberoshub.api.ask.azureOpenAI.endpoint` | Azure OpenAI resource URL; sets `ASK_AZURE_OPENAI_ENDPOINT`. Required when Ask is enabled. | `""` |
|
||||
| `kerberoshub.api.ask.azureOpenAI.apiKey` | Azure OpenAI API key; sets `ASK_AZURE_OPENAI_API_KEY`. Required when Ask is enabled. | `""` |
|
||||
| `kerberoshub.api.ask.azureOpenAI.deployment` | Deployment name; the model must support function calling and structured output. Sets `ASK_AZURE_OPENAI_DEPLOYMENT`. Required when Ask is enabled. | `""` |
|
||||
| `kerberoshub.api.ask.azureOpenAI.reasoningEffort` | Optional `minimal`, `low`, `medium` or `high`; empty for models without reasoning. Sets `ASK_AZURE_OPENAI_REASONING_EFFORT`. | `""` |
|
||||
| `kerberoshub.api.disableAgentHeartbeat` | Temporarily stop serving the polled `GET /devices` list (hub-api returns `204` without database reads). Devices still load once through `/session/bootstrap`; online/offline status stops refreshing. | `false` |
|
||||
| `kerberoshub.api.rbacOrganisations.enabled` | Every new organisation starts in rbac mode (sets `RBAC_ORGANISATIONS_ENABLED` on hub-api): organisations created with `POST /organisations` and the home organisation of every new account. It starts with every built-in role and its creator as Owner; its members and roles are managed on the Members & access pages only, and the legacy Accounts page cannot add people there. Existing organisations and accounts keep their mode. | `false` |
|
||||
| `kerberoshub.api.mediaProxy.enabled` | Serve media through hub-api (`/media/proxy`) instead of handing out Vault/storage URLs, hiding the storage endpoint from clients. | `false` |
|
||||
| `kerberoshub.api.mediaProxy.publicUrl` | Public hub-api base URL used in proxied media URLs. Defaults to `{schema}://{url}`. | `""` |
|
||||
| `kerberoshub.api.mediaProxy.key` | Key used to encrypt proxied media URLs (`openssl rand -hex 32`). Defaults to a key derived from `jwtSecret`. | `""` |
|
||||
@@ -923,7 +961,7 @@ kerberospipeline:
|
||||
| `kerberoshub.api.sso.extraHeaders.value` | Header value for each configured SSO extra header entry. | `""` |
|
||||
| `kerberoshub.frontend.repository` | The Docker registry where the Kerberos Hub frontend is hosted. | `"ghcr.io/uug-ai/hub-frontend"` |
|
||||
| `kerberoshub.frontend.pullPolicy` | The Docker registry pull policy. | `"IfNotPresent"` |
|
||||
| `kerberoshub.frontend.tag` | The Docker image tag/version. | `"v1.19.35"` |
|
||||
| `kerberoshub.frontend.tag` | The Docker image tag/version. | `"v1.19.42"` |
|
||||
| `kerberoshub.frontend.replicas` | The number of pods/replicas running for the Kerberos Hub frontend deployment. | `2` |
|
||||
| `kerberoshub.frontend.logLevel` | Log verbosity level for `kerberoshub.frontend`. | `"info"` |
|
||||
| `kerberoshub.frontend.schema` | The protocol to serve the Kerberos Hub frontend, `'http'` or `'https'`. | `"https"` |
|
||||
@@ -960,6 +998,7 @@ kerberospipeline:
|
||||
| `kerberoshub.frontend.features.case.enabled` | Enable or disable the case feature in the frontend. | `"true"` |
|
||||
| `kerberoshub.frontend.features.darkModeEnabled` | Enable or disable dark mode in the frontend. | `"true"` |
|
||||
| `kerberoshub.frontend.features.splashScreen.enabled` | Enable or disable the pre-bootstrap splash screen and reveal delay. | `"true"` |
|
||||
| `kerberoshub.frontend.features.inspection.enabled` | Show the [inspect](https://github.com/uug-ai/inspect) bug-report launcher (and Alt+Shift+I): screenshot or record part of Hub, annotate it and file it as a GitHub issue via `https://inspect.uug.ai`. Needs hub-frontend with inspect support, and the Hub URL on the inspect server's origin allowlist. Sets `ALLOW_INSPECTION`. | `"false"` |
|
||||
| `kerberoshub.frontend.features.landingPage` | Frontend landing page configuration. | `"/dashboard"` |
|
||||
| `kerberoshub.frontend.features.i18n.enabled` | Enable or disable the runtime language switcher in the front-end. When `"false"`, `defaultLanguage` is forced and users cannot change it. | `"true"` |
|
||||
| `kerberoshub.frontend.features.i18n.defaultLanguage` | Default language code used by the front-end (e.g. `en`, `nl`, `pl`, `tr`, `fr`, `sv`, `de`). | `"en"` |
|
||||
@@ -1022,6 +1061,7 @@ kerberospipeline:
|
||||
| `kerberoshub.frontend.features.media.filter.events.enabled` | Enable or disable `kerberoshub.frontend.features.media.filter.events`. | `"true"` |
|
||||
| `kerberoshub.frontend.features.media.filter.tags.enabled` | Enable or disable `kerberoshub.frontend.features.media.filter.tags`. | `"true"` |
|
||||
| `kerberoshub.frontend.features.media.filter.defaultView` | Default view for the media page: `timeline` or `grid`. | `"timeline"` |
|
||||
| `kerberoshub.frontend.features.ask.enabled` | Show the dashboard Ask block; sets `FEATURE_ASK_ENABLED`. Needs `kerberoshub.api.ask.enabled`. | `"false"` |
|
||||
| `kerberoshub.frontend.features.floorplan.enabled` | Enable or disable `kerberoshub.frontend.features.floorplan`. | `"true"` |
|
||||
| `kerberoshub.frontend.features.floorplan.colorDeviceActive` | Color customization for `floorplan` in the frontend. | `"hsla(131, 31%, 52%, 1)"` |
|
||||
| `kerberoshub.frontend.features.floorplan.colorDeviceInactive` | Color customization for `floorplan` in the frontend. | `"hsla(0, 3%, 41%, 1)"` |
|
||||
|
||||
@@ -309,6 +309,8 @@ spec:
|
||||
value: {{ .Values.kerberoshub.api.session.idleTimeout | quote }}
|
||||
- name: SESSION_MAX_LIFETIME
|
||||
value: {{ .Values.kerberoshub.api.session.maxLifetime | quote }}
|
||||
- name: SESSION_INACTIVITY_TIMEOUT
|
||||
value: {{ .Values.kerberoshub.api.session.inactivityTimeout | quote }}
|
||||
- name: REFRESH_COOKIE_SECURE
|
||||
value: {{ eq .Values.kerberoshub.api.schema "https" | quote }}
|
||||
{{- $corsOrigins := list (printf "%s://%s" .Values.kerberoshub.frontend.schema .Values.kerberoshub.frontend.url) }}
|
||||
@@ -334,6 +336,20 @@ spec:
|
||||
value: {{ $mcp.enabled | default false | quote }}
|
||||
- name: MCP_ALLOWED_ORIGINS
|
||||
value: {{ join "," ($mcp.allowedOrigins | default list) | quote }}
|
||||
{{- $ask := .Values.kerberoshub.api.ask | default dict }}
|
||||
- name: ASK_ENABLED
|
||||
value: {{ $ask.enabled | default false | quote }}
|
||||
{{- if $ask.enabled }}
|
||||
{{- $askModel := $ask.azureOpenAI | default dict }}
|
||||
- name: ASK_AZURE_OPENAI_ENDPOINT
|
||||
value: {{ required "kerberoshub.api.ask.azureOpenAI.endpoint is required when Ask is enabled" $askModel.endpoint | quote }}
|
||||
- name: ASK_AZURE_OPENAI_API_KEY
|
||||
value: {{ required "kerberoshub.api.ask.azureOpenAI.apiKey is required when Ask is enabled" $askModel.apiKey | quote }}
|
||||
- name: ASK_AZURE_OPENAI_DEPLOYMENT
|
||||
value: {{ required "kerberoshub.api.ask.azureOpenAI.deployment is required when Ask is enabled" $askModel.deployment | quote }}
|
||||
- name: ASK_AZURE_OPENAI_REASONING_EFFORT
|
||||
value: {{ $askModel.reasoningEffort | default "" | quote }}
|
||||
{{- end }}
|
||||
{{ if .Values.isPrivate }}
|
||||
- name: KERBEROS_PRIVATE_CLOUD
|
||||
value: "true"
|
||||
@@ -384,6 +400,10 @@ spec:
|
||||
- name: DISABLE_AGENT_HEARTBEAT
|
||||
value: {{ .Values.kerberoshub.api.disableAgentHeartbeat | default false | quote }}
|
||||
|
||||
# Organisations in rbac mode: every new organisation, including new accounts' home organisations.
|
||||
- name: RBAC_ORGANISATIONS_ENABLED
|
||||
value: {{ (.Values.kerberoshub.api.rbacOrganisations | default dict).enabled | default false | quote }}
|
||||
|
||||
# Media proxy: hide Vault/storage endpoints behind hub-api URLs.
|
||||
{{- $mediaProxy := .Values.kerberoshub.api.mediaProxy | default dict }}
|
||||
- name: MEDIA_PROXY_ENABLED
|
||||
|
||||
@@ -273,6 +273,8 @@ spec:
|
||||
value: "{{ .Values.kerberoshub.frontend.features.darkMode }}"
|
||||
- name: FEATURE_SPLASH_SCREEN_ENABLED
|
||||
value: "{{ .Values.kerberoshub.frontend.features.splashScreen.enabled }}"
|
||||
- name: ALLOW_INSPECTION
|
||||
value: "{{ .Values.kerberoshub.frontend.features.inspection.enabled }}"
|
||||
- name: FEATURE_LANDING_PAGE
|
||||
value: "{{ .Values.kerberoshub.frontend.features.landingPage }}"
|
||||
|
||||
@@ -283,6 +285,8 @@ spec:
|
||||
value: "{{ .Values.kerberoshub.frontend.features.i18n.defaultLanguage }}"
|
||||
|
||||
# features > liveview
|
||||
- name: FEATURE_DEFAULT_STREAM_MODE
|
||||
value: "{{ .Values.kerberoshub.frontend.features.liveview.defaultStreamMode }}"
|
||||
- name: FEATURE_LIVE_STREAM_MODE
|
||||
value: "{{ .Values.kerberoshub.frontend.features.liveview.liveStreamMode }}"
|
||||
- name: FEATURE_HLS_ENABLED
|
||||
@@ -309,6 +313,8 @@ spec:
|
||||
value: "{{ .Values.kerberoshub.frontend.features.devices.hideAgent }}"
|
||||
|
||||
# features > floorplan
|
||||
- name: FEATURE_ASK_ENABLED
|
||||
value: "{{ (.Values.kerberoshub.frontend.features.ask | default dict).enabled | default "false" }}"
|
||||
- name: FEATURE_FLOORPLAN_ENABLED
|
||||
value: "{{ .Values.kerberoshub.frontend.features.floorplan.enabled }}"
|
||||
# features > map
|
||||
|
||||
@@ -352,6 +352,8 @@ spec:
|
||||
value: "{{ .Values.kerberoshub.frontend.features.darkModeEnabled }}"
|
||||
- name: FEATURE_SPLASH_SCREEN_ENABLED
|
||||
value: "{{ .Values.kerberoshub.frontend.features.splashScreen.enabled }}"
|
||||
- name: ALLOW_INSPECTION
|
||||
value: "{{ .Values.kerberoshub.frontend.features.inspection.enabled }}"
|
||||
- name: FEATURE_LANDING_PAGE
|
||||
value: "{{ .Values.kerberoshub.frontend.features.landingPage }}"
|
||||
|
||||
@@ -390,6 +392,8 @@ spec:
|
||||
value: "{{ .Values.kerberoshub.frontend.features.devices.hideAgent }}"
|
||||
|
||||
# features > floorplan
|
||||
- name: FEATURE_ASK_ENABLED
|
||||
value: "{{ (.Values.kerberoshub.frontend.features.ask | default dict).enabled | default "false" }}"
|
||||
- name: FEATURE_FLOORPLAN_ENABLED
|
||||
value: "{{ .Values.kerberoshub.frontend.features.floorplan.enabled }}"
|
||||
|
||||
|
||||
+24
-2
@@ -381,7 +381,7 @@ kerberoshub:
|
||||
api:
|
||||
repository: ghcr.io/uug-ai/hub-api
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "v1.11.42"
|
||||
tag: "v1.11.43"
|
||||
replicas: 2
|
||||
podSecurityContext:
|
||||
fsGroup: 65532
|
||||
@@ -415,6 +415,7 @@ kerberoshub:
|
||||
accessTokenTimeout: "15m" # Lifetime of one access token; the frontend renews it silently.
|
||||
idleTimeout: "12h" # A session that is not used for this long ends.
|
||||
maxLifetime: "24h" # Hard limit counted from login; the user must sign in again after it.
|
||||
inactivityTimeout: "15m" # Without user interaction for this long, the frontend asks "Are you still there?" and signs out after 60s. "0" turns it off.
|
||||
schema: "https"
|
||||
url: "api.yourdomain.com"
|
||||
# Additional complete HTTP(S) origins allowed to call the Hub API.
|
||||
@@ -426,6 +427,20 @@ kerberoshub:
|
||||
# Exact HTTP(S) origins for browser MCP clients; no wildcards or trailing slash.
|
||||
# Clients without an Origin header (such as VS Code) need no entries.
|
||||
allowedOrigins: []
|
||||
# Ask: signed-in users ask questions about their recordings on the dashboard;
|
||||
# an Azure OpenAI deployment answers them with the MCP tools, limited to the
|
||||
# user's grants. Requires a compatible API image; also set
|
||||
# frontend.features.ask.enabled to show the dashboard block.
|
||||
ask:
|
||||
enabled: false
|
||||
azureOpenAI:
|
||||
# Resource URL, e.g. https://my-resource.openai.azure.com
|
||||
endpoint: ""
|
||||
apiKey: ""
|
||||
# Deployment name; the model must support function calling and structured output.
|
||||
deployment: ""
|
||||
# Optional: minimal, low, medium or high; leave empty for models without reasoning.
|
||||
reasoningEffort: ""
|
||||
# Temporarily stop serving the polled GET /devices list: hub-api answers 204
|
||||
# without querying MongoDB. The frontend still loads devices once through
|
||||
# /session/bootstrap, but device online/offline status stops refreshing.
|
||||
@@ -434,6 +449,8 @@ kerberoshub:
|
||||
# Kerberos Vault into an opaque hub-api URL ({schema}://{url}/media/proxy?t=...)
|
||||
# and streams the object itself, so clients never see Vault or the
|
||||
# underlying storage endpoint. Increases hub-api egress/bandwidth.
|
||||
rbacOrganisations:
|
||||
enabled: false # Every new organisation starts in rbac mode: created ones (POST /organisations) and new accounts' home organisations. Existing organisations keep their mode.
|
||||
mediaProxy:
|
||||
enabled: false
|
||||
publicUrl: "" # Optional override of the public hub-api base URL; defaults to {schema}://{url}.
|
||||
@@ -555,7 +572,7 @@ kerberoshub:
|
||||
frontend:
|
||||
repository: ghcr.io/uug-ai/hub-frontend
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "v1.19.35"
|
||||
tag: "v1.19.42"
|
||||
replicas: 2
|
||||
containerPort: 8080
|
||||
securityContext:
|
||||
@@ -686,6 +703,8 @@ kerberoshub:
|
||||
darkModeEnabled: "true" # Enable or disable dark mode toggle 'true' or 'false'
|
||||
splashScreen:
|
||||
enabled: "true" # Enable or disable the pre-bootstrap splash screen 'true' or 'false'
|
||||
inspection:
|
||||
enabled: "false" # In-app bug reports filed as GitHub issues via inspect.uug.ai (https://github.com/uug-ai/inspect) 'true' or 'false'
|
||||
landingPage: "/dashboard" # Landing page after login '/dashboard', '/liveview', '/media', '/devices', '/sites', '/groups'
|
||||
# Internationalization (i18n): controls the runtime language behaviour
|
||||
# of the front-end. When `enabled` is "false" the language switcher is
|
||||
@@ -803,6 +822,9 @@ kerberoshub:
|
||||
colorChartSelectionFill: "rgba(132, 86, 159, 0.07)"
|
||||
colorChartSelectionStroke: "rgba(132, 86, 159, 0.4)"
|
||||
colorChartGridStroke: "rgba(0, 106, 255, 0.18)"
|
||||
# Ask about recordings on the dashboard; needs api.ask.enabled.
|
||||
ask:
|
||||
enabled: "false" # Enable or disable the dashboard Ask block 'true' or 'false'
|
||||
# Floor-plan feature
|
||||
floorplan:
|
||||
enabled: "true" # Enable or disable floorplan feature 'true' or 'false'
|
||||
|
||||
@@ -29,7 +29,7 @@ for mode in all ui; do
|
||||
--set kerberoshub.frontend.demoEnabled=true)"
|
||||
for name in hub-frontend hub-frontend-demo; do
|
||||
deployment="$(resource Deployment "$name" <<< "$rendered")"
|
||||
assert_contains "$deployment" 'image: "ghcr.io/uug-ai/hub-frontend:v1.19.35"$'
|
||||
assert_contains "$deployment" 'image: "ghcr.io/uug-ai/hub-frontend:v1.19.42"$'
|
||||
assert_contains "$deployment" 'containerPort: 8080$'
|
||||
[[ "$(grep -c 'containerPort:' <<< "$deployment")" == 1 ]]
|
||||
for setting in 'name: http' 'runAsNonRoot: true' 'runAsUser: 65532' \
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
CHART_DIR="${1:-charts/hub}"
|
||||
|
||||
# Prints "<deployment> <variable> <value>" for every ASK_ and FEATURE_ASK_ variable.
|
||||
extract_ask() {
|
||||
awk '
|
||||
/^---/ { deployment=0; name=""; variable="" }
|
||||
/^kind: Deployment$/ { deployment=1 }
|
||||
deployment && /^ name:/ { name=$2 }
|
||||
/- name: (FEATURE_)?ASK_/ { variable=$3; next }
|
||||
variable != "" && /value:/ {
|
||||
value=$0
|
||||
sub(/^[[:space:]]*value: /, "", value)
|
||||
print name, variable, value
|
||||
variable=""
|
||||
}
|
||||
' | sort
|
||||
}
|
||||
|
||||
assert_ask() {
|
||||
local rendered="$1" expected="$2" actual
|
||||
actual="$(printf '%s\n' "$rendered" | extract_ask)"
|
||||
if [[ "$actual" != "$expected" ]]; then
|
||||
printf 'Unexpected Ask environment:\n%s\nExpected:\n%s\n' "$actual" "$expected" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
model=(
|
||||
--set kerberoshub.api.ask.azureOpenAI.endpoint=https://ask.example.openai.azure.com
|
||||
--set kerberoshub.api.ask.azureOpenAI.apiKey=test-key
|
||||
--set kerberoshub.api.ask.azureOpenAI.deployment=ask-model
|
||||
--set kerberoshub.api.ask.azureOpenAI.reasoningEffort=low
|
||||
)
|
||||
|
||||
assert_ask "$(helm template hub "$CHART_DIR")" "$(printf '%s\n' \
|
||||
'hub-api ASK_ENABLED "false"' \
|
||||
'hub-frontend FEATURE_ASK_ENABLED "false"')"
|
||||
echo "OK: Ask is off by default and passes no model settings"
|
||||
|
||||
assert_ask "$(helm template hub "$CHART_DIR" --set kerberoshub.api.ask.enabled=true \
|
||||
--set kerberoshub.frontend.features.ask.enabled=true "${model[@]}")" "$(printf '%s\n' \
|
||||
'hub-api ASK_AZURE_OPENAI_API_KEY "test-key"' \
|
||||
'hub-api ASK_AZURE_OPENAI_DEPLOYMENT "ask-model"' \
|
||||
'hub-api ASK_AZURE_OPENAI_ENDPOINT "https://ask.example.openai.azure.com"' \
|
||||
'hub-api ASK_AZURE_OPENAI_REASONING_EFFORT "low"' \
|
||||
'hub-api ASK_ENABLED "true"' \
|
||||
'hub-frontend FEATURE_ASK_ENABLED "true"')"
|
||||
echo "OK: enabled Ask passes the model settings to hub-api only"
|
||||
|
||||
assert_ask "$(helm template hub "$CHART_DIR" --set kerberoshub.api.ask=null --set kerberoshub.frontend.features.ask=null)" \
|
||||
"$(printf '%s\n' 'hub-api ASK_ENABLED "false"' 'hub-frontend FEATURE_ASK_ENABLED "false"')"
|
||||
echo "OK: values files without an ask section keep it off"
|
||||
|
||||
[[ -z "$(helm template hub "$CHART_DIR" --set mode=pipeline --set kerberoshub.api.ask.enabled=true "${model[@]}" | extract_ask)" ]]
|
||||
echo "OK (pipeline): no Ask environment"
|
||||
|
||||
for missing in endpoint apiKey deployment; do
|
||||
if output="$(helm template hub "$CHART_DIR" --set kerberoshub.api.ask.enabled=true "${model[@]}" \
|
||||
--set "kerberoshub.api.ask.azureOpenAI.$missing=" 2>&1)"; then
|
||||
echo "Rendering succeeded without azureOpenAI.$missing" >&2
|
||||
exit 1
|
||||
fi
|
||||
grep -q "kerberoshub.api.ask.azureOpenAI.$missing is required" <<< "$output"
|
||||
done
|
||||
echo "OK: enabled Ask requires endpoint, apiKey and deployment"
|
||||
|
||||
helm lint "$CHART_DIR" --quiet --set kerberoshub.api.ask.enabled=true "${model[@]}"
|
||||
echo "All Hub Ask configuration checks passed."
|
||||
Reference in New Issue
Block a user