-
Notifications
You must be signed in to change notification settings - Fork 23
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
Conversation
🤖 Created branch: z_pr966/skitt/generic-resource |
c823e23
to
6962985
Compare
@@ -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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result, err := util.CreateOrUpdate(ctx, resource.ForServiceAccount(kubeClient, namespace), sa, | |
result, err := util.CreateOrUpdate[*corev1.ServiceAccount](ctx, resource.ForServiceAccount(kubeClient, namespace), sa, |
There was a problem hiding this comment.
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 😉
There was a problem hiding this comment.
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 😄
There was a problem hiding this comment.
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.
6962985
to
2f37c7c
Compare
2f37c7c
to
a990422
Compare
Signed-off-by: Stephen Kitt <[email protected]>
a990422
to
f9a6309
Compare
🤖 Closed branches: [z_pr966/skitt/generic-resource] |
Depends on submariner-io/admiral#756
Depends on submariner-io/admiral#760
Depends on submariner-io/cloud-prepare#817
Depends on submariner-io/lighthouse#1402
Depends on submariner-io/submariner#2742
Depends on submariner-io/submariner-operator#2839