Skip to content

Commit d0d96e8

Browse files
committed
ROSAENG-2057: add pull-secret update, audit, and validate subcommands
1 parent c2c03f9 commit d0d96e8

17 files changed

Lines changed: 3575 additions & 43 deletions

cmd/cluster/cmd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ func NewCmdCluster(streams genericclioptions.IOStreams, client *k8s.LazyClient,
3333
clusterCmd.AddCommand(newCmdResync())
3434
clusterCmd.AddCommand(newCmdContext())
3535
clusterCmd.AddCommand(newCmdTransferOwner(streams, globalOpts))
36+
clusterCmd.AddCommand(newCmdPullSecret(streams, globalOpts))
37+
clusterCmd.AddCommand(newCmdReplacePullSecretDeprecated(streams, globalOpts))
3638
clusterCmd.AddCommand(access.NewCmdAccess(streams, client))
3739
clusterCmd.AddCommand(newCmdCpd())
3840
clusterCmd.AddCommand(newCmdCheckBannedUser())
3941
clusterCmd.AddCommand(newCmdValidatePullSecret())
40-
clusterCmd.AddCommand(newCmdValidatePullSecretExt())
42+
clusterCmd.AddCommand(newCmdValidatePullSecretExtDeprecated())
4143
clusterCmd.AddCommand(newCmdEtcdHealthCheck())
4244
clusterCmd.AddCommand(newCmdEtcdMemberReplacement())
4345
clusterCmd.AddCommand(newCmdFromInfraId(globalOpts))

cmd/cluster/pullsecret.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package cluster
2+
3+
import (
4+
"github.com/spf13/cobra"
5+
"k8s.io/cli-runtime/pkg/genericclioptions"
6+
7+
"github.com/openshift/osdctl/internal/utils/globalflags"
8+
)
9+
10+
func newCmdPullSecret(streams genericclioptions.IOStreams, globalOpts *globalflags.GlobalOptions) *cobra.Command {
11+
cmd := &cobra.Command{
12+
Use: "pull-secret",
13+
Short: "Diagnose and manage cluster pull secrets",
14+
Long: "Diagnose and manage cluster pull secrets.",
15+
DisableAutoGenTag: true,
16+
}
17+
18+
cmd.AddCommand(newCmdPullSecretAudit(streams, globalOpts))
19+
cmd.AddCommand(newCmdPullSecretUpdate(streams, globalOpts))
20+
cmd.AddCommand(newCmdPullSecretValidate())
21+
22+
return cmd
23+
}
24+
25+
func newCmdPullSecretValidate() *cobra.Command {
26+
cmd := newCmdValidatePullSecretExt()
27+
cmd.Use = "validate"
28+
return cmd
29+
}

0 commit comments

Comments
 (0)