Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ Install specific built-in add-on(s) to the hub cluster.

Enable specific add-on(s) agent deployment to the given managed clusters of the specify namespace

`clusteradm addon enable --name application-manager --namespace <namespace> --cluster <cluster1>,<cluster2>,....`
`clusteradm addon enable --names application-manager --namespace <namespace> --clusters <cluster1>,<cluster2>,....`
2 changes: 1 addition & 1 deletion pkg/cmd/accept/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags
//A list of comma separated cluster names
Clusters string
Expand Down
14 changes: 7 additions & 7 deletions pkg/cmd/addon/disable/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
)

var example = `
# Disable application-manager addon on speccified clusters
%[1]s addon disable --name application-manager --cluster cluster1,cluster2
# Disable application-manager addon on specified clusters
%[1]s addon disable --names application-manager --clusters cluster1,cluster2
# Disable application-manager addon on all clusters
%[1]s addon disable --name application-manager --all-clusters
# Disable application-manager addon to the given managed clusters of the specify namespace
%[1]s addon disable --names application-manager --namespace <namespace> --cluster <cluster1>
%[1]s addon disable --names application-manager --all-clusters
# Disable application-manager addon to the given managed clusters in the specified namespace
%[1]s addon disable --names application-manager --namespace <namespace> --clusters <cluster1>
`

// NewCmd...
Expand Down Expand Up @@ -50,8 +50,8 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream
},
}

cmd.Flags().StringSliceVar(&o.Names, "name", []string{}, "Names of the add-on to deploy (comma separated)")
cmd.Flags().StringSliceVar(&o.Clusters, "cluster", []string{}, "Names of the managed cluster to deploy the add-on to (comma separated)")
cmd.Flags().StringSliceVar(&o.Names, "names", []string{}, "Names of the add-on to deploy (comma separated)")
cmd.Flags().StringSliceVar(&o.Clusters, "clusters", []string{}, "Names of the managed cluster to deploy the add-on to (comma separated)")
cmd.Flags().BoolVar(&o.Allclusters, "all-clusters", false, "Make all managed clusters to disable the add-on")

return cmd
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/addon/disable/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (o *Options) Validate() (err error) {
}

if o.Allclusters && len(o.Clusters) != 0 {
return fmt.Errorf("flag --all-cluster and --cluster can not be set together")
return fmt.Errorf("flag --all-clusters and --clusters can not be set together")
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/addon/disable/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags
//A list of comma separated addon names
Names []string
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/addon/enable/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

var example = `
# Enable addon on to the given managed clusters of the specify namespace
%[1]s addon enable --name application-manager --namespace namespace --cluster cluster1,cluster2
%[1]s addon enable --names application-manager --namespace namespace --clusters cluster1,cluster2
# Enable application-manager addon specified clusters
%[1]s addon enable --name application-manager --cluster cluster1,cluster2
%[1]s addon enable --names application-manager --clusters cluster1,cluster2
`

// NewCmd...
Expand Down Expand Up @@ -48,9 +48,9 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream
},
}

cmd.Flags().StringSliceVar(&o.Names, "name", []string{}, "Names of the add-on to deploy (comma separated)")
cmd.Flags().StringSliceVar(&o.Names, "names", []string{}, "Names of the add-on to deploy (comma separated)")
cmd.Flags().StringVarP(&o.Namespace, "namespace", "n", "open-cluster-management-agent-addon", "Specified namespace to addon addon")
cmd.Flags().StringSliceVar(&o.Clusters, "cluster", []string{}, "Names of the managed cluster to deploy the add-on to (comma separated)")
cmd.Flags().StringSliceVar(&o.Clusters, "clusters", []string{}, "Names of the managed cluster to deploy the add-on to (comma separated)")
cmd.Flags().StringVar(&o.OutputFile, "output-file", "", "The generated resources will be copied in the specified file")

return cmd
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/addon/enable/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (o *Options) Validate() error {
}

if len(o.Clusters) == 0 {
return fmt.Errorf("clusters is misisng")
return fmt.Errorf("clusters is missing")
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/addon/enable/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags
//A list of comma separated addon names
Names []string
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/clean/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream

cmd.Flags().StringVar(&o.ClusterManageName, "name", "cluster-manager", "The name of the cluster manager resource")
cmd.Flags().StringVar(&o.OutputFile, "output-file", "", "The generated resources will be copied in the specified file")
cmd.Flags().BoolVar(&o.UseBootstrapToken, "use-bootstrap-token", false, "If set then the boostrap token will used instead of a service account token")
cmd.Flags().BoolVar(&o.UseBootstrapToken, "use-bootstrap-token", false, "If set then the bootstrap token will used instead of a service account token")
return cmd
}
4 changes: 2 additions & 2 deletions pkg/cmd/clean/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

//Options: The structure holding all the command-line options
type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags
Values Values
//The cluster manager resource name
Expand All @@ -20,7 +20,7 @@ type Options struct {
UseBootstrapToken bool
}

//Valus: The values used in the template
//Values: The values used in the template
type Values struct {
//The values related to the hub
Hub Hub `json:"hub"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/clusterset/bind/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags

Streams genericclioptions.IOStreams
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/clusterset/set/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags

Streams genericclioptions.IOStreams
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/clusterset/unbind/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags

Streams genericclioptions.IOStreams
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/create/clusterset/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags

Streams genericclioptions.IOStreams
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/create/work/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

var example = `
# Create manifestwork on a specified managed cluster"
%[1]s create work work-example -f xxx.yaml --cluster cluster1
%[1]s create work work-example -f xxx.yaml --clusters cluster1
`

// NewCmd...
Expand Down Expand Up @@ -46,7 +46,7 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream
},
}

cmd.Flags().StringVar(&o.Cluster, "cluster", "", "Names of the managed cluster to apply work")
cmd.Flags().StringVar(&o.Cluster, "clusters", "", "Names of the managed cluster to apply work")
cmd.Flags().BoolVar(&o.Overwrite, "overwrite", false, "Overwrite the existing work if it exists already")
o.FileNameFlags.AddFlags(cmd.Flags())

Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/create/work/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags

Streams genericclioptions.IOStreams
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/delete/clusterset/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags

Streams genericclioptions.IOStreams
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/delete/token/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

//Options: The structure holding all the command-line options
type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/delete/work/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream
},
}

cmd.Flags().StringVar(&o.Cluster, "cluster", "", "Names of the managed cluster applied work")
cmd.Flags().StringVar(&o.Cluster, "cluster", "", "Name of the managed cluster applied work")
cmd.Flags().BoolVar(&o.Force, "force", false, "set force flag to enable force delete")

return cmd
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/delete/work/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

//Options: The structure holding all the command-line options
type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags

Streams genericclioptions.IOStreams
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/get/addon/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags
// A list of cluster to show
clusters []string
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/get/cluster/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags
//Clusterset of the clusters
Clusterset string
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/get/clusterset/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags

Streams genericclioptions.IOStreams
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/get/hubinfo/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags

Streams genericclioptions.IOStreams
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/get/klusterletinfo/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags

Streams genericclioptions.IOStreams
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/get/token/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream
}

cmd.Flags().StringVar(&o.outputFile, "output-file", "", "The generated resources will be copied in the specified file")
cmd.Flags().BoolVar(&o.useBootstrapToken, "use-bootstrap-token", false, "If set then the boostrap token will used instead of a service account token")
cmd.Flags().BoolVar(&o.useBootstrapToken, "use-bootstrap-token", false, "If set then the bootstrap token will used instead of a service account token")

return cmd
}
4 changes: 2 additions & 2 deletions pkg/cmd/get/token/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

//Options: The structure holding all the command-line options
type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags
values Values
//The file to output the resources will be sent to the file.
Expand All @@ -17,7 +17,7 @@ type Options struct {
useBootstrapToken bool
}

//Valus: The values used in the template
//Values: The values used in the template
type Values struct {
//The values related to the hub
Hub Hub `json:"hub"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/get/work/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream
},
}

cmd.Flags().StringVar(&o.cluster, "cluster", "", "Names of the managed cluster")
cmd.Flags().StringVar(&o.cluster, "cluster", "", "Name of the managed cluster")

return cmd
}
2 changes: 1 addition & 1 deletion pkg/cmd/get/work/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags
//A list of comma separated cluster names
cluster string
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/init/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream
}

cmd.Flags().StringVar(&o.outputFile, "output-file", "", "The generated resources will be copied in the specified file")
cmd.Flags().BoolVar(&o.useBootstrapToken, "use-bootstrap-token", false, "If set then the boostrap token will used instead of a service account token")
cmd.Flags().BoolVar(&o.useBootstrapToken, "use-bootstrap-token", false, "If set then the bootstrap token will used instead of a service account token")
cmd.Flags().BoolVar(&o.force, "force", false, "If set then the hub will be reinitialized")
cmd.Flags().StringVar(&o.registry, "image-registry", "quay.io/open-cluster-management",
"The name of the image registry serving OCM images, which will be applied to all the deploying OCM components.")
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/init/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (o *Options) complete(cmd *cobra.Command, args []string) (err error) {
versionBundle, err := version.GetVersionBundle(o.bundleVersion)

if err != nil {
klog.Errorf("unable to retrive version ", err)
klog.Errorf("unable to retrieve version ", err)
return err
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/init/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

//Options: The structure holding all the command-line options
type Options struct {
//ClusteradmFlags: The generic optiosn from the clusteradm cli-runtime.
//ClusteradmFlags: The generic options from the clusteradm cli-runtime.
ClusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags
values Values
//The file to output the resources will be sent to the file.
Expand All @@ -28,17 +28,17 @@ type Options struct {
}

type BundleVersion struct {
// registation image version
// registration image version
RegistrationImageVersion string
// placment image version
// placement image version
PlacementImageVersion string
// work image version
WorkImageVersion string
// operator image version
OperatorImageVersion string
}

//Valus: The values used in the template
//Values: The values used in the template
type Values struct {
//The values related to the hub
Hub Hub `json:"hub"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/join/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (o *Options) complete(cmd *cobra.Command, args []string) (err error) {
versionBundle, err := version.GetVersionBundle(o.bundleVersion)

if err != nil {
klog.Errorf("unable to retrive version ", err)
klog.Errorf("unable to retrieve version ", err)
return err
}

Expand Down Expand Up @@ -84,7 +84,7 @@ func (o *Options) validate() error {
return fmt.Errorf("token is missing")
}
if o.values.Hub.APIServer == "" {
return fmt.Errorf("hub-server is misisng")
return fmt.Errorf("hub-server is missing")
}
if o.values.ClusterName == "" {
return fmt.Errorf("name is missing")
Expand Down
Loading