mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-24 09:50:08 +00:00
feat: Allow custom cluster names (#3985)
* Include sub and and iat in PermissionDenied message * Run test-local * Fix typo * Fix lint error * iat fromat changing * Adding MapClaims convertion * Fix lint issue * Fix golang lint * Fix blank space * Fix missing field * Adding Orphaned exception list * Fixed lint error * Rebased on master * Adding group kind label * golangci-lint run * Addressed comments * Fixed lint errors * Method rename * orphaned ignore list cli support * Orphaned resources cli support * Display orphaned resource cli * Added tests * Create argocd app resources command * Addressed comments * fix a lint error
This commit is contained in:
parent
1a36fd178a
commit
7a348f786b
1 changed files with 5 additions and 0 deletions
|
|
@ -65,6 +65,7 @@ func NewClusterAddCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clie
|
|||
awsClusterName string
|
||||
systemNamespace string
|
||||
namespaces []string
|
||||
name string
|
||||
)
|
||||
var command = &cobra.Command{
|
||||
Use: "add CONTEXT",
|
||||
|
|
@ -111,6 +112,9 @@ func NewClusterAddCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clie
|
|||
}
|
||||
conn, clusterIf := argocdclient.NewClientOrDie(clientOpts).NewClusterClientOrDie()
|
||||
defer io.Close(conn)
|
||||
if name != "" {
|
||||
contextName = name
|
||||
}
|
||||
clst := newCluster(contextName, namespaces, conf, managerBearerToken, awsAuthConf)
|
||||
if inCluster {
|
||||
clst.Server = common.KubernetesInternalAPIServerAddr
|
||||
|
|
@ -132,6 +136,7 @@ func NewClusterAddCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clie
|
|||
command.Flags().StringVar(&awsRoleArn, "aws-role-arn", "", "Optional AWS role arn. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain.")
|
||||
command.Flags().StringVar(&systemNamespace, "system-namespace", common.DefaultSystemNamespace, "Use different system namespace")
|
||||
command.Flags().StringArrayVar(&namespaces, "namespace", nil, "List of namespaces which are allowed to manage")
|
||||
command.Flags().StringVar(&name, "name", "", "Overwrite the cluster name")
|
||||
return command
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue