-
Notifications
You must be signed in to change notification settings - Fork 63
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
Affinity rules enable by default (why is not disabled?) #21
Comments
I would like this code will be like here {{- if .affinity }}
affinity: {{- include "helpers.tplvalues.render" ( dict "value" .affinity "context" $) | nindent 8 }}
{{- else }}
{{- if $general.enableAffinity | default false }}
affinity:
nodeAffinity: {{- include "helpers.affinities.nodes" (dict "type" $.Values.nodeAffinityPreset.type "key" $.Values.nodeAffinityPreset.key "values" $.Values.nodeAffinityPreset.values) | nindent 10 }}
podAffinity: {{- include "helpers.affinities.pods" (dict "type" $.Values.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "helpers.affinities.pods" (dict "type" $.Values.podAntiAffinityPreset "context" $) | nindent 10 }}
{{- end }}
{{- end }} Then values.yaml need to add this parameters
|
Hi @GRomR1. Thanks for your issue. This is good point. We'll work on this idea in the next release. To disable the creation of affinities now, set the following values in your values file: podAffinityPreset: nil
podAntiAffinityPreset: nil As a result, you will get an empty affinity block: ...
affinity:
nodeAffinity:
podAffinity:
podAntiAffinity:
... |
@randreev1321 many thanks! Btw you create a great product, I wonder that no one made this before. |
Hi, @GRomR1. Thanks for provided Pull Requests, its great. I made a bit updates:
I made this because name However, you now have the opportunity to manage this behavior. Although the option is set to |
Is it possible don't add any affinity rules by default? I think is should be an option to enable them. By default they should be disabled. Am I right?
How to reproduce?
Create some values file
Run generate k8s manifests with this value file
The generated result was here.
The text was updated successfully, but these errors were encountered: