-
Notifications
You must be signed in to change notification settings - Fork 40
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
make the agent deploy controller watch the managed cluster #199
make the agent deploy controller watch the managed cluster #199
Conversation
Signed-off-by: zhujian <jiazhu@redhat.com>
10f5803
to
03db4ac
Compare
/assign @qiujian16 @zhiweiyin318 |
pkg/agent/inteface.go
Outdated
// AgentDeployClusterInformerFilter: func(old, new *clusterv1.ManagedCluster) bool { | ||
// return !equality.Semantic.DeepEqual(old.Annotations, new.Annotations) | ||
// } | ||
AgentDeployClusterInformerFilter func(old, new *clusterv1.ManagedCluster) bool |
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.
AgentDeployClusterInformerFilter func(old, new *clusterv1.ManagedCluster) bool | |
AgentDeployTriggerClusterFilter func(old, new *clusterv1.ManagedCluster) bool |
something like this?
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.
ok, fixed
pkg/agent/inteface.go
Outdated
@@ -76,6 +76,19 @@ type AgentAddonOptions struct { | |||
// SupportedConfigGVRs is a list of addon supported configuration GroupVersionResource | |||
// each configuration GroupVersionResource should be unique | |||
SupportedConfigGVRs []schema.GroupVersionResource | |||
|
|||
// AgentDeployClusterInformerFilter defines the filter function for the cluster informer when deploying the addon |
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.
the filter func to trigger the agent deploy/redploy when cluster info is changed.
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.
fixed
Signed-off-by: zhujian <jiazhu@redhat.com>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiujian16, zhujian7 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:
Approvers can indicate their approval by writing |
822eeca
into
open-cluster-management-io:main
Provide an option for developer to make the agent deploy controller watches the managed cluster, so if there are any changes on the managed cluster, the agent deploy controller can reconcile quickly
for example: if a helm addon wants managed cluster annotation changing trigger the agent redeploy:
issue reference: #198