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

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

Merged
merged 1 commit into from
May 29, 2024

Conversation

oliviassss
Copy link
Collaborator

…called

Issue

fix the error message in e2e test logs that the controller runtime complains about SetupLogger() was never called

[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed.

reference: solo-io/gloo#8549

Description

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 🌟

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 29, 2024
@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 29, 2024
Copy link
Collaborator

@M00nF1sh M00nF1sh left a comment

Choose a reason for hiding this comment

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

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: M00nF1sh, 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:
  • OWNERS [M00nF1sh,oliviassss]

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

@oliviassss oliviassss merged commit f5dee3f into kubernetes-sigs:main May 29, 2024
7 of 9 checks passed
oliviassss added a commit to oliviassss/aws-load-balancer-controller that referenced this pull request May 30, 2024
@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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants