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

feat: disable default helm labels #3574

Merged
merged 2 commits into from
May 22, 2024

Conversation

darkweaver87
Copy link
Contributor

@darkweaver87 darkweaver87 commented Feb 13, 2024

Description

While many people might use this chart to install aws load balancer on their K8S with helm, some others might want to use this chart to only generate their yaml files with helm template and let CD solutions (ArgoCD, FluxCD, etc) deploy it.
Thus, this PR let this people remove helm default labels in order to add, for instance, their own app.kubernetes.io/managed-by one.
Inspired by https://github.com/cert-manager/cert-manager/blob/master/deploy/charts/cert-manager/templates/_helpers.tpl#L155.

To test:

helm template helm/aws-load-balancer-controller --set clusterName=test > /tmp/with_labels.yaml
helm template helm/aws-load-balancer-controller --set clusterName=test --set creator=me > /tmp/without_labels.yaml
diff -uw /tmp/with_labels.yaml /tmp/without_labels.yaml

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

Copy link

linux-foundation-easycla bot commented Feb 13, 2024

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 Feb 13, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @darkweaver87!

It looks like this is your first PR to kubernetes-sigs/aws-load-balancer-controller 🎉. 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/aws-load-balancer-controller 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 the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 13, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @darkweaver87. 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 13, 2024
@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 Feb 13, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 19, 2024
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 29, 2024
@oliviassss
Copy link
Collaborator

/ok-to-test
@darkweaver87, sorry for the delay, this change lgtm, can you rebase the main? also please put the manual test you've done in the PR description. Thanks

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 21, 2024
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 22, 2024
@darkweaver87
Copy link
Contributor Author

Thanks @oliviassss, rebase done :-)

@oliviassss oliviassss added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label May 22, 2024
@oliviassss
Copy link
Collaborator

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 22, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: darkweaver87, oliviassss

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

The pull request process is described 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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 22, 2024
@k8s-ci-robot k8s-ci-robot merged commit b389ac9 into kubernetes-sigs:main May 22, 2024
5 checks passed
oliviassss pushed a commit to oliviassss/aws-load-balancer-controller that referenced this pull request May 30, 2024
* feat: disable helm labels

* fix: doc
@oliviassss oliviassss mentioned this pull request May 30, 2024
6 tasks
oliviassss added a commit that referenced this pull request May 30, 2024
* update the traffic test for ingress (#3725)

* update the traffic test for ingress

* make crds

* prevent controller runtime complaining about SetupLogger() was never called (#3724)

* Update go to v1.22, controller-runtime dependency to v0.18.2, and kubernetes libs to v0.30.0 (#3707)

* go version, dep version

* refactor for controller-runtime udpate

* update tests, fix if statement

the controller-runtime strips DeletionTimestamp from manifests on
Create(). kubernetes-sigs/controller-runtime#2316

* refactor tests

* remove placeholder comments

* remove reconciler from WithOptions

* remove DefaultNamespace cache option

* remote `&& !hasGroupFinalizer`

This was causing e2e tests to fail when an ingress did not have the
group finalizer. The unit tests ing-1_been_deleted, and ing-6_been_deleted
will need reworked due to changes in the controller-runtime that cause
them to fail.

* update unit tests for ctrl client/fake >0.15

controller-runtime >=0.15 does not support creating (or adding the field via Update()) objects with a DeletionTimestamp. To work around this we add an annotation `unit-test/delete` to mark the ingresses that we want to test deletion. We check for this annotation and then call Delete(). This will set the DeletionTimestamp to the current date and time so we use IgnoreOtherFields to skip then comparing want to got.

relevant controller-runtime discussion/pr:

- kubernetes-sigs/controller-runtime#2184 (comment)
- kubernetes-sigs/controller-runtime#2316

* remove unused contexts

* add DefaultNamespaces cache config

* set opt.Cache.DefaultNamespaces conditionally

If WatchNamespace is set to corev1.NamespaceAll we should not set
DefaultNamespaces.

This code assumes that only one namespace is specified for
WatchNamespace. That decision was based on the help text for the flag
`watch-namespace`.

Related controller-runtime issue: kubernetes-sigs/controller-runtime#2628

* make crds

* set go to v1.22.3

* restrict resolve resolveViaVPCENIs to fargate only (#3709)

* Added helm envFrom value parameter for cluster-name (#3683)

* Added helm envFrom value parameter for cluster-name

* Update README.md file

* Add envFrom configuration to values.yaml

* Remove empty line in values.yaml

* feat: disable default helm labels (#3574)

* feat: disable helm labels

* fix: doc

* Update README.md (#3638)

Remove extra / in crds

---------

Co-authored-by: Luke Arntz <luke@blue42.net>
Co-authored-by: Omer Aplatony <61663422+omerap12@users.noreply.github.com>
Co-authored-by: Rémi BUISSON <remi-buisson@orange.fr>
Co-authored-by: Mike Wilson <hyperbolic2346@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants