From 44443388cdf2877149cc528ad1cf11310a2eb40d Mon Sep 17 00:00:00 2001 From: Anuj Parihar Date: Wed, 17 Jun 2026 00:34:58 +0530 Subject: [PATCH] feat: helm updates --- helm-charts/bifrost/templates/_helpers.tpl | 13 ++ helm-charts/bifrost/templates/deployment.yaml | 4 + helm-charts/bifrost/values.schema.json | 125 ++++++++++++++++++ helm-charts/bifrost/values.yaml | 35 +++++ 4 files changed, 177 insertions(+) diff --git a/helm-charts/bifrost/templates/_helpers.tpl b/helm-charts/bifrost/templates/_helpers.tpl index 2599efda2f8..a8d9d94a72a 100644 --- a/helm-charts/bifrost/templates/_helpers.tpl +++ b/helm-charts/bifrost/templates/_helpers.tpl @@ -319,6 +319,12 @@ false {{- if .Values.bifrost.client.routingChainMaxDepth }} {{- $_ := set $client "routing_chain_max_depth" .Values.bifrost.client.routingChainMaxDepth }} {{- end }} +{{- if hasKey .Values.bifrost.client "allowDirectKeys" }} +{{- $_ := set $client "allow_direct_keys" .Values.bifrost.client.allowDirectKeys }} +{{- end }} +{{- if .Values.bifrost.client.mcpExternalClientUrl }} +{{- $_ := set $client "mcp_external_client_url" .Values.bifrost.client.mcpExternalClientUrl }} +{{- end }} {{- $_ := set $config "client" $client }} {{- end }} {{- /* Server */ -}} @@ -407,6 +413,9 @@ false {{- if $providerConfig.network_config.beta_header_overrides }} {{- $_ := set $networkConfig "beta_header_overrides" $providerConfig.network_config.beta_header_overrides }} {{- end }} +{{- if hasKey $providerConfig.network_config "allow_private_network" }} +{{- $_ := set $networkConfig "allow_private_network" $providerConfig.network_config.allow_private_network }} +{{- end }} {{- $_ := set $providerCopy "network_config" $networkConfig }} {{- end }} {{- if $providerConfig.keys }} @@ -697,6 +706,10 @@ false {{- $_ := set $config "guardrails_config" $guardrails }} {{- end }} {{- end }} +{{- /* Skills Registry */ -}} +{{- if .Values.bifrost.skillsRegistry }} +{{- $_ := set $config "skills_registry" .Values.bifrost.skillsRegistry }} +{{- end }} {{- /* Access Profiles (Enterprise) */ -}} {{- if .Values.bifrost.accessProfiles }} {{- $_ := set $config "access_profiles" .Values.bifrost.accessProfiles }} diff --git a/helm-charts/bifrost/templates/deployment.yaml b/helm-charts/bifrost/templates/deployment.yaml index 787d199bbde..0a1c608961e 100644 --- a/helm-charts/bifrost/templates/deployment.yaml +++ b/helm-charts/bifrost/templates/deployment.yaml @@ -24,6 +24,10 @@ spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} + {{- with .Values.strategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "bifrost.serverSelectorLabels" . | nindent 6 }} diff --git a/helm-charts/bifrost/values.schema.json b/helm-charts/bifrost/values.schema.json index c8230b004e7..283663228ab 100644 --- a/helm-charts/bifrost/values.schema.json +++ b/helm-charts/bifrost/values.schema.json @@ -270,6 +270,10 @@ "affinity": { "type": "object" }, + "strategy": { + "type": "object", + "description": "Deployment update strategy. Applies to the Deployment only (not the StatefulSet). Empty uses the Kubernetes default. Rendered verbatim into spec.strategy." + }, "bifrost": { "type": "object", "description": "Bifrost application configuration", @@ -529,6 +533,15 @@ "minimum": 1, "description": "Maximum depth for routing rule chain evaluation", "default": 10 + }, + "allowDirectKeys": { + "type": "boolean", + "description": "Allow callers to bypass the registered key pool by supplying x-bf-direct-key: true with an Authorization header carrying the provider key. Maps to client.allow_direct_keys.", + "default": false + }, + "mcpExternalClientUrl": { + "type": "string", + "description": "Public base URL Bifrost uses as the redirect_uri when acting as an OAuth client to upstream MCP servers. Maps to client.mcp_external_client_url." } }, "additionalProperties": false @@ -3011,6 +3024,111 @@ }, "additionalProperties": false }, + "skillsRegistry": { + "type": "object", + "description": "Declarative Skills Repository definitions reconciled from config.json. Rendered verbatim into skills_registry.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether config-defined skills should be reconciled at startup" + }, + "skills": { + "type": "array", + "description": "Skills to create or update from config.json", + "items": { + "type": "object", + "required": ["name", "description", "skill_md_body", "version"], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "license": { + "type": "string" + }, + "compatibility": { + "type": "string" + }, + "allowed_tools": { + "type": "string" + }, + "extra_frontmatter": { + "type": "object", + "additionalProperties": true + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "skill_md_body": { + "type": "string" + }, + "version": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "required": ["path", "source_type"], + "properties": { + "path": { + "type": "string" + }, + "source_type": { + "type": "string", + "enum": ["text", "url", "dataurl"] + }, + "url": { + "type": "string" + }, + "content": { + "type": "string" + }, + "dataurl": { + "type": "string" + } + }, + "additionalProperties": false, + "oneOf": [ + { + "properties": { + "source_type": { + "const": "url" + } + }, + "required": ["url"] + }, + { + "properties": { + "source_type": { + "const": "text" + } + }, + "required": ["content"] + }, + { + "properties": { + "source_type": { + "const": "dataurl" + } + }, + "required": ["dataurl"] + } + ] + } + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, "accessProfiles": { "type": "array", "description": "Enterprise access profile templates rendered as top-level access_profiles in config.json", @@ -5116,6 +5234,13 @@ "type": "string" } }, + "blacklisted_models": { + "type": "array", + "description": "Models blocked for this provider config even if matched by allowed_models. Use [\"*\"] to block all.", + "items": { + "type": "string" + } + }, "budget_id": { "type": "string", "description": "Associated budget ID" diff --git a/helm-charts/bifrost/values.yaml b/helm-charts/bifrost/values.yaml index 33f1e877b3b..e1dc014b5b1 100644 --- a/helm-charts/bifrost/values.yaml +++ b/helm-charts/bifrost/values.yaml @@ -170,6 +170,17 @@ tolerations: [] affinity: {} +# Deployment rolling update strategy. Applies to the Deployment only (not the +# StatefulSet used for sqlite-with-persistence). Rendered verbatim into spec.strategy. +# Empty ({}) uses the Kubernetes default (RollingUpdate, maxSurge 25%, maxUnavailable 25%). +# For HA gateway deployments, surge-only rollouts avoid dropping capacity: +# strategy: +# type: RollingUpdate +# rollingUpdate: +# maxSurge: 100% +# maxUnavailable: 0% +strategy: {} + # Graceful shutdown configuration for long-lived connections (SSE streaming) # When a pod is terminated (e.g. during HPA scale-down), active streaming connections # are severed abruptly. This causes clients to lose their SSE stream mid-response. @@ -282,6 +293,8 @@ bifrost: # hideDeletedVirtualKeysInFilters: false # Omit deleted virtual keys from logs/MCP filter data # whitelistedRoutes: [] # Routes that bypass auth middleware # routingChainMaxDepth: 10 # Maximum depth for routing rule chain evaluation + # allowDirectKeys: false # Allow callers to bypass the key pool via x-bf-direct-key + Authorization header + # mcpExternalClientUrl: "" # Public base URL used as redirect_uri when Bifrost is an OAuth client to MCP servers # Server configuration server: @@ -704,6 +717,7 @@ bifrost: # - provider: "openai" # weight: 1.0 # allowed_models: ["gpt-4o"] + # blacklisted_models: [] # Models blocked even if matched by allowed_models; ["*"] blocks all # rate_limit_id: "" # keys: # - key_id: "uuid-of-key" @@ -942,6 +956,27 @@ bifrost: # timeout: 30 # Timeout in seconds for provider execution (default: 30) # config: {} + # Declarative Skills Repository. Rendered verbatim as top-level `skills_registry` + # in config.json and reconciled at startup when enabled. + # skillsRegistry: + # enabled: true + # skills: + # - name: "my-skill" + # description: "What this skill does" + # version: "1.0.0" + # skill_md_body: "# My Skill\n\nInstructions..." + # # license: "MIT" + # # compatibility: ">=1.0.0" + # # allowed_tools: "Read,Write" + # # metadata: {} + # # extra_frontmatter: {} + # # files: + # # - path: "reference.md" + # # source_type: "text" # text | url | dataurl + # # content: "..." # required when source_type=text + # # # url: "https://..." # required when source_type=url + # # # dataurl: "data:..." # required when source_type=dataurl + # Access profiles (enterprise): seed RBAC access profile templates from Helm. # This is rendered directly as top-level `access_profiles` in config.json. accessProfiles: []