Skip to content

[bitnami/common] add namespaces to extraPodAffinityTerms for affinities#33173

Merged
juan131 merged 8 commits intobitnami:mainfrom
klamas1:main
Apr 30, 2025
Merged

[bitnami/common] add namespaces to extraPodAffinityTerms for affinities#33173
juan131 merged 8 commits intobitnami:mainfrom
klamas1:main

Conversation

@klamas1
Copy link
Contributor

@klamas1 klamas1 commented Apr 24, 2025

Fix indentation and namespace handling in affinity helpers

Changes

  1. Fixed indentation in common.affinities.pods.hard:

    • namespaces is now at the same level as labelSelector
    • Fixed indentation for common.tplvalues.render from nindent 10 to nindent 8
  2. Unified namespace handling in both helpers (soft and hard):

    • Current namespace is automatically added in the base rule via {{ .context.Release.Namespace }}
    • Current namespace is also automatically added in additional rules via {{ $.context.Release.Namespace }} because in range
    • Additional namespaces are added after the current namespace via common.tplvalues.render
  3. Preserved dashes before include to prevent line breaks when using nindent

Example of correct YAML structure

requiredDuringSchedulingIgnoredDuringExecution:
  - labelSelector:
      matchLabels:
        ...
    namespaces:
      - current-namespace
      - additional-namespace1
      - additional-namespace2
    topologyKey: ...

Testing

Changes were tested on Helm chart rendering with various namespace configurations.

Benefits

Possible drawbacks

Not found

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

klamas1 added 4 commits April 24, 2025 17:19
Signed-off-by: klamas1 <klamas1@gmail.com>
…example

Signed-off-by: klamas1 <klamas1@gmail.com>
…example

Signed-off-by: klamas1 <klamas1@gmail.com>
@github-actions github-actions bot added common triage Triage is needed labels Apr 24, 2025
@github-actions github-actions bot requested a review from javsalgar April 24, 2025 18:07
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
@javsalgar javsalgar added verify Execute verification workflow for these changes in-progress labels Apr 25, 2025
@github-actions github-actions bot removed the triage Triage is needed label Apr 25, 2025
@github-actions github-actions bot removed the request for review from javsalgar April 25, 2025 06:47
@github-actions github-actions bot requested a review from juan131 April 25, 2025 06:47
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
Copy link
Contributor

@juan131 juan131 left a comment

Choose a reason for hiding this comment

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

The changes LGTM, but please ensure you merge the latest changes in the origin's main branch in your fork's branch and then, update the PR. Thanks in advance.

klamas1 and others added 2 commits April 30, 2025 16:02
Signed-off-by: Rakhimov Marat <klamas1@gmail.com>
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
@klamas1 klamas1 requested a review from juan131 April 30, 2025 11:09
Copy link
Contributor

@juan131 juan131 left a comment

Choose a reason for hiding this comment

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

LGTM

@juan131 juan131 merged commit 4e35d60 into bitnami:main Apr 30, 2025
11 checks passed
jpinxten pushed a commit to jpinxten/bitnami-charts that referenced this pull request May 5, 2025
…es (bitnami#33173)

Signed-off-by: jpinxten <jeroen.pinxten@icometrix.com>
rstribrn pushed a commit to rstribrn/bitnami_charts that referenced this pull request May 9, 2025
QustodioPablo pushed a commit to QustodioPablo/charts that referenced this pull request May 16, 2025
…es (bitnami#33173)

Signed-off-by: Pablo Fernandez <pablo.fernandez@qustodio.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common solved verify Execute verification workflow for these changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants