Skip to content

Gateway. Enable helm templating in affinity section using tpl #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arturmkr
Copy link

Currently, .Values.affinity is rendered using toYaml, which does not evaluate Helm templates like {{ .Release.Name }}. This makes it impossible to dynamically configure affinity/anti-affinity rules in values files, especially in GitOps workflows (e.g., ArgoCD) or reusable Helm charts.

affinity:
  podAntiAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
            - key: app.kubernetes.io/instance
              operator: In
              values:
                - "{{ .Release.Name }}"
        topologyKey: "kubernetes.io/hostname"

@cla-bot cla-bot bot added the cla-signed label May 27, 2025
@arturmkr arturmkr changed the title Enable helm templating in affinity section using tpl Gateway. Enable helm templating in affinity section using tpl May 27, 2025
Copy link
Member

@nineinchnick nineinchnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the example from the PR description to https://github.com/trinodb/charts/blob/main/tests/trino/test-values.yaml just to make sure the chart renders correctly?

@nineinchnick nineinchnick added the enhancement New feature or request label May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants