-
Notifications
You must be signed in to change notification settings - Fork 41
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
update cma config reference #163
update cma config reference #163
Conversation
b19eba6
to
71c618b
Compare
71c618b
to
618b77e
Compare
618b77e
to
5e78d6c
Compare
9016b79
to
822dcab
Compare
Signed-off-by: haoqing0110 <[email protected]>
pkg/addonmanager/controllers/managementaddonconfig/controller.go
Outdated
Show resolved
Hide resolved
pkg/addonmanager/controllers/managementaddonconfig/controller.go
Outdated
Show resolved
Hide resolved
|
||
func getInstallConfigIndex(config addonapiv1alpha1.InstallConfigReference) string { | ||
if config.DesiredConfig.Namespace != "" { | ||
return fmt.Sprintf("%s/%s/%s/%s", config.Group, config.Resource, config.DesiredConfig.Namespace, config.DesiredConfig.Name) |
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 think the index for empty namespace could "foo/bar//name". This is still unique for each one, right?
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, still unique for each one, to check if namespace is empty or not is to make it easy to use cache.DeletionHandlingMetaNamespaceKeyFunc(obj)
to get above namespace/name
or name
I think.
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.
to may understanding DeletionHandlingMetaNamespaceKeyFunc can also handle /name as name, the returned namespace is just empty
pkg/addonmanager/controllers/managementaddonconfig/controller.go
Outdated
Show resolved
Hide resolved
pkg/addonmanager/controllers/managementaddonconfig/controller.go
Outdated
Show resolved
Hide resolved
pkg/addonmanager/controllers/managementaddonconfig/controller.go
Outdated
Show resolved
Hide resolved
37d1110
to
49073aa
Compare
@@ -171,13 +172,20 @@ func (a *addonManager) Start(ctx context.Context) error { | |||
) | |||
|
|||
var addonConfigController factory.Controller | |||
var managementAddonConfigController factory.Controller | |||
if len(a.addonConfigs) != 0 { | |||
addonConfigController = addonconfig.NewAddonConfigController( |
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 we still need to keep this controller if addon manager is enabled?
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, the addonConfigController is responsible to update spec hash for mca.spec.configs when addon manager is enabled.
pkg/addonmanager/controllers/managementaddonconfig/controller.go
Outdated
Show resolved
Hide resolved
pkg/addonmanager/controllers/managementaddonconfig/controller.go
Outdated
Show resolved
Hide resolved
pkg/addonmanager/controllers/managementaddonconfig/controller.go
Outdated
Show resolved
Hide resolved
pkg/addonmanager/controllers/managementaddonconfig/controller.go
Outdated
Show resolved
Hide resolved
pkg/addonmanager/controllers/managementaddonconfig/controller.go
Outdated
Show resolved
Hide resolved
Signed-off-by: haoqing0110 <[email protected]>
49073aa
to
2c060bc
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haoqing0110, qiujian16 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 |
this PR is to update the config reference in cma status, it is part of the implementation of rollout strategy
Ref: open-cluster-management-io/ocm#114