Skip to content

Improve helmchart template adding fields #4952

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ronaldosaheki
Copy link

@ronaldosaheki ronaldosaheki commented Jul 21, 2025

This includes most of changes also discussed in both of this PRs:
ImagePullPolicy: #4932
Align generated helmcharts witth most common helmcharts: #4912

Added fields, changes done in the kustomize, helmchart and values scaffold, following the same style, for kustomize the added fields were added commented out and ready to edit similar to existing fields in kustomize scaffold.

Added fields:

  • Pod annotations
  • Node selector configuration
  • Tolerations for node taints
  • Topology spread constraints for better distribution
  • Image pull secrets for private registries
  • Image pull policy configuration
  • Extra volume mounts for additional configs
  • Extra volumes for the pod

Also updated testdata and docs to pass branch github pipeline.

Add template for nodeSelector, affinity, topologySpreadConstraints,
additional annotations, volumes and imagePullSecrets.

Signed-off-by: Ronaldo Saheki <[email protected]>
Signed-off-by: Ronaldo Saheki <[email protected]>
Copy link

linux-foundation-easycla bot commented Jul 21, 2025

CLA Signed


The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jul 21, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ronaldosaheki
Once this PR has been reviewed and has the lgtm label, please assign kavinjsir for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Welcome @ronaldosaheki!

It looks like this is your first PR to kubernetes-sigs/kubebuilder 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubebuilder has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 21, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @ronaldosaheki. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ronaldosaheki ronaldosaheki changed the title Improve helmchart template adding fields, syncing the changes to kustomize and updating testdata/docs Improve helmchart template adding fields Jul 21, 2025
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 21, 2025
@@ -44,12 +44,37 @@ spec:
# values:
# - amd64
# - arm64
# - ppc64le
# - s390x
Copy link
Member

Choose a reason for hiding this comment

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

We cannot remove those

Comment on lines +93 to +94
# imagePullPolicy for the manager container (e.g., Always, IfNotPresent, Never)
# imagePullPolicy: IfNotPresent
Copy link
Member

Choose a reason for hiding this comment

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

I think we can add that as default
Could we have a PR only for the image

# Extra volumeMounts for the manager container
# volumeMounts:
# - name: extra-config
# mountPath: /etc/extra
Copy link
Member

Choose a reason for hiding this comment

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

I do not know if that will work with the patches but is a good call I think we need a PR for that and e2e tests to ensure that we do not break the behaviour

# - key: kubernetes.io/os
# operator: In
# values:
# - linux
# TODO(user): Uncomment the following code to configure the nodeSelector expression
# annotations, nodeSelector, tolerations, topologySpreadConstraints.
# nodeSelector:
Copy link
Member

Choose a reason for hiding this comment

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

Should it be really added there or via kustomize? Is there a better way to configure it?
We will need to check out and either validate the scenario with e2e tests.
Could we have a PR for those and keep this one only for the imagePull ?

@@ -1,10 +1,29 @@
# [MANAGER]: Manager Deployment Configurations
controllerManager:
replicas: 1
pod:
# imagePullSecrets for pulling images from private registries
imagePullSecrets: []
Copy link
Member

Choose a reason for hiding this comment

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

I think I liked it 👍 less the pod above since all here would be only about controller-manager
See : #4912
The person made a valid feedback about how we are exposing the values

I think we will need to change that we might need a PR just to change what we have today on that
but I want to share it with you.

container:
image:
repository: controller
tag: latest
# imagePullPolicy for the manager container (e.g., Always, IfNotPresent, Never)
Copy link
Member

Choose a reason for hiding this comment

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

Comments are not required.
it is auto-explanatory
And the default as the default avlue IfNotPresent seems the great one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants