-
Notifications
You must be signed in to change notification settings - Fork 25
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: add cloudConfig support in member-agent #939
Conversation
b6ae16f
to
27aa8f2
Compare
cmd/memberagent/main.go
Outdated
@@ -317,7 +320,7 @@ func Start(ctx context.Context, hubCfg, memberConfig *rest.Config, hubOpts, memb | |||
discoverClient := discovery.NewDiscoveryClientForConfigOrDie(memberConfig) | |||
|
|||
if *enableV1Alpha1APIs { | |||
gvk := workv1alpha1.SchemeGroupVersion.WithKind(workv1alpha1.AppliedWorkKind) | |||
gvk := schema.GroupVersionKind{Group: workv1alpha1.GroupVersion.Group, Version: workv1alpha1.GroupVersion.Version, Kind: workv1alpha1.AppliedWorkKind} |
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.
just curious why we need this change?
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.
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.
got it, we can do the refactor in a separate PR.
Since it's about v1alpha1 feature, it's not required cause we will deprecate v1alpha1 API.
@@ -69,6 +70,9 @@ type PropertyProvider struct { | |||
// The controller manager in use by the Azure property provider; this field is mostly reserved for | |||
// testing purposes. | |||
mgr ctrl.Manager | |||
|
|||
// The cloud configuration in use by the Azure property provider. | |||
cloudConfig cloudconfig.CloudConfig |
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.
what you need is an azure client. It's better to initialize the client in the main func, so that it can be shared by the whole component.
here we don't need to pass in the whole cloudConfig
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.
Would that mean we would initialize all the clients we needed too? I also need armnetwork.NewVirtualNetworksClient
Which is why I wanted to originally pass it.
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.
yes, passing all the clients if needed.
pkg/propertyprovider/azure/cloudconfig/test/azure_valid_config.yaml
Outdated
Show resolved
Hide resolved
8d9b392
to
c3679c2
Compare
37fbf1a
to
f626124
Compare
25112d1
to
90599f7
Compare
677edf3
to
d26c8fe
Compare
LGTM, thanks :) |
2f9585f
to
ffc0979
Compare
Description of your changes
Fixes #
I have: updated helm chart for member-agent to support cloud config
make reviewable
to ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer