Skip to content

Add: Pod affinity#189

Open
JPaja wants to merge 4 commits intoarttor:mainfrom
JPaja:feat/pod-affinity
Open

Add: Pod affinity#189
JPaja wants to merge 4 commits intoarttor:mainfrom
JPaja:feat/pod-affinity

Conversation

@JPaja
Copy link
Copy Markdown

@JPaja JPaja commented Jan 4, 2026

Adds support for affinity field under Pod resource

@Madhu-1
Copy link
Copy Markdown

Madhu-1 commented Feb 11, 2026

@arttor can you please help with review. Thank you

@arttor
Copy link
Copy Markdown
Owner

arttor commented Feb 11, 2026

looks good. can you please add affinity to one of the resoruces in https://github.com/arttor/helmify/blob/main/test_data/sample-app.yaml and regenerate examples?

See: https://github.com/arttor/helmify/blob/main/test_data/sample-app.yaml

@JPaja
Copy link
Copy Markdown
Author

JPaja commented Feb 11, 2026

looks good. can you please add affinity to one of the resoruces in https://github.com/arttor/helmify/blob/main/test_data/sample-app.yaml and regenerate examples?

See: https://github.com/arttor/helmify/blob/main/test_data/sample-app.yaml

Done

labels:
app: nginx
spec:
affinity: {{- toYaml .Values.web.affinity | nindent 8 }}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I can see that affinity was added to myapp deployment and it was correctly templated and added to values.yaml. But why manifests without affinity in soruce were templated?

name: fluentd-elasticsearch
{{- include "app.selectorLabels" . | nindent 8 }}
spec:
affinity: {{- toYaml .Values.fluentdElasticsearch.affinity | nindent 8 }}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I can see that affinity was added to myapp deployment and it was correctly templated and added to values.yaml. But why manifests without affinity in soruce were templated?

spec:
template:
spec:
affinity: {{- toYaml .Values.cronJob.affinity | nindent 12 }}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I can see that affinity was added to myapp deployment and it was correctly templated and added to values.yaml. But why manifests without affinity in soruce were templated?

backoffLimit: {{ .Values.batchJob.backoffLimit }}
template:
spec:
affinity: {{- toYaml .Values.batchJob.affinity | nindent 8 }}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I can see that affinity was added to myapp deployment and it was correctly templated and added to values.yaml. But why manifests without affinity in soruce were templated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants