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

Use ObjectKeyFromObject instead of ObjectKey #405

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

darkowlzz
Copy link
Contributor

controller-runtime's client package provides ObjectKeyFromObject() to
extract NamespacedName from a given object. ObjectKey() in
internal/util package is a helper for the same. Replace the internal
helper with controller-runtime's helper for the same.

controller-runtime's client package provides ObjectKeyFromObject() to
extract NamespacedName from a given object. ObjectKey() in
internal/util package is a helper for the same. Replace the internal
helper with controller-runtime's helper for the same.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
Copy link
Member

@makkes makkes left a comment

Choose a reason for hiding this comment

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

I like that

@makkes
Copy link
Member

makkes commented Jul 26, 2021

@darkowlzz if this gets merged, would you mind opening PRs in the other repos, too, if needed (helm-controller, kustomize-controller, flux2, etc.)?

@darkowlzz
Copy link
Contributor Author

darkowlzz commented Jul 26, 2021

@darkowlzz if this gets merged, would you mind opening PRs in the other repos, too, if needed (helm-controller, kustomize-controller, flux2, etc.)?

@makkes Sure, I can do that. Thanks 🙂

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

This should be used everywhere else already (iirc the internal method here predates the utility in controller-runtime), thank you @darkowlzz 🌞

@hiddeco hiddeco merged commit dbaf8bf into fluxcd:main Jul 26, 2021
@darkowlzz darkowlzz deleted the client-objectkeyfromobject branch July 26, 2021 09:37
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