Files
coder/helm/ai-gateway/tests/testdata/default_values.golden
T
Paweł Banaszewski e819dd4af6 fix(helm/ai-gateway): render service nodePort with an explicit if guard (#27682)
> Coder Agents generated this commit

Replace the with block around the Service nodePort field with an if
guard that references .Values.service.nodePort directly. The with form
rebinds the dot inside the block, so a later addition that needs .Values
or .Release there would break.

Extend the default_values fixture to enable ingress and httproute with
only the values each one requires, so the golden file covers every
template with the minimum viable configuration.

Add a mustNotContain list to the render test cases. Golden files are
rewritten wholesale by TestUpdateGoldenFiles, so these assertions pin
optional fields and resources that each fixture leaves unset, including
the Service nodePort.
2026-07-30 14:47:07 +02:00

191 lines
5.0 KiB
Plaintext

---
# Source: coder-ai-gateway/templates/aigateway.yaml
apiVersion: v1
automountServiceAccountToken: false
kind: ServiceAccount
metadata:
annotations: {}
labels:
app.kubernetes.io/instance: ai-gateway
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: coder-ai-gateway
app.kubernetes.io/part-of: coder-ai-gateway
app.kubernetes.io/version: 0.1.0
helm.sh/chart: coder-ai-gateway-0.1.0
name: coder-ai-gateway
namespace: default
---
# Source: coder-ai-gateway/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: coder-ai-gateway
namespace: default
labels:
helm.sh/chart: coder-ai-gateway-0.1.0
app.kubernetes.io/name: coder-ai-gateway
app.kubernetes.io/instance: ai-gateway
app.kubernetes.io/part-of: coder-ai-gateway
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
sessionAffinity: None
selector:
app.kubernetes.io/name: coder-ai-gateway
app.kubernetes.io/instance: ai-gateway
ports:
- name: http
port: 80
targetPort: http
protocol: TCP
---
# Source: coder-ai-gateway/templates/aigateway.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
annotations: {}
labels:
app.kubernetes.io/instance: ai-gateway
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: coder-ai-gateway
app.kubernetes.io/part-of: coder-ai-gateway
app.kubernetes.io/version: 0.1.0
helm.sh/chart: coder-ai-gateway-0.1.0
name: coder-ai-gateway
namespace: default
spec:
replicas: 3
selector:
matchLabels:
app.kubernetes.io/instance: ai-gateway
app.kubernetes.io/name: coder-ai-gateway
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
annotations:
app.kubernetes.io/component: ai-gateway
labels:
app.kubernetes.io/instance: ai-gateway
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: coder-ai-gateway
app.kubernetes.io/part-of: coder-ai-gateway
app.kubernetes.io/version: 0.1.0
helm.sh/chart: coder-ai-gateway-0.1.0
spec:
automountServiceAccountToken: false
containers:
- args:
- ai-gateway
- start
command:
- /opt/coder
env:
- name: CODER_AI_GATEWAY_HTTP_ADDRESS
value: 0.0.0.0:4001
- name: CODER_PROMETHEUS_ENABLE
value: "true"
- name: CODER_PROMETHEUS_ADDRESS
value: 0.0.0.0:2112
- name: CODER_URL
value: https://coder.example.com
- name: CODER_AI_GATEWAY_KEY
valueFrom:
secretKeyRef:
key: key
name: ai-gateway-key
image: ghcr.io/coder/coder:v2.36.0
imagePullPolicy: IfNotPresent
lifecycle: {}
livenessProbe:
httpGet:
path: /healthz
port: http
scheme: HTTP
initialDelaySeconds: 0
name: coder
ports:
- containerPort: 4001
name: http
protocol: TCP
- containerPort: 2112
name: metrics
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
port: http
scheme: HTTP
initialDelaySeconds: 0
resources:
requests:
cpu: "1"
memory: 1Gi
securityContext:
allowPrivilegeEscalation: false
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
volumeMounts: []
restartPolicy: Always
serviceAccountName: coder-ai-gateway
terminationGracePeriodSeconds: 330
volumes: []
---
# Source: coder-ai-gateway/templates/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: coder-ai-gateway
namespace: default
labels:
helm.sh/chart: coder-ai-gateway-0.1.0
app.kubernetes.io/name: coder-ai-gateway
app.kubernetes.io/instance: ai-gateway
app.kubernetes.io/part-of: coder-ai-gateway
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
spec:
rules:
- host: "ai.example.com"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: coder-ai-gateway
port:
number: 80
---
# Source: coder-ai-gateway/templates/httproute.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: coder-ai-gateway
namespace: default
labels:
helm.sh/chart: coder-ai-gateway-0.1.0
app.kubernetes.io/name: coder-ai-gateway
app.kubernetes.io/instance: ai-gateway
app.kubernetes.io/part-of: coder-ai-gateway
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
spec:
parentRefs:
- name: shared-gateway
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: coder-ai-gateway
port: 80