Skip to content
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 setting manifest work config for agents #214

Merged

Conversation

zhujian7
Copy link
Member

@zhujian7 zhujian7 commented Oct 19, 2023

With this, the addonTemplate can set the ManifestConfigs for the generated manifestworks

@openshift-ci openshift-ci bot requested review from deads2k and elgnay October 19, 2023 07:59
@zhujian7
Copy link
Member Author

/cc @qiujian16 @zhiweiyin318

pkg/agent/inteface.go Outdated Show resolved Hide resolved
pkg/addonmanager/controllers/agentdeploy/utils.go Outdated Show resolved Hide resolved

func containsFeedbackRule(rules []workapiv1.FeedbackRule, rule workapiv1.FeedbackRule) bool {
for _, r := range rules {
if reflect.DeepEqual(r, rule) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually we may only compare the name of the rule. It won't work if you have two rules with the same name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean the jsonpath.name? so if they have the same name but a different path, should we override the old one with the agentOption.ManifestConfigs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we have to decide override or not, but comparing name only should be good enough.

Signed-off-by: zhujian <jiazhu@redhat.com>
Signed-off-by: zhujian <jiazhu@redhat.com>
@@ -518,18 +517,17 @@ func getManifestConfigOption(agentAddon agent.AgentAddon,
}
}

emc := agentAddon.GetAgentAddonOptions().ManifestConfigs
for _, mc := range emc {
aaomc := agentAddon.GetAgentAddonOptions().ManifestConfigs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does aaomc stands for :). You might want a more meaningful name, event it is longer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agentAddonOptionsManifestConfigs, but I changed it to userConfiguredManifestConfigs

Signed-off-by: zhujian <jiazhu@redhat.com>
@qiujian16
Copy link
Member

/approve
/lgtm

Copy link
Contributor

openshift-ci bot commented Nov 1, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Nov 1, 2023
@openshift-ci openshift-ci bot merged commit ec48c5d into open-cluster-management-io:main Nov 1, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants