Skip to content

Commit

Permalink
OCM-7851 | fix: unsupported combination of flags for operator-roles
Browse files Browse the repository at this point in the history
  • Loading branch information
Mischulee committed Jun 26, 2024
1 parent 9cd807c commit 61272bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/create/operatorroles/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ func run(cmd *cobra.Command, argv []string) {
os.Exit(1)
}

if cmd.Flag("cluster").Changed && cmd.Flag(OidcConfigIdFlag).Changed {
r.Reporter.Errorf("A cluster key for STS cluster and an OIDC configuration ID " +
"cannot be specified alongside each other.")
os.Exit(1)
}

var cluster *cmv1.Cluster
if args.prefix == "" {
cluster = r.FetchCluster()
Expand Down

0 comments on commit 61272bd

Please sign in to comment.