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

allow install regiatration agent using multicluster controlplane in join command #338

Conversation

ycyaoxdu
Copy link
Member

No description provided.

@openshift-ci openshift-ci bot requested review from itdove and qiujian16 May 16, 2023 06:28
@ycyaoxdu ycyaoxdu changed the title allow install regiatration agent using multicluster controlplane in join command [WIP]allow install regiatration agent using multicluster controlplane in join command May 16, 2023
@ycyaoxdu
Copy link
Member Author

#323

@ycyaoxdu ycyaoxdu force-pushed the allow-join-controlplane-agent branch from 36be8c4 to e2e6c62 Compare May 18, 2023 07:18
@ycyaoxdu ycyaoxdu changed the title [WIP]allow install regiatration agent using multicluster controlplane in join command allow install regiatration agent using multicluster controlplane in join command May 18, 2023
pkg/cmd/join/cmd.go Outdated Show resolved Hide resolved
pkg/cmd/join/exec.go Outdated Show resolved Hide resolved
_ = klusterletSet.SetAnnotation("managed-cluster-kubeconfig", "mode-orinted", []string{"hosted"})

//controlplaneAgentSet contains the flags for deploy controlplane agent
controlplaneAgentSet := pflag.NewFlagSet("controlplane-agent", pflag.ExitOnError)
Copy link
Member

Choose a reason for hiding this comment

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

controlplane-agent is confusing. I would use standalone

pkg/cmd/join/cmd.go Outdated Show resolved Hide resolved
@ycyaoxdu ycyaoxdu force-pushed the allow-join-controlplane-agent branch 2 times, most recently from 9ba43ea to 4d895bd Compare May 25, 2023 09:30
@@ -62,5 +62,7 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream
cmd.Flags().BoolVar(&o.wait, "wait", false, "If true, running the cluster registration in foreground.")
cmd.Flags().StringVarP(&o.mode, "mode", "m", "default", "mode to deploy klusterlet, can be default or hosted")
cmd.Flags().StringVar(&o.managedKubeconfigFile, "managed-cluster-kubeconfig", "", "To specify the directory to external managed cluster kubeconfig in hosted mode")
cmd.Flags().BoolVar(&o.standalone, "standalone", false, "If true, deploy standalone controlplane agent instead of klusterlet")
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 put a note here indicate it is still a feature in alpha stage

Copy link
Contributor

Choose a reason for hiding this comment

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

we should not call at as standalone. it is misleading. maybe we just use multicluster-controlplane instead.

Copy link
Member

Choose a reason for hiding this comment

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

IMHO, it is hard to understand what is multicluster-controlplane. It is a project name rather than how we deploy the agent. And in the long term, we probably will build the standalone agent directly from the ocm repo.

pkg/cmd/join/exec.go Outdated Show resolved Hide resolved
files = append(files,
"join/hosted/external_managed_kubeconfig.yaml",
"standalone/bootstrap_hub_kubeconfig.yaml",
Copy link
Member

Choose a reason for hiding this comment

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

why this is different from the one for join command?

pkg/cmd/join/exec.go Outdated Show resolved Hide resolved
@ycyaoxdu ycyaoxdu force-pushed the allow-join-controlplane-agent branch 4 times, most recently from ebde4a8 to b41b580 Compare May 29, 2023 05:47
@ycyaoxdu ycyaoxdu requested review from qiujian16 and clyang82 May 29, 2023 06:08
@ycyaoxdu ycyaoxdu force-pushed the allow-join-controlplane-agent branch 4 times, most recently from 366ca18 to 84caac2 Compare May 31, 2023 06:32
Signed-off-by: yuchenyao <yaoyuchen0626@163.com>
@ycyaoxdu ycyaoxdu force-pushed the allow-join-controlplane-agent branch from 84caac2 to 0e3a500 Compare May 31, 2023 07:09
@qiujian16
Copy link
Member

/approve
/lgtm

@openshift-ci
Copy link

openshift-ci bot commented May 31, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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 b0d983b into open-cluster-management-io:main May 31, 2023
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.

4 participants