Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/scripts/validate-helm-config-fields.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,24 @@ assert_field_value 'client.mcp_code_mode_binding_level' '.client.mcp_code_mode_b
assert_field_value 'client.mcp_tool_sync_interval' '.client.mcp_tool_sync_interval' '60'
assert_field_value 'client.hide_deleted_virtual_keys_in_filters' '.client.hide_deleted_virtual_keys_in_filters' 'true'

###############################################################################
# 1b. Server Config
###############################################################################
echo ""
echo -e "${CYAN}🖥️ 1b - Server Config${NC}"
echo "----------------------"

cat > "$TMPDIR/values-server.yaml" << 'VALS'
image:
tag: v1.0.0
bifrost:
server:
readBufferSize: 131072
VALS

render_config "$TMPDIR/values-server.yaml"
assert_field_value 'server.read_buffer_size' '.server.read_buffer_size' '131072'

###############################################################################
# 2. Framework (Pricing)
###############################################################################
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/scripts/validate-helm-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ test_template "cluster: region (Gap 7)" \
--set bifrost.cluster.gossip.config.failureThreshold=3 \
--set bifrost.cluster.region=us-east-1

# Gap 9: Server config
test_template "server: readBufferSize (Gap 9)" \
--set bifrost.server.readBufferSize=131072

# Gap 8: Combined production-like with all new fields
test_template "combined: all new Gap 1-8 fields" \
--set bifrost.client.asyncJobResultTTL=300 \
Expand Down
24 changes: 24 additions & 0 deletions examples/k8s/examples/values-ingress-legacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Legacy ingress format — single Ingress resource named "<release>".
# Use this when you only need one ingress controller.
#
# Test with:
# helm template bifrost ../bifrost/helm-charts/bifrost -f values-ingress-legacy.yaml
#
image:
repository: maximhq/bifrost
tag: latest

ingress:
enabled: true
className: nginx
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
hosts:
- host: bifrost.example.com
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- bifrost.example.com
secretName: bifrost-tls
36 changes: 36 additions & 0 deletions examples/k8s/examples/values-ingress-named.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Named ingress map format — one Ingress resource per key, named "<release>-<key>".
# Use this when you need multiple ingress controllers (e.g. public + internal).
#
# Test with:
# helm template bifrost ../bifrost/helm-charts/bifrost -f values-ingress-named.yaml
#
image:
repository: maximhq/bifrost
tag: latest

ingress:
public:
enabled: true
className: nginx-public
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
hosts:
- host: bifrost.example.com
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- bifrost.example.com
secretName: bifrost-tls-public

internal:
enabled: true
className: nginx-internal
annotations: {}
hosts:
- host: bifrost.internal.example.com
paths:
- path: /
pathType: Prefix
tls: []
18 changes: 17 additions & 1 deletion helm-charts/bifrost/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
Bifrost has been installed!

{{- if .Values.ingress.enabled }}
{{- $isLegacy := true }}
{{- range $k, $v := .Values.ingress }}
{{- if and (kindIs "map" $v) (hasKey $v "enabled") }}{{- $isLegacy = false }}{{- end }}
{{- end }}
{{- if and .Values.ingress $isLegacy .Values.ingress.enabled }}

1. Access Bifrost at:
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .host }}
{{- end }}

{{- else if and .Values.ingress (not $isLegacy) }}

1. Access Bifrost at:
{{- range (keys .Values.ingress | sortAlpha) }}
{{- $ing := index $.Values.ingress . }}
{{- if and (kindIs "map" $ing) $ing.enabled }}
{{- range $ing.hosts }}
http{{ if $ing.tls }}s{{ end }}://{{ .host }}
{{- end }}
{{- end }}
{{- end }}

{{- else if eq .Values.service.type "LoadBalancer" }}

1. Get the LoadBalancer IP:
Expand Down
18 changes: 17 additions & 1 deletion helm-charts/bifrost/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,16 @@ false
{{- end }}
{{- $_ := set $config "client" $client }}
{{- end }}
{{- /* Server */ -}}
{{- if .Values.bifrost.server }}
{{- $server := dict }}
{{- if .Values.bifrost.server.readBufferSize }}
{{- $_ := set $server "read_buffer_size" .Values.bifrost.server.readBufferSize }}
{{- end }}
{{- if $server }}
{{- $_ := set $config "server" $server }}
{{- end }}
{{- end }}
{{- /* Framework */ -}}
{{- if .Values.bifrost.framework }}
{{- $framework := dict }}
Expand All @@ -332,7 +342,13 @@ false
{{- if .Values.bifrost.framework.pricing.pricingSyncInterval }}
{{- $_ := set $pricing "pricing_sync_interval" .Values.bifrost.framework.pricing.pricingSyncInterval }}
{{- end }}
{{- if or $pricing.pricing_url $pricing.pricing_sync_interval }}
{{- if .Values.bifrost.framework.pricing.mcpLibraryUrl }}
{{- $_ := set $pricing "mcp_library_url" .Values.bifrost.framework.pricing.mcpLibraryUrl }}
{{- end }}
{{- if .Values.bifrost.framework.pricing.mcpLibrarySyncInterval }}
{{- $_ := set $pricing "mcp_library_sync_interval" .Values.bifrost.framework.pricing.mcpLibrarySyncInterval }}
{{- end }}
{{- if or $pricing.pricing_url $pricing.model_parameters_url $pricing.pricing_sync_interval $pricing.mcp_library_url $pricing.mcp_library_sync_interval }}
{{- $_ := set $framework "pricing" $pricing }}
{{- end }}
{{- end }}
Expand Down
58 changes: 58 additions & 0 deletions helm-charts/bifrost/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{{- if .Values.ingress }}
{{- $isLegacy := true }}
{{- range $k, $v := .Values.ingress }}
{{- if and (kindIs "map" $v) (hasKey $v "enabled") }}{{- $isLegacy = false }}{{- end }}
{{- end }}
{{- if $isLegacy }}
{{- /* Single ingress (legacy format) — no non-legacy keys present */}}
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand Down Expand Up @@ -40,3 +47,54 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- else }}
{{- /* Named ingresses map (new format) */}}
{{- range (keys .Values.ingress | sortAlpha) }}
{{- $name := . }}
{{- $ing := index $.Values.ingress $name }}
{{- if and (kindIs "map" $ing) $ing.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "bifrost.fullname" $ }}-{{ $name }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "bifrost.labels" $ | nindent 4 }}
{{- with $ing.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if $ing.className }}
ingressClassName: {{ $ing.className }}
{{- end }}
{{- if $ing.tls }}
tls:
{{- range $ing.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range $ing.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ include "bifrost.fullname" $ }}
port:
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Loading
Loading