Skip to content

Commit b96078b

Browse files
waleedlatif1claude
andcommitted
improvement(helm): clean up ingress template comments
Simplify verbose inline Helm comments and section dividers to match the minimal style used in services.yaml. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 13d28e7 commit b96078b

File tree

4 files changed

+18
-51
lines changed

4 files changed

+18
-51
lines changed

helm/sim/examples/values-azure.yaml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ ollama:
172172
OLLAMA_KEEP_ALIVE: "-1"
173173
OLLAMA_DEBUG: "1"
174174

175-
# Ingress configuration (NGINX ingress controller on Azure AKS)
176-
# Option 1: Separate subdomains (default)
175+
# Ingress configuration
177176
ingress:
178177
enabled: true
179178
className: nginx
@@ -188,8 +187,7 @@ ingress:
188187
- path: /
189188
pathType: Prefix
190189

191-
# Realtime service (separate subdomain)
192-
# For same-domain setup, use host: simstudio.acme.com with path: /socket.io
190+
# Realtime service
193191
realtime:
194192
host: simstudio-ws.acme.com
195193
paths:
@@ -201,34 +199,29 @@ ingress:
201199
enabled: true
202200
secretName: simstudio-tls-secret
203201

204-
# Internal Ingress configuration (for private access via internal load balancer)
205-
# Use this when you need access from within your VNet without going through the public internet
206-
# Supports Azure Application Gateway with private IP or NGINX with internal load balancer
202+
# Internal Ingress configuration
207203
ingressInternal:
208-
enabled: false # Set to true to enable internal ingress
209-
className: azure-application-gateway # or nginx for internal NGINX
204+
enabled: false
205+
className: azure-application-gateway
210206

211207
annotations:
212-
# For Azure Application Gateway with private IP:
213208
appgw.ingress.kubernetes.io/use-private-ip: "true"
214-
# For NGINX with internal Azure Load Balancer:
215-
# service.beta.kubernetes.io/azure-load-balancer-internal: "true"
216209

217-
# Main application (internal hostname)
210+
# Main application
218211
app:
219212
host: simstudio-internal.acme.local
220213
paths:
221214
- path: /
222215
pathType: Prefix
223216

224-
# Realtime service (same host with /socket.io path for consolidated routing)
217+
# Realtime service
225218
realtime:
226219
host: simstudio-internal.acme.local
227220
paths:
228221
- path: /socket.io
229222
pathType: Prefix
230223

231-
# TLS configuration (use internal CA cert if needed)
224+
# TLS configuration
232225
tls:
233226
enabled: true
234227
secretName: simstudio-internal-tls-secret

helm/sim/templates/ingress-internal.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ spec:
1818
tls:
1919
- hosts:
2020
- {{ .Values.ingressInternal.app.host | quote }}
21-
{{- /* Add Realtime host only if enabled and unique */ -}}
2221
{{- if and .Values.realtime.enabled (ne .Values.ingressInternal.realtime.host .Values.ingressInternal.app.host) }}
2322
- {{ .Values.ingressInternal.realtime.host | quote }}
2423
{{- end }}
25-
{{- /* Add Copilot host only if enabled, exists, and unique from both App and Realtime */ -}}
2624
{{- if and .Values.copilot.enabled .Values.ingressInternal.copilot }}
2725
{{- if and (ne .Values.ingressInternal.copilot.host .Values.ingressInternal.app.host) (ne .Values.ingressInternal.copilot.host .Values.ingressInternal.realtime.host) }}
2826
- {{ .Values.ingressInternal.copilot.host | quote }}
@@ -31,11 +29,10 @@ spec:
3129
secretName: {{ .Values.ingressInternal.tls.secretName }}
3230
{{- end }}
3331
rules:
34-
# --- Main Rule: App (plus consolidated Realtime/Copilot if hosts match) ---
32+
# Main application
3533
- host: {{ .Values.ingressInternal.app.host | quote }}
3634
http:
3735
paths:
38-
{{- /* Consolidate Realtime paths here if host matches App */ -}}
3936
{{- if and .Values.realtime.enabled (eq .Values.ingressInternal.realtime.host .Values.ingressInternal.app.host) }}
4037
{{- range .Values.ingressInternal.realtime.paths }}
4138
- path: {{ .path }}
@@ -47,7 +44,6 @@ spec:
4744
number: {{ $.Values.realtime.service.port }}
4845
{{- end }}
4946
{{- end }}
50-
{{- /* Consolidate Copilot paths here if host matches App */ -}}
5147
{{- if and .Values.copilot.enabled .Values.ingressInternal.copilot (eq .Values.ingressInternal.copilot.host .Values.ingressInternal.app.host) }}
5248
{{- range .Values.ingressInternal.copilot.paths }}
5349
- path: {{ .path }}
@@ -59,7 +55,6 @@ spec:
5955
number: {{ $.Values.copilot.server.service.port }}
6056
{{- end }}
6157
{{- end }}
62-
{{- /* App paths are always included in this first rule */ -}}
6358
{{- range .Values.ingressInternal.app.paths }}
6459
- path: {{ .path }}
6560
pathType: {{ .pathType }}
@@ -70,7 +65,7 @@ spec:
7065
number: {{ $.Values.app.service.port }}
7166
{{- end }}
7267

73-
# --- Realtime Rule (Only if host is unique) ---
68+
# Realtime service
7469
{{- if and .Values.realtime.enabled (ne .Values.ingressInternal.realtime.host .Values.ingressInternal.app.host) }}
7570
- host: {{ .Values.ingressInternal.realtime.host | quote }}
7671
http:
@@ -86,7 +81,7 @@ spec:
8681
{{- end }}
8782
{{- end }}
8883

89-
# --- Copilot Rule (Only if host is unique from both App and Realtime) ---
84+
# Copilot service
9085
{{- if and .Values.copilot.enabled .Values.ingressInternal.copilot (and (ne .Values.ingressInternal.copilot.host .Values.ingressInternal.app.host) (ne .Values.ingressInternal.copilot.host .Values.ingressInternal.realtime.host)) }}
9186
- host: {{ .Values.ingressInternal.copilot.host | quote }}
9287
http:

helm/sim/templates/ingress.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ spec:
1818
tls:
1919
- hosts:
2020
- {{ .Values.ingress.app.host | quote }}
21-
{{- /* Add Realtime host only if enabled and unique */ -}}
2221
{{- if and .Values.realtime.enabled (ne .Values.ingress.realtime.host .Values.ingress.app.host) }}
2322
- {{ .Values.ingress.realtime.host | quote }}
2423
{{- end }}
25-
{{- /* Add Copilot host only if enabled, exists, and unique from both App and Realtime */ -}}
2624
{{- if and .Values.copilot.enabled .Values.ingress.copilot }}
2725
{{- if and (ne .Values.ingress.copilot.host .Values.ingress.app.host) (ne .Values.ingress.copilot.host .Values.ingress.realtime.host) }}
2826
- {{ .Values.ingress.copilot.host | quote }}
@@ -31,11 +29,10 @@ spec:
3129
secretName: {{ .Values.ingress.tls.secretName }}
3230
{{- end }}
3331
rules:
34-
# --- Main Rule: App (plus consolidated Realtime/Copilot if hosts match) ---
32+
# Main application
3533
- host: {{ .Values.ingress.app.host | quote }}
3634
http:
3735
paths:
38-
{{- /* Consolidate Realtime paths here if host matches App */ -}}
3936
{{- if and .Values.realtime.enabled (eq .Values.ingress.realtime.host .Values.ingress.app.host) }}
4037
{{- range .Values.ingress.realtime.paths }}
4138
- path: {{ .path }}
@@ -47,7 +44,6 @@ spec:
4744
number: {{ $.Values.realtime.service.port }}
4845
{{- end }}
4946
{{- end }}
50-
{{- /* Consolidate Copilot paths here if host matches App */ -}}
5147
{{- if and .Values.copilot.enabled .Values.ingress.copilot (eq .Values.ingress.copilot.host .Values.ingress.app.host) }}
5248
{{- range .Values.ingress.copilot.paths }}
5349
- path: {{ .path }}
@@ -59,7 +55,6 @@ spec:
5955
number: {{ $.Values.copilot.server.service.port }}
6056
{{- end }}
6157
{{- end }}
62-
{{- /* App paths are always included in this first rule */ -}}
6358
{{- range .Values.ingress.app.paths }}
6459
- path: {{ .path }}
6560
pathType: {{ .pathType }}
@@ -70,7 +65,7 @@ spec:
7065
number: {{ $.Values.app.service.port }}
7166
{{- end }}
7267

73-
# --- Realtime Rule (Only if host is unique) ---
68+
# Realtime service
7469
{{- if and .Values.realtime.enabled (ne .Values.ingress.realtime.host .Values.ingress.app.host) }}
7570
- host: {{ .Values.ingress.realtime.host | quote }}
7671
http:
@@ -86,7 +81,7 @@ spec:
8681
{{- end }}
8782
{{- end }}
8883

89-
# --- Copilot Rule (Only if host is unique from both App and Realtime) ---
84+
# Copilot service
9085
{{- if and .Values.copilot.enabled .Values.ingress.copilot (and (ne .Values.ingress.copilot.host .Values.ingress.app.host) (ne .Values.ingress.copilot.host .Values.ingress.realtime.host)) }}
9186
- host: {{ .Values.ingress.copilot.host | quote }}
9287
http:

helm/sim/values.yaml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -582,43 +582,27 @@ ingress:
582582
enabled: false
583583
secretName: sim-tls-secret
584584

585-
# Internal Ingress configuration (for private/internal access)
586-
# Use this when you need a separate ingress for internal traffic
587-
# (e.g., internal load balancer with private IP)
585+
# Internal Ingress configuration
588586
ingressInternal:
589-
# Enable/disable internal ingress
590587
enabled: false
591-
592-
# Ingress class name (e.g., nginx-internal, azure-application-gateway-internal)
593588
className: nginx
594-
595-
# Annotations (typically includes internal load balancer annotations)
596-
# Example for Azure:
597-
# kubernetes.io/ingress.class: azure/application-gateway
598-
# appgw.ingress.kubernetes.io/use-private-ip: "true"
599-
# Example for AWS:
600-
# alb.ingress.kubernetes.io/scheme: internal
601-
# Example for GCP:
602-
# kubernetes.io/ingress.class: "gce-internal"
603589
annotations: {}
604590

605-
# Main application host configuration
591+
# Main application
606592
app:
607593
host: sim-internal.local
608594
paths:
609595
- path: /
610596
pathType: Prefix
611597

612-
# Realtime service host configuration
613-
# Set to same host as app.host to consolidate paths under one rule
614-
# Use /socket.io path when sharing the same host
598+
# Realtime service
615599
realtime:
616600
host: sim-internal.local
617601
paths:
618602
- path: /socket.io
619603
pathType: Prefix
620604

621-
# Copilot service host configuration (optional)
605+
# Copilot service (optional)
622606
# copilot:
623607
# host: sim-internal.local
624608
# paths:

0 commit comments

Comments
 (0)