Skip to content

Template service URLs to support multiple release names #6

@colek42

Description

@colek42

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

  1. Running dev and staging in same cluster with different release names
  2. Blue-green deployments
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions