Skip to content

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
@arturmkr arturmkr force-pushed the gw-affinity-support-tpl branch 3 times, most recently from 20fc1a3 to 7b671cb Compare June 5, 2025 06:28
@arturmkr arturmkr force-pushed the gw-affinity-support-tpl branch from 7b671cb to f576feb Compare June 5, 2025 06:29
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