Template service URLs to support multiple release names
Problem
Service URLs in values.yaml are hardcoded and don't support multiple Helm releases in the same cluster.
Current State
# In values.yaml
gateway:
archivista:
url: "http://judge-archivista.judge.svc.cluster.local:8082"
judgeapi:
url: "http://judge-api.judge.svc.cluster.local:8080"
These assume the release name is always "judge".
Desired State
Service URLs should be templated to include the actual release name:
gateway:
archivista:
url: "http://{{ .Release.Name }}-archivista.{{ .Release.Namespace }}.svc.cluster.local:8082"
judgeapi:
url: "http://{{ .Release.Name }}-judge-api.{{ .Release.Namespace }}.svc.cluster.local:8080"
Alternative Solution
Move URL generation to templates using helper functions:
# In _helpers.tpl
{{- define "judge.service.archivistaUrl" -}}
http://{{ include "judge.fullname" . }}-archivista.{{ .Release.Namespace }}.svc.cluster.local:8082
{{- end }}
# In deployment templates
- name: ARCHIVISTA_URL
value: {{ include "judge.service.archivistaUrl" . | quote }}
Files to Update
charts/judge/values.yaml
charts/judge/templates/_helpers.tpl (add helper functions)
- Any deployment templates using these URLs
Impact
- Medium Priority: Important for multi-release deployments
- Enables multiple Judge instances in same cluster
- Follows Helm best practices
Use Cases
- Running dev and staging in same cluster with different release names
- Blue-green deployments
- Canary releases
Testing
# Deploy with custom release name
helm install my-judge ./charts/judge
# Services should be created as:
# my-judge-archivista
# my-judge-judge-api
# my-judge-gateway
Labels
- enhancement
- helm-charts
- multi-tenancy
Fix Location
Helm Charts - Make service URLs configurable based on release name
Template service URLs to support multiple release names
Problem
Service URLs in values.yaml are hardcoded and don't support multiple Helm releases in the same cluster.
Current State
These assume the release name is always "judge".
Desired State
Service URLs should be templated to include the actual release name:
Alternative Solution
Move URL generation to templates using helper functions:
Files to Update
charts/judge/values.yamlcharts/judge/templates/_helpers.tpl(add helper functions)Impact
Use Cases
Testing
Labels
Fix Location
Helm Charts - Make service URLs configurable based on release name