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

provide option to configure agent install strategy #10

Conversation

TheRealHaoLiu
Copy link
Member

@TheRealHaoLiu TheRealHaoLiu commented Jan 19, 2022

previous strategy enable managed-serviceaccount addon on all managedclusters, user is not able to disable the addon by removing the ManagedClusterAddon resource

the proposed change add a new option agent-install-all to the binary

if agent-install-all == true enable agent on all managed clusters
if agent-install-all == false do not enable agent by default and the addon will only be enabled when a ManagedClusterAddon is created in the cluster namespace and will be disabled when the ManagedClusterAddon is deleted

example ManagedClusterAddon

apiVersion: addon.open-cluster-management.io/v1alpha1
kind: ManagedClusterAddOn
metadata:
  name: managed-serviceaccount
  namespace: hao-aks
spec:
  installNamespace: open-cluster-management-managed-serviceaccount

@@ -52,7 +52,7 @@ func (m *managedServiceAccountAddonAgent) GetAgentAddonOptions() agent.AgentAddo
CSRApproveCheck: agent.ApprovalAllCSRs,
PermissionConfig: m.setupPermission,
},
InstallStrategy: agent.InstallAllStrategy(common.AddonAgentInstallNamespace),
InstallStrategy: nil,
Copy link
Member

Choose a reason for hiding this comment

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

We should introduce a flag for this

Copy link
Member

Choose a reason for hiding this comment

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

i think so, let's add an flag

Copy link
Member Author

Choose a reason for hiding this comment

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

Good plan, I will add a flag

What should be the default behavior?

Copy link
Member

Choose a reason for hiding this comment

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

Let's set the default behavior as-is

Copy link
Member Author

Choose a reason for hiding this comment

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

updated the default value in the chart

@TheRealHaoLiu TheRealHaoLiu changed the title change addon install strategy to manual provide option to configure agent install strategy Jan 20, 2022
@TheRealHaoLiu
Copy link
Member Author

/retest

Signed-off-by: Hao Liu <haoli@redhat.com>
@qiujian16
Copy link
Member

/approve
/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Jan 26, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, TheRealHaoLiu

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-merge-robot openshift-merge-robot merged commit a5e95f8 into open-cluster-management-io:main Jan 26, 2022
nathanweatherly added a commit to nathanweatherly/managed-serviceaccount-1 that referenced this pull request Mar 21, 2022
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

5 participants