Skip to content

Commit 198327f

Browse files
Move the kubectl-mongodb plugin to cmd dir from public/tools/multicluster
This commit moves the source code of mongodb kubectl plugin from `public/tools/multicluster` to `cmd` directory. This is to align with how go code that ships a CLI is structured. The command/subcommand building logic is moved to the `cmd` directory and and rest of the logic The command/subcommand building logic is moved to the `cmd` directory and and rest of the logic is moved to the new package `pkg/kubectl-mongodb`. This commit also moves the `.goreleaser.yaml` to the root of the project because kubectl plugin is now at the root of the project.
1 parent 588fcb5 commit 198327f

28 files changed

+141
-111
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,6 @@ logs-debug/
9494

9595
docs/**/log/*
9696
docs/**/test.sh.run.log
97+
98+
# goreleaser generated files
99+
dist

public/tools/multicluster/.goreleaser.yaml renamed to .goreleaser.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
project_name: kubectl-mongodb
2+
version: 2
23

34
before:
45
hooks:
@@ -7,6 +8,7 @@ before:
78
builds:
89
- env:
910
- CGO_ENABLED=0
11+
main: ./cmd/kubectl-mongodb
1012
goos:
1113
- linux
1214
- darwin
@@ -16,9 +18,9 @@ builds:
1618
hooks:
1719
# This will notarize Apple binaries and replace goreleaser bins with the notarized ones
1820
post:
19-
- cmd: ./kubectl_mac_notarize.sh
21+
- cmd: ./multi_cluster/tools/kubectl_mac_notarize.sh
2022
output: true
21-
- cmd: ./sign.sh {{ .Path }}
23+
- cmd: ./multi_cluster/tools/sign.sh {{ .Path }}
2224
env:
2325
- GRS_USERNAME={{ .Env.GRS_USERNAME }}
2426
- GRS_PASSWORD={{ .Env.GRS_PASSWORD }}
@@ -27,7 +29,7 @@ builds:
2729
- SIGNING_IMAGE_URI={{ .Env.SIGNING_IMAGE_URI }}
2830
- ARTIFACTORY_USERNAME=mongodb-enterprise-kubernetes-operator
2931
- ARTIFACTORY_PASSWORD={{ .Env.ARTIFACTORY_PASSWORD }}
30-
- cmd: ./verify.sh {{ .Path }} && echo "VERIFIED OK"
32+
- cmd: ./multi_cluster/tools/verify.sh {{ .Path }} && echo "VERIFIED OK"
3133

3234
archives:
3335
- format: tar.gz
@@ -41,7 +43,7 @@ checksum:
4143
snapshot:
4244
name_template: "{{ incpatch .Version }}-next"
4345
changelog:
44-
skip: true
46+
disable: true
4547

4648
release:
4749
prerelease: auto

public/tools/multicluster/cmd/debug.go renamed to cmd/kubectl-mongodb/debug/debug.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
package cmd
1+
package debug
22

33
import (
44
"fmt"
55
"os"
66
"strings"
77

8-
"k8s.io/client-go/tools/clientcmd"
8+
"github.com/mongodb/mongodb-kubernetes/pkg/kubectl-mongodb/common"
9+
"github.com/mongodb/mongodb-kubernetes/pkg/kubectl-mongodb/debug"
910

10-
"github.com/mongodb/mongodb-kubernetes/multi/pkg/common"
11-
"github.com/mongodb/mongodb-kubernetes/multi/pkg/debug"
1211
"github.com/spf13/cobra"
12+
"k8s.io/client-go/tools/clientcmd"
1313
)
1414

1515
type Flags struct {
@@ -39,18 +39,18 @@ func (f *Flags) ParseDebugFlags() error {
3939
var debugFlags = &Flags{}
4040

4141
func init() {
42-
rootCmd.AddCommand(debugCmd)
43-
44-
debugCmd.Flags().StringVar(&common.MemberClusters, "member-clusters", "", "Comma separated list of member clusters. [optional]")
45-
debugCmd.Flags().StringVar(&debugFlags.CentralCluster, "central-cluster", "", "The central cluster the operator will be deployed in. [optional]")
46-
debugCmd.Flags().StringVar(&debugFlags.MemberClusterNamespace, "member-cluster-namespace", "", "The namespace the member cluster resources will be deployed to. [optional]")
47-
debugCmd.Flags().StringVar(&debugFlags.CentralClusterNamespace, "central-cluster-namespace", "", "The namespace the Operator will be deployed to. [optional]")
48-
debugCmd.Flags().StringVar(&common.MemberClustersApiServers, "member-clusters-api-servers", "", "Comma separated list of api servers addresses. [optional, default will take addresses from KUBECONFIG env var]")
49-
debugCmd.Flags().BoolVar(&debugFlags.Anonymize, "anonymize", true, "True if anonymization should be turned on")
50-
debugCmd.Flags().BoolVar(&debugFlags.UseOwnerRef, "ownerRef", false, "True if the collection should be made with owner references (consider turning it on after CLOUDP-176772 is fixed)")
42+
//rootCmd.AddCommand(DebugCmd)
43+
44+
DebugCmd.Flags().StringVar(&common.MemberClusters, "member-clusters", "", "Comma separated list of member clusters. [optional]")
45+
DebugCmd.Flags().StringVar(&debugFlags.CentralCluster, "central-cluster", "", "The central cluster the operator will be deployed in. [optional]")
46+
DebugCmd.Flags().StringVar(&debugFlags.MemberClusterNamespace, "member-cluster-namespace", "", "The namespace the member cluster resources will be deployed to. [optional]")
47+
DebugCmd.Flags().StringVar(&debugFlags.CentralClusterNamespace, "central-cluster-namespace", "", "The namespace the Operator will be deployed to. [optional]")
48+
DebugCmd.Flags().StringVar(&common.MemberClustersApiServers, "member-clusters-api-servers", "", "Comma separated list of api servers addresses. [optional, default will take addresses from KUBECONFIG env var]")
49+
DebugCmd.Flags().BoolVar(&debugFlags.Anonymize, "anonymize", true, "True if anonymization should be turned on")
50+
DebugCmd.Flags().BoolVar(&debugFlags.UseOwnerRef, "ownerRef", false, "True if the collection should be made with owner references (consider turning it on after CLOUDP-176772 is fixed)")
5151
}
5252

53-
var debugCmd = &cobra.Command{
53+
var DebugCmd = &cobra.Command{
5454
Use: "debug",
5555
Short: "Downloads all resources required for debugging and stores them into the disk",
5656
Long: `'debug' downloads all resources required for debugging and stores them into the disk.

cmd/kubectl-mongodb/main.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package main
2+
3+
import (
4+
"context"
5+
6+
"github.com/mongodb/mongodb-kubernetes/cmd/kubectl-mongodb/root"
7+
)
8+
9+
func main() {
10+
ctx := context.Background()
11+
root.Execute(ctx)
12+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package multicluster
2+
3+
import (
4+
"github.com/mongodb/mongodb-kubernetes/cmd/kubectl-mongodb/multicluster/recover"
5+
"github.com/mongodb/mongodb-kubernetes/cmd/kubectl-mongodb/multicluster/setup"
6+
7+
"github.com/spf13/cobra"
8+
)
9+
10+
// MulticlusterCmd represents the multicluster command
11+
var MulticlusterCmd = &cobra.Command{
12+
Use: "multicluster",
13+
Short: "Manage MongoDB multicluster environments on k8s",
14+
Long: `'multicluster' is the toplevel command for managing
15+
multicluster environments that hold MongoDB resources.`,
16+
}
17+
18+
func init() {
19+
MulticlusterCmd.AddCommand(setup.SetupCmd)
20+
MulticlusterCmd.AddCommand(recover.RecoverCmd)
21+
}

public/tools/multicluster/cmd/recover.go renamed to cmd/kubectl-mongodb/multicluster/recover/recover.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
package cmd
1+
package recover
22

33
import (
44
"fmt"
55
"os"
66
"slices"
77
"strings"
88

9-
"github.com/mongodb/mongodb-kubernetes/multi/pkg/common"
9+
"github.com/mongodb/mongodb-kubernetes/pkg/kubectl-mongodb/common"
1010

1111
"github.com/spf13/cobra"
1212
"golang.org/x/xerrors"
1313
"k8s.io/client-go/tools/clientcmd"
1414
)
1515

1616
func init() {
17-
multiclusterCmd.AddCommand(recoverCmd)
18-
19-
recoverCmd.Flags().StringVar(&common.MemberClusters, "member-clusters", "", "Comma separated list of member clusters. [required]")
20-
recoverCmd.Flags().StringVar(&RecoverFlags.ServiceAccount, "service-account", "mongodb-kubernetes-operator-multi-cluster", "Name of the service account which should be used for the Operator to communicate with the member clusters. [optional, default: mongodb-kubernetes-operator-multi-cluster]")
21-
recoverCmd.Flags().StringVar(&RecoverFlags.CentralCluster, "central-cluster", "", "The central cluster the operator will be deployed in. [required]")
22-
recoverCmd.Flags().StringVar(&RecoverFlags.MemberClusterNamespace, "member-cluster-namespace", "", "The namespace the member cluster resources will be deployed to. [required]")
23-
recoverCmd.Flags().StringVar(&RecoverFlags.CentralClusterNamespace, "central-cluster-namespace", "", "The namespace the Operator will be deployed to. [required]")
24-
recoverCmd.Flags().BoolVar(&RecoverFlags.Cleanup, "cleanup", false, "Delete all previously created resources except for namespaces. [optional default: false]")
25-
recoverCmd.Flags().BoolVar(&RecoverFlags.ClusterScoped, "cluster-scoped", false, "Create ClusterRole and ClusterRoleBindings for member clusters. [optional default: false]")
26-
recoverCmd.Flags().StringVar(&RecoverFlags.OperatorName, "operator-name", common.DefaultOperatorName, "Name used to identify the deployment of the operator. [optional, default: mongodb-kubernetes-operator]")
27-
recoverCmd.Flags().BoolVar(&RecoverFlags.InstallDatabaseRoles, "install-database-roles", false, "Install the ServiceAccounts and Roles required for running database workloads in the member clusters. [optional default: false]")
28-
recoverCmd.Flags().StringVar(&RecoverFlags.SourceCluster, "source-cluster", "", "The source cluster for recovery. This has to be one of the healthy member cluster that is the source of truth for new cluster configuration. [required]")
29-
recoverCmd.Flags().BoolVar(&RecoverFlags.CreateServiceAccountSecrets, "create-service-account-secrets", true, "Create service account token secrets. [optional default: true]")
30-
recoverCmd.Flags().StringVar(&common.MemberClustersApiServers, "member-clusters-api-servers", "", "Comma separated list of api servers addresses. [optional, default will take addresses from KUBECONFIG env var]")
17+
//multiclusterCmd.AddCommand(RecoverCmd)
18+
19+
RecoverCmd.Flags().StringVar(&common.MemberClusters, "member-clusters", "", "Comma separated list of member clusters. [required]")
20+
RecoverCmd.Flags().StringVar(&RecoverFlags.ServiceAccount, "service-account", "mongodb-kubernetes-operator-multi-cluster", "Name of the service account which should be used for the Operator to communicate with the member clusters. [optional, default: mongodb-kubernetes-operator-multi-cluster]")
21+
RecoverCmd.Flags().StringVar(&RecoverFlags.CentralCluster, "central-cluster", "", "The central cluster the operator will be deployed in. [required]")
22+
RecoverCmd.Flags().StringVar(&RecoverFlags.MemberClusterNamespace, "member-cluster-namespace", "", "The namespace the member cluster resources will be deployed to. [required]")
23+
RecoverCmd.Flags().StringVar(&RecoverFlags.CentralClusterNamespace, "central-cluster-namespace", "", "The namespace the Operator will be deployed to. [required]")
24+
RecoverCmd.Flags().BoolVar(&RecoverFlags.Cleanup, "cleanup", false, "Delete all previously created resources except for namespaces. [optional default: false]")
25+
RecoverCmd.Flags().BoolVar(&RecoverFlags.ClusterScoped, "cluster-scoped", false, "Create ClusterRole and ClusterRoleBindings for member clusters. [optional default: false]")
26+
RecoverCmd.Flags().StringVar(&RecoverFlags.OperatorName, "operator-name", common.DefaultOperatorName, "Name used to identify the deployment of the operator. [optional, default: mongodb-kubernetes-operator]")
27+
RecoverCmd.Flags().BoolVar(&RecoverFlags.InstallDatabaseRoles, "install-database-roles", false, "Install the ServiceAccounts and Roles required for running database workloads in the member clusters. [optional default: false]")
28+
RecoverCmd.Flags().StringVar(&RecoverFlags.SourceCluster, "source-cluster", "", "The source cluster for recovery. This has to be one of the healthy member cluster that is the source of truth for new cluster configuration. [required]")
29+
RecoverCmd.Flags().BoolVar(&RecoverFlags.CreateServiceAccountSecrets, "create-service-account-secrets", true, "Create service account token secrets. [optional default: true]")
30+
RecoverCmd.Flags().StringVar(&common.MemberClustersApiServers, "member-clusters-api-servers", "", "Comma separated list of api servers addresses. [optional, default will take addresses from KUBECONFIG env var]")
3131
}
3232

33-
// recoverCmd represents the recover command
34-
var recoverCmd = &cobra.Command{
33+
// RecoverCmd represents the recover command
34+
var RecoverCmd = &cobra.Command{
3535
Use: "recover",
3636
Short: "Recover the multicluster environment for MongoDB resources after a dataplane failure",
3737
Long: `'recover' re-configures a failed multicluster environment to a enable the shuffling of dataplane

public/tools/multicluster/cmd/setup.go renamed to cmd/kubectl-mongodb/multicluster/setup/setup.go

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package setup
22

33
import (
44
"fmt"
@@ -7,34 +7,33 @@ import (
77
"slices"
88
"strings"
99

10-
"github.com/mongodb/mongodb-kubernetes/multi/pkg/common"
10+
"github.com/mongodb/mongodb-kubernetes/cmd/kubectl-mongodb/utils"
11+
"github.com/mongodb/mongodb-kubernetes/pkg/kubectl-mongodb/common"
1112

1213
"github.com/spf13/cobra"
1314
"golang.org/x/xerrors"
1415
"k8s.io/client-go/tools/clientcmd"
1516
)
1617

1718
func init() {
18-
multiclusterCmd.AddCommand(setupCmd)
19-
20-
setupCmd.Flags().StringVar(&common.MemberClusters, "member-clusters", "", "Comma separated list of member clusters. [required]")
21-
setupCmd.Flags().StringVar(&setupFlags.ServiceAccount, "service-account", "mongodb-kubernetes-operator-multi-cluster", "Name of the service account which should be used for the Operator to communicate with the member clusters. [optional, default: mongodb-kubernetes-operator-multi-cluster]")
22-
setupCmd.Flags().StringVar(&setupFlags.CentralCluster, "central-cluster", "", "The central cluster the operator will be deployed in. [required]")
23-
setupCmd.Flags().StringVar(&setupFlags.MemberClusterNamespace, "member-cluster-namespace", "", "The namespace the member cluster resources will be deployed to. [required]")
24-
setupCmd.Flags().StringVar(&setupFlags.CentralClusterNamespace, "central-cluster-namespace", "", "The namespace the Operator will be deployed to. [required]")
25-
setupCmd.Flags().StringVar(&setupFlags.OperatorName, "operator-name", common.DefaultOperatorName, "Name used to identify the deployment of the operator. [optional, default: mongodb-kubernetes-operator]")
26-
setupCmd.Flags().BoolVar(&setupFlags.Cleanup, "cleanup", false, "Delete all previously created resources except for namespaces. [optional default: false]")
27-
setupCmd.Flags().BoolVar(&setupFlags.ClusterScoped, "cluster-scoped", false, "Create ClusterRole and ClusterRoleBindings for member clusters. [optional default: false]")
28-
setupCmd.Flags().BoolVar(&setupFlags.CreateTelemetryClusterRoles, "create-telemetry-roles", true, "Create ClusterRole and ClusterRoleBindings for member clusters for telemetry. [optional default: true]")
29-
setupCmd.Flags().BoolVar(&setupFlags.CreateMongoDBRolesClusterRole, "create-mongodb-roles-cluster-role", true, "Create ClusterRole and ClusterRoleBinding for central cluster for ClusterMongoDBRole resources. [optional default: true]")
30-
setupCmd.Flags().BoolVar(&setupFlags.InstallDatabaseRoles, "install-database-roles", false, "Install the ServiceAccounts and Roles required for running database workloads in the member clusters. [optional default: false]")
31-
setupCmd.Flags().BoolVar(&setupFlags.CreateServiceAccountSecrets, "create-service-account-secrets", true, "Create service account token secrets. [optional default: true]")
32-
setupCmd.Flags().StringVar(&setupFlags.ImagePullSecrets, "image-pull-secrets", "", "Name of the secret for imagePullSecrets to set in created service accounts")
33-
setupCmd.Flags().StringVar(&common.MemberClustersApiServers, "member-clusters-api-servers", "", "Comma separated list of api servers addresses. [optional, default will take addresses from KUBECONFIG env var]")
19+
SetupCmd.Flags().StringVar(&common.MemberClusters, "member-clusters", "", "Comma separated list of member clusters. [required]")
20+
SetupCmd.Flags().StringVar(&setupFlags.ServiceAccount, "service-account", "mongodb-kubernetes-operator-multi-cluster", "Name of the service account which should be used for the Operator to communicate with the member clusters. [optional, default: mongodb-kubernetes-operator-multi-cluster]")
21+
SetupCmd.Flags().StringVar(&setupFlags.CentralCluster, "central-cluster", "", "The central cluster the operator will be deployed in. [required]")
22+
SetupCmd.Flags().StringVar(&setupFlags.MemberClusterNamespace, "member-cluster-namespace", "", "The namespace the member cluster resources will be deployed to. [required]")
23+
SetupCmd.Flags().StringVar(&setupFlags.CentralClusterNamespace, "central-cluster-namespace", "", "The namespace the Operator will be deployed to. [required]")
24+
SetupCmd.Flags().StringVar(&setupFlags.OperatorName, "operator-name", common.DefaultOperatorName, "Name used to identify the deployment of the operator. [optional, default: mongodb-kubernetes-operator]")
25+
SetupCmd.Flags().BoolVar(&setupFlags.Cleanup, "cleanup", false, "Delete all previously created resources except for namespaces. [optional default: false]")
26+
SetupCmd.Flags().BoolVar(&setupFlags.ClusterScoped, "cluster-scoped", false, "Create ClusterRole and ClusterRoleBindings for member clusters. [optional default: false]")
27+
SetupCmd.Flags().BoolVar(&setupFlags.CreateTelemetryClusterRoles, "create-telemetry-roles", true, "Create ClusterRole and ClusterRoleBindings for member clusters for telemetry. [optional default: true]")
28+
SetupCmd.Flags().BoolVar(&setupFlags.CreateMongoDBRolesClusterRole, "create-mongodb-roles-cluster-role", true, "Create ClusterRole and ClusterRoleBinding for central cluster for ClusterMongoDBRole resources. [optional default: true]")
29+
SetupCmd.Flags().BoolVar(&setupFlags.InstallDatabaseRoles, "install-database-roles", false, "Install the ServiceAccounts and Roles required for running database workloads in the member clusters. [optional default: false]")
30+
SetupCmd.Flags().BoolVar(&setupFlags.CreateServiceAccountSecrets, "create-service-account-secrets", true, "Create service account token secrets. [optional default: true]")
31+
SetupCmd.Flags().StringVar(&setupFlags.ImagePullSecrets, "image-pull-secrets", "", "Name of the secret for imagePullSecrets to set in created service accounts")
32+
SetupCmd.Flags().StringVar(&common.MemberClustersApiServers, "member-clusters-api-servers", "", "Comma separated list of api servers addresses. [optional, default will take addresses from KUBECONFIG env var]")
3433
}
3534

36-
// setupCmd represents the setup command
37-
var setupCmd = &cobra.Command{
35+
// SetupCmd represents the setup command
36+
var SetupCmd = &cobra.Command{
3837
Use: "setup",
3938
Short: "Setup the multicluster environment for MongoDB resources",
4039
Long: `'setup' configures the central and member clusters in preparation for a MongoDBMultiCluster deployment.
@@ -52,7 +51,7 @@ kubectl-mongodb multicluster setup --central-cluster="operator-cluster" --member
5251

5352
buildInfo, ok := debug.ReadBuildInfo()
5453
if ok {
55-
fmt.Println(getBuildInfoString(buildInfo))
54+
fmt.Println(utils.GetBuildInfoString(buildInfo))
5655
}
5756

5857
clientMap, err := common.CreateClientMap(setupFlags.MemberClusters, setupFlags.CentralCluster, common.LoadKubeConfigFilePath(), common.GetKubernetesClient)
Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
package cmd
1+
package root
22

33
import (
44
"context"
5-
"fmt"
65
"os"
76
"os/signal"
87
"runtime/debug"
98
"syscall"
109

10+
cmddebug "github.com/mongodb/mongodb-kubernetes/cmd/kubectl-mongodb/debug"
11+
"github.com/mongodb/mongodb-kubernetes/cmd/kubectl-mongodb/multicluster"
12+
"github.com/mongodb/mongodb-kubernetes/cmd/kubectl-mongodb/utils"
13+
1114
"github.com/spf13/cobra"
1215
)
1316

@@ -20,6 +23,11 @@ of MongoDB resources in your kubernetes cluster.
2023
`,
2124
}
2225

26+
func init() {
27+
rootCmd.AddCommand(multicluster.MulticlusterCmd)
28+
rootCmd.AddCommand(cmddebug.DebugCmd)
29+
}
30+
2331
// Execute adds all child commands to the root command and sets flags appropriately.
2432
// This is called by main.main(). It only needs to happen once to the rootCmd.
2533
func Execute(ctx context.Context) {
@@ -34,26 +42,10 @@ func Execute(ctx context.Context) {
3442
}()
3543
buildInfo, ok := debug.ReadBuildInfo()
3644
if ok {
37-
rootCmd.Long += getBuildInfoString(buildInfo)
45+
rootCmd.Long += utils.GetBuildInfoString(buildInfo)
3846
}
3947
err := rootCmd.ExecuteContext(ctx)
4048
if err != nil {
4149
os.Exit(1)
4250
}
4351
}
44-
45-
func getBuildInfoString(buildInfo *debug.BuildInfo) string {
46-
var vcsHash string
47-
var vcsTime string
48-
for _, setting := range buildInfo.Settings {
49-
if setting.Key == "vcs.revision" {
50-
vcsHash = setting.Value
51-
}
52-
if setting.Key == "vcs.time" {
53-
vcsTime = setting.Value
54-
}
55-
}
56-
57-
buildInfoStr := fmt.Sprintf("\nBuild: %s, %s", vcsHash, vcsTime)
58-
return buildInfoStr
59-
}

cmd/kubectl-mongodb/utils/utils.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package utils
2+
3+
import (
4+
"fmt"
5+
"runtime/debug"
6+
)
7+
8+
func GetBuildInfoString(buildInfo *debug.BuildInfo) string {
9+
var vcsHash string
10+
var vcsTime string
11+
for _, setting := range buildInfo.Settings {
12+
if setting.Key == "vcs.revision" {
13+
vcsHash = setting.Value
14+
}
15+
if setting.Key == "vcs.time" {
16+
vcsTime = setting.Value
17+
}
18+
}
19+
20+
buildInfoStr := fmt.Sprintf("\nBuild: %s, %s", vcsHash, vcsTime)
21+
return buildInfoStr
22+
}

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ require (
1717
github.com/prometheus/client_golang v1.22.0
1818
github.com/r3labs/diff/v3 v3.0.1
1919
github.com/spf13/cast v1.8.0
20+
github.com/spf13/cobra v1.7.0
2021
github.com/stretchr/objx v0.5.2
2122
github.com/stretchr/testify v1.10.0
2223
github.com/xdg/stringprep v1.0.3
@@ -69,6 +70,7 @@ require (
6970
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
7071
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
7172
github.com/hashicorp/hcl v1.0.0 // indirect
73+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
7274
github.com/josharian/intern v1.0.0 // indirect
7375
github.com/json-iterator/go v1.1.12 // indirect
7476
github.com/klauspost/compress v1.18.0 // indirect

0 commit comments

Comments
 (0)