-
Notifications
You must be signed in to change notification settings - Fork 94
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
✨ Support override addon images by the cluster's annotation #231
✨ Support override addon images by the cluster's annotation #231
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #231 +/- ##
==========================================
+ Coverage 60.28% 60.37% +0.09%
==========================================
Files 132 132
Lines 13563 13590 +27
==========================================
+ Hits 8176 8205 +29
+ Misses 4632 4631 -1
+ Partials 755 754 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
/hold |
pkg/addon/templateagent/values.go
Outdated
} | ||
|
||
imageRegistries := ImageRegistries{} | ||
err := json.Unmarshal([]byte(annotations[ClusterImageRegistriesAnnotation]), &imageRegistries) |
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.
can it be unmarshalled correctly if there is pullSecret filed in the annotation?
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
df59374
to
caf17fd
Compare
/unhold |
Signed-off-by: zhujian <jiazhu@redhat.com>
Signed-off-by: zhujian <jiazhu@redhat.com>
Signed-off-by: zhujian <jiazhu@redhat.com>
Signed-off-by: zhujian <jiazhu@redhat.com>
89ed336
to
e966eba
Compare
/unhold |
@@ -116,6 +117,9 @@ func (a *CRDTemplateAgentAddon) GetAgentAddonOptions() agent.AgentAddonOptions { | |||
CSRApproveCheck: a.TemplateCSRApproveCheckFunc(), | |||
CSRSign: a.TemplateCSRSignFunc(), | |||
}, | |||
AgentDeployTriggerClusterFilter: func(old, new *clusterv1.ManagedCluster) bool { | |||
return !equality.Semantic.DeepEqual(old.Annotations, new.Annotations) |
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.
do you think we should only check the change of certain key? to reduce the reconcile call.
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, PTAL
ef22e4e
to
eae9def
Compare
Signed-off-by: zhujian <jiazhu@redhat.com>
eae9def
to
e0e0545
Compare
/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 |
a9dae60
into
open-cluster-management-io:main
Summary
Make the addon manger support override addon agents' images by the cluster's annotation.
If the managedCluster has annotation
open-cluster-management.io/image-registries
in format:For example:
The addon-manager will override agent images for all the template-type addons whose images can match the
source
field.Related issue(s)
Fixes #