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 generic resource handling #966

Merged
merged 3 commits into from
Oct 13, 2023
Merged

Conversation

skitt
Copy link
Member

@skitt skitt commented Oct 6, 2023

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr966/skitt/generic-resource
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

@skitt skitt changed the title Use generic resource handlers Use generic resource handling Oct 6, 2023
@skitt skitt force-pushed the generic-resource branch 7 times, most recently from c823e23 to 6962985 Compare October 10, 2023 14:31
@@ -45,8 +44,8 @@ const (

func ensure(ctx context.Context, kubeClient kubernetes.Interface, namespace string, sa *corev1.ServiceAccount) (bool, error) {
result, err := util.CreateOrUpdate(ctx, resource.ForServiceAccount(kubeClient, namespace), sa,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
result, err := util.CreateOrUpdate(ctx, resource.ForServiceAccount(kubeClient, namespace), sa,
result, err := util.CreateOrUpdate[*corev1.ServiceAccount](ctx, resource.ForServiceAccount(kubeClient, namespace), sa,

Copy link
Member Author

Choose a reason for hiding this comment

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

I rather like letting the compiler infer the type 😉

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah but you've specified the type explicitly in other places so for consistency.... but it doesn't matter either way, that's why I didn't -1 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I thought I’d dropped the type parameters everywhere they weren’t needed, but I missed some.

Signed-off-by: Stephen Kitt <[email protected]>
@tpantelis tpantelis enabled auto-merge (rebase) October 11, 2023 23:27
@submariner-bot submariner-bot added the ready-to-test When a PR is ready for full E2E testing label Oct 12, 2023
@tpantelis tpantelis disabled auto-merge October 13, 2023 12:49
@tpantelis tpantelis enabled auto-merge (rebase) October 13, 2023 13:19
@tpantelis tpantelis disabled auto-merge October 13, 2023 13:19
@tpantelis tpantelis merged commit 84ae622 into submariner-io:devel Oct 13, 2023
27 of 28 checks passed
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr966/skitt/generic-resource]

@skitt skitt deleted the generic-resource branch October 13, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-test When a PR is ready for full E2E testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants