Skip to content
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

Enable Helm Template for the Pod affinity #353

Open
joachimBurket opened this issue Sep 5, 2024 · 1 comment
Open

Enable Helm Template for the Pod affinity #353

joachimBurket opened this issue Sep 5, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@joachimBurket
Copy link

Details

Describe the solution you'd like:

Allow to use Helm Template for fields in the affinity block (e.g. defaultPodOptions.affinity).

Additional Information:

I like to set the podAntiAffinity on the hostname to avoid having two Pods of the same application running on the same hosts. Generally, I configure it like so:

[....]
podAntiAffinity:
  requiredDuringSchedulingIgnoredDuringExecution:
    - labelSelector:
        matchExpressions:
          - key: app
            operator: In
            values:
              - "my-app"
      topologyKey: kubernetes.io/hostname
  preferredDuringSchedulingIgnoredDuringExecution:
    - podAffinityTerm:
        labelSelector:
          matchExpressions:
            - key: app
              operator: In
              values:
                - "my-app"
        topologyKey: region
[....]

Enabling Helm Template for the affinity block would allow me to make this re-usable for all my applications, changing my-app by {{ Release.Name }}

@joachimBurket joachimBurket added the enhancement New feature or request label Sep 5, 2024
@joachimBurket
Copy link
Author

Huge thanks for your incredible work btw! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants