Skip to content

Commit 77b902b

Browse files
committed
Changing flag type as StringSliceVar
Signed-off-by: Amrutha <amrutha.hari12@gmail.com>
1 parent b0d341b commit 77b902b

9 files changed

+32
-12
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ require (
2828
k8s.io/klog/v2 v2.130.1
2929
k8s.io/kubectl v0.31.1
3030
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6
31-
open-cluster-management.io/api v0.15.1-0.20250116010516-3a595d6a4e40
31+
open-cluster-management.io/api v0.15.1-0.20250219064651-4281b7684d9b
3232
open-cluster-management.io/cluster-proxy v0.4.0
3333
open-cluster-management.io/managed-serviceaccount v0.6.0
3434
open-cluster-management.io/ocm v0.15.1-0.20250120013556-eeb4ab31d5ab

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,8 @@ k8s.io/kubectl v0.31.1 h1:ih4JQJHxsEggFqDJEHSOdJ69ZxZftgeZvYo7M/cpp24=
557557
k8s.io/kubectl v0.31.1/go.mod h1:aNuQoR43W6MLAtXQ/Bu4GDmoHlbhHKuyD49lmTC8eJM=
558558
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI=
559559
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
560-
open-cluster-management.io/api v0.15.1-0.20250116010516-3a595d6a4e40 h1:LckTHZ68rcy3hDFu6wa7BVOJ9wbWItJLZXmi0bpMyh8=
561-
open-cluster-management.io/api v0.15.1-0.20250116010516-3a595d6a4e40/go.mod h1:9erZEWEn4bEqh0nIX2wA7f/s3KCuFycQdBrPrRzi0QM=
560+
open-cluster-management.io/api v0.15.1-0.20250219064651-4281b7684d9b h1:1ScdOKBMLbzA/k84P9Z64uSq3sxRclquej3tT1zhsqU=
561+
open-cluster-management.io/api v0.15.1-0.20250219064651-4281b7684d9b/go.mod h1:9erZEWEn4bEqh0nIX2wA7f/s3KCuFycQdBrPrRzi0QM=
562562
open-cluster-management.io/cluster-proxy v0.4.0 h1:rm0UDaDWe3/P3xLzwqdHtqNksKwSzsic02MkrEe6BnM=
563563
open-cluster-management.io/cluster-proxy v0.4.0/go.mod h1:gTvfDHAhGezhdg4BD3ECBn6jbg2Y5PbHhV2ceW5nrB0=
564564
open-cluster-management.io/managed-serviceaccount v0.6.0 h1:qIi5T9WQJBuoGqnYGIktXbtqfQoiN2H9XU2P/6lAQiw=

pkg/cmd/init/cmd.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream
8585
"The type of authentication to use for registering and authenticating with hub. Only csr and awsirsa are accepted as valid inputs. This flag can be repeated to specify multiple authentication types.")
8686
cmd.Flags().StringVar(&o.hubClusterArn, "hub-cluster-arn", "",
8787
"The hubCluster ARN to be passed if awsirsa is one of the registrationAuths and the cluster name in EKS kubeconfig doesn't contain hubClusterArn")
88-
89-
cmd.Flags().StringArrayVar(&o.csrIdentities, "auto-approved-csr-identity", []string{},
88+
89+
cmd.Flags().StringSliceVar(&o.csrIdentities, "auto-approved-csr-identity", []string{},
9090
"The user or identity that can be auto approve for CSR and auto accepted to join with hub cluster")
91-
cmd.Flags().StringArrayVar(&o.awsIdentityPatterns, "auto-approved-aws-identity-pattern", []string{},
91+
cmd.Flags().StringSliceVar(&o.awsIdentityPatterns, "auto-approved-aws-identity-pattern", []string{},
9292
"A pattern of AWS EKS ARN so any EKS clusters with this pattern will be auto accepted to join with hub cluster")
9393
return cmd
9494
}

test/e2e/clusteradm/init_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ var _ = ginkgo.Describe("test clusteradm with bootstrap token in singleton mode"
8484
// Ensure that the auto approval identities contain user for CSR and pattern for AWS
8585
gomega.Expect(cm.Spec.RegistrationConfiguration.RegistrationDrivers[0].AuthType).Should(gomega.Equal("csr"))
8686
gomega.Expect(cm.Spec.RegistrationConfiguration.RegistrationDrivers[1].AuthType).Should(gomega.Equal("awsirsa"))
87-
gomega.Expect(cm.Spec.RegistrationConfiguration.RegistrationDrivers[0].Identities[0]).Should(gomega.Equal("csr1"))
88-
gomega.Expect(cm.Spec.RegistrationConfiguration.RegistrationDrivers[1].Identities[0]).Should(gomega.Equal("arn:aws:eks:us-west-2:123456789012:cluster/*"))
87+
gomega.Expect(cm.Spec.RegistrationConfiguration.RegistrationDrivers[0].AutoApprovedIdentities[0]).Should(gomega.Equal("csr1"))
88+
gomega.Expect(cm.Spec.RegistrationConfiguration.RegistrationDrivers[1].AutoApprovedIdentities[0]).Should(gomega.Equal("arn:aws:eks:us-west-2:123456789012:cluster/*"))
8989

9090
err = e2e.Clusteradm().Init(
9191
"--use-bootstrap-token",

vendor/modules.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ k8s.io/utils/pointer
12391239
k8s.io/utils/ptr
12401240
k8s.io/utils/strings/slices
12411241
k8s.io/utils/trace
1242-
# open-cluster-management.io/api v0.15.1-0.20250116010516-3a595d6a4e40
1242+
# open-cluster-management.io/api v0.15.1-0.20250219064651-4281b7684d9b
12431243
## explicit; go 1.22.0
12441244
open-cluster-management.io/api/addon/v1alpha1
12451245
open-cluster-management.io/api/client/addon/clientset/versioned

vendor/open-cluster-management.io/api/operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/open-cluster-management.io/api/operator/v1/types_clustermanager.go

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/open-cluster-management.io/api/operator/v1/zz_generated.deepcopy.go

+8-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/open-cluster-management.io/api/operator/v1/zz_generated.swagger_doc_generated.go

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)