diff --git a/.gitignore b/.gitignore index 0b54fc813..35d80a207 100755 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ bin # IDEs .idea .vscode +.run # OS temporary files .DS_Store @@ -29,3 +30,4 @@ bin # Kyma workspace and crt-file (created by deploy cmd) workspace kyma.crt +mod diff --git a/cmd/kyma/alpha/alpha.go b/cmd/kyma/alpha/alpha.go index 5cd3651df..dcb8e7a12 100755 --- a/cmd/kyma/alpha/alpha.go +++ b/cmd/kyma/alpha/alpha.go @@ -3,8 +3,11 @@ package alpha import ( "github.com/kyma-project/cli/cmd/kyma/alpha/create" "github.com/kyma-project/cli/cmd/kyma/alpha/deploy" + "github.com/kyma-project/cli/cmd/kyma/alpha/disable" + "github.com/kyma-project/cli/cmd/kyma/alpha/enable" "github.com/kyma-project/cli/cmd/kyma/alpha/list" "github.com/kyma-project/cli/cmd/kyma/alpha/sign" + "github.com/kyma-project/cli/cmd/kyma/alpha/verify" "github.com/kyma-project/cli/internal/cli" "github.com/spf13/cobra" ) @@ -20,8 +23,11 @@ func NewCmd(o *cli.Options) *cobra.Command { cmd.AddCommand(create.NewCmd(o)) cmd.AddCommand(list.NewCmd(o)) + cmd.AddCommand(enable.NewCmd(o)) + cmd.AddCommand(disable.NewCmd(o)) cmd.AddCommand(deploy.NewCmd(deploy.NewOptions(o))) cmd.AddCommand(sign.NewCmd(o)) + cmd.AddCommand(verify.NewCmd(o)) return cmd } diff --git a/cmd/kyma/alpha/create/module/module.go b/cmd/kyma/alpha/create/module/module.go index fdaa6fb54..bb1c5c738 100644 --- a/cmd/kyma/alpha/create/module/module.go +++ b/cmd/kyma/alpha/create/module/module.go @@ -1,18 +1,21 @@ package module import ( + "context" "errors" "fmt" "os" "strings" + "github.com/mandelsoft/vfs/pkg/memoryfs" "github.com/mandelsoft/vfs/pkg/osfs" "github.com/mandelsoft/vfs/pkg/vfs" + "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc" + compdescv2 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/versions/v2" "github.com/spf13/cobra" "go.uber.org/zap" "github.com/kyma-project/cli/internal/cli" - "github.com/kyma-project/cli/internal/kustomize" "github.com/kyma-project/cli/pkg/module" ) @@ -29,7 +32,7 @@ func NewCmd(o *Options) *cobra.Command { } cmd := &cobra.Command{ - Use: "module [flags]", + Use: "module --name MODULE_NAME --version MODULE_VERSION --registry MODULE_REGISTRY [flags]", Short: "Creates a module bundled as an OCI image with the given OCI image name from the contents of the given path", Long: `Use this command to create a Kyma module and bundle it as an OCI image. @@ -48,7 +51,7 @@ Optionally, you can manually add additional layers with contents in other paths Finally, if you provided a registry to which to push the artifact, the created module is validated and pushed. During the validation the default CR defined in the optional "default.yaml" file is validated against CustomResourceDefinition. Alternatively, you can trigger an on-demand default CR validation with "--validateCR=true", in case you don't push to the registry. -To push the artifact into some registries, for example, the central docker.io registry, you have to change the OCM Component Name Mapping with the following flag: "--nameMapping=sha256-digest". This is necessary because the registry does not accept artifact URLs with more than two path segments, and such URLs are generated with the default name mapping: "urlPath". In the case of the "sha256-digest" mapping, the artifact URL contains just a sha256 digest of the full Component Name and fits the path length restrictions. +To push the artifact into some registries, for example, the central docker.io registry, you have to change the OCM Component Name Mapping with the following flag: "--name-mapping=sha256-digest". This is necessary because the registry does not accept artifact URLs with more than two path segments, and such URLs are generated with the default name mapping: "urlPath". In the case of the "sha256-digest" mapping, the artifact URL contains just a sha256 digest of the full Component Name and fits the path length restrictions. `, @@ -58,38 +61,100 @@ Build module my-domain/modA in version 1.2.3 and push it to a remote registry Build module my-domain/modB in version 3.2.1 and push it to a local registry "unsigned" subfolder without tls kyma alpha create module -n my-domain/modB --version 3.2.1 -p /path/to/module --registry http://localhost:5001/unsigned --insecure `, - RunE: func(_ *cobra.Command, args []string) error { return c.Run(args) }, + RunE: func(cobraCmd *cobra.Command, args []string) error { return c.Run(cobraCmd.Context(), args) }, Aliases: []string{"mod"}, } cmd.Flags().StringVar(&o.Version, "version", "", "Version of the module. This flag is mandatory.") - cmd.Flags().StringVarP(&o.Name, "name", "n", "", "Override the module name of the kubebuilder project. If the module is not a kubebuilder project, this flag is mandatory.") - cmd.Flags().StringVarP(&o.Path, "path", "p", "", "Path to the module contents. (default current directory)") - cmd.Flags().StringVar(&o.ModCache, "mod-cache", "./mod", "Specifies the path where the module artifacts are locally cached to generate the image. If the path already has a module, use the overwrite flag to overwrite it.") - cmd.Flags().StringArrayVarP(&o.ResourcePaths, "resource", "r", []string{}, "Add an extra resource in a new layer with format . It is also possible to provide only a path; name will default to the last path element and type to 'helm-chart'") - cmd.Flags().StringVar(&o.RegistryURL, "registry", "", "Repository context url for module to upload. The repository url will be automatically added to the repository contexts in the module") - cmd.Flags().StringVar(&o.NameMappingMode, "nameMapping", "urlPath", "Overrides the OCM Component Name Mapping, one of: \"urlPath\" or \"sha256-digest\"") - cmd.Flags().StringVar(&o.RegistryCredSelector, "registry-cred-selector", "", - "label selector to identify a secret of type kubernetes.io/dockerconfigjson (that needs to be created externally) which allows the image to be accessed in private image registries. This can be used if you push your module to a registry with authenticated access. Example: \"label1=value1,label2=value2\"") - cmd.Flags().StringVarP(&o.Credentials, "credentials", "c", "", "Basic authentication credentials for the given registry in the format user:password") - cmd.Flags().StringVar(&o.DefaultCRPath, "default-cr", "", "File containing the default custom resource of the module. If the module is a kubebuilder project, the default CR will be automatically detected.") - cmd.Flags().StringVarP(&o.TemplateOutput, "output", "o", "template.yaml", "File to which to output the module template if the module is uploaded to a registry") + cmd.Flags().StringVarP( + &o.Name, "name", "n", "", + "Override the module name of the kubebuilder project. If the module is not a kubebuilder project, this flag is mandatory.", + ) + + cmd.Flags().StringVar( + &o.ModuleArchivePath, "module-archive-path", "./mod", + "Specifies the path where the module artifacts are locally cached to generate the image. If the path already has a module, use the \"--module-archive-version-overwrite\" flag to overwrite it.", + ) + cmd.Flags().BoolVar( + &o.PersistentArchive, "module-archive-persistence", false, + "Uses the host filesystem instead of inmemory archiving to build the module.", + ) + cmd.Flags().BoolVar(&o.ArchiveVersionOverwrite, "module-archive-version-overwrite", false, "Overwrites existing component's versions of the module. If set to false, the push is a No-Op.") + + cmd.Flags().StringVarP(&o.Path, "path", "p", "", "Path to the module's contents. (default current directory)") + cmd.Flags().StringArrayVarP( + &o.ResourcePaths, "resource", "r", []string{}, + "Add an extra resource in a new layer in the format. If you provide only a path, the name defaults to the last path element, and the type is set to 'helm-chart'.", + ) + cmd.Flags().StringVar( + &o.RegistryURL, "registry", "", + "Context URL of the repository. The repository URL will be automatically added to the repository contexts in the module descriptor.", + ) + cmd.Flags().StringVar( + &o.NameMappingMode, "name-mapping", "urlPath", + "Overrides the OCM Component Name Mapping, Use: \"urlPath\" or \"sha256-digest\".", + ) + cmd.Flags().StringVar( + &o.RegistryCredSelector, "registry-cred-selector", "", + "Label selector to identify an externally created Secret of type \"kubernetes.io/dockerconfigjson\". "+ + "It allows the image to be accessed in private image registries. "+ + "It can be used when you push your module to a registry with authenticated access. "+ + "For example, \"label1=value1,label2=value2\".", + ) + cmd.Flags().StringVarP( + &o.Credentials, "credentials", "c", "", + "Basic authentication credentials for the given registry in the user:password format", + ) + cmd.Flags().StringVar( + &o.DefaultCRPath, "default-cr", "", + "File containing the default custom resource of the module. If the module is a kubebuilder project, the default CR is automatically detected.", + ) + cmd.Flags().StringVarP( + &o.TemplateOutput, "output", "o", "template.yaml", + "File to write the module template if the module is uploaded to a registry.", + ) cmd.Flags().StringVar(&o.Channel, "channel", "regular", "Channel to use for the module template.") - cmd.Flags().StringVarP(&o.Token, "token", "t", "", "Authentication token for the given registry (alternative to basic authentication).") - cmd.Flags().BoolVarP(&o.Overwrite, "overwrite", "w", false, "overwrites the existing mod-path directory if it exists") - cmd.Flags().BoolVar(&o.Insecure, "insecure", false, "Use an insecure connection to access the registry.") - cmd.Flags().BoolVar(&o.Clean, "clean", false, "Remove the mod-path folder and all its contents at the end.") + cmd.Flags().StringVar(&o.Target, "target", "control-plane", "Target to use when determining where to install the module. Use 'control-plane' or 'remote'.") + cmd.Flags().StringVar( + &o.SchemaVersion, "descriptor-version", compdescv2.SchemaVersion, fmt.Sprintf( + "Schema version to use for the generated OCM descriptor. One of %s", + strings.Join(compdesc.DefaultSchemes.Names(), ","), + ), + ) + cmd.Flags().StringVarP( + &o.Token, "token", "t", "", + "Authentication token for the given registry (alternative to basic authentication).", + ) + cmd.Flags().BoolVar(&o.Insecure, "insecure", false, "Uses an insecure connection to access the registry.") + cmd.Flags().StringVar( + &o.SecurityScanConfig, "sec-scanners-config", "sec-scanners-config.yaml", "Path to the file holding "+ + "the security scan configuration.", + ) return cmd } -func (cmd *command) Run(args []string) error { +func (cmd *command) Run(ctx context.Context, args []string) error { + osFS := osfs.New() + + if cmd.opts.CI { + cmd.Factory.NonInteractive = true + } + if cmd.opts.Verbose { + cmd.Factory.UseLogger = true + } + + l := cli.NewLogger(cmd.opts.Verbose).Sugar() + undo := zap.RedirectStdLog(l.Desugar()) + defer undo() if !cmd.opts.NonInteractive { cli.AlphaWarn() } - l := cli.NewLogger(cmd.opts.Verbose).Sugar() + if err := cmd.opts.ValidateVersion(); err != nil { + return err + } if err := cmd.opts.ValidatePath(); err != nil { return err @@ -99,6 +164,10 @@ func (cmd *command) Run(args []string) error { return err } + if err := cmd.opts.ValidateTarget(); err != nil { + return err + } + nameMappingMode, err := module.ParseNameMapping(cmd.opts.NameMappingMode) if err != nil { return err @@ -108,21 +177,12 @@ func (cmd *command) Run(args []string) error { Name: cmd.opts.Name, Version: cmd.opts.Version, Source: cmd.opts.Path, - ArchivePath: cmd.opts.ModCache, - Overwrite: cmd.opts.Overwrite, RegistryURL: cmd.opts.RegistryURL, NameMappingMode: nameMappingMode, DefaultCRPath: cmd.opts.DefaultCRPath, + SchemaVersion: cmd.opts.SchemaVersion, } - cmd.NewStep("Setting up kustomize...") - if err := kustomize.Setup(cmd.CurrentStep, true); err != nil { - cmd.CurrentStep.Failure() - return err - } - cmd.CurrentStep.Successf("Kustomize ready") - - /* -- Inspect and build Module -- */ cmd.NewStep("Parse and build module...") // Create base resource defs with module root and its sub-layers @@ -132,79 +192,88 @@ func (cmd *command) Run(args []string) error { } cmd.CurrentStep.Successf("Module built") - /* -- VALIDATE DEFAULT CR -- */ - if err := cmd.validateDefaultCR(modDef, l); err != nil { + if err := cmd.validateDefaultCR(ctx, modDef, l); err != nil { return err } - /* -- CREATE ARCHIVE -- */ - fs := osfs.New() - - cmd.NewStep(fmt.Sprintf("Creating module archive at %q", cmd.opts.ModCache)) - archive, err := module.Build(fs, modDef) + cmd.NewStep("Creating module archive") + var archiveFS vfs.FileSystem + if cmd.opts.PersistentArchive { + archiveFS = osFS + l.Info("using host filesystem for archive") + } else { + archiveFS = memoryfs.New() + l.Info("using in-memory archive") + } + // this builds the archive in memory, Alternatively one can store it on disk or in temp folder + archive, err := module.Build(archiveFS, cmd.opts.ModuleArchivePath, modDef) if err != nil { cmd.CurrentStep.Failure() return err } - cmd.CurrentStep.Success() + cmd.CurrentStep.Successf("Module archive created") - /* -- Create Image -- */ - cmd.NewStep("Creating image...") + cmd.NewStep("Adding layers to archive...") - if err := module.AddResources(archive, modDef, l, fs); err != nil { + if err := module.AddResources(archive, modDef, l, osFS); err != nil { cmd.CurrentStep.Failure() return err } - cmd.CurrentStep.Successf("Image created") + cmd.CurrentStep.Success() + if cmd.opts.SecurityScanConfig != "" { + if _, err := osFS.Stat(cmd.opts.SecurityScanConfig); err == nil { + cmd.NewStep("Configuring security scanning...") + err = module.AddSecurityScanningMetadata(archive.GetDescriptor(), cmd.opts.SecurityScanConfig) + if err != nil { + cmd.CurrentStep.Failure() + return err + } + if err := archive.Update(); err != nil { + return fmt.Errorf("could not write security scanning configuration into archive: %w", err) + } + cmd.CurrentStep.Successf("Security scanning configured") + } else { + l.Warnf("Security scanning configuration was skipped: %s", err.Error()) + } + } /* -- PUSH & TEMPLATE -- */ if cmd.opts.RegistryURL != "" { cmd.NewStep(fmt.Sprintf("Pushing image to %q", cmd.opts.RegistryURL)) - r, err := cmd.validateInsecureRegistry(modDef.NameMappingMode) + remote, err := cmd.getRemote(modDef.NameMappingMode) if err != nil { cmd.CurrentStep.Failure() return err } - if err := module.Push(archive, r, l); err != nil { + componentVersionAccess, err := remote.Push(archive, cmd.opts.ArchiveVersionOverwrite) + if err != nil { cmd.CurrentStep.Failure() return err } - cmd.CurrentStep.Success() + cmd.CurrentStep.Successf("Module successfully pushed to %q", cmd.opts.RegistryURL) cmd.NewStep("Generating module template") - t, err := module.Template(archive, cmd.opts.Channel, modDef.DefaultCR, cmd.opts.RegistryCredSelector) + t, err := module.Template(componentVersionAccess, cmd.opts.Channel, cmd.opts.Target, modDef.DefaultCR, cmd.opts.RegistryCredSelector) if err != nil { cmd.CurrentStep.Failure() return err } - if err := vfs.WriteFile(fs, cmd.opts.TemplateOutput, t, os.ModePerm); err != nil { + if err := vfs.WriteFile(osFS, cmd.opts.TemplateOutput, t, os.ModePerm); err != nil { cmd.CurrentStep.Failure() return err } - cmd.CurrentStep.Success() - } - - /* -- CLEANUP -- */ - - if cmd.opts.Clean { - // TODO clean generated chart - cmd.NewStep(fmt.Sprintf("Cleaning up mod path %q", cmd.opts.ModCache)) - if err := os.RemoveAll(cmd.opts.ModCache); err != nil { - cmd.CurrentStep.Failure() - return err - } - cmd.CurrentStep.Success() + cmd.CurrentStep.Successf("Template successfully generated at %s", cmd.opts.TemplateOutput) } return nil } -func (cmd *command) validateDefaultCR(modDef *module.Definition, l *zap.SugaredLogger) error { +func (cmd *command) validateDefaultCR(ctx context.Context, modDef *module.Definition, l *zap.SugaredLogger) error { cmd.NewStep("Validating Default CR") crValidator, err := module.NewDefaultCRValidator(modDef.DefaultCR, modDef.Source) if err != nil { @@ -212,7 +281,7 @@ func (cmd *command) validateDefaultCR(modDef *module.Definition, l *zap.SugaredL return err } - if err := crValidator.Run(cmd.CurrentStep, cmd.opts.Verbose, l); err != nil { + if err := crValidator.Run(ctx, cmd.CurrentStep, cmd.opts.Verbose, l); err != nil { if errors.Is(err, module.ErrEmptyCR) { cmd.CurrentStep.Successf("Default CR validation skipped - no default CR") return nil @@ -223,7 +292,7 @@ func (cmd *command) validateDefaultCR(modDef *module.Definition, l *zap.SugaredL return nil } -func (cmd *command) validateInsecureRegistry(nameMapping module.NameMapping) (*module.Remote, error) { +func (cmd *command) getRemote(nameMapping module.NameMapping) (*module.Remote, error) { res := &module.Remote{ Registry: cmd.opts.RegistryURL, @@ -241,12 +310,11 @@ func (cmd *command) validateInsecureRegistry(nameMapping module.NameMapping) (*m if strings.HasPrefix(strings.ToLower(cmd.opts.RegistryURL), "http:") { res.Insecure = true - if !cmd.opts.Insecure && !cmd.opts.NonInteractive { + if !cmd.opts.Insecure { cmd.CurrentStep.LogWarn("CAUTION: Pushing the module artifact to the insecure registry") - if !cmd.CurrentStep.PromptYesNo("Do you really want to proceed? ") { - return nil, errors.New("Command stopped by user") + if !cmd.opts.NonInteractive && !cmd.CurrentStep.PromptYesNo("Do you really want to proceed? ") { + return nil, errors.New("command stopped by user") } - } } diff --git a/cmd/kyma/alpha/create/module/opts.go b/cmd/kyma/alpha/create/module/opts.go index 222c36ae7..c3912e1af 100644 --- a/cmd/kyma/alpha/create/module/opts.go +++ b/cmd/kyma/alpha/create/module/opts.go @@ -4,9 +4,11 @@ import ( "fmt" "os" "path/filepath" + "strings" "regexp" + "github.com/blang/semver/v4" "github.com/kyma-project/cli/internal/cli" "github.com/pkg/errors" ) @@ -15,22 +17,25 @@ import ( type Options struct { *cli.Options - Name string - NameMappingMode string - Version string - Path string - ModCache string - RegistryURL string - Credentials string - TemplateOutput string - DefaultCRPath string - Channel string - Token string - Insecure bool - ResourcePaths []string - Overwrite bool - Clean bool - RegistryCredSelector string + Name string + NameMappingMode string + Version string + Path string + ModuleArchivePath string + RegistryURL string + Credentials string + TemplateOutput string + DefaultCRPath string + Channel string + Target string + SchemaVersion string + Token string + Insecure bool + PersistentArchive bool + ResourcePaths []string + ArchiveVersionOverwrite bool + RegistryCredSelector string + SecurityScanConfig string } const ( @@ -47,6 +52,18 @@ func NewOptions(o *cli.Options) *Options { return &Options{Options: o} } +func (o *Options) ValidateVersion() error { + sv, err := semver.ParseTolerant(o.Version) + if err != nil { + return err + } + o.Version = sv.String() + if !strings.HasPrefix(o.Version, "v") { + o.Version = fmt.Sprintf("v%s", o.Version) + } + return nil +} + func (o *Options) ValidatePath() error { var err error if o.Path == "" { @@ -66,8 +83,10 @@ func (o *Options) ValidatePath() error { func (o *Options) ValidateChannel() error { if len(o.Channel) < ChannelMinLength || len(o.Channel) > ChannelMaxLength { - return fmt.Errorf("invalid channel length, length should between %d and %d, %w", - ChannelMinLength, ChannelMaxLength, ErrChannelValidation) + return fmt.Errorf( + "invalid channel length, length should between %d and %d, %w", + ChannelMinLength, ChannelMaxLength, ErrChannelValidation, + ) } matched, _ := regexp.MatchString(`^[a-z]+$`, o.Channel) if !matched { @@ -75,3 +94,16 @@ func (o *Options) ValidateChannel() error { } return nil } + +func (o *Options) ValidateTarget() error { + valid := []string{ + "control-plane", + "remote", + } + for i := range valid { + if o.Target == valid[i] { + return nil + } + } + return fmt.Errorf("target %s is invalid, allowed: %s", o.Target, valid) +} diff --git a/cmd/kyma/alpha/deploy/cmd.go b/cmd/kyma/alpha/deploy/cmd.go index 04d3d112a..354b70851 100644 --- a/cmd/kyma/alpha/deploy/cmd.go +++ b/cmd/kyma/alpha/deploy/cmd.go @@ -4,26 +4,23 @@ import ( "context" "fmt" "os" + "strings" "time" - "github.com/kyma-project/cli/internal/clusterinfo" + "errors" + + "github.com/kyma-project/cli/internal/cli" + "github.com/kyma-project/cli/internal/config" "github.com/kyma-project/cli/internal/coredns" "github.com/kyma-project/cli/internal/deploy" - "github.com/kyma-project/cli/internal/kustomize" + "github.com/kyma-project/cli/internal/nice" "github.com/kyma-project/cli/pkg/dashboard" - "github.com/kyma-project/cli/pkg/errs" - - "errors" - "github.com/spf13/cobra" "go.uber.org/zap" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/kyma-project/cli/internal/cli" - "github.com/kyma-project/cli/internal/kube" - "github.com/kyma-project/cli/internal/nice" + "k8s.io/apimachinery/pkg/runtime/schema" ) type command struct { @@ -32,6 +29,9 @@ type command struct { } const ( + lifecycleManagerKustomization = "https://github.com/kyma-project/lifecycle-manager/config/default" + modulesKustomization = "https://github.com/kyma-project/kyma/modules@" + config.DefaultKyma2Version + hostsTemplate = ` {{ .K3dRegistryIP}} {{ .K3dRegistryHost}} {{ .K3dRegistryIP}} {{ .K3dRegistryHost}}.localhost @@ -50,49 +50,77 @@ func NewCmd(o *Options) *cobra.Command { Use: "deploy", Short: "Deploys Kyma on a running Kubernetes cluster.", Long: "Use this command to deploy, upgrade, or adapt Kyma on a running Kubernetes cluster.", - RunE: func(_ *cobra.Command, _ []string) error { return cmd.RunWithTimeout() }, + RunE: func(cobraCmd *cobra.Command, _ []string) error { return cmd.RunWithTimeout(cobraCmd.Context()) }, Aliases: []string{"d"}, + Example: ` +- Deploy the latest version of the Lifecycle Manager for trying out Modules: "kyma deploy -k https://github.com/kyma-project/lifecycle-manager/config/default -with-wildcard-permissions" +- Deploy the main branch of Lifecycle Manager: "kyma deploy -k https://github.com/kyma-project/lifecycle-manager/config/default@main" +- Deploy a local version of Lifecycle Manager: "kyma deploy -k /path/to/repo/lifecycle-manager/config/default"`, } cobraCmd.Flags().StringArrayVarP( - &o.Kustomizations, "kustomization", "k", []string{}, - `Provide one or more kustomizations to deploy. Each occurrence of the flag accepts a URL with an optional reference (commit, branch, or release) in the format URL@ref or a local path to the directory of the kustomization file. - Defaults to deploying Lifecycle Manager and Module Manager from GitHub main branch. - Examples: - - Deploy a specific release of the Lifecycle Manager: "kyma deploy -k https://github.com/kyma-project/lifecycle-manager/config/default@1.2.3" - - Deploy a local Module Manager: "kyma deploy --kustomization /path/to/repo/module-manager/config/default" - - Deploy a branch of Lifecycle Manager with a custom URL: "kyma deploy -k https://gitlab.com/forked-from-github/lifecycle-manager/config/default@feature-branch-1" - - Deploy the main branch of Lifecycle Manager while using local sources of Module Manager: "kyma deploy -k /path/to/repo/module-manager/config/default -k https://github.com/kyma-project/lifecycle-manager/config/default@main"`, + &o.Kustomizations, "kustomization", "k", []string{lifecycleManagerKustomization}, + `Provides one or more kustomizations to deploy. +Each flag occurrence accepts a URL with an optional reference (commit, branch, or release) in URL@ref format or a local path to the directory of the kustomization file. +By default, Lifecycle Manager is deployed from the GitHub main branch.`, ) cobraCmd.Flags().StringArrayVarP( &o.Modules, "module", "m", []string{}, - `Provide one or more modules to activate after the deployment is finished. Example: "--module name@namespace" (namespace is optional).`, + `Provides one or more modules to activate after the deployment is finished. Example: "--module name@namespace" (namespace is optional).`, ) - cobraCmd.Flags().StringVarP(&o.ModulesFile, "modules-file", "f", "", `Path to file containing a list of modules.`) cobraCmd.Flags().StringVarP( &o.Channel, "channel", "c", "regular", `Select which channel to deploy from.`, ) cobraCmd.Flags().StringVarP( - &o.Namespace, "namespace", "n", "kyma-system", - "The Namespace to deploy the the Kyma custom resource in.", + &o.Namespace, "namespace", "n", cli.KymaNamespaceDefault, + "The Namespace to deploy the Kyma custom resource in.", ) - cobraCmd.Flags().StringVar(&o.KymaCR, "kyma-cr", "", `Provide a custom Kyma CR file for the deployment.`) + cobraCmd.Flags().StringVar(&o.KymaCR, "kyma-cr", "", `Provides a custom Kyma CR file for the deployment.`) // TODO remove this flag when module templates can be fetched from release. // Might be worth keeping this flag with another name to install extra templates?? cobraCmd.Flags().StringArrayVar( - &o.Templates, "template", []string{}, `Provide one or more module templates to deploy. - WARNING: This is a temporary flag for development and will be removed soon.`, + &o.Templates, "templates", []string{modulesKustomization}, `Provides one or more module templates to deploy. +WARNING: This is a temporary flag for development and will be removed soon.`, + ) + + cobraCmd.Flags().StringVar( + &o.CertManagerVersion, "cert-manager", "v1.11.0", + "Installs cert-manager from the specified static version. An empty string skips the installation.", + ) + cobraCmd.Flags().StringVar( + &o.LifecycleManager, "lifecycle-manager", "eu.gcr.io/kyma-project/lifecycle-manager:latest", + `Installs Lifecycle Manager with the specified image: +- Use "my-registry.org/lifecycle-manager:my-tag"" to use a custom version of Lifecycle Manager. +- Use "europe-docker.pkg.dev/kyma-project/prod/lifecycle-manager@sha256:cb74b29cfe80c639c9ee9..." to use a custom version of Lifecycle Manager with a digest. +- Specify a tag to override the default one. For example, when specifying "v20230220-7b8e9515", the "eu.gcr.io/kyma-project/lifecycle-manager:v20230220-7b8e9515" tag is used.`, ) cobraCmd.Flags().BoolVar( &o.DryRun, "dry-run", false, "Renders the Kubernetes manifests without actually applying them.", ) + + cobraCmd.Flags().BoolVar( + &o.WildcardPermissions, "wildcard-permissions", true, + `Creates a wildcard cluster-role to allow for easy local installation permissions of Lifecycle Manager. +Allows for Lifecycle Manager usage without worrying about modules requiring specific RBAC permissions. +WARNING: DO NOT USE ON PRODUCTIVE CLUSTERS!`, + ) + + cobraCmd.Flags().BoolVar( + &o.OpenDashboard, "open-dashboard", false, + `Opens the Busola Dashboard at startup. Only works when a graphical interface is available and when running in the interactive mode.`, + ) + cobraCmd.Flags().BoolVarP( + &o.Force, "force-conflicts", "f", false, + "Forces the patching of Kyma spec modules in case their managed field was edited by a source other than Kyma CLI.", + ) + cobraCmd.Flags().DurationVarP(&o.Timeout, "timeout", "t", 20*time.Minute, "Maximum time for the deployment.") return cobraCmd } -func (cmd *command) RunWithTimeout() error { +func (cmd *command) RunWithTimeout(ctx context.Context) error { if cmd.opts.CI { cmd.Factory.NonInteractive = true } @@ -104,155 +132,150 @@ func (cmd *command) RunWithTimeout() error { return err } - timeout := time.After(cmd.opts.Timeout) - errChan := make(chan error) - go func() { - errChan <- cmd.run() - }() - - for { - select { - case <-timeout: - msg := "Timeout reached while waiting for deployment to complete" - timeoutStep := cmd.NewStep(msg) - timeoutStep.Failure() - return errors.New(msg) - case err := <-errChan: - return err - } + ctx, cancel := context.WithTimeout(ctx, cmd.opts.Timeout) + defer cancel() + + err := cmd.run(ctx) + + // yes, I tried errors.As and errors.Is, and both did not work or threw vet issues... + if err != nil && strings.Contains(err.Error(), context.DeadlineExceeded.Error()) { + msg := "Timeout reached while waiting for deployment to complete" + timeoutStep := cmd.NewStep(msg) + timeoutStep.Failure() + return fmt.Errorf("%s: %w", msg, err) } + + return err } -func (cmd *command) run() error { +func (cmd *command) run(ctx context.Context) error { start := time.Now() - var err error - if cmd.K8s, err = kube.NewFromConfigWithTimeout("", cmd.KubeconfigPath, cmd.opts.Timeout); err != nil { - return fmt.Errorf("failed to initialize the Kubernetes client from given kubeconfig: %w", err) - } - - if err := cmd.deploy(start); err != nil { + if err := cmd.deploy(ctx, start); err != nil { return err } // do not starrt the dashboard if not interactive - if cmd.opts.CI || cmd.opts.NonInteractive { + if cmd.opts.CI || cmd.opts.NonInteractive || !cmd.opts.OpenDashboard { return nil } - return cmd.wizard() + return cmd.wizard(ctx) } -func (cmd *command) deploy(start time.Time) error { - - cmd.NewStep("Setting up kustomize...") - if err := kustomize.Setup(cmd.CurrentStep, true); err != nil { - cmd.CurrentStep.Failure() - return err - } - cmd.CurrentStep.Successf("Kustomize ready") - +func (cmd *command) deploy(ctx context.Context, start time.Time) error { if cmd.opts.DryRun { - return cmd.dryRun() + return cmd.dryRun(ctx) } l := cli.NewLogger(cmd.opts.Verbose).Sugar() summary := &nice.Summary{ NonInteractive: cmd.NonInteractive, - Version: "", + Version: "alpha deployment with lifecycle-manager", } undo := zap.RedirectStdLog(l.Desugar()) defer undo() + clusterAccess := cmd.NewStep("Ensuring Cluster Access") + info, err := cmd.EnsureClusterAccess(ctx, cmd.opts.Timeout) + if err != nil { + clusterAccess.Failuref("Could not ensure cluster Access") + return err + } + clusterAccess.Successf("Successfully connected to cluster") + if !cmd.opts.Verbose { stderr := os.Stderr os.Stderr = nil defer func() { os.Stderr = stderr }() } - clusterInfo, err := clusterinfo.Discover(context.Background(), cmd.K8s.Static()) - if err != nil { - return err + if cmd.opts.CertManagerVersion != "" { + certManagerStep := cmd.NewStep("Deploying cert-manager.io") + certManagerStep.Start() + if err := deploy.CertManager(ctx, cmd.K8s, cmd.opts.CertManagerVersion, cmd.opts.Force, false); err != nil { + certManagerStep.LogWarn(err.Error()) + certManagerStep.Failuref("Failed to deploy cert-manager.io.") + } + err := cmd.K8s.WaitDeploymentStatus( + "cert-manager", "cert-manager-webhook", appsv1.DeploymentAvailable, corev1.ConditionTrue, + ) + if err != nil { + certManagerStep.LogWarn(err.Error()) + certManagerStep.Failuref("cert-manager.io webhook failed to start.") + } + certManagerStep.Successf( + "Deployed cert-manager.io in version %s", + cmd.opts.CertManagerVersion, + ) } - deployStep := cmd.NewStep("Deploying Kyma") + deployStep := cmd.NewStep("Deploying Kustomizations") deployStep.Start() - - hasKyma, err := deploy.Bootstrap(cmd.opts.Kustomizations, cmd.K8s, false) + hasKyma, err := deploy.Bootstrap( + ctx, cmd.opts.Kustomizations, cmd.K8s, cmd.opts.Filters, cmd.opts.WildcardPermissions, cmd.opts.Force, false, + ) if err != nil { - deployStep.Failuref("Failed to deploy Kyma.") + deployStep.Failuref("Failed to deploy Kustomizations %s: %s", cmd.opts.Kustomizations, err.Error()) return err } + deployStep.Successf("Kustomizations deployed: %s", cmd.opts.Kustomizations) - // wait for operators to be ready - if err := cmd.waitForOperators(); err != nil { - return err - } - - if _, err := coredns.Patch(l.Desugar(), cmd.K8s.Static(), false, clusterInfo, hostsTemplate); err != nil { + coreDNS := cmd.NewStep("Patching CoreDNS") + coreDNS.Start() + if _, err := coredns.Patch(l.Desugar(), cmd.K8s.Static(), false, info, hostsTemplate); err != nil { + coreDNS.Failuref("error patching CoreDNS: %s", err) return err } + coreDNS.Successf("CoreDNS patched successfully") // deploy modules and kyma CR if hasKyma { - // TODO change to fetch templates from release artifacts - modStep := cmd.NewStep("Modules deployed") - for _, t := range cmd.opts.Templates { - b, err := os.ReadFile(t) - if err != nil { - modStep.Failuref("Failed to deploy modules") - return err - } - if err := cmd.K8s.Apply(b); err != nil { - modStep.Failuref("Failed to deploy modules") + if len(cmd.opts.Templates) > 0 { + modStep := cmd.NewStep("Deploying Module Templates") + if err := deploy.ModuleTemplates(ctx, cmd.K8s, cmd.opts.Templates, cmd.opts.Force, false); err != nil { + modStep.Failuref("Failed to deploy module templates") return err } + modStep.Successf("Module Templates deployed: %s", cmd.opts.Templates) } - modStep.Success() - - kymaStep := cmd.NewStep("Kyma CR deployed") + kymaStep := cmd.NewStep("Deploying Kyma CR") if err := deploy.Kyma( - cmd.K8s, - cmd.opts.Namespace, - cmd.opts.Channel, cmd.opts.KymaCR, false, + ctx, cmd.K8s, cmd.opts.Namespace, cmd.opts.Channel, cmd.opts.KymaCR, cmd.opts.Force, false, ); err != nil { - kymaStep.Failuref("Failed to deploy Kyma CR") + kymaStep.Failuref("Failed to deploy Kyma CR: %s", err.Error()) return err } - kymaStep.Success() - - } else { - deployStep.LogInfo("There was no Kyma CRD present in the prerequisites, no modules will be installed.") + kymaStep.Successf("Kyma CR deployed and Ready!") } - deployStep.Successf("Kyma deployed successfully!") - deployTime := time.Since(start) return summary.Print(deployTime) } -func (cmd *command) dryRun() error { - hasKyma, err := deploy.Bootstrap(cmd.opts.Kustomizations, cmd.K8s, true) +func (cmd *command) dryRun(ctx context.Context) error { + if cmd.opts.CertManagerVersion != "" { + if err := deploy.CertManager(ctx, cmd.K8s, cmd.opts.CertManagerVersion, cmd.opts.Force, true); err != nil { + return err + } + } + + hasKyma, err := deploy.Bootstrap( + ctx, cmd.opts.Kustomizations, cmd.K8s, cmd.opts.Filters, cmd.opts.WildcardPermissions, cmd.opts.Force, true, + ) if err != nil { return err } if hasKyma { - // TODO change to fetch templates from release artifacts - for _, t := range cmd.opts.Templates { - b, err := os.ReadFile(t) - if err != nil { - return err - } - fmt.Printf("%s\n---\n", string(b)) + if err := deploy.ModuleTemplates(ctx, cmd.K8s, cmd.opts.Templates, cmd.opts.Force, true); err != nil { + return err } if err := deploy.Kyma( - cmd.K8s, - cmd.opts.Namespace, - cmd.opts.Channel, cmd.opts.KymaCR, true, + ctx, cmd.K8s, cmd.opts.Namespace, cmd.opts.Channel, cmd.opts.KymaCR, cmd.opts.Force, true, ); err != nil { return err } @@ -260,52 +283,24 @@ func (cmd *command) dryRun() error { return nil } -func (cmd *command) waitForOperators() error { - errChan := make(chan error) - defer close(errChan) - - go func() { - err := cmd.K8s.WaitDeploymentStatus( - "kcp-system", "lifecycle-manager-controller-manager", appsv1.DeploymentAvailable, corev1.ConditionTrue, - ) - lifecycleStep := cmd.NewStep("Lifecycle Manager deployed") - if err != nil { - lifecycleStep.Failuref("Failed to deploy Lifecycle Manager") - } else { - lifecycleStep.Success() - } - errChan <- err - }() - - go func() { - err := cmd.K8s.WaitDeploymentStatus( - "kcp-system", "module-manager-controller-manager", appsv1.DeploymentAvailable, corev1.ConditionTrue, - ) - moduleStep := cmd.NewStep("Module Manager deployed") - if err != nil { - moduleStep.Failuref("Failed to deploy Module Manager") - } else { - moduleStep.Success() - } - errChan <- err - }() - - // Merge errors from all async calls (2) - return errs.MergeErrors(<-errChan, <-errChan) -} - -func (cmd *command) wizard() error { +func (cmd *command) wizard(ctx context.Context) error { // get all infos for the dashboard URL - ctx, cancel := context.WithTimeout(context.Background(), cmd.opts.Timeout) + ctx, cancel := context.WithTimeout(ctx, cmd.opts.Timeout) defer cancel() - kymas, err := cmd.K8s.Dynamic().Resource(deploy.KymaGVR).List(ctx, v1.ListOptions{}) + kymas, err := cmd.K8s.Dynamic().Resource( + schema.GroupVersionResource{ + Group: "operator.kyma-project.io", + Version: "v1beta1", + Resource: "kymas", + }, + ).List(ctx, v1.ListOptions{}) if err != nil { return err } if len(kymas.Items) < 1 { - return errors.New("No Kyma CR found in cluster") + return errors.New("no Kyma CR found in cluster") } cluster := cmd.K8s.KubeConfig().CurrentContext @@ -319,7 +314,7 @@ func (cmd *command) wizard() error { return err } // make sure the dahboard container always stops at the end and the cursor restored - cmd.Finalizers.Add(dash.StopFunc(context.Background(), func(i ...interface{}) { fmt.Print(i...) })) + cmd.Finalizers.Add(dash.StopFunc(ctx, func(i ...interface{}) { fmt.Print(i...) })) if err := dash.Open(fmt.Sprintf("/cluster/%s/namespaces/%s/kymas/details/%s", cluster, ns, name)); err != nil { cmd.CurrentStep.Failure() @@ -327,5 +322,5 @@ func (cmd *command) wizard() error { } cmd.CurrentStep.Successf("Dashboard started. To exit press Ctrl+C") - return dash.Watch(context.Background()) + return dash.Watch(ctx) } diff --git a/cmd/kyma/alpha/deploy/opts.go b/cmd/kyma/alpha/deploy/opts.go index bb43f5e4c..3518a70b5 100644 --- a/cmd/kyma/alpha/deploy/opts.go +++ b/cmd/kyma/alpha/deploy/opts.go @@ -1,24 +1,32 @@ package deploy import ( + "fmt" "time" "github.com/kyma-project/cli/internal/cli" + "github.com/kyma-project/cli/internal/kustomize" "github.com/pkg/errors" + "sigs.k8s.io/kustomize/kyaml/kio" ) // Options defines available options for the command type Options struct { *cli.Options - DryRun bool - ModulesFile string - Namespace string - Channel string - KymaCR string - Modules []string - Kustomizations []string - Templates []string - Timeout time.Duration + LifecycleManager string + WildcardPermissions bool + DryRun bool + OpenDashboard bool + Force bool + CertManagerVersion string + Namespace string + Channel string + KymaCR string + Modules []string + Kustomizations []string + Templates []string + Timeout time.Duration + Filters []kio.Filter } // NewOptions creates options with default values @@ -32,6 +40,10 @@ func (o *Options) validateFlags() error { return err } + if err := o.validateFilters(); err != nil { + return err + } + return nil } @@ -41,3 +53,20 @@ func (o *Options) validateTimeout() error { } return nil } + +// validateFilters sets up all filters that will be used by kustomize when running the command +func (o *Options) validateFilters() error { + var filters []kio.Filter + modifier, err := kustomize.LifecycleManagerImageModifier( + o.LifecycleManager, + func(image string) { + o.NewStep(fmt.Sprintf("Used Lifecycle-Manager: %s", image)).Success() + }, + ) + if err != nil { + return err + } + filters = append(filters, modifier) + o.Filters = filters + return nil +} diff --git a/cmd/kyma/alpha/disable/disable.go b/cmd/kyma/alpha/disable/disable.go new file mode 100644 index 000000000..b5f2700a4 --- /dev/null +++ b/cmd/kyma/alpha/disable/disable.go @@ -0,0 +1,20 @@ +package disable + +import ( + "github.com/kyma-project/cli/cmd/kyma/alpha/disable/module" + "github.com/kyma-project/cli/internal/cli" + "github.com/spf13/cobra" +) + +func NewCmd(o *cli.Options) *cobra.Command { + cmd := &cobra.Command{ + Use: "disable", + Short: "Disables a resource in the Kyma cluster.", + Long: `Use this command to disable a resource in the Kyma cluster. +`, + } + + cmd.AddCommand(module.NewCmd(module.NewOptions(o))) + + return cmd +} diff --git a/cmd/kyma/alpha/disable/module/module.go b/cmd/kyma/alpha/disable/module/module.go new file mode 100644 index 000000000..0c5eee823 --- /dev/null +++ b/cmd/kyma/alpha/disable/module/module.go @@ -0,0 +1,167 @@ +package module + +import ( + "context" + "fmt" + "os" + "time" + + "github.com/kyma-project/cli/internal/cli/alpha/module" + "github.com/kyma-project/lifecycle-manager/api/v1beta1" + "go.uber.org/zap" + "k8s.io/apimachinery/pkg/types" + + "github.com/kyma-project/cli/internal/cli" + "github.com/pkg/errors" + "github.com/spf13/cobra" +) + +type command struct { + cli.Command + opts *Options +} + +func NewCmd(o *Options) *cobra.Command { + c := command{ + Command: cli.Command{Options: o.Options}, + opts: o, + } + + cmd := &cobra.Command{ + Use: "module [name] [flags]", + Short: "Disables a module in the cluster or in the given Kyma resource.", + Long: `Use this command to disable active Kyma modules in the cluster. + +### Detailed description + +For more information on Kyma modules, see the 'create module' command. + +This command disables an active module in the cluster. +`, + + Example: ` +Disable "my-module" from the "alpha" channel in "default-kyma" in "kyma-system" Namespace + kyma alpha disable module my-module -c alpha -n kyma-system -k default-kyma +`, + RunE: func(cmd *cobra.Command, args []string) error { return c.Run(cmd.Context(), args) }, + Aliases: []string{"mod", "mods", "modules"}, + } + + cmd.Flags().DurationVarP( + &o.Timeout, "timeout", "t", 1*time.Minute, "Maximum time for the operation to disable a module.", + ) + cmd.Flags().StringVarP( + &o.Channel, "channel", "c", "", + "Module's channel to use.", + ) + cmd.Flags().StringVarP( + &o.Namespace, "namespace", "n", cli.KymaNamespaceDefault, + "Kyma Namespace to use. If empty, the default 'kyma-system' Namespace is used.", + ) + cmd.Flags().StringVarP( + &o.KymaName, "kyma-name", "k", cli.KymaNameDefault, + "Kyma resource to use. If empty, 'default-kyma' is used.", + ) + cmd.Flags().BoolVarP( + &o.Force, "force-conflicts", "f", false, + "Forces the patching of Kyma spec modules in case their managed field was edited by a source other than Kyma CLI.", + ) + cmd.Flags().BoolVarP( + &o.Wait, "wait", "w", false, + "Wait until the given Kyma resource is ready.", + ) + + return cmd +} + +func (cmd *command) Run(ctx context.Context, args []string) error { + if cmd.opts.CI { + cmd.Factory.NonInteractive = true + } + if cmd.opts.Verbose { + cmd.Factory.UseLogger = true + } + + l := cli.NewLogger(cmd.opts.Verbose).Sugar() + undo := zap.RedirectStdLog(l.Desugar()) + defer undo() + + if !cmd.opts.Verbose { + stderr := os.Stderr + os.Stderr = nil + defer func() { os.Stderr = stderr }() + } + + if !cmd.opts.NonInteractive { + cli.AlphaWarn() + } + + if len(args) != 1 { + return errors.New("you must pass one Kyma module name to disable") + } + moduleName := args[0] + + if err := cmd.opts.validateFlags(); err != nil { + return err + } + + ctx, cancel := context.WithTimeout(ctx, cmd.opts.Timeout) + defer cancel() + + return cmd.run(ctx, l, moduleName) +} + +func (cmd *command) run(ctx context.Context, l *zap.SugaredLogger, moduleName string) error { + clusterAccess := cmd.NewStep("Ensuring Cluster Access") + if _, err := cmd.EnsureClusterAccess(ctx, cmd.opts.Timeout); err != nil { + clusterAccess.Failuref("Could not ensure cluster Access") + return err + } + clusterAccess.Successf("Successfully connected to cluster") + + kyma := types.NamespacedName{Name: cmd.opts.KymaName, Namespace: cmd.opts.Namespace} + moduleInteractor := module.NewInteractor(l, cmd.K8s, kyma, cmd.opts.Timeout, cmd.opts.Force) + modules, err := moduleInteractor.Get(ctx) + if err != nil { + return fmt.Errorf("failed to get modules: %w", err) + } + desiredModules, err := disableModule(modules, moduleName, cmd.opts.Channel) + if err != nil { + return err + } + + patchStep := cmd.NewStep("Patching modules for Kyma") + if err = moduleInteractor.Update(ctx, desiredModules); err != nil { + patchStep.Failuref("Could not apply modules for Kyma") + return err + } + patchStep.Successf("Modules patched!") + + if cmd.opts.Wait { + waitStep := cmd.NewStep("Waiting for Kyma to become Ready") + if err = moduleInteractor.WaitUntilReady( + ctx, + ); err != nil { + waitStep.Failuref("Kyma did not get Ready") + return err + } + waitStep.Successf("Kyma is Ready") + } + + return nil +} + +func disableModule(modules []v1beta1.Module, name, channel string) ([]v1beta1.Module, error) { + for i, mod := range modules { + if mod.Name != name { + continue + } + if channel != "" { + if mod.Channel != channel { + continue + } + } + return append(modules[:i], modules[i+1:]...), nil + } + return modules, fmt.Errorf("could not disable module as it was not found: %s in channel %s", name, channel) +} diff --git a/cmd/kyma/alpha/disable/module/opts.go b/cmd/kyma/alpha/disable/module/opts.go new file mode 100644 index 000000000..e0538f7a6 --- /dev/null +++ b/cmd/kyma/alpha/disable/module/opts.go @@ -0,0 +1,38 @@ +package module + +import ( + "time" + + "github.com/kyma-project/cli/internal/cli" + "github.com/pkg/errors" +) + +type Options struct { + *cli.Options + + Timeout time.Duration + Channel string + Namespace string + KymaName string + Force bool + Wait bool +} + +func NewOptions(o *cli.Options) *Options { + return &Options{Options: o} +} + +func (o *Options) validateFlags() error { + if err := o.validateTimeout(); err != nil { + return err + } + + return nil +} + +func (o *Options) validateTimeout() error { + if o.Timeout <= 0 { + return errors.New("timeout must be a positive duration") + } + return nil +} diff --git a/cmd/kyma/alpha/enable/enable.go b/cmd/kyma/alpha/enable/enable.go new file mode 100644 index 000000000..f70ecf153 --- /dev/null +++ b/cmd/kyma/alpha/enable/enable.go @@ -0,0 +1,20 @@ +package enable + +import ( + "github.com/kyma-project/cli/cmd/kyma/alpha/enable/module" + "github.com/kyma-project/cli/internal/cli" + "github.com/spf13/cobra" +) + +func NewCmd(o *cli.Options) *cobra.Command { + cmd := &cobra.Command{ + Use: "enable", + Short: "Enables a resource in the Kyma cluster.", + Long: `Use this command to enable a resource in the Kyma cluster. +`, + } + + cmd.AddCommand(module.NewCmd(module.NewOptions(o))) + + return cmd +} diff --git a/cmd/kyma/alpha/enable/module/module.go b/cmd/kyma/alpha/enable/module/module.go new file mode 100644 index 000000000..8af5940cb --- /dev/null +++ b/cmd/kyma/alpha/enable/module/module.go @@ -0,0 +1,167 @@ +package module + +import ( + "context" + "fmt" + "os" + "time" + + "github.com/kyma-project/cli/internal/cli/alpha/module" + "github.com/kyma-project/lifecycle-manager/api/v1beta1" + "go.uber.org/zap" + "k8s.io/apimachinery/pkg/types" + + "github.com/kyma-project/cli/internal/cli" + "github.com/pkg/errors" + "github.com/spf13/cobra" +) + +type command struct { + cli.Command + opts *Options +} + +func NewCmd(o *Options) *cobra.Command { + c := command{ + Command: cli.Command{Options: o.Options}, + opts: o, + } + + cmd := &cobra.Command{ + Use: "module [name] [flags]", + Short: "Enables a module in the cluster or in the given Kyma resource.", + Long: `Use this command to enable Kyma modules available in the cluster. + +### Detailed description + +For more information on Kyma modules, see the 'create module' command. + +This command enables an available module in the cluster. +A module is available when it is released with a ModuleTemplate. The ModuleTemplate is used for instantiating the module with proper default configuration. +`, + + Example: ` +Enable "my-module" from "alpha" channel in "default-kyma" in "kyma-system" Namespace + kyma alpha enable module my-module -c alpha -n kyma-system -k default-kyma +`, + RunE: func(cmd *cobra.Command, args []string) error { return c.Run(cmd.Context(), args) }, + Aliases: []string{"mod", "mods", "modules"}, + } + + cmd.Flags().DurationVarP( + &o.Timeout, "timeout", "t", 1*time.Minute, "Maximum time for the operation to enable a module.", + ) + cmd.Flags().StringVarP( + &o.Channel, "channel", "c", "", + "Module's channel to enable.", + ) + cmd.Flags().StringVarP( + &o.Namespace, "namespace", "n", cli.KymaNamespaceDefault, + "Kyma Namespace to use. If empty, the default 'kyma-system' Namespace is used.", + ) + cmd.Flags().StringVarP( + &o.KymaName, "kyma-name", "k", cli.KymaNameDefault, + "Kyma resource to use. If empty, 'default-kyma' is used.", + ) + cmd.Flags().BoolVarP( + &o.Force, "force-conflicts", "f", false, + "Forces the patching of Kyma spec modules in case their managed field was edited by a source other than Kyma CLI.", + ) + cmd.Flags().BoolVarP( + &o.Wait, "wait", "w", false, + "Wait until the given Kyma resource is ready.", + ) + + return cmd +} + +func (cmd *command) Run(ctx context.Context, args []string) error { + if cmd.opts.CI { + cmd.Factory.NonInteractive = true + } + if cmd.opts.Verbose { + cmd.Factory.UseLogger = true + } + + l := cli.NewLogger(cmd.opts.Verbose).Sugar() + undo := zap.RedirectStdLog(l.Desugar()) + defer undo() + + if !cmd.opts.Verbose { + stderr := os.Stderr + os.Stderr = nil + defer func() { os.Stderr = stderr }() + } + + if !cmd.opts.NonInteractive { + cli.AlphaWarn() + } + + if len(args) != 1 { + return errors.New("you must pass one Kyma module name to enable it") + } + moduleName := args[0] + + if err := cmd.opts.validateFlags(); err != nil { + return err + } + + ctx, cancel := context.WithTimeout(ctx, cmd.opts.Timeout) + defer cancel() + + return cmd.run(ctx, l, moduleName) +} + +func (cmd *command) run(ctx context.Context, l *zap.SugaredLogger, moduleName string) error { + clusterAccess := cmd.NewStep("Ensuring Cluster Access") + if _, err := cmd.EnsureClusterAccess(ctx, cmd.opts.Timeout); err != nil { + clusterAccess.Failuref("Could not ensure cluster Access") + return err + } + clusterAccess.Successf("Successfully connected to cluster") + + kyma := types.NamespacedName{Name: cmd.opts.KymaName, Namespace: cmd.opts.Namespace} + moduleInteractor := module.NewInteractor(l, cmd.K8s, kyma, cmd.opts.Timeout, cmd.opts.Force) + modules, err := moduleInteractor.Get(ctx) + if err != nil { + return fmt.Errorf("failed to get modules: %w", err) + } + + desiredModules := enableModule(modules, moduleName, cmd.opts.Channel) + + patchStep := cmd.NewStep("Patching modules for Kyma") + if err = moduleInteractor.Update(ctx, desiredModules); err != nil { + patchStep.Failuref("Could not apply modules for Kyma") + return err + } + patchStep.Successf("Modules patched!") + + if cmd.opts.Wait { + waitStep := cmd.NewStep("Waiting for Kyma to become Ready") + if err = moduleInteractor.WaitUntilReady(ctx); err != nil { + waitStep.Failuref("Kyma did not get Ready") + return err + } + waitStep.Successf("Kyma is Ready") + } + + return nil +} + +func enableModule(modules []v1beta1.Module, name, channel string) []v1beta1.Module { + for _, mod := range modules { + if mod.Name == name { + mod.Channel = channel + return modules + } + } + + newModule := v1beta1.Module{Name: name} + if channel != "" { + newModule.Channel = channel + } + + modules = append(modules, newModule) + + return modules +} diff --git a/cmd/kyma/alpha/enable/module/opts.go b/cmd/kyma/alpha/enable/module/opts.go new file mode 100644 index 000000000..e82166e38 --- /dev/null +++ b/cmd/kyma/alpha/enable/module/opts.go @@ -0,0 +1,52 @@ +package module + +import ( + "time" + + "github.com/kyma-project/cli/internal/cli" + "github.com/pkg/errors" +) + +type Options struct { + *cli.Options + + Timeout time.Duration + Channel string + Namespace string + KymaName string + Force bool + Wait bool +} + +func NewOptions(o *cli.Options) *Options { + return &Options{Options: o} +} + +func (o *Options) validateFlags() error { + if err := o.validateTimeout(); err != nil { + return err + } + if err := o.validateChannel(); err != nil { + return err + } + + return nil +} + +func (o *Options) validateTimeout() error { + if o.Timeout <= 0 { + return errors.New("timeout must be a positive duration") + } + return nil +} + +func (o *Options) validateChannel() error { + if o.Channel == "" { + return nil + } + + if len(o.Channel) < 3 { + return errors.New("if provided, channel must be at least 3 chars long") + } + return nil +} diff --git a/cmd/kyma/alpha/list/module/module.go b/cmd/kyma/alpha/list/module/module.go index 677210c5d..52173f40b 100644 --- a/cmd/kyma/alpha/list/module/module.go +++ b/cmd/kyma/alpha/list/module/module.go @@ -14,7 +14,6 @@ import ( "github.com/kyma-project/cli/internal/cli" "github.com/kyma-project/cli/internal/clusterinfo" "github.com/kyma-project/cli/internal/kube" - "github.com/pkg/errors" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -33,13 +32,13 @@ var moduleTemplates string var moduleTemplateResource = schema.GroupVersionResource{ Group: "operator.kyma-project.io", - Version: "v1alpha1", + Version: "v1beta1", Resource: "moduletemplates", } var kymaResource = schema.GroupVersionResource{ Group: "operator.kyma-project.io", - Version: "v1alpha1", + Version: "v1beta1", Resource: "kymas", } @@ -76,15 +75,15 @@ the ModuleTemplates will also have a Field called **State** which will reflect t Finally, you can restrict and select a custom Namespace for the command. `, - Example: `Examples: + Example: ` List all modules kyma alpha list module List all modules in the "regular" channel kyma alpha list module --channel regular List all modules for the kyma "some-kyma" in the namespace "custom" in the "alpha" channel - kyma alpha list module some-kyma -c alpha -n "custom" + kyma alpha list module -k some-kyma -c alpha -n custom List all modules for the kyma "some-kyma" in the "alpha" channel - kyma alpha list module some-kyma -c alpha + kyma alpha list module -k some-kyma -c alpha `, RunE: func(cmd *cobra.Command, args []string) error { return c.Run(cmd.Context(), args) }, Aliases: []string{"mod", "mods", "modules"}, @@ -95,7 +94,11 @@ List all modules for the kyma "some-kyma" in the "alpha" channel &o.Timeout, "timeout", "t", 1*time.Minute, "Maximum time for the list operation to retrieve ModuleTemplates.", ) cmd.Flags().StringVarP( - &o.Namespace, "namespace", "n", "kyma-system", + &o.KymaName, "kyma-name", "k", "", + "Kyma resource to use.", + ) + cmd.Flags().StringVarP( + &o.Namespace, "namespace", "n", cli.KymaNamespaceDefault, "The Namespace to list the modules in.", ) cmd.Flags().BoolVarP( @@ -104,7 +107,7 @@ List all modules for the kyma "some-kyma" in the "alpha" channel ) cmd.Flags().BoolVar( &o.NoHeaders, "no-headers", false, - " When using the default output format, don't print headers (default print headers)", + "When using the default output format, don't print headers. (default print headers)", ) cmd.Flags().StringVarP( @@ -120,14 +123,6 @@ func (cmd *command) Run(ctx context.Context, args []string) error { cli.AlphaWarn() } - kymaName := "" - if len(args) > 1 { - return errors.New("you can only pass one Kyma resource to list active modules for") - } - if len(args) == 1 { - kymaName = args[0] - } - if err := cmd.opts.validateFlags(); err != nil { return err } @@ -135,10 +130,10 @@ func (cmd *command) Run(ctx context.Context, args []string) error { ctx, cancel := context.WithTimeout(ctx, cmd.opts.Timeout) defer cancel() - return cmd.run(ctx, kymaName) + return cmd.run(ctx) } -func (cmd *command) run(ctx context.Context, kymaName string) error { +func (cmd *command) run(ctx context.Context) error { start := time.Now() if cmd.K8s == nil { @@ -161,12 +156,12 @@ func (cmd *command) run(ctx context.Context, kymaName string) error { return err } - if kymaName != "" { + if cmd.opts.KymaName != "" { kyma, err := cmd.K8s.Dynamic().Resource(kymaResource).Namespace(cmd.opts.Namespace).Get( - ctx, kymaName, metav1.GetOptions{}, + ctx, cmd.opts.KymaName, metav1.GetOptions{}, ) if err != nil { - return fmt.Errorf("could not get kyma %s/%s: %w", cmd.opts.Namespace, kymaName, err) + return fmt.Errorf("could not get kyma %s/%s: %w", cmd.opts.Namespace, cmd.opts.KymaName, err) } if err := cmd.printKymaActiveTemplates(ctx, kyma); err != nil { return err diff --git a/cmd/kyma/alpha/list/module/module_test.go b/cmd/kyma/alpha/list/module/module_test.go index c521e78ae..e5300f918 100644 --- a/cmd/kyma/alpha/list/module/module_test.go +++ b/cmd/kyma/alpha/list/module/module_test.go @@ -168,7 +168,7 @@ manifest-1 kyma.project.io/module/loadtest stable 0.0.4 kcp-system/manifes os.Stdout = w var args []string if test.useKyma { - args = append(args, kyma.GetName()) + cmd.opts.KymaName = kyma.GetName() } err := cmd.Run(context.Background(), args) diff --git a/cmd/kyma/alpha/list/module/opts.go b/cmd/kyma/alpha/list/module/opts.go index a4c41c096..396d83a41 100644 --- a/cmd/kyma/alpha/list/module/opts.go +++ b/cmd/kyma/alpha/list/module/opts.go @@ -15,6 +15,7 @@ import ( type Options struct { *cli.Options + KymaName string Channel string Timeout time.Duration Namespace string diff --git a/cmd/kyma/alpha/list/module/testdata/kyma_sample.yaml b/cmd/kyma/alpha/list/module/testdata/kyma_sample.yaml index 77fbb7d0b..ba44f5c4f 100644 --- a/cmd/kyma/alpha/list/module/testdata/kyma_sample.yaml +++ b/cmd/kyma/alpha/list/module/testdata/kyma_sample.yaml @@ -1,4 +1,4 @@ -apiVersion: operator.kyma-project.io/v1alpha1 +apiVersion: operator.kyma-project.io/v1beta1 kind: Kyma metadata: annotations: @@ -43,13 +43,13 @@ status: state: Ready channel: stable manifest: - apiVersion: operator.kyma-project.io/v1alpha1 + apiVersion: operator.kyma-project.io/v1beta1 kind: Manifest metadata: generation: 1 name: kyma--50-9-manifest-1 template: - apiVersion: operator.kyma-project.io/v1alpha1 + apiVersion: operator.kyma-project.io/v1beta1 kind: ModuleTemplate metadata: generation: 1 diff --git a/cmd/kyma/alpha/list/module/testdata/template_sample.yaml b/cmd/kyma/alpha/list/module/testdata/template_sample.yaml index d474b9bce..a4e0de1ee 100644 --- a/cmd/kyma/alpha/list/module/testdata/template_sample.yaml +++ b/cmd/kyma/alpha/list/module/testdata/template_sample.yaml @@ -1,4 +1,4 @@ -apiVersion: operator.kyma-project.io/v1alpha1 +apiVersion: operator.kyma-project.io/v1beta1 kind: ModuleTemplate metadata: annotations: diff --git a/cmd/kyma/alpha/sign/module/module.go b/cmd/kyma/alpha/sign/module/module.go index 82b4652d7..fb17e00be 100644 --- a/cmd/kyma/alpha/sign/module/module.go +++ b/cmd/kyma/alpha/sign/module/module.go @@ -1,12 +1,8 @@ package module import ( - "fmt" - - "github.com/gardener/component-spec/bindings-go/ctf" "github.com/kyma-project/cli/internal/cli" "github.com/kyma-project/cli/pkg/module" - "github.com/mandelsoft/vfs/pkg/osfs" "github.com/spf13/cobra" ) @@ -24,7 +20,7 @@ func NewCmd(o *Options) *cobra.Command { } cmd := &cobra.Command{ - Use: "module MODULE_NAME MODULE_VERSION [flags]", + Use: "module --name MODULE_NAME --version MODULE_VERSION --registry MODULE_REGISTRY [flags]", Short: "Signs all module resources from an unsigned component descriptor that's hosted in a remote OCI registry", Long: `Use this command to sign a Kyma module. @@ -35,32 +31,49 @@ This command signs all module resources recursively based on an unsigned compone RunE: func(_ *cobra.Command, args []string) error { return c.Run(args) }, Aliases: []string{"mod"}, } - cmd.Args = cobra.ExactArgs(2) - cmd.Flags().StringVar(&o.PrivateKeyPath, "private-key", "", "Specifies the path where the private key used for signing") - cmd.Flags().StringVar(&o.ModPath, "mod-path", "./mod", "Specifies the path where the signed component descriptor will be stored") - cmd.Flags().StringVar(&o.SignatureName, "signature-name", "", "name of the signature for signing") - cmd.Flags().StringVar(&o.RegistryURL, "registry", "", "Repository context url where unsigned component descriptor located") - cmd.Flags().StringVar(&o.NameMappingMode, "nameMapping", "urlPath", "Overrides the OCM Component Name Mapping, one of: \"urlPath\" or \"sha256-digest\"") - cmd.Flags().StringVar(&o.SignedRegistryURL, "signed-registry", "", "Repository context url where signed component descriptor located") - cmd.Flags().StringVarP(&o.Credentials, "credentials", "c", "", "Basic authentication credentials for the given registry in the format user:password") - cmd.Flags().StringVarP(&o.Token, "token", "t", "", "Authentication token for the given registry (alternative to basic authentication).") - cmd.Flags().BoolVar(&o.Insecure, "insecure", false, "Use an insecure connection to access the registry.") + cmd.Flags().StringVar( + &o.Name, "name", "", "Name of the module.", + ) + cmd.Flags().StringVar( + &o.Version, "version", "", "Version of the module.", + ) + cmd.Flags().StringVar( + &o.PrivateKeyPath, "key", "", "Specifies the path where a private key is used for signing.", + ) + cmd.Flags().StringVar( + &o.SignatureName, "signature-name", "kyma-project.io/module-signature", "Name of the signature to use.", + ) + cmd.Flags().StringVar( + &o.RegistryURL, "registry", "", "Context URL of the repository for the module. "+ + "The repository's URL is automatically added to the repository's contexts in the module.", + ) + cmd.Flags().StringVar( + &o.NameMappingMode, "name-mapping", "urlPath", + "Overrides the OCM Component Name Mapping, Use: \"urlPath\" or \"sha256-digest\".", + ) + cmd.Flags().StringVarP( + &o.Credentials, "credentials", "c", "", + "Basic authentication credentials for the given registry in the user:password format", + ) + cmd.Flags().StringVarP( + &o.Token, "token", "t", "", + "Authentication token for the given registry (alternative to basic authentication).", + ) + cmd.Flags().BoolVar(&o.Insecure, "insecure", false, "Uses an insecure connection to access the registry.") return cmd } -func (c *command) Run(args []string) error { +func (c *command) Run(_ []string) error { if !c.opts.NonInteractive { cli.AlphaWarn() } - log := cli.NewLogger(c.opts.Verbose).Sugar() - signCfg := &module.ComponentSignConfig{ - Name: args[0], - Version: args[1], - PrivateKeyPath: c.opts.PrivateKeyPath, - SignatureName: c.opts.SignatureName, + Name: c.opts.Name, + Version: c.opts.Version, + KeyPath: c.opts.PrivateKeyPath, + SignatureName: c.opts.SignatureName, } c.NewStep("Fetching and signing component descriptor...") @@ -78,62 +91,11 @@ func (c *command) Run(args []string) error { Insecure: c.opts.Insecure, } - digestedCds, err := module.Sign(signCfg, remote, log) - if err != nil { + if err := module.Sign(signCfg, remote); err != nil { c.CurrentStep.Failure() return err } - - // TODO: at the moment only support one cd, consider extend this further - if len(digestedCds) < 1 { - c.CurrentStep.Failure() - } c.CurrentStep.Success() - c.NewStep("Generating signed component descriptor...") - fs := osfs.New() - firstDigestedCd := digestedCds[0] - if err := module.WriteComponentDescriptor(fs, firstDigestedCd, c.opts.ModPath, ctf.ComponentDescriptorFileName); err != nil { - c.CurrentStep.Failure() - return err - } - - c.CurrentStep.Successf("Signed component descriptor generated at %s", c.opts.ModPath) - - if c.opts.SignedRegistryURL != "" { - c.NewStep("Rebuilding the module...") - - cwd, err := fs.Getwd() - if err != nil { - return fmt.Errorf("could not ge the current directory: %w", err) - } - - cfg := &module.Definition{ - Source: cwd, - Name: signCfg.Name, - Version: signCfg.Version, - ArchivePath: c.opts.ModPath, - Overwrite: false, - RegistryURL: c.opts.SignedRegistryURL, - NameMappingMode: remote.NameMapping, - } - archive, err := module.Build(fs, cfg) - if err != nil { - c.CurrentStep.Failure() - return err - } - c.CurrentStep.Success() - - c.NewStep(fmt.Sprintf("Pushing signed component descriptor to %q", c.opts.SignedRegistryURL)) - archive.ComponentDescriptor = firstDigestedCd - // Assume the credentials are same between registries that host unsigned and signed component descriptor - remote.Registry = c.opts.SignedRegistryURL - if err := module.Push(archive, remote, log); err != nil { - c.CurrentStep.Failure() - return err - } - c.CurrentStep.Success() - } - return nil } diff --git a/cmd/kyma/alpha/sign/module/opts.go b/cmd/kyma/alpha/sign/module/opts.go index 52982113b..b53ad7fff 100644 --- a/cmd/kyma/alpha/sign/module/opts.go +++ b/cmd/kyma/alpha/sign/module/opts.go @@ -7,15 +7,14 @@ import ( type Options struct { *cli.Options - RegistryURL string - NameMappingMode string - PrivateKeyPath string - SignatureName string - Credentials string - Token string - Insecure bool - ModPath string - SignedRegistryURL string + Name, Version string + RegistryURL string + NameMappingMode string + PrivateKeyPath string + SignatureName string + Credentials string + Token string + Insecure bool } // NewOptions creates options with default values diff --git a/cmd/kyma/alpha/sign/sign.go b/cmd/kyma/alpha/sign/sign.go index 04b38e469..6f03ebeb8 100755 --- a/cmd/kyma/alpha/sign/sign.go +++ b/cmd/kyma/alpha/sign/sign.go @@ -10,8 +10,8 @@ import ( func NewCmd(o *cli.Options) *cobra.Command { cmd := &cobra.Command{ Use: "sign", - Short: "Signs all module resources from an unsigned component descriptor that's hosted in a remote OCI registry", - Long: "Use this command to sign all module resources from an unsigned component descriptor that's hosted in a remote OCI registry", + Short: "Signs all module resources from an unsigned module component descriptor that's hosted in a remote OCI registry", + Long: "Use this command to sign all module resources from an unsigned module component descriptor that's hosted in a remote OCI registry", } cmd.AddCommand(module.NewCmd(module.NewOptions(o))) diff --git a/cmd/kyma/alpha/verify/module/module.go b/cmd/kyma/alpha/verify/module/module.go index 907004c20..d1a56264c 100644 --- a/cmd/kyma/alpha/verify/module/module.go +++ b/cmd/kyma/alpha/verify/module/module.go @@ -2,6 +2,7 @@ package module import ( "github.com/kyma-project/cli/internal/cli" + "github.com/kyma-project/cli/pkg/module" "github.com/spf13/cobra" ) @@ -19,21 +20,82 @@ func NewCmd(o *Options) *cobra.Command { } cmd := &cobra.Command{ - Use: "module ", + Use: "module --name MODULE_NAME --version MODULE_VERSION --registry MODULE_REGISTRY [flags]", Short: "Verifies the signature of a Kyma module bundled as an OCI container image.", Long: `Use this command to verify a Kyma module. ### Detailed description -Kyma modules can be cryptographically signed to make sure they are correct and distributed by a trusted authority. This command verifies the authenticity of a given module. +Kyma modules can be cryptographically signed to ensure they are correct and distributed by a trusted authority. This command verifies the authenticity of a given module. `, RunE: func(_ *cobra.Command, args []string) error { return c.Run(args) }, } + cmd.Flags().StringVar( + &o.Name, "name", "", "Name of the module.", + ) + cmd.Flags().StringVar( + &o.Version, "version", "", "Version of the module.", + ) + cmd.Flags().StringVar( + &o.PublicKeyPath, "key", "", "Specifies the path where a public key is used for signing.", + ) + cmd.Flags().StringVar( + &o.SignatureName, "signature-name", "kyma-project.io/module-signature", "Name of the signature to use.", + ) + cmd.Flags().StringVar( + &o.RegistryURL, "registry", "", "Context URL of the repository for the module. "+ + "The repository's URL is automatically added to the repository's contexts in the module.", + ) + cmd.Flags().StringVar( + &o.NameMappingMode, "name-mapping", "urlPath", + "Overrides the OCM Component Name Mapping, Use: \"urlPath\" or \"sha256-digest\".", + ) + cmd.Flags().StringVarP( + &o.Credentials, "credentials", "c", "", + "Basic authentication credentials for the given registry in the user:password format", + ) + cmd.Flags().StringVarP( + &o.Token, "token", "t", "", + "Authentication token for the given registry (alternative to basic authentication).", + ) + cmd.Flags().BoolVar(&o.Insecure, "insecure", false, "Uses an insecure connection to access the registry.") + return cmd } -func (c *command) Run(args []string) error { +func (c *command) Run(_ []string) error { + if !c.opts.NonInteractive { + cli.AlphaWarn() + } + + signCfg := &module.ComponentSignConfig{ + Name: c.opts.Name, + Version: c.opts.Version, + KeyPath: c.opts.PublicKeyPath, + SignatureName: c.opts.SignatureName, + } + + c.NewStep("Fetching and verifying component descriptor...") + nameMappingMode, err := module.ParseNameMapping(c.opts.NameMappingMode) + if err != nil { + return err + } + + remote := &module.Remote{ + Registry: c.opts.RegistryURL, + NameMapping: nameMappingMode, + Credentials: c.opts.Credentials, + Token: c.opts.Token, + Insecure: c.opts.Insecure, + } + + if err := module.Verify(signCfg, remote); err != nil { + c.CurrentStep.Failuref("Invalid!") + return err + } + c.CurrentStep.Successf("Valid!") + return nil } diff --git a/cmd/kyma/alpha/verify/module/opts.go b/cmd/kyma/alpha/verify/module/opts.go index 10a397af2..0d80377c6 100644 --- a/cmd/kyma/alpha/verify/module/opts.go +++ b/cmd/kyma/alpha/verify/module/opts.go @@ -7,6 +7,15 @@ import ( // Options defines available options for the version command type Options struct { *cli.Options + + Name, Version string + RegistryURL string + NameMappingMode string + PublicKeyPath string + SignatureName string + Credentials string + Token string + Insecure bool } // NewOptions creates options with default values diff --git a/cmd/kyma/alpha/verify/verify.go b/cmd/kyma/alpha/verify/verify.go index 24a92b961..c4faedf22 100755 --- a/cmd/kyma/alpha/verify/verify.go +++ b/cmd/kyma/alpha/verify/verify.go @@ -10,9 +10,8 @@ import ( func NewCmd(o *cli.Options) *cobra.Command { cmd := &cobra.Command{ Use: "verify", - Short: "Verifies kyma resources.", - Long: `Use this command to verify Kyma resources. -`, + Short: "Verifies all module resources from a signed module component descriptor that's hosted in a remote OCI registry.", + Long: "Use this command to verify all module resources from a signed module descriptor that's hosted in a remote OCI registry.", } cmd.AddCommand(module.NewCmd(module.NewOptions(o))) diff --git a/cmd/kyma/deploy/cmd.go b/cmd/kyma/deploy/cmd.go index 8a24644d5..b5063e9e4 100644 --- a/cmd/kyma/deploy/cmd.go +++ b/cmd/kyma/deploy/cmd.go @@ -47,9 +47,10 @@ func NewCmd(o *Options) *cobra.Command { Use: "deploy", Short: "Deploys Kyma on a running Kubernetes cluster.", Long: "Use this command to deploy, upgrade, or adapt Kyma on a running Kubernetes cluster.", - RunE: func(_ *cobra.Command, _ []string) error { return cmd.RunWithTimeout() }, + RunE: func(cc *cobra.Command, _ []string) error { return cmd.RunWithTimeout(cc.Context()) }, Aliases: []string{"d"}, } + cobraCmd.Flags().StringArrayVarP(&o.Components, "component", "", []string{}, `Provide one or more components to deploy, for example: - With short-hand notation: "--component name@namespace" - With verbose JSON structure "--component '{"name": "componentName","namespace": "componenNamespace","url": "componentUrl","version": "1.2.3"}'`) @@ -75,7 +76,7 @@ func NewCmd(o *Options) *cobra.Command { return cobraCmd } -func (cmd *command) RunWithTimeout() error { +func (cmd *command) RunWithTimeout(ctx context.Context) error { if cmd.opts.CI { cmd.Factory.NonInteractive = true } @@ -90,7 +91,7 @@ func (cmd *command) RunWithTimeout() error { timeout := time.After(cmd.opts.Timeout) errChan := make(chan error) go func() { - errChan <- cmd.run() + errChan <- cmd.run(ctx) }() for { @@ -106,7 +107,7 @@ func (cmd *command) RunWithTimeout() error { } } -func (cmd *command) run() error { +func (cmd *command) run(ctx context.Context) error { start := time.Now() if cmd.opts.DryRun { @@ -123,7 +124,7 @@ func (cmd *command) run() error { } if !cmd.opts.NonInteractive { - if err := cli.DetectManagedEnvironment(cmd.K8s, cmd.Factory.NewStep("")); err != nil { + if err := cli.DetectManagedEnvironment(ctx, cmd.K8s, cmd.Factory.NewStep("")); err != nil { return err } } @@ -132,10 +133,10 @@ func (cmd *command) run() error { return err } - return cmd.deploy(start) + return cmd.deploy(ctx, start) } -func (cmd *command) deploy(start time.Time) error { +func (cmd *command) deploy(ctx context.Context, start time.Time) error { wsStep := cmd.NewStep(fmt.Sprintf("Fetching Kyma sources (%s)", cmd.opts.Source)) l := cli.NewLogger(cmd.opts.Verbose).Sugar() ws, err := deploy.PrepareWorkspace(cmd.opts.WorkspacePath, cmd.opts.Source, wsStep, !cmd.avoidUserInteraction(), cmd.opts.IsLocal(), l) @@ -143,7 +144,7 @@ func (cmd *command) deploy(start time.Time) error { return err } - clusterInfo, err := clusterinfo.Discover(context.Background(), cmd.K8s.Static()) + clusterInfo, err := clusterinfo.Discover(ctx, cmd.K8s.Static()) if err != nil { return errors.Wrap(err, "failed to discover underlying cluster type") } diff --git a/cmd/kyma/init/function/function.go b/cmd/kyma/init/function/function.go index 90962237d..437bca9f2 100644 --- a/cmd/kyma/init/function/function.go +++ b/cmd/kyma/init/function/function.go @@ -14,13 +14,15 @@ import ( ) const ( - defaultRuntime = "nodejs14" + defaultRuntime = "nodejs16" defaultReference = "main" defaultBaseDir = "/" ) var ( - deprecatedRuntimes = map[string]struct{}{} + deprecatedRuntimes = map[string]struct{}{ + "nodejs14": {}, + } ) type command struct { @@ -48,17 +50,25 @@ Use the flags to specify the initial configuration for your Function or to choos cmd.Flags().StringVar(&o.Namespace, "namespace", "", `Namespace to which you want to apply your Function.`) cmd.Flags().StringVarP(&o.Dir, "dir", "d", "", `Full path to the directory where you want to save the project.`) cmd.Flags().StringVar(&o.RuntimeImageOverride, "runtime-image-override", "", `Set custom runtime image base.`) - cmd.Flags().StringVarP(&o.Runtime, "runtime", "r", defaultRuntime, `Flag used to define the environment for running your Function. Use one of these options: - - nodejs14 + cmd.Flags().StringVarP( + &o.Runtime, "runtime", "r", defaultRuntime, + `Flag used to define the environment for running your Function. Use one of these options: + - nodejs14 (deprecated) - nodejs16 - - python39`) + - python39`, + ) // git function options cmd.Flags().StringVar(&o.URL, "url", "", `Git repository URL`) cmd.Flags().StringVar(&o.RepositoryName, "repository-name", "", `The name of the Git repository to be created`) cmd.Flags().StringVar(&o.Reference, "reference", defaultReference, `Commit hash or branch name`) - cmd.Flags().StringVar(&o.BaseDir, "base-dir", defaultBaseDir, `A directory in the repository containing the Function's sources`) - cmd.Flags().BoolVar(&o.VsCode, "vscode", false, `Generate VS Code settings containing config.yaml JSON schema for autocompletion (see "kyma get schema -h" for more info)`) + cmd.Flags().StringVar( + &o.BaseDir, "base-dir", defaultBaseDir, `A directory in the repository containing the Function's sources`, + ) + cmd.Flags().BoolVar( + &o.VsCode, "vscode", false, + `Generate VS Code settings containing config.yaml JSON schema for autocompletion (see "kyma get schema -h" for more info)`, + ) return cmd } @@ -85,7 +95,10 @@ func (c *command) Run() error { } if _, ok := deprecatedRuntimes[c.opts.Runtime]; ok { - s.LogWarnf("Runtime %s is deprecated and will be removed in the future. We recommend using a supported runtime version", c.opts.Runtime) + s.LogWarnf( + "Runtime %s is deprecated and will be removed in the future. We recommend using a supported runtime version", + c.opts.Runtime, + ) } configuration := workspace.Cfg{ diff --git a/cmd/kyma/init/function/function_test.go b/cmd/kyma/init/function/function_test.go index e8bbea199..5191b8ed7 100644 --- a/cmd/kyma/init/function/function_test.go +++ b/cmd/kyma/init/function/function_test.go @@ -17,7 +17,7 @@ func TestFunctionFlags(t *testing.T) { require.Equal(t, "", o.Name, "Default value for the --name flag not as expected.") require.Equal(t, "", o.Namespace, "Default value for the --namespace flag not as expected.") require.Equal(t, "", o.Dir, "Default value for the --dir flag not as expected.") - require.Equal(t, "nodejs14", o.Runtime, "Default value for the --runtime flag not as expected.") + require.Equal(t, "nodejs16", o.Runtime, "Default value for the --runtime flag not as expected.") require.Equal(t, "", o.RuntimeImageOverride, "The parsed value for the --runtime-image-override flag not as expected.") require.Equal(t, "", o.URL, "The parsed value for the --url flag not as expected.") require.Equal(t, "", o.RepositoryName, "The parsed value for the --repository-name flag not as expected.") diff --git a/cmd/kyma/kyma.go b/cmd/kyma/kyma.go index d3c9c99e5..9ebb5eae9 100755 --- a/cmd/kyma/kyma.go +++ b/cmd/kyma/kyma.go @@ -7,10 +7,12 @@ import ( "github.com/kyma-project/cli/cmd/kyma/create" "github.com/kyma-project/cli/cmd/kyma/dashboard" "github.com/kyma-project/cli/cmd/kyma/deploy" + "github.com/kyma-project/cli/cmd/kyma/get" imprt "github.com/kyma-project/cli/cmd/kyma/import" "github.com/kyma-project/cli/cmd/kyma/import/certs" "github.com/kyma-project/cli/cmd/kyma/import/hosts" initial "github.com/kyma-project/cli/cmd/kyma/init" + "github.com/kyma-project/cli/cmd/kyma/provision" "github.com/kyma-project/cli/cmd/kyma/provision/gardener" "github.com/kyma-project/cli/cmd/kyma/provision/gardener/aws" "github.com/kyma-project/cli/cmd/kyma/provision/gardener/az" @@ -20,9 +22,6 @@ import ( "github.com/kyma-project/cli/cmd/kyma/sync" "github.com/kyma-project/cli/cmd/kyma/undeploy" "github.com/kyma-project/cli/cmd/kyma/version" - - "github.com/kyma-project/cli/cmd/kyma/get" - "github.com/kyma-project/cli/cmd/kyma/provision" "github.com/kyma-project/cli/internal/cli" "github.com/spf13/cobra" ) @@ -41,11 +40,22 @@ Kyma CLI allows you to install and manage Kyma. SilenceUsage: true, } - cmd.PersistentFlags().BoolVarP(&o.Verbose, "verbose", "v", false, "Displays details of actions triggered by the command.") - cmd.PersistentFlags().BoolVar(&o.NonInteractive, "non-interactive", false, "Enables the non-interactive shell mode (no colorized output, no spinner).") - cmd.PersistentFlags().BoolVar(&o.CI, "ci", false, "Enables the CI mode to run on CI/CD systems. It avoids any user interaction (such as no dialog prompts) and ensures that logs are formatted properly in log files (such as no spinners for CLI steps).") + cmd.PersistentFlags().BoolVarP( + &o.Verbose, "verbose", "v", false, "Displays details of actions triggered by the command.", + ) + cmd.PersistentFlags().BoolVar( + &o.NonInteractive, "non-interactive", false, + "Enables the non-interactive shell mode (no colorized output, no spinner).", + ) + cmd.PersistentFlags().BoolVar( + &o.CI, "ci", false, + "Enables the CI mode to run on CI/CD systems. It avoids any user interaction (such as no dialog prompts) and ensures that logs are formatted properly in log files (such as no spinners for CLI steps).", + ) // Kubeconfig env var and default paths are resolved by the kyma k8s client using the k8s defined resolution strategy. - cmd.PersistentFlags().StringVar(&o.KubeconfigPath, "kubeconfig", "", `Path to the kubeconfig file. If undefined, Kyma CLI uses the KUBECONFIG environment variable, or falls back "/$HOME/.kube/config".`) + cmd.PersistentFlags().StringVar( + &o.KubeconfigPath, "kubeconfig", "", + `Path to the kubeconfig file. If undefined, Kyma CLI uses the KUBECONFIG environment variable, or falls back "/$HOME/.kube/config".`, + ) cmd.PersistentFlags().BoolP("help", "h", false, "Provides command help.") //Stable commands diff --git a/cmd/kyma/provision/cmd.go b/cmd/kyma/provision/cmd.go index 108660a6e..792a6d13b 100644 --- a/cmd/kyma/provision/cmd.go +++ b/cmd/kyma/provision/cmd.go @@ -4,7 +4,7 @@ import ( "github.com/spf13/cobra" ) -const DefaultK8sShortVersion = "1.24" //default Kubernetes version for provisioning clusters on hyperscalers +const DefaultK8sShortVersion = "1.25" //default Kubernetes version for provisioning clusters on hyperscalers const DefaultK8sFullVersion = DefaultK8sShortVersion + ".6" //default Kubernetes version with the "patch" component (mainly for K3d/K3s) // NewCmd creates a new provision command diff --git a/cmd/kyma/undeploy/cmd.go b/cmd/kyma/undeploy/cmd.go index 235c103f8..05710d3b7 100644 --- a/cmd/kyma/undeploy/cmd.go +++ b/cmd/kyma/undeploy/cmd.go @@ -41,7 +41,7 @@ func NewCmd(o *Options) *cobra.Command { Use: "undeploy", Short: "Undeploys Kyma from a running Kubernetes cluster.", Long: `Use this command to undeploy Kyma from a running Kubernetes cluster.`, - RunE: func(_ *cobra.Command, _ []string) error { return cmd.Run() }, + RunE: func(cc *cobra.Command, _ []string) error { return cmd.Run(cc.Context()) }, } cobraCmd.Flags().StringSliceVarP(&o.Components, "component", "", []string{}, "Provide one or more components to undeploy (e.g. --component componentName@namespace)") @@ -68,7 +68,7 @@ func NewCmd(o *Options) *cobra.Command { } // Run runs the command -func (cmd *command) Run() error { +func (cmd *command) Run(ctx context.Context) error { var err error if cmd.opts.CI { @@ -84,7 +84,7 @@ func (cmd *command) Run() error { } if !cmd.opts.NonInteractive { - if err := cli.DetectManagedEnvironment(cmd.K8s, cmd.Factory.NewStep("")); err != nil { + if err := cli.DetectManagedEnvironment(ctx, cmd.K8s, cmd.Factory.NewStep("")); err != nil { return err } } @@ -112,7 +112,7 @@ func (cmd *command) Run() error { return err } - clusterInfo, err := clusterinfo.Discover(context.Background(), cmd.K8s.Static()) + clusterInfo, err := clusterinfo.Discover(ctx, cmd.K8s.Static()) if err != nil { return errors.Wrap(err, "failed to discover underlying cluster type") } diff --git a/docs/gen-docs/kyma_alpha.md b/docs/gen-docs/kyma_alpha.md index f6efcbece..c45c8d7ec 100644 --- a/docs/gen-docs/kyma_alpha.md +++ b/docs/gen-docs/kyma_alpha.md @@ -24,6 +24,9 @@ Alpha commands are experimental, unreleased features that should only be used by * [kyma](kyma.md) - Controls a Kyma cluster. * [kyma alpha create](kyma_alpha_create.md) - Creates resources on the Kyma cluster. * [kyma alpha deploy](kyma_alpha_deploy.md) - Deploys Kyma on a running Kubernetes cluster. +* [kyma alpha disable](kyma_alpha_disable.md) - Disables a resource in the Kyma cluster. +* [kyma alpha enable](kyma_alpha_enable.md) - Enables a resource in the Kyma cluster. * [kyma alpha list](kyma_alpha_list.md) - Lists resources on the Kyma cluster. -* [kyma alpha sign](kyma_alpha_sign.md) - Signs all module resources from an unsigned component descriptor that's hosted in a remote OCI registry +* [kyma alpha sign](kyma_alpha_sign.md) - Signs all module resources from an unsigned module component descriptor that's hosted in a remote OCI registry +* [kyma alpha verify](kyma_alpha_verify.md) - Verifies all module resources from a signed module component descriptor that's hosted in a remote OCI registry. diff --git a/docs/gen-docs/kyma_alpha_create_module.md b/docs/gen-docs/kyma_alpha_create_module.md index 751be4d5c..7218b3866 100644 --- a/docs/gen-docs/kyma_alpha_create_module.md +++ b/docs/gen-docs/kyma_alpha_create_module.md @@ -23,12 +23,12 @@ Optionally, you can manually add additional layers with contents in other paths Finally, if you provided a registry to which to push the artifact, the created module is validated and pushed. During the validation the default CR defined in the optional "default.yaml" file is validated against CustomResourceDefinition. Alternatively, you can trigger an on-demand default CR validation with "--validateCR=true", in case you don't push to the registry. -To push the artifact into some registries, for example, the central docker.io registry, you have to change the OCM Component Name Mapping with the following flag: "--nameMapping=sha256-digest". This is necessary because the registry does not accept artifact URLs with more than two path segments, and such URLs are generated with the default name mapping: "urlPath". In the case of the "sha256-digest" mapping, the artifact URL contains just a sha256 digest of the full Component Name and fits the path length restrictions. +To push the artifact into some registries, for example, the central docker.io registry, you have to change the OCM Component Name Mapping with the following flag: "--name-mapping=sha256-digest". This is necessary because the registry does not accept artifact URLs with more than two path segments, and such URLs are generated with the default name mapping: "urlPath". In the case of the "sha256-digest" mapping, the artifact URL contains just a sha256 digest of the full Component Name and fits the path length restrictions. ```bash -kyma alpha create module [flags] +kyma alpha create module --name MODULE_NAME --version MODULE_VERSION --registry MODULE_REGISTRY [flags] ``` ## Examples @@ -45,22 +45,25 @@ Build module my-domain/modB in version 3.2.1 and push it to a local registry "un ## Flags ```bash - --channel string Channel to use for the module template. (default "regular") - --clean Remove the mod-path folder and all its contents at the end. - -c, --credentials string Basic authentication credentials for the given registry in the format user:password - --default-cr string File containing the default custom resource of the module. If the module is a kubebuilder project, the default CR will be automatically detected. - --insecure Use an insecure connection to access the registry. - --mod-cache string Specifies the path where the module artifacts are locally cached to generate the image. If the path already has a module, use the overwrite flag to overwrite it. (default "./mod") - -n, --name string Override the module name of the kubebuilder project. If the module is not a kubebuilder project, this flag is mandatory. - --nameMapping string Overrides the OCM Component Name Mapping, one of: "urlPath" or "sha256-digest" (default "urlPath") - -o, --output string File to which to output the module template if the module is uploaded to a registry (default "template.yaml") - -w, --overwrite overwrites the existing mod-path directory if it exists - -p, --path string Path to the module contents. (default current directory) - --registry string Repository context url for module to upload. The repository url will be automatically added to the repository contexts in the module - --registry-cred-selector string label selector to identify a secret of type kubernetes.io/dockerconfigjson (that needs to be created externally) which allows the image to be accessed in private image registries. This can be used if you push your module to a registry with authenticated access. Example: "label1=value1,label2=value2" - -r, --resource stringArray Add an extra resource in a new layer with format . It is also possible to provide only a path; name will default to the last path element and type to 'helm-chart' - -t, --token string Authentication token for the given registry (alternative to basic authentication). - --version string Version of the module. This flag is mandatory. + --channel string Channel to use for the module template. (default "regular") + -c, --credentials string Basic authentication credentials for the given registry in the user:password format + --default-cr string File containing the default custom resource of the module. If the module is a kubebuilder project, the default CR is automatically detected. + --descriptor-version string Schema version to use for the generated OCM descriptor. One of ocm.software/v3alpha1,v2 (default "v2") + --insecure Uses an insecure connection to access the registry. + --module-archive-path string Specifies the path where the module artifacts are locally cached to generate the image. If the path already has a module, use the "--module-archive-version-overwrite" flag to overwrite it. (default "./mod") + --module-archive-persistence Uses the host filesystem instead of inmemory archiving to build the module. + --module-archive-version-overwrite Overwrites existing component's versions of the module. If set to false, the push is a No-Op. + -n, --name string Override the module name of the kubebuilder project. If the module is not a kubebuilder project, this flag is mandatory. + --name-mapping string Overrides the OCM Component Name Mapping, Use: "urlPath" or "sha256-digest". (default "urlPath") + -o, --output string File to write the module template if the module is uploaded to a registry. (default "template.yaml") + -p, --path string Path to the module's contents. (default current directory) + --registry string Context URL of the repository. The repository URL will be automatically added to the repository contexts in the module descriptor. + --registry-cred-selector string Label selector to identify an externally created Secret of type "kubernetes.io/dockerconfigjson". It allows the image to be accessed in private image registries. It can be used when you push your module to a registry with authenticated access. For example, "label1=value1,label2=value2". + -r, --resource stringArray Add an extra resource in a new layer in the format. If you provide only a path, the name defaults to the last path element, and the type is set to 'helm-chart'. + --sec-scanners-config string Path to the file holding the security scan configuration. (default "sec-scanners-config.yaml") + --target string Target to use when determining where to install the module. Use 'control-plane' or 'remote'. (default "control-plane") + -t, --token string Authentication token for the given registry (alternative to basic authentication). + --version string Version of the module. This flag is mandatory. ``` ## Flags inherited from parent commands diff --git a/docs/gen-docs/kyma_alpha_deploy.md b/docs/gen-docs/kyma_alpha_deploy.md index ef2af3d8b..90cab2c9c 100644 --- a/docs/gen-docs/kyma_alpha_deploy.md +++ b/docs/gen-docs/kyma_alpha_deploy.md @@ -12,25 +12,39 @@ Use this command to deploy, upgrade, or adapt Kyma on a running Kubernetes clust kyma alpha deploy [flags] ``` +## Examples + +```bash + +- Deploy the latest version of the Lifecycle Manager for trying out Modules: "kyma deploy -k https://github.com/kyma-project/lifecycle-manager/config/default -with-wildcard-permissions" +- Deploy the main branch of Lifecycle Manager: "kyma deploy -k https://github.com/kyma-project/lifecycle-manager/config/default@main" +- Deploy a local version of Lifecycle Manager: "kyma deploy -k /path/to/repo/lifecycle-manager/config/default" +``` + ## Flags ```bash + --cert-manager string Installs cert-manager from the specified static version. An empty string skips the installation. (default "v1.11.0") -c, --channel string Select which channel to deploy from. (default "regular") --dry-run Renders the Kubernetes manifests without actually applying them. - -k, --kustomization stringArray Provide one or more kustomizations to deploy. Each occurrence of the flag accepts a URL with an optional reference (commit, branch, or release) in the format URL@ref or a local path to the directory of the kustomization file. - Defaults to deploying Lifecycle Manager and Module Manager from GitHub main branch. - Examples: - - Deploy a specific release of the Lifecycle Manager: "kyma deploy -k https://github.com/kyma-project/lifecycle-manager/config/default@1.2.3" - - Deploy a local Module Manager: "kyma deploy --kustomization /path/to/repo/module-manager/config/default" - - Deploy a branch of Lifecycle Manager with a custom URL: "kyma deploy -k https://gitlab.com/forked-from-github/lifecycle-manager/config/default@feature-branch-1" - - Deploy the main branch of Lifecycle Manager while using local sources of Module Manager: "kyma deploy -k /path/to/repo/module-manager/config/default -k https://github.com/kyma-project/lifecycle-manager/config/default@main" - --kyma-cr string Provide a custom Kyma CR file for the deployment. - -m, --module stringArray Provide one or more modules to activate after the deployment is finished. Example: "--module name@namespace" (namespace is optional). - -f, --modules-file string Path to file containing a list of modules. - -n, --namespace string The Namespace to deploy the the Kyma custom resource in. (default "kyma-system") - --template stringArray Provide one or more module templates to deploy. - WARNING: This is a temporary flag for development and will be removed soon. + -f, --force-conflicts Forces the patching of Kyma spec modules in case their managed field was edited by a source other than Kyma CLI. + -k, --kustomization stringArray Provides one or more kustomizations to deploy. + Each flag occurrence accepts a URL with an optional reference (commit, branch, or release) in URL@ref format or a local path to the directory of the kustomization file. + By default, Lifecycle Manager is deployed from the GitHub main branch. (default [https://github.com/kyma-project/lifecycle-manager/config/default]) + --kyma-cr string Provides a custom Kyma CR file for the deployment. + --lifecycle-manager string Installs Lifecycle Manager with the specified image: + - Use "my-registry.org/lifecycle-manager:my-tag"" to use a custom version of Lifecycle Manager. + - Use "europe-docker.pkg.dev/kyma-project/prod/lifecycle-manager@sha256:cb74b29cfe80c639c9ee9..." to use a custom version of Lifecycle Manager with a digest. + - Specify a tag to override the default one. For example, when specifying "v20230220-7b8e9515", the "eu.gcr.io/kyma-project/lifecycle-manager:v20230220-7b8e9515" tag is used. (default "eu.gcr.io/kyma-project/lifecycle-manager:latest") + -m, --module stringArray Provides one or more modules to activate after the deployment is finished. Example: "--module name@namespace" (namespace is optional). + -n, --namespace string The Namespace to deploy the Kyma custom resource in. (default "kyma-system") + --open-dashboard Opens the Busola Dashboard at startup. Only works when a graphical interface is available and when running in the interactive mode. + --templates stringArray Provides one or more module templates to deploy. + WARNING: This is a temporary flag for development and will be removed soon. (default [https://github.com/kyma-project/kyma/modules@2.11.2]) -t, --timeout duration Maximum time for the deployment. (default 20m0s) + --wildcard-permissions Creates a wildcard cluster-role to allow for easy local installation permissions of Lifecycle Manager. + Allows for Lifecycle Manager usage without worrying about modules requiring specific RBAC permissions. + WARNING: DO NOT USE ON PRODUCTIVE CLUSTERS! (default true) ``` ## Flags inherited from parent commands diff --git a/docs/gen-docs/kyma_alpha_disable.md b/docs/gen-docs/kyma_alpha_disable.md new file mode 100644 index 000000000..aaa6416c9 --- /dev/null +++ b/docs/gen-docs/kyma_alpha_disable.md @@ -0,0 +1,26 @@ +--- +title: kyma alpha disable +--- + +Disables a resource in the Kyma cluster. + +## Synopsis + +Use this command to disable a resource in the Kyma cluster. + + +## Flags inherited from parent commands + +```bash + --ci Enables the CI mode to run on CI/CD systems. It avoids any user interaction (such as no dialog prompts) and ensures that logs are formatted properly in log files (such as no spinners for CLI steps). + -h, --help Provides command help. + --kubeconfig string Path to the kubeconfig file. If undefined, Kyma CLI uses the KUBECONFIG environment variable, or falls back "/$HOME/.kube/config". + --non-interactive Enables the non-interactive shell mode (no colorized output, no spinner). + -v, --verbose Displays details of actions triggered by the command. +``` + +## See also + +* [kyma alpha](kyma_alpha.md) - Experimental commands +* [kyma alpha disable module](kyma_alpha_disable_module.md) - Disables a module in the cluster or in the given Kyma resource. + diff --git a/docs/gen-docs/kyma_alpha_disable_module.md b/docs/gen-docs/kyma_alpha_disable_module.md new file mode 100644 index 000000000..21f1c3602 --- /dev/null +++ b/docs/gen-docs/kyma_alpha_disable_module.md @@ -0,0 +1,55 @@ +--- +title: kyma alpha disable module +--- + +Disables a module in the cluster or in the given Kyma resource. + +## Synopsis + +Use this command to disable active Kyma modules in the cluster. + +### Detailed description + +For more information on Kyma modules, see the 'create module' command. + +This command disables an active module in the cluster. + + +```bash +kyma alpha disable module [name] [flags] +``` + +## Examples + +```bash + +Disable "my-module" from the "alpha" channel in "default-kyma" in "kyma-system" Namespace + kyma alpha disable module my-module -c alpha -n kyma-system -k default-kyma + +``` + +## Flags + +```bash + -c, --channel string Module's channel to use. + -f, --force-conflicts Forces the patching of Kyma spec modules in case their managed field was edited by a source other than Kyma CLI. + -k, --kyma-name string Kyma resource to use. If empty, 'default-kyma' is used. (default "default-kyma") + -n, --namespace string Kyma Namespace to use. If empty, the default 'kyma-system' Namespace is used. (default "kyma-system") + -t, --timeout duration Maximum time for the operation to disable a module. (default 1m0s) + -w, --wait Wait until the given Kyma resource is ready. +``` + +## Flags inherited from parent commands + +```bash + --ci Enables the CI mode to run on CI/CD systems. It avoids any user interaction (such as no dialog prompts) and ensures that logs are formatted properly in log files (such as no spinners for CLI steps). + -h, --help Provides command help. + --kubeconfig string Path to the kubeconfig file. If undefined, Kyma CLI uses the KUBECONFIG environment variable, or falls back "/$HOME/.kube/config". + --non-interactive Enables the non-interactive shell mode (no colorized output, no spinner). + -v, --verbose Displays details of actions triggered by the command. +``` + +## See also + +* [kyma alpha disable](kyma_alpha_disable.md) - Disables a resource in the Kyma cluster. + diff --git a/docs/gen-docs/kyma_alpha_enable.md b/docs/gen-docs/kyma_alpha_enable.md new file mode 100644 index 000000000..b9ad667f1 --- /dev/null +++ b/docs/gen-docs/kyma_alpha_enable.md @@ -0,0 +1,26 @@ +--- +title: kyma alpha enable +--- + +Enables a resource in the Kyma cluster. + +## Synopsis + +Use this command to enable a resource in the Kyma cluster. + + +## Flags inherited from parent commands + +```bash + --ci Enables the CI mode to run on CI/CD systems. It avoids any user interaction (such as no dialog prompts) and ensures that logs are formatted properly in log files (such as no spinners for CLI steps). + -h, --help Provides command help. + --kubeconfig string Path to the kubeconfig file. If undefined, Kyma CLI uses the KUBECONFIG environment variable, or falls back "/$HOME/.kube/config". + --non-interactive Enables the non-interactive shell mode (no colorized output, no spinner). + -v, --verbose Displays details of actions triggered by the command. +``` + +## See also + +* [kyma alpha](kyma_alpha.md) - Experimental commands +* [kyma alpha enable module](kyma_alpha_enable_module.md) - Enables a module in the cluster or in the given Kyma resource. + diff --git a/docs/gen-docs/kyma_alpha_enable_module.md b/docs/gen-docs/kyma_alpha_enable_module.md new file mode 100644 index 000000000..7c7ca444b --- /dev/null +++ b/docs/gen-docs/kyma_alpha_enable_module.md @@ -0,0 +1,56 @@ +--- +title: kyma alpha enable module +--- + +Enables a module in the cluster or in the given Kyma resource. + +## Synopsis + +Use this command to enable Kyma modules available in the cluster. + +### Detailed description + +For more information on Kyma modules, see the 'create module' command. + +This command enables an available module in the cluster. +A module is available when it is released with a ModuleTemplate. The ModuleTemplate is used for instantiating the module with proper default configuration. + + +```bash +kyma alpha enable module [name] [flags] +``` + +## Examples + +```bash + +Enable "my-module" from "alpha" channel in "default-kyma" in "kyma-system" Namespace + kyma alpha enable module my-module -c alpha -n kyma-system -k default-kyma + +``` + +## Flags + +```bash + -c, --channel string Module's channel to enable. + -f, --force-conflicts Forces the patching of Kyma spec modules in case their managed field was edited by a source other than Kyma CLI. + -k, --kyma-name string Kyma resource to use. If empty, 'default-kyma' is used. (default "default-kyma") + -n, --namespace string Kyma Namespace to use. If empty, the default 'kyma-system' Namespace is used. (default "kyma-system") + -t, --timeout duration Maximum time for the operation to enable a module. (default 1m0s) + -w, --wait Wait until the given Kyma resource is ready. +``` + +## Flags inherited from parent commands + +```bash + --ci Enables the CI mode to run on CI/CD systems. It avoids any user interaction (such as no dialog prompts) and ensures that logs are formatted properly in log files (such as no spinners for CLI steps). + -h, --help Provides command help. + --kubeconfig string Path to the kubeconfig file. If undefined, Kyma CLI uses the KUBECONFIG environment variable, or falls back "/$HOME/.kube/config". + --non-interactive Enables the non-interactive shell mode (no colorized output, no spinner). + -v, --verbose Displays details of actions triggered by the command. +``` + +## See also + +* [kyma alpha enable](kyma_alpha_enable.md) - Enables a resource in the Kyma cluster. + diff --git a/docs/gen-docs/kyma_alpha_list_module.md b/docs/gen-docs/kyma_alpha_list_module.md index 3d2520c08..b882d6b0d 100644 --- a/docs/gen-docs/kyma_alpha_list_module.md +++ b/docs/gen-docs/kyma_alpha_list_module.md @@ -30,15 +30,15 @@ kyma alpha list module [kyma] [flags] ## Examples ```bash -Examples: + List all modules kyma alpha list module List all modules in the "regular" channel kyma alpha list module --channel regular List all modules for the kyma "some-kyma" in the namespace "custom" in the "alpha" channel - kyma alpha list module some-kyma -c alpha -n "custom" + kyma alpha list module -k some-kyma -c alpha -n custom List all modules for the kyma "some-kyma" in the "alpha" channel - kyma alpha list module some-kyma -c alpha + kyma alpha list module -k some-kyma -c alpha ``` @@ -47,8 +47,9 @@ List all modules for the kyma "some-kyma" in the "alpha" channel ```bash -A, --all-namespaces If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace -c, --channel string Channel to use for the module template. + -k, --kyma-name string Kyma resource to use. -n, --namespace string The Namespace to list the modules in. (default "kyma-system") - --no-headers When using the default output format, don't print headers (default print headers) + --no-headers When using the default output format, don't print headers. (default print headers) -o, --output string Output format. One of: (json, yaml). By default uses an in-built template file. It is currently impossible to add your own template file. (default "go-template-file") -t, --timeout duration Maximum time for the list operation to retrieve ModuleTemplates. (default 1m0s) ``` diff --git a/docs/gen-docs/kyma_alpha_sign.md b/docs/gen-docs/kyma_alpha_sign.md index 2f2d627ec..32be346b3 100644 --- a/docs/gen-docs/kyma_alpha_sign.md +++ b/docs/gen-docs/kyma_alpha_sign.md @@ -2,11 +2,11 @@ title: kyma alpha sign --- -Signs all module resources from an unsigned component descriptor that's hosted in a remote OCI registry +Signs all module resources from an unsigned module component descriptor that's hosted in a remote OCI registry ## Synopsis -Use this command to sign all module resources from an unsigned component descriptor that's hosted in a remote OCI registry +Use this command to sign all module resources from an unsigned module component descriptor that's hosted in a remote OCI registry ## Flags inherited from parent commands diff --git a/docs/gen-docs/kyma_alpha_sign_module.md b/docs/gen-docs/kyma_alpha_sign_module.md index fce1fc5e6..e74189b55 100644 --- a/docs/gen-docs/kyma_alpha_sign_module.md +++ b/docs/gen-docs/kyma_alpha_sign_module.md @@ -14,21 +14,21 @@ This command signs all module resources recursively based on an unsigned compone ```bash -kyma alpha sign module MODULE_NAME MODULE_VERSION [flags] +kyma alpha sign module --name MODULE_NAME --version MODULE_VERSION --registry MODULE_REGISTRY [flags] ``` ## Flags ```bash - -c, --credentials string Basic authentication credentials for the given registry in the format user:password - --insecure Use an insecure connection to access the registry. - --mod-path string Specifies the path where the signed component descriptor will be stored (default "./mod") - --nameMapping string Overrides the OCM Component Name Mapping, one of: "urlPath" or "sha256-digest" (default "urlPath") - --private-key string Specifies the path where the private key used for signing - --registry string Repository context url where unsigned component descriptor located - --signature-name string name of the signature for signing - --signed-registry string Repository context url where signed component descriptor located - -t, --token string Authentication token for the given registry (alternative to basic authentication). + -c, --credentials string Basic authentication credentials for the given registry in the user:password format + --insecure Uses an insecure connection to access the registry. + --key string Specifies the path where a private key is used for signing. + --name string Name of the module. + --name-mapping string Overrides the OCM Component Name Mapping, Use: "urlPath" or "sha256-digest". (default "urlPath") + --registry string Context URL of the repository for the module. The repository's URL is automatically added to the repository's contexts in the module. + --signature-name string Name of the signature to use. (default "kyma-project.io/module-signature") + -t, --token string Authentication token for the given registry (alternative to basic authentication). + --version string Version of the module. ``` ## Flags inherited from parent commands @@ -43,5 +43,5 @@ kyma alpha sign module MODULE_NAME MODULE_VERSION [flags] ## See also -* [kyma alpha sign](kyma_alpha_sign.md) - Signs all module resources from an unsigned component descriptor that's hosted in a remote OCI registry +* [kyma alpha sign](kyma_alpha_sign.md) - Signs all module resources from an unsigned module component descriptor that's hosted in a remote OCI registry diff --git a/docs/gen-docs/kyma_alpha_verify.md b/docs/gen-docs/kyma_alpha_verify.md new file mode 100644 index 000000000..e82f89814 --- /dev/null +++ b/docs/gen-docs/kyma_alpha_verify.md @@ -0,0 +1,25 @@ +--- +title: kyma alpha verify +--- + +Verifies all module resources from a signed module component descriptor that's hosted in a remote OCI registry. + +## Synopsis + +Use this command to verify all module resources from a signed module descriptor that's hosted in a remote OCI registry. + +## Flags inherited from parent commands + +```bash + --ci Enables the CI mode to run on CI/CD systems. It avoids any user interaction (such as no dialog prompts) and ensures that logs are formatted properly in log files (such as no spinners for CLI steps). + -h, --help Provides command help. + --kubeconfig string Path to the kubeconfig file. If undefined, Kyma CLI uses the KUBECONFIG environment variable, or falls back "/$HOME/.kube/config". + --non-interactive Enables the non-interactive shell mode (no colorized output, no spinner). + -v, --verbose Displays details of actions triggered by the command. +``` + +## See also + +* [kyma alpha](kyma_alpha.md) - Experimental commands +* [kyma alpha verify module](kyma_alpha_verify_module.md) - Verifies the signature of a Kyma module bundled as an OCI container image. + diff --git a/docs/gen-docs/kyma_alpha_verify_module.md b/docs/gen-docs/kyma_alpha_verify_module.md new file mode 100644 index 000000000..08cffdcdb --- /dev/null +++ b/docs/gen-docs/kyma_alpha_verify_module.md @@ -0,0 +1,47 @@ +--- +title: kyma alpha verify module +--- + +Verifies the signature of a Kyma module bundled as an OCI container image. + +## Synopsis + +Use this command to verify a Kyma module. + +### Detailed description + +Kyma modules can be cryptographically signed to ensure they are correct and distributed by a trusted authority. This command verifies the authenticity of a given module. + + +```bash +kyma alpha verify module --name MODULE_NAME --version MODULE_VERSION --registry MODULE_REGISTRY [flags] +``` + +## Flags + +```bash + -c, --credentials string Basic authentication credentials for the given registry in the user:password format + --insecure Uses an insecure connection to access the registry. + --key string Specifies the path where a public key is used for signing. + --name string Name of the module. + --name-mapping string Overrides the OCM Component Name Mapping, Use: "urlPath" or "sha256-digest". (default "urlPath") + --registry string Context URL of the repository for the module. The repository's URL is automatically added to the repository's contexts in the module. + --signature-name string Name of the signature to use. (default "kyma-project.io/module-signature") + -t, --token string Authentication token for the given registry (alternative to basic authentication). + --version string Version of the module. +``` + +## Flags inherited from parent commands + +```bash + --ci Enables the CI mode to run on CI/CD systems. It avoids any user interaction (such as no dialog prompts) and ensures that logs are formatted properly in log files (such as no spinners for CLI steps). + -h, --help Provides command help. + --kubeconfig string Path to the kubeconfig file. If undefined, Kyma CLI uses the KUBECONFIG environment variable, or falls back "/$HOME/.kube/config". + --non-interactive Enables the non-interactive shell mode (no colorized output, no spinner). + -v, --verbose Displays details of actions triggered by the command. +``` + +## See also + +* [kyma alpha verify](kyma_alpha_verify.md) - Verifies all module resources from a signed module component descriptor that's hosted in a remote OCI registry. + diff --git a/docs/gen-docs/kyma_deploy.md b/docs/gen-docs/kyma_deploy.md index 0fae102fe..e2c53f247 100644 --- a/docs/gen-docs/kyma_deploy.md +++ b/docs/gen-docs/kyma_deploy.md @@ -28,7 +28,7 @@ kyma deploy [flags] - Deploy a specific branch of the Kyma repository on kyma-project.org: "kyma deploy --source=" - Deploy a commit (8 characters or more), for example: "kyma deploy --source=34edf09a" - Deploy a pull request, for example "kyma deploy --source=PR-9486" - - Deploy the local sources: "kyma deploy --source=local" (default "2.11.0") + - Deploy the local sources: "kyma deploy --source=local" (default "2.11.2") -t, --timeout duration Maximum time for the deployment. (default 20m0s) --tls-crt string TLS certificate file for the domain used for installation. --tls-key string TLS key file for the domain used for installation. diff --git a/docs/gen-docs/kyma_init_function.md b/docs/gen-docs/kyma_init_function.md index f0e082074..067da0f0a 100644 --- a/docs/gen-docs/kyma_init_function.md +++ b/docs/gen-docs/kyma_init_function.md @@ -23,9 +23,9 @@ kyma init function [flags] --reference string Commit hash or branch name (default "main") --repository-name string The name of the Git repository to be created -r, --runtime string Flag used to define the environment for running your Function. Use one of these options: - - nodejs14 + - nodejs14 (deprecated) - nodejs16 - - python39 (default "nodejs14") + - python39 (default "nodejs16") --runtime-image-override string Set custom runtime image base. --url string Git repository URL --vscode Generate VS Code settings containing config.yaml JSON schema for autocompletion (see "kyma get schema -h" for more info) diff --git a/docs/gen-docs/kyma_provision_gardener_aws.md b/docs/gen-docs/kyma_provision_gardener_aws.md index ed1ac385f..34e5257dd 100644 --- a/docs/gen-docs/kyma_provision_gardener_aws.md +++ b/docs/gen-docs/kyma_provision_gardener_aws.md @@ -26,7 +26,7 @@ kyma provision gardener aws [flags] --hibernation-end string Cron expression to configure when the cluster should stop hibernating --hibernation-location string Timezone in which the hibernation schedule should be applied. (default "Europe/Berlin") --hibernation-start string Cron expression to configure when the cluster should start hibernating (default "00 18 * * 1,2,3,4,5") - -k, --kube-version string Kubernetes version of the cluster. (default "1.24") + -k, --kube-version string Kubernetes version of the cluster. (default "1.25") -n, --name string Name of the cluster to provision. (required) -p, --project string Name of the Gardener project where you provision the cluster. (required) -r, --region string Region of the cluster. (default "eu-west-3") diff --git a/docs/gen-docs/kyma_provision_gardener_az.md b/docs/gen-docs/kyma_provision_gardener_az.md index 21e813294..b883f5fd0 100644 --- a/docs/gen-docs/kyma_provision_gardener_az.md +++ b/docs/gen-docs/kyma_provision_gardener_az.md @@ -25,7 +25,7 @@ kyma provision gardener az [flags] --hibernation-end string Cron expression to configure when the cluster should stop hibernating --hibernation-location string Timezone in which the hibernation schedule should be applied. (default "Europe/Berlin") --hibernation-start string Cron expression to configure when the cluster should start hibernating (default "00 18 * * 1,2,3,4,5") - -k, --kube-version string Kubernetes version of the cluster. (default "1.24") + -k, --kube-version string Kubernetes version of the cluster. (default "1.25") -n, --name string Name of the cluster to provision. (required) -p, --project string Name of the Gardener project where you provision the cluster. (required) -r, --region string Region of the cluster. (default "westeurope") diff --git a/docs/gen-docs/kyma_provision_gardener_gcp.md b/docs/gen-docs/kyma_provision_gardener_gcp.md index 0244cc651..7b2eff162 100644 --- a/docs/gen-docs/kyma_provision_gardener_gcp.md +++ b/docs/gen-docs/kyma_provision_gardener_gcp.md @@ -26,7 +26,7 @@ kyma provision gardener gcp [flags] --hibernation-end string Cron expression to configure when the cluster should stop hibernating --hibernation-location string Timezone in which the hibernation schedule should be applied. (default "Europe/Berlin") --hibernation-start string Cron expression to configure when the cluster should start hibernating (default "00 18 * * 1,2,3,4,5") - -k, --kube-version string Kubernetes version of the cluster. (default "1.24") + -k, --kube-version string Kubernetes version of the cluster. (default "1.25") -n, --name string Name of the cluster to provision. (required) -p, --project string Name of the Gardener project where you provision the cluster. (required) -r, --region string Region of the cluster. (default "europe-west3") diff --git a/docs/gen-docs/kyma_provision_k3d.md b/docs/gen-docs/kyma_provision_k3d.md index ebe085534..e1c2e5503 100644 --- a/docs/gen-docs/kyma_provision_k3d.md +++ b/docs/gen-docs/kyma_provision_k3d.md @@ -17,7 +17,7 @@ kyma provision k3d [flags] ```bash --k3d-arg strings One or more arguments passed to the k3d provisioning command (e.g. --k3d-arg='--no-rollback') -s, --k3s-arg strings One or more arguments passed from k3d to the k3s command (format: ARG@NODEFILTER[;@NODEFILTER]) - -k, --kube-version string Kubernetes version of the cluster (default "1.24.6") + -k, --kube-version string Kubernetes version of the cluster (default "1.25.6") --name string Name of the Kyma cluster (default "kyma") -p, --port strings Map ports 80 and 443 of K3D loadbalancer (e.g. -p 80:80@loadbalancer -p 443:443@loadbalancer) (default [80:80@loadbalancer,443:443@loadbalancer]) --registry-port string Specify the port on which the k3d registry will be exposed (default "5001") diff --git a/go.mod b/go.mod index 631e8f65e..10a11ced7 100644 --- a/go.mod +++ b/go.mod @@ -3,99 +3,129 @@ module github.com/kyma-project/cli go 1.18 // required to avoid locking with gardner dependency updates -replace k8s.io/client-go => k8s.io/client-go v0.26.0 +replace k8s.io/client-go => k8s.io/client-go v0.26.1 require ( github.com/Masterminds/semver/v3 v3.2.0 github.com/avast/retry-go v3.0.0+incompatible github.com/blang/semver/v4 v4.0.0 - github.com/briandowns/spinner v1.21.0 - github.com/containerd/containerd v1.6.15 + github.com/briandowns/spinner v1.22.0 + github.com/containerd/containerd v1.6.19 github.com/daviddengcn/go-colortext v1.0.0 - github.com/docker/cli v20.10.21+incompatible - github.com/docker/docker v20.10.21+incompatible + github.com/docker/cli v20.10.23+incompatible + github.com/docker/docker v20.10.23+incompatible github.com/docker/go-connections v0.4.0 github.com/fatih/color v1.14.1 - github.com/gardener/component-spec/bindings-go v0.0.66 github.com/go-git/go-git/v5 v5.5.2 github.com/go-logr/logr v1.2.3 + github.com/go-logr/zapr v1.2.3 github.com/imdario/mergo v0.3.13 github.com/kyma-incubator/reconciler v0.0.0-20230203092534-fd85106be3cd github.com/kyma-project/hydroform/function v0.0.0-20221202082519-8cd1c2a4c268 github.com/kyma-project/hydroform/provision v0.0.0-20230127124234-b67611c40868 + github.com/kyma-project/lifecycle-manager v0.0.0-20230228084539-adc0e4a5f93a github.com/mandelsoft/vfs v0.0.0-20220805210647-bf14a11bfe31 + github.com/open-component-model/ocm v0.1.0 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0-rc2 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.6.1 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.2 go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 + golang.org/x/exp v0.0.0-20221212164502-fae10dda9338 gopkg.in/yaml.v3 v3.0.1 gotest.tools v2.2.0+incompatible helm.sh/helm/v3 v3.11.1 - istio.io/client-go v1.16.1 + istio.io/client-go v1.17.1 k8s.io/api v0.26.1 - k8s.io/apiextensions-apiserver v0.26.0 + k8s.io/apiextensions-apiserver v0.26.1 k8s.io/apimachinery v0.26.1 + k8s.io/cli-runtime v0.26.1 k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible - sigs.k8s.io/controller-runtime v0.13.1 + k8s.io/klog/v2 v2.90.0 + sigs.k8s.io/controller-runtime v0.14.4 + sigs.k8s.io/kustomize/api v0.12.1 + sigs.k8s.io/kustomize/kyaml v0.13.9 sigs.k8s.io/yaml v1.3.0 ) require ( cloud.google.com/go v0.105.0 // indirect - cloud.google.com/go/compute v1.12.1 // indirect + cloud.google.com/go/compute v1.13.0 // indirect cloud.google.com/go/compute/metadata v0.2.1 // indirect - cloud.google.com/go/logging v1.5.0 // indirect - cloud.google.com/go/longrunning v0.1.1 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + cloud.google.com/go/logging v1.6.1 // indirect + cloud.google.com/go/longrunning v0.3.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/BurntSushi/toml v1.2.1 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Masterminds/squirrel v1.5.3 // indirect - github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/Microsoft/hcsshim v0.9.6 // indirect + github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/Microsoft/hcsshim v0.9.7 // indirect github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect github.com/acomagu/bufpipe v1.0.3 // indirect github.com/andybalholm/brotli v1.0.4 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect + github.com/aws/aws-sdk-go-v2 v1.16.10 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.4 // indirect + github.com/aws/aws-sdk-go-v2/config v1.15.17 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.12.12 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.11 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.23 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.11 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.8 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.12 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.11 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.11 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.27.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.11.15 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.16.12 // indirect + github.com/aws/smithy-go v1.12.1 // indirect github.com/benbjohnson/clock v1.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect github.com/cloudflare/circl v1.1.0 // indirect github.com/containerd/cgroups v1.0.4 // indirect + github.com/containers/image/v5 v5.20.0 // indirect + github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a // indirect + github.com/containers/ocicrypt v1.1.3 // indirect + github.com/containers/storage v1.38.2 // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/cyphar/filepath-securejoin v0.2.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect + github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect github.com/docker/go-metrics v0.0.1 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect github.com/fatih/structs v1.1.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fvbommel/sortorder v1.0.1 // indirect github.com/gardener/gardener v1.53.2 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-cmd/cmd v1.4.1 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-git/gcfg v1.5.0 // indirect github.com/go-git/go-billy/v5 v5.4.0 // indirect - github.com/go-gorp/gorp/v3 v3.0.2 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.21.1 // indirect + github.com/go-gorp/gorp/v3 v3.1.0 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-migrate/migrate/v4 v4.15.1 // indirect @@ -105,28 +135,32 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-github/v45 v45.2.0 // indirect + github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect - github.com/googleapis/gax-go/v2 v2.6.0 // indirect + github.com/googleapis/gax-go/v2 v2.7.0 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/gosuri/uitable v0.0.4 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/huandu/xstrings v1.3.3 // indirect + github.com/huandu/xstrings v1.4.0 // indirect github.com/iancoleman/orderedmap v0.2.0 // indirect github.com/iancoleman/strcase v0.2.0 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/invopop/jsonschema v0.5.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/invopop/jsonschema v0.7.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/jellydator/ttlcache/v3 v3.0.1 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmoiron/sqlx v1.3.5 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.15.11 // indirect + github.com/klauspost/compress v1.15.15 // indirect github.com/klauspost/pgzip v1.2.5 // indirect github.com/kyma-project/istio/operator v0.0.0-20221129102055-d37c5c8e6add // indirect github.com/kyma-project/module-manager/operator v0.0.0-20221020113457-620af4f4b365 // indirect @@ -136,13 +170,17 @@ require ( github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/mandelsoft/filepath v0.0.0-20200909114706-3df73d378d55 // indirect + github.com/mandelsoft/filepath v0.0.0-20220503095057-4432a2285b68 // indirect + github.com/mandelsoft/logging v0.0.0-20221114215048-ab754b164dd6 // indirect + github.com/mandelsoft/spiff v1.7.0-beta-3 // indirect + github.com/marstr/guid v1.1.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-sqlite3 v1.14.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mholt/archiver/v3 v3.5.1 // indirect + github.com/miekg/pkcs11 v1.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -150,7 +188,7 @@ require ( github.com/moby/locker v1.0.1 // indirect github.com/moby/moby v20.10.21+incompatible // indirect github.com/moby/spdystream v0.2.0 // indirect - github.com/moby/sys/mount v0.3.2 // indirect + github.com/moby/sys/mount v0.3.3 // indirect github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -170,12 +208,12 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/rivo/uniseg v0.2.0 // indirect - github.com/rubenv/sql-migrate v1.2.0 // indirect + github.com/prometheus/common v0.39.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect + github.com/rivo/uniseg v0.4.3 // indirect + github.com/rubenv/sql-migrate v1.3.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/sergi/go-diff v1.1.0 // indirect + github.com/sergi/go-diff v1.2.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/skeema/knownhosts v1.1.0 // indirect @@ -188,49 +226,51 @@ require ( github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/testcontainers/testcontainers-go v0.13.0 // indirect + github.com/theupdateframework/notary v0.7.0 // indirect + github.com/tonglil/buflogr v1.0.1 // indirect github.com/traefik/yaegi v0.14.3 // indirect github.com/ulikunitz/xz v0.5.10 // indirect + github.com/vbatts/tar-split v0.11.2 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xlab/treeprint v1.1.0 // indirect - go.opencensus.io v0.23.1-0.20220331163232-052120675fac // indirect - go.starlark.net v0.0.0-20220714194419-4cadf0a12139 // indirect + go.opencensus.io v0.24.0 // indirect + go.starlark.net v0.0.0-20230128213706-3f75dec8e403 // indirect go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.8.0 // indirect + go.uber.org/multierr v1.9.0 // indirect golang.org/x/crypto v0.5.0 // indirect - golang.org/x/net v0.5.0 // indirect - golang.org/x/oauth2 v0.2.0 // indirect + golang.org/x/mod v0.8.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/oauth2 v0.4.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.4.0 // indirect - golang.org/x/term v0.4.0 // indirect - golang.org/x/text v0.6.0 // indirect - golang.org/x/time v0.2.0 // indirect - google.golang.org/api v0.102.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.6.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/api v0.103.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c // indirect - google.golang.org/grpc v1.50.1 // indirect + google.golang.org/genproto v0.0.0-20230202175211-008b39050e57 // indirect + google.golang.org/grpc v1.52.3 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - istio.io/api v0.0.0-20221208070204-0528cb6ce63b // indirect + istio.io/api v0.0.0-20230217221049-9d422bf48675 // indirect istio.io/istio v0.0.0-20221109080248-089f536c0f26 // indirect istio.io/pkg v0.0.0-20221031153201-960bb47e80ce // indirect - k8s.io/apiserver v0.26.0 // indirect - k8s.io/cli-runtime v0.26.0 // indirect - k8s.io/component-base v0.26.0 // indirect - k8s.io/klog/v2 v2.80.1 // indirect - k8s.io/kube-openapi v0.0.0-20221106113015-f73e7dbcfe29 // indirect - k8s.io/kubectl v0.26.0 // indirect - k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect + k8s.io/apiserver v0.26.1 // indirect + k8s.io/component-base v0.26.1 // indirect + k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 // indirect + k8s.io/kubectl v0.26.1 // indirect + k8s.io/utils v0.0.0-20230202215443-34013725500c // indirect oras.land/oras-go v1.2.2 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/kustomize/api v0.12.1 // indirect - sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) diff --git a/go.sum b/go.sum index 97a40f934..c24d8bea4 100644 --- a/go.sum +++ b/go.sum @@ -29,10 +29,8 @@ cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aD cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -41,24 +39,19 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.13.0 h1:AYrLkB8NPdDRslNp4Jxmzrhdr03fUAIDbiGFjLWowoU= +cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/logging v1.5.0 h1:DcR52smaYLgeK9KPzJlBJyyBYqW/EGKiuRRl8boL1s4= -cloud.google.com/go/logging v1.5.0/go.mod h1:c/57U/aLdzSFuBtvbtFduG1Ii54uSm95HOBnp58P7/U= -cloud.google.com/go/longrunning v0.1.1 h1:y50CXG4j0+qvEukslYFBCrzaXX0qpFbBzc3PchSu/LE= -cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/iam v0.8.0 h1:E2osAkZzxI/+8pZcxVLcDtAQx/u+hZXVryUaYQ5O0Kk= +cloud.google.com/go/logging v1.6.1 h1:ZBsZK+JG+oCDT+vaxwqF2egKNRjz8soXiS6Xv79benI= +cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= +cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= +cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -70,15 +63,16 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= +github.com/14rcole/gopopulate v0.0.0-20180821133914-b175b219e774/go.mod h1:6/0dYRLLXyJjbkIPeeGyoJ/eKOSI0eU6eTlCBYibgd0= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-storage-blob-go v0.14.0/go.mod h1:SMqIBi+SuiQH32bvyjngEewEeXoPfKMgWlBDaYf6fck= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= 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 v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= @@ -88,14 +82,15 @@ github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935 github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= @@ -103,7 +98,7 @@ github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF0 github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/sprig/v3 v3.2.0/go.mod h1:tWhwTbUTndesPNeF0C900vKoq283u6zp4APT9vaF3SI= +github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Masterminds/squirrel v1.5.3 h1:YPpoceAcxuzIljlr5iWpNKaql7hLeG1KLSrhvdHpkZc= @@ -117,8 +112,10 @@ github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JP github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= @@ -128,20 +125,27 @@ github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= -github.com/Microsoft/hcsshim v0.9.6 h1:VwnDOgLeoi2du6dAznfmspNqTiwczvjv4K7NxuY9jsY= -github.com/Microsoft/hcsshim v0.9.6/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= +github.com/Microsoft/hcsshim v0.9.2/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= +github.com/Microsoft/hcsshim v0.9.7 h1:mKNHW/Xvv1aFH87Jb6ERDzXTJTLPlmzfZ28VBFD/bfg= +github.com/Microsoft/hcsshim v0.9.7/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 h1:ra2OtmuW0AE5csawV4YXMNGNQQXvLRps3z2Z59OPO+I= github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20170309145241-6dbc35f2c30d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= +github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= +github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -150,11 +154,11 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= 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= @@ -164,7 +168,9 @@ github.com/apache/arrow/go/arrow v0.0.0-20211013220434-5962184e7a30/go.mod h1:Q7 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -176,33 +182,70 @@ github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZo github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v1.8.0/go.mod h1:xEFuWz+3TYdlPRuo+CqATbeDWIWyaT5uAPwPaWtgse0= github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2 v1.16.10 h1:+yDD0tcuHRQZgqONkpDwzepqmElQaSlFPymHRHR9mrc= +github.com/aws/aws-sdk-go-v2 v1.16.10/go.mod h1:WTACcleLz6VZTp7fak4EO5b9Q4foxbn+8PIz3PmyKlo= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.4 h1:zfT11pa7ifu/VlLDpmc5OY2W4nYmnKkFDGeMVnmqAI0= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.4/go.mod h1:ES0I1GBs+YYgcDS1ek47Erbn4TOL811JKqBXtgzqyZ8= github.com/aws/aws-sdk-go-v2/config v1.6.0/go.mod h1:TNtBVmka80lRPk5+S9ZqVfFszOQAGJJ9KbT3EM3CHNU= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= +github.com/aws/aws-sdk-go-v2/config v1.15.17 h1:cM/4dqEPc5SjBOeYVdUI7iL/B6jDupCesXzg3AuUzRE= +github.com/aws/aws-sdk-go-v2/config v1.15.17/go.mod h1:eatrtwIm5WdvASoYCy5oPkinfiwiYFg2jLG9tJoKzkE= github.com/aws/aws-sdk-go-v2/credentials v1.3.2/go.mod h1:PACKuTJdt6AlXvEq8rFI4eDmoqDFC5DpVKQbWysaDgM= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= +github.com/aws/aws-sdk-go-v2/credentials v1.12.12 h1:iShu6VaWZZZfUZvlGtRjl+g1lWk44g1QmiCTD4KS0jI= +github.com/aws/aws-sdk-go-v2/credentials v1.12.12/go.mod h1:vFHC2HifIWHebmoVsfpqliKuqbAY2LaVlvy03JzF4c4= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.4.0/go.mod h1:Mj/U8OpDbcVcoctrYwA2bak8k/HFPdcLzI/vaiXMwuM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.11 h1:zZHPdM2x09/0F8D7XyVvQnP2/jaW7bEMmtcSCPYq/iI= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.11/go.mod h1:38Asv/UyQbDNpSXCurZRlDMjzIl6J+wUe8vY3TtUuzA= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.4.0/go.mod h1:eHwXu2+uE/T6gpnYWwBwqoeqRf9IXyCcolyOWDRAErQ= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.5.4/go.mod h1:Ex7XQmbFmgFHrjUX6TN3mApKW5Hglyga+F7wZHTtYhA= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.23 h1:lzS1GSHBzvBMlCA030/ecL5tF2ip8RLr/LBq5fBpv/4= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.23/go.mod h1:yGuKwoNVv2eGUHlp7ciCQLHmFNeESebnHucZfRL9EkA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.17 h1:U8DZvyFFesBmK62dYC6BRXm4Cd/wPP3aPcecu3xv/F4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.17/go.mod h1:6qtGip7sJEyvgsLjphRZWF9qPe3xJf1mL/MM01E35Wc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.11 h1:GMp98usVW5tzQhxd26KWhoNQPlR2noIlfbzqjVGBhLU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.11/go.mod h1:cYAfnB+9ZkmZWpQWmPDsuIGm4EA+6k2ZVtxKjw/XJBY= github.com/aws/aws-sdk-go-v2/internal/ini v1.2.0/go.mod h1:Q5jATQc+f1MfZp3PDMhn6ry18hGvE0i8yvbXoKbnZaE= github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.18 h1:/spg6h3tG4pefphbvhpgdMtFMegSajPPSEJd1t8lnpc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.18/go.mod h1:hTHq8hL4bAxJyng364s9d4IUGXZOs7Y5LSqAhIiIQ2A= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.8 h1:9PY5a+kHQzC6d9eR+KLNSJP3DHDLYmPFA5/+eSDBo9o= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.8/go.mod h1:pcQfUOFVK4lMnSzgX3dCA81UsA9YCilRUSYgkjSU2i8= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.2.2/go.mod h1:EASdTcM1lGhUe1/p4gkojHwlGJkeoRjjr1sRCzup3Is= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.3.0/go.mod h1:v8ygadNyATSm6elwJ/4gzJwcFhri9RqS8skgHKiwXPU= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.4 h1:akfcyqM9SvrBKWZOkBcXAGDrHfKaEP4Aca8H/bCiLW8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.4/go.mod h1:oehQLbMQkppKLXvpx/1Eo0X47Fe+0971DXC9UjGnKcI= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.12 h1:eNQYkKjDSLDjIbBQ85rIkjpBGgnavrl/U3YKDdxAz14= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.12/go.mod h1:k2HaF2yfT082M+kKo3Xdf4rd5HGKvDmrPC5Kwzc2KUw= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.2.2/go.mod h1:NXmNI41bdEsJMrD0v9rUvbGCB5GwdBEpKvUvIY3vTFg= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.11 h1:GkYtp4gi4wdWUV+pPetjk5y2aDxbr0t8n5OjVBwZdII= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.11/go.mod h1:OEofCUKF7Hri4ShOCokF6k6hGq9PCB2sywt/9rLSXjY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.5.2/go.mod h1:QuL2Ym8BkrLmN4lUofXYq6000/i5jPjosCNK//t6gak= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.7.2/go.mod h1:np7TMuJNT83O0oDOSF8i4dF3dvGqA6hPYYo6YYkzgRA= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.11 h1:ZBLEKweAzBBtJa8H+MTFfVyvo+eHdM8xec5oTm9IlqI= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.11/go.mod h1:mNS1VHxYXPNqxIdCTxf87j9ROfTMa4fNpIkA+iAfz0g= github.com/aws/aws-sdk-go-v2/service/s3 v1.12.0/go.mod h1:6J++A5xpo7QDsIeSqPK4UHqMSyPOCopa+zKtqAMhqVQ= github.com/aws/aws-sdk-go-v2/service/s3 v1.16.1/go.mod h1:CQe/KvWV1AqRc65KqeJjrLzr5X2ijnFTTVzJW0VBRCI= +github.com/aws/aws-sdk-go-v2/service/s3 v1.27.4 h1:0RPAahwT63znFepvhfS+/WYtT+gEuAwaeNcCrzTQMH0= +github.com/aws/aws-sdk-go-v2/service/s3 v1.27.4/go.mod h1:wcpDmROpK5W7oWI6JcJIYGrVpHbF/Pu+FHxyBXyoa1E= github.com/aws/aws-sdk-go-v2/service/sso v1.3.2/go.mod h1:J21I6kF+d/6XHVk7kp/cx9YVD2TMD2TbLwtRGVcinXo= github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= +github.com/aws/aws-sdk-go-v2/service/sso v1.11.15 h1:HaIE5/TtKr66qZTJpvMifDxH4lRt2JZawbkLYOo1F+Y= +github.com/aws/aws-sdk-go-v2/service/sso v1.11.15/go.mod h1:dDVD4ElJRTQXx7dOQ59EkqGyNU9tnwy1RKln+oLIOTU= github.com/aws/aws-sdk-go-v2/service/sts v1.6.1/go.mod h1:hLZ/AnkIKHLuPGjEiyghNEdvJ2PP0MgOxcmv9EBJ4xs= github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= +github.com/aws/aws-sdk-go-v2/service/sts v1.16.12 h1:YU9UHPukkCCnETHEExOptF/BxPvGJKXO/NBx+RMQ/2A= +github.com/aws/aws-sdk-go-v2/service/sts v1.16.12/go.mod h1:b53qpmhHk7mTL2J/tfG6f38neZiyBQSiNXGCuNKq4+4= github.com/aws/smithy-go v1.7.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/aws/smithy-go v1.12.1 h1:yQRC55aXN/y1W10HgwHle01DRuV9Dpf31iGkotjt3Ag= +github.com/aws/smithy-go v1.12.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/b4b4r07/go-pipe v0.0.0-20191010045404-84b446f57366/go.mod h1:1ymsiQNa3qebVEEVtuIdhtAXRfjO4qFCFq1bBUOT2HE= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20150223135152-b965b613227f/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 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= @@ -210,9 +253,11 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= +github.com/bitly/go-hostpool v0.1.0/go.mod h1:4gOCgp6+NZnVqlKyZ/iBZFTAJKembaVENUpMkpg42fw= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= @@ -220,14 +265,15 @@ 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/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/briandowns/spinner v1.21.0 h1:2lVBzf3iZ3cT/ulVXljc4BzlL3yTWZDzsGsamI7si+A= -github.com/briandowns/spinner v1.21.0/go.mod h1:TcwZHb7Wb6vn/+bcVv1UXEzaA4pLS7yznHlkY/HzH44= +github.com/briandowns/spinner v1.22.0 h1:fJ/7tyeM2q9ebM57kGfjnUSrgPJBsULk+/s61UpMGrw= +github.com/briandowns/spinner v1.22.0/go.mod h1:rPG4gmXeN3wQV/TsAY4w8lPdIM6RX3yqeBQJSrbXjuE= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/bugsnag-go v1.0.5-0.20150529004307-13fd6b8acda0 h1:s7+5BfS4WFJoVF9pnB8kBk03S7pZXRdKamnV0FOl5Sc= +github.com/bugsnag/bugsnag-go v1.0.5-0.20150529004307-13fd6b8acda0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= @@ -239,11 +285,14 @@ github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= 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 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= +github.com/cert-manager/cert-manager v1.11.0 h1:sChJmoj9hhWuFkQMDYHnLHgYA/sSVil+hY+A1lnD3jY= 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 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.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/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= @@ -258,10 +307,16 @@ github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004 h1:lkAMpLVBDaj17e85keuznYcH5rqI438v41pKcBl4ZxQ= +github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY= github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= +github.com/cloudfoundry-incubator/candiedyaml v0.0.0-20170901234223-a41693b7b7af h1:6Cpkahw28+gcBdnXQL7LcMTX488+6jl6hfoTMRT6Hm4= +github.com/cloudfoundry-incubator/candiedyaml v0.0.0-20170901234223-a41693b7b7af/go.mod h1:dOLSIXcRQJiDS1vlrYFNJicoHNZLsBKideE+70hGdV4= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -271,6 +326,7 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20220520190051-1e77728a1eaa h1:B/lvg4tQ5hfFZd4V2hcSfFVfUvAK6GSFKxIIzwnkv8g= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go/v2 v2.1.1/go.mod h1:7NtUnP6eK+l6k483WSYNrq3Kb23bWV10IRV1TyeSpwM= @@ -313,8 +369,8 @@ github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoT github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= github.com/containerd/containerd v1.5.9/go.mod h1:fvQqCfadDGga5HZyn3j4+dx56qj2I9YwBrlSdalvJYQ= -github.com/containerd/containerd v1.6.15 h1:4wWexxzLNHNE46aIETc6ge4TofO550v+BlLoANrbses= -github.com/containerd/containerd v1.6.15/go.mod h1:U2NnBPIhzJDm59xF7xB2MMHnKtggpZ+phKg8o2TKj2c= +github.com/containerd/containerd v1.6.19 h1:F0qgQPrG0P2JPgwpxWxYavrVeXAG0ezUIB9Z/4FTUAU= +github.com/containerd/containerd v1.6.19/go.mod h1:HZCDMn4v/Xl2579/MvtOC2M206i+JJ6VxFWU/NetrGY= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -344,6 +400,7 @@ github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFY github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM= +github.com/containerd/stargz-snapshotter/estargz v0.11.0/go.mod h1:/KsZXsJRllMbTKFfG0miFQWViQKdI9+9aSXs+HN0+ac= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= @@ -364,11 +421,21 @@ github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= +github.com/containers/image/v5 v5.20.0 h1:BYFMRvYqmEHnHo0sjTbnLbj0fzkGLDx6P57lszm30B4= +github.com/containers/image/v5 v5.20.0/go.mod h1:5UL1ooih6+USVYXk19r8ScQNsbTprhlJxrHezAu4OVE= +github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a h1:spAGlqziZjCJL25C6F1zsQY05tfCKE9F5YwtEWWe6hU= +github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY= github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= +github.com/containers/ocicrypt v1.1.2/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= +github.com/containers/ocicrypt v1.1.3 h1:uMxn2wTb4nDR7GqG3rnZSfpJXqWURfzZ7nKydzIeKpA= +github.com/containers/ocicrypt v1.1.3/go.mod h1:xpdkbVAuaH3WzbEabUd5yDsl9SwJA5pABH85425Es2g= +github.com/containers/storage v1.38.2 h1:8bAIxnVBGKzMw5EWCivVj24bztQT6IkDp4uHiyhnzwE= +github.com/containers/storage v1.38.2/go.mod h1:INP0RPLHWBxx+pTsO5uiHlDUGHDFvWZPWprAbAlQWPQ= 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= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -386,6 +453,7 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -399,12 +467,14 @@ github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1S github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= +github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/daviddengcn/go-colortext v1.0.0 h1:ANqDyC0ys6qCSvuEK7l3g5RaehL/Xck9EX8ATG8oKsE= github.com/daviddengcn/go-colortext v1.0.0/go.mod h1:zDqEI5NVUop5QPpVJUxE9UO10hRnmkD5G4Pmri9+m4c= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d h1:1iy2qD6JEhHKKhUOA9IWs7mjco7lnw2qx8FsRI2wirE= +github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= @@ -417,21 +487,26 @@ github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aB github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/cli v20.10.21+incompatible h1:qVkgyYUnOLQ98LtXBrwd/duVqPT2X4SHndOuGsfwyhU= -github.com/docker/cli v20.10.21+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.23+incompatible h1:qwyha/T3rXk9lfuVcn533cKFc7n/6IzL5GXVAgMVPBg= +github.com/docker/cli v20.10.23+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog= -github.com/docker/docker v20.10.21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.23+incompatible h1:1ZQUUYAdh+oylOT85aA2ZcfRp22jmLhoaEcVEfK8dyA= +github.com/docker/docker v20.10.23+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= +github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= +github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= +github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -443,8 +518,9 @@ github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHz github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/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/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY= @@ -452,6 +528,7 @@ github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj6 github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= 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/dvsekhvalnov/jose2go v0.0.0-20170216131308-f21a8cedbbae/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 h1:pEtiCjIXx3RvGjlUJuCNxNOw0MNblyR9Wi+vJGBFh+8= @@ -460,8 +537,10 @@ github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8 github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= +github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -472,10 +551,13 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/go-control-plane v0.10.3-0.20221102231857-7c4facc13f86 h1:10Mofs8B4XdKfQfN8kDfcVVudXUhDsAR+xlzt8rurpU= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/envoyproxy/protoc-gen-validate v0.6.8 h1:B2cR/FAaiMtYDHv5BQpaqtkjGuWQIgr2KQZtHQ7f6i8= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= @@ -486,36 +568,41 @@ github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2 github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/fvbommel/sortorder v1.0.1 h1:dSnXLt4mJYH25uDDGa3biZNQsozaUWDSWeKJ0qqFfzE= +github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/gabriel-vasile/mimetype v1.3.1/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmxRtOJlERCzSmRvr8= github.com/gabriel-vasile/mimetype v1.4.0/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmxRtOJlERCzSmRvr8= -github.com/gardener/component-spec/bindings-go v0.0.66 h1:FvtnnTxXJi2ZCC/GgijUNJCcwwdlZAiEWpZTtyHviz0= -github.com/gardener/component-spec/bindings-go v0.0.66/go.mod h1:qr7kADDXbXB0huul+ih/B43YkwyiMFYQepp/tqJ331c= github.com/gardener/gardener v1.53.2 h1:X7NuzKuTRiyrc4YHFuXN6QBAOnXEOSxUSDHi4Qcr8zg= github.com/gardener/gardener v1.53.2/go.mod h1:O+59kTQavqxX5nr5jyHqD6o4JxIukHMaW2t5BLiXqmc= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-cmd/cmd v1.4.1 h1:JUcEIE84v8DSy02XTZpUDeGKExk2oW3DA10hTjbQwmc= @@ -528,60 +615,67 @@ github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2H github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-billy/v5 v5.4.0 h1:Vaw7LaSTRJOUric7pe4vnzBSgyuf2KrLsu2Y4ZpQBDE= github.com/go-git/go-billy/v5 v5.4.0/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= +github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ= github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= +github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-git/go-git/v5 v5.5.2 h1:v8lgZa5k9ylUw+OR/roJHTxR4QItsNFI5nKtAXFuynw= github.com/go-git/go-git/v5 v5.5.2/go.mod h1:BE5hUJ5yaV2YMxhmaP4l6RBQ08kMxKSPD4BlxtH7OjI= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gorp/gorp/v3 v3.0.2 h1:ULqJXIekoqMx29FI5ekXXFoH1dT2Vc8UhnRzBg+Emz4= github.com/go-gorp/gorp/v3 v3.0.2/go.mod h1:BJ3q1ejpV8cVALtcXvXaXyTOlMmJhWDxTmncaR6rwBY= +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.25.4/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= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= +github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= @@ -630,6 +724,7 @@ github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= @@ -695,7 +790,9 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= 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.12.5 h1:DmzaiSgoaqGCjtpPQWl26/gND+yRpim56H1jCVev6d8= +github.com/google/cel-go v0.12.6 h1:kjeKudqV0OygrAqA9fX6J55S8gj+Jre2tckIm5RoG4M= +github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93 h1:jc2UWq7CbdszqeH6qu1ougXMIUBfSy8Pbh/anURYbGI= +github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= @@ -718,7 +815,12 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= github.com/google/go-github/v35 v35.2.0/go.mod h1:s0515YVTI+IMrDoy9Y4pHt9ShGpzHvHO8rZ7L7acgvs= +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-intervals v0.0.2/go.mod h1:MkaR3LNRfeKLPmqgJYs4E66z5InYjmCjbbr4TQlcT6Y= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +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= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -744,6 +846,7 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210715191844-86eeefc3e471/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20220829040838-70bd9ae97f40 h1:ykKxL12NZd3JmWZnyqarJGsF73M9Xhtrik/FEtEeFRE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -753,25 +856,21 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -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/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -791,22 +890,32 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf 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= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -815,17 +924,25 @@ github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA 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= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= github.com/iancoleman/orderedmap v0.2.0 h1:sq1N/TFpYH++aViPcaKjys3bDClUEU7s5B+z6jq8pNA= github.com/iancoleman/orderedmap v0.2.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= @@ -841,10 +958,11 @@ github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/invopop/jsonschema v0.5.0 h1:6tvpBcwTGxzvx3M9f3IfzqQVyZvoH+0NRUtBcsgyfrU= -github.com/invopop/jsonschema v0.5.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/invopop/jsonschema v0.7.0 h1:2vgQcBz1n256N+FpX3Jq7Y17AjYt46Ig3zIWyy770So= +github.com/invopop/jsonschema v0.7.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= @@ -891,14 +1009,22 @@ github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jellydator/ttlcache/v3 v3.0.1 h1:cHgCSMS7TdQcoprXnWUptJZzyFsqs18Lt8VVhRuZYVU= +github.com/jellydator/ttlcache/v3 v3.0.1/go.mod h1:WwTaEmcXQ3MTjOm4bsZoDFiCu/hMvNWLO1w67RXz6h4= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8 h1:CZkYfurY6KGhVtlalI4QwQ6T0Cu6iuY3e0x5RLu96WE= +github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo= +github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jmoiron/sqlx v1.3.1/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= @@ -912,9 +1038,9 @@ github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUB github.com/joncalhoun/pipe v0.0.0-20170510025636-72505674a733/go.mod h1:2MNFZhLx2HMHTN4xKH6FhpoQWqmD8Ato8QOE2hp5hY4= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -922,8 +1048,8 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= @@ -934,6 +1060,8 @@ github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0Lh github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kevinburke/ssh_config v1.1.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -948,8 +1076,10 @@ github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdY github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= +github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -962,6 +1092,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= @@ -979,6 +1110,8 @@ github.com/kyma-project/hydroform/provision v0.0.0-20230127124234-b67611c40868 h github.com/kyma-project/hydroform/provision v0.0.0-20230127124234-b67611c40868/go.mod h1:ttfW/oPcTIMMtAqY9qpocdAaQ2A+5nN8ZQl2L+1rIac= github.com/kyma-project/istio/operator v0.0.0-20221129102055-d37c5c8e6add h1:ohTtnIlNXSQPHB/nMZvBXs+uBnTqQ6HRSgAvptyWzlc= github.com/kyma-project/istio/operator v0.0.0-20221129102055-d37c5c8e6add/go.mod h1:K5jDoHdqW8EI2vXX+7J+RnEmk4YQRnd6fTmuuSyQ3Qg= +github.com/kyma-project/lifecycle-manager v0.0.0-20230228084539-adc0e4a5f93a h1:I72FDYpnBAR5NhuN1ZR7Eaiyf+yKhlcWp1w5/rnnyiM= +github.com/kyma-project/lifecycle-manager v0.0.0-20230228084539-adc0e4a5f93a/go.mod h1:OKb7UrOS/2BgJh1XIlkrfL7EencCWkkTOQ1rYvkoA0s= github.com/kyma-project/module-manager/operator v0.0.0-20221020113457-620af4f4b365 h1:50FLPAynQ7++CJb2ZEdfnCRO68cDcJoa+eo3qUwElc4= github.com/kyma-project/module-manager/operator v0.0.0-20221020113457-620af4f4b365/go.mod h1:N0kmS8pTNXq+7/Bdr6vfogmw03H+uYMCauTQ6U6+kA0= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= @@ -991,6 +1124,7 @@ github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZ github.com/lestrrat-go/iter v1.0.1 h1:q8faalr2dY6o8bV45uwrxq12bRa1ezKrB6oM9FUgN4A= github.com/lestrrat-go/jwx v1.2.25 h1:tAx93jN2SdPvFn08fHNAhqFJazn5mBBOB8Zli0g0otA= github.com/lestrrat-go/option v1.0.0 h1:WqAWL8kh8VcSoD6xjSH34/1m8yxluXQbDeKNfvFeEO4= +github.com/lib/pq v0.0.0-20150723085316-0dad96c0b94f/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -1002,7 +1136,12 @@ github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= +github.com/magefile/mage v1.12.1/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/magiconair/properties v1.5.3/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.3/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= @@ -1013,10 +1152,17 @@ github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7 github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mandelsoft/filepath v0.0.0-20200909114706-3df73d378d55 h1:mFdiUG86O2iW+iDEpZKXf64efMWO4JvDT+zN3znUGIc= github.com/mandelsoft/filepath v0.0.0-20200909114706-3df73d378d55/go.mod h1:n4xEiUD2HNHnn2w5ZKF0qgjDecHVCWAl5DxZ7+pcFU8= +github.com/mandelsoft/filepath v0.0.0-20220503095057-4432a2285b68 h1:99GWPlKVS110Cm+/YRVRaUJN5CpTeWFazWg2sXJdf70= +github.com/mandelsoft/filepath v0.0.0-20220503095057-4432a2285b68/go.mod h1:n4xEiUD2HNHnn2w5ZKF0qgjDecHVCWAl5DxZ7+pcFU8= +github.com/mandelsoft/logging v0.0.0-20221114215048-ab754b164dd6 h1:xlUJPmMJo1IVQVn42ELLDUNY3sfwzKVp4kyuy7Q2QwI= +github.com/mandelsoft/logging v0.0.0-20221114215048-ab754b164dd6/go.mod h1:vxGpzOesdqLGRSWb4fz5DaH0ekJvkISst4qq6UZ2xFA= +github.com/mandelsoft/spiff v1.7.0-beta-3 h1:AvZldpnctpyfQqtAA5uxokD5rlCK52mGAXxg7tnW5Ag= +github.com/mandelsoft/spiff v1.7.0-beta-3/go.mod h1:3Kg6qrggWO4oc1k++acd6xhcWisJ2YkzxpVZpuYONGg= +github.com/mandelsoft/vfs v0.0.0-20201002080026-d03d33d5889a/go.mod h1:74aV7kulg9C434HiI3zNALN79QHc9IZMN+SI4UdLn14= github.com/mandelsoft/vfs v0.0.0-20220805210647-bf14a11bfe31 h1:5gmUtnP0NYOODvS/gTeQOJKSu4W8bOUImDiKdAb/j1A= github.com/mandelsoft/vfs v0.0.0-20220805210647-bf14a11bfe31/go.mod h1:74aV7kulg9C434HiI3zNALN79QHc9IZMN+SI4UdLn14= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/markbates/errx v1.1.0 h1:QDFeR+UP95dO12JgW+tgi2UVfo0V8YBHiUIOaeBPiEI= github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= @@ -1025,14 +1171,18 @@ github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2 github.com/markbates/pkger v0.15.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/marstr/guid v1.1.0 h1:/M4H/1G4avsieL6BbUwCOBzulmoeKVP5ux/3mQNnbyI= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= @@ -1042,17 +1192,23 @@ github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-oci8 v0.1.1/go.mod h1:wjDx6Xm9q7dFtHJvIlrI99JytznLw5wQ4R+9mNXJwGI= 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.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= 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-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= +github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= @@ -1067,10 +1223,16 @@ github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88J github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo= github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= +github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.4/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -1082,10 +1244,13 @@ github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQ github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20150613213606-2caf8efc9366/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= @@ -1099,12 +1264,11 @@ github.com/moby/moby v20.10.21+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBm github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM= -github.com/moby/sys/mount v0.3.2 h1:uq/CiGDZPvr+c85RYHtKIUORFbmavBUyWH3E1NEyjqI= -github.com/moby/sys/mount v0.3.2/go.mod h1:iN27Ec0LtJ0Mx/++rE6t6mTdbbEEZd+oKfAHP1y6vHs= +github.com/moby/sys/mount v0.3.3 h1:fX1SVkXFJ47XWDoeFW4Sq7PdQJnV2QIDZAqjNqgEjUs= +github.com/moby/sys/mount v0.3.3/go.mod h1:PBaEorSNTLG5t/+4EgukEQVlAvVEc6ZjTySwKdqp5K0= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/mountinfo v0.6.1/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= @@ -1131,7 +1295,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mutecomm/go-sqlcipher/v4 v4.4.0/go.mod h1:PyN04SaWalavxRGH9E8ZftG6Ju7rsPrGmQRjrEaVpiY= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= @@ -1157,6 +1320,7 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= 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/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= @@ -1164,7 +1328,7 @@ github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47 github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= -github.com/onsi/ginkgo/v2 v2.5.1 h1:auzK7OI497k6x4OvWq+TKAcpcSAlod0doAH72oIN0Jw= +github.com/onsi/ginkgo/v2 v2.8.3 h1:RpbK1G8nWPNaCVFBWsOGnEQQGgASi6b8fxcWBvDYjxQ= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -1172,6 +1336,7 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= @@ -1179,7 +1344,9 @@ github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeR github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/gomega v1.27.1 h1:rfztXRbg6nv/5f+Raen9RcGoSecHIFgBBLQK3Wdj754= +github.com/open-component-model/ocm v0.1.0 h1:K1RrHOWO3erTqPZkLKvQ0JRA/uGXGpHaS+uKkIrVZMk= +github.com/open-component-model/ocm v0.1.0/go.mod h1:aPlBtHOXiAVG9wy7vL1fIwwEjJwB0HMk5n16JlI5k2o= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1189,6 +1356,7 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.3-0.20211202193544-a5463b7f9c84/go.mod h1:Qnt1q4cjDNQI9bT832ziho5Iw2BhK8o1KwLOwW56VP4= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -1197,6 +1365,7 @@ github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runc v1.1.0/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.4 h1:nRCz/8sKg6K6jgYAFLDlXzPeITBZJyX28DBVhWD+5dg= github.com/opencontainers/runc v1.1.4/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -1210,6 +1379,9 @@ github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqi github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f/go.mod h1:J6OG6YJVEWopen4avK3VNQSnALmmjvniMmni/YFYAwc= github.com/otiai10/copy v1.9.0 h1:7KFNiCgZ91Ru4qW4CWPf/7jqtxLagGRmIxWldPP9VY4= github.com/otiai10/copy v1.9.0/go.mod h1:hsfX19wcn0UWIHUQ3/4fHuehhk2UyArQ9dVFAn3FczI= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= @@ -1220,10 +1392,12 @@ github.com/otiai10/mint v1.4.0/go.mod h1:gifjb2MYOoULtKLqUAEILUG/9KONW6f7YsJ6vQL github.com/panjf2000/ants/v2 v2.7.1 h1:qBy5lfSdbxvrR0yUnZfaEDjf0FlCw4ufsbcsxmE7r+M= github.com/panjf2000/ants/v2 v2.7.1/go.mod h1:KIBmYG9QQX5U2qzFP/yQJaq/nSb6rahS9iEHkrCMgM8= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= 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.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= @@ -1253,18 +1427,23 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pointlander/compress v1.1.0/go.mod h1:q5NXNGzqj5uPnVuhGkZfmgHqNUhf15VLi6L9kW0VEc0= +github.com/pointlander/jetset v1.0.0/go.mod h1:zY6+WHRPB10uzTajloHtybSicLW1bf6Rz0eSaU9Deng= +github.com/pointlander/peg v0.0.0-20160608205303-1d0268dfff9b/go.mod h1:WJTMcgeWYr6fZz4CwHnY1oWZCXew8GWCF93FaAxPrh4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/poy/onpar v0.0.0-20190519213022-ee068f8ea4d1 h1:oL4IBbcqwhhNWh31bjOX8C/OCy0zs9906d/VUru+bqg= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/poy/onpar v0.0.0-20190519213022-ee068f8ea4d1/go.mod h1:nSbFQvMj97ZyhFRSJYtut+msi4sOY6zJDGCdSc+/rZU= +github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/proglottis/gpgme v0.1.1/go.mod h1:fPbW/EZ0LvwQtH8Hy7eixhp1eF3G39dtx7GUN+0Gmy0= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.0-pre1.0.20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1279,11 +1458,10 @@ github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7q github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= +github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1295,40 +1473,47 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= +github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rubenv/sql-migrate v1.2.0 h1:fOXMPLMd41sK7Tg75SXDec15k3zg5WNV6SjuDRiNfcU= -github.com/rubenv/sql-migrate v1.2.0/go.mod h1:Z5uVnq7vrIrPmHbVFfR4YLHRZquxeHpckCnRq0P/K9Y= +github.com/rubenv/sql-migrate v1.3.0 h1:4/aYosSBTTDYKxRKdftREUV21d9hPc24mfIKZBosMsQ= +github.com/rubenv/sql-migrate v1.3.0/go.mod h1:rmTcbW9Xfv90gWPRV4stgofRrAagqmzlm6bQQzghoz0= +github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sebdah/goldie/v2 v2.5.3/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -1356,30 +1541,42 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.4.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.7/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= +github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= github.com/square/go-jose/v3 v3.0.0-20200630053402-0a67ce9b0693 h1:wD1IWQwAhdWclCwaf6DdzgCAe9Bfz1M+4AHRd7N786Y= @@ -1404,22 +1601,31 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/sylabs/release-tools v0.1.0/go.mod h1:pqP/z/11/rYMQ0OM/Nn7TxGijw7KfZwW9UolD/J1TUo= +github.com/sylabs/sif/v2 v2.3.2/go.mod h1:IrLX2pzmQ2O4qgv5iy3HdKJcBNYds9DTMd9Je8A9tX4= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tchap/go-patricia v2.3.0+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/testcontainers/testcontainers-go v0.13.0 h1:OUujSlEGsXVo/ykPVZk3KanBNGN0TYb/7oKIPVn15JA= github.com/testcontainers/testcontainers-go v0.13.0/go.mod h1:z1abufU633Eb/FmSBTzV6ntZAC1eZBYPtaFsn4nPuDk= +github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c= +github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tonglil/buflogr v1.0.1 h1:WXFZLKxLfqcVSmckwiMCF8jJwjIgmStJmg63YKRF1p0= +github.com/tonglil/buflogr v1.0.1/go.mod h1:yYWwvSpn/3uAaqjf6mJg/XMiAciaR0QcRJH2gJGDxNE= github.com/traefik/yaegi v0.14.3 h1:LqA0k8DKwvRMc+msfQjNusphHJc+r6WC5tZU5TmUFOM= github.com/traefik/yaegi v0.14.3/go.mod h1:AVRxhaI2G+nUsaM1zyktzwXn69G3t/AuTDrCiTds9p0= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1429,6 +1635,10 @@ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= +github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= +github.com/vbauerster/mpb/v7 v7.3.2/go.mod h1:wfxIZcOJq/bG1/lAtfzMXcOiSvbqVi/5GX5WCSi+IsA= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= @@ -1438,6 +1648,8 @@ github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1 github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= +github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= +github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -1463,6 +1675,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.3.8/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -1473,7 +1686,6 @@ github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPS github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -1482,8 +1694,11 @@ go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.mongodb.org/mongo-driver v1.7.0/go.mod h1:Q4oFMbo1+MSNqICAdYMlC/zSTrwCogR4R8NzkI+yfU8= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1493,34 +1708,37 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.23.1-0.20220331163232-052120675fac h1:+KpZCwn3HdqM4KgXC+ywfGPIC40XIwj6C5p+6mbC9a8= -go.opencensus.io v0.23.1-0.20220331163232-052120675fac/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= -go.starlark.net v0.0.0-20220714194419-4cadf0a12139 h1:zMemyQYZSyEdPaUFixYICrXf/0Rfnil7+jiQRf5IBZ0= -go.starlark.net v0.0.0-20220714194419-4cadf0a12139/go.mod h1:t3mmBBPzAVvK0L0n1drDmrQsJ8FoIx4INCqVMTr/Zo0= +go.starlark.net v0.0.0-20230128213706-3f75dec8e403 h1:jPeC7Exc+m8OBJUlWbBLh0O5UZPM7yU5W4adnhhbG4U= +go.starlark.net v0.0.0-20230128213706-3f75dec8e403/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 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 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -1531,6 +1749,7 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1539,11 +1758,14 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 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-20220525230936-793ad666bf5e/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-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -1565,8 +1787,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 h1:QfTh0HpN6hlw6D3vu8DAwC8pBIwikq0AI1evdm+FksE= -golang.org/x/exp v0.0.0-20221031165847-c99f073a8326/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20221212164502-fae10dda9338 h1:OvjRkcNHnf6/W5FZXSxODbxwD+X7fspczG7Jn/xQVD4= +golang.org/x/exp v0.0.0-20221212164502-fae10dda9338/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1599,9 +1821,12 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1628,6 +1853,7 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1654,32 +1880,32 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211013171255-e13a2654a71e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211108170745-6635138e15ea/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1698,13 +1924,11 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.2.0 h1:GtQkldQ9m7yvzCL1V+LrYow3Khe0eJH0w7RbX/VbaIU= -golang.org/x/oauth2 v0.2.0/go.mod h1:Cwn6afJ8jrQwYMxQDTpISoXmXW9I6qF6vDeuuoX3Ibs= +golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1717,7 +1941,6 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1729,6 +1952,7 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1754,8 +1978,11 @@ golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1784,7 +2011,6 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1807,6 +2033,7 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1817,9 +2044,9 @@ golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1827,30 +2054,26 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210818153620-00dd8d7831e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211001092434-39dca1131b70/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-20211013075003-97ac67df715c/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-20211116061358-0a5406a5449c/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-20211205182925-97ca703d548d/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-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= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1860,16 +2083,20 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1881,16 +2108,17 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.2.0 h1:52I/1L54xyEQAYdtcSuxtiT84KGYTBGXwayxmIpNJhE= -golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1919,11 +2147,13 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1973,16 +2203,16 @@ golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= @@ -2020,18 +2250,11 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.102.0 h1:JxJl2qQ85fRMPNvlZY/enexbxpCjLwGhZUtgfGeQ51I= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= +google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= google.golang.org/appengine v1.0.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2090,7 +2313,6 @@ google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= @@ -2111,33 +2333,19 @@ google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211013025323-ce878158c4d4/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c h1:QgY/XxIAIeccR+Ca/rDdKubLIU9rcJ3xfy1DC/Wd2Oo= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20230202175211-008b39050e57 h1:vArvWooPH749rNHpBGgVl+U9B9dATjiEhJzcWGlovNs= +google.golang.org/genproto v0.0.0-20230202175211-008b39050e57/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -2168,13 +2376,9 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2194,6 +2398,8 @@ google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175 google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII= +gopkg.in/cenkalti/backoff.v2 v2.2.1/go.mod h1:S0QdOvT2AlerfSBkp0O+dk+bbIMaNbEmVk876gPCthU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2208,13 +2414,18 @@ gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKW gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.61.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/pipe.v2 v2.0.0-20140414041502-3c2ca4d52544/go.mod h1:UhTeH/yXCK/KY7TX24mqPkaQ7gZeqmWd/8SSS8B3aHw= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 h1:d4KQkxAaAiRY2h5Zqis161Pv91A37uZyJOx73duwUwM= +gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1/go.mod h1:WbjuEoo1oadwzQ4apSDU+JTvmllEHtsNHS6y7vFc7iw= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -2257,10 +2468,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -istio.io/api v0.0.0-20221208070204-0528cb6ce63b h1:pVcDWtdJYwrI79dLtj4x9tO3uF3o5Ye+Xd+KOlVnyqQ= -istio.io/api v0.0.0-20221208070204-0528cb6ce63b/go.mod h1:hQkF0Q19MCmfOTre/Sg4KvrwwETq45oaFplnBm2p4j8= -istio.io/client-go v1.16.1 h1:xkCpqOL3KbuZINRcSlBqJzN+hB5Ov/Q1LsRpsyAkhI8= -istio.io/client-go v1.16.1/go.mod h1:NT96qrYnZ7AcuKnuknH/3GI+tv9Qm6VhC2ZX2vRaKeg= +istio.io/api v0.0.0-20230217221049-9d422bf48675 h1:dxHqYbJwurfq+x2OOG4WP+NkbyjURgcP9PQTsxh7HXM= +istio.io/api v0.0.0-20230217221049-9d422bf48675/go.mod h1:owGDRg9uqMob8CN1gxaOzk6nJxnbT8wrP7PmggpJHHY= +istio.io/client-go v1.17.1 h1:W0kQXYCzIluA/20zLzxeNF7bNMJXXArmGYRt/MIg2io= +istio.io/client-go v1.17.1/go.mod h1:mLTRYYFxHctzUbt8Iclgj+Sueq34+qC2ZEJTn6BxRuE= istio.io/istio v0.0.0-20221109080248-089f536c0f26 h1:m/oftq5/ciPbJ6giYS0hXoPQJSzB5uB98UNOu3mX1gs= istio.io/istio v0.0.0-20221109080248-089f536c0f26/go.mod h1:P87DWx2RM47ufcTwi0cN+6Keud5qsZTuWmUr0v63oyE= istio.io/pkg v0.0.0-20221031153201-960bb47e80ce h1:02zEXUBorwpjZSNpms4JeLwgKPBt99XSr/YGudxZU2U= @@ -2268,32 +2479,30 @@ istio.io/pkg v0.0.0-20221031153201-960bb47e80ce/go.mod h1:1297yENoCcROUAWFZEdwD4 k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= -k8s.io/api v0.26.0/go.mod h1:k6HDTaIFC8yn1i6pSClSqIwLABIcLV9l5Q4EcngKnQg= k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= -k8s.io/apiextensions-apiserver v0.26.0 h1:Gy93Xo1eg2ZIkNX/8vy5xviVSxwQulsnUdQ00nEdpDo= -k8s.io/apiextensions-apiserver v0.26.0/go.mod h1:7ez0LTiyW5nq3vADtK6C3kMESxadD51Bh6uz3JOlqWQ= +k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= +k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= -k8s.io/apimachinery v0.26.0/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= -k8s.io/apiserver v0.26.0 h1:q+LqIK5EZwdznGZb8bq0+a+vCqdeEEe4Ux3zsOjbc4o= -k8s.io/apiserver v0.26.0/go.mod h1:aWhlLD+mU+xRo+zhkvP/gFNbShI4wBDHS33o0+JGI84= -k8s.io/cli-runtime v0.26.0 h1:aQHa1SyUhpqxAw1fY21x2z2OS5RLtMJOCj7tN4oq8mw= -k8s.io/cli-runtime v0.26.0/go.mod h1:o+4KmwHzO/UK0wepE1qpRk6l3o60/txUZ1fEXWGIKTY= -k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8= -k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg= +k8s.io/apiserver v0.26.1 h1:6vmnAqCDO194SVCPU3MU8NcDgSqsUA62tBUSWrFXhsc= +k8s.io/apiserver v0.26.1/go.mod h1:wr75z634Cv+sifswE9HlAo5FQ7UoUauIICRlOE+5dCg= +k8s.io/cli-runtime v0.26.1 h1:f9+bRQ1V3elQsx37KmZy5fRAh56mVLbE9A7EMdlqVdI= +k8s.io/cli-runtime v0.26.1/go.mod h1:+e5Ym/ARySKscUhZ8K3hZ+ZBo/wYPIcg+7b5sFYi6Gg= +k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= +k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= k8s.io/code-generator v0.19.7/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= -k8s.io/component-base v0.26.0 h1:0IkChOCohtDHttmKuz+EP3j3+qKmV55rM9gIFTXA7Vs= -k8s.io/component-base v0.26.0/go.mod h1:lqHwlfV1/haa14F/Z5Zizk5QmzaVf23nQzCwVOQpfC8= +k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= +k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -2305,20 +2514,22 @@ k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAE k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.90.0 h1:VkTxIV/FjRXn1fgNNcKGM8cfmL1Z33ZjXRTVxKCoF5M= +k8s.io/klog/v2 v2.90.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/kube-openapi v0.0.0-20221106113015-f73e7dbcfe29 h1:tya1+VIpw4iOtih5oB7B7nMINohQcyedmlTzdDwSHPA= -k8s.io/kube-openapi v0.0.0-20221106113015-f73e7dbcfe29/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/kubectl v0.26.0 h1:xmrzoKR9CyNdzxBmXV7jW9Ln8WMrwRK6hGbbf69o4T0= -k8s.io/kubectl v0.26.0/go.mod h1:eInP0b+U9XUJWSYeU9XZnTA+cVYuWyl3iYPGtru0qhQ= +k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 h1:vV3ZKAUX0nMjTflyfVea98dTfROpIxDaEsQws0FT2Ts= +k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= +k8s.io/kubectl v0.26.1 h1:K8A0Jjlwg8GqrxOXxAbjY5xtmXYeYjLU96cHp2WMQ7s= +k8s.io/kubectl v0.26.1/go.mod h1:miYFVzldVbdIiXMrHZYmL/EDWwJKM+F0sSsdxsATFPo= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230202215443-34013725500c h1:YVqDar2X7YiQa/DVAXFMDIfGF8uGrHQemlrwRU5NlVI= +k8s.io/utils v0.0.0-20230202215443-34013725500c/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= modernc.org/b v1.0.0/go.mod h1:uZWcZfRj1BpYzfN9JTerzlNUnnPsV9O2ZA8JsRcubNg= modernc.org/cc/v3 v3.32.4/go.mod h1:0R6jl1aZlIl2avnYfbfHBS1QB6/f+16mihBObaBC878= modernc.org/ccgo/v3 v3.9.2/go.mod h1:gnJpy6NIVqkETT+L5zPsQFj7L2kkhfPMzOghRNv/CFo= @@ -2353,11 +2564,12 @@ 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.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.13.1 h1:tUsRCSJVM1QQOOeViGeX3GMT3dQF1eePPw6sEE3xSlg= -sigs.k8s.io/controller-runtime v0.13.1/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= -sigs.k8s.io/gateway-api v0.5.1-0.20221021174151-21bba43681b3 h1:ZNSiyi/820p+oVnDmUEqilL+Em2LrwgdquPw3OneW8o= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= +sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= +sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/gateway-api v0.6.0 h1:v2FqrN2ROWZLrSnI2o91taHR8Sj3s+Eh3QU7gLNWIqA= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +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.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM= sigs.k8s.io/kustomize/api v0.12.1/go.mod h1:y3JUhimkZkR6sbLNwfJHxvo1TCLwuwm14sCYnkH6S1s= sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= diff --git a/internal/cli/alpha/module/module.go b/internal/cli/alpha/module/module.go new file mode 100644 index 000000000..9efa8d0fb --- /dev/null +++ b/internal/cli/alpha/module/module.go @@ -0,0 +1,193 @@ +package module + +import ( + "context" + "fmt" + "time" + + "github.com/avast/retry-go" + "github.com/kyma-project/cli/internal/kube" + "github.com/kyma-project/lifecycle-manager/api/v1beta1" + "github.com/pkg/errors" + "go.uber.org/zap" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +type Interactor interface { + // Get retrieves all modules that the Interactor deals with. + Get(ctx context.Context) ([]v1beta1.Module, error) + // Update applies all modules that the Interactor deals with. + Update(ctx context.Context, modules []v1beta1.Module) error + // WaitUntilReady blocks until all Modules are confirmed to be applied and ready + WaitUntilReady(ctx context.Context) error +} + +var _ Interactor = &DefaultInteractor{} + +type DefaultInteractor struct { + Logger *zap.SugaredLogger + K8s kube.KymaKube + Key types.NamespacedName + ForceUpdate bool + Timeout time.Duration + lastKnownResourceVersion string + changed bool +} + +func NewInteractor( + logger *zap.SugaredLogger, k8s kube.KymaKube, name types.NamespacedName, timeout time.Duration, forceUpdate bool, +) DefaultInteractor { + return DefaultInteractor{ + Logger: logger, + K8s: k8s, + Key: name, + ForceUpdate: forceUpdate, + Timeout: timeout, + } +} + +func (i *DefaultInteractor) Get(ctx context.Context) ([]v1beta1.Module, error) { + kyma := &v1beta1.Kyma{} + if err := i.K8s.Ctrl().Get(ctx, i.Key, kyma); err != nil { + return nil, fmt.Errorf("could not get Kyma %ss: %w", i.Key, err) + } + + i.lastKnownResourceVersion = kyma.GetResourceVersion() + + return kyma.Spec.Modules, nil +} + +// Update tries to update the modules in the Kyma Instance and retries on failure +// It exits without retrying if the Kyma Resource cannot be fetched at least once. +func (i *DefaultInteractor) Update(ctx context.Context, modules []v1beta1.Module) error { + ctx, cancel := context.WithTimeout(ctx, i.Timeout) + defer cancel() + + kyma := &v1beta1.Kyma{} + if err := i.K8s.Ctrl().Get(ctx, i.Key, kyma); err != nil { + return err + } + oldGen := kyma.GetGeneration() + if err := retry.Do( + func() error { + kyma.Spec.Modules = modules + if err := i.K8s.Ctrl().Update(ctx, kyma, &client.UpdateOptions{FieldManager: "kyma"}); err != nil { + return err + } + newGen := kyma.GetGeneration() + i.changed = oldGen != newGen + i.lastKnownResourceVersion = kyma.GetResourceVersion() + return nil + }, retry.Attempts(3), retry.Delay(3*time.Second), retry.DelayType(retry.BackOffDelay), + retry.LastErrorOnly(false), retry.Context(ctx), + ); err != nil { + return err + } + + return nil +} + +// WaitUntilReady uses the internal i.changed tracker to determine wether the last apply caused +// any changes on the cluster. If it did not, then it will shortcut to retrieve the latest version +// from the cluster and determine if it is ready. If it has been changed, then +// it will start a watch request and read out the last state. If it is in error, +// it will attempt it again until ctx times out. +// If the logger is active (usually based on verbosity), it will also log the error. +// The error returned will always contain all aggregated errors encountered during the watch if the kyma never got ready +// If there is no error available (e.g. because the lifecycle manager never updated the resource version) +// then the context.DeadlineExceeded Error will be thrown instead. +func (i *DefaultInteractor) WaitUntilReady(ctx context.Context) error { + ctx, cancel := context.WithTimeout(ctx, i.Timeout) + defer cancel() + + options := client.ListOptions{ + FieldSelector: fields.AndSelectors( + fields.OneTermEqualSelector("metadata.name", i.Key.Name), + fields.OneTermEqualSelector("metadata.namespace", i.Key.Namespace), + ), + Raw: &metav1.ListOptions{ + ResourceVersion: i.lastKnownResourceVersion, + }, + } + + kymas := v1beta1.KymaList{} + if !i.changed { + if err := i.K8s.Ctrl().List(ctx, &kymas, &options); err != nil { + return fmt.Errorf("could not start listing for kyma readiness: %w", err) + } + return IsKymaReady(i.Logger, &kymas.Items[0]) + } + + watcher, err := i.K8s.Ctrl().Watch(ctx, &kymas, &options) + if err != nil { + return fmt.Errorf("could not start watching for kyma readiness: %w", err) + } + defer watcher.Stop() + + var errs []error + for { + select { + case res := <-watcher.ResultChan(): + if res.Object == nil || res.Type != watch.Modified { + continue + } + if objMeta, err := meta.Accessor(res.Object); err != nil || + (i.changed && i.lastKnownResourceVersion == objMeta.GetResourceVersion()) { + i.Logger.Info("changed generation but observed resource version is still the same") + continue + } + if err := IsKymaReady(i.Logger, res.Object); err != nil { + i.Logger.Errorf("%s", err) + errs = append(errs, err) + continue + } + return nil + case <-ctx.Done(): + if len(errs) > 0 { + return retry.Error(errs) + } + return ctx.Err() + } + } +} + +// IsKymaReady interprets the status of a Kyma Resource and uses this to determine if it can be considered Ready. +// It checks for v1beta1.StateReady, and if it is set, determines if this state can be trusted by observing +// if the status fields match the desired state, and if the lastOperation is filled by the lifecycle-manager. +func IsKymaReady(l *zap.SugaredLogger, obj runtime.Object) error { + kyma := obj.(*v1beta1.Kyma) + l.Info(kyma.Status) + switch kyma.Status.State { + case v1beta1.StateReady: + if len(kyma.Status.Modules) != len(kyma.Spec.Modules) { + return fmt.Errorf("kyma has status Ready but cannot be up to date "+ + "since modules tracked in status differ from modules in desired state/spec (%v in status, %v in spec)", + len(kyma.Status.Modules), len(kyma.Spec.Modules)) + } + + lastOperation := kyma.Status.LastOperation + if lastOperation.Operation == "" { + return fmt.Errorf( + "kyma has status Ready but cannot be up to date "+ + "since last operation was never set: %v", kyma.Status, + ) + } + return nil + default: + lastOperation := kyma.Status.LastOperation + if lastOperation.Operation == "" { + return fmt.Errorf( + "there is no last operation available to show details: %v", kyma.Status, + ) + } + return errors.Errorf( + "%s at %s", lastOperation.Operation, lastOperation.LastUpdateTime.Time, + ) + } +} diff --git a/internal/cli/command.go b/internal/cli/command.go index 6692f69ef..4d7f039df 100644 --- a/internal/cli/command.go +++ b/internal/cli/command.go @@ -1,6 +1,11 @@ package cli import ( + "context" + "fmt" + "time" + + "github.com/kyma-project/cli/internal/clusterinfo" "github.com/kyma-project/cli/internal/kube" "github.com/kyma-project/cli/pkg/step" ) @@ -16,3 +21,20 @@ func (c *Command) NewStep(msg string) step.Step { c.CurrentStep = s return s } + +func (c *Command) EnsureClusterAccess(ctx context.Context, timeout time.Duration) (clusterinfo.Info, error) { + if c.K8s == nil { + var err error + if c.K8s, err = kube.NewFromConfigWithTimeout("", c.KubeconfigPath, timeout); err != nil { + return nil, fmt.Errorf("failed to initialize the Kubernetes client from given kubeconfig: %w", err) + } + } + + info, err := clusterinfo.Discover(ctx, c.K8s.Static()) + + if err != nil { + return nil, fmt.Errorf("failed to discover clusterinfo: %w", err) + } + + return info, nil +} diff --git a/internal/cli/defaults.go b/internal/cli/defaults.go new file mode 100644 index 000000000..794e164c0 --- /dev/null +++ b/internal/cli/defaults.go @@ -0,0 +1,8 @@ +package cli + +const ( + // KymaNamespaceDefault defines the default namespace for command flags to be used + KymaNamespaceDefault = "kyma-system" + // KymaNameDefault defines the default name for Kyma CRs to be used in command flags + KymaNameDefault = "default-kyma" +) diff --git a/internal/cli/finalizers.go b/internal/cli/finalizers.go index c53a5f442..2f523a72f 100644 --- a/internal/cli/finalizers.go +++ b/internal/cli/finalizers.go @@ -1,7 +1,7 @@ package cli import ( - "go.uber.org/zap" + "fmt" "os" "os/signal" "sync" @@ -15,14 +15,12 @@ type Finalizers struct { notify func(c chan<- os.Signal, sig ...os.Signal) exit func(int) funcs []func() - logger *zap.SugaredLogger } func NewFinalizer() *Finalizers { fin := &Finalizers{ notify: signal.Notify, exit: os.Exit, - logger: NewLogger(false).Sugar(), } fin.setupCloseHandler() return fin @@ -38,7 +36,7 @@ func (f *Finalizers) setupCloseHandler() { f.notify(c, syscall.SIGTERM, syscall.SIGINT) go func() { sig := <-c - f.logger.Infof("\r- Signal '%v' received from Terminal. Exiting...\n ", sig) + fmt.Printf("\r- Signal '%v' received from Terminal. Exiting...\n ", sig) wg.Add(1) go func() { for _, f := range f.funcs { diff --git a/internal/cli/finalizers_test.go b/internal/cli/finalizers_test.go index 24d6001a6..91af045ec 100644 --- a/internal/cli/finalizers_test.go +++ b/internal/cli/finalizers_test.go @@ -50,18 +50,19 @@ func TestFinalizer_Add(t *testing.T) { funcs := tt.funcs f := tt.f - t.Run(tt.name, func(t *testing.T) { - t.Parallel() + t.Run( + tt.name, func(t *testing.T) { + t.Parallel() - d := &Finalizers{ - funcs: funcs, - logger: NewLogger(false).Sugar(), - } + d := &Finalizers{ + funcs: funcs, + } - d.Add(f) + d.Add(f) - require.Equal(t, expectedLen, len(d.funcs)) - }) + require.Equal(t, expectedLen, len(d.funcs)) + }, + ) } } @@ -120,28 +121,29 @@ func TestFinalizer_setupCloseHandler(t *testing.T) { nilFuncs := tt.nilFuncs notify := tt.fields.notify - t.Run(tt.name, func(t *testing.T) { - t.Parallel() + t.Run( + tt.name, func(t *testing.T) { + t.Parallel() - counterChan := make(chan int, len(funcs)-nilFuncs) - exit := make(chan struct{}) + counterChan := make(chan int, len(funcs)-nilFuncs) + exit := make(chan struct{}) - d := &Finalizers{ - notify: notify, - exit: fixExit(exit), - funcs: fixFuncs(counterChan, funcs), - logger: NewLogger(false).Sugar(), - } + d := &Finalizers{ + notify: notify, + exit: fixExit(exit), + funcs: fixFuncs(counterChan, funcs), + } - d.setupCloseHandler() + d.setupCloseHandler() - // wait until all functions end - for i := len(funcs) - nilFuncs; i != 0; i-- { - <-counterChan - } + // wait until all functions end + for i := len(funcs) - nilFuncs; i != 0; i-- { + <-counterChan + } - <-exit - }) + <-exit + }, + ) } } diff --git a/internal/cli/logs.go b/internal/cli/logs.go index 54208bf3d..adf4050c0 100644 --- a/internal/cli/logs.go +++ b/internal/cli/logs.go @@ -4,23 +4,39 @@ import ( "fmt" "log" + "github.com/go-logr/zapr" + "github.com/open-component-model/ocm/pkg/contexts/ocm" "go.uber.org/zap" + "go.uber.org/zap/zapcore" + "k8s.io/klog/v2" ) // NewLogger returns the logger used for CLI log output (used in Hydroform deployments) func NewLogger(printLogs bool) *zap.Logger { + var logger *zap.Logger if printLogs { - logger, err := createVerboseLogger() - if err != nil { + var err error + + if logger, err = createVerboseLogger(); err != nil { log.Fatalf("Can't initialize zap logger: %v", err) } - return logger + + } else { + logger = zap.NewNop() } - return zap.NewNop() + logr := zapr.NewLoggerWithOptions(logger) + klog.SetLogger(logr) + ocm.DefaultContext().LoggingContext().SetBaseLogger(logr) + ocm.DefaultContext().LoggingContext().SetDefaultLevel(9) + ocm.DefaultContext().CredentialsContext().LoggingContext().SetBaseLogger(logr) + ocm.DefaultContext().CredentialsContext().LoggingContext().SetDefaultLevel(9) + + return logger } func createVerboseLogger() (*zap.Logger, error) { config := zap.NewDevelopmentConfig() + config.Level = zap.NewAtomicLevelAt(zapcore.Level(-9)) config.DisableStacktrace = true return config.Build() } diff --git a/internal/cli/managed.go b/internal/cli/managed.go index 6126c8118..0736fc3f5 100644 --- a/internal/cli/managed.go +++ b/internal/cli/managed.go @@ -1,6 +1,7 @@ package cli import ( + "context" "errors" "github.com/kyma-project/cli/internal/clusterinfo" @@ -8,14 +9,18 @@ import ( "github.com/kyma-project/cli/pkg/step" ) -const managedKymaWarning = "CAUTION: You are trying to use Kyma CLI to change a managed Kyma runtime (SAP Kyma Runtime). This action may corrupt the Kyma runtime. Proceed at your own risk." +const managedKymaWarning = "CAUTION: You are trying to use Kyma CLI to change a managed Kyma runtime (SAP BTP, Kyma runtime). This action may corrupt the existing installation. Proceed at your own risk." // DetectManagedEnvironment introduces a step that checks if the target runtime is a managed Kyma runtime. CLI should be used with caution in such environment and user is prompted for confirmation. -func DetectManagedEnvironment(k kube.KymaKube, s step.Step) error { - if clusterinfo.IsManagedKyma(k.RestConfig()) { - s.LogWarn(managedKymaWarning) +func DetectManagedEnvironment(ctx context.Context, k kube.KymaKube, s step.Step) error { + managed, err := clusterinfo.IsManagedKyma(ctx, k.RestConfig(), k.Static()) + if err != nil { + return err + } + if managed { + s.LogInfo(managedKymaWarning) if !s.PromptYesNo("Do you really want to proceed? ") { - return errors.New("Command stopped by user") + return errors.New("command stopped by user") } } return nil diff --git a/internal/clusterinfo/clusterinfo.go b/internal/clusterinfo/clusterinfo.go index 88659ef51..c0863b442 100644 --- a/internal/clusterinfo/clusterinfo.go +++ b/internal/clusterinfo/clusterinfo.go @@ -2,8 +2,11 @@ package clusterinfo import ( "context" + "fmt" "strings" + k8sErrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" ) @@ -75,15 +78,35 @@ func Discover(ctx context.Context, kubeClient kubernetes.Interface) (Info, error return K3d{ClusterName: k3dClusterName}, nil } -// IsManagedKyma returns true if the k8s go-client is configured to access a managed kyma runtime -func IsManagedKyma(restConfig *rest.Config) bool { - //Legacy, may be removed in the future +// IsManagedKyma returns true if the k8s go-client is configured to access a managed Kyma runtime +func IsManagedKyma(ctx context.Context, restConfig *rest.Config, kubeClient kubernetes.Interface) (bool, error) { if strings.HasSuffix(restConfig.Host, legacyEnvAPIServerSuffix) { - return true + return lookupConfigMapMarker(ctx, kubeClient) } if strings.HasSuffix(restConfig.Host, skrEnvAPIServerSuffix) { - return true + return lookupConfigMapMarker(ctx, kubeClient) } - return false + return false, nil +} + +// lookupConfigMapMarker tries to find a "kyma-system/skr-configmap" marker ConfigMap with specific labels and payload. +func lookupConfigMapMarker(ctx context.Context, kubeClient kubernetes.Interface) (bool, error) { + cm, err := kubeClient.CoreV1().ConfigMaps("kyma-system").Get(ctx, "skr-configmap", metav1.GetOptions{}) + + if err != nil { + if k8sErrors.IsNotFound(err) { + return false, nil + } + return false, fmt.Errorf("failed to get ConfigMap \"skr-configmap\" in the \"kyma-system\" namespace: %w", err) + } + + if cm == nil || cm.ObjectMeta.Labels == nil || cm.Data == nil { + return false, nil + } + + res := cm.ObjectMeta.Labels["reconciler.kyma-project.io/managed-by"] == "reconciler" && + cm.Data["is-managed-kyma-runtime"] == "true" + + return res, nil } diff --git a/internal/config/config.go b/internal/config/config.go index 9551c00ea..7974fa9d7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -6,5 +6,5 @@ package config const ( - DefaultKyma2Version = "2.11.0" + DefaultKyma2Version = "2.11.2" ) diff --git a/internal/deploy/apply.go b/internal/deploy/apply.go new file mode 100644 index 000000000..f17d63094 --- /dev/null +++ b/internal/deploy/apply.go @@ -0,0 +1,48 @@ +package deploy + +import ( + "context" + "fmt" + "time" + + "github.com/avast/retry-go" + "github.com/kyma-project/cli/internal/kube" +) + +const ( + defaultRetries = 3 + defaultInitialBackoff = 3 * time.Second +) + +type applyOpts struct { + dryRun bool + force bool + retries uint + initialBackoff time.Duration +} + +func applyManifests(ctx context.Context, k8s kube.KymaKube, manifests []byte, opts applyOpts) error { + // apply manifests with incremental retry + if opts.dryRun { + fmt.Println(string(manifests)) + } else { + objs, err := k8s.ParseManifest(manifests) + if err != nil { + return err + } + + if err := retry.Do( + func() error { + return k8s.Apply(context.Background(), opts.force, objs...) + }, retry.Attempts(defaultRetries), retry.Delay(defaultInitialBackoff), retry.DelayType(retry.BackOffDelay), + retry.LastErrorOnly(false), retry.Context(ctx), + ); err != nil { + return err + } + + if err := checkDeploymentReadiness(objs, k8s); err != nil { + return err + } + } + return nil +} diff --git a/internal/deploy/bootstrap.go b/internal/deploy/bootstrap.go index ad8959705..60e0d1f68 100644 --- a/internal/deploy/bootstrap.go +++ b/internal/deploy/bootstrap.go @@ -1,83 +1,90 @@ package deploy import ( - "bytes" - "fmt" + "context" "regexp" - "time" - "github.com/avast/retry-go" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + ctrlClient "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/kustomize/kyaml/kio" "github.com/kyma-project/cli/internal/kube" "github.com/kyma-project/cli/internal/kustomize" ) const ( - defaultLifecycleManager = "https://github.com/kyma-project/lifecycle-manager/config/default" - defaultModuleManager = "https://github.com/kyma-project/module-manager/config/default" - defaultRetries = 3 - defaultInitialBackoff = 3 * time.Second + wildCardRoleAndAssignment = `apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kyma-cli-provisioned-wildcard +rules: +- apiGroups: ["*"] + resources: ["*"] + verbs: ["*"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: lifecycle-manager-wildcard +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kyma-cli-provisioned-wildcard +subjects: +- kind: ServiceAccount + name: lifecycle-manager-controller-manager + namespace: kcp-system` ) // Bootstrap deploys the kustomization files for the prerequisites for Kyma. // Returns true if the Kyma CRD was deployed. -func Bootstrap(kustomizations []string, k8s kube.KymaKube, dryRun bool) (bool, error) { - defs := []kustomize.Definition{} +func Bootstrap( + ctx context.Context, kustomizations []string, k8s kube.KymaKube, filters []kio.Filter, addWildCard, force bool, + dryRun bool, +) (bool, error) { + var defs []kustomize.Definition // defaults - if len(kustomizations) == 0 { - lm, err := kustomize.ParseKustomization(defaultLifecycleManager) - if err != nil { - return false, err - } - mm, err := kustomize.ParseKustomization(defaultModuleManager) + for _, k := range kustomizations { + parsed, err := kustomize.ParseKustomization(k) if err != nil { return false, err } - defs = append(defs, lm, mm) - } else { - for _, k := range kustomizations { - parsed, err := kustomize.ParseKustomization(k) - if err != nil { - return false, err - } - defs = append(defs, parsed) - } + defs = append(defs, parsed) } // build manifests - manifests, err := build(defs) + manifests, err := kustomize.BuildMany(defs, filters) if err != nil { return false, err } - // apply manifests with incremental retry - if dryRun { - fmt.Println(string(manifests)) - } else { - err := retry.Do(func() error { - return k8s.Apply(manifests) - }, retry.Attempts(defaultRetries), retry.Delay(defaultInitialBackoff), retry.DelayType(retry.BackOffDelay), retry.LastErrorOnly(false)) + if addWildCard { + manifests = append(manifests, []byte(wildCardRoleAndAssignment)...) + } - if err != nil { - return false, err - } + if err := applyManifests( + ctx, k8s, manifests, applyOpts{ + dryRun, force, defaultRetries, defaultInitialBackoff}, + ); err != nil { + return false, err } return hasKyma(string(manifests)) } -func build(kustomizations []kustomize.Definition) ([]byte, error) { - ms := bytes.Buffer{} - for _, k := range kustomizations { - manifest, err := kustomize.Build(k) - if err != nil { - return nil, fmt.Errorf("could not build manifest for %s: %w", k.Name, err) +func checkDeploymentReadiness(objs []ctrlClient.Object, k8s kube.KymaKube) error { + for _, obj := range objs { + if obj.GetObjectKind().GroupVersionKind().Kind != "Deployment" { + continue + } + if err := k8s.WaitDeploymentStatus( + obj.GetNamespace(), obj.GetName(), appsv1.DeploymentAvailable, corev1.ConditionTrue, + ); err != nil { + return err } - ms.Write(manifest) - ms.WriteString("\n---\n") } - - return ms.Bytes(), nil + return nil } // hasKyma checks if the given manifest contains the Kyma CRD diff --git a/internal/deploy/cert_manager.go b/internal/deploy/cert_manager.go new file mode 100644 index 000000000..5fa2b1c5e --- /dev/null +++ b/internal/deploy/cert_manager.go @@ -0,0 +1,49 @@ +package deploy + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + + "github.com/avast/retry-go" + "github.com/kyma-project/cli/internal/kube" +) + +const ( + certManagerURL = "https://github.com/cert-manager/cert-manager/releases/download/%s/cert-manager.yaml" +) + +// CertManager deploys the Kyma CR. If no kymaCRPath is provided, it deploys the default CR. +func CertManager(ctx context.Context, k8s kube.KymaKube, certManagerVersion string, force, dryRun bool) error { + result := bytes.Buffer{} + + // Get the data + resp, err := http.Get(fmt.Sprintf(certManagerURL, certManagerVersion)) + if err != nil { + return fmt.Errorf("could not download cert-manager: %w", err) + } + + certManagerBytes, err := io.ReadAll(resp.Body) + if err != nil { + return fmt.Errorf("could not write cert-manager data to yaml: %w", err) + } + result.Write(certManagerBytes) + + if dryRun { + fmt.Printf("%s---\n", result.String()) + return nil + } + + return retry.Do( + func() error { + objs, err := k8s.ParseManifest(result.Bytes()) + if err != nil { + return err + } + return k8s.Apply(context.Background(), force, objs...) + }, retry.Attempts(defaultRetries), retry.Delay(defaultInitialBackoff), retry.DelayType(retry.BackOffDelay), + retry.LastErrorOnly(false), retry.Context(ctx), + ) +} diff --git a/internal/deploy/kyma.go b/internal/deploy/kyma.go index 2031b4713..0a808e9bc 100644 --- a/internal/deploy/kyma.go +++ b/internal/deploy/kyma.go @@ -1,83 +1,74 @@ package deploy import ( - "bytes" + "context" "fmt" "os" - "text/template" + "github.com/avast/retry-go" "github.com/kyma-project/cli/internal/kube" + "github.com/kyma-project/lifecycle-manager/api/v1beta1" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime/schema" + ctrlClient "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/yaml" ) -const kymaCRTemplate = `apiVersion: v1 -kind: Namespace -metadata: - name: {{ .Namespace }} ---- -apiVersion: operator.kyma-project.io/v1alpha1 -kind: Kyma -metadata: - annotations: - cli.kyma-project.io/source: deploy - labels: - operator.kyma-project.io/managed-by: lifecycle-manager - name: default-kyma - namespace: {{ .Namespace }} -spec: - channel: {{ .Channel }} - modules: [] - sync: - enabled: {{ .Sync }} -` - -var KymaGVR = schema.GroupVersionResource{ - Group: "operator.kyma-project.io", - Version: "v1alpha1", - Resource: "kymas", -} - // Kyma deploys the Kyma CR. If no kymaCRPath is provided, it deploys the default CR. -func Kyma(k8s kube.KymaKube, namespace, channel, kymaCRpath string, dryRun bool) error { - // TODO delete deploy.go when the old reconciler is gone. - kymaCR := bytes.Buffer{} - - nsObj := &v1.Namespace{} - nsObj.SetName(namespace) +func Kyma( + ctx context.Context, k8s kube.KymaKube, namespace, channel, kymaCRpath string, force, dryRun bool, +) error { + namespaceObj := &v1.Namespace{} + namespaceObj.SetName(namespace) + kyma := &v1beta1.Kyma{} if kymaCRpath != "" { data, err := os.ReadFile(kymaCRpath) if err != nil { return fmt.Errorf("could not read kyma CR file: %w", err) } - kymaCR.Write(data) - } else { - t, err := template.New("kymaCR").Parse(kymaCRTemplate) - if err != nil { - return fmt.Errorf("could not parse Kyma CR template: %w", err) + if err := yaml.Unmarshal(data, kyma); err != nil { + return fmt.Errorf("kyma cr file is not valid: %w", err) } + } else { + kyma.SetName("default-kyma") + kyma.SetNamespace(namespace) + kyma.SetAnnotations(map[string]string{"cli.kyma-project.io/source": "deploy"}) + kyma.SetLabels(map[string]string{"operator.kyma-project.io/managed-by": "lifecycle-manager"}) + kyma.Spec.Channel = channel + kyma.Spec.Sync.Enabled = false + kyma.Spec.Modules = []v1beta1.Module{} + } - if channel == "" { - channel = "regular" - } - data := struct { - Channel string - Sync bool - Namespace string - }{ - Channel: channel, - Sync: false, - Namespace: namespace, + if dryRun { + result, err := yaml.Marshal(namespaceObj) + if err != nil { + return err } - - if err := t.Execute(&kymaCR, data); err != nil { - return fmt.Errorf("could not build Kyma CR: %w", err) + fmt.Printf("%s---\n", result) + kyma, err := yaml.Marshal(kyma) + if err != nil { + return err } - } - if dryRun { - fmt.Printf("%s\n---\n", kymaCR.String()) + fmt.Printf("%s---\n", kyma) return nil } - return k8s.Apply(kymaCR.Bytes()) + if err := retry.Do( + func() error { + return k8s.Apply(context.Background(), force, namespaceObj, kyma) + }, retry.Attempts(defaultRetries), retry.Delay(defaultInitialBackoff), retry.DelayType(retry.BackOffDelay), + retry.LastErrorOnly(false), retry.Context(ctx), + ); err != nil { + return err + } + + if err := k8s.WatchObject( + ctx, kyma, + func(kyma ctrlClient.Object) (bool, error) { + return string(kyma.(*v1beta1.Kyma).Status.State) == string(v1beta1.StateReady), nil + }, + ); err != nil { + return fmt.Errorf("kyma custom resource did not get ready: %w", err) + } + + return nil } diff --git a/internal/deploy/module_templates.go b/internal/deploy/module_templates.go new file mode 100644 index 000000000..6a3467594 --- /dev/null +++ b/internal/deploy/module_templates.go @@ -0,0 +1,31 @@ +package deploy + +import ( + "context" + + "github.com/kyma-project/cli/internal/kube" + "github.com/kyma-project/cli/internal/kustomize" +) + +func ModuleTemplates(ctx context.Context, k8s kube.KymaKube, templates []string, force, dryRun bool) error { + var defs []kustomize.Definition + // defaults + for _, k := range templates { + parsed, err := kustomize.ParseKustomization(k) + if err != nil { + return err + } + defs = append(defs, parsed) + } + + // build manifests + manifests, err := kustomize.BuildMany(defs, nil) + if err != nil { + return err + } + + return applyManifests( + ctx, k8s, manifests, applyOpts{ + dryRun, force, defaultRetries, defaultInitialBackoff}, + ) +} diff --git a/internal/kube/client.go b/internal/kube/client.go index 2482d8f9d..c73d03f3a 100644 --- a/internal/kube/client.go +++ b/internal/kube/client.go @@ -4,17 +4,24 @@ import ( "bufio" "bytes" "context" - "encoding/json" "fmt" "io" "strings" "time" + lifecycleManagerApi "github.com/kyma-project/lifecycle-manager/api" "github.com/pkg/errors" + istio "istio.io/client-go/pkg/clientset/versioned" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - k8sErrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + utilyaml "k8s.io/apimachinery/pkg/util/yaml" + "k8s.io/cli-runtime/pkg/resource" "k8s.io/client-go/discovery" memory "k8s.io/client-go/discovery/cached" "k8s.io/client-go/dynamic" @@ -23,15 +30,10 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/restmapper" "k8s.io/client-go/tools/clientcmd/api" + ctrlClient "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/yaml" - istio "istio.io/client-go/pkg/clientset/versioned" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - utilyaml "k8s.io/apimachinery/pkg/util/yaml" + v1extensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) const ( @@ -42,11 +44,14 @@ const ( // client is the default KymaKube implementation type client struct { - static kubernetes.Interface - dynamic dynamic.Interface - istio istio.Interface - restCfg *rest.Config - kubeCfg *api.Config + static kubernetes.Interface + dynamic dynamic.Interface + istio istio.Interface + restCfg *rest.Config + kubeCfg *api.Config + disco discovery.DiscoveryInterface + mapper meta.ResettableRESTMapper + ctrlClient ctrlClient.WithWatch } // NewFromConfig creates a new Kubernetes client based on the given Kubeconfig either provided by URL (in-cluster config) or via file (out-of-cluster config). @@ -75,6 +80,27 @@ func NewFromRestConfigWithTimeout(config *rest.Config, t time.Duration) (KymaKub return nil, err } + disco, err := discovery.NewDiscoveryClientForConfig(config) + if err != nil { + return nil, err + } + + mapper := restmapper.NewDeferredDiscoveryRESTMapper(memory.NewMemCacheClient(disco)) + + newScheme := scheme.Scheme + + if err := v1extensions.AddToScheme(newScheme); err != nil { + return nil, err + } + if err := lifecycleManagerApi.AddToScheme(newScheme); err != nil { + return nil, err + } + + nClient, err := ctrlClient.NewWithWatch(config, ctrlClient.Options{Scheme: newScheme}) + if err != nil { + return nil, err + } + //An empty k8s.io/client-go/tools/clientcmd/api.Config object. kubeConfig := &api.Config{ Preferences: api.Preferences{ @@ -87,11 +113,14 @@ func NewFromRestConfigWithTimeout(config *rest.Config, t time.Duration) (KymaKub } return &client{ - static: sClient, - dynamic: dClient, - istio: istioClient, - restCfg: config, - kubeCfg: kubeConfig, + static: sClient, + dynamic: dClient, + istio: istioClient, + restCfg: config, + kubeCfg: kubeConfig, + disco: disco, + mapper: mapper, + ctrlClient: nClient, }, nil } @@ -126,12 +155,36 @@ func NewFromConfigWithTimeout(url, file string, t time.Duration) (KymaKube, erro return nil, err } + disco, err := discovery.NewDiscoveryClientForConfig(config) + if err != nil { + return nil, err + } + + mapper := restmapper.NewDeferredDiscoveryRESTMapper(memory.NewMemCacheClient(disco)) + + newScheme := scheme.Scheme + + if err := v1extensions.AddToScheme(newScheme); err != nil { + return nil, err + } + if err := lifecycleManagerApi.AddToScheme(newScheme); err != nil { + return nil, err + } + + ctrlClient, err := ctrlClient.NewWithWatch(config, ctrlClient.Options{Scheme: newScheme}) + if err != nil { + return nil, err + } + return &client{ - static: sClient, - dynamic: dClient, - istio: istioClient, - restCfg: config, - kubeCfg: kubeConfig, + static: sClient, + dynamic: dClient, + istio: istioClient, + restCfg: config, + kubeCfg: kubeConfig, + disco: disco, + mapper: mapper, + ctrlClient: ctrlClient, }, nil } @@ -144,6 +197,10 @@ func (c *client) Dynamic() dynamic.Interface { return c.dynamic } +func (c *client) Ctrl() ctrlClient.WithWatch { + return c.ctrlClient +} + func (c *client) Istio() istio.Interface { return c.istio } @@ -156,102 +213,68 @@ func (c *client) KubeConfig() *api.Config { return c.kubeCfg } -func (c *client) Apply(manifest []byte) error { - // Prepare a RESTMapper to find GVR - dc, err := discovery.NewDiscoveryClientForConfig(c.restCfg) +func (c *client) ParseManifest(manifest []byte) ([]ctrlClient.Object, error) { + // parse manifest + manifests, err := parseManifest(manifest) if err != nil { - return err + return nil, err } - mapper := restmapper.NewDeferredDiscoveryRESTMapper(memory.NewMemCacheClient(dc)) - // parse manifest - objChan, parseErr := parseManifest(manifest) + objs := make([]ctrlClient.Object, 0, len(manifests)) + for _, manifest := range manifests { - for { - select { - case data, ok := <-objChan: - if !ok { - return nil - } - if err := c.applyManifest(data, mapper); err != nil { - return err - } - case err, ok := <-parseErr: - if !ok { - return nil - } - if err == nil { - continue - } + obj := &unstructured.Unstructured{} + if err := yaml.Unmarshal(manifest, obj); err != nil { + return nil, err + } + objs = append(objs, obj) + } + + return objs, nil +} + +func (c *client) Apply(ctx context.Context, force bool, objs ...ctrlClient.Object) error { + infos := make([]*resource.Info, 0, len(objs)) + for _, obj := range objs { + gvk := obj.GetObjectKind().GroupVersionKind() + mapping, err := c.mapper.RESTMapping(gvk.GroupKind(), gvk.Version) + if meta.IsNoMatchError(err) { + c.mapper.Reset() + mapping, _ = c.mapper.RESTMapping(gvk.GroupKind(), gvk.Version) + err = nil + } + if err != nil { return err } + + infos = append( + infos, &resource.Info{ + Name: obj.GetName(), + Namespace: obj.GetNamespace(), + ResourceVersion: obj.GetResourceVersion(), + Object: obj, + Mapping: mapping, + }, + ) } + return ConcurrentSSA(c.ctrlClient, "kyma", force).Run(ctx, infos) } // parseManifest can parse a multi-doc yaml manifest and send back each unstructured object through the channel -func parseManifest(data []byte) (<-chan []byte, <-chan error) { - chanErr := make(chan error) - chanBytes := make(chan []byte) +func parseManifest(data []byte) ([][]byte, error) { + var chanBytes [][]byte multidocReader := utilyaml.NewYAMLReader(bufio.NewReader(bytes.NewReader(data))) - go func() { - defer close(chanErr) - defer close(chanBytes) - - for { - buf, err := multidocReader.Read() - if err != nil { - if err == io.EOF { - return - } - chanErr <- errors.Wrap(err, "failed to read yaml data") - return + for { + buf, err := multidocReader.Read() + if err != nil { + if err == io.EOF { + return chanBytes, nil } - chanBytes <- buf + return nil, errors.Wrap(err, "failed to read yaml data") } - }() - return chanBytes, chanErr -} - -// applyAsync applies the given manifest with the given mapping. -func (c *client) applyManifest(manifest []byte, mapper *restmapper.DeferredDiscoveryRESTMapper) error { - // Decode YAML manifest into unstructured.Unstructured - decode := scheme.Codecs.UniversalDeserializer().Decode - obj := &unstructured.Unstructured{} - _, gvk, err := decode(manifest, nil, obj) - if err != nil { - return err - } - - // Find GVR - mapping, err := mapper.RESTMapping(gvk.GroupKind(), gvk.Version) - if err != nil { - return err - } - - // Obtain REST interface for the GVR - var dr dynamic.ResourceInterface - if mapping.Scope.Name() == meta.RESTScopeNameNamespace { - // namespaced resources should specify the namespace - dr = c.dynamic.Resource(mapping.Resource).Namespace(obj.GetNamespace()) - } else { - // for cluster-wide resources - dr = c.dynamic.Resource(mapping.Resource) + chanBytes = append(chanBytes, buf) } - - // Marshal object into JSON - data, err := json.Marshal(obj) - if err != nil { - return err - } - - // Create or Update the object with SSA - // types.ApplyPatchType indicates SSA. - _, err = dr.Patch(context.Background(), obj.GetName(), types.ApplyPatchType, data, metav1.PatchOptions{ - FieldManager: "kyma", - }) - - return err } func (c *client) IsPodDeployed(namespace, name string) (bool, error) { @@ -267,7 +290,9 @@ func (c *client) IsPodDeployed(namespace, name string) (bool, error) { } func (c *client) IsPodDeployedByLabel(namespace, labelName, labelValue string) (bool, error) { - pods, err := c.Static().CoreV1().Pods(namespace).List(context.Background(), metav1.ListOptions{LabelSelector: fmt.Sprintf("%s=%s", labelName, labelValue)}) + pods, err := c.Static().CoreV1().Pods(namespace).List( + context.Background(), metav1.ListOptions{LabelSelector: fmt.Sprintf("%s=%s", labelName, labelValue)}, + ) if err != nil { return false, err } @@ -275,8 +300,10 @@ func (c *client) IsPodDeployedByLabel(namespace, labelName, labelValue string) ( return len(pods.Items) > 0, nil } -func (c *client) WaitDeploymentStatus(namespace, name string, cond appsv1.DeploymentConditionType, status corev1.ConditionStatus) error { - watchFn := func() (bool, error) { +func (c *client) WaitDeploymentStatus( + namespace, name string, cond appsv1.DeploymentConditionType, status corev1.ConditionStatus, +) error { + watchFn := func(ctx context.Context) (bool, error) { d, err := c.static.AppsV1().Deployments(namespace).Get(context.Background(), name, metav1.GetOptions{}) if err != nil && k8sErrors.IsNotFound(err) { return false, err @@ -290,12 +317,12 @@ func (c *client) WaitDeploymentStatus(namespace, name string, cond appsv1.Deploy return false, nil } - return watch(name, watchFn, c.restCfg.Timeout) + return watch(context.Background(), name, watchFn, c.restCfg.Timeout) } func (c *client) WaitPodStatus(namespace, name string, status corev1.PodPhase) error { - watchFn := func() (bool, error) { - pod, err := c.Static().CoreV1().Pods(namespace).Get(context.Background(), name, metav1.GetOptions{}) + watchFn := func(ctx context.Context) (bool, error) { + pod, err := c.Static().CoreV1().Pods(namespace).Get(ctx, name, metav1.GetOptions{}) if err != nil && !k8sErrors.IsNotFound(err) { return false, err } @@ -306,12 +333,14 @@ func (c *client) WaitPodStatus(namespace, name string, status corev1.PodPhase) e return false, nil } - return watch(name, watchFn, c.restCfg.Timeout) + return watch(context.Background(), name, watchFn, c.restCfg.Timeout) } func (c *client) WaitPodStatusByLabel(namespace, labelName, labelValue string, status corev1.PodPhase) error { - watchFn := func() (bool, error) { - pods, err := c.Static().CoreV1().Pods(namespace).List(context.Background(), metav1.ListOptions{LabelSelector: fmt.Sprintf("%s=%s", labelName, labelValue)}) + watchFn := func(ctx context.Context) (bool, error) { + pods, err := c.Static().CoreV1().Pods(namespace).List( + ctx, metav1.ListOptions{LabelSelector: fmt.Sprintf("%s=%s", labelName, labelValue)}, + ) if err != nil { return false, err } @@ -327,17 +356,23 @@ func (c *client) WaitPodStatusByLabel(namespace, labelName, labelValue string, s return ok, nil } - return watch(fmt.Sprintf("Pod labeled: %s=%s", labelName, labelValue), watchFn, c.restCfg.Timeout) + return watch( + context.Background(), fmt.Sprintf("Pod labeled: %s=%s", labelName, labelValue), watchFn, c.restCfg.Timeout, + ) } -func (c *client) WatchResource(res schema.GroupVersionResource, name, namespace string, checkFn func(u *unstructured.Unstructured) (bool, error)) error { - watchFn := func() (bool, error) { +func (c *client) WatchResource( + res schema.GroupVersionResource, name, namespace string, checkFn func(u *unstructured.Unstructured) (bool, error), +) error { + watchFn := func(ctx context.Context) (bool, error) { var itm *unstructured.Unstructured var err error if namespace != "" { - itm, err = c.Dynamic().Resource(res).Namespace(namespace).Get(context.Background(), name, metav1.GetOptions{}) + itm, err = c.Dynamic().Resource(res).Namespace(namespace).Get( + ctx, name, metav1.GetOptions{}, + ) } else { - itm, err = c.Dynamic().Resource(res).Get(context.Background(), name, metav1.GetOptions{}) + itm, err = c.Dynamic().Resource(res).Get(ctx, name, metav1.GetOptions{}) } if err != nil { return false, errors.Wrapf(err, "Failed to check %s", res.Resource) @@ -345,7 +380,22 @@ func (c *client) WatchResource(res schema.GroupVersionResource, name, namespace return checkFn(itm) } - return watch(res.Resource, watchFn, c.restCfg.Timeout) + return watch(context.Background(), res.Resource, watchFn, c.restCfg.Timeout) +} + +func (c *client) WatchObject( + ctx context.Context, obj ctrlClient.Object, checkFn func(u ctrlClient.Object) (bool, error), +) error { + + key := ctrlClient.ObjectKeyFromObject(obj) + watchFn := func(ctx context.Context) (bool, error) { + if err := c.ctrlClient.Get(ctx, key, obj); err != nil { + return false, errors.Wrapf(err, "Failed to check %s", key) + } + return checkFn(obj) + } + + return watch(ctx, key.String(), watchFn, c.restCfg.Timeout) } func (c *client) DefaultNamespace() string { @@ -357,23 +407,21 @@ func (c *client) DefaultNamespace() string { // watch provides a unified implementation to watch resources. // timeout of zero does NOT mean "no timeout", i.e. "wait forever" - it means the function will time-out almost immediately - at the discretion of the golang scheduler. -func watch(res string, watchFn func() (bool, error), timeout time.Duration) error { - timeChan := time.After(timeout) +func watch( + ctx context.Context, res string, watchFn func(ctx context.Context) (bool, error), timeout time.Duration, +) error { + + ctx, cancel := context.WithTimeout(ctx, timeout) + defer cancel() for { - select { - case <-timeChan: - return fmt.Errorf("Timeout reached while waiting for %s", res) - - default: - finished, err := watchFn() - if err != nil { - return err - } - if finished { - return nil - } - time.Sleep(defaultWaitSleep) + finished, err := watchFn(ctx) + if err != nil { + return fmt.Errorf("error waiting for %s: %w", res, err) + } + if finished { + return nil } + time.Sleep(defaultWaitSleep) } } diff --git a/internal/kube/kube.go b/internal/kube/kube.go index 5ac1d60b8..38914987f 100644 --- a/internal/kube/kube.go +++ b/internal/kube/kube.go @@ -1,10 +1,13 @@ package kube import ( + "context" + appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" + ctrl "sigs.k8s.io/controller-runtime/pkg/client" istio "istio.io/client-go/pkg/clientset/versioned" "k8s.io/client-go/dynamic" @@ -21,6 +24,7 @@ type KymaKube interface { Static() kubernetes.Interface Dynamic() dynamic.Interface Istio() istio.Interface + Ctrl() ctrl.WithWatch // RestConfig provides the REST configuration of the kubernetes client RestConfig() *rest.Config @@ -28,8 +32,12 @@ type KymaKube interface { // KubeConfig provides the currently used kubeconfig KubeConfig() *api.Config - // Apply provides the functionality as `kubectl apply -f` for the given yaml. - Apply(manifest []byte) error + // ParseManifest uses a manifest .yaml file and returns resource Infos that can be used to determine mappings + // and interact with them in the cluster + ParseManifest(manifest []byte) ([]ctrl.Object, error) + + // Apply provides the functionality as `kubectl apply -f --server-side` for the given yaml. + Apply(ctx context.Context, force bool, objs ...ctrl.Object) error // DefaultNamespace finds out what the default namespace is based on: // 1. Default namespace on the Kubeconfig @@ -49,11 +57,22 @@ type KymaKube interface { WaitPodStatusByLabel(namespace, labelName, labelValue string, status corev1.PodPhase) error // WaitDeploymentStatus waits for the given deployment to have the desired status for the given condition type - WaitDeploymentStatus(namespace, name string, cond appsv1.DeploymentConditionType, status corev1.ConditionStatus) error + WaitDeploymentStatus( + namespace, name string, cond appsv1.DeploymentConditionType, status corev1.ConditionStatus, + ) error // WatchResource watches an arbitrary resource using the k8s unstructured API. // To check if the resource is in the desired state, checkFn is called repeatedly passing the resource as parameter, // until either it returns true or the timeout is reached. // If the timeout is reached an error is returned. - WatchResource(res schema.GroupVersionResource, name, namespace string, checkFn func(u *unstructured.Unstructured) (bool, error)) error + WatchResource( + res schema.GroupVersionResource, name, namespace string, + checkFn func(u *unstructured.Unstructured) (bool, error), + ) error + + // WatchObject watches an arbitrary object using the k8s unstructured API. + // To check if the resource is in the desired state, checkFn is called repeatedly passing the resource as parameter, + // until either it returns true or the timeout is reached. + // If the timeout is reached an error is returned. + WatchObject(ctx context.Context, obj ctrl.Object, checkFn func(o ctrl.Object) (bool, error)) error } diff --git a/internal/kube/mocks/KymaKube.go b/internal/kube/mocks/KymaKube.go index d1549b855..b91dbf5e0 100644 --- a/internal/kube/mocks/KymaKube.go +++ b/internal/kube/mocks/KymaKube.go @@ -1,10 +1,14 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.20.0. DO NOT EDIT. package mocks import ( - corev1 "k8s.io/api/core/v1" api "k8s.io/client-go/tools/clientcmd/api" + client "sigs.k8s.io/controller-runtime/pkg/client" + + context "context" + + corev1 "k8s.io/api/core/v1" dynamic "k8s.io/client-go/dynamic" @@ -28,13 +32,20 @@ type KymaKube struct { mock.Mock } -// Apply provides a mock function with given fields: manifest -func (_m *KymaKube) Apply(manifest []byte) error { - ret := _m.Called(manifest) +// Apply provides a mock function with given fields: ctx, force, objs +func (_m *KymaKube) Apply(ctx context.Context, force bool, objs ...client.Object) error { + _va := make([]interface{}, len(objs)) + for _i := range objs { + _va[_i] = objs[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, force) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) var r0 error - if rf, ok := ret.Get(0).(func([]byte) error); ok { - r0 = rf(manifest) + if rf, ok := ret.Get(0).(func(context.Context, bool, ...client.Object) error); ok { + r0 = rf(ctx, force, objs...) } else { r0 = ret.Error(0) } @@ -42,6 +53,22 @@ func (_m *KymaKube) Apply(manifest []byte) error { return r0 } +// Ctrl provides a mock function with given fields: +func (_m *KymaKube) Ctrl() client.WithWatch { + ret := _m.Called() + + var r0 client.WithWatch + if rf, ok := ret.Get(0).(func() client.WithWatch); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(client.WithWatch) + } + } + + return r0 +} + // DefaultNamespace provides a mock function with given fields: func (_m *KymaKube) DefaultNamespace() string { ret := _m.Called() @@ -77,13 +104,16 @@ func (_m *KymaKube) IsPodDeployed(namespace string, name string) (bool, error) { ret := _m.Called(namespace, name) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { + return rf(namespace, name) + } if rf, ok := ret.Get(0).(func(string, string) bool); ok { r0 = rf(namespace, name) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(string, string) error); ok { r1 = rf(namespace, name) } else { @@ -98,13 +128,16 @@ func (_m *KymaKube) IsPodDeployedByLabel(namespace string, labelName string, lab ret := _m.Called(namespace, labelName, labelValue) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(string, string, string) (bool, error)); ok { + return rf(namespace, labelName, labelValue) + } if rf, ok := ret.Get(0).(func(string, string, string) bool); ok { r0 = rf(namespace, labelName, labelValue) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(string, string, string) error); ok { r1 = rf(namespace, labelName, labelValue) } else { @@ -146,6 +179,32 @@ func (_m *KymaKube) KubeConfig() *api.Config { return r0 } +// ParseManifest provides a mock function with given fields: manifest +func (_m *KymaKube) ParseManifest(manifest []byte) ([]client.Object, error) { + ret := _m.Called(manifest) + + var r0 []client.Object + var r1 error + if rf, ok := ret.Get(0).(func([]byte) ([]client.Object, error)); ok { + return rf(manifest) + } + if rf, ok := ret.Get(0).(func([]byte) []client.Object); ok { + r0 = rf(manifest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]client.Object) + } + } + + if rf, ok := ret.Get(1).(func([]byte) error); ok { + r1 = rf(manifest) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // RestConfig provides a mock function with given fields: func (_m *KymaKube) RestConfig() *rest.Config { ret := _m.Called() @@ -220,6 +279,20 @@ func (_m *KymaKube) WaitPodStatusByLabel(namespace string, labelName string, lab return r0 } +// WatchObject provides a mock function with given fields: ctx, obj, checkFn +func (_m *KymaKube) WatchObject(ctx context.Context, obj client.Object, checkFn func(client.Object) (bool, error)) error { + ret := _m.Called(ctx, obj, checkFn) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, client.Object, func(client.Object) (bool, error)) error); ok { + r0 = rf(ctx, obj, checkFn) + } else { + r0 = ret.Error(0) + } + + return r0 +} + // WatchResource provides a mock function with given fields: res, name, namespace, checkFn func (_m *KymaKube) WatchResource(res schema.GroupVersionResource, name string, namespace string, checkFn func(*unstructured.Unstructured) (bool, error)) error { ret := _m.Called(res, name, namespace, checkFn) diff --git a/internal/kube/ssa.go b/internal/kube/ssa.go new file mode 100644 index 000000000..fe633453f --- /dev/null +++ b/internal/kube/ssa.go @@ -0,0 +1,132 @@ +package kube + +import ( + "context" + "errors" + "fmt" + "time" + + "github.com/kyma-project/cli/pkg/errs" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + "k8s.io/cli-runtime/pkg/resource" + + ctrlClient "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log" +) + +var ErrClientObjectConversionFailed = errors.New("ctrlClient object conversion failed") + +type SSA interface { + Run(context.Context, []*resource.Info) error +} + +type ConcurrentDefaultSSA struct { + clnt ctrlClient.Client + owner ctrlClient.FieldOwner + versioner runtime.GroupVersioner + force bool +} + +func ConcurrentSSA(clnt ctrlClient.Client, owner ctrlClient.FieldOwner, force bool) *ConcurrentDefaultSSA { + return &ConcurrentDefaultSSA{ + clnt: clnt, owner: owner, force: force, + versioner: schema.GroupVersions(clnt.Scheme().PrioritizedVersionsAllGroups()), + } +} + +func (c *ConcurrentDefaultSSA) Run(ctx context.Context, resources []*resource.Info) error { + ssaStart := time.Now() + logger := log.FromContext(ctx, "owner", c.owner) + logger.V(2).Info("ServerSideApply", "resources", len(resources)) + + // The Runtime Complexity of this Branch is N as only ServerSideApplier Apply is required + results := make(chan error, len(resources)) + for i := range resources { + i := i + go c.serverSideApply(ctx, resources[i], results) + } + + var errsFromApply []error + for i := 0; i < len(resources); i++ { + if err := <-results; err != nil { + errsFromApply = append(errsFromApply, err) + } + } + + ssaFinish := time.Since(ssaStart) + + if errsFromApply != nil { + return fmt.Errorf("ServerSideApply failed (after %s): %w", ssaFinish, errs.MergeErrors(errsFromApply...)) + } + logger.V(2).Info("ServerSideApply finished", "time", ssaFinish) + return nil +} + +func (c *ConcurrentDefaultSSA) serverSideApply( + ctx context.Context, + resource *resource.Info, + results chan error, +) { + start := time.Now() + logger := log.FromContext(ctx, "owner", c.owner) + + // this converts unstructured to typed objects if possible, leveraging native APIs + resource.Object = c.convertUnstructuredToTyped(resource.Object, resource.Mapping) + + logger.V(3).Info( + fmt.Sprintf("apply %s", resource.ObjectName()), + ) + + results <- c.serverSideApplyResourceInfo(ctx, resource) + + logger.V(3).Info( + fmt.Sprintf("apply %s finished", resource.ObjectName()), + "time", time.Since(start), + ) +} + +func (c *ConcurrentDefaultSSA) serverSideApplyResourceInfo(ctx context.Context, info *resource.Info) error { + obj, isTyped := info.Object.(ctrlClient.Object) + if !isTyped { + return fmt.Errorf( + "%s is not a valid ctrlClient-go object: %w", info.ObjectName(), ErrClientObjectConversionFailed, + ) + } + + obj.SetManagedFields(nil) + obj.SetResourceVersion("") + + opts := []ctrlClient.PatchOption{c.owner} + if c.force { + opts = append(opts, ctrlClient.ForceOwnership) + } + + err := c.clnt.Patch(ctx, obj, ctrlClient.Apply, opts...) + if err != nil { + return fmt.Errorf( + "patch for %s failed: %w", info.ObjectName(), err, + ) + } + + return nil +} + +// convertWithMapper converts the given object with the optional provided +// RESTMapping. If no mapping is provided, the default schema versioner is used. +// + +func (c *ConcurrentDefaultSSA) convertUnstructuredToTyped( + obj runtime.Object, mapping *meta.RESTMapping, +) runtime.Object { + gv := c.versioner + if mapping != nil { + gv = mapping.GroupVersionKind.GroupVersion() + } + if obj, err := c.clnt.Scheme().UnsafeConvertToVersion(obj, gv); err == nil { + return obj + } + return obj +} diff --git a/internal/kustomize/kustomize.go b/internal/kustomize/kustomize.go index 982965c22..931a237bb 100644 --- a/internal/kustomize/kustomize.go +++ b/internal/kustomize/kustomize.go @@ -1,26 +1,22 @@ package kustomize import ( - "errors" + "bytes" "fmt" "net/url" - "os" - "os/exec" - "path/filepath" - "runtime" + "regexp" "strings" - "github.com/kyma-project/cli/internal/cli" - "github.com/kyma-project/cli/internal/files" - "github.com/kyma-project/cli/pkg/step" + "github.com/pkg/errors" + "sigs.k8s.io/kustomize/api/filters/imagetag" + "sigs.k8s.io/kustomize/api/krusty" + "sigs.k8s.io/kustomize/api/types" + "sigs.k8s.io/kustomize/kyaml/filesys" + "sigs.k8s.io/kustomize/kyaml/kio" + "sigs.k8s.io/kustomize/kyaml/yaml" ) const ( - DefaultVersion = "4.5.7" - versionEnv = "KUSTOMIZE_VERSION" - kustomizeinstaller = "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" - kustomizeBin = "kustomize" - buildURLPattern = "%s?ref=%s" // pattern for URL locations Definition.Location?ref=Definition.Ref defaultURLRef = "main" localRef = "local" @@ -36,20 +32,28 @@ func ParseKustomization(s string) (Definition, error) { // split URL from ref items := strings.Split(s, "@") if len(items) == 0 || len(items) > 2 { - return Definition{}, fmt.Errorf("the given kustomization %q could not be parsed: at least, it must contain a location (URL or path); optionally, URLs can have a reference in format URL@ref", s) + return Definition{}, fmt.Errorf( + "the given kustomization %q could not be parsed: at least, it must contain a location (URL or path); optionally, URLs can have a reference in format URL@ref", + s, + ) } res := Definition{} u, err := url.Parse(items[0]) if err != nil { - return Definition{}, fmt.Errorf("could not parse the given location %q: make sure it is a valid URL or path", items[0]) + return Definition{}, fmt.Errorf( + "could not parse the given location %q: make sure it is a valid URL or path", items[0], + ) } // URL case if u.Scheme != "" && u.Host != "" { pathChunks := strings.Split(u.Path, "/") if len(pathChunks) < 3 { - return Definition{}, fmt.Errorf("The provided URL %q does not belong to a repository. It must follow the format DOMAIN.EXT/OWNER/REPO/[SUBPATH]", items[0]) + return Definition{}, fmt.Errorf( + "The provided URL %q does not belong to a repository. It must follow the format DOMAIN.EXT/OWNER/REPO/[SUBPATH]", + items[0], + ) } res.Name = pathChunks[2] if len(items) == 2 { @@ -67,103 +71,126 @@ func ParseKustomization(s string) (Definition, error) { return res, nil } -func Setup(step step.Step, verbose bool) error { - // check if binary is there (not interested in the path itself at setup) - _, err := kustomizeBinPath() - - // if not installed, install - if errors.Is(err, os.ErrNotExist) { - if runtime.GOOS == "windows" { - if _, err := exec.LookPath("bash"); err != nil { - return errors.New("\nBash is not installed. To install bash on windows please see http://win-bash.sourceforge.net") - } - } - - v := os.Getenv(versionEnv) - if v == "" { - v = DefaultVersion - } - - home, err := files.KymaHome() - if err != nil { - return err - } - - downloadCmd := exec.Command("curl", "-s", kustomizeinstaller) - installCmd := exec.Command("bash", "-s", "--", v, home) +const NoOutputFile = "" - // pipe the downloaded script to the install command - out, err := cli.Pipe(downloadCmd, installCmd) +func BuildMany(kustomizations []Definition, filters []kio.Filter) ([]byte, error) { + ms := bytes.Buffer{} + for _, k := range kustomizations { + manifest, err := Build(k, filters...) if err != nil { - return fmt.Errorf("error installing kustomize %w", err) - } else if verbose { - step.LogInfof("Installed Kustomize: %s", out) + return nil, fmt.Errorf("could not build manifest for %s: %w", k.Name, err) } - return nil - } - if err != nil { - return fmt.Errorf("error getting kustomize binary: %w", err) + ms.Write(manifest) + ms.WriteString("\n---\n") } - return nil + + return ms.Bytes(), nil } // Build generates a manifest given a path using kustomize // Additional args might be given to the kustomize build command -func Build(def Definition, args ...string) ([]byte, error) { - p, err := kustomizeBinPath() - if err != nil { - return nil, fmt.Errorf("error getting kustomize binary: %w", err) - } +func Build(def Definition, filters ...kio.Filter) ([]byte, error) { + opts := krusty.MakeDefaultOptions() + kustomize := krusty.MakeKustomizer(opts) path := def.Location if def.Ref != localRef { path = fmt.Sprintf(buildURLPattern, def.Location, def.Ref) } - // prepend command and path to args - args = append([]string{"build", path}, args...) - - out, err := exec.Command(p, args...).CombinedOutput() + results, err := kustomize.Run(filesys.MakeFsOnDisk(), path) if err != nil { - return nil, fmt.Errorf("could not build kustomization: %s: %w", out, err) + return nil, fmt.Errorf("could not build kustomization: %w", err) } - return out, nil -} + for i, filter := range filters { + if err := results.ApplyFilter(filter); err != nil { + return nil, fmt.Errorf("could not apply filter (number %v): %w", i, err) + } + } -// Set image edits the given image to the given value in the kustomization found in path. -func SetImage(path, img, value string) error { - p, err := kustomizeBinPath() + yml, err := results.AsYaml() if err != nil { - return fmt.Errorf("error getting kustomize binary: %w", err) + return nil, fmt.Errorf("could not parse kustomization as yml: %w", err) } - c := exec.Command(p, "edit", "set", "image", fmt.Sprintf("%s=%s", img, value)) - c.Dir = path - out, err := c.CombinedOutput() + return yml, nil +} + +const ( + ControllerImageName = "controller" +) + +func LifecycleManagerImageModifier(overrideString string, onOverride func(image string)) (imagetag.Filter, error) { + override, err := parseOverride(overrideString) if err != nil { - return fmt.Errorf("could not build kustomization: %s: %w", out, err) + return imagetag.Filter{}, err } + return ImageModifier( + "*lifecycle-manager*", override.name, override.tag, override.digest, + func(key, value, tag string, node *yaml.RNode) { onOverride(value) }, + ), nil +} - return nil +type override struct { + name string + digest string + tag string } -// kustomizeBinPath looks for the kustomize binary in the PATH or in the default Kyma home folder. -// If it's not there in any location, os.ErrNotExist is returned. -// Any other error means something went wrong. -func kustomizeBinPath() (string, error) { - p, err := exec.LookPath(kustomizeBin) - if err != nil && !errors.Is(err, exec.ErrNotFound) { - return p, err +var ErrImageInvalidArgs = errors.New( + `invalid format of image, use one of the following options: +- :, in which case both image and tag get overritten +- @, in which case both image and digest get overritten +- , in which case the default image is used but with a different tag`, +) + +// parseOverride parses the override parameters +// from the given arg into a struct +// heavily inspired by kustomize edit https://github.com/kubernetes-sigs/kustomize/blob/22dbd3eb17d9980f900d761ff3665c2b1849726b/kustomize/commands/edit/set/setimage.go#L231 +func parseOverride(arg string) (override, error) { + // match @ + if d := strings.Split(arg, "@"); len(d) > 1 { + return override{ + name: d[0], + digest: d[1], + }, nil } - if p != "" { - return p, nil + + // match : + if t := regexp.MustCompile(`^(.*):([a-zA-Z0-9._-]*|\*)$`).FindStringSubmatch(arg); len(t) == 3 { + return override{ + name: t[1], + tag: t[2], + }, nil } - home, err := files.KymaHome() - if err != nil { - return "", err + // match + if len(arg) > 0 { + return override{ + tag: arg, + }, nil } + return override{}, ErrImageInvalidArgs +} - return exec.LookPath(filepath.Join(home, kustomizeBin)) +func ImageModifier( + name, img, tag, digest string, callback func(key, value, tag string, node *yaml.RNode), +) imagetag.Filter { + filter := imagetag.Filter{ + ImageTag: types.Image{ + Name: name, + NewName: img, + NewTag: tag, + Digest: digest, + }, + FsSlice: []types.FieldSpec{ + {Path: "spec/containers[]/image"}, + {Path: "spec/template/spec/containers[]/image"}, + }, + } + if callback != nil { + (&filter).WithMutationTracker(callback) + } + return filter } diff --git a/internal/nice/summary.go b/internal/nice/summary.go index 55d3a67e3..4b0ca48bb 100644 --- a/internal/nice/summary.go +++ b/internal/nice/summary.go @@ -67,17 +67,7 @@ func (sum *Summary) Print(t time.Duration) error { nicePrint.PrintKyma() fmt.Print(" installation took:\t\t") - h, m, s := "", "", "" - if int64(t.Hours()) != 0 { - h = fmt.Sprintf("%d hours", int64(t.Hours())) - } - if int64(t.Minutes()) != 0 { - m = fmt.Sprintf("%d minutes", int64(t.Minutes())) - } - if int64(t.Seconds()) != 0 { - s = fmt.Sprintf("%d seconds", int64(t.Seconds())) - } - nicePrint.PrintImportantf("%s%s%s", h, m, s) + nicePrint.PrintImportantf("%s", t.Round(time.Second).String()) if sum.URL != "" { nicePrint.PrintKyma() diff --git a/pkg/module/blob/blob.go b/pkg/module/blob/blob.go index 7c6b5a0bd..878a59024 100644 --- a/pkg/module/blob/blob.go +++ b/pkg/module/blob/blob.go @@ -15,6 +15,7 @@ import ( "github.com/go-logr/logr" "github.com/mandelsoft/vfs/pkg/vfs" + "github.com/open-component-model/ocm/pkg/common/accessio" "github.com/opencontainers/go-digest" ) @@ -29,9 +30,38 @@ const MediaTypeOctetStream = "application/octet-stream" // Output is the output generated when reading a blob.Input. type Output struct { - Digest string - Size int64 - Reader io.ReadCloser + mimeType string + digest string + size int64 + reader io.ReadCloser +} + +func (o *Output) Get() ([]byte, error) { + return io.ReadAll(o.reader) +} + +func (o *Output) Reader() (io.ReadCloser, error) { + return o.reader, nil +} + +func (o *Output) Close() error { + return o.reader.Close() +} + +func (o *Output) Size() int64 { + return o.size +} + +func (o *Output) MimeType() string { + return o.mimeType +} + +func (o *Output) DigestKnown() bool { + return true +} + +func (o *Output) Digest() digest.Digest { + return digest.FromString(o.digest) } type InputType string @@ -87,6 +117,10 @@ func (input *Input) SetMediaTypeIfNotDefined(mediaType string) { input.MediaType = mediaType } +func AccessForFileOrFolder(fs vfs.FileSystem, input *Input) (accessio.BlobAccess, error) { + return input.Read(context.Background(), fs) +} + // Read reads the configured blob and returns a reader to the given file. func (input *Input) Read(ctx context.Context, fs vfs.FileSystem) (*Output, error) { inputInfo, err := fs.Stat(input.Path) @@ -105,12 +139,14 @@ func (input *Input) Read(ctx context.Context, fs vfs.FileSystem) (*Output, error if input.Compress() { input.SetMediaTypeIfNotDefined(MediaTypeGZip) gw := gzip.NewWriter(&data) - if err := TarFileSystem(ctx, fs, input.Path, gw, TarFileSystemOptions{ - IncludeFiles: input.IncludeFiles, - ExcludeFiles: input.ExcludeFiles, - PreserveDir: input.PreserveDir, - FollowSymlinks: input.FollowSymlinks, - }); err != nil { + if err := TarFileSystem( + ctx, fs, input.Path, gw, TarFileSystemOptions{ + IncludeFiles: input.IncludeFiles, + ExcludeFiles: input.ExcludeFiles, + PreserveDir: input.PreserveDir, + FollowSymlinks: input.FollowSymlinks, + }, + ); err != nil { return nil, fmt.Errorf("unable to tar input artifact: %w", err) } if err := gw.Close(); err != nil { @@ -118,20 +154,23 @@ func (input *Input) Read(ctx context.Context, fs vfs.FileSystem) (*Output, error } } else { input.SetMediaTypeIfNotDefined(MediaTypeTar) - if err := TarFileSystem(ctx, fs, input.Path, &data, TarFileSystemOptions{ - IncludeFiles: input.IncludeFiles, - ExcludeFiles: input.ExcludeFiles, - PreserveDir: input.PreserveDir, - FollowSymlinks: input.FollowSymlinks, - }); err != nil { + if err := TarFileSystem( + ctx, fs, input.Path, &data, TarFileSystemOptions{ + IncludeFiles: input.IncludeFiles, + ExcludeFiles: input.ExcludeFiles, + PreserveDir: input.PreserveDir, + FollowSymlinks: input.FollowSymlinks, + }, + ); err != nil { return nil, fmt.Errorf("unable to tar input artifact: %w", err) } } return &Output{ - Digest: digest.FromBytes(data.Bytes()).String(), - Size: int64(data.Len()), - Reader: io.NopCloser(&data), + mimeType: input.MediaType, + digest: digest.FromBytes(data.Bytes()).String(), + size: int64(data.Len()), + reader: io.NopCloser(&data), }, nil } else if input.Type == FileInputType { if inputInfo.IsDir() { @@ -162,15 +201,19 @@ func (input *Input) Read(ctx context.Context, fs vfs.FileSystem) (*Output, error } return &Output{ - Digest: digest.FromBytes(data.Bytes()).String(), - Size: int64(data.Len()), - Reader: io.NopCloser(&data), + mimeType: input.MediaType, + digest: digest.FromBytes(data.Bytes()).String(), + size: int64(data.Len()), + reader: io.NopCloser(&data), }, nil } + // default media type to binary data if nothing else is defined + input.SetMediaTypeIfNotDefined(MediaTypeOctetStream) return &Output{ - Digest: blobDigest.String(), - Size: inputInfo.Size(), - Reader: inputBlob, + mimeType: input.MediaType, + digest: blobDigest.String(), + size: inputInfo.Size(), + reader: inputBlob, }, nil } else { return nil, fmt.Errorf("unknown input type %q", input.Path) @@ -224,7 +267,9 @@ func (opts *TarFileSystemOptions) Included(path string) (bool, error) { } // TarFileSystem creates a tar archive from a filesystem. -func TarFileSystem(ctx context.Context, fs vfs.FileSystem, root string, writer io.Writer, opts TarFileSystemOptions) error { +func TarFileSystem( + ctx context.Context, fs vfs.FileSystem, root string, writer io.Writer, opts TarFileSystemOptions, +) error { tw := tar.NewWriter(writer) if opts.PreserveDir { opts.root = pathutil.Base(root) @@ -235,7 +280,9 @@ func TarFileSystem(ctx context.Context, fs vfs.FileSystem, root string, writer i return tw.Close() } -func addFileToTar(ctx context.Context, fs vfs.FileSystem, tw *tar.Writer, path string, realPath string, opts TarFileSystemOptions) error { +func addFileToTar( + ctx context.Context, fs vfs.FileSystem, tw *tar.Writer, path string, realPath string, opts TarFileSystemOptions, +) error { if ctx.Err() != nil { return ctx.Err() } @@ -274,19 +321,21 @@ func addFileToTar(ctx context.Context, fs vfs.FileSystem, tw *tar.Writer, path s return fmt.Errorf("unable to write header for %q: %w", path, err) } } - err := vfs.Walk(fs, realPath, func(subFilePath string, info os.FileInfo, err error) error { - if subFilePath == realPath { - return nil - } - if err != nil { - return err - } - relPath, err := filepath.Rel(realPath, subFilePath) - if err != nil { - return fmt.Errorf("unable to calculate relative path for %s: %w", subFilePath, err) - } - return addFileToTar(ctx, fs, tw, pathutil.Join(path, relPath), subFilePath, opts) - }) + err := vfs.Walk( + fs, realPath, func(subFilePath string, info os.FileInfo, err error) error { + if subFilePath == realPath { + return nil + } + if err != nil { + return err + } + relPath, err := filepath.Rel(realPath, subFilePath) + if err != nil { + return fmt.Errorf("unable to calculate relative path for %s: %w", subFilePath, err) + } + return addFileToTar(ctx, fs, tw, pathutil.Join(path, relPath), subFilePath, opts) + }, + ) return err case info.Mode().IsRegular(): if err := tw.WriteHeader(header); err != nil { diff --git a/pkg/module/build.go b/pkg/module/build.go index fc4156703..6b37d3ef5 100644 --- a/pkg/module/build.go +++ b/pkg/module/build.go @@ -1,136 +1,97 @@ package module import ( - "errors" "fmt" "os" - "path/filepath" - cdv2 "github.com/gardener/component-spec/bindings-go/apis/v2" - cdvalidation "github.com/gardener/component-spec/bindings-go/apis/v2/validation" - "github.com/gardener/component-spec/bindings-go/codec" - "github.com/gardener/component-spec/bindings-go/ctf" "github.com/kyma-project/cli/pkg/module/git" "github.com/mandelsoft/vfs/pkg/projectionfs" "github.com/mandelsoft/vfs/pkg/vfs" - "sigs.k8s.io/yaml" + "github.com/open-component-model/ocm/pkg/common/accessobj" + "github.com/open-component-model/ocm/pkg/contexts/ocm/attrs/compatattr" + ocm "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc" + v1 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/meta/v1" + compdescv2 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/versions/v2" + "github.com/open-component-model/ocm/pkg/contexts/ocm/cpi" + "github.com/open-component-model/ocm/pkg/contexts/ocm/repositories/comparch" ) -// Build creates a component archive with the given configuration -func Build(fs vfs.FileSystem, def *Definition) (*ctf.ComponentArchive, error) { +// Build creates a component archive with the given configuration. +// An empty vfs.FileSystem causes a FileSystem to be created in +// the temporary OS folder +func Build(fs vfs.FileSystem, path string, def *Definition) (*comparch.ComponentArchive, error) { if err := def.validate(); err != nil { return nil, err } - - compDescFilePath := filepath.Join(def.ArchivePath, ctf.ComponentDescriptorFileName) - if !def.Overwrite { - _, err := fs.Stat(compDescFilePath) - if err != nil && !os.IsNotExist(err) { - return nil, err - } - if err == nil { - //Overwrite == false and component descriptor exists - return buildWithoutOverwriting(fs, def) - } - } - - //Overwrite == true OR (Overwrite == false AND the component descriptor does not exist) - return buildFull(fs, def, compDescFilePath) + return build(fs, path, def) } -// buildWithoutOverwriting builds over an existing descriptor without overwriting -func buildWithoutOverwriting(fs vfs.FileSystem, def *Definition) (*ctf.ComponentArchive, error) { - // add the input to the ctf format - archiveFs, err := projectionfs.New(fs, def.ArchivePath) - if err != nil { - return nil, fmt.Errorf("unable to create projectionfilesystem: %w", err) - } +func build(fs vfs.FileSystem, path string, def *Definition) (*comparch.ComponentArchive, error) { + // build minimal archive - archive, err := ctf.NewComponentArchiveFromFilesystem(archiveFs, codec.DisableValidation(true)) - if err != nil { - return nil, fmt.Errorf("unable to parse component archive from %s: %w", def.ArchivePath, err) + if err := fs.MkdirAll(path, os.ModePerm); err != nil { + return nil, fmt.Errorf("unable to create component-archive path %q: %w", fs.Normalize(path), err) } - - cd := archive.ComponentDescriptor - - if err := addSources(cd, def); err != nil { - return nil, err + archiveFs, err := projectionfs.New(fs, path) + if err != nil { + return nil, fmt.Errorf("unable to create projectionfilesystem: %w", err) } - if def.Name != "" { - if cd.Name != "" && cd.Name != def.Name { - return nil, errors.New("unable to overwrite the existing component name: forbidden") - } - cd.Name = def.Name + ctx := cpi.DefaultContext() + if err := compatattr.Set(ctx, def.SchemaVersion == compdescv2.SchemaVersion); err != nil { + return nil, fmt.Errorf("could not set compatibility attribute for v2: %w", err) } - if def.Version != "" { - if cd.Version != "" && cd.Version != def.Version { - return nil, errors.New("unable to overwrite the existing component version: forbidden") - } - cd.Version = def.Version + archive, err := comparch.New( + ctx, + accessobj.ACC_CREATE, archiveFs, + nil, + nil, + vfs.ModePerm, + ) + if err != nil { + return nil, fmt.Errorf("unable to build archive for minimal descriptor: %w", err) } - if err = cdvalidation.Validate(cd); err != nil { - return nil, fmt.Errorf("invalid component descriptor: %w", err) + cd := archive.GetDescriptor() + cd.Metadata.ConfiguredVersion = def.SchemaVersion + builtByCLI, err := v1.NewLabel("kyma-project.io/built-by", "cli", v1.WithVersion("v1")) + if err != nil { + return nil, err } - return archive, nil -} - -func buildFull(fs vfs.FileSystem, def *Definition, compDescFilePath string) (*ctf.ComponentArchive, error) { - // build minimal archive - - if err := fs.MkdirAll(def.ArchivePath, os.ModePerm); err != nil { - return nil, fmt.Errorf("unable to create component-archive path %q: %w", def.ArchivePath, err) - } - archiveFs, err := projectionfs.New(fs, def.ArchivePath) - if err != nil { - return nil, fmt.Errorf("unable to create projectionfilesystem: %w", err) + if compatattr.Get(ctx) { + cd.Provider = v1.Provider{Name: "internal"} + } else { + cd.Provider = v1.Provider{Name: "kyma-project.io", Labels: v1.Labels{*builtByCLI}} } - cd := &cdv2.ComponentDescriptor{} - if err := addSources(cd, def); err != nil { + if err := addSources(ctx, cd, def); err != nil { return nil, err } - cd.Metadata.Version = cdv2.SchemaVersion - cd.ComponentSpec.Name = def.Name - cd.ComponentSpec.Version = def.Version - cd.Provider = cdv2.InternalProvider - cd.RepositoryContexts = make([]*cdv2.UnstructuredTypedObject, 0) - if len(def.RegistryURL) != 0 { - repoCtx, err := cdv2.NewUnstructured(cdv2.NewOCIRegistryRepository(def.RegistryURL, cdv2.ComponentNameMapping(def.NameMappingMode))) - if err != nil { - return nil, fmt.Errorf("unable to create repository context: %w", err) - } - cd.RepositoryContexts = []*cdv2.UnstructuredTypedObject{&repoCtx} - } - if err := cdv2.DefaultComponent(cd); err != nil { - return nil, fmt.Errorf("unable to default component descriptor: %w", err) - } + cd.ComponentSpec.SetName(def.Name) + cd.ComponentSpec.SetVersion(def.Version) - if err := cdvalidation.Validate(cd); err != nil { - return nil, fmt.Errorf("unable to validate component descriptor: %w", err) - } + ocm.DefaultResources(cd) - data, err := yaml.Marshal(cd) - if err != nil { - return nil, fmt.Errorf("unable to marshal component descriptor: %w", err) - } - if err := vfs.WriteFile(fs, compDescFilePath, data, os.ModePerm); err != nil { - return nil, fmt.Errorf("unable to write component descriptor to %s: %w", compDescFilePath, err) + if err := ocm.Validate(cd); err != nil { + return nil, fmt.Errorf("unable to validate component descriptor: %w", err) } - return ctf.NewComponentArchive(cd, archiveFs), nil + return archive, nil } -func addSources(cd *cdv2.ComponentDescriptor, def *Definition) error { - src, err := git.Source(def.Source, def.Repo, def.Version) +func addSources(ctx cpi.Context, cd *ocm.ComponentDescriptor, def *Definition) error { + src, err := git.Source(ctx, def.Source, def.Repo, def.Version) if err != nil { return err } - if src != nil { + + if idx := cd.GetSourceIndex(&src.SourceMeta); idx < 0 { cd.Sources = append(cd.Sources, *src) + } else { + cd.Sources[idx] = *src } + return nil } diff --git a/pkg/module/build_test.go b/pkg/module/build_test.go deleted file mode 100644 index 90170adb0..000000000 --- a/pkg/module/build_test.go +++ /dev/null @@ -1 +0,0 @@ -package module_test diff --git a/pkg/module/def.go b/pkg/module/def.go index cc55393f9..296b3dc8b 100644 --- a/pkg/module/def.go +++ b/pkg/module/def.go @@ -9,14 +9,14 @@ import ( // Definition contains all infrmation and configuration that defines a module (e.g. component descriptor config, template config, layers, CRs...) type Definition struct { + SchemaVersion string // schema version for the ocm descriptor Source string // path to the sources to create the module - ArchivePath string // Location of the component descriptor and the archive to create the module image. If it does not exist, it is created. Name string // Name of the module (mandatory) NameMappingMode NameMapping // Component Name mapping as defined in OCM spec. Version string // Version of the module (mandatory) RegistryURL string // Registry URL to push the image to (optional) DefaultCRPath string // path to the file containing the CR to include in the module template (optional) - Overwrite bool // If true, existing module is overwritten if the configuration differs. + Override bool // If true, existing module is overwritten if the configuration differs. // these fields will be filled out when inspecting the module contents Layers []Layer @@ -45,9 +45,6 @@ func (cfg *Definition) validate() error { if cfg.Source == "" { return errors.New("The module source path cannot be empty") } - if cfg.ArchivePath == "" { - return errors.New("The module archive path cannot be empty") - } return nil } @@ -57,5 +54,7 @@ func ParseNameMapping(val string) (NameMapping, error) { } else if val == string(DigestNameMapping) { return DigestNameMapping, nil } - return "", fmt.Errorf("invalid mapping mode: %s, only %s or %s are allowed", val, URLPathNameMapping, DigestNameMapping) + return "", fmt.Errorf( + "invalid mapping mode: %s, only %s or %s are allowed", val, URLPathNameMapping, DigestNameMapping, + ) } diff --git a/pkg/module/git/source.go b/pkg/module/git/source.go index dce06a981..5ecf13698 100644 --- a/pkg/module/git/source.go +++ b/pkg/module/git/source.go @@ -3,40 +3,27 @@ package git import ( "errors" "fmt" - "net/url" "os" "path/filepath" - "strings" - cdv2 "github.com/gardener/component-spec/bindings-go/apis/v2" "github.com/go-git/go-git/v5" + "github.com/open-component-model/ocm/pkg/contexts/ocm/accessmethods/github" + "github.com/open-component-model/ocm/pkg/contexts/ocm/attrs/compatattr" + ocm "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc" + ocmv1 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/meta/v1" + "github.com/open-component-model/ocm/pkg/contexts/ocm/cpi" ) const ( gitFolder = ".git" + Identity = "module-sources" ) var errNotGit = errors.New("not a git repository") -func Source(path, repo, version string) (*cdv2.Source, error) { - var repoURL *url.URL - src := &cdv2.Source{ - IdentityObjectMeta: cdv2.IdentityObjectMeta{ - Version: version, - Type: "git", - }, - Access: &cdv2.UnstructuredTypedObject{ - Object: make(map[string]interface{}), - }, - } - if repo != "" { - var err error - repoURL, err = url.Parse(repo) - if err != nil { - return nil, fmt.Errorf("could not parse repository URL %q: %w", repo, err) - } - } +func Source(ctx cpi.Context, path, repo, version string) (*ocm.Source, error) { + var ref, commit string // check for .git if gitPath, err := findGitInfo(path); err == nil { r, err := git.PlainOpen(gitPath) @@ -54,11 +41,7 @@ func Source(path, repo, version string) (*cdv2.Source, error) { if len(remotes) > 0 { var err error // get remote URL and convert to HTTP in case it is an SSH URL - u := remotes[0].Config().URLs[0] - u = strings.Replace(u, ":", "/", 1) - u = strings.Replace(u, "git@", "https://", 1) - u = strings.TrimSuffix(u, gitFolder) - repoURL, err = url.Parse(u) + repo = remotes[0].Config().URLs[0] if err != nil { return nil, fmt.Errorf("could not parse repository URL %q: %w", repo, err) @@ -71,38 +54,35 @@ func Source(path, repo, version string) (*cdv2.Source, error) { return nil, fmt.Errorf("could not get git information from %q: %w", gitPath, err) } - src.Access.Object["ref"] = head.Name().String() - src.Access.Object["commit"] = head.Hash().String() + ref = head.Name().String() + commit = head.Hash().String() } // without a repo URL we can't create a valid source => skipping source - if repoURL == nil { + if repo == "" { return nil, nil } - pieces := strings.Split(repoURL.Path, "/") - repoName := pieces[len(pieces)-1] - - src.IdentityObjectMeta.Name = repoName - src.Access.Object["repoUrl"] = repoURL.String() - src.Access.Object["type"] = domain(repoURL) - - return src, nil -} + refLabel, err := ocmv1.NewLabel("git.kyma-project.io/ref", ref, ocmv1.WithVersion("v1")) + if err != nil { + return nil, err + } -// domain extracts the domain name (without extension) from a URL. -func domain(u *url.URL) string { - // depending on the format the URL was passed on, the domain can be in different places. - h := u.Hostname() - if h == "" { - h = u.Scheme - if h == "" { - h = u.Path - } + var sourceType string + if compatattr.Get(ctx) { + sourceType = "git" + } else { + sourceType = github.CONSUMER_TYPE } - parts := strings.Split(h, ".") - return parts[len(parts)-2] + return &ocm.Source{ + SourceMeta: ocm.SourceMeta{Type: sourceType, ElementMeta: ocm.ElementMeta{ + Name: Identity, + Version: version, + Labels: ocmv1.Labels{*refLabel}, + }}, + Access: github.New(repo, "", commit), + }, nil } // findGitInfo recursively crawls a path up until a .git folder is found and returns its path. diff --git a/pkg/module/init.go b/pkg/module/init.go new file mode 100644 index 000000000..19b079db3 --- /dev/null +++ b/pkg/module/init.go @@ -0,0 +1,24 @@ +package module + +import ( + "github.com/open-component-model/ocm/pkg/contexts/oci" + "github.com/open-component-model/ocm/pkg/contexts/oci/repositories/ocireg" + "github.com/open-component-model/ocm/pkg/contexts/ocm" + "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc" + "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/versions/ocm.software/v3alpha1" + "github.com/open-component-model/ocm/pkg/contexts/ocm/cpi" + "github.com/open-component-model/ocm/pkg/contexts/ocm/repositories/comparch" + "github.com/open-component-model/ocm/pkg/contexts/ocm/repositories/genericocireg" +) + +// nolint:gochecknoinits +func init() { + compdesc.RegisterScheme(&v3alpha1.DescriptorVersion{}) + ocm.DefaultContext().RepositoryTypes().Register(ocireg.Type, genericocireg.NewRepositoryType(oci.DefaultContext())) + ocm.DefaultContext().RepositoryTypes().Register( + ocireg.LegacyType, genericocireg.NewRepositoryType(oci.DefaultContext()), + ) + ocm.DefaultContext().RepositoryTypes().Register( + comparch.Type, cpi.NewRepositoryType(comparch.Type, &comparch.RepositorySpec{}, nil), + ) +} diff --git a/pkg/module/kubebuilder/project.go b/pkg/module/kubebuilder/project.go index 298301c40..b1f273738 100644 --- a/pkg/module/kubebuilder/project.go +++ b/pkg/module/kubebuilder/project.go @@ -5,6 +5,7 @@ import ( "io/fs" "os" "path/filepath" + "strconv" "strings" "github.com/kyma-project/cli/internal/kustomize" @@ -58,25 +59,14 @@ func (p *Project) FullName() string { return p.Name } -// Build builds the kubebuilder project default kustomization following the given definition. Sets the image the tag: /:; and returns the folder containing the resulting chart. -func (p *Project) Build(name, version, registry string) (string, error) { +// Build builds the kubebuilder project default kustomization following the given definition. +func (p *Project) Build(name, version string) (string, error) { // check layout if !(slices.Contains(p.Layout, V3) || slices.Contains(p.Layout, V4alpha)) { return "", fmt.Errorf("project layout %v is not supported", p.Layout) } - // edit kustomization image and setup build - img := "" - if registry == "" { - img = fmt.Sprintf("%s:%s", name, version) - } else { - img = fmt.Sprintf("%s/%s:%s", registry, name, version) - } - buildPath := filepath.Join(p.path, defaultKustomization) - if err := kustomize.SetImage(buildPath, "controller", img); err != nil { - return "", fmt.Errorf("could not edit kustomization image: %w", err) - } - k, err := kustomize.ParseKustomization(buildPath) + k, err := kustomize.ParseKustomization(filepath.Join(p.path, defaultKustomization)) if err != nil { return "", err } @@ -96,10 +86,15 @@ func (p *Project) Build(name, version, registry string) (string, error) { } // do build - if _, err := kustomize.Build(k, "-o", outPath); err != nil { + yml, err := kustomize.Build(k) + if err != nil { return "", err } + if err := os.WriteFile(filepath.Join(outPath, "rendered.yaml"), yml, os.ModePerm); err != nil { + return "", fmt.Errorf("could not write rendered kustomization as yml to %s: %w", outPath, err) + } + // move CRDs to their folder mvFn := func(path string, d fs.DirEntry, err error) error { fileName := filepath.Base(path) @@ -144,30 +139,56 @@ func (p *Project) DefaultCR(s step.Step) ([]byte, error) { } samplesDir := filepath.Join(p.path, samplesPath) - d, err := os.ReadDir(samplesDir) + filesInDir, err := os.ReadDir(samplesDir) if err != nil { return nil, fmt.Errorf("could not read samples dir %q: %w", samplesDir, err) } - if len(d) == 0 { + if len(filesInDir) == 0 { return nil, fmt.Errorf("no default CR available: samples directory %q is empty", samplesDir) } defaultCR := "" - if len(d) > 1 { + if len(filesInDir) > 1 { // ask for specific file - names := []string{} - for _, f := range d { - names = append(names, f.Name()) + var promptString strings.Builder + promptString.WriteString(fmt.Sprintf("Please specify the file to use as default CR in %s:\n", samplesDir)) + + filesMap := map[int]string{} + fileIndex := 1 + for _, file := range filesInDir { + if strings.HasSuffix(file.Name(), ".yaml") || strings.HasSuffix(file.Name(), ".yml") { + filesMap[fileIndex] = file.Name() + promptString.WriteString(fmt.Sprintf("[%d] %s\n", fileIndex, file.Name())) + fileIndex++ + } + } + promptString.WriteString(fmt.Sprintln("Press ENTER to select the first option as default.")) + + answer, err := s.Prompt(promptString.String()) + if err != nil { + return nil, fmt.Errorf("could not obtain default CR from user prompt: %w", err) + } + var parsedIndex int + if answer == "" { + parsedIndex = 1 // Default to the first choice + } else { + parsedIndex, err = strconv.Atoi(answer) + if err != nil { + return nil, fmt.Errorf("could not obtain default CR from user prompt: %w", err) + } + } + fileName, exists := filesMap[parsedIndex] + if !exists { + err = fmt.Errorf("invalid input [%d] for CR selection", parsedIndex) + return nil, fmt.Errorf("could not obtain default CR from user prompt: %w", err) } - answer, err := s.Prompt(fmt.Sprintf("Please specify the file to use as default CR in %s: %v\n", samplesDir, names)) - defaultCR = filepath.Join(samplesDir, answer) + defaultCR = filepath.Join(samplesDir, fileName) if err != nil { return nil, fmt.Errorf("could not obtain default CR from user prompt: %w", err) } - } else { - // use only file in folder - defaultCR = filepath.Join(samplesDir, d[0].Name()) + } else { // use only file in folder + defaultCR = filepath.Join(samplesDir, filesInDir[0].Name()) } return os.ReadFile(defaultCR) diff --git a/pkg/module/oci/cache.go b/pkg/module/oci/cache.go deleted file mode 100644 index d9a3ce601..000000000 --- a/pkg/module/oci/cache.go +++ /dev/null @@ -1,63 +0,0 @@ -package oci - -import ( - "bytes" - "errors" - "fmt" - "io" - - ocispecv1 "github.com/opencontainers/image-spec/specs-go/v1" -) - -var ( - // ErrNotFound is an error that indicates that the file is not cached - ErrNotFound = errors.New("not cached") -) - -// Cache is the interface for an OCI cache where descriptors can be added and fetched -type Cache interface { - io.Closer - Store - Add(desc ocispecv1.Descriptor, reader io.ReadCloser) error -} - -// Store describes a read-only descriptor store -type Store interface { - Get(desc ocispecv1.Descriptor) (io.ReadCloser, error) -} - -type inmemoryCache struct { - store map[string][]byte -} - -// NewInMemoryCache creates a new in-memory cache. -func NewInMemoryCache() Cache { - return &inmemoryCache{ - store: make(map[string][]byte), - } -} - -func (fs *inmemoryCache) Close() error { - return nil -} - -func (fs *inmemoryCache) Get(desc ocispecv1.Descriptor) (io.ReadCloser, error) { - data, ok := fs.store[desc.Digest.String()] - if !ok { - return nil, ErrNotFound - } - return io.NopCloser(bytes.NewBuffer(data)), nil -} - -func (fs *inmemoryCache) Add(desc ocispecv1.Descriptor, reader io.ReadCloser) error { - if _, ok := fs.store[desc.Digest.String()]; ok { - // already cached - return nil - } - var buf bytes.Buffer - if _, err := io.Copy(&buf, reader); err != nil { - return fmt.Errorf("unable to read data: %w", err) - } - fs.store[desc.Digest.String()] = buf.Bytes() - return nil -} diff --git a/pkg/module/oci/client.go b/pkg/module/oci/client.go deleted file mode 100644 index 4a9899e67..000000000 --- a/pkg/module/oci/client.go +++ /dev/null @@ -1,340 +0,0 @@ -package oci - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "time" - - "go.uber.org/zap" - - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/remotes" - "github.com/containerd/containerd/remotes/docker" - "github.com/opencontainers/go-digest" - ocispecv1 "github.com/opencontainers/image-spec/specs-go/v1" -) - -const ( - DefaultTimeout = 10 * time.Second -) - -type Client interface { - // GetRawManifest returns the raw manifest for a reference. - // The returned manifest can either be single arch or multi arch (image index/manifest list) - GetRawManifest(ctx context.Context, ref string) (ocispecv1.Descriptor, []byte, error) - - // GetManifest returns the ocispec manifest for a reference - GetManifest(ctx context.Context, ref string) (*ocispecv1.Manifest, error) - - // Fetch fetches the blob for the given ocispec Descriptor - Fetch(ctx context.Context, ref string, desc ocispecv1.Descriptor, writer io.Writer) error - - // PushManifest uploads the given manifest with all its layers to the given reference in the registry configured in the client. - PushManifest(ctx context.Context, ref string, manifest *ocispecv1.Manifest) error - - // Cache exposes the client's cache where all intermediate manifests and data are stored. - Cache() Cache -} - -type client struct { - cache Cache - registry string - logger *zap.SugaredLogger - // user to authenticate when calling the registry configured in the client - user string - // secret can be either a password (if user provided) or a long-lived token. - secret string - // timeout for all network calls the client will perform - timeout time.Duration - // if true, the client will make all calls with http instead of https - insecure bool -} - -type Options struct { - Registry string - // (Optional) user to authenticate when calling the registry configured in the client - User string - // (Optional) secret can be either a password (if user provided) or a long-lived token. - Secret string - // timeout for all network calls the client will perform - Timeout time.Duration - // if true, the client will make all calls with http instead of https - Insecure bool -} - -func NewClient(o *Options, logger *zap.SugaredLogger) (Client, error) { - c := &client{ - registry: o.Registry, - user: o.User, - secret: o.Secret, - timeout: o.Timeout, - insecure: o.Insecure, - logger: logger, - } - - if c.timeout == 0 { - c.timeout = DefaultTimeout - } - - c.cache = NewInMemoryCache() - - return c, nil -} - -func (c *client) Cache() Cache { - return c.cache -} - -func (c *client) GetRawManifest(ctx context.Context, ref string) (ocispecv1.Descriptor, []byte, error) { - refspec, err := ParseRef(ref) - if err != nil { - return ocispecv1.Descriptor{}, nil, fmt.Errorf("unable to parse ref: %w", err) - } - ref = refspec.String() - - resolver := c.resolver() - - _, desc, err := resolver.Resolve(ctx, ref) - if err != nil { - return ocispecv1.Descriptor{}, nil, err - } - - if desc.MediaType == MediaTypeDockerV2Schema1Manifest || desc.MediaType == MediaTypeDockerV2Schema1SignedManifest { - convertedManifestDesc, err := ConvertV1ManifestToV2(ctx, c, c.cache, ref, desc) - if err != nil { - return ocispecv1.Descriptor{}, nil, fmt.Errorf("unable to convert v1 manifest to v2: %w", err) - } - desc = convertedManifestDesc - } - - if !isSingleArchImage(desc.MediaType) && !isMultiArchImage(desc.MediaType) { - return ocispecv1.Descriptor{}, nil, fmt.Errorf("media type is not an image manifest or image index: %s", desc.MediaType) - } - - data := bytes.NewBuffer([]byte{}) - if err := c.Fetch(ctx, ref, desc, data); err != nil { - return ocispecv1.Descriptor{}, nil, err - } - rawManifest := data.Bytes() - - return desc, rawManifest, nil -} - -func (c *client) GetManifest(ctx context.Context, ref string) (*ocispecv1.Manifest, error) { - desc, rawManifest, err := c.GetRawManifest(ctx, ref) - if err != nil { - return nil, fmt.Errorf("unable to get manifest: %w", err) - } - - if desc.MediaType != ocispecv1.MediaTypeImageManifest && desc.MediaType != images.MediaTypeDockerSchema2Manifest { - return nil, fmt.Errorf("media type is not an image manifest: %s", desc.MediaType) - } - - var manifest ocispecv1.Manifest - if err := json.Unmarshal(rawManifest, &manifest); err != nil { - return nil, fmt.Errorf("unable to unmarshal manifest: %w", err) - } - - return &manifest, nil -} - -func (c *client) Fetch(ctx context.Context, ref string, desc ocispecv1.Descriptor, writer io.Writer) error { - refspec, err := ParseRef(ref) - if err != nil { - return fmt.Errorf("unable to parse ref: %w", err) - } - ref = refspec.String() - - reader, err := c.getFetchReader(ctx, ref, desc) - if err != nil { - return err - } - defer func() { - if err := reader.Close(); err != nil { - c.logger.Error(err, "failed closing reader", "ref", ref) - } - }() - - if _, err := io.Copy(writer, reader); err != nil { - return err - } - return nil -} - -func (c *client) getFetchReader(ctx context.Context, ref string, desc ocispecv1.Descriptor) (io.ReadCloser, error) { - if c.cache != nil { - reader, err := c.cache.Get(desc) - if err != nil && !errors.Is(ErrNotFound, err) { - return nil, err - } - if err == nil { - return reader, nil - } - } - - resolver := c.resolver() - - fetcher, err := resolver.Fetcher(ctx, ref) - if err != nil { - return nil, err - } - reader, err := fetcher.Fetch(ctx, desc) - if err != nil { - return nil, err - } - // try to cache - if c.cache != nil { - if err := c.cache.Add(desc, reader); err != nil { - // do not throw an error as cache is just an optimization - if err = reader.Close(); err != nil { - c.logger.Info("unable to close reader", "ref", ref, "error", err.Error()) - - } - return fetcher.Fetch(ctx, desc) - } - return c.cache.Get(desc) - } - - return reader, err -} - -func (c *client) PushManifest(ctx context.Context, ref string, manifest *ocispecv1.Manifest) error { - manifestBytes, err := json.Marshal(manifest) - if err != nil { - return fmt.Errorf("unable to marshal manifest: %w", err) - } - - desc := ocispecv1.Descriptor{ - MediaType: ocispecv1.MediaTypeImageManifest, - Digest: digest.FromBytes(manifestBytes), - Size: int64(len(manifestBytes)), - Annotations: manifest.Annotations, - } - - resolver := c.resolver() - - pusher, err := resolver.Pusher(ctx, ref) - if err != nil { - return err - } - - if isSingleArchImage(desc.MediaType) { - manifest := ocispecv1.Manifest{} - if err := json.Unmarshal(manifestBytes, &manifest); err != nil { - return fmt.Errorf("unable to unmarshal manifest: %w", err) - } - - // add dummy config if it is not set - if manifest.Config.Size == 0 { - dummyConfig := []byte("{}") - manifest.Config = ocispecv1.Descriptor{ - MediaType: "application/json", - Digest: digest.FromBytes(dummyConfig), - Size: int64(len(dummyConfig)), - } - if err := c.cache.Add(manifest.Config, io.NopCloser(bytes.NewBuffer(dummyConfig))); err != nil { - return fmt.Errorf("unable to add dummy config to cache: %w", err) - } - } - - if err := c.pushContent(ctx, c.cache, pusher, manifest.Config); err != nil { - return fmt.Errorf("unable to push config: %w", err) - - } - - for _, layerDesc := range manifest.Layers { - if err := c.pushContent(ctx, c.cache, pusher, layerDesc); err != nil { - return fmt.Errorf("unable to push layer: %w", err) - } - } - } - - if err := c.cache.Add(desc, io.NopCloser(bytes.NewBuffer(manifestBytes))); err != nil { - return fmt.Errorf("unable to add manifest to cache: %w", err) - } - - if err := c.pushContent(ctx, c.cache, pusher, desc); err != nil { - return fmt.Errorf("unable to push manifest: %w", err) - } - - return nil -} - -func (c *client) pushContent(ctx context.Context, store Store, pusher remotes.Pusher, desc ocispecv1.Descriptor) error { - if store == nil { - return errors.New("you must define a store to upload content") - } - r, err := store.Get(desc) - if err != nil { - return err - } - defer r.Close() - - writer, err := pusher.Push(addKnownMediaTypesToCtx(ctx, []string{desc.MediaType}), desc) - if err != nil { - if errdefs.IsAlreadyExists(err) { - return nil - } - return err - } - defer writer.Close() - return content.Copy(ctx, writer, r, desc.Size, desc.Digest) -} - -// AddKnownMediaTypesToCtx adds a list of known media types to the context -func addKnownMediaTypesToCtx(ctx context.Context, mediaTypes []string) context.Context { - for _, mediaType := range mediaTypes { - ctx = remotes.WithMediaTypeKeyPrefix(ctx, mediaType, "custom") - } - return ctx -} - -func isSingleArchImage(mediaType string) bool { - return mediaType == ocispecv1.MediaTypeImageManifest || - mediaType == images.MediaTypeDockerSchema2Manifest -} - -func isMultiArchImage(mediaType string) bool { - return mediaType == ocispecv1.MediaTypeImageIndex || - mediaType == images.MediaTypeDockerSchema2ManifestList -} - -// resolver returns an authenticated remote resolver for a reference. -func (c *client) resolver() remotes.Resolver { - scheme := "https" - if c.insecure { - scheme = "http" - } - do := docker.ResolverOptions{ - Hosts: func(host string) ([]docker.RegistryHost, error) { - config := docker.RegistryHost{ - Client: &http.Client{Timeout: c.timeout}, - Host: host, - Scheme: scheme, - Path: "/v2", - Capabilities: docker.HostCapabilityPull | docker.HostCapabilityResolve | docker.HostCapabilityPush, - } - - //The secret alone may be enough for token-based auth scenarios - if c.secret != "" { - f := func(host string) (string, string, error) { - //We do nothing with the host value - return c.user, c.secret, nil - } - - config.Authorizer = docker.NewDockerAuthorizer(docker.WithAuthCreds(f)) - - } - return []docker.RegistryHost{config}, nil - }, - } - - return docker.NewResolver(do) -} diff --git a/pkg/module/oci/manifest_v1_conversion.go b/pkg/module/oci/manifest_v1_conversion.go deleted file mode 100644 index 29e09c188..000000000 --- a/pkg/module/oci/manifest_v1_conversion.go +++ /dev/null @@ -1,271 +0,0 @@ -// SPDX-FileCopyrightText: 2020 SAP SE or an SAP affiliate company and Gardener contributors. -// -// SPDX-License-Identifier: Apache-2.0 - -package oci - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "strings" - "time" - - "github.com/containerd/containerd/archive/compression" - "github.com/containerd/containerd/images" - "github.com/opencontainers/go-digest" - "github.com/opencontainers/image-spec/specs-go" - ocispecv1 "github.com/opencontainers/image-spec/specs-go/v1" -) - -// ************************************************************************************* -// Docker Manifest v2 Schema 1 Support -// see also: -// - https://docs.docker.com/registry/spec/manifest-v2-1/ -// - https://github.com/moby/moby/blob/master/image/v1/imagev1.go -// - https://github.com/containerd/containerd/blob/main/remotes/docker/schema1/converter.go -// ************************************************************************************* - -const ( - MediaTypeDockerV2Schema1Manifest = "application/vnd.docker.distribution.manifest.v1+json" - MediaTypeDockerV2Schema1SignedManifest = images.MediaTypeDockerSchema1Manifest - MediaTypeImageLayerZstd = "application/vnd.oci.image.layer.v1.tar+zstd" -) - -// FSLayer represents 1 item in a schema 1 "fsLayers" list -type FSLayer struct { - BlobSum digest.Digest `json:"blobSum"` -} - -// History represents 1 item in a schema 1 "history" list -type History struct { - V1Compatibility string `json:"v1Compatibility"` -} - -// V1Manifest describes a Docker v2 Schema 1 manifest -type V1Manifest struct { - FSLayers []FSLayer `json:"fsLayers"` - History []History `json:"history"` -} - -// V1History is the unmarshalled v1Compatibility property of a history item -type V1History struct { - Author string `json:"author,omitempty"` - Created time.Time `json:"created"` - Comment string `json:"comment,omitempty"` - ThrowAway *bool `json:"throwaway,omitempty"` - Size *int `json:"Size,omitempty"` - ContainerConfig struct { - Cmd []string `json:"Cmd,omitempty"` - } `json:"container_config,omitempty"` -} - -// ConvertV1ManifestToV2 converts a Docker v2 Schema 1 manifest to Docker v2 Schema 2. -// The converted manifest is stored in the cache. The descriptor of the cached manifest is returned. -func ConvertV1ManifestToV2(ctx context.Context, client Client, cache Cache, ref string, v1ManifestDesc ocispecv1.Descriptor) (ocispecv1.Descriptor, error) { - buf := bytes.NewBuffer([]byte{}) - if err := client.Fetch(ctx, ref, v1ManifestDesc, buf); err != nil { - return ocispecv1.Descriptor{}, fmt.Errorf("unable to fetch v1 manifest blob: %w", err) - } - - var v1Manifest V1Manifest - if err := json.Unmarshal(buf.Bytes(), &v1Manifest); err != nil { - return ocispecv1.Descriptor{}, fmt.Errorf("unable to unmarshal v1 manifest: %w", err) - } - - layers, diffIDs, history, err := ParseV1Manifest(ctx, client, ref, &v1Manifest) - if err != nil { - return ocispecv1.Descriptor{}, err - } - - v2ConfigDesc, v2ConfigBytes, err := CreateV2Config(&v1Manifest, diffIDs, history) - if err != nil { - return ocispecv1.Descriptor{}, fmt.Errorf("unable to create v2 config: %w", err) - } - - v2ManifestDesc, v2ManifestBytes, err := CreateV2Manifest(v2ConfigDesc, layers) - if err != nil { - return ocispecv1.Descriptor{}, fmt.Errorf("unable to create v2 manifest: %w", err) - } - - err = cache.Add(v2ConfigDesc, io.NopCloser(bytes.NewReader(v2ConfigBytes))) - if err != nil { - return ocispecv1.Descriptor{}, fmt.Errorf("unable to write config blob to cache: %w", err) - } - - err = cache.Add(v2ManifestDesc, io.NopCloser(bytes.NewReader(v2ManifestBytes))) - if err != nil { - return ocispecv1.Descriptor{}, fmt.Errorf("unable to write manifest blob to cache: %w", err) - } - - return v2ManifestDesc, nil -} - -// ParseV1Manifest returns the data necessary to build a v2 manifest from a v1 manifest -func ParseV1Manifest(ctx context.Context, client Client, ref string, v1Manifest *V1Manifest) (layers []ocispecv1.Descriptor, diffIDs []digest.Digest, history []ocispecv1.History, err error) { - layers = []ocispecv1.Descriptor{} - diffIDs = []digest.Digest{} - history = []ocispecv1.History{} - - // layers in v1 are reversed compared to v2 --> iterate backwards - for i := len(v1Manifest.FSLayers) - 1; i >= 0; i-- { - var h V1History - if err := json.Unmarshal([]byte(v1Manifest.History[i].V1Compatibility), &h); err != nil { - return nil, nil, nil, fmt.Errorf("unable to unmarshal v1 history: %w", err) - } - - emptyLayer := isEmptyLayer(&h) - - hs := ocispecv1.History{ - Author: h.Author, - Comment: h.Comment, - Created: &h.Created, - CreatedBy: strings.Join(h.ContainerConfig.Cmd, " "), - EmptyLayer: emptyLayer, - } - history = append(history, hs) - - if !emptyLayer { - fslayer := v1Manifest.FSLayers[i] - layerDesc := ocispecv1.Descriptor{ - Digest: fslayer.BlobSum, - Size: -1, - } - - buf := bytes.NewBuffer([]byte{}) - if err := client.Fetch(ctx, ref, layerDesc, buf); err != nil { - return nil, nil, nil, fmt.Errorf("unable to fetch layer blob: %w", err) - } - data := buf.Bytes() - - decompressedReader, err := compression.DecompressStream(bytes.NewReader(data)) - if err != nil { - return nil, nil, nil, fmt.Errorf("unable to decompress layer blob: %w", err) - } - - decompressedData, err := io.ReadAll(decompressedReader) - if err != nil { - return nil, nil, nil, fmt.Errorf("unable to read decompressed layer blob: %w", err) - } - - var mediatype string - switch decompressedReader.GetCompression() { - case compression.Uncompressed: - mediatype = ocispecv1.MediaTypeImageLayer - case compression.Gzip: - mediatype = ocispecv1.MediaTypeImageLayerGzip - case compression.Zstd: - mediatype = MediaTypeImageLayerZstd - } - - des := ocispecv1.Descriptor{ - Digest: fslayer.BlobSum, - MediaType: mediatype, - Size: int64(len(data)), - } - - layers = append(layers, des) - diffIDs = append(diffIDs, digest.FromBytes(decompressedData)) - } - } - - return -} - -// CreateV2Manifest creates a v2 manifest -func CreateV2Manifest(configDesc ocispecv1.Descriptor, layers []ocispecv1.Descriptor) (ocispecv1.Descriptor, []byte, error) { - v2Manifest := ocispecv1.Manifest{ - Versioned: specs.Versioned{ - SchemaVersion: 2, - }, - Config: configDesc, - Layers: layers, - } - - marshaledV2Manifest, err := json.Marshal(v2Manifest) - if err != nil { - return ocispecv1.Descriptor{}, nil, fmt.Errorf("unable to marshal manifest: %w", err) - } - - v2ManifestDesc := ocispecv1.Descriptor{ - MediaType: ocispecv1.MediaTypeImageManifest, - Digest: digest.FromBytes(marshaledV2Manifest), - Size: int64(len(marshaledV2Manifest)), - } - - return v2ManifestDesc, marshaledV2Manifest, nil -} - -// CreateV2Config creates a v2 config -func CreateV2Config(v1Manifest *V1Manifest, diffIDs []digest.Digest, history []ocispecv1.History) (ocispecv1.Descriptor, []byte, error) { - var config map[string]*json.RawMessage - if err := json.Unmarshal([]byte(v1Manifest.History[0].V1Compatibility), &config); err != nil { - return ocispecv1.Descriptor{}, nil, fmt.Errorf("unable to unmarshal config from v1 history: %w", err) - } - - delete(config, "id") - delete(config, "parent") - delete(config, "Size") - delete(config, "parent_id") - delete(config, "layer_id") - delete(config, "throwaway") - - rootfs := ocispecv1.RootFS{ - Type: "layers", - DiffIDs: diffIDs, - } - - rootfsRaw, err := rawJSON(rootfs) - if err != nil { - return ocispecv1.Descriptor{}, nil, fmt.Errorf("unable to convert rootfs to JSON: %w", err) - } - config["rootfs"] = rootfsRaw - - historyRaw, err := rawJSON(history) - if err != nil { - return ocispecv1.Descriptor{}, nil, fmt.Errorf("unable to convert history to JSON: %w", err) - } - config["history"] = historyRaw - - marshaledConfig, err := json.Marshal(config) - if err != nil { - return ocispecv1.Descriptor{}, nil, fmt.Errorf("unable to marshal config: %w", err) - } - - configDesc := ocispecv1.Descriptor{ - MediaType: ocispecv1.MediaTypeImageConfig, - Digest: digest.FromBytes(marshaledConfig), - Size: int64(len(marshaledConfig)), - } - - return configDesc, marshaledConfig, nil -} - -// isEmptyLayer returns whether the v1 compatibility history describes an empty layer. -// A return value of true indicates the layer is empty, however false does not indicate non-empty. -func isEmptyLayer(h *V1History) bool { - // There doesn't seem to be a spec that describes whether the throwAway and size fields must exist or not. - // At least in the Docker implementation, throwAway is optional (https://github.com/moby/moby/blob/master/distribution/pull_v2.go#L524). - // For size we can only assume the same. - // The whole logic could be interpreted as: "If clients which pushed the content made the effort to indicate - // that a layer is empty, we can safely throw it away. For all other cases we copy every layer." - if h.ThrowAway != nil { - return *h.ThrowAway - } - if h.Size != nil { - return *h.Size == 0 - } - - return false -} - -// rawJSON converts an arbitrary value to json.RawMessage -func rawJSON(value interface{}) (*json.RawMessage, error) { - jsonval, err := json.Marshal(value) - if err != nil { - return nil, err - } - return (*json.RawMessage)(&jsonval), nil -} diff --git a/pkg/module/oci/ref.go b/pkg/module/oci/ref.go index 0afc3d7a3..c1a775039 100644 --- a/pkg/module/oci/ref.go +++ b/pkg/module/oci/ref.go @@ -1,16 +1,12 @@ package oci import ( - "errors" "fmt" "path" "strings" dockerreference "github.com/containerd/containerd/reference/docker" "github.com/opencontainers/go-digest" - - cdv2 "github.com/gardener/component-spec/bindings-go/apis/v2" - cdoci "github.com/gardener/component-spec/bindings-go/oci" ) // to find a suitable secret for images on Docker Hub, we need its two domains to do matching @@ -19,34 +15,6 @@ const ( dockerHubLegacyDomain = "index.docker.io" ) -// Ref creates an absolute OCI URL to the component descriptor with name and version at the registry in the given repository. -func Ref(repository cdv2.Repository, name, version string) (string, error) { - repoCtx, err := GetOCIRepositoryContext(repository) - if err != nil { - return "", err - } - return cdoci.OCIRef(repoCtx, name, version) -} - -// GetOCIRepositoryContext returns a OCIRegistryRepository from a repository -func GetOCIRepositoryContext(repoCtx cdv2.Repository) (cdv2.OCIRegistryRepository, error) { - if repoCtx == nil { - return cdv2.OCIRegistryRepository{}, errors.New("no repository provided") - } - var repo cdv2.OCIRegistryRepository - switch r := repoCtx.(type) { - case *cdv2.UnstructuredTypedObject: - if err := r.DecodeInto(&repo); err != nil { - return cdv2.OCIRegistryRepository{}, err - } - case *cdv2.OCIRegistryRepository: - repo = *r - default: - return cdv2.OCIRegistryRepository{}, fmt.Errorf("unknown repository context type %s", repoCtx.GetType()) - } - return repo, nil -} - // ParseRef parses a oci reference into a internal representation. func ParseRef(ref string) (RefSpec, error) { if strings.Contains(ref, "://") { diff --git a/pkg/module/remote.go b/pkg/module/remote.go index af876a39c..b72e49e15 100644 --- a/pkg/module/remote.go +++ b/pkg/module/remote.go @@ -1,22 +1,34 @@ package module import ( - "context" + "fmt" + "os" + "path/filepath" + "regexp" "strings" - cdv2 "github.com/gardener/component-spec/bindings-go/apis/v2" - "github.com/gardener/component-spec/bindings-go/ctf" - cdoci "github.com/gardener/component-spec/bindings-go/oci" - "github.com/kyma-project/cli/pkg/module/oci" - "github.com/pkg/errors" - "go.uber.org/zap" + "github.com/open-component-model/ocm/pkg/common" + "github.com/open-component-model/ocm/pkg/contexts/credentials" + "github.com/open-component-model/ocm/pkg/contexts/credentials/repositories/dockerconfig" + oci "github.com/open-component-model/ocm/pkg/contexts/oci/repositories/ocireg" + "github.com/open-component-model/ocm/pkg/contexts/ocm" + "github.com/open-component-model/ocm/pkg/contexts/ocm/attrs/compatattr" + "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc" + "github.com/open-component-model/ocm/pkg/contexts/ocm/cpi" + "github.com/open-component-model/ocm/pkg/contexts/ocm/repositories/comparch" + "github.com/open-component-model/ocm/pkg/contexts/ocm/repositories/genericocireg" + "github.com/open-component-model/ocm/pkg/contexts/ocm/repositories/ocireg" + componentTransfer "github.com/open-component-model/ocm/pkg/contexts/ocm/transfer" + "github.com/open-component-model/ocm/pkg/contexts/ocm/transfer/transferhandler" + "github.com/open-component-model/ocm/pkg/contexts/ocm/transfer/transferhandler/standard" + "github.com/open-component-model/ocm/pkg/runtime" ) -type NameMapping cdv2.ComponentNameMapping +type NameMapping ocireg.ComponentNameMapping const ( - URLPathNameMapping = NameMapping(cdv2.OCIRegistryURLPathMapping) - DigestNameMapping = NameMapping(cdv2.OCIRegistryDigestMapping) + URLPathNameMapping = NameMapping(ocireg.OCIRegistryURLPathMapping) + DigestNameMapping = NameMapping(ocireg.OCIRegistryDigestMapping) ) // Remote represents remote OCI registry and the means to access it @@ -28,68 +40,112 @@ type Remote struct { Insecure bool } -// Push picks up the archive described in the config and pushes it to the provided registry. -// The credentials and token are optional parameters -func Push(archive *ctf.ComponentArchive, r *Remote, log *zap.SugaredLogger) error { +func (r *Remote) GetRepository(ctx cpi.Context) (cpi.Repository, error) { + creds := r.getCredentials(ctx) + var repoType string + if compatattr.Get(ctx) { + repoType = oci.LegacyType + } else { + repoType = oci.Type + } + url := NoSchemeURL(r.Registry) + if r.Insecure { + url = fmt.Sprintf("http://%s", url) + } - u, p := r.UserPass() - ociClient, err := oci.NewClient(&oci.Options{ - Registry: r.Registry, - User: u, - Secret: p, - Insecure: r.Insecure, - }, log) + ociRepoSpec := &oci.RepositorySpec{ + ObjectVersionedType: runtime.NewVersionedObjectType(repoType), + BaseURL: url, + } + genericSpec := genericocireg.NewRepositorySpec( + ociRepoSpec, &ocireg.ComponentRepositoryMeta{ + ComponentNameMapping: ocireg.ComponentNameMapping(r.NameMapping), + }, + ) + + repo, err := ctx.RepositoryForSpec(genericSpec, creds) if err != nil { - return errors.Wrap(err, "unable to create an OCI client") + return nil, fmt.Errorf("error creating repository from spec: %w", err) } - ctx := context.Background() - - // update repository context - if len(r.Registry) != 0 { - if rc := archive.ComponentDescriptor.GetEffectiveRepositoryContext(); rc != nil { - //This code executes, for example, during push of the existing module (repo 1) to another repository (repo 2). A valid scenario for the CLI "sign module" cmd. - var repo cdv2.OCIRegistryRepository - if err = rc.DecodeInto(&repo); err != nil { - return errors.Wrap(err, "unable to decode component descriptor") - } - //Inject only if the repo is different - if repo.BaseURL != r.Registry || repo.ComponentNameMapping != cdv2.ComponentNameMapping(r.NameMapping) { - if err := cdv2.InjectRepositoryContext(archive.ComponentDescriptor, cdv2.NewOCIRegistryRepository(r.Registry, cdv2.ComponentNameMapping(r.NameMapping))); err != nil { - return errors.Wrap(err, "unable to add repository context to component descriptor") - } + return repo, nil +} + +func (r *Remote) getCredentials(ctx cpi.Context) credentials.Credentials { + if r.Insecure { + return credentials.NewCredentials(nil) + } + var creds credentials.Credentials + if home, err := os.UserHomeDir(); err == nil { + path := filepath.Join(home, ".docker", "config.json") + if repo, err := dockerconfig.NewRepository(ctx.CredentialsContext(), path, true); err == nil { + // this uses the first part of the url to resolve the correct host, e.g. + // ghcr.io/jakobmoellersap/testmodule => ghcr.io + hostNameInDockerConfigJSON := strings.Split(NoSchemeURL(r.Registry), "/")[0] + if creds, err = repo.LookupCredentials(hostNameInDockerConfigJSON); err != nil { + // this forces creds to be nil in case the host was not found in the native docker store + creds = nil } } } + // if no creds are set, try to use username and password that are provided. + if creds == nil { + u, p := r.userPass() + if p == "" { + p = r.Token + } + creds = credentials.DirectCredentials{ + "username": u, + "password": p, + } + } + return creds +} - manifest, err := cdoci.NewManifestBuilder(ociClient.Cache(), archive).Build(ctx) +// userPass splits the credentials string into user and password. +// If the string is empty or can't be split, it returns 2 empty strings. +func (r *Remote) userPass() (string, string) { + u, p, found := strings.Cut(r.Credentials, ":") + if !found { + return "", "" + } + return u, p +} + +func NoSchemeURL(url string) string { + regex := regexp.MustCompile(`^https?://`) + return regex.ReplaceAllString(url, "") +} + +// Push picks up the archive described in the config and pushes it to the provided registry. +// The credentials and token are optional parameters +func (r *Remote) Push(archive *comparch.ComponentArchive, overwrite bool) (ocm.ComponentVersionAccess, error) { + repo, err := r.GetRepository(archive.GetContext()) if err != nil { - return errors.Wrap(err, "unable to build OCI artifact for component archive") + return nil, err } - ref, err := oci.Ref(archive.ComponentDescriptor.GetEffectiveRepositoryContext(), archive.ComponentDescriptor.Name, archive.ComponentDescriptor.Version) + transferHandler, err := standard.New(standard.Overwrite(overwrite)) if err != nil { - return errors.Wrap(err, "invalid component reference") + return nil, fmt.Errorf("could not setup archive transfer: %w", err) } - if err := ociClient.PushManifest(ctx, ref, manifest); err != nil { - return err + + if err = componentTransfer.TransferVersion( + common.NewLoggingPrinter(archive.GetContext().Logger()), nil, archive.ComponentVersionAccess, repo, &customTransferHandler{transferHandler}, + ); err != nil { + return nil, fmt.Errorf("could not finish component transfer: %w", err) } - log.Debugf("Successfully uploaded manifest at %q", ref) - return nil + return repo.LookupComponentVersion( + archive.ComponentVersionAccess.GetName(), archive.ComponentVersionAccess.GetVersion(), + ) } -func Pull() { - // TODO +type customTransferHandler struct { + transferhandler.TransferHandler } -// UserPass splits the credentials string into user and password. -// If the string is empty or can't be split, it returns 2 empty strings. -func (r *Remote) UserPass() (string, string) { - u, p, found := strings.Cut(r.Credentials, ":") - if !found { - return "", "" - } - return u, p +func (h *customTransferHandler) TransferVersion(repo ocm.Repository, src ocm.ComponentVersionAccess, meta *compdesc.ComponentReference) (ocm.ComponentVersionAccess, transferhandler.TransferHandler, error) { + return h.TransferHandler.TransferVersion(repo, src, meta) } diff --git a/pkg/module/remote_test.go b/pkg/module/remote_test.go new file mode 100644 index 000000000..400d04b73 --- /dev/null +++ b/pkg/module/remote_test.go @@ -0,0 +1,40 @@ +package module_test + +import ( + "testing" + + "github.com/kyma-project/cli/pkg/module" +) + +func TestNoSchemaURL(t *testing.T) { + tests := []struct { + name string + testRegistry string + want string + }{ + { + name: "https registry", + testRegistry: "https://registry.domain", + want: "registry.domain", + }, + { + name: "http registry", + testRegistry: "http://registry.domain", + want: "registry.domain", + }, + { + name: "no scheme registry", + testRegistry: "registry.domain", + want: "registry.domain", + }, + } + for _, tt := range tests { + t.Run( + tt.name, func(t *testing.T) { + if got := module.NoSchemeURL(tt.testRegistry); got != tt.want { + t.Errorf("BuildNewOCIRegistryRepository() = %v, want %v", got, tt.want) + } + }, + ) + } +} diff --git a/pkg/module/resources.go b/pkg/module/resources.go index be235dc77..51d970884 100644 --- a/pkg/module/resources.go +++ b/pkg/module/resources.go @@ -1,30 +1,27 @@ package module import ( - "context" "fmt" "os" "path/filepath" "strings" - cdv2 "github.com/gardener/component-spec/bindings-go/apis/v2" - "github.com/gardener/component-spec/bindings-go/apis/v2/cdutils" - cdvalidation "github.com/gardener/component-spec/bindings-go/apis/v2/validation" - "github.com/gardener/component-spec/bindings-go/ctf" "github.com/kyma-project/cli/internal/files" "github.com/kyma-project/cli/pkg/module/blob" "github.com/kyma-project/cli/pkg/module/kubebuilder" "github.com/kyma-project/cli/pkg/step" "github.com/mandelsoft/vfs/pkg/vfs" + "github.com/open-component-model/ocm/pkg/common/accessobj" + "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc" + "github.com/open-component-model/ocm/pkg/contexts/ocm/repositories/comparch" "github.com/pkg/errors" "go.uber.org/zap" - "k8s.io/apimachinery/pkg/util/validation/field" "sigs.k8s.io/yaml" ) // ResourceDescriptor contains all information to describe a resource type ResourceDescriptor struct { - cdv2.Resource + compdesc.Resource Input *blob.Input `json:"input,omitempty"` } @@ -35,7 +32,10 @@ type ResourceDescriptorList struct { // AddResources adds the resources in the given resource definitions into the archive and its FS. // A resource definition is a string with format: NAME:TYPE@PATH, where NAME and TYPE can be omitted and will default to the last path element name and "helm-chart" respectively -func AddResources(archive *ctf.ComponentArchive, modDef *Definition, log *zap.SugaredLogger, fs vfs.FileSystem) error { +func AddResources( + archive *comparch.ComponentArchive, modDef *Definition, log *zap.SugaredLogger, fs vfs.FileSystem, +) error { + descriptor := archive.GetDescriptor() resources, err := generateResources(log, modDef.Version, modDef.Layers...) if err != nil { return err @@ -44,48 +44,19 @@ func AddResources(archive *ctf.ComponentArchive, modDef *Definition, log *zap.Su log.Debugf("Adding %d resources...", len(resources)) for i, resource := range resources { if resource.Input != nil { - log.Debugf("Added input blob from %q", resource.Input.Path) - if err := addBlob(context.Background(), fs, archive, &resources[i]); err != nil { + if err := addBlob(fs, archive, &resources[i]); err != nil { return err } - } else { - id := archive.ComponentDescriptor.GetResourceIndex(resource.Resource) - if id != -1 { - log.Debugf("Found existing resource in component descriptor, attempt merge...") - mergedRes := cdutils.MergeResources(archive.ComponentDescriptor.Resources[id], resource.Resource) - if errList := cdvalidation.ValidateResource(field.NewPath(""), mergedRes); len(errList) != 0 { - return errList.ToAggregate() - } - archive.ComponentDescriptor.Resources[id] = mergedRes - } else { - if errList := cdvalidation.ValidateResource(field.NewPath(""), resource.Resource); len(errList) != 0 { - return errList.ToAggregate() - } - archive.ComponentDescriptor.Resources = append(archive.ComponentDescriptor.Resources, resource.Resource) - } - } - - if err := cdvalidation.Validate(archive.ComponentDescriptor); err != nil { - return fmt.Errorf("invalid component descriptor: %w", err) - } - if err := WriteComponentDescriptor(fs, archive.ComponentDescriptor, modDef.ArchivePath, ctf.ComponentDescriptorFileName); err != nil { - return err + log.Debugf("Added input blob from %q", resource.Input.Path) } - log.Debugf("Successfully added resource to component descriptor") } - log.Debugf("Successfully added all resources to component descriptor") - return nil -} + compdesc.DefaultResources(descriptor) -func WriteComponentDescriptor(fs vfs.FileSystem, cd *cdv2.ComponentDescriptor, filePath string, fileName string) error { - compDescFilePath := filepath.Join(filePath, fileName) - data, err := yaml.Marshal(cd) - if err != nil { - return fmt.Errorf("unable to encode component descriptor: %w", err) - } - if err := vfs.WriteFile(fs, compDescFilePath, data, 0664); err != nil { - return fmt.Errorf("unable to write modified comonent descriptor: %w", err) + if err := compdesc.Validate(descriptor); err != nil { + return fmt.Errorf("invalid component descriptor: %w", err) } + + log.Debugf("Successfully added all resources to component descriptor") return nil } @@ -121,28 +92,21 @@ func generateResources(log *zap.SugaredLogger, version string, defs ...Layer) ([ return res, nil } -func addBlob(ctx context.Context, fs vfs.FileSystem, archive *ctf.ComponentArchive, resource *ResourceDescriptor) error { - b, err := resource.Input.Read(ctx, fs) +func addBlob(fs vfs.FileSystem, archive *comparch.ComponentArchive, resource *ResourceDescriptor) error { + access, err := blob.AccessForFileOrFolder(fs, resource.Input) if err != nil { return err } - // default media type to binary data if nothing else is defined - resource.Input.SetMediaTypeIfNotDefined(blob.MediaTypeOctetStream) - - err = archive.AddResource(&resource.Resource, ctf.BlobInfo{ - MediaType: resource.Input.MediaType, - Digest: b.Digest, - Size: b.Size, - }, b.Reader) + blobAccess, err := archive.AddBlob( + accessobj.CachedBlobAccessForDataAccess(archive.GetContext(), access.MimeType(), access), string(resource.Input.Type), + resource.Resource.Name, nil, + ) if err != nil { - b.Reader.Close() - return fmt.Errorf("unable to add input blob to archive: %w", err) - } - if err := b.Reader.Close(); err != nil { - return fmt.Errorf("unable to close input file: %w", err) + return err } - return nil + + return archive.SetResource(&resource.ResourceMeta, blobAccess) } func (rd ResourceDescriptor) String() string { @@ -198,18 +162,26 @@ func inspectProject(def *Definition, p *kubebuilder.Project, layers []Layer, s s } // generated chart -> layer 1 - chartPath, err := p.Build(def.Name, def.Version, def.RegistryURL) // TODO switch from charts to pure manifests when mod-mngr is ready + chartPath, err := p.Build( + def.Name, def.Version, + ) // TODO switch from charts to pure manifests when mod-mngr is ready if err != nil { return err } + // config.yaml -> layer 2 - configPath, err := p.Config() - if err != nil { - return err + if configPath, err := p.Config(); err == nil { + def.Layers = append(def.Layers, Layer{ + name: configLayerName, + resourceType: typeYaml, + path: configPath, + }) + } else if !errors.Is(err, os.ErrNotExist) { + return fmt.Errorf("error while determining config layer: %w", err) } // Add default CR if generating template - cr := []byte{} + var cr []byte if def.RegistryURL != "" { if def.DefaultCRPath == "" { cr, err = p.DefaultCR(s) @@ -217,28 +189,20 @@ func inspectProject(def *Definition, p *kubebuilder.Project, layers []Layer, s s return err } } else { - cr, err := os.ReadFile(def.DefaultCRPath) + cr, err = os.ReadFile(def.DefaultCRPath) if err != nil { return fmt.Errorf("could not read CR file %q: %w", def.DefaultCRPath, err) } - def.DefaultCR = cr } } - charts := Layer{ + def.Repo = p.Repo + def.DefaultCR = cr + def.Layers = append(def.Layers, Layer{ name: filepath.Base(chartPath), resourceType: typeHelmChart, path: chartPath, - } - config := Layer{ - name: configLayerName, - resourceType: typeYaml, - path: configPath, - } - - def.Repo = p.Repo - def.DefaultCR = cr - def.Layers = append(def.Layers, charts, config) + }) def.Layers = append(def.Layers, layers...) return nil diff --git a/pkg/module/security_scan.go b/pkg/module/security_scan.go new file mode 100644 index 000000000..48c1e3a9d --- /dev/null +++ b/pkg/module/security_scan.go @@ -0,0 +1,148 @@ +package module + +import ( + "errors" + "fmt" + "os" + "strings" + + "github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/types/ociimage" + "github.com/open-component-model/ocm/pkg/contexts/ocm/accessmethods/ociartifact" + ocm "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc" + ocmv1 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/meta/v1" + "sigs.k8s.io/yaml" +) + +var ErrFailedToParseImageURL = errors.New("error parsing protecode image URL") + +const ( + secScanLabelKey = "scan.security.kyma-project.io" + secLabelKey = "security.kyma-project.io" + secScanEnabled = "enabled" +) + +var labelTemplate = secScanLabelKey + "/%s" +var globalLabelTemplate = secLabelKey + "/%s" + +func AddSecurityScanningMetadata(descriptor *ocm.ComponentDescriptor, securityConfigPath string) error { + //parse security config file + config, err := parseSecurityScanConfig(securityConfigPath) + if err != nil { + return err + } + excludedWhitesourcePathPatterns := strings.Join(config.WhiteSource.Exclude, ",") + + // add security scan enabled global label + err = appendLabelToAccessor(descriptor, "scan", secScanEnabled, globalLabelTemplate) + if err != nil { + return err + } + if len(descriptor.Sources) == 0 { + return errors.New("found no sources in component descriptor") + } + //add whitesource sec scan labels + for srcIdx := range descriptor.Sources { + src := &descriptor.Sources[srcIdx] + err := appendLabelToAccessor(src, "language", config.WhiteSource.Language, labelTemplate) + if err != nil { + return err + } + err = appendLabelToAccessor(src, "subprojects", config.WhiteSource.SubProjects, labelTemplate) + if err != nil { + return err + } + err = appendLabelToAccessor(src, "exclude", excludedWhitesourcePathPatterns, labelTemplate) + if err != nil { + return err + } + } + //add protecode sec scan images + if err := appendProtecodeImagesLayers(descriptor, config); err != nil { + return err + } + + ocm.DefaultResources(descriptor) + return ocm.Validate(descriptor) +} + +func appendProtecodeImagesLayers(descriptor *ocm.ComponentDescriptor, config *SecurityScanCfg) error { + for _, imageURL := range config.Protecode { + imageName, imageTag, err := getImageName(imageURL) + if err != nil { + return err + } + + imageTypeLabel, err := generateOCMLabel("type", "third-party-image", labelTemplate) + if err != nil { + return err + } + + access := ociartifact.New(imageURL) + access.SetType(ociartifact.LegacyType) + protecodeImageLayerResource := ocm.Resource{ + ResourceMeta: ocm.ResourceMeta{ + ElementMeta: ocm.ElementMeta{ + Name: imageName, + Labels: []ocmv1.Label{*imageTypeLabel}, + Version: imageTag, + }, + Type: ociimage.TYPE, + Relation: ocmv1.ExternalRelation, + }, + Access: access, + } + descriptor.Resources = append(descriptor.Resources, protecodeImageLayerResource) + } + return nil +} + +func generateOCMLabel(key, value, tpl string) (*ocmv1.Label, error) { + return ocmv1.NewLabel(fmt.Sprintf(tpl, key), value, ocmv1.WithVersion("v1")) +} + +func getImageName(imageURL string) (string, string, error) { + imageTagSlice := strings.Split(imageURL, ":") + if len(imageTagSlice) != 2 { + return "", "", ErrFailedToParseImageURL + } + repoImageSlice := strings.Split(imageTagSlice[0], "/") + if len(repoImageSlice) == 0 { + return "", "", ErrFailedToParseImageURL + } + + return repoImageSlice[len(repoImageSlice)-1], imageTagSlice[len(imageTagSlice)-1], nil +} + +type SecurityScanCfg struct { + ModuleName string `json:"module-name"` + Protecode []string `json:"protecode"` + WhiteSource WhiteSourceSecCfg `json:"whitesource"` +} +type WhiteSourceSecCfg struct { + Language string `json:"language"` + SubProjects string `json:"subprojects"` + Exclude []string `json:"exclude"` +} + +func parseSecurityScanConfig(securityConfigPath string) (*SecurityScanCfg, error) { + fileBytes, err := os.ReadFile(securityConfigPath) + if err != nil { + return nil, err + } + secCfg := &SecurityScanCfg{} + if err := yaml.Unmarshal(fileBytes, secCfg); err != nil { + return nil, err + } + return secCfg, nil +} + +func appendLabelToAccessor(labeled ocm.LabelsAccessor, key, value, tpl string) error { + labels := labeled.GetLabels() + labelValue, err := generateOCMLabel(key, value, tpl) + if err != nil { + return err + } + labels = append(labels, *labelValue) + labeled.SetLabels(labels) + return nil +} diff --git a/pkg/module/sign.go b/pkg/module/sign.go index 155dd03e0..580d18c1d 100644 --- a/pkg/module/sign.go +++ b/pkg/module/sign.go @@ -1,123 +1,95 @@ package module import ( - "context" + "crypto/x509" + "encoding/pem" "fmt" - - cdv2 "github.com/gardener/component-spec/bindings-go/apis/v2" - cdv2Sign "github.com/gardener/component-spec/bindings-go/apis/v2/signatures" - "github.com/gardener/component-spec/bindings-go/ctf" - cdoci "github.com/gardener/component-spec/bindings-go/oci" - "github.com/kyma-project/cli/pkg/module/oci" - "github.com/kyma-project/cli/pkg/module/signatures" + "os" + + "github.com/open-component-model/ocm/pkg/contexts/ocm" + "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc" + "github.com/open-component-model/ocm/pkg/contexts/ocm/cpi" + "github.com/open-component-model/ocm/pkg/signing" + "github.com/open-component-model/ocm/pkg/signing/handlers/rsa" + "github.com/open-component-model/ocm/pkg/signing/hasher/sha512" "github.com/pkg/errors" - "go.uber.org/zap" ) type ComponentSignConfig struct { - Name string // Name of the module (mandatory) - Version string // Version of the module (mandatory) - PrivateKeyPath string // The private key used for signing (mandatory) - SignatureName string // Name of the signature for signing + Name string // Name of the module (mandatory) + Version string // Version of the module (mandatory) + KeyPath string // The private key used for signing (mandatory) + SignatureName string // Name of the signature for signing } -func Sign(cfg *ComponentSignConfig, remote *Remote, log *zap.SugaredLogger) ([]*cdv2.ComponentDescriptor, error) { +func Sign(cfg *ComponentSignConfig, remote *Remote) error { if err := cfg.validate(); err != nil { - return nil, err + return err } - ctx := context.Background() - repoCtx := cdv2.NewOCIRegistryRepository(remote.Registry, cdv2.ComponentNameMapping(remote.NameMapping)) - - signer, err := cdv2Sign.CreateRSASignerFromKeyFile(cfg.PrivateKeyPath, cdv2.MediaTypePEM) + repo, err := remote.GetRepository(cpi.DefaultContext()) if err != nil { - return nil, fmt.Errorf("unable to create rsa signer: %w", err) + return err } - u, p := remote.UserPass() - ociClient, err := oci.NewClient(&oci.Options{ - Registry: remote.Registry, - User: u, - Secret: p, - Insecure: remote.Insecure, - }, log) + cva, err := repo.LookupComponentVersion(cfg.Name, cfg.Version) if err != nil { - return nil, fmt.Errorf("unable to build oci client: %w", err) + return err } - cdresolver := cdoci.NewResolver(ociClient) - cd, blobResolver, err := cdresolver.ResolveWithBlobResolver(ctx, repoCtx, cfg.Name, cfg.Version) + signReg := signing.DefaultRegistry() + issuer := "kyma-project.io/cli" + + key, err := privateKey(cfg.KeyPath) if err != nil { - return nil, fmt.Errorf("unable to to fetch component descriptor %s:%s: %w", cfg.Name, cfg.Version, err) + return err } - blobResolvers := map[string]ctf.BlobResolver{} - blobResolvers[fmt.Sprintf("%s:%s", cd.Name, cd.Version)] = blobResolver + signReg.RegisterPrivateKey(cfg.SignatureName, key) - digestedCds, err := recursivelyAddDigestsToCd(ctx, cd, *repoCtx, ociClient, blobResolvers) - if err != nil { - return nil, fmt.Errorf("unable to add digests to component descriptor: %w", err) + if idx := cva.GetDescriptor().GetSignatureIndex(cfg.SignatureName); idx < 0 { + return fmt.Errorf("descriptor was already signed under %s at signature index %v", cfg.SignatureName, idx) } - for _, digestedCd := range digestedCds { - hasher, err := cdv2Sign.HasherForName(cdv2Sign.SHA256) - if err != nil { - return nil, fmt.Errorf("unable to create hasher: %w", err) - } - - if err := cdv2Sign.SignComponentDescriptor(digestedCd, signer, *hasher, cfg.SignatureName); err != nil { - return nil, fmt.Errorf("unable to sign component descriptor: %w", err) - } - log.Info(fmt.Sprintf("Signed component descriptor %s %s", digestedCd.Name, digestedCd.Version)) + if err := compdesc.Sign( + ocm.DefaultContext().CredentialsContext(), + cva.GetDescriptor(), + key, + signReg.GetSigner(rsa.Algorithm), + signReg.GetHasher(sha512.Algorithm), + cfg.SignatureName, issuer, + ); err != nil { + return err } - return digestedCds, nil + return cva.Close() } -func recursivelyAddDigestsToCd(ctx context.Context, cd *cdv2.ComponentDescriptor, repoContext cdv2.OCIRegistryRepository, ociClient oci.Client, blobResolvers map[string]ctf.BlobResolver) ([]*cdv2.ComponentDescriptor, error) { - cdsWithHashes := []*cdv2.ComponentDescriptor{} - - cdResolver := func(c context.Context, cd cdv2.ComponentDescriptor, cr cdv2.ComponentReference) (*cdv2.DigestSpec, error) { - ociRef, err := cdoci.OCIRef(repoContext, cr.Name, cr.Version) - if err != nil { - return nil, fmt.Errorf("invalid component reference: %w", err) - } - - cdresolver := cdoci.NewResolver(ociClient) - childCd, blobResolver, err := cdresolver.ResolveWithBlobResolver(ctx, &repoContext, cr.ComponentName, cr.Version) - if err != nil { - return nil, fmt.Errorf("unable to to fetch component descriptor %s: %w", ociRef, err) - } - blobResolvers[fmt.Sprintf("%s:%s", childCd.Name, childCd.Version)] = blobResolver - - cds, err := recursivelyAddDigestsToCd(ctx, childCd, repoContext, ociClient, blobResolvers) - if err != nil { - return nil, fmt.Errorf("failed resolving referenced cd %s:%s: %w", cr.Name, cr.Version, err) - } - cdsWithHashes = append(cdsWithHashes, cds...) - - hasher, err := cdv2Sign.HasherForName(cdv2Sign.SHA256) - if err != nil { - return nil, fmt.Errorf("failed creating hasher: %w", err) - } - hashCd, err := cdv2Sign.HashForComponentDescriptor(*childCd, *hasher) - if err != nil { - return nil, fmt.Errorf("failed hashing referenced cd %s:%s: %w", cr.Name, cr.Version, err) - } - return hashCd, nil - } - - hasher, err := cdv2Sign.HasherForName(cdv2Sign.SHA256) +func Verify(cfg *ComponentSignConfig, remote *Remote) error { + if err := cfg.validate(); err != nil { + return err + } + + repo, err := remote.GetRepository(cpi.DefaultContext()) if err != nil { - return nil, fmt.Errorf("failed creating hasher: %w", err) + return err } - digester := signatures.NewDigester(ociClient, *hasher) - if err := cdv2Sign.AddDigestsToComponentDescriptor(ctx, cd, cdResolver, digester.DigestForResource); err != nil { - return nil, fmt.Errorf("failed adding digests to cd %s:%s: %w", cd.Name, cd.Version, err) + cva, err := repo.LookupComponentVersion(cfg.Name, cfg.Version) + if err != nil { + return err + } + + signReg := signing.DefaultRegistry() + + key, err := publicKey(cfg.KeyPath) + if err != nil { + return err } - cdsWithHashes = append(cdsWithHashes, cd) - return cdsWithHashes, nil + + signReg.RegisterPublicKey(cfg.SignatureName, key) + + return compdesc.Verify(cva.GetDescriptor(), signReg, cfg.SignatureName) } func (cfg *ComponentSignConfig) validate() error { @@ -127,8 +99,8 @@ func (cfg *ComponentSignConfig) validate() error { if cfg.Version == "" { return errors.New("The module version cannot be empty") } - if cfg.PrivateKeyPath == "" { - return errors.New("The private key path cannot be empty") + if cfg.KeyPath == "" { + return errors.New("The key path cannot be empty") } if cfg.SignatureName == "" { return errors.New("The signature name cannot be empty") @@ -136,3 +108,37 @@ func (cfg *ComponentSignConfig) validate() error { return nil } + +func privateKey(pathToPrivateKey string) (interface{}, error) { + privKeyFile, err := os.ReadFile(pathToPrivateKey) + if err != nil { + return nil, fmt.Errorf("unable to open key file: %w", err) + } + + block, _ := pem.Decode(privKeyFile) + if block == nil { + return nil, fmt.Errorf("unable to decode pem formatted block in key: %w", err) + } + key, err := x509.ParsePKCS1PrivateKey(block.Bytes) + if err != nil { + return nil, fmt.Errorf("unable to parse private key: %w", err) + } + return key, nil +} + +func publicKey(pathToPublicKey string) (interface{}, error) { + publicKeyFile, err := os.ReadFile(pathToPublicKey) + if err != nil { + return nil, fmt.Errorf("unable to open key file: %w", err) + } + + block, _ := pem.Decode(publicKeyFile) + if block == nil { + return nil, fmt.Errorf("unable to decode pem formatted block in key: %w", err) + } + key, err := x509.ParsePKIXPublicKey(block.Bytes) + if err != nil { + return nil, fmt.Errorf("unable to parse public key: %w", err) + } + return key, nil +} diff --git a/pkg/module/signatures/digester.go b/pkg/module/signatures/digester.go deleted file mode 100644 index d522635c1..000000000 --- a/pkg/module/signatures/digester.go +++ /dev/null @@ -1,114 +0,0 @@ -// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Gardener contributors. -// -// SPDX-License-Identifier: Apache-2.0 -package signatures - -import ( - "context" - "encoding/hex" - "fmt" - "io" - "os" - "reflect" - - "github.com/kyma-project/cli/pkg/module/oci" - - cdv2 "github.com/gardener/component-spec/bindings-go/apis/v2" - "github.com/gardener/component-spec/bindings-go/apis/v2/signatures" - cdoci "github.com/gardener/component-spec/bindings-go/oci" -) - -type Digester struct { - ociClient oci.Client - hasher signatures.Hasher -} - -func NewDigester(ociClient oci.Client, hasher signatures.Hasher) *Digester { - return &Digester{ - ociClient: ociClient, - hasher: hasher, - } -} - -func (d *Digester) DigestForResource(ctx context.Context, cd cdv2.ComponentDescriptor, res cdv2.Resource) (*cdv2.DigestSpec, error) { - // return the digest for a resource that is defined to be ignored for signing - if res.Digest != nil && reflect.DeepEqual(res.Digest, cdv2.NewExcludeFromSignatureDigest()) { - return res.Digest, nil - } - - switch res.Access.Type { - case cdv2.OCIRegistryType: - return d.digestForOciArtifact(ctx, res) - case cdv2.LocalOCIBlobType: - return d.digestForLocalOciBlob(ctx, cd, res) - default: - return nil, fmt.Errorf("access type %s not supported", res.Access.Type) - } -} - -func (d *Digester) digestForLocalOciBlob(ctx context.Context, componentDescriptor cdv2.ComponentDescriptor, res cdv2.Resource) (*cdv2.DigestSpec, error) { - if res.Access.GetType() != cdv2.LocalOCIBlobType { - return nil, fmt.Errorf("unsupported access type %s in digestForLocalOciBlob", res.Access.Type) - } - - repoctx := cdv2.OCIRegistryRepository{} - if err := componentDescriptor.GetEffectiveRepositoryContext().DecodeInto(&repoctx); err != nil { - return nil, fmt.Errorf("unable to decode repository context: %w", err) - } - - tmpfile, err := os.CreateTemp("", "") - if err != nil { - return nil, fmt.Errorf("unable to create tempfile: %w", err) - } - defer tmpfile.Close() - - resolver := cdoci.NewResolver(d.ociClient) - _, blobResolver, err := resolver.ResolveWithBlobResolver(ctx, &repoctx, componentDescriptor.Name, componentDescriptor.Version) - if err != nil { - return nil, fmt.Errorf("unable to resolve component descriptor: %w", err) - } - if _, err := blobResolver.Resolve(ctx, res, tmpfile); err != nil { - return nil, fmt.Errorf("unable to resolve blob: %w", err) - } - - if _, err := tmpfile.Seek(0, io.SeekStart); err != nil { - return nil, fmt.Errorf("unable to seek to beginning of tempfile: %w", err) - } - d.hasher.HashFunction.Reset() - - if _, err := io.Copy(d.hasher.HashFunction, tmpfile); err != nil { - return nil, fmt.Errorf("unable to calculate hash: %w", err) - } - return &cdv2.DigestSpec{ - HashAlgorithm: d.hasher.AlgorithmName, - NormalisationAlgorithm: string(cdv2.GenericBlobDigestV1), - Value: hex.EncodeToString((d.hasher.HashFunction.Sum(nil))), - }, nil -} - -func (d *Digester) digestForOciArtifact(ctx context.Context, res cdv2.Resource) (*cdv2.DigestSpec, error) { - if res.Access.GetType() != cdv2.OCIRegistryType { - return nil, fmt.Errorf("unsupported access type %s in digestForOciArtifact", res.Access.Type) - } - - ociAccess := &cdv2.OCIRegistryAccess{} - if err := res.Access.DecodeInto(ociAccess); err != nil { - return nil, fmt.Errorf("unable to decode resource access: %w", err) - } - - _, bytes, err := d.ociClient.GetRawManifest(ctx, ociAccess.ImageReference) - if err != nil { - return nil, fmt.Errorf("unable to get oci manifest: %w", err) - } - - d.hasher.HashFunction.Reset() - if _, err = d.hasher.HashFunction.Write(bytes); err != nil { - return nil, fmt.Errorf("unable to calculate hash, %w", err) - } - - return &cdv2.DigestSpec{ - HashAlgorithm: d.hasher.AlgorithmName, - NormalisationAlgorithm: string(cdv2.OciArtifactDigestV1), - Value: hex.EncodeToString((d.hasher.HashFunction.Sum(nil))), - }, nil -} diff --git a/pkg/module/template.go b/pkg/module/template.go index f97ce40b2..6625e1cef 100644 --- a/pkg/module/template.go +++ b/pkg/module/template.go @@ -2,22 +2,21 @@ package module import ( "bytes" - "context" "encoding/json" "fmt" "strings" "text/template" - v2 "github.com/gardener/component-spec/bindings-go/apis/v2" - "github.com/gardener/component-spec/bindings-go/ctf" - cdoci "github.com/gardener/component-spec/bindings-go/oci" "github.com/kyma-project/cli/pkg/module/oci" + "github.com/open-component-model/ocm/pkg/contexts/ocm" + "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc" + ocmv1 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" ) const ( - modTemplate = `apiVersion: operator.kyma-project.io/v1alpha1 + modTemplate = `apiVersion: operator.kyma-project.io/v1beta1 kind: ModuleTemplate metadata: name: moduletemplate-{{ .ShortName }} @@ -26,12 +25,8 @@ metadata: "operator.kyma-project.io/managed-by": "lifecycle-manager" "operator.kyma-project.io/controller-name": "manifest" "operator.kyma-project.io/module-name": "{{ .ShortName }}" - annotations: - "operator.kyma-project.io/module-version": "{{ .Descriptor.Version }}" - "operator.kyma-project.io/module-provider": "{{ .Descriptor.ComponentSpec.Provider }}" - "operator.kyma-project.io/descriptor-schema-version": "{{ .Descriptor.Metadata.Version }}" spec: - target: remote + target: {{.Target}} channel: {{.Channel}} data: {{.Data | indent 4}} @@ -43,11 +38,10 @@ spec: OCIRegistryCredLabel = "oci-registry-cred" ) -func Template(archive *ctf.ComponentArchive, channel string, data []byte, registryCredSelector string) ([]byte, error) { - descriptor, err := remoteDescriptor(archive) - if err != nil { - return nil, err - } +func Template( + remote ocm.ComponentVersionAccess, channel, target string, data []byte, registryCredSelector string, +) ([]byte, error) { + descriptor := remote.GetDescriptor() if registryCredSelector != "" { selector, err := metav1.ParseToLabelSelector(registryCredSelector) if err != nil { @@ -59,10 +53,12 @@ func Template(archive *ctf.ComponentArchive, channel string, data []byte, regist } for i := range descriptor.Resources { resource := &descriptor.Resources[i] - resource.SetLabels([]v2.Label{{ - Name: OCIRegistryCredLabel, - Value: matchLabels, - }}) + resource.SetLabels( + []ocmv1.Label{{ + Name: OCIRegistryCredLabel, + Value: matchLabels, + }}, + ) } } ref, err := oci.ParseRef(descriptor.Name) @@ -70,15 +66,22 @@ func Template(archive *ctf.ComponentArchive, channel string, data []byte, regist return nil, err } + cva, err := compdesc.Convert(descriptor) + if err != nil { + return nil, err + } + td := struct { // Custom struct for the template - ShortName string // Last part of the component descriptor name - Descriptor *v2.ComponentDescriptor // descriptor info for the template + ShortName string // Last part of the component descriptor name + Descriptor compdesc.ComponentDescriptorVersion // descriptor info for the template Channel string + Target string Data string // contents for the spec.data section of the template taken from the defaults.yaml file in the mod folder }{ ShortName: ref.ShortName(), - Descriptor: descriptor, + Descriptor: cva, Channel: channel, + Target: target, Data: string(data), } @@ -95,7 +98,7 @@ func Template(archive *ctf.ComponentArchive, channel string, data []byte, regist return w.Bytes(), nil } -// indent prepends the given number of whitespaces to eachline in the given string +// Indent prepends the given number of whitespaces to eachline in the given string func Indent(n int, in string) string { out := strings.Builder{} @@ -115,31 +118,3 @@ func Indent(n int, in string) string { } return out.String() } - -// remoteDescriptor generates the remote component descriptor from the local archive the same way module.Push does. -// the module template uses the remote descriptor to install the module -func remoteDescriptor(archive *ctf.ComponentArchive) (*v2.ComponentDescriptor, error) { - store := oci.NewInMemoryCache() - - manifest, err := cdoci.NewManifestBuilder(store, archive).Build(context.TODO()) - if err != nil { - return nil, err - } - - r, err := store.Get(manifest.Layers[0]) - if err != nil { - return nil, err - } - - data, err := cdoci.ReadComponentDescriptorFromTar(r) - if err != nil { - return nil, err - } - - remoteDesc := &v2.ComponentDescriptor{} - if err := json.Unmarshal(data, remoteDesc); err != nil { - return nil, err - } - - return remoteDesc, nil -} diff --git a/pkg/module/validation.go b/pkg/module/validation.go index c4226c171..d91cbfc47 100644 --- a/pkg/module/validation.go +++ b/pkg/module/validation.go @@ -1,6 +1,7 @@ package module import ( + "context" "errors" "fmt" "io" @@ -31,7 +32,7 @@ func NewDefaultCRValidator(cr []byte, modulePath string) (*DefaultCRValidator, e }, nil } -func (v *DefaultCRValidator) Run(s step.Step, verbose bool, log *zap.SugaredLogger) error { +func (v *DefaultCRValidator) Run(ctx context.Context, s step.Step, verbose bool, log *zap.SugaredLogger) error { // skip validation if no CR detected if len(v.crData) == 0 { return nil @@ -88,7 +89,12 @@ func (v *DefaultCRValidator) Run(s step.Step, verbose bool, log *zap.SugaredLogg return err } - if err := kc.Apply(properCR); err != nil { + objs, err := kc.ParseManifest(properCR) + if err != nil { + return err + } + + if err := kc.Apply(ctx, false, objs...); err != nil { return fmt.Errorf("Error applying the default CR: %w", err) } return nil diff --git a/pkg/step/spinner.go b/pkg/step/spinner.go index 40583ba13..0dcc82d83 100644 --- a/pkg/step/spinner.go +++ b/pkg/step/spinner.go @@ -22,12 +22,17 @@ func newStepWithSpinner(msg string) Step { spinner.WithSuffix(" "+msg), ) s.Start() - return &stepWithSpinner{s, msg} + return &stepWithSpinner{s, msg, time.Now()} } type stepWithSpinner struct { spinner *spinner.Spinner msg string + start time.Time +} + +func (s *stepWithSpinner) time() string { + return fmt.Sprintf("(%s)", time.Since(s.start).Round(time.Millisecond).String()) } func (s *stepWithSpinner) Start() { @@ -35,7 +40,7 @@ func (s *stepWithSpinner) Start() { } func (s *stepWithSpinner) Status(msg string) { - s.msg = fmt.Sprintf(" %s: %s", s.msg, msg) + s.msg = fmt.Sprintf(" %s: %s %s", s.msg, msg, s.time()) } func (s *stepWithSpinner) Success() { @@ -66,7 +71,7 @@ func (s *stepWithSpinner) Stop(success bool) { } else { gliph = color.RedString(failureGlyph) } - s.spinner.FinalMSG = fmt.Sprintf("%s%s\n", gliph, s.msg) + s.spinner.FinalMSG = fmt.Sprintf("%s%s %s\n", gliph, s.msg, s.time()) s.spinner.Stop() }