diff --git a/cmd/command/bootstrap/bootstrap.go b/cmd/command/bootstrap/bootstrap.go deleted file mode 100644 index 47df494d..00000000 --- a/cmd/command/bootstrap/bootstrap.go +++ /dev/null @@ -1,392 +0,0 @@ -package bootstrap - -import ( - "context" - "fmt" - "os" - "path" - "strings" - "time" - - "github.com/pluralsh/plural-cli/pkg/client" - "github.com/pluralsh/plural-cli/pkg/common" - "github.com/pluralsh/plural-cli/pkg/exp" - - "github.com/pluralsh/plural-cli/pkg/kubernetes" - "github.com/pluralsh/plural-cli/pkg/manifest" - "github.com/pluralsh/plural-cli/pkg/provider" - "github.com/pluralsh/plural-cli/pkg/utils" - "github.com/urfave/cli" - corev1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - clusterapioperator "sigs.k8s.io/cluster-api-operator/api/v1alpha1" - clusterapi "sigs.k8s.io/cluster-api/api/v1beta1" - apiclient "sigs.k8s.io/cluster-api/cmd/clusterctl/client" - ctrlruntimeclient "sigs.k8s.io/controller-runtime/pkg/client" -) - -var runtimescheme = runtime.NewScheme() - -func init() { - utilruntime.Must(corev1.AddToScheme(runtimescheme)) - utilruntime.Must(apiextensionsv1.AddToScheme(runtimescheme)) - utilruntime.Must(clusterapi.AddToScheme(runtimescheme)) - utilruntime.Must(clusterapioperator.AddToScheme(runtimescheme)) -} - -const ( - kindConfig = `kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -networking: - ipFamily: dual -nodes: -- role: control-plane - extraMounts: - - hostPath: /var/run/docker.sock - containerPath: /var/run/docker.sock` -) - -type Plural struct { - client.Plural -} - -func Command(clients client.Plural) cli.Command { - p := Plural{ - Plural: clients, - } - return cli.Command{ - Name: "bootstrap", - Usage: "Commands for bootstrapping cluster", - Subcommands: p.bootstrapCommands(), - Category: "Bootstrap", - Hidden: !exp.IsFeatureEnabled(exp.EXP_PLURAL_CAPI), - } -} - -func (p *Plural) bootstrapCommands() []cli.Command { - return []cli.Command{ - { - Name: "cluster", - Subcommands: p.bootstrapClusterCommands(), - Usage: "Manage bootstrap cluster", - }, - { - Name: "namespace", - Subcommands: p.namespaceCommands(), - Usage: "Manage bootstrap cluster", - }, - } -} - -func (p *Plural) namespaceCommands() []cli.Command { - return []cli.Command{ - { - Name: "create", - ArgsUsage: "NAME", - Usage: "Creates bootstrap namespace", - Flags: []cli.Flag{ - cli.BoolFlag{ - Name: "skip-if-exists", - Usage: "skip creating when namespace exists", - }, - }, - Action: common.LatestVersion(common.InitKubeconfig(common.RequireArgs(p.handleCreateNamespace, []string{"NAME"}))), - }, - } -} - -func (p *Plural) bootstrapClusterCommands() []cli.Command { - return []cli.Command{ - { - Name: "create", - ArgsUsage: "NAME", - Usage: "Creates bootstrap cluster", - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "image", - Usage: "kind image to use", - }, - cli.BoolFlag{ - Name: "skip-if-exists", - Usage: "skip creating when cluster exists", - }, - }, - Action: common.LatestVersion(common.RequireKind(common.RequireArgs(handleCreateCluster, []string{"NAME"}))), - }, - { - Name: "delete", - ArgsUsage: "NAME", - Usage: "Deletes bootstrap cluster", - Action: common.LatestVersion(common.RequireKind(common.RequireArgs(handleDeleteCluster, []string{"NAME"}))), - }, - { - Name: "move", - Usage: "Move cluster API objects", - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "kubeconfig", - Usage: "path to the kubeconfig file for the source management cluster. If unspecified, default discovery rules apply.", - }, - cli.StringFlag{ - Name: "kubeconfig-context", - Usage: "context to be used within the kubeconfig file for the source management cluster. If empty, current context will be used.", - }, - cli.StringFlag{ - Name: "to-kubeconfig", - Usage: "path to the kubeconfig file to use for the destination management cluster.", - }, - cli.StringFlag{ - Name: "to-kubeconfig-context", - Usage: "Context to be used within the kubeconfig file for the destination management cluster. If empty, current context will be used.", - }, - }, - Action: common.LatestVersion(p.handleMoveCluster), - }, - { - Name: "destroy-cluster-api", - ArgsUsage: "NAME", - Usage: "Destroy cluster API", - Action: common.LatestVersion(common.RequireArgs(p.handleDestroyClusterAPI, []string{"NAME"})), - }, - } -} - -func (p *Plural) handleDestroyClusterAPI(c *cli.Context) error { - name := c.Args().Get(0) - _, found := utils.ProjectRoot() - if !found { - return fmt.Errorf("You're not within an installation repo") - } - pm, err := manifest.FetchProject() - if err != nil { - return err - } - prov := &provider.KINDProvider{Clust: "bootstrap"} - if err := prov.KubeConfig(); err != nil { - return err - } - config, err := kubernetes.KubeConfig() - if err != nil { - return err - } - client, err := genClientFromConfig(config) - if err != nil { - return err - } - utils.Warn("Waiting for the operator ") - if err := utils.WaitFor(20*time.Minute, 10*time.Second, func() (bool, error) { - pods := &corev1.PodList{} - providerName := pm.Provider - if providerName == "kind" { - providerName = "docker" - } - selector := fmt.Sprintf("infrastructure-%s", strings.ToLower(providerName)) - if err := client.List(context.Background(), pods, ctrlruntimeclient.MatchingLabels{"cluster.x-k8s.io/provider": selector}); err != nil { - if !apierrors.IsNotFound(err) { - return false, fmt.Errorf("failed to get pods: %w", err) - } - return false, nil - } - if len(pods.Items) > 0 { - if isReady(pods.Items[0].Status.Conditions) { - return true, nil - } - } - utils.Warn(".") - return false, nil - }); err != nil { - return err - } - if err := client.Delete(context.Background(), &clusterapi.Cluster{ - ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "bootstrap"}, - }); err != nil { - return err - } - utils.Warn("\nDeleting cluster") - return utils.WaitFor(40*time.Minute, 10*time.Second, func() (bool, error) { - if err := client.Get(context.Background(), ctrlruntimeclient.ObjectKey{Name: name, Namespace: "bootstrap"}, &clusterapi.Cluster{}); err != nil { - if !apierrors.IsNotFound(err) { - return false, fmt.Errorf("failed to get Cluster: %w", err) - } - return true, nil - } - utils.Warn(".") - return false, nil - }) -} - -func isReady(conditions []corev1.PodCondition) bool { - for _, cond := range conditions { - if cond.Type == corev1.PodReady && cond.Status == corev1.ConditionTrue { - return true - } - } - return false -} - -func (p *Plural) handleMoveCluster(c *cli.Context) error { - _, found := utils.ProjectRoot() - if !found { - return fmt.Errorf("You're not within an installation repo") - } - - client, err := apiclient.New(context.Background(), "") - if err != nil { - return err - } - - kubeconfig := c.String("kubeconfig") - kubeconfigContext := c.String("kubeconfig-context") - toKubeconfig := c.String("to-kubeconfig") - toKubeconfigContext := c.String("to-kubeconfig-context") - - options := apiclient.MoveOptions{ - FromKubeconfig: apiclient.Kubeconfig{ - Path: kubeconfig, - Context: kubeconfigContext, - }, - ToKubeconfig: apiclient.Kubeconfig{ - Path: toKubeconfig, - Context: toKubeconfigContext, - }, - Namespace: "bootstrap", - DryRun: false, - } - if err := client.Move(context.Background(), options); err != nil { - return err - } - - return nil -} - -func (p *Plural) handleCreateNamespace(c *cli.Context) error { - name := c.Args().Get(0) - fmt.Printf("Creating namespace %s ...\n", name) - err := p.InitKube() - if err != nil { - return err - } - if err := p.CreateNamespace(name, true); err != nil { - if apierrors.IsAlreadyExists(err) { - return nil - } - return err - } - - return nil -} - -func handleDeleteCluster(c *cli.Context) error { - name := c.Args().Get(0) - return utils.Exec("kind", "delete", "cluster", "--name", name) -} - -func handleCreateCluster(c *cli.Context) error { - name := c.Args().Get(0) - imageFlag := c.String("image") - skipCreation := c.Bool("skip-if-exists") - if utils.IsKindClusterAlreadyExists(name) && skipCreation { - utils.Highlight("Cluster %s already exists \n", name) - return nil - } - - dir, err := os.MkdirTemp("", "kind") - if err != nil { - return err - } - defer os.RemoveAll(dir) - config := path.Join(dir, "config.yaml") - if err := os.WriteFile(config, []byte(kindConfig), 0644); err != nil { - return err - } - args := []string{"create", "cluster", "--name", name, "--config", config} - if imageFlag != "" { - args = append(args, "--image", imageFlag) - } - - if err := utils.Exec("kind", args...); err != nil { - return err - } - - kubeconfig, err := utils.GetKindClusterKubeconfig(name, false) - if err != nil { - return err - } - - client, err := getClient(kubeconfig) - if err != nil { - return err - } - if err := client.Create(context.Background(), &corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "bootstrap", - }, - }); err != nil { - return err - } - internalKubeconfig, err := utils.GetKindClusterKubeconfig(name, true) - if err != nil { - return err - } - kubeconfigSecret := &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: "kubeconfig", - Namespace: "bootstrap", - }, - Data: map[string][]byte{ - "value": []byte(internalKubeconfig), - }, - } - if err := client.Create(context.Background(), kubeconfigSecret); err != nil { - return err - } - - return nil -} - -func getClient(rawKubeconfig string) (ctrlruntimeclient.Client, error) { - - cfg, err := clientcmd.Load([]byte(rawKubeconfig)) - if err != nil { - return nil, err - } - clientConfig, err := getRestConfig(cfg) - if err != nil { - return nil, err - } - - return genClientFromConfig(clientConfig) -} - -func genClientFromConfig(cfg *rest.Config) (ctrlruntimeclient.Client, error) { - return ctrlruntimeclient.New(cfg, ctrlruntimeclient.Options{ - Scheme: runtimescheme, - }) -} - -func getRestConfig(cfg *clientcmdapi.Config) (*rest.Config, error) { - iconfig := clientcmd.NewNonInteractiveClientConfig( - *cfg, - "", - &clientcmd.ConfigOverrides{}, - nil, - ) - - clientConfig, err := iconfig.ClientConfig() - if err != nil { - return nil, err - } - - // Avoid blocking of the controller by increasing the QPS for user cluster interaction - clientConfig.QPS = 20 - clientConfig.Burst = 50 - - return clientConfig, nil -} diff --git a/cmd/command/clusters/clusters.go b/cmd/command/clusters/clusters.go index 448cfa04..7c3623d0 100644 --- a/cmd/command/clusters/clusters.go +++ b/cmd/command/clusters/clusters.go @@ -3,20 +3,13 @@ package clusters import ( "fmt" + "github.com/pluralsh/plural-cli/pkg/api" "github.com/pluralsh/plural-cli/pkg/client" "github.com/pluralsh/plural-cli/pkg/common" - - "github.com/urfave/cli" - "sigs.k8s.io/yaml" - - "github.com/pluralsh/plural-cli/pkg/api" - "github.com/pluralsh/plural-cli/pkg/bootstrap/aws" - "github.com/pluralsh/plural-cli/pkg/cluster" "github.com/pluralsh/plural-cli/pkg/config" - "github.com/pluralsh/plural-cli/pkg/kubernetes" - "github.com/pluralsh/plural-cli/pkg/machinepool" "github.com/pluralsh/plural-cli/pkg/manifest" "github.com/pluralsh/plural-cli/pkg/utils" + "github.com/urfave/cli" ) type Plural struct { @@ -83,124 +76,9 @@ func (p *Plural) clusterCommands() []cli.Command { Usage: "promote pending upgrades to your cluster", Action: common.LatestVersion(p.promoteCluster), }, - { - Name: "wait", - Usage: "waits on a cluster until it becomes ready", - ArgsUsage: "NAMESPACE NAME", - Action: common.LatestVersion(common.InitKubeconfig(common.RequireArgs(handleClusterWait, []string{"NAMESPACE", "NAME"}))), - Category: "Debugging", - }, - { - Name: "mpwait", - Usage: "waits on a machine pool until it becomes ready", - ArgsUsage: "NAMESPACE NAME", - Action: common.LatestVersion(common.InitKubeconfig(common.RequireArgs(handleMPWait, []string{"NAMESPACE", "NAME"}))), - Category: "Debugging", - }, - // { - // Name: "migrate", - // Usage: "migrate to Cluster API", - // Action: common.LatestVersion(common.Rooted(common.InitKubeconfig(p.handleMigration))), - // Category: "Publishing", - // Hidden: !exp.IsFeatureEnabled(exp.EXP_PLURAL_CAPI), - // }, - { - Name: "aws-auth", - Usage: "fetches the current state of your aws auth config map", - Subcommands: awsAuthCommands(), - }, } } -// func (p *Plural) handleMigration(_ *cli.Context) error { -// p.InitPluralClient() -// if err := validation.ValidateMigration(p); err != nil { -// return err -// } -// -// project, err := manifest.FetchProject() -// if err != nil { -// return err -// } -// -// if project.ClusterAPI { -// utils.Success("Cluster already migrated.\n") -// return nil -// } -// -// return bootstrap.MigrateCluster(plural.RunPlural) -// } - -func awsAuthCommands() []cli.Command { - return []cli.Command{ - { - Name: "fetch", - Usage: "gets the current state of your aws auth configmap", - Action: handleAwsAuth, - }, - { - Name: "update", - Usage: "adds a user or role to the aws auth configmap", - Flags: []cli.Flag{ - cli.StringFlag{Name: "role-arn"}, - cli.StringFlag{Name: "user-arn"}, - }, - Action: handleModifyAwsAuth, - }, - } -} - -func handleAwsAuth(_ *cli.Context) error { - auth, err := aws.FetchAuth() - if err != nil { - return err - } - - res, err := yaml.Marshal(auth) - if err != nil { - return err - } - - fmt.Println(string(res)) - return nil -} - -func handleModifyAwsAuth(c *cli.Context) error { - role, user := c.String("role-arn"), c.String("user-arn") - - if role != "" { - return aws.AddRole(role) - } - - if user != "" { - return aws.AddUser(user) - } - - return fmt.Errorf("you must specify at least one of role-arn or user-arn") -} - -func handleClusterWait(c *cli.Context) error { - namespace := c.Args().Get(0) - name := c.Args().Get(1) - kubeConf, err := kubernetes.KubeConfig() - if err != nil { - return err - } - - return cluster.Wait(kubeConf, namespace, name) -} - -func handleMPWait(c *cli.Context) error { - namespace := c.Args().Get(0) - name := c.Args().Get(1) - kubeConf, err := kubernetes.KubeConfig() - if err != nil { - return err - } - - return machinepool.WaitAll(kubeConf, namespace, name) -} - func (p *Plural) listClusters(c *cli.Context) error { p.InitPluralClient() clusters, err := p.Client.Clusters() diff --git a/cmd/command/destroy/destroy.go b/cmd/command/destroy/destroy.go index 577e65e0..e72e3da4 100644 --- a/cmd/command/destroy/destroy.go +++ b/cmd/command/destroy/destroy.go @@ -59,11 +59,6 @@ func (p *Plural) destroy(c *cli.Context) error { force := c.Bool("force") all := c.Bool("all") - project, err := manifest.FetchProject() - if err != nil { - return err - } - infix := "this workspace" if repoName != "" { infix = repoName @@ -87,7 +82,7 @@ func (p *Plural) destroy(c *cli.Context) error { return fmt.Errorf("No installation for app %s to destroy, if the app is still in your repo, you can always run cd %s/terraform && terraform destroy", repoName, repoName) } - return p.doDestroy(repoRoot, installation, delete, project.ClusterAPI) + return p.doDestroy(repoRoot, installation, delete) } installations, err := client.GetSortedInstallations(p.Plural, repoName) @@ -107,7 +102,7 @@ func (p *Plural) destroy(c *cli.Context) error { continue } - if err := p.doDestroy(repoRoot, installation, delete, project.ClusterAPI); err != nil { + if err := p.doDestroy(repoRoot, installation, delete); err != nil { return err } } @@ -139,7 +134,7 @@ func (p *Plural) destroy(c *cli.Context) error { return nil } -func (p *Plural) doDestroy(repoRoot string, installation *api.Installation, delete, clusterAPI bool) error { +func (p *Plural) doDestroy(repoRoot string, installation *api.Installation, delete bool) error { p.Plural.InitPluralClient() if err := os.Chdir(repoRoot); err != nil { return err @@ -155,18 +150,6 @@ func (p *Plural) doDestroy(repoRoot string, installation *api.Installation, dele return err } - // TODO fix for clusterAPI - // if repo == Bootstrap && clusterAPI { - // if err = bootstrap.DestroyCluster(workspace.Destroy, plural.RunPlural); err != nil { - // return err - // } - // - // } else { - // if err := workspace.Destroy(); err != nil { - // return err - // } - // } - if err := workspace.Destroy(); err != nil { return err } diff --git a/cmd/command/plural/plural.go b/cmd/command/plural/plural.go index 552ffd39..948814fc 100644 --- a/cmd/command/plural/plural.go +++ b/cmd/command/plural/plural.go @@ -4,7 +4,6 @@ import ( "github.com/pluralsh/plural-cli/cmd/command/ai" "github.com/pluralsh/plural-cli/cmd/command/api" "github.com/pluralsh/plural-cli/cmd/command/auth" - "github.com/pluralsh/plural-cli/cmd/command/bootstrap" "github.com/pluralsh/plural-cli/cmd/command/bounce" "github.com/pluralsh/plural-cli/cmd/command/buildcmd" "github.com/pluralsh/plural-cli/cmd/command/bundle" @@ -226,7 +225,6 @@ func CreateNewApp(plural *Plural) *cli.App { api.Command(plural.Plural), auth.Command(plural.Plural), ai.Command(plural.Plural), - bootstrap.Command(plural.Plural), bounce.Command(plural.Plural), bundle.Command(plural.Plural), buildcmd.Command(plural.Plural), diff --git a/go.mod b/go.mod index dc258807..8cbcd2e2 100644 --- a/go.mod +++ b/go.mod @@ -15,9 +15,6 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.3.0 github.com/Azure/azure-storage-blob-go v0.15.0 - github.com/Azure/azure-workload-identity v1.1.0 - github.com/Azure/go-autorest/autorest v0.11.29 - github.com/Masterminds/semver v1.5.0 github.com/Masterminds/sprig/v3 v3.2.3 github.com/Yamashou/gqlgenc v0.23.2 github.com/aws/aws-sdk-go-v2 v1.27.1 @@ -25,11 +22,9 @@ require ( github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 github.com/briandowns/spinner v1.23.0 github.com/buger/goterm v1.0.4 - github.com/cert-manager/cert-manager v1.12.3 github.com/chartmuseum/helm-push v0.10.3 github.com/databus23/helm-diff/v3 v3.6.0 github.com/fatih/color v1.16.0 - github.com/gdamore/tcell/v2 v2.6.0 github.com/gin-gonic/gin v1.9.1 github.com/go-git/go-git/v5 v5.11.0 github.com/gofrs/flock v0.8.1 @@ -37,7 +32,6 @@ require ( github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/hashicorp/go-retryablehttp v0.7.4 github.com/hashicorp/hcl v1.0.0 - github.com/hashicorp/terraform-json v0.17.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 github.com/helm/helm-mapkubeapis v0.4.1 github.com/imdario/mergo v0.3.16 @@ -46,7 +40,6 @@ require ( github.com/ktrysmt/go-bitbucket v0.9.55 github.com/likexian/doh v0.7.1 github.com/linode/linodego v1.26.0 - github.com/microsoftgraph/msgraph-sdk-go v0.61.0 github.com/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/mapstructure v1.5.0 @@ -54,14 +47,11 @@ require ( github.com/olekukonko/tablewriter v0.0.5 github.com/packethost/packngo v0.29.0 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 - github.com/pluralsh/cluster-api-migration v0.2.16 github.com/pluralsh/console/go/client v1.12.0 github.com/pluralsh/gqlclient v1.12.2 github.com/pluralsh/plural-operator v0.5.5 github.com/pluralsh/polly v0.1.8 - github.com/pluralsh/terraform-delinker v0.0.2 github.com/posthog/posthog-go v0.0.0-20230801140217-d607812dee69 - github.com/rivo/tview v0.0.0-20230615085408-bb9595ee0f4d github.com/rodaine/hclencoder v0.0.1 github.com/samber/lo v1.38.1 github.com/spf13/viper v1.18.2 @@ -82,37 +72,21 @@ require ( k8s.io/client-go v0.30.1 layeh.com/gopher-luar v1.0.10 sigs.k8s.io/application v0.8.3 - sigs.k8s.io/cluster-api v1.7.2 - sigs.k8s.io/cluster-api-operator v0.10.1 - sigs.k8s.io/cluster-api-provider-aws/v2 v2.5.0 - sigs.k8s.io/controller-runtime v0.18.2 sigs.k8s.io/yaml v1.4.0 ) require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/container v1.28.0 // indirect cloud.google.com/go/longrunning v0.5.4 // indirect dario.cat/mergo v1.0.0 // indirect github.com/99designs/gqlgen v0.17.49 // indirect github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect - github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions v1.1.1 // indirect - github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 // indirect - github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect - github.com/adrg/xdg v0.4.0 // indirect github.com/agext/levenshtein v1.2.2 // indirect - github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect - github.com/apparentlymart/go-cidr v1.1.0 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a // indirect - github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/amazon-ec2-instance-selector/v2 v2.4.2-0.20230601180523-74e721cb8c1e // indirect - github.com/aws/aws-sdk-go v1.51.17 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect @@ -120,39 +94,20 @@ require ( github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.8 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.8 // indirect - github.com/aws/aws-sdk-go-v2/service/autoscaling v1.40.5 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudformation v1.50.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.39.2 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.35.1 // indirect - github.com/aws/aws-sdk-go-v2/service/eks v1.42.1 // indirect - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.24.4 // indirect - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.30.5 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.10 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.10 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.8 // indirect - github.com/aws/aws-sdk-go-v2/service/outposts v1.38.0 // indirect - github.com/aws/aws-sdk-go-v2/service/pricing v1.17.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssm v1.49.5 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect github.com/aws/smithy-go v1.20.2 // indirect - github.com/awslabs/goformation/v4 v4.19.5 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/bep/debounce v1.2.1 // indirect - github.com/blang/semver v3.5.1+incompatible // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/bxcodec/faker v2.0.1+incompatible // indirect github.com/bytedance/sonic v1.9.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/charmbracelet/bubbles v0.15.0 // indirect - github.com/charmbracelet/bubbletea v0.24.1 // indirect - github.com/charmbracelet/lipgloss v0.7.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/cjlapao/common-go v0.0.39 // indirect - github.com/cloudflare/cfssl v1.6.4 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/containerd/errdefs v0.1.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect @@ -163,42 +118,29 @@ require ( github.com/docker/docker-credential-helpers v0.8.0 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-metrics v0.0.1 // indirect - github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect github.com/emicklei/go-restful/v3 v3.12.0 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect - github.com/evertras/bubble-table v0.15.2 // indirect github.com/fatih/camelcase v1.0.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/gdamore/encoding v1.0.0 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect - github.com/go-ini/ini v1.67.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-logr/zapr v1.3.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-resty/resty/v2 v2.9.1 // indirect - github.com/gobuffalo/flect v1.0.2 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang-jwt/jwt/v5 v5.0.0 // indirect - github.com/google/cel-go v0.17.7 // indirect - github.com/google/certificate-transparency-go v1.1.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-github/v53 v53.2.0 // indirect + github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/gophercloud/gophercloud v1.6.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl/v2 v2.15.0 // indirect github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect - github.com/kr/fs v0.1.0 // indirect - github.com/kris-nova/logger v0.2.1 // indirect - github.com/kubicorn/kubicorn v0.0.0-20180829191017-06f6bce92acc // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/labstack/echo/v4 v4.9.0 // indirect github.com/labstack/gommon v0.3.1 // indirect @@ -206,82 +148,47 @@ require ( github.com/leaanthony/gosod v1.0.3 // indirect github.com/leaanthony/slicer v1.5.0 // indirect github.com/likexian/gokit v0.25.15 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/mattn/go-localereader v0.0.1 // indirect - github.com/microsoft/kiota-abstractions-go v1.2.0 // indirect - github.com/microsoft/kiota-authentication-azure-go v1.0.0 // indirect - github.com/microsoft/kiota-http-go v1.1.0 // indirect - github.com/microsoft/kiota-serialization-form-go v1.0.0 // indirect - github.com/microsoft/kiota-serialization-json-go v1.0.4 // indirect - github.com/microsoft/kiota-serialization-text-go v1.0.0 // indirect - github.com/microsoftgraph/msgraph-sdk-go-core v1.0.0 // indirect github.com/miekg/dns v1.1.50 // indirect - github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect - github.com/muesli/cancelreader v0.2.2 // indirect - github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.15.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 // indirect + github.com/onsi/ginkgo/v2 v2.17.1 // indirect github.com/onsi/gomega v1.32.0 // indirect - github.com/orcaman/concurrent-map v1.0.0 // indirect github.com/osteele/liquid v1.4.0 // indirect github.com/osteele/tuesday v1.0.3 // indirect - github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/sftp v1.13.6 // indirect github.com/pluralsh/controller-reconcile-helper v0.0.4 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/sahilm/fuzzy v0.1.0 // indirect - github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b // indirect - github.com/sanathkr/yaml v0.0.0-20170819201035-0056894fa522 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/sosodev/duration v1.3.1 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/stoewer/go-strcase v1.2.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/tidwall/gjson v1.17.1 // indirect - github.com/tidwall/match v1.1.1 // indirect - github.com/tidwall/pretty v1.2.1 // indirect - github.com/tidwall/sjson v1.2.5 // indirect github.com/tkrajina/go-reflector v0.5.5 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fastjson v1.6.4 // indirect github.com/valyala/fasttemplate v1.2.1 // indirect github.com/vektah/gqlparser/v2 v2.5.16 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/weaveworks/eksctl v0.177.0 // indirect - github.com/weaveworks/goformation/v4 v4.10.2-0.20231113122203-bf1ae633f95c // indirect - github.com/yosida95/uritemplate/v3 v3.0.2 // indirect github.com/zclconf/go-cty v1.13.2 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect go.opentelemetry.io/otel/metric v1.22.0 // indirect + go.opentelemetry.io/otel/sdk v1.22.0 // indirect go.opentelemetry.io/otel/trace v1.22.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/tools v0.22.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - k8s.io/cluster-bootstrap v0.29.3 // indirect - k8s.io/kops v1.28.4 // indirect - k8s.io/kube-aggregator v0.27.2 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect - k8s.io/kubelet v0.28.1 // indirect - monis.app/mlog v0.0.4 // indirect - sigs.k8s.io/gateway-api v0.7.0 // indirect + sigs.k8s.io/controller-runtime v0.18.2 // indirect ) require ( @@ -289,13 +196,7 @@ require ( cloud.google.com/go/iam v1.1.5 github.com/Azure/azure-pipeline-go v0.2.3 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect - github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/BurntSushi/toml v1.3.2 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect @@ -316,7 +217,6 @@ require ( github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/dimchansky/utfbom v1.1.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/evanphx/json-patch v5.7.0+incompatible github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect @@ -334,7 +234,6 @@ require ( github.com/go-playground/validator/v10 v10.14.0 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.2 // indirect @@ -424,11 +323,11 @@ require ( google.golang.org/protobuf v1.34.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - k8s.io/apiextensions-apiserver v0.29.3 + k8s.io/apiextensions-apiserver v0.29.3 // indirect k8s.io/apiserver v0.29.3 // indirect k8s.io/cli-runtime v0.29.3 k8s.io/component-base v0.29.3 // indirect - k8s.io/helm v2.17.0+incompatible // indirect + k8s.io/helm v2.17.0+incompatible k8s.io/klog/v2 v2.120.1 // indirect k8s.io/kubectl v0.29.3 k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect diff --git a/go.sum b/go.sum index 7f74ea15..81f1253e 100644 --- a/go.sum +++ b/go.sum @@ -192,8 +192,6 @@ cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3 cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= -cloud.google.com/go/container v1.28.0 h1:/o82CFWXIYnT9p/07SnRgybqL3Pmmu86jYIlzlJVUBY= -cloud.google.com/go/container v1.28.0/go.mod h1:b1A1gJeTBXVLQ6GGw9/9M4FG94BEGsqJ5+t4d/3N7O4= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= @@ -627,16 +625,12 @@ github.com/AlecAivazis/survey/v2 v2.3.5 h1:A8cYupsAZkjaUmhtTYv3sSqc7LO5mp1XDfqe5 github.com/AlecAivazis/survey/v2 v2.3.5/go.mod h1:4AuI9b7RjAR+G7v9+C4YSlX/YL3K3cWNXgWXOhllqvI= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= -github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= -github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 h1:LNHhpdK7hzUcx/k1LIcuh5k7k1LGIWLQfCjaneSj7Fc= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1/go.mod h1:uE9zaUfEQT/nbQjVi2IblCG9iaLtZsuYZ8ne+PuQ02M= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization v1.0.0 h1:qtRcg5Y7jNJ4jEzPq4GpWLfTspHdNe2ZK6LjwGcjgmU= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization v1.0.0/go.mod h1:lPneRe3TwsoDRKY4O6YDLXHhEWrD+TIRa8XrV/3/fqw= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v1.0.0 h1:/Di3vB4sNeQ+7A8efjUVENvyB945Wruvstucqp7ZArg= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v1.0.0/go.mod h1:gM3K25LQlsET3QR+4V74zxCsFAy0r6xMNN9n80SZn+4= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= @@ -645,41 +639,23 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0/go.mod h1:243D9iHbcQXoFUtgHJwL7gl2zx1aDuDMjvBZVGr2uW0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions v1.1.1 h1:A+a54F7ygu4ANdV9hYsLMfiHFgjuwIUCG+6opLAvxJE= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions v1.1.1/go.mod h1:ThfyMjs6auYrWPnYJjI3H4H++oVPrz01pizpu8lfl3A= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.3.0 h1:LcJtQjCXJUm1s7JpUHZvu+bpgURhCatxVNbGADXniX0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.3.0/go.mod h1:+OgGVo0Httq7N5oayfvaLQ/Jq+2gJdqfp++Hyyl7Tws= github.com/Azure/azure-storage-blob-go v0.15.0 h1:rXtgp8tN1p29GvpGgfJetavIG0V7OgcSXPpwp3tx6qk= github.com/Azure/azure-storage-blob-go v0.15.0/go.mod h1:vbjsVbX0dlxnRc4FFMPsS9BsJWPcne7GB7onqlPvz58= -github.com/Azure/azure-workload-identity v1.1.0 h1:s3G9++A8ugvQjWcgA6xF8IA99MBkzMSdqJbIZ6qoF2s= -github.com/Azure/azure-workload-identity v1.1.0/go.mod h1:+kq8chW1Is1jsvmV9zXSmWsEJodPFxDlsdWcHMzdQ4c= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.24/go.mod h1:G6kyRlFnTuSbEYkQGawPfsCswgme4iYf6rfSKUDzbCc= -github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= -github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= +github.com/Azure/go-autorest/autorest v0.11.24 h1:1fIGgHKqVm54KIPT+q8Zmd1QlVsmHqeUGso5qm2BqqE= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 h1:wkAZRgT/pn8HhFyzfe9UnqOjJYqlembgCTi72Bm/xKk= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.12/go.mod h1:84w/uV8E37feW2NCJ08uT9VBfjfUHpgLVnG2InYD6cg= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 h1:0W/yGmFdTIT77fvdlGZ0LMISoLHFJ7Tx4U0yeB+uFs4= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.5/go.mod h1:ADQAXrkgm7acgWVUNamOgh8YNrv4p27l3Wc55oVfpzg= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= @@ -725,8 +701,6 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Yamashou/gqlgenc v0.23.2 h1:WPxYPrwc6W4Z1eY4qKxoH3nb5PC4jAMWqQA0G8toQMI= github.com/Yamashou/gqlgenc v0.23.2/go.mod h1:oMc4EQBQeDwLIODvgcvpaSp6rO+KMf47FuOhplv5D3A= -github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= -github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= @@ -749,13 +723,10 @@ github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHG github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= -github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= @@ -773,13 +744,6 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:l github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= -github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/aws/amazon-ec2-instance-selector/v2 v2.4.2-0.20230601180523-74e721cb8c1e h1:zWGlJnXe5BLiqYuIHozuCGH5imE12AVhi2ss68pbpxI= -github.com/aws/amazon-ec2-instance-selector/v2 v2.4.2-0.20230601180523-74e721cb8c1e/go.mod h1:X1GFUTX6aorSJmVLgfAD56jdNPvnNSOIpsRLgxA1LLE= -github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= -github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= -github.com/aws/aws-sdk-go-v2 v1.16.15/go.mod h1:SwiyXi/1zTUZ6KIAmLK5V5ll8SiURNUYOqTerZPaF9k= github.com/aws/aws-sdk-go-v2 v1.27.1 h1:xypCL2owhog46iFxBKKpBcw+bPTX/RJzwNj8uSilENw= github.com/aws/aws-sdk-go-v2 v1.27.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= @@ -790,32 +754,16 @@ github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHH github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.22/go.mod h1:/vNv5Al0bpiF8YdX2Ov6Xy05VTiXsql94yUqJMYaj0w= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.8 h1:RnLB7p6aaFMRfyQkD6ckxR7myCC9SABIqSz4czYUUbU= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.8/go.mod h1:XH7dQJd+56wEbP1I4e4Duo+QhSMxNArE8VP7NuUOTeM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.16/go.mod h1:62dsXI0BqTIGomDl8Hpm33dv0OntGaVblri3ZRParVQ= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.8 h1:jzApk2f58L9yW9q1GEab3BMMFWUkkiZhyrRUtbwUbKU= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.8/go.mod h1:WqO+FftfO3tGePUtQxPXM6iODVfqMwsVMgTbG/ZXIdQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.8 h1:jH33S0y5Bo5ZVML62JgZhjd/LrtU+vbR8W7XnIE3Srk= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.8/go.mod h1:hD5YwHLOy6k7d6kqcn3me1bFWHOtzhaXstMd6BpdB68= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.40.5 h1:vhdJymxlWS2qftzLiuCjSswjXBRLGfzo/BEE9LDveBA= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.40.5/go.mod h1:ZErgk/bPaaZIpj+lUWGlwI1A0UFhSIscgnCPzTLnb2s= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.50.0 h1:Ap5tOJfeAH1hO2UQc3X3uMlwP7uryFeZXMvZCXIlLSE= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.50.0/go.mod h1:/v2KYdCW4BaHKayenaWEXOOdxItIwEA3oU0XzuQY3F0= -github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.39.2 h1:svl3DNKWpcLOlz+bFzmOxGp8gcbvSZ6m2t44Zzaet9U= -github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.39.2/go.mod h1:gAJs+mKIoK4JTQD1KMZtHgyBRZ8S6Oy5+qjJzoDAvbE= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.35.1 h1:suWu59CRsDNhw2YXPpa6drYEetIUUIMUhkzHmucbCf8= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.35.1/go.mod h1:tZiRxrv5yBRgZ9Z4OOOxwscAZRFk5DgYhEcjX1QpvgI= github.com/aws/aws-sdk-go-v2/service/ec2 v1.156.0 h1:TFK9GeUINErClL2+A+GLYhjiChVdaXCgIUiCsS/UQrE= github.com/aws/aws-sdk-go-v2/service/ec2 v1.156.0/go.mod h1:xejKuuRDjz6z5OqyeLsz01MlOqqW7CqpAB4PabNvpu8= -github.com/aws/aws-sdk-go-v2/service/eks v1.42.1 h1:q7MWjPP0uCmUvuGDFCvkbqRkqfH+Bq6di9RTd64S0YM= -github.com/aws/aws-sdk-go-v2/service/eks v1.42.1/go.mod h1:UhKBrO0Ezz8iIg02a6u4irGKBKh0gTz3fF8LNdD2vDI= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.24.4 h1:V5YvSMQwZklktzYeOOhYdptx7rP650XP3RnxwNu1UEQ= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.24.4/go.mod h1:aYygRYqRxmLGrxRxAisgNarwo4x8bcJG14rh4r57VqE= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.30.5 h1:/x2u/TOx+n17U+gz98TOw1HKJom0EOqrhL4SjrHr0cQ= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.30.5/go.mod h1:e1McVqsud0JOERidvppLEHnuCdh/X6MRyL5L0LseAUk= github.com/aws/aws-sdk-go-v2/service/iam v1.32.0 h1:ZNlfPdw849gBo/lvLFbEEvpTJMij0LXqiNWZ+lIamlU= github.com/aws/aws-sdk-go-v2/service/iam v1.32.0/go.mod h1:aXWImQV0uTW35LM0A/T4wEg6R1/ReXUu4SM6/lUHYK0= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= @@ -826,32 +774,18 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.10 h1:7kZqP7ak github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.10/go.mod h1:gYVF3nM1ApfTRDj9pvdhootBb8WbiIejuqn4w8ruMes= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.8 h1:iQNXVs1vtaq+y9M90M4ZIVNORje0qXTscqHLqoOnFS0= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.8/go.mod h1:yUQPRlWqGG0lfNsmjbRWKVwgilfBtZTOFSLEYALlAig= -github.com/aws/aws-sdk-go-v2/service/outposts v1.38.0 h1:e4uIyH2aMFUtUaHjO/NCNBkXdxBBJj3OnSM5pMo5i0s= -github.com/aws/aws-sdk-go-v2/service/outposts v1.38.0/go.mod h1:6fqELmjNXUPBviJYhN4QzmMQRtuPAREMRKlhzfBD8j0= -github.com/aws/aws-sdk-go-v2/service/pricing v1.17.0 h1:RQOMvPwte2H4ZqsiZmrla1crhBWDFnW8bZynkec5cGU= -github.com/aws/aws-sdk-go-v2/service/pricing v1.17.0/go.mod h1:LJyh9figH3ZpSiVjR5umzbl6V3EpQdZR4Se1ayoUtfI= github.com/aws/aws-sdk-go-v2/service/s3 v1.55.0 h1:6kq0Xql9qiwNGL/Go87ZqR4otg9jnKs71OfWCVbPxLM= github.com/aws/aws-sdk-go-v2/service/s3 v1.55.0/go.mod h1:oSkRFuHVWmUY4Ssk16ErGzBqvYEbvORJFzFXzWhTB2s= -github.com/aws/aws-sdk-go-v2/service/ssm v1.49.5 h1:KBwyHzP2QG8J//hoGuPyHWZ5tgL1BzaoMURUkecpI4g= -github.com/aws/aws-sdk-go-v2/service/ssm v1.49.5/go.mod h1:Ebk/HZmGhxWKDVxM4+pwbxGjm3RQOQLMjAEosI3ss9Q= github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= -github.com/aws/smithy-go v1.13.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= -github.com/awslabs/goformation/v4 v4.19.5 h1:Y+Tzh01tWg8gf//AgGKUamaja7Wx9NPiJf1FpZu4/iU= -github.com/awslabs/goformation/v4 v4.19.5/go.mod h1:JoNpnVCBOUtEz9bFxc9sjy8uBUCLF5c4D1L7RhRTVM8= -github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= -github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= -github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benjamintf1/unmarshalledmatchers v1.0.0 h1:JUhctHQVNarMXg5x3m0Tkp7WnDLzNVxeWc1qbKQPylI= -github.com/benjamintf1/unmarshalledmatchers v1.0.0/go.mod h1:IVZdtAzpNyBTuhobduAjo5CjTLczWWbiXnWDVxIgSko= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -861,8 +795,6 @@ github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3IS github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= @@ -874,8 +806,6 @@ github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR github.com/buger/goterm v1.0.4 h1:Z9YvGmOih81P0FbVtEYTFF6YsSgxSUKEhf/f9bTMXbY= github.com/buger/goterm v1.0.4/go.mod h1:HiFWV3xnkolgrBV3mY8m0X0Pumt4zg4QhbdOzQtB8tE= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/bxcodec/faker v2.0.1+incompatible h1:P0KUpUw5w6WJXwrPfv35oc91i4d8nf40Nwln+M/+faA= -github.com/bxcodec/faker v2.0.1+incompatible/go.mod h1:BNzfpVdTwnFJ6GtfYTcQu6l6rHShT+veBxNCnjCx5XM= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= @@ -889,8 +819,6 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cert-manager/cert-manager v1.12.3 h1:3gZkP7hHI2CjgX5qZ1Tm98YbHVXB2NGAZPVbOLb3AjU= -github.com/cert-manager/cert-manager v1.12.3/go.mod h1:/RYHUvK9cxuU5dbRyhb7g6am9jCcZc8huF3AnADE+nA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -899,15 +827,6 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= -github.com/charmbracelet/bubbles v0.15.0 h1:c5vZ3woHV5W2b8YZI1q7v4ZNQaPetfHuoHzx+56Z6TI= -github.com/charmbracelet/bubbles v0.15.0/go.mod h1:Y7gSFbBzlMpUDR/XM9MhZI374Q+1p1kluf1uLl8iK74= -github.com/charmbracelet/bubbletea v0.23.1/go.mod h1:JAfGK/3/pPKHTnAS8JIE2u9f61BjWTQY57RbT25aMXU= -github.com/charmbracelet/bubbletea v0.24.1 h1:LpdYfnu+Qc6XtvMz6d/6rRY71yttHTP5HtrjMgWvixc= -github.com/charmbracelet/bubbletea v0.24.1/go.mod h1:rK3g/2+T8vOSEkNHvtq40umJpeVYDn6bLaqbgzhL/hg= -github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= -github.com/charmbracelet/lipgloss v0.6.0/go.mod h1:tHh2wr34xcHjC2HCXIlGSG1jaDF0S0atAUvBMP6Ppuk= -github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E= -github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c= github.com/chartmuseum/helm-push v0.10.3 h1:0NQq4FJvy7gXm7nlUg2aucv7LTI5wszyI71oYm1zkzk= github.com/chartmuseum/helm-push v0.10.3/go.mod h1:zVskBtjr1r6F3yx6TGrNeqvs2lWcvKeJqUcDMEzle6k= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= @@ -916,15 +835,11 @@ github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583j github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cjlapao/common-go v0.0.39 h1:bAAUrj2B9v0kMzbAOhzjSmiyDy+rd56r2sy7oEiQLlA= -github.com/cjlapao/common-go v0.0.39/go.mod h1:M3dzazLjTjEtZJbbxoA5ZDiGCiHmpwqW9l4UWaddwOA= github.com/cli/browser v1.0.0 h1:RIleZgXrhdiCVgFBSjtWwkLPUCWyhhhN5k5HGSBt1js= github.com/cli/browser v1.0.0/go.mod h1:IEWkHYbLjkhtjwwWlwTHW2lGxeS5gezEQBMLTwDHf5Q= github.com/cli/safeexec v1.0.0 h1:0VngyaIyqACHdcMNWfo6+KdUYnqEr2Sg+bSP1pdF+dI= github.com/cli/safeexec v1.0.0/go.mod h1:Z/D4tTN8Vs5gXYHDCbaM1S/anmEDnJb1iW0+EJ5zx3Q= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cfssl v1.6.4 h1:NMOvfrEjFfC63K3SGXgAnFdsgkmiq4kATme5BfcqrO8= -github.com/cloudflare/cfssl v1.6.4/go.mod h1:8b3CQMxfWPAeom3zBnGJ6sd+G1NkL5TXqmDXacb+1J0= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= @@ -946,9 +861,6 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= -github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/containerd v1.7.20 h1:Sl6jQYk3TRavaU83h66QMbI2Nqg9Jm6qzwX57Vsn1SQ= github.com/containerd/containerd v1.7.20/go.mod h1:52GsS5CwquuqPuLncsXwG0t2CiUce+KsNHJZQJvAgR0= github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= @@ -959,10 +871,6 @@ github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= -github.com/coredns/caddy v1.1.1 h1:2eYKZT7i6yxIfGP3qLJoJ7HAsDJqYB+X68g4NYjSrE0= -github.com/coredns/caddy v1.1.1/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= -github.com/coredns/corefile-migration v1.0.21 h1:W/DCETrHDiFo0Wj03EyMkaQ9fwsmSgqTCQDHpceaSsE= -github.com/coredns/corefile-migration v1.0.21/go.mod h1:XnhgULOEouimnzgn0t4WPuFDN2/PJQcTxdWKC5eXNGE= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -971,11 +879,10 @@ github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHo github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= @@ -1007,8 +914,6 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= -github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/distribution/distribution/v3 v3.0.0-beta.1 h1:X+ELTxPuZ1Xe5MsD3kp2wfGUhc8I+MPfRis8dZ818Ic= github.com/distribution/distribution/v3 v3.0.0-beta.1/go.mod h1:O9O8uamhHzWWQVTjuQpyYUVm/ShPHPUDgvQMpHGVBDs= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= @@ -1036,8 +941,6 @@ github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arX github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 h1:7QPwrLT79GlD5sizHf27aoY2RTvw62mO6x7mxkScNk0= -github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46/go.mod h1:esf2rsHFNlZlxsqsZDojNBcnNs5REqIvRrWRHqX0vEU= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= @@ -1078,8 +981,6 @@ github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= -github.com/evertras/bubble-table v0.15.2 h1:hVj27V9tk5TD5p6mVv0RK/KJu2sHq0U+mBMux/HptkU= -github.com/evertras/bubble-table v0.15.2/go.mod h1:SPOZKbIpyYWPHBNki3fyNpiPBQkvkULAtOT7NTD5fKY= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= @@ -1105,10 +1006,6 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= -github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= -github.com/gdamore/tcell/v2 v2.6.0 h1:OKbluoP9VYmJwZwq/iLb4BxwKcwGthaa1YNBJIyCySg= -github.com/gdamore/tcell/v2 v2.6.0/go.mod h1:be9omFATkdr0D9qewWW3d+MEvl5dha+Etb5y65J2H8Y= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -1139,8 +1036,6 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs= github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw= -github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= -github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -1165,8 +1060,6 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= -github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= -github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= @@ -1236,8 +1129,6 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEe github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= -github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gobuffalo/logger v1.0.6 h1:nnZNpxYo0zx+Aj9RfMPBm+x9zAU2OayFh/xrAWi34HU= github.com/gobuffalo/logger v1.0.6/go.mod h1:J31TBEHR1QLV2683OXTAItYIg8pv2JMHnF/quuAbMjs= github.com/gobuffalo/packd v1.0.1 h1:U2wXfRr4E9DH8IdsDLlRFwTZTK7hLfq9qT/QHXGVe/0= @@ -1258,8 +1149,7 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= @@ -1315,10 +1205,6 @@ github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9 github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/cel-go v0.16.1/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= -github.com/google/cel-go v0.17.7 h1:6ebJFzu1xO2n7TLtN+UBqShGBhlD85bhvglh5DpcfqQ= -github.com/google/cel-go v0.17.7/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= -github.com/google/certificate-transparency-go v1.1.4 h1:hCyXHDbtqlr/lMXU0D4WgbalXL0Zk4dSWWMbPV8VrqY= -github.com/google/certificate-transparency-go v1.1.4/go.mod h1:D6lvbfwckhNrbM9WVl1EVeMOyzC19mpIjMOI4nxBHtQ= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= @@ -1341,8 +1227,6 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v45 v45.2.0 h1:5oRLszbrkvxDDqBCNj2hjDZMKmvexaZ1xw/FCD+K3FI= github.com/google/go-github/v45 v45.2.0/go.mod h1:FObaZJEDSTa/WGCzZ2Z3eoCDXWJKMenWWTrd8jrta28= -github.com/google/go-github/v53 v53.2.0 h1:wvz3FyF53v4BK+AsnvCmeNhf8AkTaeh2SoYu/XUvTtI= -github.com/google/go-github/v53 v53.2.0/go.mod h1:XhFRObz+m/l+UCm9b7KSIC3lT3NWSXGt7mOsAWEloao= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -1415,8 +1299,6 @@ github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qK github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gophercloud/gophercloud v1.6.0 h1:JwJN1bauRnWPba5ueWs9IluONHteXPWjjK+MvfM4krY= -github.com/gophercloud/gophercloud v1.6.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= @@ -1435,7 +1317,6 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:Fecb github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -1470,8 +1351,6 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -1490,8 +1369,6 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA= -github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs= github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 h1:zHcMbxY0+rFO9gY99elV/XC/UnQVg7FhRCbj1i5b7vM= @@ -1510,7 +1387,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inancgumus/screen v0.0.0-20190314163918-06e984b86ed3 h1:fO9A67/izFYFYky7l1pDP5Dr0BTCRkaQJUG6Jm5ehsk= @@ -1572,7 +1448,6 @@ github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZX github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -1586,14 +1461,8 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kris-nova/logger v0.2.1 h1:hbZusgXXXTSd0rNAMBBe/8lhjxXkqWs0+nzjwewCI+E= -github.com/kris-nova/logger v0.2.1/go.mod h1:++9BgZujZd4v0ZTZCb5iPsaomXdZWyxotIAh1IiDm44= -github.com/kris-nova/novaarchive v0.0.0-20210219195539-c7c1cabb2577 h1:wDLPO65M4W4VRDq9kyPAqbg+10OAq6hUfnv6ORhBYOc= -github.com/kris-nova/novaarchive v0.0.0-20210219195539-c7c1cabb2577/go.mod h1:Q4IuuyWjHqEqrxx68v+NPB1iQgtR/jcuR7/sdcGsa8M= github.com/ktrysmt/go-bitbucket v0.9.55 h1:eOrF7wWmG4wz5iPr7ymgyWLoti2OfmrhU2tmT6yhAu8= github.com/ktrysmt/go-bitbucket v0.9.55/go.mod h1:y5wrrDHCGUFAtuC43GyLBeFigq7rwrh4HqeDOOyZT+A= -github.com/kubicorn/kubicorn v0.0.0-20180829191017-06f6bce92acc h1:7jGjX/rZDjpMwz0kojvzWvRpOvUiR7L8e22QEr7RYes= -github.com/kubicorn/kubicorn v0.0.0-20180829191017-06f6bce92acc/go.mod h1:Z/PU7XQicaZV6QFTAvm8EaWyfNbAb4a76kmR4Am4KA8= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= @@ -1626,8 +1495,6 @@ github.com/likexian/gokit v0.25.15 h1:QjospM1eXhdMMHwZRpMKKAHY/Wig9wgcREmLtf9Nsl github.com/likexian/gokit v0.25.15/go.mod h1:S2QisdsxLEHWeD/XI0QMVeggp+jbxYqUxMvSBil7MRg= github.com/linode/linodego v1.26.0 h1:2tOZ3Wxn4YvGBRgZi3Vz6dab+L16XUntJ9sJxh3ZBio= github.com/linode/linodego v1.26.0/go.mod h1:kD7Bf1piWg/AXb9TA0ThAVwzR+GPf6r2PvbTbVk7PMA= -github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= -github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= @@ -1667,13 +1534,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= -github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= @@ -1685,22 +1547,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfr github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/microsoft/kiota-abstractions-go v1.2.0 h1:lUriJgqdCY/QajwWQOgTCQE9Atywfe2NHhgoTCSXTRE= -github.com/microsoft/kiota-abstractions-go v1.2.0/go.mod h1:RkxyZ5x87Njik7iVeQY9M2wtrrL1MJZcXiI/BxD/82g= -github.com/microsoft/kiota-authentication-azure-go v1.0.0 h1:29FNZZ/4nnCOwFcGWlB/sxPvWz487HA2bXH8jR5k2Rk= -github.com/microsoft/kiota-authentication-azure-go v1.0.0/go.mod h1:rnx3PRlkGdXDcA/0lZQTbBwyYGmc+3POt7HpE/e4jGw= -github.com/microsoft/kiota-http-go v1.1.0 h1:L5I93EiNtlP/X6YzeTlhjWt7Q1DxzC9CmWSVtX3b0tE= -github.com/microsoft/kiota-http-go v1.1.0/go.mod h1:zESUM6ovki9LEupqziCbxJ+FAYoF0dFDYZVpOkAfSLc= -github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI= -github.com/microsoft/kiota-serialization-form-go v1.0.0/go.mod h1:h4mQOO6KVTNciMF6azi1J9QB19ujSw3ULKcSNyXXOMA= -github.com/microsoft/kiota-serialization-json-go v1.0.4 h1:5TaISWwd2Me8clrK7SqNATo0tv9seOq59y4I5953egQ= -github.com/microsoft/kiota-serialization-json-go v1.0.4/go.mod h1:rM4+FsAY+9AEpBsBzkFFis+b/LZLlNKKewuLwK9Q6Mg= -github.com/microsoft/kiota-serialization-text-go v1.0.0 h1:XOaRhAXy+g8ZVpcq7x7a0jlETWnWrEum0RhmbYrTFnA= -github.com/microsoft/kiota-serialization-text-go v1.0.0/go.mod h1:sM1/C6ecnQ7IquQOGUrUldaO5wj+9+v7G2W3sQ3fy6M= -github.com/microsoftgraph/msgraph-sdk-go v0.61.0 h1:Xa8KoQ6CS04CnUxAVectu185VLlLzAWxH0C3UxMWp1E= -github.com/microsoftgraph/msgraph-sdk-go v0.61.0/go.mod h1:vPylvYw8unnEZWmfCBeiwMoLvEeHW2FcWD0LjUnuiC4= -github.com/microsoftgraph/msgraph-sdk-go-core v1.0.0 h1:7NWTfyXvOjoizW7PmxNp3+8wCKPgpODs/D1cUZ3fkAY= -github.com/microsoftgraph/msgraph-sdk-go-core v1.0.0/go.mod h1:tQb4q3YMIj2dWhhXhQSJ4ELpol931ANKzHSYK5kX1qE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= @@ -1751,17 +1597,6 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= -github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b h1:1XF24mVaiu7u+CFywTdcDo2ie1pzzhwjt6RHqzpMU34= -github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= -github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= -github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= -github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68/go.mod h1:Xk+z4oIWdQqJzsxyjgl3P22oYZnHdZ8FFTHAQQt5BMQ= -github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= -github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= -github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= -github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4YJK5e2bc= -github.com/muesli/termenv v0.15.1 h1:UzuTb/+hhlBugQz28rpzey4ZuKcZ03MeKsoG7IJZIxs= -github.com/muesli/termenv v0.15.1/go.mod h1:HeAQPTzpfs016yGtA4g00CsdYnVLJvxsS4ANqrZs2sQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -1770,7 +1605,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oleiade/reflections v1.0.1 h1:D1XO3LVEYroYskEsoSiGItp9RUxG6jWnCVvrqH0HHQM= @@ -1778,15 +1612,10 @@ github.com/oleiade/reflections v1.0.1/go.mod h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97v github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 h1:Yl0tPBa8QPjGmesFh1D0rDy+q1Twx6FyU7VWHi8wZbI= -github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852/go.mod h1:eqOVx5Vwu4gd2mmMZvVZsgIqNSaW3xxRThUJ0k/TPk4= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= @@ -1808,7 +1637,6 @@ github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3Hig github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.12.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= @@ -1832,8 +1660,6 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY= -github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/osteele/liquid v1.4.0 h1:WS6lT3MFWUAxNbveF22tMLluOWNghGnKCZHLn7NbJGs= github.com/osteele/liquid v1.4.0/go.mod h1:VmzQQHa5v4E0GvGzqccfAfLgMwRk2V+s1QbxYx9dGak= github.com/osteele/tuesday v1.0.3 h1:SrCmo6sWwSgnvs1bivmXLvD7Ko9+aJvvkmDjB5G4FTU= @@ -1841,12 +1667,8 @@ github.com/osteele/tuesday v1.0.3/go.mod h1:pREKpE+L03UFuR+hiznj3q7j3qB1rUZ4XfKe github.com/packethost/packngo v0.29.0 h1:gRIhciVZQ/zLNrIdIdbOUyB/Tw5IgoaXyhP4bvE+D2s= github.com/packethost/packngo v0.29.0/go.mod h1:/UHguFdPs6Lf6FOkkSEPnRY5tgS0fsVM+Zv/bvBrmt0= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -1868,10 +1690,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= -github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= -github.com/pluralsh/cluster-api-migration v0.2.16 h1:MQGrLQAhGSSpyjEDamhnJZaQ8MkxlHzR8PZxIVavLIM= -github.com/pluralsh/cluster-api-migration v0.2.16/go.mod h1:24PjMsYv3vSlUiYw7BeUQ0GAtK0Jk2B1iwh35WGQLx8= github.com/pluralsh/console/go/client v1.12.0 h1:1djVBV9GMEe1I6yKv0bWu2Qx8dnsVgGzhntGSY+KLCw= github.com/pluralsh/console/go/client v1.12.0/go.mod h1:lpoWASYsM9keNePS3dpFiEisUHEfObIVlSL3tzpKn8k= github.com/pluralsh/controller-reconcile-helper v0.0.4 h1:1o+7qYSyoeqKFjx+WgQTxDz4Q2VMpzprJIIKShxqG0E= @@ -1886,8 +1704,6 @@ github.com/pluralsh/plural-operator v0.5.5 h1:57GxniNjUa3hpHgvFr9oDonFgvDUC8XDD5 github.com/pluralsh/plural-operator v0.5.5/go.mod h1:WIXiz26/WDcUn0FA7Q1jPxmfsm98U1/JL8YpIdKVLX0= github.com/pluralsh/polly v0.1.8 h1:fkF5fLNofN4CyOs89lQfKeZaSXgRe8MnXz9VK5MzvRU= github.com/pluralsh/polly v0.1.8/go.mod h1:W9IBX3e3xEjJuRjAQRfFJpH+UkNjddVY5YjMhyisQqQ= -github.com/pluralsh/terraform-delinker v0.0.2 h1:8SbUVxQa5To13ZZV2H64JLDLMEKolZWsqC+osyaTAu0= -github.com/pluralsh/terraform-delinker v0.0.2/go.mod h1:mU4F5OtfAIG5Xobbk+3uiU++AWKyfZPyyMmVZd23bV4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1952,11 +1768,7 @@ github.com/redis/go-redis/v9 v9.1.0 h1:137FnGdk+EQdCbye1FW+qOEcY5S+SpY9T0Niuqvtf github.com/redis/go-redis/v9 v9.1.0/go.mod h1:urWj3He21Dj5k4TK1y59xH8Uj6ATueP8AH1cY3lZl4c= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rivo/tview v0.0.0-20230615085408-bb9595ee0f4d h1:meetFLuP+bgn5G55WXzxLp2UnNeUJ0hM3guL+0dX8EI= -github.com/rivo/tview v0.0.0-20230615085408-bb9595ee0f4d/go.mod h1:nVwGv4MP47T0jvlk7KuTTjjuSmrGO4JF0iaiNt4bufE= -github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= @@ -1983,14 +1795,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI= -github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= -github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b h1:jUK33OXuZP/l6babJtnLo1qsGvq6G9so9KMflGAm4YA= -github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b/go.mod h1:8458kAagoME2+LN5//WxE71ysZ3B7r22fdgb7qVmXSY= -github.com/sanathkr/yaml v0.0.0-20170819201035-0056894fa522 h1:fOCp11H0yuyAt2wqlbJtbyPzSgaxHTv8uN1pMpkG1t8= -github.com/sanathkr/yaml v0.0.0-20170819201035-0056894fa522/go.mod h1:tQTYKOQgxoH3v6dEmdHiz4JG+nbxWwM5fgPQUpSZqVQ= github.com/schollz/progressbar/v3 v3.14.1 h1:VD+MJPCr4s3wdhTc7OEJ/Z3dAeBzJ7yKH/P4lC5yRTI= github.com/schollz/progressbar/v3 v3.14.1/go.mod h1:Zc9xXneTzWXF81TGoqL71u0sBPjULtEHYtj/WVgVy8E= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -2049,7 +1855,6 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= -github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -2076,19 +1881,7 @@ github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8 github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= -github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= -github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= -github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= -github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= github.com/tkrajina/go-reflector v0.5.5 h1:gwoQFNye30Kk7NrExj8zm3zFtrGPqOkzFMLuQZg1DtQ= github.com/tkrajina/go-reflector v0.5.5/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -2107,8 +1900,6 @@ github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= -github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= @@ -2121,10 +1912,6 @@ github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhw github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= github.com/wailsapp/wails/v2 v2.4.1 h1:Ns7MOKWQM6l0ttBxpd5VcgYrH+GNPOnoDfnsBpbDnzM= github.com/wailsapp/wails/v2 v2.4.1/go.mod h1:jbOZbcr/zm79PxXxAjP8UoVlDd9wLW3uDs+isIthDfs= -github.com/weaveworks/eksctl v0.177.0 h1:IBR5AF2BzTURdZpCGiqZwhyIfQi0aw2sN2WCdbabLLA= -github.com/weaveworks/eksctl v0.177.0/go.mod h1:WZsXcqqL5JJIzlKtw8wQsXL3wBETD4aghKChfVTs2gk= -github.com/weaveworks/goformation/v4 v4.10.2-0.20231113122203-bf1ae633f95c h1:iejfxgm8iQ6Jr3yT7Javgk40drlL6w9B6+zgACs0fMw= -github.com/weaveworks/goformation/v4 v4.10.2-0.20231113122203-bf1ae633f95c/go.mod h1:3c2tyJmoge5qTS4PXS0niVJxR0YzroIBsts3dQI3EdI= github.com/xanzy/go-gitlab v0.73.1 h1:UMagqUZLJdjss1SovIC+kJCH4k2AZWXl58gJd38Y/hI= github.com/xanzy/go-gitlab v0.73.1/go.mod h1:d/a0vswScO7Agg1CZNz15Ic6SSvBG9vfw8egL99t4kA= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= @@ -2134,7 +1921,6 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMc github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= @@ -2143,8 +1929,6 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= -github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -2164,18 +1948,11 @@ github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaD go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= -go.etcd.io/etcd/api/v3 v3.5.13 h1:8WXU2/NBge6AUF1K1gOexB6e07NgsN1hXK0rSTtgSp4= -go.etcd.io/etcd/api/v3 v3.5.13/go.mod h1:gBqlqkcMMZMVTMm4NDZloEVJzxQOQIls8splbqBDa0c= go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= -go.etcd.io/etcd/client/pkg/v3 v3.5.13 h1:RVZSAnWWWiI5IrYAXjQorajncORbS0zI48LQlE2kQWg= -go.etcd.io/etcd/client/pkg/v3 v3.5.13/go.mod h1:XxHT4u1qU12E2+po+UVPrEeL94Um6zL58ppuJWXSAB8= go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= -go.etcd.io/etcd/client/v3 v3.5.13 h1:o0fHTNJLeO0MyVbc7I3fsCf6nrOqn5d+diSarKnB2js= -go.etcd.io/etcd/client/v3 v3.5.13/go.mod h1:cqiAeY8b5DEEcpxvgWKsbLIWNM/8Wy2xJSDMtioMcoI= go.etcd.io/etcd/pkg/v3 v3.5.0-alpha.0/go.mod h1:tV31atvwzcybuqejDoY3oaNRTtlD2l/Ot78Pc9w7DMY= go.etcd.io/etcd/raft/v3 v3.5.9/go.mod h1:WnFkqzFdZua4LVlVXQEGhmooLeyS7mqzS4Pf4BCVqXg= go.etcd.io/etcd/server/v3 v3.5.9/go.mod h1:GgI1fQClQCFIzuVjlvdbMxNbnISt90gdfYyqiAIt65g= @@ -2198,8 +1975,6 @@ go.opentelemetry.io/contrib/exporters/autoexport v0.46.1 h1:ysCfPZB9AjUlMa1UHYup go.opentelemetry.io/contrib/exporters/autoexport v0.46.1/go.mod h1:ha0aiYm+DOPsLHjh0zoQ8W8sLT+LJ58J3j47lGpSLrU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0/go.mod h1:E5NNboN0UqSAki0Atn9kVwaN7I+l25gGxDqBueo/74E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0/go.mod h1:h8TWwRAhQpOd0aM5nYsRD8+flnkj+526GEIVlarH7eY= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1/go.mod h1:9NiG9I2aHTKkcxqCILhjtyNA1QEiCjdBACv4IvrFQ+c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= @@ -2276,8 +2051,6 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= @@ -2302,12 +2075,9 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= @@ -2629,14 +2399,12 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2830,7 +2598,6 @@ golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNq golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= @@ -3157,7 +2924,6 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -3212,8 +2978,6 @@ k8s.io/cli-runtime v0.29.5 h1:gnDrFEA4Xr8lAdc5U4tVfU7RGAmM/yvVvW9f0ao7g2s= k8s.io/cli-runtime v0.29.5/go.mod h1:6KuWJyLIpbh2II874fA1SnmGHvZCitsHRR1XDowsMC0= k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= -k8s.io/cluster-bootstrap v0.29.3 h1:DIMDZSN8gbFMy9CS2mAS2Iqq/fIUG783WN/1lqi5TF8= -k8s.io/cluster-bootstrap v0.29.3/go.mod h1:aPAg1VtXx3uRrx5qU2jTzR7p1rf18zLXWS+pGhiqPto= k8s.io/code-generator v0.17.0/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= k8s.io/code-generator v0.28.9/go.mod h1:WiJgVNDFAlT90nq6IOxhZ1gxL2JexbcfAx9ZBsyQ3Do= k8s.io/component-base v0.17.0/go.mod h1:rKuRAokNMY2nn2A6LP/MiwpoaMRHpfRnrPaUJJj1Yoc= @@ -3236,16 +3000,10 @@ k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kms v0.28.9/go.mod h1:VgyAIRMFqZX9lHyixecU/JTI0wnPD1wCIlquvlXRJ+Y= -k8s.io/kops v1.28.4 h1:vMKtEmmSfv5SJc9yxoFA+o/gCzk6XGXRCJAOMoZdH8w= -k8s.io/kops v1.28.4/go.mod h1:qaPEwbWXvrbAO4si3nEyFiOZ2hlFC43kYf+wkQUh6q4= -k8s.io/kube-aggregator v0.27.2 h1:jfHoPip+qN/fn3OcrYs8/xMuVYvkJHKo0H0DYciqdns= -k8s.io/kube-aggregator v0.27.2/go.mod h1:mwrTt4ESjQ7A6847biwohgZWn8P/KzSFHegEScbSGY4= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/kubectl v0.29.3 h1:RuwyyIU42MAISRIePaa8Q7A3U74Q9P4MoJbDFz9o3us= k8s.io/kubectl v0.29.3/go.mod h1:yCxfY1dbwgVdEt2zkJ6d5NNLOhhWgTyrqACIoFhpdd4= -k8s.io/kubelet v0.28.1 h1:QRfx+jrzNgkLnMSw/nxGkAN7cjHPO446MDbjPITxLkk= -k8s.io/kubelet v0.28.1/go.mod h1:xYBbbJ0e2Rtb/hv+QFie448lFF81J990ImIptce2AHk= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= @@ -3292,8 +3050,6 @@ modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= -monis.app/mlog v0.0.4 h1:YEzh5sguG4ApywaRWnBU+mGP6SA4WxOqiJ36u+KtoeE= -monis.app/mlog v0.0.4/go.mod h1:LtOpnndFuRGqnLBwzBvpA1DaoKuud2/moLzYXIiNl1s= oras.land/oras-go v1.2.6 h1:z8cmxQXBU8yZ4mkytWqXfo6tZcamPwjsuxYU81xJ8Lk= oras.land/oras-go v1.2.6/go.mod h1:OVPc1PegSEe/K8YiLfosrlqlqTN9PUyFvOw5Y9gwrT8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= @@ -3301,20 +3057,10 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 h1:TgtAeesdhpm2SGwkQasmbeqDo8th5wOBA5h/AjTKA4I= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0/go.mod h1:VHVDI/KrK4fjnV61bE2g3sA7tiETLn8sooImelsCx3Y= sigs.k8s.io/application v0.8.3 h1:5UETobiVhxTkKn3pIESImXiMNmSg3VkM5+JvmYGDPko= sigs.k8s.io/application v0.8.3/go.mod h1:Mv+ht9RE/QNtITYCzRbt3XTIN6t6so6cInmiyg6wOIg= -sigs.k8s.io/cluster-api v1.7.2 h1:bRE8zoao7ajuLC0HijqfZVcubKQCPlZ04HMgcA53FGE= -sigs.k8s.io/cluster-api v1.7.2/go.mod h1:V9ZhKLvQtsDODwjXOKgbitjyCmC71yMBwDcMyNNIov0= -sigs.k8s.io/cluster-api-operator v0.10.1 h1:qZyr2ZsmLLg6+bJKr0dIp5AdiXqoCJyWCIRh9OJ+cUc= -sigs.k8s.io/cluster-api-operator v0.10.1/go.mod h1:XdgeWf87efXWRGUT8JvkzjPf72H642sycVCSoWdScic= -sigs.k8s.io/cluster-api-provider-aws/v2 v2.5.0 h1:DGEbh4NLUmKJpl9XlswhlXM7S1srtDx8fc5sn7rQsGM= -sigs.k8s.io/cluster-api-provider-aws/v2 v2.5.0/go.mod h1:YgE7I5eLlMJuowyGlyPSIV1ISG8+5CJFhi3RuRESqe4= sigs.k8s.io/controller-runtime v0.16.6 h1:FiXwTuFF5ZJKmozfP2Z0j7dh6kmxP4Ou1KLfxgKKC3I= sigs.k8s.io/controller-runtime v0.16.6/go.mod h1:+dQzkZxnylD0u49e0a+7AR+vlibEBaThmPca7lTyUsI= -sigs.k8s.io/gateway-api v0.7.0 h1:/mG8yyJNBifqvuVLW5gwlI4CQs0NR/5q4BKUlf1bVdY= -sigs.k8s.io/gateway-api v0.7.0/go.mod h1:Xv0+ZMxX0lu1nSSDIIPEfbVztgNZ+3cfiYrJsa2Ooso= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kustomize/api v0.17.1 h1:MYJBOP/yQ3/5tp4/sf6HiiMfNNyO97LmtnirH9SLNr4= diff --git a/pkg/bootstrap/aws/auth.go b/pkg/bootstrap/aws/auth.go deleted file mode 100644 index 95470635..00000000 --- a/pkg/bootstrap/aws/auth.go +++ /dev/null @@ -1,137 +0,0 @@ -package aws - -import ( - "context" - "fmt" - "strings" - - "github.com/pluralsh/plural-cli/pkg/kubernetes" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - ekscontrolplanev1 "sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/eks/api/v1beta2" - "sigs.k8s.io/yaml" -) - -const ( - awsAuthNs = "kube-system" - awsAuthName = "aws-auth" - roleKey = "mapRoles" - usersKey = "mapUsers" -) - -func FetchAuth() (*ekscontrolplanev1.IAMAuthenticatorConfig, error) { - ctx := context.Background() - kube, err := kubernetes.Kubernetes() - if err != nil { - return nil, err - } - - return fetchAwsAuth(ctx, kube) -} - -func AddUser(userArn string) error { - ctx := context.Background() - kube, err := kubernetes.Kubernetes() - if err != nil { - return err - } - - eksConfig, err := fetchAwsAuth(ctx, kube) - if err != nil { - return err - } - - eksConfig.UserMappings = append(eksConfig.UserMappings, ekscontrolplanev1.UserMapping{ - KubernetesMapping: ekscontrolplanev1.KubernetesMapping{ - Groups: []string{"system:masters"}, - UserName: username(userArn), - }, - UserARN: userArn, - }) - - return persistAuth(ctx, kube, eksConfig) -} - -func AddRole(roleArn string) error { - ctx := context.Background() - kube, err := kubernetes.Kubernetes() - if err != nil { - return err - } - - eksConfig, err := fetchAwsAuth(ctx, kube) - if err != nil { - return err - } - - eksConfig.RoleMappings = append(eksConfig.RoleMappings, ekscontrolplanev1.RoleMapping{ - KubernetesMapping: ekscontrolplanev1.KubernetesMapping{ - Groups: []string{"system:masters"}, - UserName: username(roleArn), - }, - RoleARN: roleArn, - }) - - return persistAuth(ctx, kube, eksConfig) -} - -func username(arn string) string { - parts := strings.Split(arn, "/") - return parts[len(parts)-1] -} - -func fetchAwsAuth(ctx context.Context, kube kubernetes.Kube) (*ekscontrolplanev1.IAMAuthenticatorConfig, error) { - client := kube.GetClient() - cm, err := client.CoreV1().ConfigMaps(awsAuthNs).Get(ctx, awsAuthName, metav1.GetOptions{}) - if err != nil { - return nil, err - } - - res := &ekscontrolplanev1.IAMAuthenticatorConfig{ - RoleMappings: []ekscontrolplanev1.RoleMapping{}, - UserMappings: []ekscontrolplanev1.UserMapping{}, - } - - if rolesSection, ok := cm.Data[roleKey]; ok { - err := yaml.Unmarshal([]byte(rolesSection), &res.RoleMappings) - if err != nil { - return nil, fmt.Errorf("unmarshalling mapped roles: %w", err) - } - } - - if usersSection, ok := cm.Data[usersKey]; ok { - err := yaml.Unmarshal([]byte(usersSection), &res.UserMappings) - if err != nil { - return nil, fmt.Errorf("unmarshalling mapped users: %w", err) - } - } - - return res, nil -} - -func persistAuth(ctx context.Context, kube kubernetes.Kube, authConfig *ekscontrolplanev1.IAMAuthenticatorConfig) error { - client := kube.GetClient() - cmClient := client.CoreV1().ConfigMaps(awsAuthNs) - cm, err := cmClient.Get(ctx, awsAuthName, metav1.GetOptions{}) - if err != nil { - return err - } - - if len(authConfig.RoleMappings) > 0 { - roleMappings, err := yaml.Marshal(authConfig.RoleMappings) - if err != nil { - return fmt.Errorf("marshalling auth config roles: %w", err) - } - cm.Data[roleKey] = string(roleMappings) - } - - if len(authConfig.UserMappings) > 0 { - userMappings, err := yaml.Marshal(authConfig.UserMappings) - if err != nil { - return fmt.Errorf("marshalling auth config users: %w", err) - } - cm.Data[usersKey] = string(userMappings) - } - - _, err = cmClient.Update(ctx, cm, metav1.UpdateOptions{}) - return err -} diff --git a/pkg/bootstrap/azure/auth.go b/pkg/bootstrap/azure/auth.go deleted file mode 100644 index 3ec7f21c..00000000 --- a/pkg/bootstrap/azure/auth.go +++ /dev/null @@ -1,112 +0,0 @@ -package azure - -import ( - "context" - "fmt" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - azwi "github.com/Azure/azure-workload-identity/pkg/cloud" - "github.com/Azure/go-autorest/autorest/azure" - msgraph "github.com/microsoftgraph/msgraph-sdk-go" - "github.com/microsoftgraph/msgraph-sdk-go/models" - "github.com/microsoftgraph/msgraph-sdk-go/serviceprincipals" - "github.com/pluralsh/plural-cli/pkg/utils" -) - -type AuthService struct { - subscriptionID string - - azwiClient *azwi.AzureClient - msgraphClient *msgraph.GraphServiceClient - context context.Context - - app models.Applicationable - sp models.ServicePrincipalable -} - -func GetAuthService(subscriptionID string) (*AuthService, error) { - credential, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - return nil, err - } - - azwiClient, err := azwi.NewAzureClientWithCLI(azure.PublicCloud, subscriptionID, nil) - if err != nil { - return nil, err - } - - msgraphClient, err := msgraph.NewGraphServiceClientWithCredentials(credential, nil) - if err != nil { - return nil, err - } - - return &AuthService{ - subscriptionID: subscriptionID, - msgraphClient: msgraphClient, - azwiClient: azwiClient, - context: context.Background(), - }, nil -} - -func (as *AuthService) addServicePrincipalPassword(servicePrincipalId string) (models.PasswordCredentialable, error) { - pwd := serviceprincipals.NewItemAddPasswordPostRequestBody() - pwd.SetPasswordCredential(models.NewPasswordCredential()) - - return as.msgraphClient.ServicePrincipalsById(servicePrincipalId).AddPassword(). - Post(as.context, pwd, nil) -} - -func (as *AuthService) Setup(name string) (clientId string, clientSecret string, err error) { - app, err := as.azwiClient.CreateApplication(as.context, name) - if err != nil { - return - } - as.app = app - utils.Success("Created %s application\n", *app.GetDisplayName()) - - sp, err := as.azwiClient.CreateServicePrincipal(as.context, *app.GetAppId(), nil) - if err != nil { - return - } - as.sp = sp - utils.Success("Created %s service principal\n", *sp.GetDisplayName()) - - role := "Contributor" - scope := fmt.Sprintf("/subscriptions/%s/", as.subscriptionID) - _, err = as.azwiClient.CreateRoleAssignment(as.context, scope, role, *sp.GetId()) - if err != nil { - return - } - utils.Success("Assigned %s role to %s service principal\n", role, *sp.GetDisplayName()) - - pwd, err := as.addServicePrincipalPassword(*sp.GetId()) - if err != nil { - return - } - utils.Success("Added password for %s service principal\n", *sp.GetDisplayName()) - - clientId = *sp.GetAppId() - clientSecret = *pwd.GetSecretText() - - return -} - -func (as *AuthService) Cleanup() error { - if as.sp != nil { - err := as.azwiClient.DeleteServicePrincipal(as.context, *as.sp.GetId()) - if err != nil { - return err - } - utils.Success("Deleted %s service principal\n", *as.sp.GetDisplayName()) - } - - if as.app != nil { - err := as.azwiClient.DeleteApplication(as.context, *as.app.GetId()) - if err != nil { - return err - } - utils.Success("Deleted %s application\n", *as.app.GetDisplayName()) - } - - return nil -} diff --git a/pkg/bootstrap/bootstrap.go b/pkg/bootstrap/bootstrap.go deleted file mode 100644 index 944c922f..00000000 --- a/pkg/bootstrap/bootstrap.go +++ /dev/null @@ -1,231 +0,0 @@ -package bootstrap - -import ( - "os/exec" - "path/filepath" - - capi "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/cmd/clusterctl/client" - - "github.com/pluralsh/plural-cli/pkg/api" - "github.com/pluralsh/plural-cli/pkg/manifest" - "github.com/pluralsh/plural-cli/pkg/provider" - "github.com/pluralsh/plural-cli/pkg/utils" - "github.com/pluralsh/plural-cli/pkg/utils/backup" -) - -func shouldDeleteProviderCluster(cluster, namespace string) bool { - clusterExists := bootstrapClusterExists() - deleting, err := IsClusterPhase(localClusterContext, cluster, namespace, capi.ClusterPhaseDeleting) - - if err != nil { - return false - } - - return clusterExists && !deleting -} - -func shouldDeleteBootstrapCluster(cluster, namespace string) bool { - clusterExists := bootstrapClusterExists() - deleting, err := IsClusterPhase(localClusterContext, cluster, namespace, capi.ClusterPhaseDeleting) - - if err != nil { - return false - } - - return clusterExists && deleting -} - -// getBootstrapSteps returns list of steps to run during cluster bootstrap. -func getBootstrapSteps(runPlural ActionFunc, additionalFlags []string) ([]*Step, error) { - man, err := manifest.FetchProject() - if err != nil { - return nil, err - } - - kubeconfigPath, err := getKubeconfigPath() - if err != nil { - return nil, err - } - - bootstrapPath, err := GetBootstrapPath() - if err != nil { - return nil, err - } - - flags := append(getBootstrapFlags(man.Provider), additionalFlags...) - - prov, err := provider.GetProvider() - if err != nil { - return nil, err - } - - clusterBackup := backup.NewCAPIBackup(man.Cluster) - - return []*Step{ - { - Name: "Destroy cluster API", - Args: []string{"plural", "bootstrap", "cluster", "destroy-cluster-api", man.Cluster}, - Execute: runPlural, - Confirm: "It looks like your existing bootstrap cluster has a provider cluster configuration. All resources at your provider should be removed before continuing. Would you like to try and remove it automatically?", - Skip: !shouldDeleteProviderCluster(man.Cluster, "bootstrap"), - }, - { - Name: "Destroy local bootstrap cluster", - Args: []string{"plural", "--bootstrap", "bootstrap", "cluster", "delete", "bootstrap"}, - Execute: runPlural, - Confirm: "It looks like your existing bootstrap cluster has a provider cluster configuration in a non-recoverable state. Please make sure to manually delete all existing cluster resources at your provider before continuing. Would you like to destroy the bootstrap cluster?", - Skip: !shouldDeleteBootstrapCluster(man.Cluster, "bootstrap"), - }, - { - Name: "Create local bootstrap cluster", - Args: []string{"plural", "bootstrap", "cluster", "create", "bootstrap", "--skip-if-exists"}, - Execute: runPlural, - }, - { - Name: "Bootstrap CRDs in local cluster", - Args: []string{"plural", "--bootstrap", "wkspace", "crds", "bootstrap"}, - Execute: runPlural, - }, - { - Name: "Install Cluster API operators in local cluster", - Args: append([]string{"plural", "--bootstrap", "wkspace", "helm", "bootstrap", "--skip", "cluster-api-cluster"}, append(flags, disableAzurePodIdentityFlag...)...), - Execute: runPlural, - }, - { - Name: "Deploy cluster", - Args: append([]string{"plural", "--bootstrap", "wkspace", "helm", "bootstrap"}, flags...), - Execute: runPlural, - Skip: clusterBackup.Exists(), - }, - { - Name: "Restore cluster", - Execute: func(_ []string) error { - options := client.MoveOptions{ - ToKubeconfig: client.Kubeconfig{ - Path: kubeconfigPath, - Context: "kind-bootstrap", - }, - } - - return clusterBackup.Restore(options) - }, - Skip: !clusterBackup.Exists(), - }, - { - Name: "Wait for cluster", - Args: []string{"plural", "--bootstrap", "clusters", "wait", "bootstrap", man.Cluster}, - Execute: runPlural, - }, - { - Name: "Install Network", - Execute: func(_ []string) error { - return installCilium(man.Cluster) - }, - Skip: man.Provider != api.ProviderKind, - }, - { - Name: "Install StorageClass", - Execute: func(_ []string) error { - return applyManifest(storageClassManifest) - }, - Skip: man.Provider != api.ProviderKind, - }, - { - Name: "Save kubeconfig", - Execute: func(_ []string) error { - cmd := exec.Command("kind", "export", "kubeconfig", "--name", man.Cluster, - "--kubeconfig", filepath.Join(bootstrapPath, "terraform", "kube_config_cluster.yaml")) - return utils.Execute(cmd) - }, - Skip: man.Provider != api.ProviderKind, - }, - { - Name: "Wait for machine pools", - Args: []string{"plural", "--bootstrap", "clusters", "mpwait", "bootstrap", man.Cluster}, - Execute: runPlural, - OnAfter: func() { - options := client.MoveOptions{ - FromKubeconfig: client.Kubeconfig{ - Path: kubeconfigPath, - Context: "kind-bootstrap", - }, - } - - err := clusterBackup.Save(options) - if err != nil { - _ = clusterBackup.Remove() - utils.Error("error during saving state backup: %s", err) - } - }, - }, - { - Name: "Initialize kubeconfig for target cluster", - Args: []string{"plural", "wkspace", "kube-init"}, - Execute: runPlural, - }, - { - Name: "Create bootstrap namespace in target cluster", - Args: []string{"plural", "bootstrap", "namespace", "create", "bootstrap"}, - Execute: runPlural, - }, - { - Name: "Bootstrap CRDs in target cluster", - Args: []string{"plural", "wkspace", "crds", "bootstrap"}, - Execute: runPlural, - }, - { - Name: "Install Cluster API operators in target cluster", - Args: append([]string{"plural", "wkspace", "helm", "bootstrap", "--skip", "cluster-api-cluster"}, append(flags, disableAzurePodIdentityFlag...)...), - Execute: runPlural, - }, - { - Name: "Move resources from local to target cluster", - Args: []string{"plural", "bootstrap", "cluster", "move", "--kubeconfig-context", localClusterContext, "--to-kubeconfig", kubeconfigPath}, - Execute: runPlural, - Retries: 2, - }, - { - Name: "Move Helm secrets", - Execute: func(_ []string) error { - return moveHelmSecrets(localClusterContext, prov.KubeContext()) - }, - Retries: 2, - }, - { - Name: "Destroy local bootstrap cluster", - Args: []string{"plural", "--bootstrap", "bootstrap", "cluster", "delete", "bootstrap"}, - Execute: runPlural, - OnAfter: func() { - err := clusterBackup.Remove() - if err != nil { - utils.Error("error during removing state backup: %s", err) - } - }, - }, - }, nil -} - -// BootstrapCluster bootstraps cluster with Cluster API. -func BootstrapCluster(runPlural ActionFunc) error { - utils.Highlight("Bootstrapping cluster with Cluster API...\n") - - if err := RunWithTempCredentials(func(flags []string) error { - steps, err := getBootstrapSteps(runPlural, flags) - if err != nil { - return err - } - - err = ExecuteSteps(steps) - if err != nil { - utils.Error("Cluster bootstrapping failed\n") - return err - } - return nil - }); err != nil { - return err - } - - utils.Success("Cluster bootstrapped successfully!\n") - return nil -} diff --git a/pkg/bootstrap/check.go b/pkg/bootstrap/check.go deleted file mode 100644 index bd6d7fe7..00000000 --- a/pkg/bootstrap/check.go +++ /dev/null @@ -1,91 +0,0 @@ -package bootstrap - -import ( - "context" - "fmt" - "time" - - "github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/util" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/rest" - capi "sigs.k8s.io/cluster-api/api/v1beta1" - - "github.com/pluralsh/plural-cli/pkg/cluster" - "github.com/pluralsh/plural-cli/pkg/config" - "github.com/pluralsh/plural-cli/pkg/kubernetes" - "github.com/pluralsh/plural-cli/pkg/provider" - "github.com/pluralsh/plural-cli/pkg/utils" -) - -const ( - ClusterNotReadyError = "cluster exists but it is not ready yet" -) - -// getCluster returns Cluster resource. -func getCluster(kubeContext, name, namespace string) (*capi.Cluster, error) { - prov, err := provider.GetProvider() - if err != nil { - return nil, err - } - - err = prov.KubeConfig() - if err != nil { - return nil, err - } - - var kubeConf *rest.Config - if len(kubeContext) > 0 { - kubeConf, err = kubernetes.KubeConfigWithContext(kubeContext) - } else { - kubeConf, err = kubernetes.KubeConfig() - } - - if err != nil { - return nil, err - } - - conf := config.Read() - ctx := context.Background() - clusters, err := cluster.NewForConfig(kubeConf) - if err != nil { - return nil, err - } - - client := clusters.Clusters(conf.Namespace(namespace)) - return client.Get(ctx, name, metav1.GetOptions{}) -} - -func IsClusterPhase(context, name, namespace string, phase capi.ClusterPhase) (bool, error) { - c, err := getCluster(context, name, namespace) - if err != nil { - return false, err - } - - return c.Status.GetTypedPhase() == phase, nil -} - -// CheckClusterReadiness checks if Cluster API cluster is in ready state. -func CheckClusterReadiness(name, namespace string) (bool, error) { - utils.Highlight("Checking cluster status") - - err := util.WaitFor(10*time.Second, time.Second, func() (bool, error) { - utils.Highlight(".") - - c, err := getCluster("", name, namespace) - if err != nil { - return false, err - } - - for _, cond := range c.Status.Conditions { - if cond.Type == capi.ReadyCondition && cond.Status == "True" { - return true, nil - } - } - - return true, fmt.Errorf(ClusterNotReadyError) - }) - - utils.Highlight("\n") - - return err == nil, err -} diff --git a/pkg/bootstrap/cilium.go b/pkg/bootstrap/cilium.go deleted file mode 100644 index df81eb7e..00000000 --- a/pkg/bootstrap/cilium.go +++ /dev/null @@ -1,66 +0,0 @@ -package bootstrap - -import ( - "os/exec" - "time" - - "github.com/pkg/errors" - "github.com/pluralsh/plural-cli/pkg/helm" - "github.com/pluralsh/plural-cli/pkg/utils" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/chart/loader" - "helm.sh/helm/v3/pkg/cli" - "helm.sh/helm/v3/pkg/storage/driver" -) - -var settings = cli.New() - -const ( - ciliumRepoName = "cilium" - ciliumRepoUrl = "https://helm.cilium.io/" -) - -func installCilium(cluster string) error { - namespace := "kube-system" - cmd := exec.Command("kind", "export", "kubeconfig", "--name", cluster) - if err := utils.Execute(cmd); err != nil { - return err - } - - if err := helm.AddRepo(ciliumRepoName, ciliumRepoUrl); err != nil { - return err - } - - helmConfig, err := helm.GetActionConfig(namespace) - if err != nil { - return nil - } - - cp, err := action.NewInstall(helmConfig).ChartPathOptions.LocateChart("cilium/cilium", settings) - if err != nil { - return err - } - - chart, err := loader.Load(cp) - if err != nil { - return err - } - - histClient := action.NewHistory(helmConfig) - histClient.Max = 5 - if _, err := histClient.Run(ciliumRepoName); errors.Is(err, driver.ErrReleaseNotFound) { - instClient := action.NewInstall(helmConfig) - instClient.Namespace = namespace - instClient.ReleaseName = ciliumRepoName - instClient.Timeout = time.Minute * 10 - - _, err = instClient.Run(chart, map[string]interface{}{}) - return err - } - client := action.NewUpgrade(helmConfig) - client.Namespace = namespace - client.Timeout = time.Minute * 10 - _, err = client.Run(ciliumRepoName, chart, map[string]interface{}{}) - - return err -} diff --git a/pkg/bootstrap/common.go b/pkg/bootstrap/common.go deleted file mode 100644 index a1b64187..00000000 --- a/pkg/bootstrap/common.go +++ /dev/null @@ -1,315 +0,0 @@ -package bootstrap - -import ( - "context" - "fmt" - "os" - "path/filepath" - - "github.com/AlecAivazis/survey/v2" - awsConfig "github.com/aws/aws-sdk-go-v2/config" - "golang.org/x/oauth2/google" - v1 "k8s.io/api/core/v1" - meta "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/pluralsh/plural-cli/pkg/api" - "github.com/pluralsh/plural-cli/pkg/bootstrap/azure" - "github.com/pluralsh/plural-cli/pkg/kubernetes" - "github.com/pluralsh/plural-cli/pkg/manifest" - "github.com/pluralsh/plural-cli/pkg/utils" - "github.com/pluralsh/plural-cli/pkg/utils/git" - "github.com/pluralsh/plural-cli/pkg/utils/pathing" -) - -const localClusterContext = "kind-bootstrap" - -var disableAzurePodIdentityFlag = []string{"--set", "bootstrap.azurePodIdentity.enabled=false"} - -func bootstrapClusterExists() bool { - return utils.IsKindClusterAlreadyExists("bootstrap") -} - -func applyManifest(manifest string) error { - kube, err := kubernetes.Kubernetes() - if err != nil { - return err - } - - f, err := os.CreateTemp("", "manifest") - if err != nil { - return err - } - defer func(name string) { - err := os.Remove(name) - if err != nil { - utils.Error("%s", err) - } - }(f.Name()) - - _, err = f.WriteString(manifest) - if err != nil { - return err - } - - return kube.Apply(f.Name(), true) -} - -// deleteSecrets deletes secrets matching label selector from given namespace in given context. -func deleteSecrets(context, namespace, labelSelector string) error { - kubernetesClient, err := kubernetes.KubernetesWithContext(context) - if err != nil { - return err - } - - return kubernetesClient.SecretDeleteCollection(namespace, meta.DeleteOptions{}, meta.ListOptions{LabelSelector: labelSelector}) -} - -// getSecrets returns secrets matching label selector from given namespace in given context. -func getSecrets(context, namespace, labelSelector string) (*v1.SecretList, error) { - kubernetesClient, err := kubernetes.KubernetesWithContext(context) - if err != nil { - return nil, err - } - - return kubernetesClient.SecretList(namespace, meta.ListOptions{LabelSelector: labelSelector}) -} - -// createSecrets creates secrets in given context. -func createSecrets(context string, secrets []v1.Secret) error { - kubernetesClient, err := kubernetes.KubernetesWithContext(context) - if err != nil { - return err - } - - for _, secret := range secrets { - _, err := kubernetesClient.SecretCreate(secret.Namespace, prepareSecret(secret)) - if err != nil { - return err - } - } - - return nil -} - -// prepareSecret unsets read-only secret fields to prepare it for creation. -func prepareSecret(secret v1.Secret) *v1.Secret { - secret.UID = "" - secret.ResourceVersion = "" - secret.Generation = 0 - secret.CreationTimestamp = meta.Time{} - return &secret -} - -// moveHelmSecrets moves secrets owned by Helm from one cluster to another. -func moveHelmSecrets(sourceContext, targetContext string) error { - err := deleteSecrets(targetContext, "bootstrap", "owner=helm") - if err != nil { - return err - } - - secrets, err := getSecrets(sourceContext, "bootstrap", "owner=helm") - if err != nil { - return err - } - - return createSecrets(targetContext, secrets.Items) -} - -// getBootstrapFlags returns list of provider-specific flags used during cluster bootstrap and destroy. -func getBootstrapFlags(prov string) []string { - switch prov { - case api.ProviderAWS: - return []string{ - "--set", "cluster-api-provider-aws.cluster-api-provider-aws.bootstrapMode=true", - "--set", "bootstrap.aws-ebs-csi-driver.enabled=false", - "--set", "bootstrap.aws-load-balancer-controller.enabled=false", - "--set", "bootstrap.cluster-autoscaler.enabled=false", - "--set", "bootstrap.metrics-server.enabled=false", - "--set", "bootstrap.snapshot-controller.enabled=false", - "--set", "bootstrap.snapshot-validation-webhook.enabled=false", - "--set", "bootstrap.tigera-operator.enabled=false", - "--set", "bootstrap.external-dns.enabled=false", - "--set", "plural-certmanager-webhook.enabled=false", - } - case api.ProviderAzure: - return []string{ - "--set", "cluster-api-cluster.cluster.azure.clusterIdentity.bootstrapMode=true", - "--set", "cluster-api-provider-azure.cluster-api-provider-azure.bootstrapMode=true", - "--set", "bootstrap.external-dns.enabled=false", - "--set", "plural-certmanager-webhook.enabled=false", - } - case api.ProviderGCP: - return []string{ - "--set", "cluster-api-provider-gcp.cluster-api-provider-gcp.bootstrapMode=true", - "--set", "bootstrap.external-dns.enabled=false", - "--set", "plural-certmanager-webhook.enabled=false", - } - default: - return []string{} - } -} - -// getKubeconfigPath returns path to kubeconfig in user home directory. -func getKubeconfigPath() (string, error) { - homeDir, err := os.UserHomeDir() - if err != nil { - return "", err - } - - return pathing.SanitizeFilepath(filepath.Join(homeDir, ".kube", "config")), nil -} - -// GetBootstrapPath returns bootstrap repository path. -func GetBootstrapPath() (string, error) { - gitRootPath, err := git.Root() - if err != nil { - return "", err - } - - return pathing.SanitizeFilepath(filepath.Join(gitRootPath, "bootstrap")), nil -} - -// GetStepPath returns path from which step will be executed. -func GetStepPath(step *Step, defaultPath string) string { - if step != nil && step.TargetPath != "" { - return step.TargetPath - } - - return defaultPath -} - -func FilterSteps(steps []*Step) []*Step { - filteredSteps := make([]*Step, 0, len(steps)) - for _, step := range steps { - if !step.Skip { - filteredSteps = append(filteredSteps, step) - } - } - - return filteredSteps -} - -// ExecuteSteps of a bootstrap, migration or destroy process. -func ExecuteSteps(steps []*Step) error { - defaultPath, err := GetBootstrapPath() - if err != nil { - return err - } - - filteredSteps := FilterSteps(steps) - for i, step := range filteredSteps { - if len(step.Confirm) > 0 { - res := true - prompt := &survey.Confirm{Message: step.Confirm} - if err := survey.AskOne(prompt, &res, survey.WithValidator(survey.Required)); err != nil || !res { - continue - } - } - - utils.Highlight("[%d/%d] %s\n", i+1, len(filteredSteps), step.Name) - - if step.SkipFunc != nil && step.SkipFunc() { - utils.Highlight("Skipping step [%d/%d]\n", i+1, len(filteredSteps)) - continue - } - - path := GetStepPath(step, defaultPath) - err := os.Chdir(path) - if err != nil { - return err - } - - for j := 0; j <= step.Retries; j++ { - if j > 0 { - utils.Highlight("Retrying, attempt %d of %d...\n", j, step.Retries) - } - err = step.Execute(step.Args) - if err == nil { - if step.OnAfter != nil { - step.OnAfter() - } - - break - } - utils.Error("[%d/%d] %s failed: %s\n", i+1, len(filteredSteps), step.Name, err) - } - if err != nil { - if step.OnError != nil { - step.OnError() - } - - return err - } - } - - return nil -} - -// RunWithTempCredentials is a function wrapper that provides provider-specific flags with credentials -// that are used during bootstrap and destroy. -func RunWithTempCredentials(function ActionFunc) error { - man, err := manifest.FetchProject() - if err != nil { - return err - } - - var flags []string - switch man.Provider { - case api.ProviderAzure: - as, err := azure.GetAuthService(utils.ToString(man.Context["SubscriptionId"])) - if err != nil { - return err - } - - clientId, clientSecret, err := as.Setup(man.Cluster) - if err != nil { - return err - } - - pathPrefix := "cluster-api-cluster.cluster.azure.clusterIdentity.bootstrapCredentials" - asoPathPrefix := "cluster-api-provider-azure.cluster-api-provider-azure.asoControllerSettings" - flags = []string{ - "--set", fmt.Sprintf("%s.%s=%s", pathPrefix, "clientID", clientId), - "--set", fmt.Sprintf("%s.%s=%s", pathPrefix, "clientSecret", clientSecret), - "--set", fmt.Sprintf("%s.%s=%s", asoPathPrefix, "azureClientId", clientId), - "--set", fmt.Sprintf("%s.%s=%s", asoPathPrefix, "azureClientSecret", clientSecret), - } - - defer func(as *azure.AuthService) { - err := as.Cleanup() - if err != nil { - utils.Error("%s", err) - } - }(as) - case api.ProviderAWS: - ctx := context.Background() - cfg, err := awsConfig.LoadDefaultConfig(ctx) - if err != nil { - return err - } - - cred, err := cfg.Credentials.Retrieve(ctx) - if err != nil { - return err - } - - pathPrefix := "cluster-api-provider-aws.cluster-api-provider-aws.managerBootstrapCredentials" - flags = []string{ - "--set", fmt.Sprintf("%s.%s=%s", pathPrefix, "AWS_ACCESS_KEY_ID", cred.AccessKeyID), - "--set", fmt.Sprintf("%s.%s=%s", pathPrefix, "AWS_SECRET_ACCESS_KEY", cred.SecretAccessKey), - "--set", fmt.Sprintf("%s.%s=%s", pathPrefix, "AWS_SESSION_TOKEN", cred.SessionToken), - "--set", fmt.Sprintf("%s.%s=%s", pathPrefix, "AWS_REGION", man.Region), - } - case api.ProviderGCP: - credentials, err := google.FindDefaultCredentials(context.Background()) - if err != nil { - return err - } - - flags = []string{ - "--setJSON", fmt.Sprintf(`cluster-api-provider-gcp.cluster-api-provider-gcp.managerBootstrapCredentials.credentialsJson=%s`, string(credentials.JSON)), - } - } - - return function(flags) -} diff --git a/pkg/bootstrap/common_test.go b/pkg/bootstrap/common_test.go deleted file mode 100644 index 0bb5a0ea..00000000 --- a/pkg/bootstrap/common_test.go +++ /dev/null @@ -1,119 +0,0 @@ -package bootstrap_test - -import ( - "testing" - - "github.com/pluralsh/plural-cli/pkg/bootstrap" - "github.com/stretchr/testify/assert" - "golang.org/x/exp/slices" -) - -func doNothing(_ []string) error { - return nil -} - -func TestGetStepPath(t *testing.T) { - tests := []struct { - name string - step *bootstrap.Step - defaultPath string - expectedPath string - }{ - { - name: `step path should be used if it was set`, - step: &bootstrap.Step{ - Name: "Test", - Args: []string{}, - TargetPath: "/test/path", - Execute: doNothing, - }, - defaultPath: "/default/path", - expectedPath: "/test/path", - }, - { - name: `step path should be defaulted if not set`, - step: &bootstrap.Step{ - Name: "Test", - Args: []string{}, - Execute: doNothing, - }, - defaultPath: "/default/path", - expectedPath: "/default/path", - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - path := bootstrap.GetStepPath(test.step, test.defaultPath) - assert.Equal(t, path, test.expectedPath) - }) - } -} - -func TestFilterSteps(t *testing.T) { - tests := []struct { - name string - steps []*bootstrap.Step - expectedSteps []*bootstrap.Step - }{ - { - name: `steps without skip flag should not be filtered`, - steps: []*bootstrap.Step{ - { - Name: "Test", - Execute: doNothing, - }, - }, - expectedSteps: []*bootstrap.Step{ - { - Name: "Test", - Execute: doNothing, - }, - }, - }, - { - name: `steps with skip flag should be filtered`, - steps: []*bootstrap.Step{ - { - Name: "Test", - Execute: doNothing, - }, - { - Name: "Test AWS", - Execute: doNothing, - Skip: true, - }, - { - Name: "Test Azure", - Execute: doNothing, - Skip: false, - }, - { - Name: "Test GCP", - Execute: doNothing, - Skip: true, - }, - }, - expectedSteps: []*bootstrap.Step{ - { - Name: "Test", - Execute: doNothing, - }, - { - Name: "Test Azure", - Execute: doNothing, - Skip: false, - }, - }, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - filteredSteps := bootstrap.FilterSteps(test.steps) - assert.Equal(t, len(filteredSteps), len(test.expectedSteps)) - assert.True(t, slices.EqualFunc(filteredSteps, test.expectedSteps, - func(a *bootstrap.Step, b *bootstrap.Step) bool { - return a.Name == b.Name && a.Skip == b.Skip - })) - }) - } -} diff --git a/pkg/bootstrap/destroy.go b/pkg/bootstrap/destroy.go deleted file mode 100644 index 1f734fbf..00000000 --- a/pkg/bootstrap/destroy.go +++ /dev/null @@ -1,117 +0,0 @@ -package bootstrap - -import ( - "github.com/pluralsh/plural-cli/pkg/manifest" - "github.com/pluralsh/plural-cli/pkg/provider" - "github.com/pluralsh/plural-cli/pkg/utils" -) - -// getDestroySteps returns list of steps to run during cluster destroy. -func getDestroySteps(destroy func() error, runPlural ActionFunc, additionalFlags []string) ([]*Step, error) { - man, err := manifest.FetchProject() - if err != nil { - return nil, err - } - - kubeconfigPath, err := getKubeconfigPath() - if err != nil { - return nil, err - } - - flags := append(getBootstrapFlags(man.Provider), additionalFlags...) - - prov, err := provider.GetProvider() - if err != nil { - return nil, err - } - - return []*Step{ - { - Name: "Create local bootstrap cluster", - Args: []string{"plural", "bootstrap", "cluster", "create", "bootstrap", "--skip-if-exists"}, - Execute: runPlural, - }, - { - Name: "Bootstrap CRDs in local cluster", - Args: []string{"plural", "--bootstrap", "wkspace", "crds", "bootstrap"}, - Execute: runPlural, - }, - { - Name: "Install Cluster API operators in local cluster", - Args: append([]string{"plural", "--bootstrap", "wkspace", "helm", "bootstrap", "--skip", "cluster-api-cluster"}, append(flags, disableAzurePodIdentityFlag...)...), - Execute: runPlural, - }, - { - Name: "Move resources from target to local cluster", - Args: []string{"plural", "bootstrap", "cluster", "move", "--kubeconfig-context", prov.KubeContext(), "--to-kubeconfig", kubeconfigPath, "--to-kubeconfig-context", localClusterContext}, - Execute: runPlural, - SkipFunc: func() bool { - _, err := CheckClusterReadiness(man.Cluster, "bootstrap") - return err != nil - }, - Retries: 2, - }, - { - Name: "Move Helm secrets", - Execute: func(_ []string) error { - return moveHelmSecrets(prov.KubeContext(), localClusterContext) - }, - Retries: 2, - }, - { - Name: "Reinstall Helm charts to update configuration", - Args: append([]string{"plural", "--bootstrap", "wkspace", "helm", "bootstrap"}, flags...), - Execute: runPlural, - }, - { - Name: "Destroy bootstrap on target cluster", - Execute: func(_ []string) error { - return destroy() - }, - }, - { - Name: "Wait for cluster", - Args: []string{"plural", "--bootstrap", "clusters", "wait", "bootstrap", man.Cluster}, - Execute: runPlural, - }, - { - Name: "Wait for machine pools", - Args: []string{"plural", "--bootstrap", "clusters", "mpwait", "bootstrap", man.Cluster}, - Execute: runPlural, - }, - { - Name: "Destroy cluster API", - Args: []string{"plural", "bootstrap", "cluster", "destroy-cluster-api", man.Cluster}, - Execute: runPlural, - }, - { - Name: "Destroy local bootstrap cluster", - Args: []string{"plural", "--bootstrap", "bootstrap", "cluster", "delete", "bootstrap"}, - Execute: runPlural, - }, - }, nil -} - -// DestroyCluster destroys cluster managed by Cluster API. -func DestroyCluster(destroy func() error, runPlural ActionFunc) error { - utils.Highlight("Destroying Cluster API cluster...\n") - - if err := RunWithTempCredentials(func(flags []string) error { - steps, err := getDestroySteps(destroy, runPlural, flags) - if err != nil { - return err - } - - err = ExecuteSteps(steps) - if err != nil { - return err - } - - return nil - }); err != nil { - return err - } - - utils.Success("Cluster destroyed successfully!\n") - return nil -} diff --git a/pkg/bootstrap/manifests.go b/pkg/bootstrap/manifests.go deleted file mode 100644 index 7095f490..00000000 --- a/pkg/bootstrap/manifests.go +++ /dev/null @@ -1,132 +0,0 @@ -package bootstrap - -const storageClassManifest = ` -apiVersion: v1 -kind: Namespace -metadata: - name: local-path-storage - ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: local-path-provisioner-service-account - namespace: local-path-storage - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: local-path-provisioner-role -rules: - - apiGroups: [ "" ] - resources: [ "nodes", "persistentvolumeclaims", "configmaps" ] - verbs: [ "get", "list", "watch" ] - - apiGroups: [ "" ] - resources: [ "endpoints", "persistentvolumes", "pods" ] - verbs: [ "*" ] - - apiGroups: [ "" ] - resources: [ "events" ] - verbs: [ "create", "patch" ] - - apiGroups: [ "storage.k8s.io" ] - resources: [ "storageclasses" ] - verbs: [ "get", "list", "watch" ] - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: local-path-provisioner-bind -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: local-path-provisioner-role -subjects: - - kind: ServiceAccount - name: local-path-provisioner-service-account - namespace: local-path-storage - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: local-path-provisioner - namespace: local-path-storage -spec: - replicas: 1 - selector: - matchLabels: - app: local-path-provisioner - template: - metadata: - labels: - app: local-path-provisioner - spec: - serviceAccountName: local-path-provisioner-service-account - containers: - - name: local-path-provisioner - image: rancher/local-path-provisioner:v0.0.24 - imagePullPolicy: IfNotPresent - command: - - local-path-provisioner - - --debug - - start - - --config - - /etc/config/config.json - volumeMounts: - - name: config-volume - mountPath: /etc/config/ - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumes: - - name: config-volume - configMap: - name: local-path-config ---- -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - annotations: - storageclass.kubernetes.io/is-default-class: "true" - name: standard -provisioner: rancher.io/local-path -reclaimPolicy: Delete -volumeBindingMode: WaitForFirstConsumer ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: local-path-config - namespace: local-path-storage -data: - config.json: |- - { - "nodePathMap":[ - { - "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", - "paths":["/opt/local-path-provisioner"] - } - ] - } - setup: |- - #!/bin/sh - set -eu - mkdir -m 0777 -p "$VOL_DIR" - teardown: |- - #!/bin/sh - set -eu - rm -rf "$VOL_DIR" - helperPod.yaml: |- - apiVersion: v1 - kind: Pod - metadata: - name: helper-pod - spec: - containers: - - name: helper-pod - image: busybox - imagePullPolicy: IfNotPresent -` diff --git a/pkg/bootstrap/migrate.go b/pkg/bootstrap/migrate.go deleted file mode 100644 index 748557a9..00000000 --- a/pkg/bootstrap/migrate.go +++ /dev/null @@ -1,416 +0,0 @@ -package bootstrap - -import ( - "fmt" - "log" - "os" - "path/filepath" - "strings" - - tfjson "github.com/hashicorp/terraform-json" - migratorapi "github.com/pluralsh/cluster-api-migration/pkg/api" - "github.com/pluralsh/cluster-api-migration/pkg/migrator" - "github.com/pluralsh/polly/containers" - delinkeranalyze "github.com/pluralsh/terraform-delinker/api/analyze/v1alpha1" - delinkerdelink "github.com/pluralsh/terraform-delinker/api/delink/v1alpha1" - delinkerexec "github.com/pluralsh/terraform-delinker/api/exec/v1alpha1" - delinkerplan "github.com/pluralsh/terraform-delinker/api/plan/v1alpha1" - "helm.sh/helm/v3/pkg/chart/loader" - "helm.sh/helm/v3/pkg/chartutil" - "sigs.k8s.io/yaml" - - "github.com/pluralsh/plural-cli/pkg/api" - bootstrapaws "github.com/pluralsh/plural-cli/pkg/bootstrap/aws" - "github.com/pluralsh/plural-cli/pkg/manifest" - "github.com/pluralsh/plural-cli/pkg/provider" - "github.com/pluralsh/plural-cli/pkg/utils" - "github.com/pluralsh/plural-cli/pkg/utils/git" - "github.com/pluralsh/plural-cli/pkg/utils/pathing" -) - -func newConfiguration(cliProvider provider.Provider, clusterProvider migratorapi.ClusterProvider) (*migratorapi.Configuration, error) { - switch clusterProvider { - case migratorapi.ClusterProviderGCP: - kubeconfigPath, err := getKubeconfigPath() - if err != nil { - log.Fatalln(err) - } - - return &migratorapi.Configuration{ - GCPConfiguration: &migratorapi.GCPConfiguration{ - Project: cliProvider.Project(), - Region: cliProvider.Region(), - Name: cliProvider.Cluster(), - KubeconfigPath: kubeconfigPath, - }, - }, nil - case migratorapi.ClusterProviderAzure: - context := cliProvider.Context() - config := migratorapi.Configuration{ - AzureConfiguration: &migratorapi.AzureConfiguration{ - SubscriptionID: utils.ToString(context["SubscriptionId"]), - ResourceGroup: cliProvider.Project(), - Name: cliProvider.Cluster(), - }, - } - - if err := config.Validate(); err != nil { - log.Fatalln(err) - } - - return &config, nil - case migratorapi.ClusterProviderAWS: - err := os.Setenv("AWS_REGION", cliProvider.Region()) - if err != nil { - return nil, err - } - - config := &migratorapi.Configuration{ - AWSConfiguration: &migratorapi.AWSConfiguration{ - ClusterName: cliProvider.Cluster(), - Region: cliProvider.Region(), - }, - } - return config, nil - case migratorapi.ClusterProviderKind: - return &migratorapi.Configuration{ - KindConfiguration: &migratorapi.KindConfiguration{ - ClusterName: cliProvider.Cluster(), - }, - }, nil - - } - - return nil, fmt.Errorf("unknown provider, no configuration found") -} - -// getMigrator returns configured migrator for current provider. -func getMigrator() (migratorapi.Migrator, error) { - prov, err := provider.GetProvider() - if err != nil { - return nil, err - } - - clusterProvider := migratorapi.ClusterProvider(prov.Name()) - - configuration, err := newConfiguration(prov, clusterProvider) - if err != nil { - return nil, err - } - - return migrator.NewMigrator(clusterProvider, configuration) -} - -func isDesiredKubernetesVersion(key string, value, diffValue any) bool { - if key != "kubernetesVersion" { - return false - } - - defaultKubernetesVersion, _ := diffValue.(string) - currentKubernetesVersion, _ := value.(string) - - defaultKubernetesVersion = strings.TrimPrefix(defaultKubernetesVersion, "v") - currentKubernetesVersion = strings.TrimPrefix(currentKubernetesVersion, "v") - - return len(defaultKubernetesVersion) > 0 && strings.HasPrefix(currentKubernetesVersion, defaultKubernetesVersion) -} - -// generateValuesFile generates values.yaml file based on current cluster configuration that will be used by Cluster API. -func generateValuesFile() error { - utils.Highlight("Generating values.yaml file based on current cluster configuration...\n") - - gitRootDir, err := git.Root() - if err != nil { - return err - } - - bootstrapHelmDir := pathing.SanitizeFilepath(filepath.Join(gitRootDir, "bootstrap", "helm", "bootstrap")) - valuesFile := pathing.SanitizeFilepath(filepath.Join(bootstrapHelmDir, "values.yaml")) - defaultValuesFile := pathing.SanitizeFilepath(filepath.Join(bootstrapHelmDir, "default-values.yaml")) - - m, err := getMigrator() - if err != nil { - return err - } - - migratorValues, err := m.Convert() - if err != nil { - return err - } - - prov, err := provider.GetProvider() - if err != nil { - return err - } - - if prov.Name() == api.ProviderAWS { - availabilityZoneSet := containers.NewSet[string]() - for _, subnet := range migratorValues.Cluster.AWSCloudSpec.NetworkSpec.Subnets { - availabilityZoneSet.Add(subnet.AvailabilityZone) - } - man, err := manifest.FetchProject() - if err != nil { - return err - } - man.AvailabilityZones = availabilityZoneSet.List() - if err := man.Flush(); err != nil { - return err - } - } - - chart, err := loader.Load(bootstrapHelmDir) - if err != nil { - return err - } - - defaultValues, err := chartutil.ReadValuesFile(defaultValuesFile) - if err != nil { - return err - } - - // Nullify main values.yaml as we only use it to generate migration values - chart.Values = nil - chartValues, err := chartutil.CoalesceValues(chart, defaultValues) - if err != nil { - return err - } - - migrationYamlData, err := yaml.Marshal(Bootstrap{ClusterAPICluster: migratorValues}) - if err != nil { - return err - } - - migrationValues, err := chartutil.ReadValues(migrationYamlData) - if err != nil { - return err - } - - values := utils.DiffMap(migrationValues, chartValues, isDesiredKubernetesVersion) - - valuesYamlData, err := yaml.Marshal(values) - if err != nil { - return err - } - - if utils.Exists(valuesFile) { - if err := os.WriteFile(valuesFile, valuesYamlData, 0644); err != nil { - return err - } - } else { - return fmt.Errorf("can't save %s file", valuesFile) - } - - utils.Success("values.yaml saved successfully!\n") - return nil -} - -// GetProviderTags returns map of tags to set on provider resources during migration. -func GetProviderTags(prov, cluster string) map[string]string { - switch prov { - case api.ProviderAWS: - return map[string]string{ - fmt.Sprintf("kubernetes.io/cluster/%s", cluster): "owned", - fmt.Sprintf("sigs.k8s.io/cluster-api-provider-aws/cluster/%s", cluster): "owned", - } - case api.ProviderAzure: - return map[string]string{ - fmt.Sprintf("sigs.k8s.io_cluster-api-provider-azure_cluster_%s", cluster): "owned", - "sigs.k8s.io_cluster-api-provider-azure_role": "common", - } - default: - return map[string]string{} - } -} - -// delinkTerraformState delinks resources managed by Cluster API from Terraform state. -func delinkTerraformState(path string) error { - planner := delinkerplan.NewPlanner(delinkerplan.WithTerraform(delinkerexec.WithDir(path))) - - plan, err := planner.Plan() - if err != nil { - return err - } - - report := delinkeranalyze.NewAnalyzer(plan).Analyze(tfjson.ActionDelete) - delinker := delinkerdelink.NewDelinker(delinkerdelink.WithTerraform(delinkerexec.WithDir(path))) - return delinker.Run(report) -} - -// getMigrationFlags returns list of provider-specific flags used during cluster migration. -func getMigrationFlags(prov string) []string { - switch prov { - case api.ProviderAWS: - return []string{ - "--set", "cluster-api-provider-aws.cluster-api-provider-aws.bootstrapMode=false", - } - case api.ProviderAzure: - return []string{ - "--set", "cluster-api-provider-azure.cluster-api-provider-azure.bootstrapMode=false", - } - case api.ProviderGCP: - return []string{ - "--set", "cluster-api-provider-gcp.cluster-api-provider-gcp.bootstrapMode=false", - } - default: - return []string{} - } -} - -// getMigrationSteps returns list of steps to run during cluster migration. -func getMigrationSteps(runPlural ActionFunc) ([]*Step, error) { - man, err := manifest.FetchProject() - if err != nil { - return nil, err - } - - gitRootDir, err := git.Root() - if err != nil { - return nil, err - } - - bootstrapPath := pathing.SanitizeFilepath(filepath.Join(gitRootDir, "bootstrap")) - terraformPath := filepath.Join(bootstrapPath, "terraform") - flags := getMigrationFlags(man.Provider) - - if man.Provider == api.ProviderAzure { - // Setting PLURAL_PACKAGES_UNINSTALL variable to avoid confirmation prompt on package uninstall. - err := os.Setenv("PLURAL_PACKAGES_UNINSTALL", "true") - if err != nil { - return nil, err - } - } - - return []*Step{ - { - Name: "Ensure Cluster API IAM role has access", - Execute: func(_ []string) error { - roleArn := fmt.Sprintf("arn:aws:iam::%s:role/%s-capa-controller", man.Project, man.Cluster) - return bootstrapaws.AddRole(roleArn) - }, - Skip: man.Provider != api.ProviderAWS, - }, - { - Name: "Uninstall azure-identity package", - Args: []string{"plural", "packages", "uninstall", "helm", "bootstrap", "azure-identity"}, - TargetPath: gitRootDir, - Execute: runPlural, - Skip: man.Provider != api.ProviderAzure, - Retries: 2, - }, - { - Name: "Clear package cache", - TargetPath: gitRootDir, - Execute: func(_ []string) error { - api.ClearPackageCache() - return nil - }, - Skip: man.Provider != api.ProviderAzure, - }, - { - Name: "Normalize GCP provider value", - Execute: func(_ []string) error { - path := manifest.ProjectManifestPath() - project, err := manifest.ReadProject(path) - if err != nil { - return err - } - - project.Provider = api.ProviderGCP - return project.Write(path) - }, - Skip: man.Provider != api.ProviderGCP, - }, - { - Name: "Set Cluster API flag", - TargetPath: gitRootDir, - Execute: func(_ []string) error { - path := manifest.ProjectManifestPath() - project, err := manifest.ReadProject(path) - if err != nil { - return err - } - - project.ClusterAPI = true - return project.Write(path) - }, - }, - { - Name: "Build values", - Args: []string{"plural", "build", "--only", "bootstrap", "--force"}, - TargetPath: gitRootDir, - Execute: runPlural, - }, - { - Name: "Bootstrap CRDs", - Args: []string{"plural", "wkspace", "crds", bootstrapPath}, - Execute: runPlural, - }, - { - Name: "Install Cluster API operators", - Args: append([]string{"plural", "wkspace", "helm", "bootstrap", "--skip", "cluster-api-cluster"}, flags...), - Execute: runPlural, - }, - { - Name: "Add Cluster API tags for provider resources", - Execute: func(_ []string) error { - m, err := getMigrator() - if err != nil { - return err - } - - return m.AddTags(GetProviderTags(man.Provider, man.Cluster)) - }, - }, - { - Name: "Deploy cluster", - Args: append([]string{"plural", "wkspace", "helm", "bootstrap"}, flags...), - Execute: runPlural, - }, - { - Name: "Wait for cluster", - Args: []string{"plural", "clusters", "wait", "bootstrap", man.Cluster}, - Execute: runPlural, - }, - { - Name: "Wait for machine pools", - Args: []string{"plural", "clusters", "mpwait", "bootstrap", man.Cluster}, - Execute: runPlural, - }, - { - Name: "Delink resources managed by Cluster API from Terraform state", - Execute: func(_ []string) error { - return delinkTerraformState(terraformPath) - }, - Retries: 2, - }, - { - Name: "Run deploy", - Args: []string{"plural", "deploy", "--from", "bootstrap", "--silence", "--commit", "migrate to cluster api"}, - TargetPath: gitRootDir, - Execute: runPlural, - }, - }, nil -} - -// MigrateCluster migrates existing clusters to Cluster API. -func MigrateCluster(runPlural ActionFunc) error { - utils.Highlight("Migrating cluster to Cluster API...\n") - - err := generateValuesFile() - if err != nil { - return err - } - - steps, err := getMigrationSteps(runPlural) - if err != nil { - return err - } - - err = ExecuteSteps(steps) - if err != nil { - return err - } - - utils.Success("Cluster migrated successfully!\n") - return nil -} diff --git a/pkg/bootstrap/types.go b/pkg/bootstrap/types.go deleted file mode 100644 index 9b198cf7..00000000 --- a/pkg/bootstrap/types.go +++ /dev/null @@ -1,32 +0,0 @@ -package bootstrap - -import "github.com/pluralsh/cluster-api-migration/pkg/api" - -// ActionFunc is an action function that is executed as a part of single bootstrap, migrate and destroy step. -type ActionFunc func(arguments []string) error - -// ConditionFunc is a condition function that is checks if step should be executed or skipped. -type ConditionFunc func() bool - -type HookFunc func() - -// Step is a representation of a single step in a process of bootstrap, migrate and destroy. -type Step struct { - Name string - Args []string - TargetPath string - Execute ActionFunc - Skip bool - SkipFunc ConditionFunc - Retries int - OnError HookFunc - OnAfter HookFunc - Confirm string -} - -// Bootstrap is a representation of existing cluster to be migrated to Cluster API. -// This data is fetched from provider with migrator tool. -// See github.com/pluralsh/cluster-api-migration for more details. -type Bootstrap struct { - ClusterAPICluster *api.Values `json:"cluster-api-cluster"` -} diff --git a/pkg/bootstrap/validation/migration.go b/pkg/bootstrap/validation/migration.go deleted file mode 100644 index 371fed8a..00000000 --- a/pkg/bootstrap/validation/migration.go +++ /dev/null @@ -1,69 +0,0 @@ -package validation - -import ( - "fmt" - - "github.com/Masterminds/semver" - "github.com/pluralsh/plural-cli/pkg/api" -) - -var ( - tfRequirements = map[string]string{ - "aws-bootstrap": ">= 0.1.53", - "gcp-bootstrap": ">= 0.2.24", - "azure-bootstrap": ">= 0.2.0", - } - helmRequirements = map[string]string{ - "bootstrap": ">= 0.8.72", - } -) - -func ValidateMigration(client api.Client) error { - repo, err := client.GetRepository("bootstrap") - if err != nil { - return err - } - - charts, tfs, err := client.GetPackageInstallations(repo.Id) - if err != nil { - return err - } - chartsByName, tfsByName := map[string]*api.ChartInstallation{}, map[string]*api.TerraformInstallation{} - for _, chart := range charts { - chartsByName[chart.Chart.Name] = chart - } - for _, tf := range tfs { - tfsByName[tf.Terraform.Name] = tf - } - - for name, req := range tfRequirements { - if tf, ok := tfsByName[name]; ok { - if !testSemver(req, tf.Version.Version) { - return fmt.Errorf("You must have installed the %s terraform module at least at version %s to run cluster migration, your version is %s", name, req, tf.Version.Version) - } - } - } - - for name, req := range helmRequirements { - if chart, ok := chartsByName[name]; ok { - if !testSemver(req, chart.Version.Version) { - return fmt.Errorf("You must have installed the %s helm chart at least at version %s to run cluster migration, your version is %s", name, req, chart.Version.Version) - } - } - } - - return nil -} - -func testSemver(constraint, vsn string) bool { - c, err := semver.NewConstraint(constraint) - if err != nil { - return false - } - v, err := semver.NewVersion(vsn) - if err != nil { - return false - } - - return c.Check(v) -} diff --git a/pkg/bundle/configuration_test.go b/pkg/bundle/configuration_test.go index 36ecf161..44ec1ea5 100644 --- a/pkg/bundle/configuration_test.go +++ b/pkg/bundle/configuration_test.go @@ -114,7 +114,7 @@ func TestConfigureEnvVariables(t *testing.T) { ctx: map[string]interface{}{}, repo: "test", envVars: map[string]string{"PLURAL_TEST_TEST_ITEM": "workspace.yaml"}, - expectedValue: "apiVersion: \"\"\nkind: \"\"\nmetadata: null\nspec:\n clusterapi: false\n cluster: \"\"\n bucket: \"\"\n project: test\n provider: \"\"\n region: \"\"\n owner: null\n network: null\n availabilityzones: []\n bucketPrefix: \"\"\n context: {}\n", + expectedValue: "apiVersion: \"\"\nkind: \"\"\nmetadata: null\nspec:\n cluster: \"\"\n bucket: \"\"\n project: test\n provider: \"\"\n region: \"\"\n owner: null\n network: null\n availabilityzones: []\n bucketPrefix: \"\"\n context: {}\n", }, } for _, test := range tests { diff --git a/pkg/client/build.go b/pkg/client/build.go index 7f9b6692..fc294a1e 100644 --- a/pkg/client/build.go +++ b/pkg/client/build.go @@ -77,23 +77,6 @@ func (p *Plural) Deploy(c *cli.Context) error { continue } - // if repo == Bootstrap && project.ClusterAPI { - // ready, err := bootstrap.CheckClusterReadiness(project.Cluster, Bootstrap) - // - // // Stop if cluster exists, but it is not ready yet. - // if err != nil && err.Error() == bootstrap.ClusterNotReadyError { - // return err - // } - // - // // If cluster does not exist bootstrap needs to be done first. - // if !ready { - // err := bootstrap.BootstrapCluster(plural.RunPlural) - // if err != nil { - // return err - // } - // } - //} - execution, err := executor.GetExecution(pathing.SanitizeFilepath(filepath.Join(repoRoot, repo)), "deploy") if err != nil { return err diff --git a/pkg/cluster/clientset.go b/pkg/cluster/clientset.go deleted file mode 100644 index 95b58355..00000000 --- a/pkg/cluster/clientset.go +++ /dev/null @@ -1,41 +0,0 @@ -package cluster - -import ( - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - clusterapi "sigs.k8s.io/cluster-api/api/v1beta1" -) - -type ClusterV1Beta1Interface interface { - Clusters(namespace string) ClusterInterface -} - -type ClusterV1Beta1Client struct { - restClient rest.Interface -} - -func NewForConfig(c *rest.Config) (*ClusterV1Beta1Client, error) { - if err := AddToScheme(scheme.Scheme); err != nil { - return nil, err - } - - config := *c - config.ContentConfig.GroupVersion = &clusterapi.GroupVersion - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - config.UserAgent = rest.DefaultKubernetesUserAgent() - - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - - return &ClusterV1Beta1Client{restClient: client}, nil -} - -func (c *ClusterV1Beta1Client) Clusters(namespace string) ClusterInterface { - return &clusterClient{ - restClient: c.restClient, - ns: namespace, - } -} diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go deleted file mode 100644 index d9cbd8ca..00000000 --- a/pkg/cluster/cluster.go +++ /dev/null @@ -1,83 +0,0 @@ -package cluster - -import ( - "context" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - clusterapi "sigs.k8s.io/cluster-api/api/v1beta1" -) - -type ClusterInterface interface { - List(ctx context.Context, opts metav1.ListOptions) (*clusterapi.ClusterList, error) - Get(ctx context.Context, name string, options metav1.GetOptions) (*clusterapi.Cluster, error) - Create(ctx context.Context, clust *clusterapi.Cluster) (*clusterapi.Cluster, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - // ... -} - -type clusterClient struct { - restClient rest.Interface - ns string -} - -func (c *clusterClient) List(ctx context.Context, opts metav1.ListOptions) (*clusterapi.ClusterList, error) { - result := clusterapi.ClusterList{} - err := c.restClient. - Get(). - Namespace(c.ns). - Resource("clusters"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(ctx). - Into(&result) - - return &result, err -} - -func (c *clusterClient) Get(ctx context.Context, name string, opts metav1.GetOptions) (*clusterapi.Cluster, error) { - result := clusterapi.Cluster{} - err := c.restClient. - Get(). - Namespace(c.ns). - Resource("clusters"). - Name(name). - VersionedParams(&opts, scheme.ParameterCodec). - Do(ctx). - Into(&result) - - return &result, err -} - -func (c *clusterClient) Create(ctx context.Context, cluster *clusterapi.Cluster) (*clusterapi.Cluster, error) { - result := clusterapi.Cluster{} - err := c.restClient. - Post(). - Namespace(c.ns). - Resource("clusters"). - Body(cluster). - Do(ctx). - Into(&result) - - return &result, err -} - -func (c *clusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.restClient. - Get(). - Namespace(c.ns). - Resource("clusters"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch(ctx) -} - -func WatchNamespace(ctx context.Context, client ClusterInterface) (watch.Interface, error) { - clusters, err := client.List(ctx, metav1.ListOptions{}) - if err != nil { - return nil, err - } - resourceVersion := clusters.ListMeta.ResourceVersion - return client.Watch(ctx, metav1.ListOptions{ResourceVersion: resourceVersion}) -} diff --git a/pkg/cluster/printer.go b/pkg/cluster/printer.go deleted file mode 100644 index 89f95bd7..00000000 --- a/pkg/cluster/printer.go +++ /dev/null @@ -1,84 +0,0 @@ -package cluster - -import ( - "fmt" - "strings" - - tm "github.com/buger/goterm" - clusterapi "sigs.k8s.io/cluster-api/api/v1beta1" -) - -func Ready(cluster *clusterapi.Cluster) bool { - cond := findReadiness(cluster) - tm.Printf("Cluster %s ", cluster.Name) - if cond == nil { - warn("WAITING") - tm.Println("") - return false - } - - if cond.Status == "True" { - success("READY") - tm.Println("") - return true - } - - if cond.Status == "False" { - warn("WAITING") - } else if cond.Status == "Unknown" { - highlight("UNKNOWN") - } - - tm.Println("") - return false -} - -func Flush() { - for idx, str := range strings.SplitAfter(tm.Screen.String(), "\n") { - if idx == tm.Height()-1 { - _, err := tm.Output.WriteString("...") - if err != nil { - return - } - break - } - - _, err := tm.Output.WriteString(str) - if err != nil { - return - } - } - - if err := tm.Output.Flush(); err != nil { - return - } - tm.Screen.Reset() -} - -func findReadiness(cluster *clusterapi.Cluster) (condition *clusterapi.Condition) { - for _, cond := range cluster.Status.Conditions { - if cond.Type == clusterapi.ReadyCondition { - condition = &cond - return - } - } - return -} - -func warn(line string, args ...interface{}) { - if _, err := tm.Print(tm.Color(fmt.Sprintf(line, args...), tm.YELLOW)); err != nil { - return - } -} - -func success(line string, args ...interface{}) { - if _, err := tm.Print(tm.Color(fmt.Sprintf(line, args...), tm.GREEN)); err != nil { - return - } -} - -func highlight(line string, args ...interface{}) { - if _, err := tm.Print(tm.Bold(fmt.Sprintf(line, args...))); err != nil { - return - } -} diff --git a/pkg/cluster/register.go b/pkg/cluster/register.go deleted file mode 100644 index b7ce864a..00000000 --- a/pkg/cluster/register.go +++ /dev/null @@ -1,38 +0,0 @@ -package cluster - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - clusterapi "sigs.k8s.io/cluster-api/api/v1beta1" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - clusterapi.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/pkg/cluster/waiter.go b/pkg/cluster/waiter.go deleted file mode 100644 index d7c01fca..00000000 --- a/pkg/cluster/waiter.go +++ /dev/null @@ -1,75 +0,0 @@ -package cluster - -import ( - "context" - "fmt" - "time" - - tm "github.com/buger/goterm" - "github.com/pluralsh/plural-cli/pkg/config" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/rest" - clusterapi "sigs.k8s.io/cluster-api/api/v1beta1" -) - -const ( - waitTime = 40 * 60 * time.Second -) - -func Waiter(kubeConf *rest.Config, namespace string, name string, clustFunc func(cluster *clusterapi.Cluster) (bool, error), timeout func() error) error { - conf := config.Read() - ctx := context.Background() - clusters, err := NewForConfig(kubeConf) - if err != nil { - return err - } - - client := clusters.Clusters(conf.Namespace(namespace)) - cluster, err := client.Get(ctx, name, metav1.GetOptions{}) - if err != nil { - return err - } - - tm.Clear() - if ready, err := clustFunc(cluster); ready || err != nil { - return err - } - - watcher, err := WatchNamespace(ctx, client) - if err != nil { - return err - } - - ch := watcher.ResultChan() - for { - select { - case event := <-ch: - tm.Clear() - cluster, ok := event.Object.(*clusterapi.Cluster) - if !ok { - return fmt.Errorf("failed to parse watch event") - } - - if stop, err := clustFunc(cluster); stop || err != nil { - return err - } - case <-time.After(waitTime): - if err := timeout(); err != nil { - return err - } - } - } -} - -func Wait(kubeConf *rest.Config, namespace string, name string) error { - timeout := func() error { - return fmt.Errorf("Failed to become ready after 40 minutes, try running `plural cluster watch %s %s` to get an idea where to debug", namespace, name) - } - - return Waiter(kubeConf, namespace, name, func(cluster *clusterapi.Cluster) (bool, error) { - tm.MoveCursor(1, 1) - ready := Ready(cluster) - Flush() - return ready, nil - }, timeout) -} diff --git a/pkg/machinepool/clientset.go b/pkg/machinepool/clientset.go deleted file mode 100644 index b87bc4a0..00000000 --- a/pkg/machinepool/clientset.go +++ /dev/null @@ -1,41 +0,0 @@ -package machinepool - -import ( - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - clusterapiExp "sigs.k8s.io/cluster-api/exp/api/v1beta1" -) - -type MachinePoolV1Beta1Interface interface { - MachinePools(namespace string) MachinePoolInterface -} - -type MachinePoolV1Beta1Client struct { - restClient rest.Interface -} - -func NewForConfig(c *rest.Config) (*MachinePoolV1Beta1Client, error) { - if err := AddToScheme(scheme.Scheme); err != nil { - return nil, err - } - - config := *c - config.ContentConfig.GroupVersion = &clusterapiExp.GroupVersion - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - config.UserAgent = rest.DefaultKubernetesUserAgent() - - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - - return &MachinePoolV1Beta1Client{restClient: client}, nil -} - -func (c *MachinePoolV1Beta1Client) MachinePools(namespace string) MachinePoolInterface { - return &machinepoolClient{ - restClient: c.restClient, - ns: namespace, - } -} diff --git a/pkg/machinepool/machinepool.go b/pkg/machinepool/machinepool.go deleted file mode 100644 index e6718672..00000000 --- a/pkg/machinepool/machinepool.go +++ /dev/null @@ -1,98 +0,0 @@ -package machinepool - -import ( - "context" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - clusterapiExp "sigs.k8s.io/cluster-api/exp/api/v1beta1" -) - -type MachinePoolInterface interface { - List(ctx context.Context, opts metav1.ListOptions) (*clusterapiExp.MachinePoolList, error) - Get(ctx context.Context, name string, options metav1.GetOptions) (*clusterapiExp.MachinePool, error) - Create(ctx context.Context, mp *clusterapiExp.MachinePool) (*clusterapiExp.MachinePool, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Update(ctx context.Context, mp *clusterapiExp.MachinePool) (*clusterapiExp.MachinePool, error) - // ... -} - -type machinepoolClient struct { - restClient rest.Interface - ns string -} - -func (c *machinepoolClient) List(ctx context.Context, opts metav1.ListOptions) (*clusterapiExp.MachinePoolList, error) { - result := clusterapiExp.MachinePoolList{} - err := c.restClient. - Get(). - Namespace(c.ns). - Resource("machinepools"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(ctx). - Into(&result) - - return &result, err -} - -func (c *machinepoolClient) Get(ctx context.Context, name string, opts metav1.GetOptions) (*clusterapiExp.MachinePool, error) { - result := clusterapiExp.MachinePool{} - err := c.restClient. - Get(). - Namespace(c.ns). - Resource("machinepools"). - Name(name). - VersionedParams(&opts, scheme.ParameterCodec). - Do(ctx). - Into(&result) - - return &result, err -} - -func (c *machinepoolClient) Update(ctx context.Context, mp *clusterapiExp.MachinePool) (*clusterapiExp.MachinePool, error) { - result := clusterapiExp.MachinePool{} - err := c.restClient. - Put(). - Namespace(c.ns). - Resource("machinepools"). - Name(mp.Name). - Body(mp). - Do(ctx). - Into(&result) - - return &result, err -} - -func (c *machinepoolClient) Create(ctx context.Context, machinepool *clusterapiExp.MachinePool) (*clusterapiExp.MachinePool, error) { - result := clusterapiExp.MachinePool{} - err := c.restClient. - Post(). - Namespace(c.ns). - Resource("machinepools"). - Body(machinepool). - Do(ctx). - Into(&result) - - return &result, err -} - -func (c *machinepoolClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.restClient. - Get(). - Namespace(c.ns). - Resource("machinepools"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch(ctx) -} - -func WatchNamespace(ctx context.Context, client MachinePoolInterface, listOps metav1.ListOptions) (watch.Interface, error) { - mps, err := client.List(ctx, listOps) - if err != nil { - return nil, err - } - resourceVersion := mps.ListMeta.ResourceVersion - return client.Watch(ctx, metav1.ListOptions{ResourceVersion: resourceVersion}) -} diff --git a/pkg/machinepool/printer.go b/pkg/machinepool/printer.go deleted file mode 100644 index 3def94f5..00000000 --- a/pkg/machinepool/printer.go +++ /dev/null @@ -1,115 +0,0 @@ -package machinepool - -import ( - "fmt" - "strings" - - tm "github.com/buger/goterm" - clusterapi "sigs.k8s.io/cluster-api/api/v1beta1" - clusterapiExp "sigs.k8s.io/cluster-api/exp/api/v1beta1" -) - -func Ready(mp *clusterapiExp.MachinePool) bool { - phase := findReadiness(mp) - tm.Printf("MachinePool %s ", mp.Name) - - switch phase { - case clusterapiExp.MachinePoolPhasePending: - warn("PENDING") - tm.Println("") - return false - case clusterapiExp.MachinePoolPhaseProvisioning: - warn("PROVISIONING") - tm.Println("") - return false - case clusterapiExp.MachinePoolPhaseProvisioned: - warn("PROVISIONED") - tm.Println("") - return false - case clusterapiExp.MachinePoolPhaseRunning: - success("RUNNING") - tm.Println("") - return true - case clusterapiExp.MachinePoolPhaseDeleting: - warn("DELETING") - tm.Println("") - return false - case clusterapiExp.MachinePoolPhaseFailed: - warn("FAILED") - tm.Println("") - return false - case clusterapiExp.MachinePoolPhaseUnknown: - highlight("UNKNOWN") - tm.Println("") - return false - case clusterapiExp.MachinePoolPhaseScalingUp: - warn("SCALING UP") - tm.Println("") - return false - case clusterapiExp.MachinePoolPhaseScalingDown: - warn("SCALING DOWN") - tm.Println("") - return false - case clusterapiExp.MachinePoolPhaseScaling: - warn("SCALING") - tm.Println("") - return false - } - - tm.Println("") - return false -} - -func Flush() { - for idx, str := range strings.SplitAfter(tm.Screen.String(), "\n") { - if idx == tm.Height()-1 { - _, err := tm.Output.WriteString("...") - if err != nil { - return - } - break - } - - _, err := tm.Output.WriteString(str) - if err != nil { - return - } - } - - if err := tm.Output.Flush(); err != nil { - return - } - tm.Screen.Reset() -} - -func findReadiness(mp *clusterapiExp.MachinePool) clusterapiExp.MachinePoolPhase { - return clusterapiExp.MachinePoolPhase(mp.Status.Phase) -} - -func findCondition(mp *clusterapiExp.MachinePool) (condition clusterapi.Condition) { - for _, cond := range mp.Status.Conditions { - if cond.Type == clusterapi.ReadyCondition { - condition = cond - return - } - } - return -} - -func warn(line string, args ...interface{}) { - if _, err := tm.Print(tm.Color(fmt.Sprintf(line, args...), tm.YELLOW)); err != nil { - return - } -} - -func success(line string, args ...interface{}) { - if _, err := tm.Print(tm.Color(fmt.Sprintf(line, args...), tm.GREEN)); err != nil { - return - } -} - -func highlight(line string, args ...interface{}) { - if _, err := tm.Print(tm.Bold(fmt.Sprintf(line, args...))); err != nil { - return - } -} diff --git a/pkg/machinepool/register.go b/pkg/machinepool/register.go deleted file mode 100644 index 9546b6be..00000000 --- a/pkg/machinepool/register.go +++ /dev/null @@ -1,38 +0,0 @@ -package machinepool - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - clusterapiExp "sigs.k8s.io/cluster-api/exp/api/v1beta1" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - clusterapiExp.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/pkg/machinepool/waiter.go b/pkg/machinepool/waiter.go deleted file mode 100644 index 26878260..00000000 --- a/pkg/machinepool/waiter.go +++ /dev/null @@ -1,294 +0,0 @@ -package machinepool - -import ( - "context" - "fmt" - "time" - - tm "github.com/buger/goterm" - "github.com/gdamore/tcell/v2" - "github.com/pluralsh/plural-cli/pkg/config" - "github.com/pluralsh/plural-cli/pkg/utils" - "github.com/rivo/tview" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/rest" - clusterapi "sigs.k8s.io/cluster-api/api/v1beta1" - clusterapiExp "sigs.k8s.io/cluster-api/exp/api/v1beta1" -) - -const ( - waitTime = 40 * 60 * time.Second -) - -func ListAll(kubeConf *rest.Config) ([]clusterapiExp.MachinePool, error) { - mps, err := NewForConfig(kubeConf) - if err != nil { - return nil, err - } - - client := mps.MachinePools("") - l, err := client.List(context.Background(), metav1.ListOptions{}) - if err != nil { - return nil, err - } - - return l.Items, nil -} - -type MachinePoolWaiter interface { - Init() - Check(mp *clusterapiExp.MachinePool) bool -} - -type machinePoolWaiterClient struct { - pools *clusterapiExp.MachinePoolList - phase map[string]clusterapiExp.MachinePoolPhase - condition map[string]clusterapi.Condition - app *tview.Application - table *tview.Table -} - -func (c *machinePoolWaiterClient) Init() { - c.phase = make(map[string]clusterapiExp.MachinePoolPhase) - c.condition = make(map[string]clusterapi.Condition) - for _, mp := range c.pools.Items { - c.phase[mp.Name] = findReadiness(&mp) - } - for _, mp := range c.pools.Items { - c.condition[mp.Name] = findCondition(&mp) - } - - app := tview.NewApplication() - c.app = app - table := tview.NewTable(). - SetBorders(true).SetDoneFunc(func(key tcell.Key) { - if key == tcell.KeyEscape { - app.Stop() - } - }) - c.table = table -} - -// UpdateTable updates the table with the current status of the machine pools -// the table has 2 columns, the first one is the name of the machine pool and the second one is the phase -func (c *machinePoolWaiterClient) UpdateTable() { - c.table.Clear() - headers := []string{"Machine Pool", "Phase"} - for i, header := range headers { - c.table.SetCell(0, i, tview.NewTableCell(header).SetTextColor(tcell.ColorYellow)) - } - for i, mp := range c.pools.Items { - name := mp.Name - phase := string(c.phase[name]) - c.table.SetCell(i+1, 0, tview.NewTableCell(name)) - c.table.SetCell(i+1, 1, tview.NewTableCell(phase)) - } -} - -func (c *machinePoolWaiterClient) Check(mp *clusterapiExp.MachinePool) bool { - c.phase[mp.Name] = findReadiness(mp) - c.condition[mp.Name] = findCondition(mp) - c.UpdateTable() - c.app.Draw() - - return areAllConditionsTrue(c.condition) -} - -// areAllConditionsTrue checks if all conditions in provided map are true. -func areAllConditionsTrue(conditions map[string]clusterapi.Condition) bool { - for _, condition := range conditions { - if condition.Status != corev1.ConditionTrue { - return false - } - } - return true -} - -func AllWaiter(kubeConf *rest.Config, namespace string, clusterName string, timeout func() error) error { - conf := config.Read() - ctx := context.Background() - mps, err := NewForConfig(kubeConf) - if err != nil { - return err - } - - label := &metav1.LabelSelector{MatchLabels: map[string]string{"cluster.x-k8s.io/cluster-name": clusterName}} - - client := mps.MachinePools(conf.Namespace(namespace)) - pools, err := client.List(ctx, metav1.ListOptions{LabelSelector: metav1.FormatLabelSelector(label)}) - if err != nil { - return err - } - if len(pools.Items) == 0 { - return fmt.Errorf("No machine pools found for cluster %s", clusterName) - } - - waitClient := &machinePoolWaiterClient{pools: pools} - - waitClient.Init() - - go func() { - if err := waitClient.app.SetRoot(waitClient.table, true).SetFocus(waitClient.table).Run(); err != nil { - utils.Error("%s\n", err) - panic(err) - } - }() - - if ready := waitClient.Check(&pools.Items[0]); ready { - waitClient.app.Stop() - return err - } - - watcher, err := WatchNamespace(ctx, client, metav1.ListOptions{LabelSelector: metav1.FormatLabelSelector(label)}) - if err != nil { - return err - } - - ch := watcher.ResultChan() - for { - select { - case event := <-ch: - mp, ok := event.Object.(*clusterapiExp.MachinePool) - if !ok { - waitClient.app.Stop() - return fmt.Errorf("Failed to parse watch event") - } - - if stop := waitClient.Check(mp); stop { - waitClient.app.Stop() - return nil - } - case <-time.After(waitTime): - waitClient.app.Stop() - if err := timeout(); err != nil { - return err - } - } - } -} - -func Waiter(kubeConf *rest.Config, namespace string, name string, mpFunc func(mp *clusterapiExp.MachinePool) (bool, error), timeout func() error) error { - conf := config.Read() - ctx := context.Background() - mps, err := NewForConfig(kubeConf) - if err != nil { - return err - } - - client := mps.MachinePools(conf.Namespace(namespace)) - mp, err := client.Get(ctx, name, metav1.GetOptions{}) - if err != nil { - return err - } - - if ready, err := mpFunc(mp); ready || err != nil { - return err - } - - watcher, err := WatchNamespace(ctx, client, metav1.ListOptions{}) - if err != nil { - return err - } - - ch := watcher.ResultChan() - for { - select { - case event := <-ch: - mp, ok := event.Object.(*clusterapiExp.MachinePool) - if !ok { - return fmt.Errorf("Failed to parse watch event") - } - - if stop, err := mpFunc(mp); stop || err != nil { - return err - } - case <-time.After(waitTime): - if err := timeout(); err != nil { - return err - } - } - } -} - -func SilentWait(kubeConf *rest.Config, namespace string, name string) error { - timeout := func() error { - return fmt.Errorf("Failed to become ready after 40 minutes, try running `plural cluster mpwait %s %s` to get an idea where to debug", namespace, name) - } - - return Waiter(kubeConf, namespace, name, func(mp *clusterapiExp.MachinePool) (bool, error) { - phase := findReadiness(mp) - if phase == clusterapiExp.MachinePoolPhaseRunning { - fmt.Printf("MachinePool %s is finally ready!", name) - return true, nil - } - return false, nil - }, timeout) -} - -func Wait(kubeConf *rest.Config, namespace string, name string) error { - timeout := func() error { - return fmt.Errorf("Failed to become ready after 40 minutes, try running `plural cluster mpwait %s %s` to get an idea where to debug", namespace, name) - } - - return Waiter(kubeConf, namespace, name, func(mp *clusterapiExp.MachinePool) (bool, error) { - ready := Ready(mp) - Flush() - return ready, nil - }, timeout) -} - -func NoTableAllWaiter(kubeConf *rest.Config, namespace string, clusterName string) error { - conf := config.Read() - ctx := context.Background() - mps, err := NewForConfig(kubeConf) - if err != nil { - return err - } - - label := &metav1.LabelSelector{MatchLabels: map[string]string{"cluster.x-k8s.io/cluster-name": clusterName}} - - client := mps.MachinePools(conf.Namespace(namespace)) - pools, err := client.List(ctx, metav1.ListOptions{LabelSelector: metav1.FormatLabelSelector(label)}) - if err != nil { - return err - } - if len(pools.Items) == 0 { - return fmt.Errorf("No machine pools found for cluster %s", clusterName) - } - condition := map[string]clusterapi.Condition{} - - if err := utils.WaitFor(20*time.Minute, 5*time.Second, func() (bool, error) { - pools, err := client.List(ctx, metav1.ListOptions{LabelSelector: metav1.FormatLabelSelector(label)}) - if err != nil { - return false, err - } - for y, mp := range pools.Items { - tm.MoveCursor(1, y+1) - Ready(&mp) - Flush() - condition[mp.Name] = findCondition(&mp) - if areAllConditionsTrue(condition) { - return true, nil - } - } - - return false, nil - }); err != nil { - return err - } - - return nil -} - -func WaitAll(kubeConf *rest.Config, namespace string, clusterName string) error { - value, ok := utils.GetEnvBoolValue("PLURAL_DISABLE_MP_TABLE_VIEW") - if ok && value { - return NoTableAllWaiter(kubeConf, namespace, clusterName) - } - timeout := func() error { - return fmt.Errorf("Failed to become ready after 40 minutes, try running `plural cluster mpwait %s %s` to get an idea where to debug", namespace, clusterName) - } - - return AllWaiter(kubeConf, namespace, clusterName, timeout) -} diff --git a/pkg/manifest/manifest.go b/pkg/manifest/manifest.go index a728dcb7..d720fa96 100644 --- a/pkg/manifest/manifest.go +++ b/pkg/manifest/manifest.go @@ -10,7 +10,6 @@ import ( "gopkg.in/yaml.v2" "github.com/pluralsh/plural-cli/pkg/api" - "github.com/pluralsh/plural-cli/pkg/exp" "github.com/pluralsh/plural-cli/pkg/utils" "github.com/pluralsh/plural-cli/pkg/utils/pathing" ) @@ -76,11 +75,6 @@ func ReadProject(path string) (man *ProjectManifest, err error) { man = versioned.Spec - // Override Cluster API flag silently - if !exp.IsFeatureEnabled(exp.EXP_PLURAL_CAPI) { - man.ClusterAPI = false - } - man.Provider = api.NormalizeProvider(man.Provider) return @@ -136,11 +130,6 @@ func (pMan *ProjectManifest) Configure(cloud bool) Writer { return nil } } - - if exp.IsFeatureEnabled(exp.EXP_PLURAL_CAPI) { - pMan.ClusterAPI = true - } - return func() error { return pMan.Write(ProjectManifestPath()) } } diff --git a/pkg/manifest/types.go b/pkg/manifest/types.go index 99b76a72..6e87ef2a 100644 --- a/pkg/manifest/types.go +++ b/pkg/manifest/types.go @@ -51,7 +51,6 @@ type NetworkConfig struct { } type ProjectManifest struct { - ClusterAPI bool Cluster string Bucket string Project string diff --git a/pkg/scaffold/helm.go b/pkg/scaffold/helm.go index 70ee1dbd..26204d60 100644 --- a/pkg/scaffold/helm.go +++ b/pkg/scaffold/helm.go @@ -182,7 +182,6 @@ func (s *Scaffold) buildChartValues(w *wkspace.Workspace) error { "Config": conf, "Provider": w.Provider.Name(), "Context": w.Provider.Context(), - "ClusterAPI": proj.ClusterAPI, "Network": proj.Network, "Applications": apps, } diff --git a/pkg/scaffold/terraform.go b/pkg/scaffold/terraform.go index b73aee7a..1efbff6d 100644 --- a/pkg/scaffold/terraform.go +++ b/pkg/scaffold/terraform.go @@ -130,7 +130,6 @@ func (scaffold *Scaffold) handleTerraform(wk *wkspace.Workspace) error { "Region": wk.Provider.Region(), "Context": wk.Provider.Context(), "Config": config.Read(), - "ClusterAPI": wk.Manifest.ClusterAPI, "Applications": apps, } if err := tmpl.Execute(&buf, values); err != nil { diff --git a/pkg/test/e2eclusterapi/e2e_api_test.go b/pkg/test/e2eclusterapi/e2e_api_test.go deleted file mode 100644 index 1a675385..00000000 --- a/pkg/test/e2eclusterapi/e2e_api_test.go +++ /dev/null @@ -1,144 +0,0 @@ -//go:build e2e - -package e2e_test - -import ( - "context" - "fmt" - "os" - "os/exec" - "path" - "strings" - "testing" - "time" - - "github.com/pluralsh/plural-cli/pkg/kubernetes" - "github.com/pluralsh/plural-cli/pkg/machinepool" - "github.com/pluralsh/plural-cli/pkg/utils" - "github.com/pluralsh/polly/containers" - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestApiListInstallations(t *testing.T) { - - cmd := exec.Command("plural", "api", "list", "installations") - cmdOutput, err := cmd.CombinedOutput() - if err != nil { - t.Fatal(err) - } - installations := make([]string, 0) - rows := strings.Split(string(cmdOutput[:]), "\n") - for _, row := range rows[1:] { // Skip the heading row and iterate through the remaining rows - row = strings.ReplaceAll(row, "|", "") - cols := strings.Fields(row) // Extract each column from the row. - if len(cols) == 3 { - installations = append(installations, cols[0]) - } - } - expected := []string{"bootstrap"} - expects := containers.ToSet(expected) - assert.True(t, expects.Equal(containers.ToSet(installations)), fmt.Sprintf("the expected %s is different then %s", expected, installations)) -} - -func TestPackagesList(t *testing.T) { - homeDir, err := os.UserHomeDir() - assert.NoError(t, err) - - testDir := path.Join(homeDir, "test") - - err = os.Chdir(testDir) - assert.NoError(t, err) - cmd := exec.Command("plural", "packages", "list", "bootstrap") - cmdOutput, err := cmd.CombinedOutput() - if err != nil { - t.Fatal(err) - } - packages := make([]string, 0) - rows := strings.Split(string(cmdOutput[:]), "\n") - for _, row := range rows[3:] { // Skip the heading row and iterate through the remaining rows - row = strings.ReplaceAll(row, "|", "") - cols := strings.Fields(row) // Extract each column from the row. - if len(cols) == 3 { - packages = append(packages, cols[1]) - } - } - expected := []string{"bootstrap", "kind-bootstrap-cluster-api", "cluster-api-control-plane", "cluster-api-bootstrap", "plural-certmanager-webhook", "cluster-api-cluster", "cluster-api-core", "cluster-api-provider-docker"} - expects := containers.ToSet(expected) - assert.True(t, expects.Equal(containers.ToSet(packages)), fmt.Sprintf("the expected %s is different then %s", expected, packages)) -} - -func TestUpdateNodePools(t *testing.T) { - cmd := exec.Command("plural", "ops", "cluster") - cmdOutput, err := cmd.CombinedOutput() - if err != nil { - t.Fatal(err) - } - nodes := make([]string, 0) - rows := strings.Split(string(cmdOutput[:]), "\n") - for _, row := range rows[3:] { // Skip the heading row and iterate through the remaining rows - row = strings.ReplaceAll(row, "|", "") - cols := strings.Fields(row) // Extract each column from the row. - if len(cols) == 3 { - nodes = append(nodes, cols[0]) - } - } - - assert.Equal(t, 3, len(nodes), fmt.Sprintf("expected %d nodes got %d", 3, len(nodes))) - kubeConf, err := kubernetes.KubeConfig() - if err != nil { - t.Fatal(err) - } - - mpools, err := machinepool.ListAll(kubeConf) - if err != nil { - t.Fatal(err) - } - if len(mpools) != 1 { - t.Fatal("expected one machine pool") - } - mp := mpools[0] - - mps, err := machinepool.NewForConfig(kubeConf) - if err != nil { - t.Fatal(err) - } - - client := mps.MachinePools("bootstrap") - machinePool, err := client.Get(context.Background(), mp.Name, metav1.GetOptions{}) - if err != nil { - t.Fatal(err) - } - - replicas := *machinePool.Spec.Replicas - - if replicas != 2 { - t.Fatal("expected 2 replicas") - } - replicas = 3 - machinePool.Spec.Replicas = &replicas - - machinePool, err = client.Update(context.Background(), machinePool) - if err != nil { - t.Fatal(err) - } - - kube, err := kubernetes.Kubernetes() - if err != nil { - t.Fatal(err) - } - - if err := utils.WaitFor(5*time.Minute, 5*time.Second, func() (bool, error) { - nodeList, err := kube.Nodes() - if err != nil { - t.Fatal(err) - } - if len(nodeList.Items) == 4 { - return true, nil - } - return false, nil - }); err != nil { - t.Fatal(err) - } - -} diff --git a/pkg/utils/backup/capi.go b/pkg/utils/backup/capi.go deleted file mode 100644 index e10c320a..00000000 --- a/pkg/utils/backup/capi.go +++ /dev/null @@ -1,84 +0,0 @@ -package backup - -import ( - "context" - "fmt" - "os" - "path/filepath" - - apiclient "sigs.k8s.io/cluster-api/cmd/clusterctl/client" - - "github.com/pluralsh/plural-cli/pkg/config" -) - -type CAPIBackup struct { - dirPath string - ctx context.Context -} - -func (this CAPIBackup) createDir() { - if this.Exists() { - return - } - - _ = os.MkdirAll(this.dirPath, os.ModePerm) -} - -func (this CAPIBackup) Exists() bool { - _, err := os.Stat(this.dirPath) - return !os.IsNotExist(err) -} - -func (this CAPIBackup) Save(options apiclient.MoveOptions) error { - client, err := apiclient.New(this.ctx, "") - if err != nil { - return err - } - - this.createDir() - if len(options.FromKubeconfig.Context) == 0 || len(options.FromKubeconfig.Path) == 0 { - return fmt.Errorf("both FromKubeconfig context and path have to be configured\n") - } - - options.ToDirectory = this.dirPath - options.Namespace = "bootstrap" - - return client.Move(this.ctx, options) -} - -func (this CAPIBackup) Restore(options apiclient.MoveOptions) error { - client, err := apiclient.New(this.ctx, "") - if err != nil { - return err - } - - if len(options.ToKubeconfig.Context) == 0 || len(options.ToKubeconfig.Path) == 0 { - return fmt.Errorf("both ToKubeconfig context and path have to be configured\n") - } - - if !this.Exists() { - return fmt.Errorf("could not find move backup to restore from") - } - - options.FromDirectory = this.dirPath - options.Namespace = "bootstrap" - - return client.Move(this.ctx, options) -} - -func (this CAPIBackup) Remove() error { - if !this.Exists() { - return nil - } - - return os.RemoveAll(this.dirPath) -} - -func NewCAPIBackup(cluster string) Backup[apiclient.MoveOptions] { - path, _ := config.PluralDir() - - return CAPIBackup{ - ctx: context.Background(), - dirPath: filepath.Join(path, backupsDir, cluster), - } -} diff --git a/pkg/utils/backup/types.go b/pkg/utils/backup/types.go deleted file mode 100644 index fc579e02..00000000 --- a/pkg/utils/backup/types.go +++ /dev/null @@ -1,14 +0,0 @@ -package backup - -type BackupOptions any - -const ( - backupsDir = "backups" -) - -type Backup[T BackupOptions] interface { - Exists() bool - Save(opts T) error - Restore(opts T) error - Remove() error -}