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

make pull cluster to be able to register with proxy-server #4076

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/karmadactl/register/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ func NewCmdRegister(parentCommand string) *cobra.Command {
flags.Int32Var(&opts.KarmadaAgentReplicas, "karmada-agent-replicas", 1, "Karmada agent replicas.")
flags.Int32Var(&opts.CertExpirationSeconds, "cert-expiration-seconds", DefaultCertExpirationSeconds, "The expiration time of certificate.")
flags.BoolVar(&opts.DryRun, "dry-run", false, "Run the command in dry-run mode, without making any server requests.")
flags.StringVar(&opts.ProxyServerAddress, "proxy-server-address", "", "Address of the proxy server that is used to proxy to the cluster.")

return cmd
}
Expand Down Expand Up @@ -237,6 +238,9 @@ type CommandRegisterOption struct {
// DryRun tells if run the command in dry-run mode, without making any server requests.
DryRun bool

// ProxyServerAddress holds the proxy server address that is used to proxy to the cluster.
ProxyServerAddress string

memberClusterEndpoint string
memberClusterClient *kubeclient.Clientset
}
Expand Down Expand Up @@ -674,6 +678,7 @@ func (o *CommandRegisterOption) makeKarmadaAgentDeployment() *appsv1.Deployment
fmt.Sprintf("--cluster-region=%s", o.ClusterRegion),
fmt.Sprintf("--cluster-zones=%s", strings.Join(o.ClusterZones, ",")),
fmt.Sprintf("--controllers=%s", strings.Join(controllers, ",")),
fmt.Sprintf("--proxy-server-address=%s", o.ProxyServerAddress),
"--cluster-status-update-frequency=10s",
"--bind-address=0.0.0.0",
"--secure-port=10357",
Expand Down
Loading