diff --git a/.gitignore b/.gitignore index 1fcbff700..f517e6e11 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /.idea -/.vscode /.devspace /kubeconfig.yaml .devspace/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 0c5635d75..9912e9c2b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,6 +12,16 @@ "program": "${workspaceRoot}/cmd/vclusterctl/main.go", "cwd": "${workspaceRoot}", "args": ["create", "vcluster-1", "-nvcluster-1"] + }, + { + "name": "Debug pro cli", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceRoot}/cmd/vclusterctl/main.go", + "cwd": "${workspaceRoot}", + "buildFlags": "-tags=pro", + "args": ["pro", "start"] }, { "name": "Debug vcluster (localhost:2346)", @@ -43,6 +53,6 @@ }, "args": ["-ginkgo.v"], // add "-ginkgo.focus=.*part of test name.*" to run just the test containing said regexp "showLog": true, - } + } ] -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..3922ec375 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "gopls": { + "build.env": { + "GOFLAGS": "-tags=pro" + } + } +} diff --git a/cmd/vclusterctl/cmd/login/notpro.go b/cmd/vclusterctl/cmd/login/notpro.go new file mode 100644 index 000000000..9052a57f1 --- /dev/null +++ b/cmd/vclusterctl/cmd/login/notpro.go @@ -0,0 +1,13 @@ +//go:build !pro +// +build !pro + +package login + +import ( + "github.com/loft-sh/vcluster/cmd/vclusterctl/flags" + "github.com/spf13/cobra" +) + +func NewLoginCmd(globalFlags *flags.GlobalFlags) (*cobra.Command, error) { + return nil, nil +} diff --git a/cmd/vclusterctl/cmd/login/pro.go b/cmd/vclusterctl/cmd/login/pro.go new file mode 100644 index 000000000..68d77c35c --- /dev/null +++ b/cmd/vclusterctl/cmd/login/pro.go @@ -0,0 +1,43 @@ +//go:build pro +// +build pro + +package login + +import ( + "fmt" + + loftctl "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd" + loftctlflags "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/vcluster/cmd/vclusterctl/flags" + "github.com/loft-sh/vcluster/pkg/pro" + "github.com/spf13/cobra" +) + +func NewLoginCmd(globalFlags *flags.GlobalFlags) (*cobra.Command, error) { + loftctlGlobalFlags := &loftctlflags.GlobalFlags{ + Silent: globalFlags.Silent, + Debug: globalFlags.Debug, + Config: globalFlags.Config, + LogOutput: globalFlags.LogOutput, + } + + var err error + loftctlGlobalFlags.Config, err = pro.GetConfigFilePath() + if err != nil { + return nil, fmt.Errorf("failed to get vcluster pro configuration file path: %w", err) + } + + loginCmd := loftctl.NewLoginCmd(loftctlGlobalFlags) + + loginCmd.Use = "login [VCLUSTER_PRO_HOST]" + loginCmd.Long = `######################################################## +Login into vCluster.Pro + +Example: +vcluster login https://my-vcluster-pro.com +vcluster login https://my-vcluster-pro.com --access-key myaccesskey +######################################################## + ` + + return loginCmd, nil +} diff --git a/cmd/vclusterctl/cmd/pro/alias.go b/cmd/vclusterctl/cmd/pro/alias.go deleted file mode 100644 index 9d0be037c..000000000 --- a/cmd/vclusterctl/cmd/pro/alias.go +++ /dev/null @@ -1,80 +0,0 @@ -package pro - -import ( - "fmt" - "strings" - - "github.com/loft-sh/vcluster/cmd/vclusterctl/flags" - "github.com/loft-sh/vcluster/pkg/pro" - "github.com/spf13/cobra" -) - -type aliasCmd struct { - added map[string]bool - commands map[string]*cobra.Command - globalFlags *flags.GlobalFlags -} - -func NewAliasCmd(globalFlags *flags.GlobalFlags) aliasCmd { - return aliasCmd{ - added: map[string]bool{}, - commands: map[string]*cobra.Command{}, - globalFlags: globalFlags, - } -} - -func (a *aliasCmd) AddCmd(use, description string) { - uses := strings.Split(use, " ") - - for i, currentUse := range uses { - currentCommand := strings.Join(uses[:i+1], " ") - - if _, ok := a.commands[currentCommand]; !ok { - a.commands[currentCommand] = &cobra.Command{ - Use: currentUse, - DisableFlagParsing: true, - } - - if i != 0 && !a.added[currentCommand] { - previousCommand := strings.Join(uses[:i], " ") - a.commands[previousCommand].AddCommand(a.commands[currentCommand]) - a.commands[previousCommand].RunE = nil - a.added[currentCommand] = true - } - } - } - - a.commands[use].Short = description - a.commands[use].RunE = func(cmd *cobra.Command, args []string) error { return a.runE(cmd, uses, args) } -} - -func (a *aliasCmd) Commands() []*cobra.Command { - cmds := []*cobra.Command{} - - for key, cmd := range a.commands { - if strings.Count(key, " ") == 0 { - cmds = append(cmds, cmd) - } - } - - return cmds -} - -func (aliasCmd) runE(cobraCmd *cobra.Command, split, args []string) error { - ctx := cobraCmd.Context() - - cobraCmd.SilenceUsage = true - - // check if we have a version - lastUsedVersion, err := pro.LastUsedVersion() - if err != nil { - return fmt.Errorf("failed to get last user cli version from config: %w", err) - } - - err = pro.RunLoftCli(ctx, lastUsedVersion, append(split, args...)) - if err != nil { - return fmt.Errorf("failed to run vcluster pro alias command: %w", err) - } - - return nil -} diff --git a/cmd/vclusterctl/cmd/pro/login.go b/cmd/vclusterctl/cmd/pro/login.go deleted file mode 100644 index 26e598ef3..000000000 --- a/cmd/vclusterctl/cmd/pro/login.go +++ /dev/null @@ -1,112 +0,0 @@ -package pro - -import ( - "crypto/tls" - "encoding/json" - "fmt" - "net/http" - "net/url" - "strings" - - "github.com/loft-sh/api/v3/pkg/auth" - "github.com/loft-sh/vcluster/cmd/vclusterctl/flags" - "github.com/loft-sh/vcluster/cmd/vclusterctl/log" - "github.com/loft-sh/vcluster/pkg/pro" - "github.com/samber/lo" - "github.com/spf13/cobra" -) - -type LoginCmd struct{} - -func NewLoginCmd(globalFlags *flags.GlobalFlags) *cobra.Command { - cmd := LoginCmd{} - - loginCmd := &cobra.Command{ - Use: "login", - Short: "Log in to the vcluster.pro server", - DisableFlagParsing: true, - RunE: cmd.RunE, - } - - return loginCmd -} - -func (*LoginCmd) RunE(cobraCmd *cobra.Command, args []string) error { - ctx := cobraCmd.Context() - cobraCmd.SilenceUsage = true - - if len(args) == 0 { - args = []string{"--help"} - } - - containsHelp := lo.ContainsBy(args, func(item string) bool { - return item == "--help" || item == "-h" - }) - if containsHelp { - err := pro.RunLoftCli(ctx, "latest", append([]string{"login"}, args...)) - if err != nil { - return fmt.Errorf("failed to run vcluster pro login: %w", err) - } - - return nil - } - - serverURL, err := url.Parse(args[0]) - if err != nil { - return fmt.Errorf("failed to parse vcluster pro server url: %w", err) - } - - log.GetInstance().Info("Logging in to vcluster pro server %s", serverURL.String()) - - serverURL.Path = "/version" - - req, err := http.NewRequestWithContext(ctx, http.MethodGet, serverURL.String(), nil) - if err != nil { - return fmt.Errorf("failed to create request: %w", err) - } - - // Configure insecure TLS transport - customTransport := http.DefaultTransport.(*http.Transport).Clone() - customTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} - client := &http.Client{Transport: customTransport} - - resp, err := client.Do(req) - if err != nil { - return fmt.Errorf("failed to send request: %w", err) - } - defer resp.Body.Close() - - version := &auth.Version{} - - err = json.NewDecoder(resp.Body).Decode(&version) - if err != nil { - return fmt.Errorf("failed to decode response: %w", err) - } - - loftVersion := version.Version - if !strings.HasPrefix(loftVersion, "v") { - loftVersion = "v" + loftVersion - } - - log.GetInstance().Infof("Detected server version: %s", loftVersion) - - args = append([]string{"login"}, args...) - err = pro.RunLoftCli(ctx, loftVersion, args) - if err != nil { - return fmt.Errorf("failed to run vcluster pro login: %w", err) - } - - config, err := pro.GetConfig() - if err != nil { - return fmt.Errorf("failed to get vcluster pro config: %w", err) - } - - config.LastUsedVersion = loftVersion - - err = pro.WriteConfig(config) - if err != nil { - return fmt.Errorf("failed to write vcluster pro config: %w", err) - } - - return nil -} diff --git a/cmd/vclusterctl/cmd/pro/notpro.go b/cmd/vclusterctl/cmd/pro/notpro.go index 10c33a5f6..282d9d79e 100644 --- a/cmd/vclusterctl/cmd/pro/notpro.go +++ b/cmd/vclusterctl/cmd/pro/notpro.go @@ -8,6 +8,6 @@ import ( "github.com/spf13/cobra" ) -func NewProCmd(globalFlags *flags.GlobalFlags) *cobra.Command { - return nil +func NewProCmd(globalFlags *flags.GlobalFlags) (*cobra.Command, error) { + return nil, nil } diff --git a/cmd/vclusterctl/cmd/pro/pro.go b/cmd/vclusterctl/cmd/pro/pro.go index 3fac6dad6..4baf24aee 100644 --- a/cmd/vclusterctl/cmd/pro/pro.go +++ b/cmd/vclusterctl/cmd/pro/pro.go @@ -4,11 +4,17 @@ package pro import ( + "fmt" + + loftctl "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd" + loftctlflags "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" "github.com/loft-sh/vcluster/cmd/vclusterctl/flags" + "github.com/loft-sh/vcluster/cmd/vclusterctl/log" + "github.com/loft-sh/vcluster/pkg/pro" "github.com/spf13/cobra" ) -func NewProCmd(globalFlags *flags.GlobalFlags) *cobra.Command { +func NewProCmd(globalFlags *flags.GlobalFlags) (*cobra.Command, error) { proCmd := &cobra.Command{ Use: "pro", Short: "vCluster.Pro subcommands", @@ -19,38 +25,48 @@ func NewProCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Args: cobra.NoArgs, } - proCmd.AddCommand(NewStartCmd(globalFlags)) - proCmd.AddCommand(NewLoginCmd(globalFlags)) + loftctlGlobalFlags := &loftctlflags.GlobalFlags{ + Silent: globalFlags.Silent, + Debug: globalFlags.Debug, + Config: globalFlags.Config, + LogOutput: globalFlags.LogOutput, + } - proxy := NewAliasCmd(globalFlags) + startCmd, err := NewStartCmd(loftctlGlobalFlags) + if err != nil { + return nil, fmt.Errorf("failed to create vcluster pro start command: %w", err) + } - proxy.AddCmd("connect", "Creates a kube context for the given virtual cluster") - proxy.AddCmd("create", "Creates a new virtual cluster in the given parent cluster") - proxy.AddCmd("delete", "Deletes a virtual cluster from a cluster") - proxy.AddCmd("import", "Imports a vCluster.Pro instance into a space") - proxy.AddCmd("list", "Lists the vCluster.Pro instances you have access to") - // Use is an alias to connect - proxy.AddCmd("use", "Creates a kube context for the given virtual cluster") + proCmd.AddCommand(startCmd) - proxy.AddCmd("space", "Management operations on space resources") - proxy.AddCmd("space create", "Creates a new space in the given cluster") - proxy.AddCmd("space delete", "Deletes a space from a cluster") - proxy.AddCmd("space import", "Imports a vcluster into a vcluster pro project") - proxy.AddCmd("space list", "Lists the vcluster pro spaces you have access to") - proxy.AddCmd("space use", "Creates a kube context for the given space") + return proCmd, nil +} - proxy.AddCmd("secret", "Management Operations on secret resources") - proxy.AddCmd("secret get", "Returns the key value of a project / shared secret") - proxy.AddCmd("secret list", "Lists all the shared secrets you have access to") - proxy.AddCmd("secret set", "Sets the key value of a project / shared secret") +func NewStartCmd(loftctlGlobalFlags *loftctlflags.GlobalFlags) (*cobra.Command, error) { + starCmd := loftctl.NewStartCmd(loftctlGlobalFlags) - proxy.AddCmd("generate", "Generates configuration") - proxy.AddCmd("generate admin-kube-config", "Generates a new kube config for connecting a cluster") + configPath, err := pro.GetConfigFilePath() + if err != nil { + return nil, fmt.Errorf("failed to get vcluster pro configuration file path: %w", err) + } - proxy.AddCmd("reset", "Reset configuration") - proxy.AddCmd("reset password", "Resets the password of a user") + starCmd.Flags().Set("config", configPath) - proCmd.AddCommand(proxy.Commands()...) + starCmd.Flags().Set("product", "vcluster-pro") + starCmd.Flags().Set("chart-name", "vcluster-control-plane") + + starCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) { + version := pro.MinimumVersionTag + + latestVersion, err := pro.LatestCompatibleVersion(cmd.Context()) + if err != nil { + log.GetInstance().Warnf("failed to get latest compatible version: %v", err) + } else { + version = latestVersion + } + + starCmd.Flags().Set("version", version) + } - return proCmd + return starCmd, nil } diff --git a/cmd/vclusterctl/cmd/pro/start.go b/cmd/vclusterctl/cmd/pro/start.go deleted file mode 100644 index 43e3743df..000000000 --- a/cmd/vclusterctl/cmd/pro/start.go +++ /dev/null @@ -1,48 +0,0 @@ -package pro - -import ( - "fmt" - - "github.com/loft-sh/vcluster/cmd/vclusterctl/flags" - "github.com/loft-sh/vcluster/pkg/pro" - "github.com/samber/lo" - "github.com/spf13/cobra" -) - -type StartCmd struct{} - -func NewStartCmd(globalFlags *flags.GlobalFlags) *cobra.Command { - cmd := StartCmd{} - - startCmd := &cobra.Command{ - Use: "start", - Short: "Starts the vcluster.pro server", - DisableFlagParsing: true, - RunE: cmd.RunE, - } - - return startCmd -} - -func (*StartCmd) RunE(cobraCmd *cobra.Command, args []string) error { - ctx := cobraCmd.Context() - - cobraCmd.SilenceUsage = true - - containsHelmFlags := lo.ContainsBy(args, func(item string) bool { - return item == "--chart-name" || item == "--chart-path" - }) - - if !containsHelmFlags { - args = append(args, "--chart-name", "vcluster-control-plane") - } - - args = append([]string{"start"}, args...) - - err := pro.RunLoftCli(ctx, "latest", args) - if err != nil { - return fmt.Errorf("failed to start vcluster pro server: %w", err) - } - - return nil -} diff --git a/cmd/vclusterctl/cmd/root.go b/cmd/vclusterctl/cmd/root.go index c3019bf07..6baa5e074 100644 --- a/cmd/vclusterctl/cmd/root.go +++ b/cmd/vclusterctl/cmd/root.go @@ -3,6 +3,7 @@ package cmd import ( "context" "fmt" + "os" "github.com/loft-sh/vcluster/cmd/vclusterctl/cmd/get" "github.com/loft-sh/vcluster/cmd/vclusterctl/cmd/pro" @@ -39,6 +40,11 @@ var globalFlags *flags.GlobalFlags // Execute adds all child commands to the root command and sets flags appropriately. // This is called by main.main(). It only needs to happen once to the rootCmd. func Execute() { + err := os.Setenv("PRODUCT", "vcluster-pro") + if err != nil { + panic(err) + } + log := log.GetInstance() rootCmd, err := BuildRoot(log) if err != nil { @@ -79,11 +85,15 @@ func BuildRoot(log log.Logger) (*cobra.Command, error) { rootCmd.AddCommand(versionCmd) // add pro commands - if proCmd := pro.NewProCmd(globalFlags); proCmd != nil { + proCmd, err := pro.NewProCmd(globalFlags) + if err != nil { + return nil, fmt.Errorf("failed to create pro command: %w", err) + } + if proCmd != nil { rootCmd.AddCommand(proCmd) } - err := rootCmd.RegisterFlagCompletionFunc("namespace", newNamespaceCompletionFunc(rootCmd.Context())) + err = rootCmd.RegisterFlagCompletionFunc("namespace", newNamespaceCompletionFunc(rootCmd.Context())) if err != nil { return rootCmd, fmt.Errorf("failed to register completion for namespace: %w", err) } diff --git a/cmd/vclusterctl/flags/flags.go b/cmd/vclusterctl/flags/flags.go index bf6e362e8..0c218f8d6 100644 --- a/cmd/vclusterctl/flags/flags.go +++ b/cmd/vclusterctl/flags/flags.go @@ -11,6 +11,7 @@ type GlobalFlags struct { Config string Context string Namespace string + LogOutput string } // SetGlobalFlags applies the global flags @@ -21,6 +22,7 @@ func SetGlobalFlags(flags *flag.FlagSet) *GlobalFlags { flags.StringVar(&globalFlags.Context, "context", "", "The kubernetes config context to use") flags.StringVarP(&globalFlags.Namespace, "namespace", "n", "", "The kubernetes namespace to use") flags.BoolVarP(&globalFlags.Silent, "silent", "s", false, "Run in silent mode and prevents any vcluster log output except panics & fatals") + flags.StringVar(&globalFlags.LogOutput, "log-output", "plain", "The log format to use. Can be either plain, raw or json") return globalFlags } diff --git a/go.mod b/go.mod index b31473877..4931eb4a9 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.21.1 require ( github.com/AlecAivazis/survey/v2 v2.3.7 github.com/blang/semver v3.5.1+incompatible + github.com/blang/semver/v4 v4.0.0 github.com/denisbrodbeck/machineid v1.0.1 github.com/ghodss/yaml v1.0.0 github.com/go-logr/logr v1.2.4 @@ -14,8 +15,7 @@ require ( github.com/hashicorp/golang-lru/v2 v2.0.2 github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 - github.com/loft-sh/api/v3 v3.2.4 - github.com/loft-sh/loftctl/v3 v3.2.4 + github.com/loft-sh/loftctl/v3 v3.0.0-20230921095454-4a09cdaacca3 github.com/loft-sh/utils v0.0.25 github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d github.com/mitchellh/go-homedir v1.1.0 @@ -62,9 +62,11 @@ require ( require ( github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect - github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cloudflare/circl v1.3.3 // indirect + github.com/docker/cli v23.0.0-rc.1+incompatible // indirect + github.com/docker/docker v23.0.0-rc.1+incompatible // indirect + github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960 // indirect github.com/emicklei/go-restful/v3 v3.10.2 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect @@ -73,9 +75,17 @@ require ( github.com/google/cel-go v0.16.0 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/loft-sh/agentapi/v3 v3.3.0-ci.1.0.20230921083523-e1d74f6f8fd1 // indirect + github.com/loft-sh/api/v3 v3.3.0-alpha.21 // indirect + github.com/loft-sh/apiserver v0.0.0-20230628051307-f26967fbb40f // indirect + github.com/loft-sh/external-types v0.0.2-0.20230301201552-ec939da949b4 // indirect + github.com/loft-sh/jspolicy v0.1.0 // indirect + github.com/mattn/go-runewidth v0.0.9 // indirect github.com/oklog/ulid v1.3.1 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/otiai10/copy v1.11.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // indirect diff --git a/go.sum b/go.sum index 38507dfa2..aeb512219 100644 --- a/go.sum +++ b/go.sum @@ -5,32 +5,54 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= 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/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= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= +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-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +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/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= @@ -40,25 +62,45 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.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/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +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/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/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-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= 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/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -67,6 +109,8 @@ github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7N github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +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.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= @@ -78,11 +122,23 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +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.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= github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= @@ -93,10 +149,24 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/denisbrodbeck/machineid v1.0.1 h1:geKr9qtkB876mXguW2X6TU4ZynleN6ezuMSRhl4D7AQ= github.com/denisbrodbeck/machineid v1.0.1/go.mod h1:dJUwb7PTidGDeYyUBmXZ2GphQBbjJCrnectwCyxcUSI= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/docker/cli v23.0.0-rc.1+incompatible h1:Vl3pcUK4/LFAD56Ys3BrqgAtuwpWd/IO3amuSL0ZbP0= +github.com/docker/cli v23.0.0-rc.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v23.0.0-rc.1+incompatible h1:Dmn88McWuHc7BSNN1s6RtfhMmt6ZPQAYUEf7FhqpiQI= +github.com/docker/docker v23.0.0-rc.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +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-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= 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/dop251/goja v0.0.0-20210406175830-1b11a6af686d/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960 h1:aRd8M7HJVZOqn/vhOzrGcQH0lNAMkqMn+pXUYkatmcA= github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= @@ -106,6 +176,7 @@ github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJI github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -115,8 +186,11 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwC github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= +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/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -128,55 +202,162 @@ github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui72 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/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +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-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-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-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 v0.3.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.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= 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/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.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= 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.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= 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/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= github.com/go-openapi/spec v0.20.6 h1:ich1RQ3WDbfoeTqTAb+5EIxNmpKVJZWBNah9RAT0jIQ= github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o= github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= 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.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sql-driver/mysql v1.5.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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.2.2/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +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.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -185,17 +366,23 @@ github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -203,6 +390,7 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -240,65 +428,112 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 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= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/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/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/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +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= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +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/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf h1:WfD7VjIE6z8dIvMsI4/s+1qr5EL+zoIGev1BQj1eoJ8= github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf/go.mod h1:hyb9oH7vZsitZCiBt0ZvifOrB+qc8PS5IiilCIb87rg= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= 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/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.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 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/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 h1:qGQQKEcAR99REcMpsXCp3lJ03zYT1PkRd3kQGPn9GVg= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 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= @@ -313,42 +548,77 @@ github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 h1:nHHjmvjitIiyP github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0/go.mod h1:YBCo4DoEeDndqvAn6eeu0vWM7QdXmHEeI9cFWplmBys= 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/loft-sh/api/v3 v3.2.4 h1:uiTZYxsWFby3hz6ey+9DH35CXlw7ORthiFrzc9h5o/A= -github.com/loft-sh/api/v3 v3.2.4/go.mod h1:GcyDXZ2JeN1sHcLPglNIGy9uW+vP7nwAfJ/aFk3U3Yk= -github.com/loft-sh/loftctl/v3 v3.2.4 h1:afym46p3ElcSKZRJvI/ZCtHhwIjeh4FVosVQ2jMr7aY= -github.com/loft-sh/loftctl/v3 v3.2.4/go.mod h1:tmYdi/HW6DJLh87DF8HAoZPH1t3n4wgKtLSzxDrEDfk= +github.com/loft-sh/agentapi/v3 v3.3.0-ci.1.0.20230921083523-e1d74f6f8fd1 h1:XE+JbvcExJd45Oh3Jm2d62uPmDP2luPf0mQ3NZZMMuY= +github.com/loft-sh/agentapi/v3 v3.3.0-ci.1.0.20230921083523-e1d74f6f8fd1/go.mod h1:8jmVWFBcLjwh6Tv2KPVxkIjUJpVxUMROcbYYVYxR1pI= +github.com/loft-sh/api/v3 v3.3.0-alpha.21 h1:akI1V79u/aPePeQue6UsAff67pvS6ok0/NxbmND8wHw= +github.com/loft-sh/api/v3 v3.3.0-alpha.21/go.mod h1:eyXGuTGTpJmWAlmXM1QQMHwFc6t9jhj+imrrPdj9syA= +github.com/loft-sh/apiserver v0.0.0-20230628051307-f26967fbb40f h1:eeLBYlrGOvzJK3h7JYdBGpRvdjzD/sTCVPL2lIQsXlg= +github.com/loft-sh/apiserver v0.0.0-20230628051307-f26967fbb40f/go.mod h1:Mlbl/QTA48cbKpQcmYMA56TQ+Z6Nna7t7ocbCoCmf5w= +github.com/loft-sh/external-types v0.0.2-0.20230301201552-ec939da949b4 h1:eSuBR+6j7MWmab6AU8WGd4EYQiRCZKupxThUxqf38C8= +github.com/loft-sh/external-types v0.0.2-0.20230301201552-ec939da949b4/go.mod h1:qnerIOkD67CmTkV8HsXQit6BfB7Qiw45bSUy1oefIXU= +github.com/loft-sh/jspolicy v0.1.0 h1:FNAWR6tRX5NRWxAf9RI/86NRH83NXYbobLHSZyMND74= +github.com/loft-sh/jspolicy v0.1.0/go.mod h1:4Zi38iEB0JvhnkrNHPpoueSUWQ1OlHMNB9JHTGEsPO0= +github.com/loft-sh/loftctl/v3 v3.0.0-20230921095454-4a09cdaacca3 h1:NVjFE4y/QD2Ol3tkdhTnv+iV8baktqGmxodpr2vZVQo= +github.com/loft-sh/loftctl/v3 v3.0.0-20230921095454-4a09cdaacca3/go.mod h1:iN3Q75vfQDNJrJLKK7YmPVYJhNGPZcV7J0fbsrosnQA= github.com/loft-sh/log v0.0.0-20230824104949-bd516c25712a h1:/gqqjKpcHEdFXIX41lx1Y/FBqT/72gbPpf7sa20tyM8= github.com/loft-sh/log v0.0.0-20230824104949-bd516c25712a/go.mod h1:YImeRjXH34Yf5E79T7UHBQpDZl9fIaaFRgyZ/bkY+UQ= github.com/loft-sh/utils v0.0.25 h1:JbbRJfXO1Rd34fQcaoDSmwyPBEzsrLwBSR21C90hHuk= github.com/loft-sh/utils v0.0.25/go.mod h1:9hlX9cGpWHg3mNi/oBlv3X4ePGDMK66k8MbOZGFMDTI= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= 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/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= 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.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= 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-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/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/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -364,6 +634,7 @@ github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -372,11 +643,15 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= @@ -386,56 +661,112 @@ github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/otiai10/copy v1.11.0 h1:OKBD80J/mLBrwnzXqGtFCzprFSGioo30JcmR4APsNwc= github.com/otiai10/copy v1.11.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +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.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +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.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +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= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +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.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rhysd/go-github-selfupdate v1.2.3 h1:iaa+J202f+Nc+A8zi75uccC8Wg3omaM7HDeimXA22Ag= github.com/rhysd/go-github-selfupdate v1.2.3/go.mod h1:mp/N8zj6jFfBQy/XMYoWsmfzxazpPAODuqarmPDe2Rg= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +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.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +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/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= +github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= +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/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/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 v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -446,19 +777,26 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tcnksm/go-gitconfig v0.1.2 h1:iiDhRitByXAEyjgBqsKi9QU4o2TNtv9kPP3RgPgXBPw= github.com/tcnksm/go-gitconfig v0.1.2/go.mod h1:/8EhP4H7oJZdIPyT+/UIsG87kTzrzM4UsLGSItWYCpE= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= 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/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I= github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= @@ -467,8 +805,13 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7Jul github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489 h1:1JFLBqwIgdyHN1ZtgjTBwO+blA6gVOmZurpiMEsETKo= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= @@ -483,11 +826,19 @@ go.etcd.io/etcd/raft/v3 v3.5.9 h1:ZZ1GIHoUlHsn0QVqiRysAm3/81Xx7+i2d7nSdWxlOiI= go.etcd.io/etcd/raft/v3 v3.5.9/go.mod h1:WnFkqzFdZua4LVlVXQEGhmooLeyS7mqzS4Pf4BCVqXg= go.etcd.io/etcd/server/v3 v3.5.9 h1:vomEmmxeztLtS5OEH7d0hBAg4cjVIu9wXuNzUZx2ZA0= go.etcd.io/etcd/server/v3 v3.5.9/go.mod h1:GgI1fQClQCFIzuVjlvdbMxNbnISt90gdfYyqiAIt65g= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.10.0 h1:UtV6N5k14upNp4LTduX0QCufG124fSu25Wz9tu94GLg= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= @@ -510,21 +861,38 @@ go.opentelemetry.io/proto/otlp v0.20.0 h1:BLOA1cZBAGSbRiNuGCCKiFrCdYB7deeHDeD1Su go.opentelemetry.io/proto/otlp v0.20.0/go.mod h1:3QgjzPALBIv9pcknj2EXGPXjYPFdUh/RQfF8Lz3+Vnw= go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY= go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/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.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.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.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +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.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/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-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -534,7 +902,12 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +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-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= @@ -545,12 +918,16 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -559,22 +936,39 @@ golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +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-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -592,6 +986,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ 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= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -599,28 +994,50 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-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= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-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-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -640,43 +1057,73 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +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= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +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-20200630173020-3af7569d3a1e/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-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/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-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= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -689,19 +1136,26 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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= +gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 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= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -712,8 +1166,18 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc h1:8DyZCyvI8mE1IdLy/60bS+52xfymkE72wv1asokgtao= google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= @@ -726,6 +1190,7 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -742,25 +1207,33 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 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/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -773,6 +1246,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -780,30 +1254,50 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 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= k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= +k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108= k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg= +k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= +k8s.io/apiextensions-apiserver v0.20.2/go.mod h1:F6TXp389Xntt+LUq3vw6HFOLttPa0V8821ogLGwb6Zs= k8s.io/apiextensions-apiserver v0.28.1 h1:l2ThkBRjrWpw4f24uq0Da2HaEgqJZ7pcgiEUTKSmQZw= k8s.io/apiextensions-apiserver v0.28.1/go.mod h1:sVvrI+P4vxh2YBBcm8n2ThjNyzU4BQGilCQ/JAY5kGs= k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= +k8s.io/apiserver v0.20.2/go.mod h1:2nKd93WyMhZx4Hp3RfgH2K5PhwyTrprrkWYnI7id7jA= k8s.io/apiserver v0.28.1 h1:dw2/NKauDZCnOUAzIo2hFhtBRUo6gQK832NV8kuDbGM= k8s.io/apiserver v0.28.1/go.mod h1:d8aizlSRB6yRgJ6PKfDkdwCy2DXt/d1FDR6iJN9kY1w= k8s.io/cli-runtime v0.28.1 h1:7Njc4eD5kaO4tYdSYVJJEs54koYD/vT6gxOq8dEVf9g= k8s.io/cli-runtime v0.28.1/go.mod h1:yIThSWkAVLqeRs74CMkq6lNFW42GyJmvMtcNn01SZho= k8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= k8s.io/code-generator v0.19.0/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= +k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/code-generator v0.20.2/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= k8s.io/component-helpers v0.28.1 h1:ts/vykhyUmPLhUl/hdLdf+a4BWA0giQ3f25HAIhl+RI= k8s.io/component-helpers v0.28.1/go.mod h1:rHFPj33uXNbgppg+ilmjJ4oR73prZQNRRmg+utVOAb0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= 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.100.2-0.20230613134558-6632ba5cc9a5 h1:GyOQg4FY82/Ud1KgdIXPc8+vcAcWNinVs24LiFlaMfI= k8s.io/klog/v2 v2.100.2-0.20230613134558-6632ba5cc9a5/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kms v0.28.1 h1:QLNTIc0k7Yebkt9yobj9Y9qBoRCMB4dq+pFCxVXVBnY= @@ -811,6 +1305,7 @@ k8s.io/kms v0.28.1/go.mod h1:I2TwA8oerDRInHWWBOqSUzv1EJDC1+55FQKYkxaPxh0= k8s.io/kube-aggregator v0.28.1 h1:rvG4llYnQKHjj6YjjoBPEJxfD1uH0DJwkrJTNKGAaCs= k8s.io/kube-aggregator v0.28.1/go.mod h1:JaLizMe+AECSpO2OmrWVsvnG0V3dX1RpW+Wq/QHbu18= 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-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/kubectl v0.28.1 h1:jAq4yKEqQL+fwkWcEsUWxhJ7uIRcOYQraJxx4SyAMTY= @@ -824,15 +1319,23 @@ k8s.io/metrics v0.28.1/go.mod h1:8lKkAajigcZWu0o9XCEBr++YVCzT48q1ck+f9CEBhZY= k8s.io/pod-security-admission v0.28.1 h1:d3jvo/+C6yDR1wnlX9ot1WvLyJ5R4uachJyxhdn9cW8= k8s.io/pod-security-admission v0.28.1/go.mod h1:Qm1rSy3l96m6QXGNU/8u+cmdpNdmAeA3OYDinrXhi6U= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= mvdan.cc/sh/v3 v3.6.0 h1:gtva4EXJ0dFNvl5bHjcUEvws+KRcDslT8VKheTYkbGU= mvdan.cc/sh/v3 v3.6.0/go.mod h1:U4mhtBLZ32iWhif5/lD+ygy1zrgaQhUu+XFy7C8+TTA= +rogchap.com/v8go v0.5.2-0.20210423120543-491864424893/go.mod h1:IitZnaOtWSJadY/7qinKHIEHpxsilMWyLQ+Efdo4n4I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +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.1.3 h1:I3qQxpzWFcsU7IV/MENc5x125HxRtchsNPtE6Pu+bBc= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.3/go.mod h1:e7I0gvW7fYKOqZDDsvaETBEyfM4dXh6DQ/SsqNInVC0= +sigs.k8s.io/controller-runtime v0.8.3/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= sigs.k8s.io/controller-runtime v0.16.0 h1:5koYaaRVBHDr0LZAJjO5dWzUjMsh6cwa7q1Mmusrdvk= sigs.k8s.io/controller-runtime v0.16.0/go.mod h1:77DnuwA8+J7AO0njzv3wbNlMOnGuLrwFr8JPNwx3J7g= +sigs.k8s.io/controller-tools v0.5.0/go.mod h1:JTsstrMpxs+9BUj6eGuAaEb6SDSPTeVtUyp0jmnAM/I= 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.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= @@ -840,6 +1343,7 @@ sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3/go.mod h1:9n16EZ sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 h1:W6cLQc5pnqM7vh3b7HvGNfXrJ/xL6BDMS0v1V/HHg5U= sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3/go.mod h1:JWP1Fj0VWGHyw3YUPjXSQnRnrwezrZSrApfX5S0nIag= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/pkg/pro/config.go b/pkg/pro/config.go index 3c84298dc..9d9e8528b 100644 --- a/pkg/pro/config.go +++ b/pkg/pro/config.go @@ -9,13 +9,13 @@ import ( "path/filepath" "time" + "github.com/loft-sh/loftctl/v3/pkg/client" "github.com/loft-sh/vcluster/pkg/util/cliconfig" homedir "github.com/mitchellh/go-homedir" ) const ( VclusterProFolder = "pro" - BinariesFolder = "bin" ) var ( @@ -25,9 +25,10 @@ var ( // CLIConfig is the config of the CLI type CLIConfig struct { - LatestVersion string `json:"latestVersion,omitempty"` - LatestCheckAt time.Time `json:"latestCheck,omitempty"` - LastUsedVersion string `json:"lastUsedVersion,omitempty"` + *client.Config `json:",inline"` + + LatestVersion string `json:"latestVersion,omitempty"` + LatestCheckAt time.Time `json:"latestCheck,omitempty"` } // getDefaultCLIConfig returns the default config @@ -36,18 +37,22 @@ func getDefaultCLIConfig() *CLIConfig { } // getConfigFilePath returns the path to the config file -func getConfigFilePath(home string) string { - return filepath.Join(home, cliconfig.VclusterFolder, VclusterProFolder, cliconfig.ConfigFileName) +func GetConfigFilePath() (string, error) { + home, err := homedir.Dir() + if err != nil { + return "", fmt.Errorf("failed to open vcluster pro configuration file from, unable to detect $HOME directory, falling back to default configuration, following error occurred: %w", err) + } + + return filepath.Join(home, cliconfig.VclusterFolder, VclusterProFolder, cliconfig.ConfigFileName), nil } // GetConfig returns the config from the config file func GetConfig() (*CLIConfig, error) { - home, err := homedir.Dir() + path, err := GetConfigFilePath() if err != nil { - return getDefaultCLIConfig(), fmt.Errorf("failed to open vcluster pro configuration file from, unable to detect $HOME directory, falling back to default configuration, following error occurred: %w", err) + return getDefaultCLIConfig(), fmt.Errorf("failed to get vcluster pro configuration file path: %w", err) } - path := getConfigFilePath(home) // check if the file exists fi, err := os.Stat(path) if err != nil { @@ -75,11 +80,10 @@ func GetConfig() (*CLIConfig, error) { // WriteConfig writes the given config to the config file func WriteConfig(c *CLIConfig) error { - home, err := homedir.Dir() + path, err := GetConfigFilePath() if err != nil { - return fmt.Errorf("failed to write vcluster configuration file from, unable to detect $HOME directory, falling back to default configuration, following error occurred: %w", err) + return fmt.Errorf("failed to get vcluster configuration file path: %w", err) } - path := getConfigFilePath(home) err = os.MkdirAll(filepath.Dir(path), 0755) if err != nil { @@ -98,17 +102,3 @@ func WriteConfig(c *CLIConfig) error { return nil } - -// LastUsedVersion returns the last used version of the loft cli -func LastUsedVersion() (string, error) { - config, err := GetConfig() - if err != nil { - return "", fmt.Errorf("failed to get vcluster pro config: %w", err) - } - - if config.LastUsedVersion == "" { - return "", ErrNoLastVersion - } - - return config.LastUsedVersion, nil -} diff --git a/pkg/pro/loft.go b/pkg/pro/loft.go deleted file mode 100644 index 2cfd382fc..000000000 --- a/pkg/pro/loft.go +++ /dev/null @@ -1,207 +0,0 @@ -package pro - -import ( - "context" - "errors" - "fmt" - "io" - "net/http" - "os" - "path/filepath" - "runtime" - "time" - - "github.com/google/go-github/v53/github" - "github.com/loft-sh/vcluster/pkg/util/cliconfig" - homedir "github.com/mitchellh/go-homedir" - "github.com/samber/lo" -) - -var ( - LoftBinaryName = "loft" - LoftConfigName = "config.json" -) - -// LoftBinaryFilePath returns the path to the loft binary for the given version -func LoftBinaryFilePath(version string) (string, error) { - dir, err := LoftAbsoluteWorkingDirectory(version) - if err != nil { - return "", fmt.Errorf("failed to open vcluster pro configuration file from, unable to detect working directory: %w", err) - } - - return filepath.Join(dir, LoftBinaryName), nil -} - -// LoftConfigFilePath returns the path to the loft config file for the given version -func LoftConfigFilePath(version string) (string, error) { - dir, err := LoftAbsoluteWorkingDirectory(version) - if err != nil { - return "", fmt.Errorf("failed to open vcluster pro configuration file from, unable to detect working directory: %w", err) - } - - return filepath.Join(dir, LoftConfigName), nil -} - -// LoftAbsoluteWorkingDirectory returns the absolute path to the loft working directory for the given version -func LoftAbsoluteWorkingDirectory(version string) (string, error) { - home, err := homedir.Dir() - if err != nil { - return "", fmt.Errorf("failed to open vcluster pro configuration file from, unable to detect $HOME directory, falling back to default configuration, following error occurred: %w", err) - } - - return filepath.Join(home, LoftWorkingDirectory(version)), nil -} - -// LoftWorkingDirectory returns the path to the loft working directory for the given version -func LoftWorkingDirectory(version string) string { - return filepath.Join(cliconfig.VclusterFolder, VclusterProFolder, BinariesFolder, version) -} - -// downloadBinary downloads the loft binary from the given url to the given file path -func downloadBinary(ctx context.Context, filePath, url string) error { - err := os.MkdirAll(filepath.Dir(filePath), 0755) - if err != nil { - return fmt.Errorf("failed to create directory %s, following error occurred: %w", filepath.Dir(filePath), err) - } - - out, err := os.Create(filePath) - if err != nil { - return fmt.Errorf("failed to create file %s, following error occurred: %w", filePath, err) - } - defer out.Close() - - request, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) - if err != nil { - return fmt.Errorf("failed create new request with context: %w", err) - } - - resp, err := http.DefaultClient.Do(request) - if err != nil { - return fmt.Errorf("failed to download loft binary from %s, following error occurred: %w", url, err) - } - defer resp.Body.Close() - - _, err = io.Copy(out, resp.Body) - if err != nil { - return fmt.Errorf("failed to write loft binary to %s, following error occurred: %w", filePath, err) - } - - err = os.Chmod(filePath, 0755) - if err != nil { - return fmt.Errorf("failed to make loft binary executable, following error occurred: %w", err) - } - - return nil -} - -// downloadLoftBinary downloads the loft binary for the given version if it does not exist yet. -// -// Returns the path to the loft binary and the version tag -func downloadLoftBinary(ctx context.Context, version string) (string, error) { - filePath, err := LoftBinaryFilePath(version) - if err != nil { - return "", fmt.Errorf("failed to get loft binary file path: %v", err) - } - - _, err = os.Stat(filePath) - if err != nil && !errors.Is(err, os.ErrNotExist) { - return "", fmt.Errorf("failed to stat loft binary: %w", err) - } - if err == nil { - return filePath, nil - } - - client := github.NewClient(nil) - - var release *github.RepositoryRelease - if version != "latest" { - release, _, err = client.Repositories.GetReleaseByTag(ctx, "loft-sh", "loft", version) - } else { - release, _, err = client.Repositories.GetLatestRelease(ctx, "loft-sh", "loft") - } - if err != nil { - return "", fmt.Errorf("failed to get latest release: %w", err) - } - - asset, found := lo.Find(release.Assets, func(asset *github.ReleaseAsset) bool { - return fmt.Sprintf("loft-%s-%s", runtime.GOOS, runtime.GOARCH) == *asset.Name - }) - - if !found { - return "", fmt.Errorf("failed to find loft binary for tag %s", version) - } - - // download binary - err = downloadBinary(ctx, filePath, asset.GetBrowserDownloadURL()) - if err != nil { - return "", fmt.Errorf("failed to download loft binary: %w", err) - } - - return filePath, nil -} - -// downloadLatestLoftBinary downloads the latest loft binary if it does not exist yet. -// -// Returns the path to the loft binary and the version tag -func downloadLatestLoftBinary(ctx context.Context) (string, string, error) { - client := github.NewClient(nil) - - release, _, err := client.Repositories.GetLatestRelease(ctx, "loft-sh", "loft") - if err != nil { - return "", "", fmt.Errorf("failed to get latest release: %w", err) - } - - tagName := release.GetTagName() - - if tagName == "" { - return "", "", fmt.Errorf("failed to get latest release tag name") - } - - binaryPath, err := downloadLoftBinary(ctx, tagName) - if err != nil { - return "", "", fmt.Errorf("failed to download loft binary: %w", err) - } - - return binaryPath, tagName, err -} - -// LatestLoftBinary returns the path to the latest loft binary if it exists -// -// Returns the path to the loft binary and the version tag -func LatestLoftBinary(ctx context.Context) (string, string, error) { - proConfig, err := GetConfig() - if err != nil { - return "", "", fmt.Errorf("failed to get pro config: %w", err) - } - - filePath, err := LoftBinaryFilePath(proConfig.LatestVersion) - if err != nil { - return "", "", fmt.Errorf("failed to get loft binary file path: %w", err) - } - - _, err = os.Stat(filePath) - - if time.Since(proConfig.LatestCheckAt).Hours() > 24 || os.Getenv("PRO_FORCE_UPDATE") == "true" || errors.Is(err, os.ErrNotExist) { - _, version, err := downloadLatestLoftBinary(ctx) - if err != nil { - return "", "", fmt.Errorf("failed to download latest loft binary: %v", err) - } - - proConfig.LatestVersion = version - proConfig.LatestCheckAt = time.Now() - - err = WriteConfig(proConfig) - if err != nil { - return "", "", fmt.Errorf("failed to write pro config: %w", err) - } - } - - return filePath, proConfig.LatestVersion, nil -} - -// LoftBinary returns the path to the loft binary for the given version -// -// Returns the path to the loft binary and the version tag -func LoftBinary(ctx context.Context, version string) (string, error) { - return downloadLoftBinary(ctx, version) -} diff --git a/pkg/pro/run.go b/pkg/pro/run.go deleted file mode 100644 index ead87b721..000000000 --- a/pkg/pro/run.go +++ /dev/null @@ -1,68 +0,0 @@ -package pro - -import ( - "context" - "fmt" - "os" - "os/exec" -) - -// RunLoftCli executes a loft CLI command for the given version with the -// provided arguments. -// -// It determines the loft binary path and sets the working directory, config -// file, and env vars needed to run the command. -// -// The CLI arguments are appended to "pro" as the first arg. The command is -// executed and any error returned. -func RunLoftCli(ctx context.Context, version string, args []string) error { - var ( - filePath string - err error - ) - - if devVersion, ok := os.LookupEnv("PRO_FORCE_VERSION"); ok { - version = devVersion - } - - if version == "" || version == "latest" { - filePath, version, err = LatestLoftBinary(ctx) - } else { - filePath, err = LoftBinary(ctx, version) - } - - if err != nil { - return fmt.Errorf("failed to get latest loft binary: %w", err) - } - - configFilePath, err := LoftConfigFilePath(version) - if err != nil { - return fmt.Errorf("failed to get loft config file path: %w", err) - } - - workingDir, err := LoftAbsoluteWorkingDirectory(version) - if err != nil { - return fmt.Errorf("failed to get loft working directory: %w", err) - } - - args = append([]string{"pro"}, args...) - - cmd := exec.CommandContext(ctx, filePath, args...) - cmd.Stdin = os.Stdin - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - - cmd.Dir = workingDir - - cmd.Env = append(cmd.Env, os.Environ()...) - cmd.Env = append(cmd.Env, fmt.Sprintf("LOFT_CONFIG=%s", configFilePath)) - cmd.Env = append(cmd.Env, fmt.Sprintf("LOFT_CACHE_FOLDER=%s", LoftWorkingDirectory(version))) - cmd.Env = append(cmd.Env, "PRODUCT=vcluster-pro") - - err = cmd.Run() - if err != nil { - return fmt.Errorf("failed to run vcluster pro command: %w", err) - } - - return nil -} diff --git a/pkg/pro/version.go b/pkg/pro/version.go new file mode 100644 index 000000000..88300e35e --- /dev/null +++ b/pkg/pro/version.go @@ -0,0 +1,61 @@ +package pro + +import ( + "context" + "errors" + "fmt" + "os" + "strings" + "time" + + "github.com/blang/semver/v4" + "github.com/google/go-github/v53/github" + "github.com/loft-sh/vcluster/cmd/vclusterctl/log" +) + +var ( + MinimumVersionTag = "v3.3.0-alpha.24" + MinimumVersion = semver.MustParse(strings.TrimPrefix(MinimumVersionTag, "v")) +) + +// LatestCompatibleVersion returns the latest compatible version of vCluster.Pro +func LatestCompatibleVersion(ctx context.Context) (string, error) { + proConfig, err := GetConfig() + if err != nil { + return "", fmt.Errorf("failed to get pro config: %w", err) + } + + if time.Since(proConfig.LatestCheckAt).Hours() > 24 || os.Getenv("PRO_FORCE_UPDATE") == "true" || errors.Is(err, os.ErrNotExist) { + client := github.NewClient(nil) + + release, _, err := client.Repositories.GetLatestRelease(ctx, "loft-sh", "loft") + if err != nil { + return "", fmt.Errorf("failed to get latest release: %w", err) + } + + tagName := release.GetTagName() + + if tagName == "" { + return "", fmt.Errorf("failed to get latest release tag name") + } + + version := MinimumVersionTag + + ghVersion, err := semver.Parse(strings.TrimPrefix(tagName, "v")) + if err != nil { + log.GetInstance().Warnf("failed to parse latest release tag name, falling back to %s: %v", MinimumVersionTag, err) + } else if ghVersion.GTE(MinimumVersion) { + version = tagName + } + + proConfig.LatestVersion = version + proConfig.LatestCheckAt = time.Now() + + err = WriteConfig(proConfig) + if err != nil { + return "", fmt.Errorf("failed to write pro config: %w", err) + } + } + + return proConfig.LatestVersion, nil +} diff --git a/vendor/github.com/docker/cli/AUTHORS b/vendor/github.com/docker/cli/AUTHORS new file mode 100644 index 000000000..483743c99 --- /dev/null +++ b/vendor/github.com/docker/cli/AUTHORS @@ -0,0 +1,852 @@ +# File @generated by scripts/docs/generate-authors.sh. DO NOT EDIT. +# This file lists all contributors to the repository. +# See scripts/docs/generate-authors.sh to make modifications. + +Aanand Prasad +Aaron L. Xu +Aaron Lehmann +Aaron.L.Xu +Abdur Rehman +Abhinandan Prativadi +Abin Shahab +Abreto FU +Ace Tang +Addam Hardy +Adolfo Ochagavía +Adrian Plata +Adrien Duermael +Adrien Folie +Ahmet Alp Balkan +Aidan Feldman +Aidan Hobson Sayers +AJ Bowen +Akhil Mohan +Akihiro Suda +Akim Demaille +Alan Thompson +Albert Callarisa +Alberto Roura +Albin Kerouanton +Aleksa Sarai +Aleksander Piotrowski +Alessandro Boch +Alex Couture-Beil +Alex Mavrogiannis +Alex Mayer +Alexander Boyd +Alexander Larsson +Alexander Morozov +Alexander Ryabov +Alexandre González +Alexey Igrychev +Alexis Couvreur +Alfred Landrum +Alicia Lauerman +Allen Sun +Alvin Deng +Amen Belayneh +Amey Shrivastava <72866602+AmeyShrivastava@users.noreply.github.com> +Amir Goldstein +Amit Krishnan +Amit Shukla +Amy Lindburg +Anca Iordache +Anda Xu +Andrea Luzzardi +Andreas Köhler +Andres G. Aragoneses +Andres Leon Rangel +Andrew France +Andrew Hsu +Andrew Macpherson +Andrew McDonnell +Andrew Po +Andrey Petrov +Andrii Berehuliak +André Martins +Andy Goldstein +Andy Rothfusz +Anil Madhavapeddy +Ankush Agarwal +Anne Henmi +Anton Polonskiy +Antonio Murdaca +Antonis Kalipetis +Anusha Ragunathan +Ao Li +Arash Deshmeh +Arko Dasgupta +Arnaud Porterie +Arnaud Rebillout +Arthur Peka +Ashwini Oruganti +Azat Khuyiyakhmetov +Bardia Keyoumarsi +Barnaby Gray +Bastiaan Bakker +BastianHofmann +Ben Bodenmiller +Ben Bonnefoy +Ben Creasy +Ben Firshman +Benjamin Boudreau +Benjamin Böhmke +Benjamin Nater +Benoit Sigoure +Bhumika Bayani +Bill Wang +Bin Liu +Bingshen Wang +Bishal Das +Boaz Shuster +Bogdan Anton +Boris Pruessmann +Brad Baker +Bradley Cicenas +Brandon Mitchell +Brandon Philips +Brent Salisbury +Bret Fisher +Brian (bex) Exelbierd +Brian Goff +Brian Wieder +Bruno Sousa +Bryan Bess +Bryan Boreham +Bryan Murphy +bryfry +Cameron Spear +Cao Weiwei +Carlo Mion +Carlos Alexandro Becker +Carlos de Paula +Ce Gao +Cedric Davies +Cezar Sa Espinola +Chad Faragher +Chao Wang +Charles Chan +Charles Law +Charles Smith +Charlie Drage +Charlotte Mach +ChaYoung You +Chee Hau Lim +Chen Chuanliang +Chen Hanxiao +Chen Mingjie +Chen Qiu +Chris Couzens +Chris Gavin +Chris Gibson +Chris McKinnel +Chris Snow +Chris Vermilion +Chris Weyl +Christian Persson +Christian Stefanescu +Christophe Robin +Christophe Vidal +Christopher Biscardi +Christopher Crone +Christopher Jones +Christopher Svensson +Christy Norman +Chun Chen +Clinton Kitson +Coenraad Loubser +Colin Hebert +Collin Guarino +Colm Hally +Comical Derskeal <27731088+derskeal@users.noreply.github.com> +Conner Crosby +Corey Farrell +Corey Quon +Cory Bennet +Craig Wilhite +Cristian Staretu +Daehyeok Mun +Dafydd Crosby +Daisuke Ito +dalanlan +Damien Nadé +Dan Cotora +Daniel Artine +Daniel Cassidy +Daniel Dao +Daniel Farrell +Daniel Gasienica +Daniel Goosen +Daniel Helfand +Daniel Hiltgen +Daniel J Walsh +Daniel Nephin +Daniel Norberg +Daniel Watkins +Daniel Zhang +Daniil Nikolenko +Danny Berger +Darren Shepherd +Darren Stahl +Dattatraya Kumbhar +Dave Goodchild +Dave Henderson +Dave Tucker +David Alvarez +David Beitey +David Calavera +David Cramer +David Dooling +David Gageot +David Karlsson +David Lechner +David Scott +David Sheets +David Williamson +David Xia +David Young +Deng Guangxing +Denis Defreyne +Denis Gladkikh +Denis Ollier +Dennis Docter +Derek McGowan +Des Preston +Deshi Xiao +Dharmit Shah +Dhawal Yogesh Bhanushali +Dieter Reuter +Dima Stopel +Dimitry Andric +Ding Fei +Diogo Monica +Djordje Lukic +Dmitriy Fishman +Dmitry Gusev +Dmitry Smirnov +Dmitry V. Krivenok +Dominik Braun +Don Kjer +Dong Chen +DongGeon Lee +Doug Davis +Drew Erny +Ed Costello +Elango Sivanandam +Eli Uriegas +Eli Uriegas +Elias Faxö +Elliot Luo <956941328@qq.com> +Eric Curtin +Eric Engestrom +Eric G. Noriega +Eric Rosenberg +Eric Sage +Eric-Olivier Lamey +Erica Windisch +Erik Hollensbe +Erik Humphrey +Erik St. Martin +Essam A. Hassan +Ethan Haynes +Euan Kemp +Eugene Yakubovich +Evan Allrich +Evan Hazlett +Evan Krall +Evelyn Xu +Everett Toews +Fabio Falci +Fabrizio Soppelsa +Felix Geyer +Felix Hupfeld +Felix Rabe +fezzik1620 +Filip Jareš +Flavio Crisciani +Florian Klein +Forest Johnson +Foysal Iqbal +François Scala +Fred Lifton +Frederic Hemberger +Frederick F. Kautz IV +Frederik Nordahl Jul Sabroe +Frieder Bluemle +Gabriel Gore +Gabriel Nicolas Avellaneda +Gaetan de Villele +Gang Qiao +Gary Schaetz +Genki Takiuchi +George MacRorie +George Xie +Gianluca Borello +Gildas Cuisinier +Gio d'Amelio +Gleb Stsenov +Goksu Toprak +Gou Rao +Govind Rai +Grant Reaber +Greg Pflaum +Gsealy +Guilhem Lettron +Guillaume J. Charmes +Guillaume Le Floch +Guillaume Tardif +gwx296173 +Günther Jungbluth +Hakan Özler +Hao Zhang <21521210@zju.edu.cn> +Harald Albers +Harold Cooper +Harry Zhang +He Simei +Hector S +Helen Xie +Henning Sprang +Henry N +Hernan Garcia +Hongbin Lu +Hu Keping +Huayi Zhang +Hugo Gabriel Eyherabide +huqun +Huu Nguyen +Hyzhou Zhy +Iain Samuel McLean Elder +Ian Campbell +Ian Philpot +Ignacio Capurro +Ilya Dmitrichenko +Ilya Khlopotov +Ilya Sotkov +Ioan Eugen Stan +Isabel Jimenez +Ivan Grcic +Ivan Grund +Ivan Markin +Jacob Atzen +Jacob Tomlinson +Jaivish Kothari +Jake Lambert +Jake Sanders +James Nesbitt +James Turnbull +Jamie Hannaford +Jan Koprowski +Jan Pazdziora +Jan-Jaap Driessen +Jana Radhakrishnan +Jared Hocutt +Jasmine Hegman +Jason Hall +Jason Heiss +Jason Plum +Jay Kamat +Jean Lecordier +Jean Rouge +Jean-Christophe Sirot +Jean-Pierre Huynh +Jeff Lindsay +Jeff Nickoloff +Jeff Silberman +Jennings Zhang +Jeremy Chambers +Jeremy Unruh +Jeremy Yallop +Jeroen Franse +Jesse Adametz +Jessica Frazelle +Jezeniel Zapanta +Jian Zhang +Jie Luo +Jilles Oldenbeuving +Jim Galasyn +Jim Lin +Jimmy Leger +Jimmy Song +jimmyxian +Jintao Zhang +Joao Fernandes +Joe Abbey +Joe Doliner +Joe Gordon +Joel Handwell +Joey Geiger +Joffrey F +Johan Euphrosine +Johannes 'fish' Ziemke +John Feminella +John Harris +John Howard +John Howard +John Laswell +John Maguire +John Mulhausen +John Starks +John Stephens +John Tims +John V. Martinez +John Willis +Jon Johnson +Jon Zeolla +Jonatas Baldin +Jonathan Boulle +Jonathan Lee +Jonathan Lomas +Jonathan McCrohan +Jonathan Warriss-Simmons +Jonh Wendell +Jordan Jennings +Jorge Vallecillo +Jose J. Escobar <53836904+jescobar-docker@users.noreply.github.com> +Joseph Kern +Josh Bodah +Josh Chorlton +Josh Hawn +Josh Horwitz +Josh Soref +Julien Barbier +Julien Kassar +Julien Maitrehenry +Justas Brazauskas +Justin Cormack +Justin Simonelis +Justyn Temme +Jyrki Puttonen +Jérémie Drouet +Jérôme Petazzoni +Jörg Thalheim +Kai Blin +Kai Qiang Wu (Kennan) +Kara Alexandra +Kareem Khazem +Karthik Nayak +Kat Samperi +Kathryn Spiers +Katie McLaughlin +Ke Xu +Kei Ohmura +Keith Hudgins +Kelton Bassingthwaite +Ken Cochrane +Ken ICHIKAWA +Kenfe-Mickaël Laventure +Kevin Alvarez +Kevin Burke +Kevin Feyrer +Kevin Kern +Kevin Kirsche +Kevin Meredith +Kevin Richardson +Kevin Woblick +khaled souf +Kim Eik +Kir Kolyshkin +Kotaro Yoshimatsu +Krasi Georgiev +Kris-Mikael Krister +Kun Zhang +Kunal Kushwaha +Kyle Mitofsky +Lachlan Cooper +Lai Jiangshan +Lars Kellogg-Stedman +Laura Frank +Laurent Erignoux +Lee Gaines +Lei Jitang +Lennie +Leo Gallucci +Leonid Skorospelov +Lewis Daly +Li Yi +Li Yi +Liang-Chi Hsieh +Lifubang +Lihua Tang +Lily Guo +Lin Lu +Linus Heckemann +Liping Xue +Liron Levin +liwenqi +lixiaobing10051267 +Lloyd Dewolf +Lorenzo Fontana +Louis Opter +Luca Favatella +Luca Marturana +Lucas Chan +Luka Hartwig +Lukas Heeren +Lukasz Zajaczkowski +Lydell Manganti +Lénaïc Huard +Ma Shimiao +Mabin +Maciej Kalisz +Madhav Puri +Madhu Venugopal +Madhur Batra +Malte Janduda +Manjunath A Kumatagi +Mansi Nahar +mapk0y +Marc Bihlmaier +Marc Cornellà +Marco Mariani +Marco Vedovati +Marcus Martins +Marianna Tessel +Marius Ileana +Marius Sturm +Mark Oates +Marsh Macy +Martin Mosegaard Amdisen +Mary Anthony +Mason Fish +Mason Malone +Mateusz Major +Mathieu Champlon +Mathieu Rollet +Matt Gucci +Matt Robenolt +Matteo Orefice +Matthew Heon +Matthieu Hauglustaine +Mauro Porras P +Max Shytikov +Maxime Petazzoni +Maximillian Fan Xavier +Mei ChunTao +Metal <2466052+tedhexaflow@users.noreply.github.com> +Micah Zoltu +Michael A. Smith +Michael Bridgen +Michael Crosby +Michael Friis +Michael Irwin +Michael Käufl +Michael Prokop +Michael Scharf +Michael Spetsiotis +Michael Steinert +Michael West +Michal Minář +Michał Czeraszkiewicz +Miguel Angel Alvarez Cabrerizo +Mihai Borobocea +Mihuleacc Sergiu +Mike Brown +Mike Casas +Mike Dalton +Mike Danese +Mike Dillon +Mike Goelzer +Mike MacCana +mikelinjie <294893458@qq.com> +Mikhail Vasin +Milind Chawre +Mindaugas Rukas +Miroslav Gula +Misty Stanley-Jones +Mohammad Banikazemi +Mohammed Aaqib Ansari +Mohini Anne Dsouza +Moorthy RS +Morgan Bauer +Morten Hekkvang +Morten Linderud +Moysés Borges +Mozi <29089388+pzhlkj6612@users.noreply.github.com> +Mrunal Patel +muicoder +Murukesh Mohanan +Muthukumar R +Máximo Cuadros +Mårten Cassel +Nace Oroz +Nahum Shalman +Nalin Dahyabhai +Nao YONASHIRO +Nassim 'Nass' Eddequiouaq +Natalie Parker +Nate Brennand +Nathan Hsieh +Nathan LeClaire +Nathan McCauley +Neil Peterson +Nick Adcock +Nick Santos +Nico Stapelbroek +Nicola Kabar +Nicolas Borboën +Nicolas De Loof +Nikhil Chawla +Nikolas Garofil +Nikolay Milovanov +Nir Soffer +Nishant Totla +NIWA Hideyuki +Noah Treuhaft +O.S. Tezer +Odin Ugedal +ohmystack +OKA Naoya +Oliver Pomeroy +Olle Jonsson +Olli Janatuinen +Oscar Wieman +Otto Kekäläinen +Ovidio Mallo +Pascal Borreli +Patrick Böänziger +Patrick Hemmer +Patrick Lang +Paul +Paul Kehrer +Paul Lietar +Paul Mulders +Paul Weaver +Pavel Pospisil +Paweł Gronowski +Paweł Pokrywka +Paweł Szczekutowicz +Peeyush Gupta +Per Lundberg +Peter Dave Hello +Peter Edge +Peter Hsu +Peter Jaffe +Peter Kehl +Peter Nagy +Peter Salvatore +Peter Waller +Phil Estes +Philip Alexander Etling +Philipp Gillé +Philipp Schmied +Phong Tran +pidster +Pieter E Smit +pixelistik +Pratik Karki +Prayag Verma +Preston Cowley +Pure White +Qiang Huang +Qinglan Peng +qudongfang +Raghavendra K T +Rahul Kadyan +Rahul Zoldyck +Ravi Shekhar Jethani +Ray Tsang +Reficul +Remy Suen +Renaud Gaubert +Ricardo N Feliciano +Rich Moyse +Richard Chen Zheng <58443436+rchenzheng@users.noreply.github.com> +Richard Mathie +Richard Scothern +Rick Wieman +Ritesh H Shukla +Riyaz Faizullabhoy +Rob Gulewich +Robert Wallis +Robin Naundorf +Robin Speekenbrink +Roch Feuillade +Rodolfo Ortiz +Rogelio Canedo +Rohan Verma +Roland Kammerer +Roman Dudin +Rory Hunter +Ross Boucher +Rubens Figueiredo +Rui Cao +Ryan Belgrave +Ryan Detzel +Ryan Stelly +Ryan Wilson-Perkin +Ryan Zhang +Sainath Grandhi +Sakeven Jiang +Sally O'Malley +Sam Neirinck +Sam Thibault +Samarth Shah +Sambuddha Basu +Sami Tabet +Samuel Cochran +Samuel Karp +Sandro Jäckel +Santhosh Manohar +Sargun Dhillon +Saswat Bhattacharya +Scott Brenner +Scott Collier +Sean Christopherson +Sean Rodman +Sebastiaan van Stijn +Sergey Tryuber +Serhat Gülçiçek +Sevki Hasirci +Shaun Kaasten +Sheng Yang +Shijiang Wei +Shishir Mahajan +Shoubhik Bose +Shukui Yang +Sian Lerk Lau +Sidhartha Mani +sidharthamani +Silvin Lubecki +Simei He +Simon Ferquel +Simon Heimberg +Sindhu S +Slava Semushin +Solomon Hykes +Song Gao +Spencer Brown +Spring Lee +squeegels +Srini Brahmaroutu +Stefan S. +Stefan Scherer +Stefan Weil +Stephane Jeandeaux +Stephen Day +Stephen Rust +Steve Durrheimer +Steve Richards +Steven Burgess +Stoica-Marcu Floris-Andrei +Subhajit Ghosh +Sun Jianbo +Sune Keller +Sungwon Han +Sunny Gogoi +Sven Dowideit +Sylvain Baubeau +Sébastien HOUZÉ +T K Sourabh +TAGOMORI Satoshi +taiji-tech +Takeshi Koenuma +Takuya Noguchi +Taylor Jones +Teiva Harsanyi +Tejaswini Duggaraju +Tengfei Wang +Teppei Fukuda +Thatcher Peskens +Thibault Coupin +Thomas Gazagnaire +Thomas Krzero +Thomas Leonard +Thomas Léveil +Thomas Riccardi +Thomas Swift +Tianon Gravi +Tianyi Wang +Tibor Vass +Tim Dettrick +Tim Hockin +Tim Sampson +Tim Smith +Tim Waugh +Tim Wraight +timfeirg +Timothy Hobbs +Tobias Bradtke +Tobias Gesellchen +Todd Whiteman +Tom Denham +Tom Fotherby +Tom Klingenberg +Tom Milligan +Tom X. Tobin +Tomas Bäckman +Tomas Tomecek +Tomasz Kopczynski +Tomáš Hrčka +Tony Abboud +Tõnis Tiigi +Trapier Marshall +Travis Cline +Tristan Carel +Tycho Andersen +Tycho Andersen +uhayate +Ulrich Bareth +Ulysses Souza +Umesh Yadav +Valentin Lorentz +Vardan Pogosian +Venkateswara Reddy Bukkasamudram +Veres Lajos +Victor Vieux +Victoria Bialas +Viktor Stanchev +Vimal Raghubir +Vincent Batts +Vincent Bernat +Vincent Demeester +Vincent Woo +Vishnu Kannan +Vivek Goyal +Wang Jie +Wang Lei +Wang Long +Wang Ping +Wang Xing +Wang Yuexiao +Wang Yumu <37442693@qq.com> +Wataru Ishida +Wayne Song +Wen Cheng Ma +Wenzhi Liang +Wes Morgan +Wewang Xiaorenfine +William Henry +Xianglin Gao +Xiaodong Liu +Xiaodong Zhang +Xiaoxi He +Xinbo Weng +Xuecong Liao +Yan Feng +Yanqiang Miao +Yassine Tijani +Yi EungJun +Ying Li +Yong Tang +Yosef Fertel +Yu Peng +Yuan Sun +Yue Zhang +Yunxiang Huang +Zachary Romero +Zander Mackie +zebrilee +Zeel B Patel +Zhang Kun +Zhang Wei +Zhang Wentao +ZhangHang +zhenghenghuo +Zhou Hao +Zhoulin Xie +Zhu Guihua +Álex González +Álvaro Lázaro +Átila Camurça Alves +Александр Менщиков <__Singleton__@hackerdom.ru> +徐俊杰 diff --git a/vendor/github.com/docker/cli/LICENSE b/vendor/github.com/docker/cli/LICENSE new file mode 100644 index 000000000..9c8e20ab8 --- /dev/null +++ b/vendor/github.com/docker/cli/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2017 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/docker/cli/NOTICE b/vendor/github.com/docker/cli/NOTICE new file mode 100644 index 000000000..58b19b6d1 --- /dev/null +++ b/vendor/github.com/docker/cli/NOTICE @@ -0,0 +1,19 @@ +Docker +Copyright 2012-2017 Docker, Inc. + +This product includes software developed at Docker, Inc. (https://www.docker.com). + +This product contains software (https://github.com/creack/pty) developed +by Keith Rarick, licensed under the MIT License. + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see https://www.bis.doc.gov + +See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/vendor/github.com/docker/cli/cli/config/config.go b/vendor/github.com/docker/cli/cli/config/config.go new file mode 100644 index 000000000..b7c05c3f8 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/config.go @@ -0,0 +1,153 @@ +package config + +import ( + "fmt" + "io" + "os" + "path/filepath" + "strings" + "sync" + + "github.com/docker/cli/cli/config/configfile" + "github.com/docker/cli/cli/config/credentials" + "github.com/docker/cli/cli/config/types" + "github.com/docker/docker/pkg/homedir" + "github.com/pkg/errors" +) + +const ( + // ConfigFileName is the name of config file + ConfigFileName = "config.json" + configFileDir = ".docker" + oldConfigfile = ".dockercfg" // Deprecated: remove once we stop printing deprecation warning + contextsDir = "contexts" +) + +var ( + initConfigDir = new(sync.Once) + configDir string + homeDir string +) + +// resetHomeDir is used in testing to reset the "homeDir" package variable to +// force re-lookup of the home directory between tests. +func resetHomeDir() { + homeDir = "" +} + +func getHomeDir() string { + if homeDir == "" { + homeDir = homedir.Get() + } + return homeDir +} + +// resetConfigDir is used in testing to reset the "configDir" package variable +// and its sync.Once to force re-lookup between tests. +func resetConfigDir() { + configDir = "" + initConfigDir = new(sync.Once) +} + +func setConfigDir() { + if configDir != "" { + return + } + configDir = os.Getenv("DOCKER_CONFIG") + if configDir == "" { + configDir = filepath.Join(getHomeDir(), configFileDir) + } +} + +// Dir returns the directory the configuration file is stored in +func Dir() string { + initConfigDir.Do(setConfigDir) + return configDir +} + +// ContextStoreDir returns the directory the docker contexts are stored in +func ContextStoreDir() string { + return filepath.Join(Dir(), contextsDir) +} + +// SetDir sets the directory the configuration file is stored in +func SetDir(dir string) { + configDir = filepath.Clean(dir) +} + +// Path returns the path to a file relative to the config dir +func Path(p ...string) (string, error) { + path := filepath.Join(append([]string{Dir()}, p...)...) + if !strings.HasPrefix(path, Dir()+string(filepath.Separator)) { + return "", errors.Errorf("path %q is outside of root config directory %q", path, Dir()) + } + return path, nil +} + +// LoadFromReader is a convenience function that creates a ConfigFile object from +// a reader +func LoadFromReader(configData io.Reader) (*configfile.ConfigFile, error) { + configFile := configfile.ConfigFile{ + AuthConfigs: make(map[string]types.AuthConfig), + } + err := configFile.LoadFromReader(configData) + return &configFile, err +} + +// Load reads the configuration files in the given directory, and sets up +// the auth config information and returns values. +// FIXME: use the internal golang config parser +func Load(configDir string) (*configfile.ConfigFile, error) { + cfg, _, err := load(configDir) + return cfg, err +} + +// TODO remove this temporary hack, which is used to warn about the deprecated ~/.dockercfg file +// so we can remove the bool return value and collapse this back into `Load` +func load(configDir string) (*configfile.ConfigFile, bool, error) { + printLegacyFileWarning := false + + if configDir == "" { + configDir = Dir() + } + + filename := filepath.Join(configDir, ConfigFileName) + configFile := configfile.New(filename) + + // Try happy path first - latest config file + if file, err := os.Open(filename); err == nil { + defer file.Close() + err = configFile.LoadFromReader(file) + if err != nil { + err = errors.Wrap(err, filename) + } + return configFile, printLegacyFileWarning, err + } else if !os.IsNotExist(err) { + // if file is there but we can't stat it for any reason other + // than it doesn't exist then stop + return configFile, printLegacyFileWarning, errors.Wrap(err, filename) + } + + // Can't find latest config file so check for the old one + filename = filepath.Join(getHomeDir(), oldConfigfile) + if _, err := os.Stat(filename); err == nil { + printLegacyFileWarning = true + } + return configFile, printLegacyFileWarning, nil +} + +// LoadDefaultConfigFile attempts to load the default config file and returns +// an initialized ConfigFile struct if none is found. +func LoadDefaultConfigFile(stderr io.Writer) *configfile.ConfigFile { + configFile, printLegacyFileWarning, err := load(Dir()) + if err != nil { + fmt.Fprintf(stderr, "WARNING: Error loading config file: %v\n", err) + } + if printLegacyFileWarning { + _, _ = fmt.Fprintln(stderr, "WARNING: Support for the legacy ~/.dockercfg configuration file and file-format has been removed and the configuration file will be ignored") + } + if !configFile.ContainsAuth() { + configFile.CredentialsStore = credentials.DetectDefaultStore(configFile.CredentialsStore) + } + return configFile +} diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file.go b/vendor/github.com/docker/cli/cli/config/configfile/file.go new file mode 100644 index 000000000..796b0a0ae --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/configfile/file.go @@ -0,0 +1,350 @@ +package configfile + +import ( + "encoding/base64" + "encoding/json" + "io" + "os" + "path/filepath" + "strings" + + "github.com/docker/cli/cli/config/credentials" + "github.com/docker/cli/cli/config/types" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +// ConfigFile ~/.docker/config.json file info +type ConfigFile struct { + AuthConfigs map[string]types.AuthConfig `json:"auths"` + HTTPHeaders map[string]string `json:"HttpHeaders,omitempty"` + PsFormat string `json:"psFormat,omitempty"` + ImagesFormat string `json:"imagesFormat,omitempty"` + NetworksFormat string `json:"networksFormat,omitempty"` + PluginsFormat string `json:"pluginsFormat,omitempty"` + VolumesFormat string `json:"volumesFormat,omitempty"` + StatsFormat string `json:"statsFormat,omitempty"` + DetachKeys string `json:"detachKeys,omitempty"` + CredentialsStore string `json:"credsStore,omitempty"` + CredentialHelpers map[string]string `json:"credHelpers,omitempty"` + Filename string `json:"-"` // Note: for internal use only + ServiceInspectFormat string `json:"serviceInspectFormat,omitempty"` + ServicesFormat string `json:"servicesFormat,omitempty"` + TasksFormat string `json:"tasksFormat,omitempty"` + SecretFormat string `json:"secretFormat,omitempty"` + ConfigFormat string `json:"configFormat,omitempty"` + NodesFormat string `json:"nodesFormat,omitempty"` + PruneFilters []string `json:"pruneFilters,omitempty"` + Proxies map[string]ProxyConfig `json:"proxies,omitempty"` + Experimental string `json:"experimental,omitempty"` + StackOrchestrator string `json:"stackOrchestrator,omitempty"` // Deprecated: swarm is now the default orchestrator, and this option is ignored. + CurrentContext string `json:"currentContext,omitempty"` + CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"` + Plugins map[string]map[string]string `json:"plugins,omitempty"` + Aliases map[string]string `json:"aliases,omitempty"` +} + +// ProxyConfig contains proxy configuration settings +type ProxyConfig struct { + HTTPProxy string `json:"httpProxy,omitempty"` + HTTPSProxy string `json:"httpsProxy,omitempty"` + NoProxy string `json:"noProxy,omitempty"` + FTPProxy string `json:"ftpProxy,omitempty"` + AllProxy string `json:"allProxy,omitempty"` +} + +// New initializes an empty configuration file for the given filename 'fn' +func New(fn string) *ConfigFile { + return &ConfigFile{ + AuthConfigs: make(map[string]types.AuthConfig), + HTTPHeaders: make(map[string]string), + Filename: fn, + Plugins: make(map[string]map[string]string), + Aliases: make(map[string]string), + } +} + +// LoadFromReader reads the configuration data given and sets up the auth config +// information with given directory and populates the receiver object +func (configFile *ConfigFile) LoadFromReader(configData io.Reader) error { + if err := json.NewDecoder(configData).Decode(configFile); err != nil && !errors.Is(err, io.EOF) { + return err + } + var err error + for addr, ac := range configFile.AuthConfigs { + if ac.Auth != "" { + ac.Username, ac.Password, err = decodeAuth(ac.Auth) + if err != nil { + return err + } + } + ac.Auth = "" + ac.ServerAddress = addr + configFile.AuthConfigs[addr] = ac + } + return nil +} + +// ContainsAuth returns whether there is authentication configured +// in this file or not. +func (configFile *ConfigFile) ContainsAuth() bool { + return configFile.CredentialsStore != "" || + len(configFile.CredentialHelpers) > 0 || + len(configFile.AuthConfigs) > 0 +} + +// GetAuthConfigs returns the mapping of repo to auth configuration +func (configFile *ConfigFile) GetAuthConfigs() map[string]types.AuthConfig { + return configFile.AuthConfigs +} + +// SaveToWriter encodes and writes out all the authorization information to +// the given writer +func (configFile *ConfigFile) SaveToWriter(writer io.Writer) error { + // Encode sensitive data into a new/temp struct + tmpAuthConfigs := make(map[string]types.AuthConfig, len(configFile.AuthConfigs)) + for k, authConfig := range configFile.AuthConfigs { + authCopy := authConfig + // encode and save the authstring, while blanking out the original fields + authCopy.Auth = encodeAuth(&authCopy) + authCopy.Username = "" + authCopy.Password = "" + authCopy.ServerAddress = "" + tmpAuthConfigs[k] = authCopy + } + + saveAuthConfigs := configFile.AuthConfigs + configFile.AuthConfigs = tmpAuthConfigs + defer func() { configFile.AuthConfigs = saveAuthConfigs }() + + // User-Agent header is automatically set, and should not be stored in the configuration + for v := range configFile.HTTPHeaders { + if strings.EqualFold(v, "User-Agent") { + delete(configFile.HTTPHeaders, v) + } + } + + data, err := json.MarshalIndent(configFile, "", "\t") + if err != nil { + return err + } + _, err = writer.Write(data) + return err +} + +// Save encodes and writes out all the authorization information +func (configFile *ConfigFile) Save() (retErr error) { + if configFile.Filename == "" { + return errors.Errorf("Can't save config with empty filename") + } + + dir := filepath.Dir(configFile.Filename) + if err := os.MkdirAll(dir, 0o700); err != nil { + return err + } + temp, err := os.CreateTemp(dir, filepath.Base(configFile.Filename)) + if err != nil { + return err + } + defer func() { + temp.Close() + if retErr != nil { + if err := os.Remove(temp.Name()); err != nil { + logrus.WithError(err).WithField("file", temp.Name()).Debug("Error cleaning up temp file") + } + } + }() + + err = configFile.SaveToWriter(temp) + if err != nil { + return err + } + + if err := temp.Close(); err != nil { + return errors.Wrap(err, "error closing temp file") + } + + // Handle situation where the configfile is a symlink + cfgFile := configFile.Filename + if f, err := os.Readlink(cfgFile); err == nil { + cfgFile = f + } + + // Try copying the current config file (if any) ownership and permissions + copyFilePermissions(cfgFile, temp.Name()) + return os.Rename(temp.Name(), cfgFile) +} + +// ParseProxyConfig computes proxy configuration by retrieving the config for the provided host and +// then checking this against any environment variables provided to the container +func (configFile *ConfigFile) ParseProxyConfig(host string, runOpts map[string]*string) map[string]*string { + var cfgKey string + + if _, ok := configFile.Proxies[host]; !ok { + cfgKey = "default" + } else { + cfgKey = host + } + + config := configFile.Proxies[cfgKey] + permitted := map[string]*string{ + "HTTP_PROXY": &config.HTTPProxy, + "HTTPS_PROXY": &config.HTTPSProxy, + "NO_PROXY": &config.NoProxy, + "FTP_PROXY": &config.FTPProxy, + "ALL_PROXY": &config.AllProxy, + } + m := runOpts + if m == nil { + m = make(map[string]*string) + } + for k := range permitted { + if *permitted[k] == "" { + continue + } + if _, ok := m[k]; !ok { + m[k] = permitted[k] + } + if _, ok := m[strings.ToLower(k)]; !ok { + m[strings.ToLower(k)] = permitted[k] + } + } + return m +} + +// encodeAuth creates a base64 encoded string to containing authorization information +func encodeAuth(authConfig *types.AuthConfig) string { + if authConfig.Username == "" && authConfig.Password == "" { + return "" + } + + authStr := authConfig.Username + ":" + authConfig.Password + msg := []byte(authStr) + encoded := make([]byte, base64.StdEncoding.EncodedLen(len(msg))) + base64.StdEncoding.Encode(encoded, msg) + return string(encoded) +} + +// decodeAuth decodes a base64 encoded string and returns username and password +func decodeAuth(authStr string) (string, string, error) { + if authStr == "" { + return "", "", nil + } + + decLen := base64.StdEncoding.DecodedLen(len(authStr)) + decoded := make([]byte, decLen) + authByte := []byte(authStr) + n, err := base64.StdEncoding.Decode(decoded, authByte) + if err != nil { + return "", "", err + } + if n > decLen { + return "", "", errors.Errorf("Something went wrong decoding auth config") + } + arr := strings.SplitN(string(decoded), ":", 2) + if len(arr) != 2 { + return "", "", errors.Errorf("Invalid auth configuration file") + } + password := strings.Trim(arr[1], "\x00") + return arr[0], password, nil +} + +// GetCredentialsStore returns a new credentials store from the settings in the +// configuration file +func (configFile *ConfigFile) GetCredentialsStore(registryHostname string) credentials.Store { + if helper := getConfiguredCredentialStore(configFile, registryHostname); helper != "" { + return newNativeStore(configFile, helper) + } + return credentials.NewFileStore(configFile) +} + +// var for unit testing. +var newNativeStore = func(configFile *ConfigFile, helperSuffix string) credentials.Store { + return credentials.NewNativeStore(configFile, helperSuffix) +} + +// GetAuthConfig for a repository from the credential store +func (configFile *ConfigFile) GetAuthConfig(registryHostname string) (types.AuthConfig, error) { + return configFile.GetCredentialsStore(registryHostname).Get(registryHostname) +} + +// getConfiguredCredentialStore returns the credential helper configured for the +// given registry, the default credsStore, or the empty string if neither are +// configured. +func getConfiguredCredentialStore(c *ConfigFile, registryHostname string) string { + if c.CredentialHelpers != nil && registryHostname != "" { + if helper, exists := c.CredentialHelpers[registryHostname]; exists { + return helper + } + } + return c.CredentialsStore +} + +// GetAllCredentials returns all of the credentials stored in all of the +// configured credential stores. +func (configFile *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig, error) { + auths := make(map[string]types.AuthConfig) + addAll := func(from map[string]types.AuthConfig) { + for reg, ac := range from { + auths[reg] = ac + } + } + + defaultStore := configFile.GetCredentialsStore("") + newAuths, err := defaultStore.GetAll() + if err != nil { + return nil, err + } + addAll(newAuths) + + // Auth configs from a registry-specific helper should override those from the default store. + for registryHostname := range configFile.CredentialHelpers { + newAuth, err := configFile.GetAuthConfig(registryHostname) + if err != nil { + return nil, err + } + auths[registryHostname] = newAuth + } + return auths, nil +} + +// GetFilename returns the file name that this config file is based on. +func (configFile *ConfigFile) GetFilename() string { + return configFile.Filename +} + +// PluginConfig retrieves the requested option for the given plugin. +func (configFile *ConfigFile) PluginConfig(pluginname, option string) (string, bool) { + if configFile.Plugins == nil { + return "", false + } + pluginConfig, ok := configFile.Plugins[pluginname] + if !ok { + return "", false + } + value, ok := pluginConfig[option] + return value, ok +} + +// SetPluginConfig sets the option to the given value for the given +// plugin. Passing a value of "" will remove the option. If removing +// the final config item for a given plugin then also cleans up the +// overall plugin entry. +func (configFile *ConfigFile) SetPluginConfig(pluginname, option, value string) { + if configFile.Plugins == nil { + configFile.Plugins = make(map[string]map[string]string) + } + pluginConfig, ok := configFile.Plugins[pluginname] + if !ok { + pluginConfig = make(map[string]string) + configFile.Plugins[pluginname] = pluginConfig + } + if value != "" { + pluginConfig[option] = value + } else { + delete(pluginConfig, option) + } + if len(pluginConfig) == 0 { + delete(configFile.Plugins, pluginname) + } +} diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file_unix.go b/vendor/github.com/docker/cli/cli/config/configfile/file_unix.go new file mode 100644 index 000000000..353887547 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/configfile/file_unix.go @@ -0,0 +1,36 @@ +//go:build !windows +// +build !windows + +package configfile + +import ( + "os" + "syscall" +) + +// copyFilePermissions copies file ownership and permissions from "src" to "dst", +// ignoring any error during the process. +func copyFilePermissions(src, dst string) { + var ( + mode os.FileMode = 0o600 + uid, gid int + ) + + fi, err := os.Stat(src) + if err != nil { + return + } + if fi.Mode().IsRegular() { + mode = fi.Mode() + } + if err := os.Chmod(dst, mode); err != nil { + return + } + + uid = int(fi.Sys().(*syscall.Stat_t).Uid) + gid = int(fi.Sys().(*syscall.Stat_t).Gid) + + if uid > 0 && gid > 0 { + _ = os.Chown(dst, uid, gid) + } +} diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file_windows.go b/vendor/github.com/docker/cli/cli/config/configfile/file_windows.go new file mode 100644 index 000000000..42fffc39a --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/configfile/file_windows.go @@ -0,0 +1,5 @@ +package configfile + +func copyFilePermissions(src, dst string) { + // TODO implement for Windows +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/credentials.go b/vendor/github.com/docker/cli/cli/config/credentials/credentials.go new file mode 100644 index 000000000..28d58ec48 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/credentials.go @@ -0,0 +1,17 @@ +package credentials + +import ( + "github.com/docker/cli/cli/config/types" +) + +// Store is the interface that any credentials store must implement. +type Store interface { + // Erase removes credentials from the store for a given server. + Erase(serverAddress string) error + // Get retrieves credentials from the store for a given server. + Get(serverAddress string) (types.AuthConfig, error) + // GetAll retrieves all the credentials from the store. + GetAll() (map[string]types.AuthConfig, error) + // Store saves credentials in the store. + Store(authConfig types.AuthConfig) error +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store.go new file mode 100644 index 000000000..402235bff --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store.go @@ -0,0 +1,21 @@ +package credentials + +import ( + exec "golang.org/x/sys/execabs" +) + +// DetectDefaultStore return the default credentials store for the platform if +// the store executable is available. +func DetectDefaultStore(store string) string { + platformDefault := defaultCredentialsStore() + + // user defined or no default for platform + if store != "" || platformDefault == "" { + return store + } + + if _, err := exec.LookPath(remoteCredentialsPrefix + platformDefault); err == nil { + return platformDefault + } + return "" +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go new file mode 100644 index 000000000..5d42dec62 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go @@ -0,0 +1,5 @@ +package credentials + +func defaultCredentialsStore() string { + return "osxkeychain" +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go new file mode 100644 index 000000000..a9012c6d4 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go @@ -0,0 +1,13 @@ +package credentials + +import ( + "os/exec" +) + +func defaultCredentialsStore() string { + if _, err := exec.LookPath("pass"); err == nil { + return "pass" + } + + return "secretservice" +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go new file mode 100644 index 000000000..c9630ea51 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go @@ -0,0 +1,8 @@ +//go:build !windows && !darwin && !linux +// +build !windows,!darwin,!linux + +package credentials + +func defaultCredentialsStore() string { + return "" +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go new file mode 100644 index 000000000..bb799ca61 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go @@ -0,0 +1,5 @@ +package credentials + +func defaultCredentialsStore() string { + return "wincred" +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/file_store.go b/vendor/github.com/docker/cli/cli/config/credentials/file_store.go new file mode 100644 index 000000000..e509820b7 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/file_store.go @@ -0,0 +1,81 @@ +package credentials + +import ( + "strings" + + "github.com/docker/cli/cli/config/types" +) + +type store interface { + Save() error + GetAuthConfigs() map[string]types.AuthConfig + GetFilename() string +} + +// fileStore implements a credentials store using +// the docker configuration file to keep the credentials in plain text. +type fileStore struct { + file store +} + +// NewFileStore creates a new file credentials store. +func NewFileStore(file store) Store { + return &fileStore{file: file} +} + +// Erase removes the given credentials from the file store. +func (c *fileStore) Erase(serverAddress string) error { + delete(c.file.GetAuthConfigs(), serverAddress) + return c.file.Save() +} + +// Get retrieves credentials for a specific server from the file store. +func (c *fileStore) Get(serverAddress string) (types.AuthConfig, error) { + authConfig, ok := c.file.GetAuthConfigs()[serverAddress] + if !ok { + // Maybe they have a legacy config file, we will iterate the keys converting + // them to the new format and testing + for r, ac := range c.file.GetAuthConfigs() { + if serverAddress == ConvertToHostname(r) { + return ac, nil + } + } + + authConfig = types.AuthConfig{} + } + return authConfig, nil +} + +func (c *fileStore) GetAll() (map[string]types.AuthConfig, error) { + return c.file.GetAuthConfigs(), nil +} + +// Store saves the given credentials in the file store. +func (c *fileStore) Store(authConfig types.AuthConfig) error { + c.file.GetAuthConfigs()[authConfig.ServerAddress] = authConfig + return c.file.Save() +} + +func (c *fileStore) GetFilename() string { + return c.file.GetFilename() +} + +func (c *fileStore) IsFileStore() bool { + return true +} + +// ConvertToHostname converts a registry url which has http|https prepended +// to just an hostname. +// Copied from github.com/docker/docker/registry.ConvertToHostname to reduce dependencies. +func ConvertToHostname(url string) string { + stripped := url + if strings.HasPrefix(url, "http://") { + stripped = strings.TrimPrefix(url, "http://") + } else if strings.HasPrefix(url, "https://") { + stripped = strings.TrimPrefix(url, "https://") + } + + nameParts := strings.SplitN(stripped, "/", 2) + + return nameParts[0] +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/native_store.go b/vendor/github.com/docker/cli/cli/config/credentials/native_store.go new file mode 100644 index 000000000..f9619b038 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/native_store.go @@ -0,0 +1,143 @@ +package credentials + +import ( + "github.com/docker/cli/cli/config/types" + "github.com/docker/docker-credential-helpers/client" + "github.com/docker/docker-credential-helpers/credentials" +) + +const ( + remoteCredentialsPrefix = "docker-credential-" //nolint:gosec // ignore G101: Potential hardcoded credentials + tokenUsername = "" +) + +// nativeStore implements a credentials store +// using native keychain to keep credentials secure. +// It piggybacks into a file store to keep users' emails. +type nativeStore struct { + programFunc client.ProgramFunc + fileStore Store +} + +// NewNativeStore creates a new native store that +// uses a remote helper program to manage credentials. +func NewNativeStore(file store, helperSuffix string) Store { + name := remoteCredentialsPrefix + helperSuffix + return &nativeStore{ + programFunc: client.NewShellProgramFunc(name), + fileStore: NewFileStore(file), + } +} + +// Erase removes the given credentials from the native store. +func (c *nativeStore) Erase(serverAddress string) error { + if err := client.Erase(c.programFunc, serverAddress); err != nil { + return err + } + + // Fallback to plain text store to remove email + return c.fileStore.Erase(serverAddress) +} + +// Get retrieves credentials for a specific server from the native store. +func (c *nativeStore) Get(serverAddress string) (types.AuthConfig, error) { + // load user email if it exist or an empty auth config. + auth, _ := c.fileStore.Get(serverAddress) + + creds, err := c.getCredentialsFromStore(serverAddress) + if err != nil { + return auth, err + } + auth.Username = creds.Username + auth.IdentityToken = creds.IdentityToken + auth.Password = creds.Password + + return auth, nil +} + +// GetAll retrieves all the credentials from the native store. +func (c *nativeStore) GetAll() (map[string]types.AuthConfig, error) { + auths, err := c.listCredentialsInStore() + if err != nil { + return nil, err + } + + // Emails are only stored in the file store. + // This call can be safely eliminated when emails are removed. + fileConfigs, _ := c.fileStore.GetAll() + + authConfigs := make(map[string]types.AuthConfig) + for registry := range auths { + creds, err := c.getCredentialsFromStore(registry) + if err != nil { + return nil, err + } + ac := fileConfigs[registry] // might contain Email + ac.Username = creds.Username + ac.Password = creds.Password + ac.IdentityToken = creds.IdentityToken + authConfigs[registry] = ac + } + + return authConfigs, nil +} + +// Store saves the given credentials in the file store. +func (c *nativeStore) Store(authConfig types.AuthConfig) error { + if err := c.storeCredentialsInStore(authConfig); err != nil { + return err + } + authConfig.Username = "" + authConfig.Password = "" + authConfig.IdentityToken = "" + + // Fallback to old credential in plain text to save only the email + return c.fileStore.Store(authConfig) +} + +// storeCredentialsInStore executes the command to store the credentials in the native store. +func (c *nativeStore) storeCredentialsInStore(config types.AuthConfig) error { + creds := &credentials.Credentials{ + ServerURL: config.ServerAddress, + Username: config.Username, + Secret: config.Password, + } + + if config.IdentityToken != "" { + creds.Username = tokenUsername + creds.Secret = config.IdentityToken + } + + return client.Store(c.programFunc, creds) +} + +// getCredentialsFromStore executes the command to get the credentials from the native store. +func (c *nativeStore) getCredentialsFromStore(serverAddress string) (types.AuthConfig, error) { + var ret types.AuthConfig + + creds, err := client.Get(c.programFunc, serverAddress) + if err != nil { + if credentials.IsErrCredentialsNotFound(err) { + // do not return an error if the credentials are not + // in the keychain. Let docker ask for new credentials. + return ret, nil + } + return ret, err + } + + if creds.Username == tokenUsername { + ret.IdentityToken = creds.Secret + } else { + ret.Password = creds.Secret + ret.Username = creds.Username + } + + ret.ServerAddress = serverAddress + return ret, nil +} + +// listCredentialsInStore returns a listing of stored credentials as a map of +// URL -> username. +func (c *nativeStore) listCredentialsInStore() (map[string]string, error) { + return client.List(c.programFunc) +} diff --git a/vendor/github.com/docker/cli/cli/config/types/authconfig.go b/vendor/github.com/docker/cli/cli/config/types/authconfig.go new file mode 100644 index 000000000..056af6b84 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/types/authconfig.go @@ -0,0 +1,22 @@ +package types + +// AuthConfig contains authorization information for connecting to a Registry +type AuthConfig struct { + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` + Auth string `json:"auth,omitempty"` + + // Email is an optional value associated with the username. + // This field is deprecated and will be removed in a later + // version of docker. + Email string `json:"email,omitempty"` + + ServerAddress string `json:"serveraddress,omitempty"` + + // IdentityToken is used to authenticate the user and get + // an access token for the registry. + IdentityToken string `json:"identitytoken,omitempty"` + + // RegistryToken is a bearer token to be sent to a registry + RegistryToken string `json:"registrytoken,omitempty"` +} diff --git a/vendor/github.com/docker/docker-credential-helpers/LICENSE b/vendor/github.com/docker/docker-credential-helpers/LICENSE new file mode 100644 index 000000000..1ea555e2a --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2016 David Calavera + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/docker/docker-credential-helpers/client/client.go b/vendor/github.com/docker/docker-credential-helpers/client/client.go new file mode 100644 index 000000000..d1d0434cb --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/client/client.go @@ -0,0 +1,121 @@ +package client + +import ( + "bytes" + "encoding/json" + "fmt" + "strings" + + "github.com/docker/docker-credential-helpers/credentials" +) + +// isValidCredsMessage checks if 'msg' contains invalid credentials error message. +// It returns whether the logs are free of invalid credentials errors and the error if it isn't. +// error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername. +func isValidCredsMessage(msg string) error { + if credentials.IsCredentialsMissingServerURLMessage(msg) { + return credentials.NewErrCredentialsMissingServerURL() + } + + if credentials.IsCredentialsMissingUsernameMessage(msg) { + return credentials.NewErrCredentialsMissingUsername() + } + + return nil +} + +// Store uses an external program to save credentials. +func Store(program ProgramFunc, creds *credentials.Credentials) error { + cmd := program("store") + + buffer := new(bytes.Buffer) + if err := json.NewEncoder(buffer).Encode(creds); err != nil { + return err + } + cmd.Input(buffer) + + out, err := cmd.Output() + if err != nil { + t := strings.TrimSpace(string(out)) + + if isValidErr := isValidCredsMessage(t); isValidErr != nil { + err = isValidErr + } + + return fmt.Errorf("error storing credentials - err: %v, out: `%s`", err, t) + } + + return nil +} + +// Get executes an external program to get the credentials from a native store. +func Get(program ProgramFunc, serverURL string) (*credentials.Credentials, error) { + cmd := program("get") + cmd.Input(strings.NewReader(serverURL)) + + out, err := cmd.Output() + if err != nil { + t := strings.TrimSpace(string(out)) + + if credentials.IsErrCredentialsNotFoundMessage(t) { + return nil, credentials.NewErrCredentialsNotFound() + } + + if isValidErr := isValidCredsMessage(t); isValidErr != nil { + err = isValidErr + } + + return nil, fmt.Errorf("error getting credentials - err: %v, out: `%s`", err, t) + } + + resp := &credentials.Credentials{ + ServerURL: serverURL, + } + + if err := json.NewDecoder(bytes.NewReader(out)).Decode(resp); err != nil { + return nil, err + } + + return resp, nil +} + +// Erase executes a program to remove the server credentials from the native store. +func Erase(program ProgramFunc, serverURL string) error { + cmd := program("erase") + cmd.Input(strings.NewReader(serverURL)) + out, err := cmd.Output() + if err != nil { + t := strings.TrimSpace(string(out)) + + if isValidErr := isValidCredsMessage(t); isValidErr != nil { + err = isValidErr + } + + return fmt.Errorf("error erasing credentials - err: %v, out: `%s`", err, t) + } + + return nil +} + +// List executes a program to list server credentials in the native store. +func List(program ProgramFunc) (map[string]string, error) { + cmd := program("list") + cmd.Input(strings.NewReader("unused")) + out, err := cmd.Output() + if err != nil { + t := strings.TrimSpace(string(out)) + + if isValidErr := isValidCredsMessage(t); isValidErr != nil { + err = isValidErr + } + + return nil, fmt.Errorf("error listing credentials - err: %v, out: `%s`", err, t) + } + + var resp map[string]string + if err = json.NewDecoder(bytes.NewReader(out)).Decode(&resp); err != nil { + return nil, err + } + + return resp, nil +} diff --git a/vendor/github.com/docker/docker-credential-helpers/client/command.go b/vendor/github.com/docker/docker-credential-helpers/client/command.go new file mode 100644 index 000000000..0183c0639 --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/client/command.go @@ -0,0 +1,57 @@ +package client + +import ( + "fmt" + "io" + "os" + + exec "golang.org/x/sys/execabs" +) + +// Program is an interface to execute external programs. +type Program interface { + Output() ([]byte, error) + Input(in io.Reader) +} + +// ProgramFunc is a type of function that initializes programs based on arguments. +type ProgramFunc func(args ...string) Program + +// NewShellProgramFunc creates programs that are executed in a Shell. +func NewShellProgramFunc(name string) ProgramFunc { + return NewShellProgramFuncWithEnv(name, nil) +} + +// NewShellProgramFuncWithEnv creates programs that are executed in a Shell with environment variables +func NewShellProgramFuncWithEnv(name string, env *map[string]string) ProgramFunc { + return func(args ...string) Program { + return &Shell{cmd: createProgramCmdRedirectErr(name, args, env)} + } +} + +func createProgramCmdRedirectErr(commandName string, args []string, env *map[string]string) *exec.Cmd { + programCmd := exec.Command(commandName, args...) + programCmd.Env = os.Environ() + if env != nil { + for k, v := range *env { + programCmd.Env = append(programCmd.Env, fmt.Sprintf("%s=%s", k, v)) + } + } + programCmd.Stderr = os.Stderr + return programCmd +} + +// Shell invokes shell commands to talk with a remote credentials helper. +type Shell struct { + cmd *exec.Cmd +} + +// Output returns responses from the remote credentials helper. +func (s *Shell) Output() ([]byte, error) { + return s.cmd.Output() +} + +// Input sets the input to send to a remote credentials helper. +func (s *Shell) Input(in io.Reader) { + s.cmd.Stdin = in +} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go b/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go new file mode 100644 index 000000000..91d9d4bba --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go @@ -0,0 +1,186 @@ +package credentials + +import ( + "bufio" + "bytes" + "encoding/json" + "fmt" + "io" + "os" + "strings" +) + +// Credentials holds the information shared between docker and the credentials store. +type Credentials struct { + ServerURL string + Username string + Secret string +} + +// isValid checks the integrity of Credentials object such that no credentials lack +// a server URL or a username. +// It returns whether the credentials are valid and the error if it isn't. +// error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername +func (c *Credentials) isValid() (bool, error) { + if len(c.ServerURL) == 0 { + return false, NewErrCredentialsMissingServerURL() + } + + if len(c.Username) == 0 { + return false, NewErrCredentialsMissingUsername() + } + + return true, nil +} + +// CredsLabel holds the way Docker credentials should be labeled as such in credentials stores that allow labelling. +// That label allows to filter out non-Docker credentials too at lookup/search in macOS keychain, +// Windows credentials manager and Linux libsecret. Default value is "Docker Credentials" +var CredsLabel = "Docker Credentials" + +// SetCredsLabel is a simple setter for CredsLabel +func SetCredsLabel(label string) { + CredsLabel = label +} + +// Serve initializes the credentials helper and parses the action argument. +// This function is designed to be called from a command line interface. +// It uses os.Args[1] as the key for the action. +// It uses os.Stdin as input and os.Stdout as output. +// This function terminates the program with os.Exit(1) if there is an error. +func Serve(helper Helper) { + var err error + if len(os.Args) != 2 { + err = fmt.Errorf("Usage: %s ", os.Args[0]) + } + + if err == nil { + err = HandleCommand(helper, os.Args[1], os.Stdin, os.Stdout) + } + + if err != nil { + fmt.Fprintf(os.Stdout, "%v\n", err) + os.Exit(1) + } +} + +// HandleCommand uses a helper and a key to run a credential action. +func HandleCommand(helper Helper, key string, in io.Reader, out io.Writer) error { + switch key { + case "store": + return Store(helper, in) + case "get": + return Get(helper, in, out) + case "erase": + return Erase(helper, in) + case "list": + return List(helper, out) + case "version": + return PrintVersion(out) + } + return fmt.Errorf("Unknown credential action `%s`", key) +} + +// Store uses a helper and an input reader to save credentials. +// The reader must contain the JSON serialization of a Credentials struct. +func Store(helper Helper, reader io.Reader) error { + scanner := bufio.NewScanner(reader) + + buffer := new(bytes.Buffer) + for scanner.Scan() { + buffer.Write(scanner.Bytes()) + } + + if err := scanner.Err(); err != nil && err != io.EOF { + return err + } + + var creds Credentials + if err := json.NewDecoder(buffer).Decode(&creds); err != nil { + return err + } + + if ok, err := creds.isValid(); !ok { + return err + } + + return helper.Add(&creds) +} + +// Get retrieves the credentials for a given server url. +// The reader must contain the server URL to search. +// The writer is used to write the JSON serialization of the credentials. +func Get(helper Helper, reader io.Reader, writer io.Writer) error { + scanner := bufio.NewScanner(reader) + + buffer := new(bytes.Buffer) + for scanner.Scan() { + buffer.Write(scanner.Bytes()) + } + + if err := scanner.Err(); err != nil && err != io.EOF { + return err + } + + serverURL := strings.TrimSpace(buffer.String()) + if len(serverURL) == 0 { + return NewErrCredentialsMissingServerURL() + } + + username, secret, err := helper.Get(serverURL) + if err != nil { + return err + } + + resp := Credentials{ + ServerURL: serverURL, + Username: username, + Secret: secret, + } + + buffer.Reset() + if err := json.NewEncoder(buffer).Encode(resp); err != nil { + return err + } + + fmt.Fprint(writer, buffer.String()) + return nil +} + +// Erase removes credentials from the store. +// The reader must contain the server URL to remove. +func Erase(helper Helper, reader io.Reader) error { + scanner := bufio.NewScanner(reader) + + buffer := new(bytes.Buffer) + for scanner.Scan() { + buffer.Write(scanner.Bytes()) + } + + if err := scanner.Err(); err != nil && err != io.EOF { + return err + } + + serverURL := strings.TrimSpace(buffer.String()) + if len(serverURL) == 0 { + return NewErrCredentialsMissingServerURL() + } + + return helper.Delete(serverURL) +} + +// List returns all the serverURLs of keys in +// the OS store as a list of strings +func List(helper Helper, writer io.Writer) error { + accts, err := helper.List() + if err != nil { + return err + } + return json.NewEncoder(writer).Encode(accts) +} + +// PrintVersion outputs the current version. +func PrintVersion(writer io.Writer) error { + fmt.Fprintf(writer, "%s (%s) %s\n", Name, Package, Version) + return nil +} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/error.go b/vendor/github.com/docker/docker-credential-helpers/credentials/error.go new file mode 100644 index 000000000..fe6a5aef4 --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/credentials/error.go @@ -0,0 +1,102 @@ +package credentials + +const ( + // ErrCredentialsNotFound standardizes the not found error, so every helper returns + // the same message and docker can handle it properly. + errCredentialsNotFoundMessage = "credentials not found in native keychain" + + // ErrCredentialsMissingServerURL and ErrCredentialsMissingUsername standardize + // invalid credentials or credentials management operations + errCredentialsMissingServerURLMessage = "no credentials server URL" + errCredentialsMissingUsernameMessage = "no credentials username" +) + +// errCredentialsNotFound represents an error +// raised when credentials are not in the store. +type errCredentialsNotFound struct{} + +// Error returns the standard error message +// for when the credentials are not in the store. +func (errCredentialsNotFound) Error() string { + return errCredentialsNotFoundMessage +} + +// NewErrCredentialsNotFound creates a new error +// for when the credentials are not in the store. +func NewErrCredentialsNotFound() error { + return errCredentialsNotFound{} +} + +// IsErrCredentialsNotFound returns true if the error +// was caused by not having a set of credentials in a store. +func IsErrCredentialsNotFound(err error) bool { + _, ok := err.(errCredentialsNotFound) + return ok +} + +// IsErrCredentialsNotFoundMessage returns true if the error +// was caused by not having a set of credentials in a store. +// +// This function helps to check messages returned by an +// external program via its standard output. +func IsErrCredentialsNotFoundMessage(err string) bool { + return err == errCredentialsNotFoundMessage +} + +// errCredentialsMissingServerURL represents an error raised +// when the credentials object has no server URL or when no +// server URL is provided to a credentials operation requiring +// one. +type errCredentialsMissingServerURL struct{} + +func (errCredentialsMissingServerURL) Error() string { + return errCredentialsMissingServerURLMessage +} + +// errCredentialsMissingUsername represents an error raised +// when the credentials object has no username or when no +// username is provided to a credentials operation requiring +// one. +type errCredentialsMissingUsername struct{} + +func (errCredentialsMissingUsername) Error() string { + return errCredentialsMissingUsernameMessage +} + +// NewErrCredentialsMissingServerURL creates a new error for +// errCredentialsMissingServerURL. +func NewErrCredentialsMissingServerURL() error { + return errCredentialsMissingServerURL{} +} + +// NewErrCredentialsMissingUsername creates a new error for +// errCredentialsMissingUsername. +func NewErrCredentialsMissingUsername() error { + return errCredentialsMissingUsername{} +} + +// IsCredentialsMissingServerURL returns true if the error +// was an errCredentialsMissingServerURL. +func IsCredentialsMissingServerURL(err error) bool { + _, ok := err.(errCredentialsMissingServerURL) + return ok +} + +// IsCredentialsMissingServerURLMessage checks for an +// errCredentialsMissingServerURL in the error message. +func IsCredentialsMissingServerURLMessage(err string) bool { + return err == errCredentialsMissingServerURLMessage +} + +// IsCredentialsMissingUsername returns true if the error +// was an errCredentialsMissingUsername. +func IsCredentialsMissingUsername(err error) bool { + _, ok := err.(errCredentialsMissingUsername) + return ok +} + +// IsCredentialsMissingUsernameMessage checks for an +// errCredentialsMissingUsername in the error message. +func IsCredentialsMissingUsernameMessage(err string) bool { + return err == errCredentialsMissingUsernameMessage +} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/helper.go b/vendor/github.com/docker/docker-credential-helpers/credentials/helper.go new file mode 100644 index 000000000..135acd254 --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/credentials/helper.go @@ -0,0 +1,14 @@ +package credentials + +// Helper is the interface a credentials store helper must implement. +type Helper interface { + // Add appends credentials to the store. + Add(*Credentials) error + // Delete removes credentials from the store. + Delete(serverURL string) error + // Get retrieves credentials from the store. + // It returns username and secret as strings. + Get(serverURL string) (string, string, error) + // List returns the stored serverURLs and their associated usernames. + List() (map[string]string, error) +} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/version.go b/vendor/github.com/docker/docker-credential-helpers/credentials/version.go new file mode 100644 index 000000000..84377c263 --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/credentials/version.go @@ -0,0 +1,16 @@ +package credentials + +var ( + // Name is filled at linking time + Name = "" + + // Package is filled at linking time + Package = "github.com/docker/docker-credential-helpers" + + // Version holds the complete version number. Filled in at linking time. + Version = "v0.0.0+unknown" + + // Revision is filled with the VCS (e.g. git) revision being used to build + // the program at linking time. + Revision = "" +) diff --git a/vendor/github.com/docker/docker/AUTHORS b/vendor/github.com/docker/docker/AUTHORS new file mode 100644 index 000000000..0728bfe18 --- /dev/null +++ b/vendor/github.com/docker/docker/AUTHORS @@ -0,0 +1,2372 @@ +# File @generated by hack/generate-authors.sh. DO NOT EDIT. +# This file lists all contributors to the repository. +# See hack/generate-authors.sh to make modifications. + +Aanand Prasad +Aaron Davidson +Aaron Feng +Aaron Hnatiw +Aaron Huslage +Aaron L. Xu +Aaron Lehmann +Aaron Welch +Abel Muiño +Abhijeet Kasurde +Abhinandan Prativadi +Abhinav Ajgaonkar +Abhishek Chanda +Abhishek Sharma +Abin Shahab +Abirdcfly +Ada Mancini +Adam Avilla +Adam Dobrawy +Adam Eijdenberg +Adam Kunk +Adam Miller +Adam Mills +Adam Pointer +Adam Singer +Adam Walz +Adam Williams +Addam Hardy +Aditi Rajagopal +Aditya +Adnan Khan +Adolfo Ochagavía +Adria Casas +Adrian Moisey +Adrian Mouat +Adrian Oprea +Adrien Folie +Adrien Gallouët +Ahmed Kamal +Ahmet Alp Balkan +Aidan Feldman +Aidan Hobson Sayers +AJ Bowen +Ajey Charantimath +ajneu +Akash Gupta +Akhil Mohan +Akihiro Matsushima +Akihiro Suda +Akim Demaille +Akira Koyasu +Akshay Karle +Akshay Moghe +Al Tobey +alambike +Alan Hoyle +Alan Scherger +Alan Thompson +Albert Callarisa +Albert Zhang +Albin Kerouanton +Alec Benson +Alejandro González Hevia +Aleksa Sarai +Aleksandr Chebotov +Aleksandrs Fadins +Alena Prokharchyk +Alessandro Boch +Alessio Biancalana +Alex Chan +Alex Chen +Alex Coventry +Alex Crawford +Alex Ellis +Alex Gaynor +Alex Goodman +Alex Nordlund +Alex Olshansky +Alex Samorukov +Alex Warhawk +Alexander Artemenko +Alexander Boyd +Alexander Larsson +Alexander Midlash +Alexander Morozov +Alexander Polakov +Alexander Shopov +Alexandre Beslic +Alexandre Garnier +Alexandre González +Alexandre Jomin +Alexandru Sfirlogea +Alexei Margasov +Alexey Guskov +Alexey Kotlyarov +Alexey Shamrin +Alexis Ries +Alexis Thomas +Alfred Landrum +Ali Dehghani +Alicia Lauerman +Alihan Demir +Allen Madsen +Allen Sun +almoehi +Alvaro Saurin +Alvin Deng +Alvin Richards +amangoel +Amen Belayneh +Ameya Gawde +Amir Goldstein +Amit Bakshi +Amit Krishnan +Amit Shukla +Amr Gawish +Amy Lindburg +Anand Patil +AnandkumarPatel +Anatoly Borodin +Anca Iordache +Anchal Agrawal +Anda Xu +Anders Janmyr +Andre Dublin <81dublin@gmail.com> +Andre Granovsky +Andrea Denisse Gómez +Andrea Luzzardi +Andrea Turli +Andreas Elvers +Andreas Köhler +Andreas Savvides +Andreas Tiefenthaler +Andrei Gherzan +Andrei Ushakov +Andrei Vagin +Andrew C. Bodine +Andrew Clay Shafer +Andrew Duckworth +Andrew France +Andrew Gerrand +Andrew Guenther +Andrew He +Andrew Hsu +Andrew Kim +Andrew Kuklewicz +Andrew Macgregor +Andrew Macpherson +Andrew Martin +Andrew McDonnell +Andrew Munsell +Andrew Pennebaker +Andrew Po +Andrew Weiss +Andrew Williams +Andrews Medina +Andrey Kolomentsev +Andrey Petrov +Andrey Stolbovsky +André Martins +Andy Chambers +andy diller +Andy Goldstein +Andy Kipp +Andy Lindeman +Andy Rothfusz +Andy Smith +Andy Wilson +Andy Zhang +Anes Hasicic +Angel Velazquez +Anil Belur +Anil Madhavapeddy +Ankit Jain +Ankush Agarwal +Anonmily +Anran Qiao +Anshul Pundir +Anthon van der Neut +Anthony Baire +Anthony Bishopric +Anthony Dahanne +Anthony Sottile +Anton Löfgren +Anton Nikitin +Anton Polonskiy +Anton Tiurin +Antonio Murdaca +Antonis Kalipetis +Antony Messerli +Anuj Bahuguna +Anuj Varma +Anusha Ragunathan +Anyu Wang +apocas +Arash Deshmeh +ArikaChen +Arko Dasgupta +Arnaud Lefebvre +Arnaud Porterie +Arnaud Rebillout +Artem Khramov +Arthur Barr +Arthur Gautier +Artur Meyster +Arun Gupta +Asad Saeeduddin +Asbjørn Enge +Austin Vazquez +averagehuman +Avi Das +Avi Kivity +Avi Miller +Avi Vaid +ayoshitake +Azat Khuyiyakhmetov +Bao Yonglei +Bardia Keyoumarsi +Barnaby Gray +Barry Allard +Bartłomiej Piotrowski +Bastiaan Bakker +Bastien Pascard +bdevloed +Bearice Ren +Ben Bonnefoy +Ben Firshman +Ben Golub +Ben Gould +Ben Hall +Ben Langfeld +Ben Sargent +Ben Severson +Ben Toews +Ben Wiklund +Benjamin Atkin +Benjamin Baker +Benjamin Boudreau +Benjamin Böhmke +Benjamin Yolken +Benny Ng +Benoit Chesneau +Bernerd Schaefer +Bernhard M. Wiedemann +Bert Goethals +Bertrand Roussel +Bevisy Zhang +Bharath Thiruveedula +Bhiraj Butala +Bhumika Bayani +Bilal Amarni +Bill Wang +Billy Ridgway +Bily Zhang +Bin Liu +Bingshen Wang +Bjorn Neergaard +Blake Geno +Boaz Shuster +bobby abbott +Bojun Zhu +Boqin Qin +Boris Pruessmann +Boshi Lian +Bouke Haarsma +Boyd Hemphill +boynux +Bradley Cicenas +Bradley Wright +Brandon Liu +Brandon Philips +Brandon Rhodes +Brendan Dixon +Brent Salisbury +Brett Higgins +Brett Kochendorfer +Brett Milford +Brett Randall +Brian (bex) Exelbierd +Brian Bland +Brian DeHamer +Brian Dorsey +Brian Flad +Brian Goff +Brian McCallister +Brian Olsen +Brian Schwind +Brian Shumate +Brian Torres-Gil +Brian Trump +Brice Jaglin +Briehan Lombaard +Brielle Broder +Bruno Bigras +Bruno Binet +Bruno Gazzera +Bruno Renié +Bruno Tavares +Bryan Bess +Bryan Boreham +Bryan Matsuo +Bryan Murphy +Burke Libbey +Byung Kang +Caleb Spare +Calen Pennington +Cameron Boehmer +Cameron Sparr +Cameron Spear +Campbell Allen +Candid Dauth +Cao Weiwei +Carl Henrik Lunde +Carl Loa Odin +Carl X. Su +Carlo Mion +Carlos Alexandro Becker +Carlos de Paula +Carlos Sanchez +Carol Fager-Higgins +Cary +Casey Bisson +Catalin Pirvu +Ce Gao +Cedric Davies +Cezar Sa Espinola +Chad Swenson +Chance Zibolski +Chander Govindarajan +Chanhun Jeong +Chao Wang +Charles Chan +Charles Hooper +Charles Law +Charles Lindsay +Charles Merriam +Charles Sarrazin +Charles Smith +Charlie Drage +Charlie Lewis +Chase Bolt +ChaYoung You +Chee Hau Lim +Chen Chao +Chen Chuanliang +Chen Hanxiao +Chen Min +Chen Mingjie +Chen Qiu +Cheng-mean Liu +Chengfei Shang +Chengguang Xu +Chenyang Yan +chenyuzhu +Chetan Birajdar +Chewey +Chia-liang Kao +chli +Cholerae Hu +Chris Alfonso +Chris Armstrong +Chris Dias +Chris Dituri +Chris Fordham +Chris Gavin +Chris Gibson +Chris Khoo +Chris Kreussling (Flatbush Gardener) +Chris McKinnel +Chris McKinnel +Chris Price +Chris Seto +Chris Snow +Chris St. Pierre +Chris Stivers +Chris Swan +Chris Telfer +Chris Wahl +Chris Weyl +Chris White +Christian Becker +Christian Berendt +Christian Brauner +Christian Böhme +Christian Muehlhaeuser +Christian Persson +Christian Rotzoll +Christian Simon +Christian Stefanescu +Christoph Ziebuhr +Christophe Mehay +Christophe Troestler +Christophe Vidal +Christopher Biscardi +Christopher Crone +Christopher Currie +Christopher Jones +Christopher Latham +Christopher Rigor +Christy Norman +Chun Chen +Ciro S. Costa +Clayton Coleman +Clint Armstrong +Clinton Kitson +clubby789 +Cody Roseborough +Coenraad Loubser +Colin Dunklau +Colin Hebert +Colin Panisset +Colin Rice +Colin Walters +Collin Guarino +Colm Hally +companycy +Conor Evans +Corbin Coleman +Corey Farrell +Cory Forsyth +Cory Snider +cressie176 +Cristian Ariza +Cristian Staretu +cristiano balducci +Cristina Yenyxe Gonzalez Garcia +Cruceru Calin-Cristian +CUI Wei +cuishuang +Cuong Manh Le +Cyprian Gracz +Cyril F +Da McGrady +Daan van Berkel +Daehyeok Mun +Dafydd Crosby +dalanlan +Damian Smyth +Damien Nadé +Damien Nozay +Damjan Georgievski +Dan Anolik +Dan Buch +Dan Cotora +Dan Feldman +Dan Griffin +Dan Hirsch +Dan Keder +Dan Levy +Dan McPherson +Dan Plamadeala +Dan Stine +Dan Williams +Dani Hodovic +Dani Louca +Daniel Antlinger +Daniel Black +Daniel Dao +Daniel Exner +Daniel Farrell +Daniel Garcia +Daniel Gasienica +Daniel Grunwell +Daniel Helfand +Daniel Hiltgen +Daniel J Walsh +Daniel Menet +Daniel Mizyrycki +Daniel Nephin +Daniel Norberg +Daniel Nordberg +Daniel P. Berrangé +Daniel Robinson +Daniel S +Daniel Sweet +Daniel Von Fange +Daniel Watkins +Daniel X Moore +Daniel YC Lin +Daniel Zhang +Daniele Rondina +Danny Berger +Danny Milosavljevic +Danny Yates +Danyal Khaliq +Darren Coxall +Darren Shepherd +Darren Stahl +Dattatraya Kumbhar +Davanum Srinivas +Dave Barboza +Dave Goodchild +Dave Henderson +Dave MacDonald +Dave Tucker +David Anderson +David Bellotti +David Calavera +David Chung +David Corking +David Cramer +David Currie +David Davis +David Dooling +David Gageot +David Gebler +David Glasser +David Lawrence +David Lechner +David M. Karr +David Mackey +David Manouchehri +David Mat +David Mcanulty +David McKay +David O'Rourke +David P Hilton +David Pelaez +David R. Jenni +David Röthlisberger +David Sheets +David Sissitka +David Trott +David Wang <00107082@163.com> +David Williamson +David Xia +David Young +Davide Ceretti +Dawn Chen +dbdd +dcylabs +Debayan De +Deborah Gertrude Digges +deed02392 +Deep Debroy +Deng Guangxing +Deni Bertovic +Denis Defreyne +Denis Gladkikh +Denis Ollier +Dennis Chen +Dennis Chen +Dennis Docter +Derek +Derek +Derek Ch +Derek McGowan +Deric Crago +Deshi Xiao +Devon Estes +Devvyn Murphy +Dharmit Shah +Dhawal Yogesh Bhanushali +Dhilip Kumars +Diego Romero +Diego Siqueira +Dieter Reuter +Dillon Dixon +Dima Stopel +Dimitri John Ledkov +Dimitris Mandalidis +Dimitris Rozakis +Dimitry Andric +Dinesh Subhraveti +Ding Fei +dingwei +Diogo Monica +DiuDiugirl +Djibril Koné +Djordje Lukic +dkumor +Dmitri Logvinenko +Dmitri Shuralyov +Dmitry Demeshchuk +Dmitry Gusev +Dmitry Kononenko +Dmitry Sharshakov +Dmitry Shyshkin +Dmitry Smirnov +Dmitry V. Krivenok +Dmitry Vorobev +Dmytro Iakovliev +docker-unir[bot] +Dolph Mathews +Dominic Tubach +Dominic Yin +Dominik Dingel +Dominik Finkbeiner +Dominik Honnef +Don Kirkby +Don Kjer +Don Spaulding +Donald Huang +Dong Chen +Donghwa Kim +Donovan Jones +Doron Podoleanu +Doug Davis +Doug MacEachern +Doug Tangren +Douglas Curtis +Dr Nic Williams +dragon788 +Dražen Lučanin +Drew Erny +Drew Hubl +Dustin Sallings +Ed Costello +Edmund Wagner +Eiichi Tsukata +Eike Herzbach +Eivin Giske Skaaren +Eivind Uggedal +Elan Ruusamäe +Elango Sivanandam +Elena Morozova +Eli Uriegas +Elias Faxö +Elias Koromilas +Elias Probst +Elijah Zupancic +eluck +Elvir Kuric +Emil Davtyan +Emil Hernvall +Emily Maier +Emily Rose +Emir Ozer +Eng Zer Jun +Enguerran +Eohyung Lee +epeterso +Eric Barch +Eric Curtin +Eric G. Noriega +Eric Hanchrow +Eric Lee +Eric Mountain +Eric Myhre +Eric Paris +Eric Rafaloff +Eric Rosenberg +Eric Sage +Eric Soderstrom +Eric Yang +Eric-Olivier Lamey +Erica Windisch +Erich Cordoba +Erik Bray +Erik Dubbelboer +Erik Hollensbe +Erik Inge Bolsø +Erik Kristensen +Erik Sipsma +Erik St. Martin +Erik Weathers +Erno Hopearuoho +Erwin van der Koogh +Espen Suenson +Ethan Bell +Ethan Mosbaugh +Euan Harris +Euan Kemp +Eugen Krizo +Eugene Yakubovich +Evan Allrich +Evan Carmi +Evan Hazlett +Evan Krall +Evan Phoenix +Evan Wies +Evelyn Xu +Everett Toews +Evgeniy Makhrov +Evgeny Shmarnev +Evgeny Vereshchagin +Ewa Czechowska +Eystein Måløy Stenberg +ezbercih +Ezra Silvera +Fabian Kramm +Fabian Lauer +Fabian Raetz +Fabiano Rosas +Fabio Falci +Fabio Kung +Fabio Rapposelli +Fabio Rehm +Fabrizio Regini +Fabrizio Soppelsa +Faiz Khan +falmp +Fangming Fang +Fangyuan Gao <21551127@zju.edu.cn> +fanjiyun +Fareed Dudhia +Fathi Boudra +Federico Gimenez +Felipe Oliveira +Felipe Ruhland +Felix Abecassis +Felix Geisendörfer +Felix Hupfeld +Felix Rabe +Felix Ruess +Felix Schindler +Feng Yan +Fengtu Wang +Ferenc Szabo +Fernando +Fero Volar +Feroz Salam +Ferran Rodenas +Filipe Brandenburger +Filipe Oliveira +Flavio Castelli +Flavio Crisciani +Florian +Florian Klein +Florian Maier +Florian Noeding +Florian Schmaus +Florian Weingarten +Florin Asavoaie +Florin Patan +fonglh +Foysal Iqbal +Francesc Campoy +Francesco Degrassi +Francesco Mari +Francis Chuang +Francisco Carriedo +Francisco Souza +Frank Groeneveld +Frank Herrmann +Frank Macreery +Frank Rosquin +Frank Yang +Fred Lifton +Frederick F. Kautz IV +Frederico F. de Oliveira +Frederik Loeffert +Frederik Nordahl Jul Sabroe +Freek Kalter +Frieder Bluemle +frobnicaty <92033765+frobnicaty@users.noreply.github.com> +Frédéric Dalleau +Fu JinLin +Félix Baylac-Jacqué +Félix Cantournet +Gabe Rosenhouse +Gabor Nagy +Gabriel Goller +Gabriel L. Somlo +Gabriel Linder +Gabriel Monroy +Gabriel Nicolas Avellaneda +Gaetan de Villele +Galen Sampson +Gang Qiao +Gareth Rushgrove +Garrett Barboza +Gary Schaetz +Gaurav +Gaurav Singh +Gaël PORTAY +Genki Takiuchi +GennadySpb +Geoff Levand +Geoffrey Bachelet +Geon Kim +George Kontridze +George MacRorie +George Xie +Georgi Hristozov +Georgy Yakovlev +Gereon Frey +German DZ +Gert van Valkenhoef +Gerwim Feiken +Ghislain Bourgeois +Giampaolo Mancini +Gianluca Borello +Gildas Cuisinier +Giovan Isa Musthofa +gissehel +Giuseppe Mazzotta +Giuseppe Scrivano +Gleb Fotengauer-Malinovskiy +Gleb M Borisov +Glyn Normington +GoBella +Goffert van Gool +Goldwyn Rodrigues +Gopikannan Venugopalsamy +Gosuke Miyashita +Gou Rao +Govinda Fichtner +Grant Millar +Grant Reaber +Graydon Hoare +Greg Fausak +Greg Pflaum +Greg Stephens +Greg Thornton +Grzegorz Jaśkiewicz +Guilhem Lettron +Guilherme Salgado +Guillaume Dufour +Guillaume J. Charmes +Gunadhya S. <6939749+gunadhya@users.noreply.github.com> +Guoqiang QI +guoxiuyan +Guri +Gurjeet Singh +Guruprasad +Gustav Sinder +gwx296173 +Günter Zöchbauer +Haichao Yang +haikuoliu +haining.cao +Hakan Özler +Hamish Hutchings +Hannes Ljungberg +Hans Kristian Flaatten +Hans Rødtang +Hao Shu Wei +Hao Zhang <21521210@zju.edu.cn> +Harald Albers +Harald Niesche +Harley Laue +Harold Cooper +Harrison Turton +Harry Zhang +Harshal Patil +Harshal Patil +He Simei +He Xiaoxi +He Xin +heartlock <21521209@zju.edu.cn> +Hector Castro +Helen Xie +Henning Sprang +Hiroshi Hatake +Hiroyuki Sasagawa +Hobofan +Hollie Teal +Hong Xu +Hongbin Lu +Hongxu Jia +Honza Pokorny +Hsing-Hui Hsu +hsinko <21551195@zju.edu.cn> +Hu Keping +Hu Tao +HuanHuan Ye +Huanzhong Zhang +Huayi Zhang +Hugo Barrera +Hugo Duncan +Hugo Marisco <0x6875676f@gmail.com> +Hui Kang +Hunter Blanks +huqun +Huu Nguyen +Hyeongkyu Lee +Hyzhou Zhy +Iago López Galeiras +Ian Bishop +Ian Bull +Ian Calvert +Ian Campbell +Ian Chen +Ian Lee +Ian Main +Ian Philpot +Ian Truslove +Iavael +Icaro Seara +Ignacio Capurro +Igor Dolzhikov +Igor Karpovich +Iliana Weller +Ilkka Laukkanen +Illo Abdulrahim +Ilya Dmitrichenko +Ilya Gusev +Ilya Khlopotov +imre Fitos +inglesp +Ingo Gottwald +Innovimax +Isaac Dupree +Isabel Jimenez +Isaiah Grace +Isao Jonas +Iskander Sharipov +Ivan Babrou +Ivan Fraixedes +Ivan Grcic +Ivan Markin +J Bruni +J. Nunn +Jack Danger Canty +Jack Laxson +Jacob Atzen +Jacob Edelman +Jacob Tomlinson +Jacob Vallejo +Jacob Wen +Jaime Cepeda +Jaivish Kothari +Jake Champlin +Jake Moshenko +Jake Sanders +Jakub Drahos +Jakub Guzik +James Allen +James Carey +James Carr +James DeFelice +James Harrison Fisher +James Kyburz +James Kyle +James Lal +James Mills +James Nesbitt +James Nugent +James Sanders +James Turnbull +James Watkins-Harvey +Jamie Hannaford +Jamshid Afshar +Jan Breig +Jan Chren +Jan Götte +Jan Keromnes +Jan Koprowski +Jan Pazdziora +Jan Toebes +Jan-Gerd Tenberge +Jan-Jaap Driessen +Jana Radhakrishnan +Jannick Fahlbusch +Januar Wayong +Jared Biel +Jared Hocutt +Jaroslaw Zabiello +Jasmine Hegman +Jason A. Donenfeld +Jason Divock +Jason Giedymin +Jason Green +Jason Hall +Jason Heiss +Jason Livesay +Jason McVetta +Jason Plum +Jason Shepherd +Jason Smith +Jason Sommer +Jason Stangroome +Javier Bassi +jaxgeller +Jay +Jay Kamat +Jay Lim +Jean Rouge +Jean-Baptiste Barth +Jean-Baptiste Dalido +Jean-Christophe Berthon +Jean-Paul Calderone +Jean-Pierre Huynh +Jean-Tiare Le Bigot +Jeeva S. Chelladhurai +Jeff Anderson +Jeff Hajewski +Jeff Johnston +Jeff Lindsay +Jeff Mickey +Jeff Minard +Jeff Nickoloff +Jeff Silberman +Jeff Welch +Jeff Zvier +Jeffrey Bolle +Jeffrey Morgan +Jeffrey van Gogh +Jenny Gebske +Jeremy Chambers +Jeremy Grosser +Jeremy Huntwork +Jeremy Price +Jeremy Qian +Jeremy Unruh +Jeremy Yallop +Jeroen Franse +Jeroen Jacobs +Jesse Dearing +Jesse Dubay +Jessica Frazelle +Jezeniel Zapanta +Jhon Honce +Ji.Zhilong +Jian Liao +Jian Zhang +Jiang Jinyang +Jianyong Wu +Jie Luo +Jie Ma +Jihyun Hwang +Jilles Oldenbeuving +Jim Alateras +Jim Carroll +Jim Ehrismann +Jim Galasyn +Jim Lin +Jim Minter +Jim Perrin +Jimmy Cuadra +Jimmy Puckett +Jimmy Song +Jinsoo Park +Jintao Zhang +Jiri Appl +Jiri Popelka +Jiuyue Ma +Jiří Župka +Joakim Roubert +Joao Fernandes +Joao Trindade +Joe Beda +Joe Doliner +Joe Ferguson +Joe Gordon +Joe Shaw +Joe Van Dyk +Joel Friedly +Joel Handwell +Joel Hansson +Joel Wurtz +Joey Geiger +Joey Geiger +Joey Gibson +Joffrey F +Johan Euphrosine +Johan Rydberg +Johanan Lieberman +Johannes 'fish' Ziemke +John Costa +John Feminella +John Gardiner Myers +John Gossman +John Harris +John Howard +John Laswell +John Maguire +John Mulhausen +John OBrien III +John Starks +John Stephens +John Tims +John V. Martinez +John Warwick +John Willis +Jon Johnson +Jon Surrell +Jon Wedaman +Jonas Dohse +Jonas Heinrich +Jonas Pfenniger +Jonathan A. Schweder +Jonathan A. Sternberg +Jonathan Boulle +Jonathan Camp +Jonathan Choy +Jonathan Dowland +Jonathan Lebon +Jonathan Lomas +Jonathan McCrohan +Jonathan Mueller +Jonathan Pares +Jonathan Rudenberg +Jonathan Stoppani +Jonh Wendell +Joni Sar +Joost Cassee +Jordan Arentsen +Jordan Jennings +Jordan Sissel +Jordi Massaguer Pla +Jorge Marin +Jorit Kleine-Möllhoff +Jose Diaz-Gonzalez +Joseph Anthony Pasquale Holsten +Joseph Hager +Joseph Kern +Joseph Rothrock +Josh +Josh Bodah +Josh Bonczkowski +Josh Chorlton +Josh Eveleth +Josh Hawn +Josh Horwitz +Josh Poimboeuf +Josh Soref +Josh Wilson +Josiah Kiehl +José Tomás Albornoz +Joyce Jang +JP +Julian Taylor +Julien Barbier +Julien Bisconti +Julien Bordellier +Julien Dubois +Julien Kassar +Julien Maitrehenry +Julien Pervillé +Julien Pivotto +Julio Guerra +Julio Montes +Jun Du +Jun-Ru Chang +junxu +Jussi Nummelin +Justas Brazauskas +Justen Martin +Justin Cormack +Justin Force +Justin Keller <85903732+jk-vb@users.noreply.github.com> +Justin Menga +Justin Plock +Justin Simonelis +Justin Terry +Justyn Temme +Jyrki Puttonen +Jérémy Leherpeur +Jérôme Petazzoni +Jörg Thalheim +K. Heller +Kai Blin +Kai Qiang Wu (Kennan) +Kaijie Chen +Kamil Domański +Kamjar Gerami +Kanstantsin Shautsou +Kara Alexandra +Karan Lyons +Kareem Khazem +kargakis +Karl Grzeszczak +Karol Duleba +Karthik Karanth +Karthik Nayak +Kasper Fabæch Brandt +Kate Heddleston +Katie McLaughlin +Kato Kazuyoshi +Katrina Owen +Kawsar Saiyeed +Kay Yan +kayrus +Kazuhiro Sera +Kazuyoshi Kato +Ke Li +Ke Xu +Kei Ohmura +Keith Hudgins +Keli Hu +Ken Cochrane +Ken Herner +Ken ICHIKAWA +Ken Reese +Kenfe-Mickaël Laventure +Kenjiro Nakayama +Kent Johnson +Kenta Tada +Kevin "qwazerty" Houdebert +Kevin Alvarez +Kevin Burke +Kevin Clark +Kevin Feyrer +Kevin J. Lynagh +Kevin Jing Qiu +Kevin Kern +Kevin Menard +Kevin Meredith +Kevin P. Kucharczyk +Kevin Parsons +Kevin Richardson +Kevin Shi +Kevin Wallace +Kevin Yap +Keyvan Fatehi +kies +Kim BKC Carlbacker +Kim Eik +Kimbro Staken +Kir Kolyshkin +Kiran Gangadharan +Kirill SIbirev +knappe +Kohei Tsuruta +Koichi Shiraishi +Konrad Kleine +Konrad Ponichtera +Konstantin Gribov +Konstantin L +Konstantin Pelykh +Kostadin Plachkov +Krasi Georgiev +Krasimir Georgiev +Kris-Mikael Krister +Kristian Haugene +Kristina Zabunova +Krystian Wojcicki +Kunal Kushwaha +Kunal Tyagi +Kyle Conroy +Kyle Linden +Kyle Squizzato +Kyle Wuolle +kyu +Lachlan Coote +Lai Jiangshan +Lajos Papp +Lakshan Perera +Lalatendu Mohanty +Lance Chen +Lance Kinley +Lars Butler +Lars Kellogg-Stedman +Lars R. Damerow +Lars-Magnus Skog +Laszlo Meszaros +Laura Frank +Laurent Bernaille +Laurent Erignoux +Laurie Voss +Leandro Siqueira +Lee Calcote +Lee Chao <932819864@qq.com> +Lee, Meng-Han +Lei Gong +Lei Jitang +Leiiwang +Len Weincier +Lennie +Leo Gallucci +Leonardo Nodari +Leonardo Taccari +Leszek Kowalski +Levi Blackstone +Levi Gross +Levi Harrison +Lewis Daly +Lewis Marshall +Lewis Peckover +Li Yi +Liam Macgillavry +Liana Lo +Liang Mingqiang +Liang-Chi Hsieh +liangwei +Liao Qingwei +Lifubang +Lihua Tang +Lily Guo +limeidan +Lin Lu +LingFaKe +Linus Heckemann +Liran Tal +Liron Levin +Liu Bo +Liu Hua +liwenqi +lixiaobing10051267 +Liz Zhang +LIZAO LI +Lizzie Dixon <_@lizzie.io> +Lloyd Dewolf +Lokesh Mandvekar +longliqiang88 <394564827@qq.com> +Lorenz Leutgeb +Lorenzo Fontana +Lotus Fenn +Louis Delossantos +Louis Opter +Luca Favatella +Luca Marturana +Luca Orlandi +Luca-Bogdan Grigorescu +Lucas Chan +Lucas Chi +Lucas Molas +Lucas Silvestre +Luciano Mores +Luis Henrique Mulinari +Luis Martínez de Bartolomé Izquierdo +Luiz Svoboda +Lukas Heeren +Lukas Waslowski +lukaspustina +Lukasz Zajaczkowski +Luke Marsden +Lyn +Lynda O'Leary +Lénaïc Huard +Ma Müller +Ma Shimiao +Mabin +Madhan Raj Mookkandy +Madhav Puri +Madhu Venugopal +Mageee +Mahesh Tiyyagura +malnick +Malte Janduda +Manfred Touron +Manfred Zabarauskas +Manjunath A Kumatagi +Mansi Nahar +Manuel Meurer +Manuel Rüger +Manuel Woelker +mapk0y +Marc Abramowitz +Marc Kuo +Marc Tamsky +Marcel Edmund Franke +Marcelo Horacio Fortino +Marcelo Salazar +Marco Hennings +Marcus Cobden +Marcus Farkas +Marcus Linke +Marcus Martins +Marcus Ramberg +Marek Goldmann +Marian Marinov +Marianna Tessel +Mario Loriedo +Marius Gundersen +Marius Sturm +Marius Voila +Mark Allen +Mark Feit +Mark Jeromin +Mark McGranaghan +Mark McKinstry +Mark Milstein +Mark Oates +Mark Parker +Mark Vainomaa +Mark West +Markan Patel +Marko Mikulicic +Marko Tibold +Markus Fix +Markus Kortlang +Martijn Dwars +Martijn van Oosterhout +Martin Braun +Martin Dojcak +Martin Honermeyer +Martin Kelly +Martin Mosegaard Amdisen +Martin Muzatko +Martin Redmond +Maru Newby +Mary Anthony +Masahito Zembutsu +Masato Ohba +Masayuki Morita +Mason Malone +Mateusz Sulima +Mathias Monnerville +Mathieu Champlon +Mathieu Le Marec - Pasquet +Mathieu Parent +Mathieu Paturel +Matt Apperson +Matt Bachmann +Matt Bajor +Matt Bentley +Matt Haggard +Matt Hoyle +Matt McCormick +Matt Moore +Matt Morrison <3maven@gmail.com> +Matt Richardson +Matt Rickard +Matt Robenolt +Matt Schurenko +Matt Williams +Matthew Heon +Matthew Lapworth +Matthew Mayer +Matthew Mosesohn +Matthew Mueller +Matthew Riley +Matthias Klumpp +Matthias Kühnle +Matthias Rampke +Matthieu Fronton +Matthieu Hauglustaine +Mattias Jernberg +Mauricio Garavaglia +mauriyouth +Max Harmathy +Max Shytikov +Max Timchenko +Maxim Fedchyshyn +Maxim Ivanov +Maxim Kulkin +Maxim Treskin +Maxime Petazzoni +Maximiliano Maccanti +Maxwell +Meaglith Ma +meejah +Megan Kostick +Mehul Kar +Mei ChunTao +Mengdi Gao +Menghui Chen +Mert Yazıcıoğlu +mgniu +Micah Zoltu +Michael A. Smith +Michael Beskin +Michael Bridgen +Michael Brown +Michael Chiang +Michael Crosby +Michael Currie +Michael Friis +Michael Gorsuch +Michael Grauer +Michael Holzheu +Michael Hudson-Doyle +Michael Huettermann +Michael Irwin +Michael Kuehn +Michael Käufl +Michael Neale +Michael Nussbaum +Michael Prokop +Michael Scharf +Michael Spetsiotis +Michael Stapelberg +Michael Steinert +Michael Thies +Michael Weidmann +Michael West +Michael Zhao +Michal Fojtik +Michal Gebauer +Michal Jemala +Michal Kostrzewa +Michal Minář +Michal Rostecki +Michal Wieczorek +Michaël Pailloncy +Michał Czeraszkiewicz +Michał Gryko +Michał Kosek +Michiel de Jong +Mickaël Fortunato +Mickaël Remars +Miguel Angel Fernández +Miguel Morales +Miguel Perez +Mihai Borobocea +Mihuleacc Sergiu +Mikael Davranche +Mike Brown +Mike Bush +Mike Casas +Mike Chelen +Mike Danese +Mike Dillon +Mike Dougherty +Mike Estes +Mike Gaffney +Mike Goelzer +Mike Leone +Mike Lundy +Mike MacCana +Mike Naberezny +Mike Snitzer +mikelinjie <294893458@qq.com> +Mikhail Sobolev +Miklos Szegedi +Milas Bowman +Milind Chawre +Miloslav Trmač +mingqing +Mingzhen Feng +Misty Stanley-Jones +Mitch Capper +Mizuki Urushida +mlarcher +Mohammad Banikazemi +Mohammad Nasirifar +Mohammed Aaqib Ansari +Mohit Soni +Moorthy RS +Morgan Bauer +Morgante Pell +Morgy93 +Morten Siebuhr +Morton Fox +Moysés Borges +mrfly +Mrunal Patel +Muayyad Alsadi +Muhammad Zohaib Aslam +Mustafa Akın +Muthukumar R +Máximo Cuadros +Médi-Rémi Hashim +Nace Oroz +Nahum Shalman +Nakul Pathak +Nalin Dahyabhai +Nan Monnand Deng +Naoki Orii +Natalie Parker +Natanael Copa +Natasha Jarus +Nate Brennand +Nate Eagleson +Nate Jones +Nathan Carlson +Nathan Herald +Nathan Hsieh +Nathan Kleyn +Nathan LeClaire +Nathan McCauley +Nathan Williams +Naveed Jamil +Neal McBurnett +Neil Horman +Neil Peterson +Nelson Chen +Neyazul Haque +Nghia Tran +Niall O'Higgins +Nicholas E. Rabenau +Nick Adcock +Nick DeCoursin +Nick Irvine +Nick Neisen +Nick Parker +Nick Payne +Nick Russo +Nick Stenning +Nick Stinemates +Nick Wood +NickrenREN +Nicola Kabar +Nicolas Borboën +Nicolas De Loof +Nicolas Dudebout +Nicolas Goy +Nicolas Kaiser +Nicolas Sterchele +Nicolas V Castet +Nicolás Hock Isaza +Niel Drummond +Nigel Poulton +Nik Nyby +Nikhil Chawla +NikolaMandic +Nikolas Garofil +Nikolay Edigaryev +Nikolay Milovanov +Nirmal Mehta +Nishant Totla +NIWA Hideyuki +Noah Meyerhans +Noah Treuhaft +NobodyOnSE +noducks +Nolan Darilek +Noriki Nakamura +nponeccop +Nurahmadie +Nuutti Kotivuori +nzwsch +O.S. Tezer +objectified +Odin Ugedal +Oguz Bilgic +Oh Jinkyun +Ohad Schneider +ohmystack +Ole Reifschneider +Oliver Neal +Oliver Reason +Olivier Gambier +Olle Jonsson +Olli Janatuinen +Olly Pomeroy +Omri Shiv +Onur Filiz +Oriol Francès +Oscar Bonilla <6f6231@gmail.com> +Oskar Niburski +Otto Kekäläinen +Ouyang Liduo +Ovidio Mallo +Panagiotis Moustafellos +Paolo G. Giarrusso +Pascal +Pascal Bach +Pascal Borreli +Pascal Hartig +Patrick Böänziger +Patrick Devine +Patrick Haas +Patrick Hemmer +Patrick Stapleton +Patrik Cyvoct +pattichen +Paul "TBBle" Hampson +Paul +paul +Paul Annesley +Paul Bellamy +Paul Bowsher +Paul Furtado +Paul Hammond +Paul Jimenez +Paul Kehrer +Paul Lietar +Paul Liljenberg +Paul Morie +Paul Nasrat +Paul Weaver +Paulo Gomes +Paulo Ribeiro +Pavel Lobashov +Pavel Matěja +Pavel Pletenev +Pavel Pospisil +Pavel Sutyrin +Pavel Tikhomirov +Pavlos Ratis +Pavol Vargovcik +Pawel Konczalski +Paweł Gronowski +Peeyush Gupta +Peggy Li +Pei Su +Peng Tao +Penghan Wang +Per Weijnitz +perhapszzy@sina.com +Pete Woods +Peter Bourgon +Peter Braden +Peter Bücker +Peter Choi +Peter Dave Hello +Peter Edge +Peter Ericson +Peter Esbensen +Peter Jaffe +Peter Kang +Peter Malmgren +Peter Salvatore +Peter Volpe +Peter Waller +Petr Švihlík +Petros Angelatos +Phil +Phil Estes +Phil Sphicas +Phil Spitler +Philip Alexander Etling +Philip Monroe +Philipp Gillé +Philipp Wahala +Philipp Weissensteiner +Phillip Alexander +phineas +pidster +Piergiuliano Bossi +Pierre +Pierre Carrier +Pierre Dal-Pra +Pierre Wacrenier +Pierre-Alain RIVIERE +Piotr Bogdan +Piotr Karbowski +Porjo +Poul Kjeldager Sørensen +Pradeep Chhetri +Pradip Dhara +Pradipta Kr. Banerjee +Prasanna Gautam +Pratik Karki +Prayag Verma +Priya Wadhwa +Projjol Banerji +Przemek Hejman +Puneet Pruthi +Pure White +pysqz +Qiang Huang +Qin TianHuan +Qinglan Peng +Quan Tian +qudongfang +Quentin Brossard +Quentin Perez +Quentin Tayssier +r0n22 +Radostin Stoyanov +Rafal Jeczalik +Rafe Colton +Raghavendra K T +Raghuram Devarakonda +Raja Sami +Rajat Pandit +Rajdeep Dua +Ralf Sippl +Ralle +Ralph Bean +Ramkumar Ramachandra +Ramon Brooker +Ramon van Alteren +RaviTeja Pothana +Ray Tsang +ReadmeCritic +realityone +Recursive Madman +Reficul +Regan McCooey +Remi Rampin +Remy Suen +Renato Riccieri Santos Zannon +Renaud Gaubert +Rhys Hiltner +Ri Xu +Ricardo N Feliciano +Rich Horwood +Rich Moyse +Rich Seymour +Richard Burnison +Richard Harvey +Richard Mathie +Richard Metzler +Richard Scothern +Richo Healey +Rick Bradley +Rick van de Loo +Rick Wieman +Rik Nijessen +Riku Voipio +Riley Guerin +Ritesh H Shukla +Riyaz Faizullabhoy +Rob Cowsill <42620235+rcowsill@users.noreply.github.com> +Rob Gulewich +Rob Vesse +Robert Bachmann +Robert Bittle +Robert Obryk +Robert Schneider +Robert Shade +Robert Stern +Robert Terhaar +Robert Wallis +Robert Wang +Roberto G. Hashioka +Roberto Muñoz Fernández +Robin Naundorf +Robin Schneider +Robin Speekenbrink +Robin Thoni +robpc +Rodolfo Carvalho +Rodrigo Campos +Rodrigo Vaz +Roel Van Nyen +Roger Peppe +Rohit Jnagal +Rohit Kadam +Rohit Kapur +Rojin George +Roland Huß +Roland Kammerer +Roland Moriz +Roma Sokolov +Roman Dudin +Roman Mazur +Roman Strashkin +Roman Volosatovs +Roman Zabaluev +Ron Smits +Ron Williams +Rong Gao +Rong Zhang +Rongxiang Song +Rony Weng +root +root +root +root +Rory Hunter +Rory McCune +Ross Boucher +Rovanion Luckey +Royce Remer +Rozhnov Alexandr +Rudolph Gottesheim +Rui Cao +Rui Lopes +Ruilin Li +Runshen Zhu +Russ Magee +Ryan Abrams +Ryan Anderson +Ryan Aslett +Ryan Barry +Ryan Belgrave +Ryan Campbell +Ryan Detzel +Ryan Fowler +Ryan Liu +Ryan McLaughlin +Ryan O'Donnell +Ryan Seto +Ryan Shea +Ryan Simmen +Ryan Stelly +Ryan Thomas +Ryan Trauntvein +Ryan Wallner +Ryan Zhang +ryancooper7 +RyanDeng +Ryo Nakao +Ryoga Saito +Rémy Greinhofer +s. rannou +Sabin Basyal +Sachin Joshi +Sagar Hani +Sainath Grandhi +Sakeven Jiang +Salahuddin Khan +Sally O'Malley +Sam Abed +Sam Alba +Sam Bailey +Sam J Sharpe +Sam Neirinck +Sam Reis +Sam Rijs +Sam Whited +Sambuddha Basu +Sami Wagiaalla +Samuel Andaya +Samuel Dion-Girardeau +Samuel Karp +Samuel PHAN +sanchayanghosh +Sandeep Bansal +Sankar சங்கர் +Sanket Saurav +Santhosh Manohar +sapphiredev +Sargun Dhillon +Sascha Andres +Sascha Grunert +SataQiu +Satnam Singh +Satoshi Amemiya +Satoshi Tagomori +Scott Bessler +Scott Collier +Scott Johnston +Scott Percival +Scott Stamp +Scott Walls +sdreyesg +Sean Christopherson +Sean Cronin +Sean Lee +Sean McIntyre +Sean OMeara +Sean P. Kane +Sean Rodman +Sebastiaan van Steenis +Sebastiaan van Stijn +Sebastian Höffner +Sebastian Radloff +Sebastien Goasguen +Senthil Kumar Selvaraj +Senthil Kumaran +SeongJae Park +Seongyeol Lim +Serge Hallyn +Sergey Alekseev +Sergey Evstifeev +Sergii Kabashniuk +Sergio Lopez +Serhat Gülçiçek +SeungUkLee +Sevki Hasirci +Shane Canon +Shane da Silva +Shaun Kaasten +shaunol +Shawn Landden +Shawn Siefkas +shawnhe +Shayan Pooya +Shayne Wang +Shekhar Gulati +Sheng Yang +Shengbo Song +Shengjing Zhu +Shev Yan +Shih-Yuan Lee +Shihao Xia +Shijiang Wei +Shijun Qin +Shishir Mahajan +Shoubhik Bose +Shourya Sarcar +Shu-Wai Chow +shuai-z +Shukui Yang +Sian Lerk Lau +Siarhei Rasiukevich +Sidhartha Mani +sidharthamani +Silas Sewell +Silvan Jegen +Simão Reis +Simon Barendse +Simon Eskildsen +Simon Ferquel +Simon Leinen +Simon Menke +Simon Taranto +Simon Vikstrom +Sindhu S +Sjoerd Langkemper +skanehira +Smark Meng +Solganik Alexander +Solomon Hykes +Song Gao +Soshi Katsuta +Sotiris Salloumis +Soulou +Spencer Brown +Spencer Smith +Spike Curtis +Sridatta Thatipamala +Sridhar Ratnakumar +Srini Brahmaroutu +Srinivasan Srivatsan +Staf Wagemakers +Stanislav Bondarenko +Stanislav Levin +Steeve Morin +Stefan Berger +Stefan J. Wernli +Stefan Praszalowicz +Stefan S. +Stefan Scherer +Stefan Staudenmeyer +Stefan Weil +Steffen Butzer +Stephan Spindler +Stephen Benjamin +Stephen Crosby +Stephen Day +Stephen Drake +Stephen Rust +Steve Desmond +Steve Dougherty +Steve Durrheimer +Steve Francia +Steve Koch +Steven Burgess +Steven Erenst +Steven Hartland +Steven Iveson +Steven Merrill +Steven Richards +Steven Taylor +Stéphane Este-Gracias +Stig Larsson +Su Wang +Subhajit Ghosh +Sujith Haridasan +Sun Gengze <690388648@qq.com> +Sun Jianbo +Sune Keller +Sunny Gogoi +Suryakumar Sudar +Sven Dowideit +Swapnil Daingade +Sylvain Baubeau +Sylvain Bellemare +Sébastien +Sébastien HOUZÉ +Sébastien Luttringer +Sébastien Stormacq +Sören Tempel +Tabakhase +Tadej Janež +Takuto Sato +tang0th +Tangi Colin +Tatsuki Sugiura +Tatsushi Inagaki +Taylan Isikdemir +Taylor Jones +Ted M. Young +Tehmasp Chaudhri +Tejaswini Duggaraju +Tejesh Mehta +Terry Chu +terryding77 <550147740@qq.com> +Thatcher Peskens +theadactyl +Thell 'Bo' Fowler +Thermionix +Thiago Alves Silva +Thijs Terlouw +Thomas Bikeev +Thomas Frössman +Thomas Gazagnaire +Thomas Graf +Thomas Grainger +Thomas Hansen +Thomas Ledos +Thomas Leonard +Thomas Léveil +Thomas Orozco +Thomas Riccardi +Thomas Schroeter +Thomas Sjögren +Thomas Swift +Thomas Tanaka +Thomas Texier +Ti Zhou +Tiago Seabra +Tianon Gravi +Tianyi Wang +Tibor Vass +Tiffany Jernigan +Tiffany Low +Till Claassen +Till Wegmüller +Tim +Tim Bart +Tim Bosse +Tim Dettrick +Tim Düsterhus +Tim Hockin +Tim Potter +Tim Ruffles +Tim Smith +Tim Terhorst +Tim Wagner +Tim Wang +Tim Waugh +Tim Wraight +Tim Zju <21651152@zju.edu.cn> +timchenxiaoyu <837829664@qq.com> +timfeirg +Timo Rothenpieler +Timothy Hobbs +tjwebb123 +tobe +Tobias Bieniek +Tobias Bradtke +Tobias Gesellchen +Tobias Klauser +Tobias Munk +Tobias Pfandzelter +Tobias Schmidt +Tobias Schwab +Todd Crane +Todd Lunter +Todd Whiteman +Toli Kuznets +Tom Barlow +Tom Booth +Tom Denham +Tom Fotherby +Tom Howe +Tom Hulihan +Tom Maaswinkel +Tom Parker +Tom Sweeney +Tom Wilkie +Tom X. Tobin +Tom Zhao +Tomas Janousek +Tomas Kral +Tomas Tomecek +Tomasz Kopczynski +Tomasz Lipinski +Tomasz Nurkiewicz +Tomek Mańko +Tommaso Visconti +Tomoya Tabuchi +Tomáš Hrčka +tonic +Tonny Xu +Tony Abboud +Tony Daws +Tony Miller +toogley +Torstein Husebø +Toshiaki Makita +Tõnis Tiigi +Trace Andreason +tracylihui <793912329@qq.com> +Trapier Marshall +Travis Cline +Travis Thieman +Trent Ogren +Trevor +Trevor Pounds +Trevor Sullivan +Trishna Guha +Tristan Carel +Troy Denton +Tudor Brindus +Ty Alexander +Tycho Andersen +Tyler Brock +Tyler Brown +Tzu-Jung Lee +uhayate +Ulysse Carion +Umesh Yadav +Utz Bacher +vagrant +Vaidas Jablonskis +Valentin Kulesh +vanderliang +Velko Ivanov +Veres Lajos +Victor Algaze +Victor Coisne +Victor Costan +Victor I. Wood +Victor Lyuboslavsky +Victor Marmol +Victor Palma +Victor Vieux +Victoria Bialas +Vijaya Kumar K +Vikas Choudhary +Vikram bir Singh +Viktor Stanchev +Viktor Vojnovski +VinayRaghavanKS +Vincent Batts +Vincent Bernat +Vincent Boulineau +Vincent Demeester +Vincent Giersch +Vincent Mayers +Vincent Woo +Vinod Kulkarni +Vishal Doshi +Vishnu Kannan +Vitaly Ostrosablin +Vitor Monteiro +Vivek Agarwal +Vivek Dasgupta +Vivek Goyal +Vladimir Bulyga +Vladimir Kirillov +Vladimir Pouzanov +Vladimir Rutsky +Vladimir Varankin +VladimirAus +Vladislav Kolesnikov +Vlastimil Zeman +Vojtech Vitek (V-Teq) +Walter Leibbrandt +Walter Stanish +Wang Chao +Wang Guoliang +Wang Jie +Wang Long +Wang Ping +Wang Xing +Wang Yuexiao +Wang Yumu <37442693@qq.com> +wanghuaiqing +Ward Vandewege +WarheadsSE +Wassim Dhif +Wataru Ishida +Wayne Chang +Wayne Song +Weerasak Chongnguluam +Wei Fu +Wei Wu +Wei-Ting Kuo +weipeng +weiyan +Weiyang Zhu +Wen Cheng Ma +Wendel Fleming +Wenjun Tang +Wenkai Yin +wenlxie +Wenxuan Zhao +Wenyu You <21551128@zju.edu.cn> +Wenzhi Liang +Wes Morgan +Wewang Xiaorenfine +Wiktor Kwapisiewicz +Will Dietz +Will Rouesnel +Will Weaver +willhf +William Delanoue +William Henry +William Hubbs +William Martin +William Riancho +William Thurston +Wilson Júnior +Wing-Kam Wong +WiseTrem +Wolfgang Nagele +Wolfgang Powisch +Wonjun Kim +WuLonghui +xamyzhao +Xia Wu +Xian Chaobo +Xianglin Gao +Xianjie +Xianlu Bird +Xiao YongBiao +Xiao Zhang +XiaoBing Jiang +Xiaodong Liu +Xiaodong Zhang +Xiaohua Ding +Xiaoxi He +Xiaoxu Chen +Xiaoyu Zhang +xichengliudui <1693291525@qq.com> +xiekeyang +Ximo Guanter Gonzálbez +Xinbo Weng +Xinfeng Liu +Xinzi Zhou +Xiuming Chen +Xuecong Liao +xuzhaokui +Yadnyawalkya Tale +Yahya +yalpul +YAMADA Tsuyoshi +Yamasaki Masahide +Yan Feng +Yan Zhu +Yang Bai +Yang Li +Yang Pengfei +yangchenliang +Yann Autissier +Yanqiang Miao +Yao Zaiyong +Yash Murty +Yassine Tijani +Yasunori Mahata +Yazhong Liu +Yestin Sun +Yi EungJun +Yibai Zhang +Yihang Ho +Ying Li +Yohei Ueda +Yong Tang +Yongxin Li +Yongzhi Pan +Yosef Fertel +You-Sheng Yang (楊有勝) +youcai +Youcef YEKHLEF +Youfu Zhang +Yu Changchun +Yu Chengxia +Yu Peng +Yu-Ju Hong +Yuan Sun +Yuanhong Peng +Yue Zhang +Yufei Xiong +Yuhao Fang +Yuichiro Kaneko +YujiOshima +Yunxiang Huang +Yurii Rashkovskii +Yusuf Tarık Günaydın +Yves Blusseau <90z7oey02@sneakemail.com> +Yves Junqueira +Zac Dover +Zach Borboa +Zach Gershman +Zachary Jaffee +Zain Memon +Zaiste! +Zane DeGraffenried +Zefan Li +Zen Lin(Zhinan Lin) +Zhang Kun +Zhang Wei +Zhang Wentao +ZhangHang +zhangxianwei +Zhenan Ye <21551168@zju.edu.cn> +zhenghenghuo +Zhenhai Gao +Zhenkun Bi +ZhiPeng Lu +zhipengzuo +Zhou Hao +Zhoulin Xie +Zhu Guihua +Zhu Kunjia +Zhuoyun Wei +Ziheng Liu +Zilin Du +zimbatm +Ziming Dong +ZJUshuaizhou <21551191@zju.edu.cn> +zmarouf +Zoltan Tombol +Zou Yu +zqh +Zuhayr Elahi +Zunayed Ali +Álvaro Lázaro +Átila Camurça Alves +尹吉峰 +屈骏 +徐俊杰 +慕陶 +搏通 +黄艳红00139573 +정재영 diff --git a/vendor/github.com/docker/docker/LICENSE b/vendor/github.com/docker/docker/LICENSE new file mode 100644 index 000000000..6d8d58fb6 --- /dev/null +++ b/vendor/github.com/docker/docker/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2018 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/docker/docker/NOTICE b/vendor/github.com/docker/docker/NOTICE new file mode 100644 index 000000000..58b19b6d1 --- /dev/null +++ b/vendor/github.com/docker/docker/NOTICE @@ -0,0 +1,19 @@ +Docker +Copyright 2012-2017 Docker, Inc. + +This product includes software developed at Docker, Inc. (https://www.docker.com). + +This product contains software (https://github.com/creack/pty) developed +by Keith Rarick, licensed under the MIT License. + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see https://www.bis.doc.gov + +See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go new file mode 100644 index 000000000..5e6310fdc --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go @@ -0,0 +1,93 @@ +package homedir // import "github.com/docker/docker/pkg/homedir" + +import ( + "errors" + "os" + "path/filepath" + "strings" +) + +// GetRuntimeDir returns XDG_RUNTIME_DIR. +// XDG_RUNTIME_DIR is typically configured via pam_systemd. +// GetRuntimeDir returns non-nil error if XDG_RUNTIME_DIR is not set. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func GetRuntimeDir() (string, error) { + if xdgRuntimeDir := os.Getenv("XDG_RUNTIME_DIR"); xdgRuntimeDir != "" { + return xdgRuntimeDir, nil + } + return "", errors.New("could not get XDG_RUNTIME_DIR") +} + +// StickRuntimeDirContents sets the sticky bit on files that are under +// XDG_RUNTIME_DIR, so that the files won't be periodically removed by the system. +// +// StickyRuntimeDir returns slice of sticked files. +// StickyRuntimeDir returns nil error if XDG_RUNTIME_DIR is not set. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func StickRuntimeDirContents(files []string) ([]string, error) { + runtimeDir, err := GetRuntimeDir() + if err != nil { + // ignore error if runtimeDir is empty + return nil, nil + } + runtimeDir, err = filepath.Abs(runtimeDir) + if err != nil { + return nil, err + } + var sticked []string + for _, f := range files { + f, err = filepath.Abs(f) + if err != nil { + return sticked, err + } + if strings.HasPrefix(f, runtimeDir+"/") { + if err = stick(f); err != nil { + return sticked, err + } + sticked = append(sticked, f) + } + } + return sticked, nil +} + +func stick(f string) error { + st, err := os.Stat(f) + if err != nil { + return err + } + m := st.Mode() + m |= os.ModeSticky + return os.Chmod(f, m) +} + +// GetDataHome returns XDG_DATA_HOME. +// GetDataHome returns $HOME/.local/share and nil error if XDG_DATA_HOME is not set. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func GetDataHome() (string, error) { + if xdgDataHome := os.Getenv("XDG_DATA_HOME"); xdgDataHome != "" { + return xdgDataHome, nil + } + home := os.Getenv("HOME") + if home == "" { + return "", errors.New("could not get either XDG_DATA_HOME or HOME") + } + return filepath.Join(home, ".local", "share"), nil +} + +// GetConfigHome returns XDG_CONFIG_HOME. +// GetConfigHome returns $HOME/.config and nil error if XDG_CONFIG_HOME is not set. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func GetConfigHome() (string, error) { + if xdgConfigHome := os.Getenv("XDG_CONFIG_HOME"); xdgConfigHome != "" { + return xdgConfigHome, nil + } + home := os.Getenv("HOME") + if home == "" { + return "", errors.New("could not get either XDG_CONFIG_HOME or HOME") + } + return filepath.Join(home, ".config"), nil +} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go new file mode 100644 index 000000000..fc48e674c --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go @@ -0,0 +1,28 @@ +//go:build !linux +// +build !linux + +package homedir // import "github.com/docker/docker/pkg/homedir" + +import ( + "errors" +) + +// GetRuntimeDir is unsupported on non-linux system. +func GetRuntimeDir() (string, error) { + return "", errors.New("homedir.GetRuntimeDir() is not supported on this system") +} + +// StickRuntimeDirContents is unsupported on non-linux system. +func StickRuntimeDirContents(files []string) ([]string, error) { + return nil, errors.New("homedir.StickRuntimeDirContents() is not supported on this system") +} + +// GetDataHome is unsupported on non-linux system. +func GetDataHome() (string, error) { + return "", errors.New("homedir.GetDataHome() is not supported on this system") +} + +// GetConfigHome is unsupported on non-linux system. +func GetConfigHome() (string, error) { + return "", errors.New("homedir.GetConfigHome() is not supported on this system") +} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_unix.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_unix.go new file mode 100644 index 000000000..d1732dee5 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir_unix.go @@ -0,0 +1,39 @@ +//go:build !windows +// +build !windows + +package homedir // import "github.com/docker/docker/pkg/homedir" + +import ( + "os" + "os/user" +) + +// Key returns the env var name for the user's home dir based on +// the platform being run on +func Key() string { + return "HOME" +} + +// Get returns the home directory of the current user with the help of +// environment variables depending on the target operating system. +// Returned path should be used with "path/filepath" to form new paths. +// +// If linking statically with cgo enabled against glibc, ensure the +// osusergo build tag is used. +// +// If needing to do nss lookups, do not disable cgo or set osusergo. +func Get() string { + home := os.Getenv(Key()) + if home == "" { + if u, err := user.Current(); err == nil { + return u.HomeDir + } + } + return home +} + +// GetShortcutString returns the string that is shortcut to user's home directory +// in the native shell of the platform running on. +func GetShortcutString() string { + return "~" +} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_windows.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_windows.go new file mode 100644 index 000000000..2f81813b2 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir_windows.go @@ -0,0 +1,24 @@ +package homedir // import "github.com/docker/docker/pkg/homedir" + +import ( + "os" +) + +// Key returns the env var name for the user's home dir based on +// the platform being run on +func Key() string { + return "USERPROFILE" +} + +// Get returns the home directory of the current user with the help of +// environment variables depending on the target operating system. +// Returned path should be used with "path/filepath" to form new paths. +func Get() string { + return os.Getenv(Key()) +} + +// GetShortcutString returns the string that is shortcut to user's home directory +// in the native shell of the platform running on. +func GetShortcutString() string { + return "%USERPROFILE%" // be careful while using in format functions +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/doc.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/doc.go new file mode 100644 index 000000000..cdf7df5e0 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/doc.go @@ -0,0 +1,5 @@ +// +k8s:deepcopy-gen=package,register +// +groupName=cluster.loft.sh + +// Package api is the internal version of the API. +package cluster diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/inject.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/inject.go new file mode 100644 index 000000000..67510cc84 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/inject.go @@ -0,0 +1,21 @@ +package cluster + +import ( + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// Config will be injected during startup and then passed to the rest storages +var Config *rest.Config + +// CachedClient will be injected during startup and then passed to the rest storages +var CachedClient client.Client + +// UncachedClient will be injected during startup and then passed to the rest storages +var UncachedClient client.Client + +// CachedManagementClient will be injected during startup and then passed to the rest storages +var CachedManagementClient client.Client + +// UncachedManagementClient will be injected during startup and then passed to the rest storages +var UncachedManagementClient client.Client diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/chartinfo_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/chartinfo_types.go new file mode 100644 index 000000000..aa1de4a8f --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/chartinfo_types.go @@ -0,0 +1,40 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +k8s:openapi-gen=true +// +resource:path=chartinfos,rest=ChartInfoREST +type ChartInfo struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ChartInfoSpec `json:"spec,omitempty"` + Status ChartInfoStatus `json:"status,omitempty"` +} + +type ChartInfoSpec struct { + // Chart holds information about a chart that should get deployed + // +optional + Chart agentstoragev1.Chart `json:"chart,omitempty"` +} + +type ChartInfoStatus struct { + // Metadata provides information about a chart + // +optional + Metadata *Metadata `json:"metadata,omitempty"` + + // Readme is the readme of the chart + // +optional + Readme string `json:"readme,omitempty"` + + // Values are the default values of the chart + // +optional + Values string `json:"values,omitempty"` +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/clusterquota_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/clusterquota_types.go new file mode 100644 index 000000000..067df14c1 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/clusterquota_types.go @@ -0,0 +1,35 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterQuota holds the virtual cluster information +// +k8s:openapi-gen=true +// +resource:path=clusterquotas,rest=ClusterQuotaREST +type ClusterQuota struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterQuotaSpec `json:"spec,omitempty"` + Status ClusterQuotaStatus `json:"status,omitempty"` +} + +type ClusterQuotaSpec struct { + agentstoragev1.ClusterQuotaSpec `json:",inline"` +} + +type ClusterQuotaStatus struct { + agentstoragev1.ClusterQuotaStatus `json:",inline"` + + // Owner describes the owner of the space. This can be either empty (nil), be a team or + // an loft user. If the space has an account that does not belong to an user / team in loft + // this is empty + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/doc.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/doc.go new file mode 100644 index 000000000..2475fb634 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/doc.go @@ -0,0 +1,10 @@ +// Api versions allow the api contract for a resource to be changed while keeping +// backward compatibility by support multiple concurrent versions +// of the same resource + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster +// +k8s:defaulter-gen=TypeMeta +// +groupName=cluster.loft.sh +package v1 // import "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/feature_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/feature_types.go new file mode 100644 index 000000000..fd94cdc4f --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/feature_types.go @@ -0,0 +1,31 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Feature holds the feature information +// +k8s:openapi-gen=true +// +resource:path=features,rest=FeatureREST +type Feature struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec FeatureSpec `json:"spec,omitempty"` + Status FeatureStatus `json:"status,omitempty"` +} + +// FeatureSpec holds the specification +type FeatureSpec struct { +} + +// FeatureStatus holds the status +type FeatureStatus struct { + // Enabled signals if the feature is currently enabled or disabled + // +optional + Enabled bool `json:"enabled,omitempty"` +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/helmrelease_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/helmrelease_types.go new file mode 100644 index 000000000..99a61a998 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/helmrelease_types.go @@ -0,0 +1,208 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +k8s:openapi-gen=true +// +resource:path=helmreleases,rest=HelmReleaseREST +type HelmRelease struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec HelmReleaseSpec `json:"spec,omitempty"` + Status HelmReleaseStatus `json:"status,omitempty"` +} + +type HelmReleaseSpec struct { + HelmReleaseConfig `json:",inline"` +} + +type HelmReleaseStatus struct { + // Revision is an int which represents the revision of the release. + Revision int `json:"version,omitempty"` + + // Info provides information about a release + // +optional + Info *Info `json:"info,omitempty"` + + // Metadata provides information about a chart + // +optional + Metadata *Metadata `json:"metadata,omitempty"` +} + +type HelmReleaseApp struct { + // Name is the name of the app this release refers to + // +optional + Name string `json:"name,omitempty"` + + // Revision is the revision of the app this release refers to + // +optional + Revision string `json:"version,omitempty"` +} + +type HelmReleaseConfig struct { + // Chart holds information about a chart that should get deployed + // +optional + Chart agentstoragev1.Chart `json:"chart,omitempty"` + + // Manifests holds kube manifests that will be deployed as a chart + // +optional + Manifests string `json:"manifests,omitempty"` + + // Bash holds the bash script to execute in a container in the target + // +optional + Bash *Bash `json:"bash,omitempty"` + + // Values is the set of extra Values added to the chart. + // These values merge with the default values inside of the chart. + // You can use golang templating in here with values from parameters. + // +optional + Values string `json:"values,omitempty"` + + // Parameters are additional helm chart values that will get merged + // with config and are then used to deploy the helm chart. + // +optional + Parameters string `json:"parameters,omitempty"` + + // Annotations are extra annotations for this helm release + // +optional + Annotations map[string]string `json:"annotations,omitempty"` +} + +type Bash struct { + // Script is the script to execute. + // +optional + Script string `json:"script,omitempty"` + + // Image is the image to use for this app + // +optional + Image string `json:"image,omitempty"` + + // ClusterRole is the cluster role to use for this job + // +optional + ClusterRole string `json:"clusterRole,omitempty"` +} + +// Info describes release information. +type Info struct { + // FirstDeployed is when the release was first deployed. + // +optional + FirstDeployed metav1.Time `json:"first_deployed,omitempty"` + // LastDeployed is when the release was last deployed. + // +optional + LastDeployed metav1.Time `json:"last_deployed,omitempty"` + // Deleted tracks when this object was deleted. + // +optional + Deleted metav1.Time `json:"deleted"` + // Description is human-friendly "log entry" about this release. + // +optional + Description string `json:"description,omitempty"` + // Status is the current state of the release + // +optional + Status Status `json:"status,omitempty"` + // Contains the rendered templates/NOTES.txt if available + // +optional + Notes string `json:"notes,omitempty"` +} + +// Status is the status of a release +type Status string + +// Describe the status of a release +// NOTE: Make sure to update cmd/helm/status.go when adding or modifying any of these statuses. +const ( + // StatusUnknown indicates that a release is in an uncertain state. + StatusUnknown Status = "unknown" + // StatusDeployed indicates that the release has been pushed to Kubernetes. + StatusDeployed Status = "deployed" + // StatusUninstalled indicates that a release has been uninstalled from Kubernetes. + StatusUninstalled Status = "uninstalled" + // StatusSuperseded indicates that this release object is outdated and a newer one exists. + StatusSuperseded Status = "superseded" + // StatusFailed indicates that the release was not successfully deployed. + StatusFailed Status = "failed" + // StatusUninstalling indicates that a uninstall operation is underway. + StatusUninstalling Status = "uninstalling" + // StatusPendingInstall indicates that an install operation is underway. + StatusPendingInstall Status = "pending-install" + // StatusPendingUpgrade indicates that an upgrade operation is underway. + StatusPendingUpgrade Status = "pending-upgrade" + // StatusPendingRollback indicates that an rollback operation is underway. + StatusPendingRollback Status = "pending-rollback" +) + +func (x Status) String() string { return string(x) } + +// Maintainer describes a Chart maintainer. +type Maintainer struct { + // Name is a user name or organization name + // +optional + Name string `json:"name,omitempty"` + // Email is an optional email address to contact the named maintainer + // +optional + Email string `json:"email,omitempty"` + // URL is an optional URL to an address for the named maintainer + // +optional + URL string `json:"url,omitempty"` +} + +// Metadata for a Chart file. This models the structure of a Chart.yaml file. +type Metadata struct { + // The name of the chart + // +optional + Name string `json:"name,omitempty"` + // The URL to a relevant project page, git repo, or contact person + // +optional + Home string `json:"home,omitempty"` + // Source is the URL to the source code of this chart + // +optional + Sources []string `json:"sources,omitempty"` + // A SemVer 2 conformant version string of the chart + // +optional + Version string `json:"version,omitempty"` + // A one-sentence description of the chart + // +optional + Description string `json:"description,omitempty"` + // A list of string keywords + // +optional + Keywords []string `json:"keywords,omitempty"` + // A list of name and URL/email address combinations for the maintainer(s) + // +optional + Maintainers []*Maintainer `json:"maintainers,omitempty"` + // The URL to an icon file. + // +optional + Icon string `json:"icon,omitempty"` + // The API Version of this chart. + // +optional + APIVersion string `json:"apiVersion,omitempty"` + // The condition to check to enable chart + // +optional + Condition string `json:"condition,omitempty"` + // The tags to check to enable chart + // +optional + Tags string `json:"tags,omitempty"` + // The version of the application enclosed inside of this chart. + // +optional + AppVersion string `json:"appVersion,omitempty"` + // Whether or not this chart is deprecated + // +optional + Deprecated bool `json:"deprecated,omitempty"` + // Annotations are additional mappings uninterpreted by Helm, + // made available for inspection by other applications. + // +optional + Annotations map[string]string `json:"annotations,omitempty"` + // KubeVersion is a SemVer constraint specifying the version of Kubernetes required. + // +optional + KubeVersion string `json:"kubeVersion,omitempty"` + // Specifies the chart type: application or library + // +optional + Type string `json:"type,omitempty"` + // Urls where to find the chart contents + // +optional + Urls []string `json:"urls,omitempty"` +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/localclusteraccess_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/localclusteraccess_types.go new file mode 100644 index 000000000..394d32f55 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/localclusteraccess_types.go @@ -0,0 +1,70 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// LocalClusterAccess holds the cluster access information +// +k8s:openapi-gen=true +// +resource:path=localclusteraccesses,rest=LocalClusterAccessREST +type LocalClusterAccess struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec LocalClusterAccessSpec `json:"spec,omitempty"` + Status LocalClusterAccessStatus `json:"status,omitempty"` +} + +type LocalClusterAccessSpec struct { + agentstoragev1.LocalClusterAccessSpec `json:",inline"` +} + +type LocalClusterAccessStatus struct { + agentstoragev1.LocalClusterAccessStatus `json:",inline"` + + // +optional + Users []*UserOrTeam `json:"users,omitempty"` + + // +optional + Teams []*EntityInfo `json:"teams,omitempty"` +} + +type UserOrTeam struct { + // User describes an user + // +optional + User *EntityInfo `json:"user,omitempty"` + + // Team describes a team + // +optional + Team *EntityInfo `json:"team,omitempty"` +} + +type EntityInfo struct { + // Name is the kubernetes name of the object + Name string `json:"name,omitempty"` + + // The display name shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Icon is the icon of the user / team + // +optional + Icon string `json:"icon,omitempty"` + + // The username that is used to login + // +optional + Username string `json:"username,omitempty"` + + // The users email address + // +optional + Email string `json:"email,omitempty"` + + // The user subject + // +optional + Subject string `json:"subject,omitempty"` +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/sleepmodeconfig_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/sleepmodeconfig_types.go new file mode 100644 index 000000000..ccd64d439 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/sleepmodeconfig_types.go @@ -0,0 +1,252 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + SleepModeForceAnnotation = "sleepmode.loft.sh/force" + SleepModeForceDurationAnnotation = "sleepmode.loft.sh/force-duration" + SleepModeSleepAfterAnnotation = "sleepmode.loft.sh/sleep-after" + SleepModeDeleteAfterAnnotation = "sleepmode.loft.sh/delete-after" + SleepModeDeleteAllPodsAnnotation = "sleepmode.loft.sh/delete-all-pods" + SleepModeSleepScheduleAnnotation = "sleepmode.loft.sh/sleep-schedule" + SleepModeWakeupScheduleAnnotation = "sleepmode.loft.sh/wakeup-schedule" + SleepModeTimezoneAnnotation = "sleepmode.loft.sh/timezone" + + SleepModeLastActivityAnnotation = "sleepmode.loft.sh/last-activity" + SleepModeLastActivityAnnotationInfo = "sleepmode.loft.sh/last-activity-info" + SleepModeSleepingSinceAnnotation = "sleepmode.loft.sh/sleeping-since" + SleepModeCurrentEpochStartAnnotation = "sleepmode.loft.sh/current-epoch-start" + SleepModeCurrentEpochSleptAnnotation = "sleepmode.loft.sh/current-epoch-slept" + SleepModeLastEpochStartAnnotation = "sleepmode.loft.sh/last-epoch-start" + SleepModeLastEpochSleptAnnotation = "sleepmode.loft.sh/last-epoch-slept" + SleepModeScheduledSleepAnnotation = "sleepmode.loft.sh/scheduled-sleep" + SleepModeScheduledWakeupAnnotation = "sleepmode.loft.sh/scheduled-wakeup" + SleepModeSleepTypeAnnotation = "sleepmode.loft.sh/sleep-type" + SleepModeDisableIngressWakeup = "sleepmode.loft.sh/disable-ingress-wakeup" + + // Not yet in spec annotations + SleepModeIgnoreAll = "sleepmode.loft.sh/ignore-all" + SleepModeIgnoreIngresses = "sleepmode.loft.sh/ignore-ingresses" + SleepModeIgnoreGroupsAnnotation = "sleepmode.loft.sh/ignore-groups" + SleepModeIgnoreVClustersAnnotation = "sleepmode.loft.sh/ignore-vclusters" + SleepModeIgnoreResourcesAnnotation = "sleepmode.loft.sh/ignore-resources" + SleepModeIgnoreVerbsAnnotation = "sleepmode.loft.sh/ignore-verbs" + SleepModeIgnoreResourceVerbsAnnotation = "sleepmode.loft.sh/ignore-resource-verbs" // format: myresource.mygroup=create update delete, myresource2.mygroup=create update + SleepModeIgnoreResourceNamesAnnotation = "sleepmode.loft.sh/ignore-resource-names" // format: myresource.mygroup=name1 name2 + SleepModeIgnoreActiveConnections = "sleepmode.loft.sh/ignore-active-connections" + + SleepTypeInactivity = "inactivitySleep" + SleepTypeForced = "forcedSleep" + SleepTypeForcedDuration = "forcedDurationSleep" + SleepTypeScheduled = "scheduledSleep" +) + +// SleepModeConfigAnnotationKeys returns relevant annotation keys that are evaluated in +// apimachinery/v2/pkg/sleepmode/extractSleepModeConfigs function. This is primarily used for +// knowing which annotations to copy from spaces to vcluster instances when importing vclusters +// to a project. +func SleepModeConfigAnnotationKeys() []string { + return []string{ + SleepModeForceDurationAnnotation, + SleepModeForceAnnotation, + SleepModeScheduledSleepAnnotation, + SleepModeScheduledWakeupAnnotation, + } +} + +func SleepModeStatusAnnotationKeys() []string { + return []string{ + SleepModeForceDurationAnnotation, + SleepModeForceAnnotation, + SleepModeScheduledSleepAnnotation, + SleepModeScheduledWakeupAnnotation, + SleepModeSleepingSinceAnnotation, + SleepModeSleepTypeAnnotation, + } +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SleepModeConfig holds the sleepmode information +// +k8s:openapi-gen=true +// +resource:path=sleepmodeconfigs,rest=SleepModeConfigREST +type SleepModeConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SleepModeConfigSpec `json:"spec,omitempty"` + Status SleepModeConfigStatus `json:"status,omitempty"` +} + +type SleepModeConfigSpec struct { + // If force sleep is true the space will sleep + // +optional + ForceSleep bool `json:"forceSleep,omitempty"` + + // If force sleep duration is set, this will force the space to sleep + // for the given duration. It also implies that forceSleep is true. + // During this period loft will also block certain requests to that space. + // If this is set to 0, it means the space will sleep until it is manually + // woken up via the cli or ui. + // +optional + ForceSleepDuration *int64 `json:"forceSleepDuration,omitempty"` + + // If true will delete all pods on sleep in the space regardless of + // if they have a parent set + // +optional + DeleteAllPods bool `json:"deleteAllPods,omitempty"` + + // DeleteAfter specifies after how many seconds of inactivity the space should be deleted + // +optional + DeleteAfter int64 `json:"deleteAfter,omitempty"` + + // SleepAfter specifies after how many seconds of inactivity the space should sleep + // +optional + SleepAfter int64 `json:"sleepAfter,omitempty"` + + // SleepSchedule specifies scheduled space sleep in Cron format, see https://en.wikipedia.org/wiki/Cron. + // Note: timezone defined in the schedule string will be ignored. Use ".Spec.Timezone" field instead. + // +optional + SleepSchedule string `json:"sleepSchedule,omitempty"` + + // WakeupSchedule specifies scheduled wakeup from sleep in Cron format, see https://en.wikipedia.org/wiki/Cron. + // Note: timezone defined in the schedule string will be ignored. Use ".Spec.Timezone" field instead. + // +optional + WakeupSchedule string `json:"wakeupSchedule,omitempty"` + + // Timezone specifies time zone used for scheduled space operations. Defaults to UTC. + // Accepts the same format as time.LoadLocation() in Go (https://pkg.go.dev/time#LoadLocation). + // The value should be a location name corresponding to a file in the IANA Time Zone database, such as "America/New_York". + // +optional + Timezone string `json:"timezone,omitempty"` + + // IgnoreActiveConnections ignores active connections on the namespace + // +optional + IgnoreActiveConnections bool `json:"ignoreActiveConnections,omitempty"` + + // IgnoreAll ignores all requests + // +optional + IgnoreAll bool `json:"ignoreAll,omitempty"` + + // IgnoreIngresses ignores all ingresses + // +optional + IgnoreIngresses bool `json:"ignoreIngresses,omitempty"` + + // IgnoreVClusters ignores vcluster requests + // +optional + IgnoreVClusters bool `json:"ignoreVClusters,omitempty"` + + // IgnoreGroups are ignored user groups + // +optional + IgnoreGroups string `json:"ignoreGroups,omitempty"` + + // IgnoreVerbs are ignored request verbs + // +optional + IgnoreVerbs string `json:"ignoreVerbs,omitempty"` + + // IgnoreResources are ignored request resources + // +optional + IgnoreResources string `json:"ignoreResources,omitempty"` + + // IgnoreResourceVerbs are ignored resource verbs + // +optional + IgnoreResourceVerbs string `json:"ignoreResourceVerbs,omitempty"` + + // IgnoreResourceNames are ignored resources and names + // +optional + IgnoreResourceNames string `json:"ignoreResourceNames,omitempty"` +} + +type SleepModeConfigStatus struct { + // LastActivity indicates the last activity in the namespace + // +optional + LastActivity int64 `json:"lastActivity,omitempty"` + + // LastActivityInfo holds information about the last activity within this space + // +optional + LastActivityInfo *LastActivityInfo `json:"lastActivityInfo,omitempty"` + + // SleepingSince specifies since when the space is sleeping (if this is not specified, loft assumes the space is not sleeping) + // +optional + SleepingSince int64 `json:"sleepingSince,omitempty"` + + // Optional info that indicates how long the space was sleeping in the current epoch + // +optional + CurrentEpoch *EpochInfo `json:"currentEpoch,omitempty"` + + // Optional info that indicates how long the space was sleeping in the current epoch + // +optional + LastEpoch *EpochInfo `json:"lastEpoch,omitempty"` + + // This is a calculated field that will be returned but not saved and describes the percentage since the space + // was created or the last 30 days the space has slept + // +optional + SleptLastThirtyDays *float64 `json:"sleptLastThirtyDays,omitempty"` + + // This is a calculated field that will be returned but not saved and describes the percentage since the space + // was created or the last 7 days the space has slept + // +optional + SleptLastSevenDays *float64 `json:"sleptLastSevenDays,omitempty"` + + // Indicates time of the next scheduled sleep based on .Spec.SleepSchedule and .Spec.ScheduleTimeZone + // The time is a Unix time, the number of seconds elapsed since January 1, 1970 UTC + // +optional + ScheduledSleep *int64 `json:"scheduledSleep,omitempty"` + + // Indicates time of the next scheduled wakeup based on .Spec.WakeupSchedule and .Spec.ScheduleTimeZone + // The time is a Unix time, the number of seconds elapsed since January 1, 1970 UTC + // +optional + ScheduledWakeup *int64 `json:"scheduledWakeup,omitempty"` + + // SleepType specifies a type of sleep, which has effect on which actions will cause the space to wake up. + // +optional + SleepType string `json:"sleepType,omitempty"` +} + +// EpochInfo holds information about how long the space was sleeping in the epoch +type EpochInfo struct { + // Timestamp when the epoch has started + // +optional + Start int64 `json:"start,omitempty"` + // Amount of milliseconds the space has slept in the epoch + // +optional + Slept int64 `json:"slept,omitempty"` +} + +// LastActivityInfo holds information about the last activity +type LastActivityInfo struct { + // Subject is the user or team where this activity was recorded + // +optional + Subject string `json:"subject,omitempty"` + + // Host is the host where this activity was recorded + // +optional + Host string `json:"host,omitempty"` + + // Verb is the verb that was used for the request + // +optional + Verb string `json:"verb,omitempty"` + + // APIGroup is the api group that was used for the request + // +optional + APIGroup string `json:"apiGroup,omitempty"` + + // Resource is the resource of the request + // +optional + Resource string `json:"resource,omitempty"` + + // Subresource is the subresource of the request + // +optional + Subresource string `json:"subresource,omitempty"` + + // Name is the name of the resource + // +optional + Name string `json:"name,omitempty"` + + // VirtualCluster is the virtual cluster this activity happened in + // +optional + VirtualCluster string `json:"virtualCluster,omitempty"` +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/space_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/space_types.go new file mode 100644 index 000000000..d52556b40 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/space_types.go @@ -0,0 +1,145 @@ +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + SpacePodSecurityLabel = "policy.loft.sh/pod-security" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Space +// +k8s:openapi-gen=true +// +resource:path=spaces,rest=SpaceREST +type Space struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SpaceSpec `json:"spec,omitempty"` + Status SpaceStatus `json:"status,omitempty"` +} + +// SpaceSpec defines the desired state of Space +type SpaceSpec struct { + // User is the owning user of the space + // +optional + User string `json:"user,omitempty"` + + // Team is the owning team of the space + // +optional + Team string `json:"team,omitempty"` + + // Objects are Kubernetes style yamls that should get deployed into the space + // +optional + Objects string `json:"objects,omitempty"` + + // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. + // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ + // +optional + Finalizers []corev1.FinalizerName `json:"finalizers,omitempty"` +} + +// SpaceStatus defines the observed state of Space +type SpaceStatus struct { + // Phase is the current lifecycle phase of the namespace. + // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ + // +optional + Phase corev1.NamespacePhase `json:"phase,omitempty"` + + // SleepModeConfig is the sleep mode config of the space + // +optional + SleepModeConfig *SleepModeConfig `json:"sleepModeConfig,omitempty"` + + // Owner describes the owner of the space. This can be either empty (nil), be a team or + // an loft user. If the space has an account that does not belong to an user / team in loft + // this is empty + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // SpaceObjectsStatus describes the status of applying space objects. + // +optional + SpaceObjectsStatus *SpaceObjectsNamespaceStatus `json:"spaceObjectsStatus,omitempty"` + + // TemplateSyncStatus describes the template sync status + // +optional + TemplateSyncStatus *TemplateSyncStatus `json:"templateSyncStatus,omitempty"` +} + +type TemplateSyncStatus struct { + // Template is the json string of the template that was applied + Template string `json:"template,omitempty"` + + // Phase indicates the current phase the template is in + Phase string `json:"phase,omitempty"` +} + +const ( + OutOfSyncPhase = "OutOfSync" +) + +type SpaceConstraintNamespaceStatus struct { + // SpaceConstraint are the applied space constraints + SpaceConstraint string `json:"spaceConstraint,omitempty"` + + // User that was used to apply the space constraints + User string `json:"user,omitempty"` + + // Team that was used to apply the space constraints + Team string `json:"team,omitempty"` + + // ObservedGeneration of the space constraint + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // Phase the namespace is in + Phase string `json:"phase,omitempty"` + + // Reason why this namespace is in the current phase + Reason string `json:"reason,omitempty"` + + // Message is the human-readable message why this space is in this phase + Message string `json:"message,omitempty"` + + // AppliedClusterRole is the cluster role that was bound to this namespace + AppliedClusterRole *string `json:"appliedClusterRole,omitempty"` + + // AppliedMetadata is the metadata that was applied on the space + AppliedMetadata AppliedMetadata `json:"appliedMetadata,omitempty"` + + // AppliedObjects are the objects that were applied on this namespace by the space constraint + AppliedObjects []AppliedObject `json:"appliedObjects,omitempty"` +} + +type SpaceObjectsNamespaceStatus struct { + // Phase the namespace is in + Phase string `json:"phase,omitempty"` + + // Reason why this namespace is in the current phase + Reason string `json:"reason,omitempty"` + + // Message is the human-readable message why this space is in this phase + Message string `json:"message,omitempty"` + + // AppliedObjects are the objects that were applied on this namespace by the space spec objects + AppliedObjects []AppliedObject `json:"appliedObjects,omitempty"` +} + +type AppliedMetadata struct { + Annotations map[string]string `json:"annotations,omitempty"` + Labels map[string]string `json:"labels,omitempty"` +} + +type AppliedObject struct { + APIVersion string `json:"apiVersion,omitempty"` + Kind string `json:"kind,omitempty"` + Name string `json:"name,omitempty"` +} + +const ( + PhaseSynced = "Synced" + PhaseError = "Error" +) diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/virtualcluster_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/virtualcluster_types.go new file mode 100644 index 000000000..8ae51dbb4 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/virtualcluster_types.go @@ -0,0 +1,45 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualCluster holds the virtual cluster information +// +k8s:openapi-gen=true +// +resource:path=virtualclusters,rest=VirtualClusterREST +type VirtualCluster struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualClusterSpec `json:"spec,omitempty"` + Status VirtualClusterStatus `json:"status,omitempty"` +} + +type VirtualClusterSpec struct { + agentstoragev1.VirtualClusterSpec `json:",inline"` +} + +type VirtualClusterStatus struct { + agentstoragev1.VirtualClusterStatus `json:",inline"` + + // SyncerPod is the syncer pod + // +optional + SyncerPod *corev1.Pod `json:"syncerPod,omitempty"` + + // ClusterPod is the cluster pod + // +optional + ClusterPod *corev1.Pod `json:"clusterPod,omitempty"` + + // SleepModeConfig is the sleep mode config of the space + // +optional + SleepModeConfig *SleepModeConfig `json:"sleepModeConfig,omitempty"` + + // TemplateSyncStatus describes the template sync status + // +optional + TemplateSyncStatus *TemplateSyncStatus `json:"templateSyncStatus,omitempty"` +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.api.register.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.api.register.go new file mode 100644 index 000000000..e987facb5 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.api.register.go @@ -0,0 +1,139 @@ +// Code generated by generator. DO NOT EDIT. + +package v1 + +import ( + "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster" + "github.com/loft-sh/apiserver/pkg/builders" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func addKnownTypes(scheme *runtime.Scheme) error { + // TODO this will get cleaned up with the scheme types are fixed + scheme.AddKnownTypes(SchemeGroupVersion, + &ChartInfo{}, + &ChartInfoList{}, + &ClusterQuota{}, + &ClusterQuotaList{}, + &Feature{}, + &FeatureList{}, + &HelmRelease{}, + &HelmReleaseList{}, + &LocalClusterAccess{}, + &LocalClusterAccessList{}, + &SleepModeConfig{}, + &SleepModeConfigList{}, + &Space{}, + &SpaceList{}, + &VirtualCluster{}, + &VirtualClusterList{}, + ) + return nil +} + +var ( + ApiVersion = builders.NewApiVersion("cluster.loft.sh", "v1").WithResources( + cluster.ClusterChartInfoStorage, + cluster.ClusterClusterQuotaStorage, + cluster.ClusterFeatureStorage, + cluster.ClusterHelmReleaseStorage, + cluster.ClusterLocalClusterAccessStorage, + cluster.ClusterSleepModeConfigStorage, + cluster.ClusterSpaceStorage, + cluster.ClusterVirtualClusterStorage, + ) + + // Required by code generated by go2idl + AddToScheme = (&runtime.SchemeBuilder{ + ApiVersion.SchemeBuilder.AddToScheme, + RegisterDefaults, + RegisterConversions, + addKnownTypes, + func(scheme *runtime.Scheme) error { + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil + }, + }).AddToScheme + + SchemeBuilder = ApiVersion.SchemeBuilder + localSchemeBuilder = SchemeBuilder + SchemeGroupVersion = ApiVersion.GroupVersion +) + +// Required by code generated by go2idl +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Required by code generated by go2idl +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ChartInfoList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ChartInfo `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterQuotaList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterQuota `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type FeatureList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Feature `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type HelmReleaseList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []HelmRelease `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LocalClusterAccessList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []LocalClusterAccess `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SleepModeConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SleepModeConfig `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Space `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualCluster `json:"items"` +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.conversion.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.conversion.go new file mode 100644 index 000000000..877b46423 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.conversion.go @@ -0,0 +1,1645 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1 + +import ( + unsafe "unsafe" + + cluster "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster" + corev1 "k8s.io/api/core/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*AppliedObject)(nil), (*cluster.AppliedObject)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AppliedObject_To_cluster_AppliedObject(a.(*AppliedObject), b.(*cluster.AppliedObject), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.AppliedObject)(nil), (*AppliedObject)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_AppliedObject_To_v1_AppliedObject(a.(*cluster.AppliedObject), b.(*AppliedObject), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Bash)(nil), (*cluster.Bash)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Bash_To_cluster_Bash(a.(*Bash), b.(*cluster.Bash), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.Bash)(nil), (*Bash)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_Bash_To_v1_Bash(a.(*cluster.Bash), b.(*Bash), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ChartInfo)(nil), (*cluster.ChartInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ChartInfo_To_cluster_ChartInfo(a.(*ChartInfo), b.(*cluster.ChartInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.ChartInfo)(nil), (*ChartInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_ChartInfo_To_v1_ChartInfo(a.(*cluster.ChartInfo), b.(*ChartInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ChartInfoList)(nil), (*cluster.ChartInfoList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ChartInfoList_To_cluster_ChartInfoList(a.(*ChartInfoList), b.(*cluster.ChartInfoList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.ChartInfoList)(nil), (*ChartInfoList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_ChartInfoList_To_v1_ChartInfoList(a.(*cluster.ChartInfoList), b.(*ChartInfoList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ChartInfoSpec)(nil), (*cluster.ChartInfoSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ChartInfoSpec_To_cluster_ChartInfoSpec(a.(*ChartInfoSpec), b.(*cluster.ChartInfoSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.ChartInfoSpec)(nil), (*ChartInfoSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_ChartInfoSpec_To_v1_ChartInfoSpec(a.(*cluster.ChartInfoSpec), b.(*ChartInfoSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ChartInfoStatus)(nil), (*cluster.ChartInfoStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ChartInfoStatus_To_cluster_ChartInfoStatus(a.(*ChartInfoStatus), b.(*cluster.ChartInfoStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.ChartInfoStatus)(nil), (*ChartInfoStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_ChartInfoStatus_To_v1_ChartInfoStatus(a.(*cluster.ChartInfoStatus), b.(*ChartInfoStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterQuota)(nil), (*cluster.ClusterQuota)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterQuota_To_cluster_ClusterQuota(a.(*ClusterQuota), b.(*cluster.ClusterQuota), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.ClusterQuota)(nil), (*ClusterQuota)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_ClusterQuota_To_v1_ClusterQuota(a.(*cluster.ClusterQuota), b.(*ClusterQuota), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterQuotaList)(nil), (*cluster.ClusterQuotaList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterQuotaList_To_cluster_ClusterQuotaList(a.(*ClusterQuotaList), b.(*cluster.ClusterQuotaList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.ClusterQuotaList)(nil), (*ClusterQuotaList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_ClusterQuotaList_To_v1_ClusterQuotaList(a.(*cluster.ClusterQuotaList), b.(*ClusterQuotaList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterQuotaSpec)(nil), (*cluster.ClusterQuotaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterQuotaSpec_To_cluster_ClusterQuotaSpec(a.(*ClusterQuotaSpec), b.(*cluster.ClusterQuotaSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.ClusterQuotaSpec)(nil), (*ClusterQuotaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_ClusterQuotaSpec_To_v1_ClusterQuotaSpec(a.(*cluster.ClusterQuotaSpec), b.(*ClusterQuotaSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterQuotaStatus)(nil), (*cluster.ClusterQuotaStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterQuotaStatus_To_cluster_ClusterQuotaStatus(a.(*ClusterQuotaStatus), b.(*cluster.ClusterQuotaStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.ClusterQuotaStatus)(nil), (*ClusterQuotaStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_ClusterQuotaStatus_To_v1_ClusterQuotaStatus(a.(*cluster.ClusterQuotaStatus), b.(*ClusterQuotaStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*EntityInfo)(nil), (*cluster.EntityInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_EntityInfo_To_cluster_EntityInfo(a.(*EntityInfo), b.(*cluster.EntityInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.EntityInfo)(nil), (*EntityInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_EntityInfo_To_v1_EntityInfo(a.(*cluster.EntityInfo), b.(*EntityInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*EpochInfo)(nil), (*cluster.EpochInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_EpochInfo_To_cluster_EpochInfo(a.(*EpochInfo), b.(*cluster.EpochInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.EpochInfo)(nil), (*EpochInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_EpochInfo_To_v1_EpochInfo(a.(*cluster.EpochInfo), b.(*EpochInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Feature)(nil), (*cluster.Feature)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Feature_To_cluster_Feature(a.(*Feature), b.(*cluster.Feature), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.Feature)(nil), (*Feature)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_Feature_To_v1_Feature(a.(*cluster.Feature), b.(*Feature), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FeatureList)(nil), (*cluster.FeatureList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_FeatureList_To_cluster_FeatureList(a.(*FeatureList), b.(*cluster.FeatureList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.FeatureList)(nil), (*FeatureList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_FeatureList_To_v1_FeatureList(a.(*cluster.FeatureList), b.(*FeatureList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FeatureSpec)(nil), (*cluster.FeatureSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_FeatureSpec_To_cluster_FeatureSpec(a.(*FeatureSpec), b.(*cluster.FeatureSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.FeatureSpec)(nil), (*FeatureSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_FeatureSpec_To_v1_FeatureSpec(a.(*cluster.FeatureSpec), b.(*FeatureSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FeatureStatus)(nil), (*cluster.FeatureStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_FeatureStatus_To_cluster_FeatureStatus(a.(*FeatureStatus), b.(*cluster.FeatureStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.FeatureStatus)(nil), (*FeatureStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_FeatureStatus_To_v1_FeatureStatus(a.(*cluster.FeatureStatus), b.(*FeatureStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HelmRelease)(nil), (*cluster.HelmRelease)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HelmRelease_To_cluster_HelmRelease(a.(*HelmRelease), b.(*cluster.HelmRelease), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.HelmRelease)(nil), (*HelmRelease)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_HelmRelease_To_v1_HelmRelease(a.(*cluster.HelmRelease), b.(*HelmRelease), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HelmReleaseConfig)(nil), (*cluster.HelmReleaseConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HelmReleaseConfig_To_cluster_HelmReleaseConfig(a.(*HelmReleaseConfig), b.(*cluster.HelmReleaseConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.HelmReleaseConfig)(nil), (*HelmReleaseConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_HelmReleaseConfig_To_v1_HelmReleaseConfig(a.(*cluster.HelmReleaseConfig), b.(*HelmReleaseConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HelmReleaseList)(nil), (*cluster.HelmReleaseList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HelmReleaseList_To_cluster_HelmReleaseList(a.(*HelmReleaseList), b.(*cluster.HelmReleaseList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.HelmReleaseList)(nil), (*HelmReleaseList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_HelmReleaseList_To_v1_HelmReleaseList(a.(*cluster.HelmReleaseList), b.(*HelmReleaseList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HelmReleaseSpec)(nil), (*cluster.HelmReleaseSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HelmReleaseSpec_To_cluster_HelmReleaseSpec(a.(*HelmReleaseSpec), b.(*cluster.HelmReleaseSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.HelmReleaseSpec)(nil), (*HelmReleaseSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_HelmReleaseSpec_To_v1_HelmReleaseSpec(a.(*cluster.HelmReleaseSpec), b.(*HelmReleaseSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HelmReleaseStatus)(nil), (*cluster.HelmReleaseStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HelmReleaseStatus_To_cluster_HelmReleaseStatus(a.(*HelmReleaseStatus), b.(*cluster.HelmReleaseStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.HelmReleaseStatus)(nil), (*HelmReleaseStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_HelmReleaseStatus_To_v1_HelmReleaseStatus(a.(*cluster.HelmReleaseStatus), b.(*HelmReleaseStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Info)(nil), (*cluster.Info)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Info_To_cluster_Info(a.(*Info), b.(*cluster.Info), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.Info)(nil), (*Info)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_Info_To_v1_Info(a.(*cluster.Info), b.(*Info), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LastActivityInfo)(nil), (*cluster.LastActivityInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LastActivityInfo_To_cluster_LastActivityInfo(a.(*LastActivityInfo), b.(*cluster.LastActivityInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.LastActivityInfo)(nil), (*LastActivityInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_LastActivityInfo_To_v1_LastActivityInfo(a.(*cluster.LastActivityInfo), b.(*LastActivityInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LocalClusterAccess)(nil), (*cluster.LocalClusterAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LocalClusterAccess_To_cluster_LocalClusterAccess(a.(*LocalClusterAccess), b.(*cluster.LocalClusterAccess), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.LocalClusterAccess)(nil), (*LocalClusterAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_LocalClusterAccess_To_v1_LocalClusterAccess(a.(*cluster.LocalClusterAccess), b.(*LocalClusterAccess), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LocalClusterAccessList)(nil), (*cluster.LocalClusterAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LocalClusterAccessList_To_cluster_LocalClusterAccessList(a.(*LocalClusterAccessList), b.(*cluster.LocalClusterAccessList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.LocalClusterAccessList)(nil), (*LocalClusterAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_LocalClusterAccessList_To_v1_LocalClusterAccessList(a.(*cluster.LocalClusterAccessList), b.(*LocalClusterAccessList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LocalClusterAccessSpec)(nil), (*cluster.LocalClusterAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LocalClusterAccessSpec_To_cluster_LocalClusterAccessSpec(a.(*LocalClusterAccessSpec), b.(*cluster.LocalClusterAccessSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.LocalClusterAccessSpec)(nil), (*LocalClusterAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_LocalClusterAccessSpec_To_v1_LocalClusterAccessSpec(a.(*cluster.LocalClusterAccessSpec), b.(*LocalClusterAccessSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LocalClusterAccessStatus)(nil), (*cluster.LocalClusterAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LocalClusterAccessStatus_To_cluster_LocalClusterAccessStatus(a.(*LocalClusterAccessStatus), b.(*cluster.LocalClusterAccessStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.LocalClusterAccessStatus)(nil), (*LocalClusterAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_LocalClusterAccessStatus_To_v1_LocalClusterAccessStatus(a.(*cluster.LocalClusterAccessStatus), b.(*LocalClusterAccessStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Maintainer)(nil), (*cluster.Maintainer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Maintainer_To_cluster_Maintainer(a.(*Maintainer), b.(*cluster.Maintainer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.Maintainer)(nil), (*Maintainer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_Maintainer_To_v1_Maintainer(a.(*cluster.Maintainer), b.(*Maintainer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Metadata)(nil), (*cluster.Metadata)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Metadata_To_cluster_Metadata(a.(*Metadata), b.(*cluster.Metadata), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.Metadata)(nil), (*Metadata)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_Metadata_To_v1_Metadata(a.(*cluster.Metadata), b.(*Metadata), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SleepModeConfig)(nil), (*cluster.SleepModeConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SleepModeConfig_To_cluster_SleepModeConfig(a.(*SleepModeConfig), b.(*cluster.SleepModeConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.SleepModeConfig)(nil), (*SleepModeConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_SleepModeConfig_To_v1_SleepModeConfig(a.(*cluster.SleepModeConfig), b.(*SleepModeConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SleepModeConfigList)(nil), (*cluster.SleepModeConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SleepModeConfigList_To_cluster_SleepModeConfigList(a.(*SleepModeConfigList), b.(*cluster.SleepModeConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.SleepModeConfigList)(nil), (*SleepModeConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_SleepModeConfigList_To_v1_SleepModeConfigList(a.(*cluster.SleepModeConfigList), b.(*SleepModeConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SleepModeConfigSpec)(nil), (*cluster.SleepModeConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SleepModeConfigSpec_To_cluster_SleepModeConfigSpec(a.(*SleepModeConfigSpec), b.(*cluster.SleepModeConfigSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.SleepModeConfigSpec)(nil), (*SleepModeConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_SleepModeConfigSpec_To_v1_SleepModeConfigSpec(a.(*cluster.SleepModeConfigSpec), b.(*SleepModeConfigSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SleepModeConfigStatus)(nil), (*cluster.SleepModeConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SleepModeConfigStatus_To_cluster_SleepModeConfigStatus(a.(*SleepModeConfigStatus), b.(*cluster.SleepModeConfigStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.SleepModeConfigStatus)(nil), (*SleepModeConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_SleepModeConfigStatus_To_v1_SleepModeConfigStatus(a.(*cluster.SleepModeConfigStatus), b.(*SleepModeConfigStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Space)(nil), (*cluster.Space)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Space_To_cluster_Space(a.(*Space), b.(*cluster.Space), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.Space)(nil), (*Space)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_Space_To_v1_Space(a.(*cluster.Space), b.(*Space), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceList)(nil), (*cluster.SpaceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceList_To_cluster_SpaceList(a.(*SpaceList), b.(*cluster.SpaceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.SpaceList)(nil), (*SpaceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_SpaceList_To_v1_SpaceList(a.(*cluster.SpaceList), b.(*SpaceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceObjectsNamespaceStatus)(nil), (*cluster.SpaceObjectsNamespaceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceObjectsNamespaceStatus_To_cluster_SpaceObjectsNamespaceStatus(a.(*SpaceObjectsNamespaceStatus), b.(*cluster.SpaceObjectsNamespaceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.SpaceObjectsNamespaceStatus)(nil), (*SpaceObjectsNamespaceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_SpaceObjectsNamespaceStatus_To_v1_SpaceObjectsNamespaceStatus(a.(*cluster.SpaceObjectsNamespaceStatus), b.(*SpaceObjectsNamespaceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceSpec)(nil), (*cluster.SpaceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceSpec_To_cluster_SpaceSpec(a.(*SpaceSpec), b.(*cluster.SpaceSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.SpaceSpec)(nil), (*SpaceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_SpaceSpec_To_v1_SpaceSpec(a.(*cluster.SpaceSpec), b.(*SpaceSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceStatus)(nil), (*cluster.SpaceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceStatus_To_cluster_SpaceStatus(a.(*SpaceStatus), b.(*cluster.SpaceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.SpaceStatus)(nil), (*SpaceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_SpaceStatus_To_v1_SpaceStatus(a.(*cluster.SpaceStatus), b.(*SpaceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TemplateSyncStatus)(nil), (*cluster.TemplateSyncStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TemplateSyncStatus_To_cluster_TemplateSyncStatus(a.(*TemplateSyncStatus), b.(*cluster.TemplateSyncStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.TemplateSyncStatus)(nil), (*TemplateSyncStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_TemplateSyncStatus_To_v1_TemplateSyncStatus(a.(*cluster.TemplateSyncStatus), b.(*TemplateSyncStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserOrTeam)(nil), (*cluster.UserOrTeam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserOrTeam_To_cluster_UserOrTeam(a.(*UserOrTeam), b.(*cluster.UserOrTeam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.UserOrTeam)(nil), (*UserOrTeam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_UserOrTeam_To_v1_UserOrTeam(a.(*cluster.UserOrTeam), b.(*UserOrTeam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualCluster)(nil), (*cluster.VirtualCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualCluster_To_cluster_VirtualCluster(a.(*VirtualCluster), b.(*cluster.VirtualCluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.VirtualCluster)(nil), (*VirtualCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_VirtualCluster_To_v1_VirtualCluster(a.(*cluster.VirtualCluster), b.(*VirtualCluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterList)(nil), (*cluster.VirtualClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterList_To_cluster_VirtualClusterList(a.(*VirtualClusterList), b.(*cluster.VirtualClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.VirtualClusterList)(nil), (*VirtualClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_VirtualClusterList_To_v1_VirtualClusterList(a.(*cluster.VirtualClusterList), b.(*VirtualClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterSpec)(nil), (*cluster.VirtualClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterSpec_To_cluster_VirtualClusterSpec(a.(*VirtualClusterSpec), b.(*cluster.VirtualClusterSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.VirtualClusterSpec)(nil), (*VirtualClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_VirtualClusterSpec_To_v1_VirtualClusterSpec(a.(*cluster.VirtualClusterSpec), b.(*VirtualClusterSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterStatus)(nil), (*cluster.VirtualClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterStatus_To_cluster_VirtualClusterStatus(a.(*VirtualClusterStatus), b.(*cluster.VirtualClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*cluster.VirtualClusterStatus)(nil), (*VirtualClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_cluster_VirtualClusterStatus_To_v1_VirtualClusterStatus(a.(*cluster.VirtualClusterStatus), b.(*VirtualClusterStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1_AppliedObject_To_cluster_AppliedObject(in *AppliedObject, out *cluster.AppliedObject, s conversion.Scope) error { + out.APIVersion = in.APIVersion + out.Kind = in.Kind + out.Name = in.Name + return nil +} + +// Convert_v1_AppliedObject_To_cluster_AppliedObject is an autogenerated conversion function. +func Convert_v1_AppliedObject_To_cluster_AppliedObject(in *AppliedObject, out *cluster.AppliedObject, s conversion.Scope) error { + return autoConvert_v1_AppliedObject_To_cluster_AppliedObject(in, out, s) +} + +func autoConvert_cluster_AppliedObject_To_v1_AppliedObject(in *cluster.AppliedObject, out *AppliedObject, s conversion.Scope) error { + out.APIVersion = in.APIVersion + out.Kind = in.Kind + out.Name = in.Name + return nil +} + +// Convert_cluster_AppliedObject_To_v1_AppliedObject is an autogenerated conversion function. +func Convert_cluster_AppliedObject_To_v1_AppliedObject(in *cluster.AppliedObject, out *AppliedObject, s conversion.Scope) error { + return autoConvert_cluster_AppliedObject_To_v1_AppliedObject(in, out, s) +} + +func autoConvert_v1_Bash_To_cluster_Bash(in *Bash, out *cluster.Bash, s conversion.Scope) error { + out.Script = in.Script + out.Image = in.Image + out.ClusterRole = in.ClusterRole + return nil +} + +// Convert_v1_Bash_To_cluster_Bash is an autogenerated conversion function. +func Convert_v1_Bash_To_cluster_Bash(in *Bash, out *cluster.Bash, s conversion.Scope) error { + return autoConvert_v1_Bash_To_cluster_Bash(in, out, s) +} + +func autoConvert_cluster_Bash_To_v1_Bash(in *cluster.Bash, out *Bash, s conversion.Scope) error { + out.Script = in.Script + out.Image = in.Image + out.ClusterRole = in.ClusterRole + return nil +} + +// Convert_cluster_Bash_To_v1_Bash is an autogenerated conversion function. +func Convert_cluster_Bash_To_v1_Bash(in *cluster.Bash, out *Bash, s conversion.Scope) error { + return autoConvert_cluster_Bash_To_v1_Bash(in, out, s) +} + +func autoConvert_v1_ChartInfo_To_cluster_ChartInfo(in *ChartInfo, out *cluster.ChartInfo, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ChartInfoSpec_To_cluster_ChartInfoSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ChartInfoStatus_To_cluster_ChartInfoStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ChartInfo_To_cluster_ChartInfo is an autogenerated conversion function. +func Convert_v1_ChartInfo_To_cluster_ChartInfo(in *ChartInfo, out *cluster.ChartInfo, s conversion.Scope) error { + return autoConvert_v1_ChartInfo_To_cluster_ChartInfo(in, out, s) +} + +func autoConvert_cluster_ChartInfo_To_v1_ChartInfo(in *cluster.ChartInfo, out *ChartInfo, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_cluster_ChartInfoSpec_To_v1_ChartInfoSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_cluster_ChartInfoStatus_To_v1_ChartInfoStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_cluster_ChartInfo_To_v1_ChartInfo is an autogenerated conversion function. +func Convert_cluster_ChartInfo_To_v1_ChartInfo(in *cluster.ChartInfo, out *ChartInfo, s conversion.Scope) error { + return autoConvert_cluster_ChartInfo_To_v1_ChartInfo(in, out, s) +} + +func autoConvert_v1_ChartInfoList_To_cluster_ChartInfoList(in *ChartInfoList, out *cluster.ChartInfoList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]cluster.ChartInfo)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ChartInfoList_To_cluster_ChartInfoList is an autogenerated conversion function. +func Convert_v1_ChartInfoList_To_cluster_ChartInfoList(in *ChartInfoList, out *cluster.ChartInfoList, s conversion.Scope) error { + return autoConvert_v1_ChartInfoList_To_cluster_ChartInfoList(in, out, s) +} + +func autoConvert_cluster_ChartInfoList_To_v1_ChartInfoList(in *cluster.ChartInfoList, out *ChartInfoList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ChartInfo)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_cluster_ChartInfoList_To_v1_ChartInfoList is an autogenerated conversion function. +func Convert_cluster_ChartInfoList_To_v1_ChartInfoList(in *cluster.ChartInfoList, out *ChartInfoList, s conversion.Scope) error { + return autoConvert_cluster_ChartInfoList_To_v1_ChartInfoList(in, out, s) +} + +func autoConvert_v1_ChartInfoSpec_To_cluster_ChartInfoSpec(in *ChartInfoSpec, out *cluster.ChartInfoSpec, s conversion.Scope) error { + out.Chart = in.Chart + return nil +} + +// Convert_v1_ChartInfoSpec_To_cluster_ChartInfoSpec is an autogenerated conversion function. +func Convert_v1_ChartInfoSpec_To_cluster_ChartInfoSpec(in *ChartInfoSpec, out *cluster.ChartInfoSpec, s conversion.Scope) error { + return autoConvert_v1_ChartInfoSpec_To_cluster_ChartInfoSpec(in, out, s) +} + +func autoConvert_cluster_ChartInfoSpec_To_v1_ChartInfoSpec(in *cluster.ChartInfoSpec, out *ChartInfoSpec, s conversion.Scope) error { + out.Chart = in.Chart + return nil +} + +// Convert_cluster_ChartInfoSpec_To_v1_ChartInfoSpec is an autogenerated conversion function. +func Convert_cluster_ChartInfoSpec_To_v1_ChartInfoSpec(in *cluster.ChartInfoSpec, out *ChartInfoSpec, s conversion.Scope) error { + return autoConvert_cluster_ChartInfoSpec_To_v1_ChartInfoSpec(in, out, s) +} + +func autoConvert_v1_ChartInfoStatus_To_cluster_ChartInfoStatus(in *ChartInfoStatus, out *cluster.ChartInfoStatus, s conversion.Scope) error { + out.Metadata = (*cluster.Metadata)(unsafe.Pointer(in.Metadata)) + out.Readme = in.Readme + out.Values = in.Values + return nil +} + +// Convert_v1_ChartInfoStatus_To_cluster_ChartInfoStatus is an autogenerated conversion function. +func Convert_v1_ChartInfoStatus_To_cluster_ChartInfoStatus(in *ChartInfoStatus, out *cluster.ChartInfoStatus, s conversion.Scope) error { + return autoConvert_v1_ChartInfoStatus_To_cluster_ChartInfoStatus(in, out, s) +} + +func autoConvert_cluster_ChartInfoStatus_To_v1_ChartInfoStatus(in *cluster.ChartInfoStatus, out *ChartInfoStatus, s conversion.Scope) error { + out.Metadata = (*Metadata)(unsafe.Pointer(in.Metadata)) + out.Readme = in.Readme + out.Values = in.Values + return nil +} + +// Convert_cluster_ChartInfoStatus_To_v1_ChartInfoStatus is an autogenerated conversion function. +func Convert_cluster_ChartInfoStatus_To_v1_ChartInfoStatus(in *cluster.ChartInfoStatus, out *ChartInfoStatus, s conversion.Scope) error { + return autoConvert_cluster_ChartInfoStatus_To_v1_ChartInfoStatus(in, out, s) +} + +func autoConvert_v1_ClusterQuota_To_cluster_ClusterQuota(in *ClusterQuota, out *cluster.ClusterQuota, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ClusterQuotaSpec_To_cluster_ClusterQuotaSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ClusterQuotaStatus_To_cluster_ClusterQuotaStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ClusterQuota_To_cluster_ClusterQuota is an autogenerated conversion function. +func Convert_v1_ClusterQuota_To_cluster_ClusterQuota(in *ClusterQuota, out *cluster.ClusterQuota, s conversion.Scope) error { + return autoConvert_v1_ClusterQuota_To_cluster_ClusterQuota(in, out, s) +} + +func autoConvert_cluster_ClusterQuota_To_v1_ClusterQuota(in *cluster.ClusterQuota, out *ClusterQuota, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_cluster_ClusterQuotaSpec_To_v1_ClusterQuotaSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_cluster_ClusterQuotaStatus_To_v1_ClusterQuotaStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_cluster_ClusterQuota_To_v1_ClusterQuota is an autogenerated conversion function. +func Convert_cluster_ClusterQuota_To_v1_ClusterQuota(in *cluster.ClusterQuota, out *ClusterQuota, s conversion.Scope) error { + return autoConvert_cluster_ClusterQuota_To_v1_ClusterQuota(in, out, s) +} + +func autoConvert_v1_ClusterQuotaList_To_cluster_ClusterQuotaList(in *ClusterQuotaList, out *cluster.ClusterQuotaList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]cluster.ClusterQuota)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterQuotaList_To_cluster_ClusterQuotaList is an autogenerated conversion function. +func Convert_v1_ClusterQuotaList_To_cluster_ClusterQuotaList(in *ClusterQuotaList, out *cluster.ClusterQuotaList, s conversion.Scope) error { + return autoConvert_v1_ClusterQuotaList_To_cluster_ClusterQuotaList(in, out, s) +} + +func autoConvert_cluster_ClusterQuotaList_To_v1_ClusterQuotaList(in *cluster.ClusterQuotaList, out *ClusterQuotaList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterQuota)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_cluster_ClusterQuotaList_To_v1_ClusterQuotaList is an autogenerated conversion function. +func Convert_cluster_ClusterQuotaList_To_v1_ClusterQuotaList(in *cluster.ClusterQuotaList, out *ClusterQuotaList, s conversion.Scope) error { + return autoConvert_cluster_ClusterQuotaList_To_v1_ClusterQuotaList(in, out, s) +} + +func autoConvert_v1_ClusterQuotaSpec_To_cluster_ClusterQuotaSpec(in *ClusterQuotaSpec, out *cluster.ClusterQuotaSpec, s conversion.Scope) error { + out.ClusterQuotaSpec = in.ClusterQuotaSpec + return nil +} + +// Convert_v1_ClusterQuotaSpec_To_cluster_ClusterQuotaSpec is an autogenerated conversion function. +func Convert_v1_ClusterQuotaSpec_To_cluster_ClusterQuotaSpec(in *ClusterQuotaSpec, out *cluster.ClusterQuotaSpec, s conversion.Scope) error { + return autoConvert_v1_ClusterQuotaSpec_To_cluster_ClusterQuotaSpec(in, out, s) +} + +func autoConvert_cluster_ClusterQuotaSpec_To_v1_ClusterQuotaSpec(in *cluster.ClusterQuotaSpec, out *ClusterQuotaSpec, s conversion.Scope) error { + out.ClusterQuotaSpec = in.ClusterQuotaSpec + return nil +} + +// Convert_cluster_ClusterQuotaSpec_To_v1_ClusterQuotaSpec is an autogenerated conversion function. +func Convert_cluster_ClusterQuotaSpec_To_v1_ClusterQuotaSpec(in *cluster.ClusterQuotaSpec, out *ClusterQuotaSpec, s conversion.Scope) error { + return autoConvert_cluster_ClusterQuotaSpec_To_v1_ClusterQuotaSpec(in, out, s) +} + +func autoConvert_v1_ClusterQuotaStatus_To_cluster_ClusterQuotaStatus(in *ClusterQuotaStatus, out *cluster.ClusterQuotaStatus, s conversion.Scope) error { + out.ClusterQuotaStatus = in.ClusterQuotaStatus + out.Owner = (*cluster.UserOrTeam)(unsafe.Pointer(in.Owner)) + return nil +} + +// Convert_v1_ClusterQuotaStatus_To_cluster_ClusterQuotaStatus is an autogenerated conversion function. +func Convert_v1_ClusterQuotaStatus_To_cluster_ClusterQuotaStatus(in *ClusterQuotaStatus, out *cluster.ClusterQuotaStatus, s conversion.Scope) error { + return autoConvert_v1_ClusterQuotaStatus_To_cluster_ClusterQuotaStatus(in, out, s) +} + +func autoConvert_cluster_ClusterQuotaStatus_To_v1_ClusterQuotaStatus(in *cluster.ClusterQuotaStatus, out *ClusterQuotaStatus, s conversion.Scope) error { + out.ClusterQuotaStatus = in.ClusterQuotaStatus + out.Owner = (*UserOrTeam)(unsafe.Pointer(in.Owner)) + return nil +} + +// Convert_cluster_ClusterQuotaStatus_To_v1_ClusterQuotaStatus is an autogenerated conversion function. +func Convert_cluster_ClusterQuotaStatus_To_v1_ClusterQuotaStatus(in *cluster.ClusterQuotaStatus, out *ClusterQuotaStatus, s conversion.Scope) error { + return autoConvert_cluster_ClusterQuotaStatus_To_v1_ClusterQuotaStatus(in, out, s) +} + +func autoConvert_v1_EntityInfo_To_cluster_EntityInfo(in *EntityInfo, out *cluster.EntityInfo, s conversion.Scope) error { + out.Name = in.Name + out.DisplayName = in.DisplayName + out.Icon = in.Icon + out.Username = in.Username + out.Email = in.Email + out.Subject = in.Subject + return nil +} + +// Convert_v1_EntityInfo_To_cluster_EntityInfo is an autogenerated conversion function. +func Convert_v1_EntityInfo_To_cluster_EntityInfo(in *EntityInfo, out *cluster.EntityInfo, s conversion.Scope) error { + return autoConvert_v1_EntityInfo_To_cluster_EntityInfo(in, out, s) +} + +func autoConvert_cluster_EntityInfo_To_v1_EntityInfo(in *cluster.EntityInfo, out *EntityInfo, s conversion.Scope) error { + out.Name = in.Name + out.DisplayName = in.DisplayName + out.Icon = in.Icon + out.Username = in.Username + out.Email = in.Email + out.Subject = in.Subject + return nil +} + +// Convert_cluster_EntityInfo_To_v1_EntityInfo is an autogenerated conversion function. +func Convert_cluster_EntityInfo_To_v1_EntityInfo(in *cluster.EntityInfo, out *EntityInfo, s conversion.Scope) error { + return autoConvert_cluster_EntityInfo_To_v1_EntityInfo(in, out, s) +} + +func autoConvert_v1_EpochInfo_To_cluster_EpochInfo(in *EpochInfo, out *cluster.EpochInfo, s conversion.Scope) error { + out.Start = in.Start + out.Slept = in.Slept + return nil +} + +// Convert_v1_EpochInfo_To_cluster_EpochInfo is an autogenerated conversion function. +func Convert_v1_EpochInfo_To_cluster_EpochInfo(in *EpochInfo, out *cluster.EpochInfo, s conversion.Scope) error { + return autoConvert_v1_EpochInfo_To_cluster_EpochInfo(in, out, s) +} + +func autoConvert_cluster_EpochInfo_To_v1_EpochInfo(in *cluster.EpochInfo, out *EpochInfo, s conversion.Scope) error { + out.Start = in.Start + out.Slept = in.Slept + return nil +} + +// Convert_cluster_EpochInfo_To_v1_EpochInfo is an autogenerated conversion function. +func Convert_cluster_EpochInfo_To_v1_EpochInfo(in *cluster.EpochInfo, out *EpochInfo, s conversion.Scope) error { + return autoConvert_cluster_EpochInfo_To_v1_EpochInfo(in, out, s) +} + +func autoConvert_v1_Feature_To_cluster_Feature(in *Feature, out *cluster.Feature, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_FeatureSpec_To_cluster_FeatureSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_FeatureStatus_To_cluster_FeatureStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Feature_To_cluster_Feature is an autogenerated conversion function. +func Convert_v1_Feature_To_cluster_Feature(in *Feature, out *cluster.Feature, s conversion.Scope) error { + return autoConvert_v1_Feature_To_cluster_Feature(in, out, s) +} + +func autoConvert_cluster_Feature_To_v1_Feature(in *cluster.Feature, out *Feature, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_cluster_FeatureSpec_To_v1_FeatureSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_cluster_FeatureStatus_To_v1_FeatureStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_cluster_Feature_To_v1_Feature is an autogenerated conversion function. +func Convert_cluster_Feature_To_v1_Feature(in *cluster.Feature, out *Feature, s conversion.Scope) error { + return autoConvert_cluster_Feature_To_v1_Feature(in, out, s) +} + +func autoConvert_v1_FeatureList_To_cluster_FeatureList(in *FeatureList, out *cluster.FeatureList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]cluster.Feature)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_FeatureList_To_cluster_FeatureList is an autogenerated conversion function. +func Convert_v1_FeatureList_To_cluster_FeatureList(in *FeatureList, out *cluster.FeatureList, s conversion.Scope) error { + return autoConvert_v1_FeatureList_To_cluster_FeatureList(in, out, s) +} + +func autoConvert_cluster_FeatureList_To_v1_FeatureList(in *cluster.FeatureList, out *FeatureList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Feature)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_cluster_FeatureList_To_v1_FeatureList is an autogenerated conversion function. +func Convert_cluster_FeatureList_To_v1_FeatureList(in *cluster.FeatureList, out *FeatureList, s conversion.Scope) error { + return autoConvert_cluster_FeatureList_To_v1_FeatureList(in, out, s) +} + +func autoConvert_v1_FeatureSpec_To_cluster_FeatureSpec(in *FeatureSpec, out *cluster.FeatureSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1_FeatureSpec_To_cluster_FeatureSpec is an autogenerated conversion function. +func Convert_v1_FeatureSpec_To_cluster_FeatureSpec(in *FeatureSpec, out *cluster.FeatureSpec, s conversion.Scope) error { + return autoConvert_v1_FeatureSpec_To_cluster_FeatureSpec(in, out, s) +} + +func autoConvert_cluster_FeatureSpec_To_v1_FeatureSpec(in *cluster.FeatureSpec, out *FeatureSpec, s conversion.Scope) error { + return nil +} + +// Convert_cluster_FeatureSpec_To_v1_FeatureSpec is an autogenerated conversion function. +func Convert_cluster_FeatureSpec_To_v1_FeatureSpec(in *cluster.FeatureSpec, out *FeatureSpec, s conversion.Scope) error { + return autoConvert_cluster_FeatureSpec_To_v1_FeatureSpec(in, out, s) +} + +func autoConvert_v1_FeatureStatus_To_cluster_FeatureStatus(in *FeatureStatus, out *cluster.FeatureStatus, s conversion.Scope) error { + out.Enabled = in.Enabled + return nil +} + +// Convert_v1_FeatureStatus_To_cluster_FeatureStatus is an autogenerated conversion function. +func Convert_v1_FeatureStatus_To_cluster_FeatureStatus(in *FeatureStatus, out *cluster.FeatureStatus, s conversion.Scope) error { + return autoConvert_v1_FeatureStatus_To_cluster_FeatureStatus(in, out, s) +} + +func autoConvert_cluster_FeatureStatus_To_v1_FeatureStatus(in *cluster.FeatureStatus, out *FeatureStatus, s conversion.Scope) error { + out.Enabled = in.Enabled + return nil +} + +// Convert_cluster_FeatureStatus_To_v1_FeatureStatus is an autogenerated conversion function. +func Convert_cluster_FeatureStatus_To_v1_FeatureStatus(in *cluster.FeatureStatus, out *FeatureStatus, s conversion.Scope) error { + return autoConvert_cluster_FeatureStatus_To_v1_FeatureStatus(in, out, s) +} + +func autoConvert_v1_HelmRelease_To_cluster_HelmRelease(in *HelmRelease, out *cluster.HelmRelease, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_HelmReleaseSpec_To_cluster_HelmReleaseSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_HelmReleaseStatus_To_cluster_HelmReleaseStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_HelmRelease_To_cluster_HelmRelease is an autogenerated conversion function. +func Convert_v1_HelmRelease_To_cluster_HelmRelease(in *HelmRelease, out *cluster.HelmRelease, s conversion.Scope) error { + return autoConvert_v1_HelmRelease_To_cluster_HelmRelease(in, out, s) +} + +func autoConvert_cluster_HelmRelease_To_v1_HelmRelease(in *cluster.HelmRelease, out *HelmRelease, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_cluster_HelmReleaseSpec_To_v1_HelmReleaseSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_cluster_HelmReleaseStatus_To_v1_HelmReleaseStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_cluster_HelmRelease_To_v1_HelmRelease is an autogenerated conversion function. +func Convert_cluster_HelmRelease_To_v1_HelmRelease(in *cluster.HelmRelease, out *HelmRelease, s conversion.Scope) error { + return autoConvert_cluster_HelmRelease_To_v1_HelmRelease(in, out, s) +} + +func autoConvert_v1_HelmReleaseConfig_To_cluster_HelmReleaseConfig(in *HelmReleaseConfig, out *cluster.HelmReleaseConfig, s conversion.Scope) error { + out.Chart = in.Chart + out.Manifests = in.Manifests + out.Bash = (*cluster.Bash)(unsafe.Pointer(in.Bash)) + out.Values = in.Values + out.Parameters = in.Parameters + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + return nil +} + +// Convert_v1_HelmReleaseConfig_To_cluster_HelmReleaseConfig is an autogenerated conversion function. +func Convert_v1_HelmReleaseConfig_To_cluster_HelmReleaseConfig(in *HelmReleaseConfig, out *cluster.HelmReleaseConfig, s conversion.Scope) error { + return autoConvert_v1_HelmReleaseConfig_To_cluster_HelmReleaseConfig(in, out, s) +} + +func autoConvert_cluster_HelmReleaseConfig_To_v1_HelmReleaseConfig(in *cluster.HelmReleaseConfig, out *HelmReleaseConfig, s conversion.Scope) error { + out.Chart = in.Chart + out.Manifests = in.Manifests + out.Bash = (*Bash)(unsafe.Pointer(in.Bash)) + out.Values = in.Values + out.Parameters = in.Parameters + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + return nil +} + +// Convert_cluster_HelmReleaseConfig_To_v1_HelmReleaseConfig is an autogenerated conversion function. +func Convert_cluster_HelmReleaseConfig_To_v1_HelmReleaseConfig(in *cluster.HelmReleaseConfig, out *HelmReleaseConfig, s conversion.Scope) error { + return autoConvert_cluster_HelmReleaseConfig_To_v1_HelmReleaseConfig(in, out, s) +} + +func autoConvert_v1_HelmReleaseList_To_cluster_HelmReleaseList(in *HelmReleaseList, out *cluster.HelmReleaseList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]cluster.HelmRelease)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_HelmReleaseList_To_cluster_HelmReleaseList is an autogenerated conversion function. +func Convert_v1_HelmReleaseList_To_cluster_HelmReleaseList(in *HelmReleaseList, out *cluster.HelmReleaseList, s conversion.Scope) error { + return autoConvert_v1_HelmReleaseList_To_cluster_HelmReleaseList(in, out, s) +} + +func autoConvert_cluster_HelmReleaseList_To_v1_HelmReleaseList(in *cluster.HelmReleaseList, out *HelmReleaseList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]HelmRelease)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_cluster_HelmReleaseList_To_v1_HelmReleaseList is an autogenerated conversion function. +func Convert_cluster_HelmReleaseList_To_v1_HelmReleaseList(in *cluster.HelmReleaseList, out *HelmReleaseList, s conversion.Scope) error { + return autoConvert_cluster_HelmReleaseList_To_v1_HelmReleaseList(in, out, s) +} + +func autoConvert_v1_HelmReleaseSpec_To_cluster_HelmReleaseSpec(in *HelmReleaseSpec, out *cluster.HelmReleaseSpec, s conversion.Scope) error { + if err := Convert_v1_HelmReleaseConfig_To_cluster_HelmReleaseConfig(&in.HelmReleaseConfig, &out.HelmReleaseConfig, s); err != nil { + return err + } + return nil +} + +// Convert_v1_HelmReleaseSpec_To_cluster_HelmReleaseSpec is an autogenerated conversion function. +func Convert_v1_HelmReleaseSpec_To_cluster_HelmReleaseSpec(in *HelmReleaseSpec, out *cluster.HelmReleaseSpec, s conversion.Scope) error { + return autoConvert_v1_HelmReleaseSpec_To_cluster_HelmReleaseSpec(in, out, s) +} + +func autoConvert_cluster_HelmReleaseSpec_To_v1_HelmReleaseSpec(in *cluster.HelmReleaseSpec, out *HelmReleaseSpec, s conversion.Scope) error { + if err := Convert_cluster_HelmReleaseConfig_To_v1_HelmReleaseConfig(&in.HelmReleaseConfig, &out.HelmReleaseConfig, s); err != nil { + return err + } + return nil +} + +// Convert_cluster_HelmReleaseSpec_To_v1_HelmReleaseSpec is an autogenerated conversion function. +func Convert_cluster_HelmReleaseSpec_To_v1_HelmReleaseSpec(in *cluster.HelmReleaseSpec, out *HelmReleaseSpec, s conversion.Scope) error { + return autoConvert_cluster_HelmReleaseSpec_To_v1_HelmReleaseSpec(in, out, s) +} + +func autoConvert_v1_HelmReleaseStatus_To_cluster_HelmReleaseStatus(in *HelmReleaseStatus, out *cluster.HelmReleaseStatus, s conversion.Scope) error { + out.Revision = in.Revision + out.Info = (*cluster.Info)(unsafe.Pointer(in.Info)) + out.Metadata = (*cluster.Metadata)(unsafe.Pointer(in.Metadata)) + return nil +} + +// Convert_v1_HelmReleaseStatus_To_cluster_HelmReleaseStatus is an autogenerated conversion function. +func Convert_v1_HelmReleaseStatus_To_cluster_HelmReleaseStatus(in *HelmReleaseStatus, out *cluster.HelmReleaseStatus, s conversion.Scope) error { + return autoConvert_v1_HelmReleaseStatus_To_cluster_HelmReleaseStatus(in, out, s) +} + +func autoConvert_cluster_HelmReleaseStatus_To_v1_HelmReleaseStatus(in *cluster.HelmReleaseStatus, out *HelmReleaseStatus, s conversion.Scope) error { + out.Revision = in.Revision + out.Info = (*Info)(unsafe.Pointer(in.Info)) + out.Metadata = (*Metadata)(unsafe.Pointer(in.Metadata)) + return nil +} + +// Convert_cluster_HelmReleaseStatus_To_v1_HelmReleaseStatus is an autogenerated conversion function. +func Convert_cluster_HelmReleaseStatus_To_v1_HelmReleaseStatus(in *cluster.HelmReleaseStatus, out *HelmReleaseStatus, s conversion.Scope) error { + return autoConvert_cluster_HelmReleaseStatus_To_v1_HelmReleaseStatus(in, out, s) +} + +func autoConvert_v1_Info_To_cluster_Info(in *Info, out *cluster.Info, s conversion.Scope) error { + out.FirstDeployed = in.FirstDeployed + out.LastDeployed = in.LastDeployed + out.Deleted = in.Deleted + out.Description = in.Description + out.Status = cluster.Status(in.Status) + out.Notes = in.Notes + return nil +} + +// Convert_v1_Info_To_cluster_Info is an autogenerated conversion function. +func Convert_v1_Info_To_cluster_Info(in *Info, out *cluster.Info, s conversion.Scope) error { + return autoConvert_v1_Info_To_cluster_Info(in, out, s) +} + +func autoConvert_cluster_Info_To_v1_Info(in *cluster.Info, out *Info, s conversion.Scope) error { + out.FirstDeployed = in.FirstDeployed + out.LastDeployed = in.LastDeployed + out.Deleted = in.Deleted + out.Description = in.Description + out.Status = Status(in.Status) + out.Notes = in.Notes + return nil +} + +// Convert_cluster_Info_To_v1_Info is an autogenerated conversion function. +func Convert_cluster_Info_To_v1_Info(in *cluster.Info, out *Info, s conversion.Scope) error { + return autoConvert_cluster_Info_To_v1_Info(in, out, s) +} + +func autoConvert_v1_LastActivityInfo_To_cluster_LastActivityInfo(in *LastActivityInfo, out *cluster.LastActivityInfo, s conversion.Scope) error { + out.Subject = in.Subject + out.Host = in.Host + out.Verb = in.Verb + out.APIGroup = in.APIGroup + out.Resource = in.Resource + out.Subresource = in.Subresource + out.Name = in.Name + out.VirtualCluster = in.VirtualCluster + return nil +} + +// Convert_v1_LastActivityInfo_To_cluster_LastActivityInfo is an autogenerated conversion function. +func Convert_v1_LastActivityInfo_To_cluster_LastActivityInfo(in *LastActivityInfo, out *cluster.LastActivityInfo, s conversion.Scope) error { + return autoConvert_v1_LastActivityInfo_To_cluster_LastActivityInfo(in, out, s) +} + +func autoConvert_cluster_LastActivityInfo_To_v1_LastActivityInfo(in *cluster.LastActivityInfo, out *LastActivityInfo, s conversion.Scope) error { + out.Subject = in.Subject + out.Host = in.Host + out.Verb = in.Verb + out.APIGroup = in.APIGroup + out.Resource = in.Resource + out.Subresource = in.Subresource + out.Name = in.Name + out.VirtualCluster = in.VirtualCluster + return nil +} + +// Convert_cluster_LastActivityInfo_To_v1_LastActivityInfo is an autogenerated conversion function. +func Convert_cluster_LastActivityInfo_To_v1_LastActivityInfo(in *cluster.LastActivityInfo, out *LastActivityInfo, s conversion.Scope) error { + return autoConvert_cluster_LastActivityInfo_To_v1_LastActivityInfo(in, out, s) +} + +func autoConvert_v1_LocalClusterAccess_To_cluster_LocalClusterAccess(in *LocalClusterAccess, out *cluster.LocalClusterAccess, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_LocalClusterAccessSpec_To_cluster_LocalClusterAccessSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_LocalClusterAccessStatus_To_cluster_LocalClusterAccessStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_LocalClusterAccess_To_cluster_LocalClusterAccess is an autogenerated conversion function. +func Convert_v1_LocalClusterAccess_To_cluster_LocalClusterAccess(in *LocalClusterAccess, out *cluster.LocalClusterAccess, s conversion.Scope) error { + return autoConvert_v1_LocalClusterAccess_To_cluster_LocalClusterAccess(in, out, s) +} + +func autoConvert_cluster_LocalClusterAccess_To_v1_LocalClusterAccess(in *cluster.LocalClusterAccess, out *LocalClusterAccess, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_cluster_LocalClusterAccessSpec_To_v1_LocalClusterAccessSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_cluster_LocalClusterAccessStatus_To_v1_LocalClusterAccessStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_cluster_LocalClusterAccess_To_v1_LocalClusterAccess is an autogenerated conversion function. +func Convert_cluster_LocalClusterAccess_To_v1_LocalClusterAccess(in *cluster.LocalClusterAccess, out *LocalClusterAccess, s conversion.Scope) error { + return autoConvert_cluster_LocalClusterAccess_To_v1_LocalClusterAccess(in, out, s) +} + +func autoConvert_v1_LocalClusterAccessList_To_cluster_LocalClusterAccessList(in *LocalClusterAccessList, out *cluster.LocalClusterAccessList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]cluster.LocalClusterAccess)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_LocalClusterAccessList_To_cluster_LocalClusterAccessList is an autogenerated conversion function. +func Convert_v1_LocalClusterAccessList_To_cluster_LocalClusterAccessList(in *LocalClusterAccessList, out *cluster.LocalClusterAccessList, s conversion.Scope) error { + return autoConvert_v1_LocalClusterAccessList_To_cluster_LocalClusterAccessList(in, out, s) +} + +func autoConvert_cluster_LocalClusterAccessList_To_v1_LocalClusterAccessList(in *cluster.LocalClusterAccessList, out *LocalClusterAccessList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]LocalClusterAccess)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_cluster_LocalClusterAccessList_To_v1_LocalClusterAccessList is an autogenerated conversion function. +func Convert_cluster_LocalClusterAccessList_To_v1_LocalClusterAccessList(in *cluster.LocalClusterAccessList, out *LocalClusterAccessList, s conversion.Scope) error { + return autoConvert_cluster_LocalClusterAccessList_To_v1_LocalClusterAccessList(in, out, s) +} + +func autoConvert_v1_LocalClusterAccessSpec_To_cluster_LocalClusterAccessSpec(in *LocalClusterAccessSpec, out *cluster.LocalClusterAccessSpec, s conversion.Scope) error { + out.LocalClusterAccessSpec = in.LocalClusterAccessSpec + return nil +} + +// Convert_v1_LocalClusterAccessSpec_To_cluster_LocalClusterAccessSpec is an autogenerated conversion function. +func Convert_v1_LocalClusterAccessSpec_To_cluster_LocalClusterAccessSpec(in *LocalClusterAccessSpec, out *cluster.LocalClusterAccessSpec, s conversion.Scope) error { + return autoConvert_v1_LocalClusterAccessSpec_To_cluster_LocalClusterAccessSpec(in, out, s) +} + +func autoConvert_cluster_LocalClusterAccessSpec_To_v1_LocalClusterAccessSpec(in *cluster.LocalClusterAccessSpec, out *LocalClusterAccessSpec, s conversion.Scope) error { + out.LocalClusterAccessSpec = in.LocalClusterAccessSpec + return nil +} + +// Convert_cluster_LocalClusterAccessSpec_To_v1_LocalClusterAccessSpec is an autogenerated conversion function. +func Convert_cluster_LocalClusterAccessSpec_To_v1_LocalClusterAccessSpec(in *cluster.LocalClusterAccessSpec, out *LocalClusterAccessSpec, s conversion.Scope) error { + return autoConvert_cluster_LocalClusterAccessSpec_To_v1_LocalClusterAccessSpec(in, out, s) +} + +func autoConvert_v1_LocalClusterAccessStatus_To_cluster_LocalClusterAccessStatus(in *LocalClusterAccessStatus, out *cluster.LocalClusterAccessStatus, s conversion.Scope) error { + out.LocalClusterAccessStatus = in.LocalClusterAccessStatus + out.Users = *(*[]*cluster.UserOrTeam)(unsafe.Pointer(&in.Users)) + out.Teams = *(*[]*cluster.EntityInfo)(unsafe.Pointer(&in.Teams)) + return nil +} + +// Convert_v1_LocalClusterAccessStatus_To_cluster_LocalClusterAccessStatus is an autogenerated conversion function. +func Convert_v1_LocalClusterAccessStatus_To_cluster_LocalClusterAccessStatus(in *LocalClusterAccessStatus, out *cluster.LocalClusterAccessStatus, s conversion.Scope) error { + return autoConvert_v1_LocalClusterAccessStatus_To_cluster_LocalClusterAccessStatus(in, out, s) +} + +func autoConvert_cluster_LocalClusterAccessStatus_To_v1_LocalClusterAccessStatus(in *cluster.LocalClusterAccessStatus, out *LocalClusterAccessStatus, s conversion.Scope) error { + out.LocalClusterAccessStatus = in.LocalClusterAccessStatus + out.Users = *(*[]*UserOrTeam)(unsafe.Pointer(&in.Users)) + out.Teams = *(*[]*EntityInfo)(unsafe.Pointer(&in.Teams)) + return nil +} + +// Convert_cluster_LocalClusterAccessStatus_To_v1_LocalClusterAccessStatus is an autogenerated conversion function. +func Convert_cluster_LocalClusterAccessStatus_To_v1_LocalClusterAccessStatus(in *cluster.LocalClusterAccessStatus, out *LocalClusterAccessStatus, s conversion.Scope) error { + return autoConvert_cluster_LocalClusterAccessStatus_To_v1_LocalClusterAccessStatus(in, out, s) +} + +func autoConvert_v1_Maintainer_To_cluster_Maintainer(in *Maintainer, out *cluster.Maintainer, s conversion.Scope) error { + out.Name = in.Name + out.Email = in.Email + out.URL = in.URL + return nil +} + +// Convert_v1_Maintainer_To_cluster_Maintainer is an autogenerated conversion function. +func Convert_v1_Maintainer_To_cluster_Maintainer(in *Maintainer, out *cluster.Maintainer, s conversion.Scope) error { + return autoConvert_v1_Maintainer_To_cluster_Maintainer(in, out, s) +} + +func autoConvert_cluster_Maintainer_To_v1_Maintainer(in *cluster.Maintainer, out *Maintainer, s conversion.Scope) error { + out.Name = in.Name + out.Email = in.Email + out.URL = in.URL + return nil +} + +// Convert_cluster_Maintainer_To_v1_Maintainer is an autogenerated conversion function. +func Convert_cluster_Maintainer_To_v1_Maintainer(in *cluster.Maintainer, out *Maintainer, s conversion.Scope) error { + return autoConvert_cluster_Maintainer_To_v1_Maintainer(in, out, s) +} + +func autoConvert_v1_Metadata_To_cluster_Metadata(in *Metadata, out *cluster.Metadata, s conversion.Scope) error { + out.Name = in.Name + out.Home = in.Home + out.Sources = *(*[]string)(unsafe.Pointer(&in.Sources)) + out.Version = in.Version + out.Description = in.Description + out.Keywords = *(*[]string)(unsafe.Pointer(&in.Keywords)) + out.Maintainers = *(*[]*cluster.Maintainer)(unsafe.Pointer(&in.Maintainers)) + out.Icon = in.Icon + out.APIVersion = in.APIVersion + out.Condition = in.Condition + out.Tags = in.Tags + out.AppVersion = in.AppVersion + out.Deprecated = in.Deprecated + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.KubeVersion = in.KubeVersion + out.Type = in.Type + out.Urls = *(*[]string)(unsafe.Pointer(&in.Urls)) + return nil +} + +// Convert_v1_Metadata_To_cluster_Metadata is an autogenerated conversion function. +func Convert_v1_Metadata_To_cluster_Metadata(in *Metadata, out *cluster.Metadata, s conversion.Scope) error { + return autoConvert_v1_Metadata_To_cluster_Metadata(in, out, s) +} + +func autoConvert_cluster_Metadata_To_v1_Metadata(in *cluster.Metadata, out *Metadata, s conversion.Scope) error { + out.Name = in.Name + out.Home = in.Home + out.Sources = *(*[]string)(unsafe.Pointer(&in.Sources)) + out.Version = in.Version + out.Description = in.Description + out.Keywords = *(*[]string)(unsafe.Pointer(&in.Keywords)) + out.Maintainers = *(*[]*Maintainer)(unsafe.Pointer(&in.Maintainers)) + out.Icon = in.Icon + out.APIVersion = in.APIVersion + out.Condition = in.Condition + out.Tags = in.Tags + out.AppVersion = in.AppVersion + out.Deprecated = in.Deprecated + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.KubeVersion = in.KubeVersion + out.Type = in.Type + out.Urls = *(*[]string)(unsafe.Pointer(&in.Urls)) + return nil +} + +// Convert_cluster_Metadata_To_v1_Metadata is an autogenerated conversion function. +func Convert_cluster_Metadata_To_v1_Metadata(in *cluster.Metadata, out *Metadata, s conversion.Scope) error { + return autoConvert_cluster_Metadata_To_v1_Metadata(in, out, s) +} + +func autoConvert_v1_SleepModeConfig_To_cluster_SleepModeConfig(in *SleepModeConfig, out *cluster.SleepModeConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SleepModeConfigSpec_To_cluster_SleepModeConfigSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SleepModeConfigStatus_To_cluster_SleepModeConfigStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_SleepModeConfig_To_cluster_SleepModeConfig is an autogenerated conversion function. +func Convert_v1_SleepModeConfig_To_cluster_SleepModeConfig(in *SleepModeConfig, out *cluster.SleepModeConfig, s conversion.Scope) error { + return autoConvert_v1_SleepModeConfig_To_cluster_SleepModeConfig(in, out, s) +} + +func autoConvert_cluster_SleepModeConfig_To_v1_SleepModeConfig(in *cluster.SleepModeConfig, out *SleepModeConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_cluster_SleepModeConfigSpec_To_v1_SleepModeConfigSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_cluster_SleepModeConfigStatus_To_v1_SleepModeConfigStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_cluster_SleepModeConfig_To_v1_SleepModeConfig is an autogenerated conversion function. +func Convert_cluster_SleepModeConfig_To_v1_SleepModeConfig(in *cluster.SleepModeConfig, out *SleepModeConfig, s conversion.Scope) error { + return autoConvert_cluster_SleepModeConfig_To_v1_SleepModeConfig(in, out, s) +} + +func autoConvert_v1_SleepModeConfigList_To_cluster_SleepModeConfigList(in *SleepModeConfigList, out *cluster.SleepModeConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]cluster.SleepModeConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_SleepModeConfigList_To_cluster_SleepModeConfigList is an autogenerated conversion function. +func Convert_v1_SleepModeConfigList_To_cluster_SleepModeConfigList(in *SleepModeConfigList, out *cluster.SleepModeConfigList, s conversion.Scope) error { + return autoConvert_v1_SleepModeConfigList_To_cluster_SleepModeConfigList(in, out, s) +} + +func autoConvert_cluster_SleepModeConfigList_To_v1_SleepModeConfigList(in *cluster.SleepModeConfigList, out *SleepModeConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SleepModeConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_cluster_SleepModeConfigList_To_v1_SleepModeConfigList is an autogenerated conversion function. +func Convert_cluster_SleepModeConfigList_To_v1_SleepModeConfigList(in *cluster.SleepModeConfigList, out *SleepModeConfigList, s conversion.Scope) error { + return autoConvert_cluster_SleepModeConfigList_To_v1_SleepModeConfigList(in, out, s) +} + +func autoConvert_v1_SleepModeConfigSpec_To_cluster_SleepModeConfigSpec(in *SleepModeConfigSpec, out *cluster.SleepModeConfigSpec, s conversion.Scope) error { + out.ForceSleep = in.ForceSleep + out.ForceSleepDuration = (*int64)(unsafe.Pointer(in.ForceSleepDuration)) + out.DeleteAllPods = in.DeleteAllPods + out.DeleteAfter = in.DeleteAfter + out.SleepAfter = in.SleepAfter + out.SleepSchedule = in.SleepSchedule + out.WakeupSchedule = in.WakeupSchedule + out.Timezone = in.Timezone + out.IgnoreActiveConnections = in.IgnoreActiveConnections + out.IgnoreAll = in.IgnoreAll + out.IgnoreIngresses = in.IgnoreIngresses + out.IgnoreVClusters = in.IgnoreVClusters + out.IgnoreGroups = in.IgnoreGroups + out.IgnoreVerbs = in.IgnoreVerbs + out.IgnoreResources = in.IgnoreResources + out.IgnoreResourceVerbs = in.IgnoreResourceVerbs + out.IgnoreResourceNames = in.IgnoreResourceNames + return nil +} + +// Convert_v1_SleepModeConfigSpec_To_cluster_SleepModeConfigSpec is an autogenerated conversion function. +func Convert_v1_SleepModeConfigSpec_To_cluster_SleepModeConfigSpec(in *SleepModeConfigSpec, out *cluster.SleepModeConfigSpec, s conversion.Scope) error { + return autoConvert_v1_SleepModeConfigSpec_To_cluster_SleepModeConfigSpec(in, out, s) +} + +func autoConvert_cluster_SleepModeConfigSpec_To_v1_SleepModeConfigSpec(in *cluster.SleepModeConfigSpec, out *SleepModeConfigSpec, s conversion.Scope) error { + out.ForceSleep = in.ForceSleep + out.ForceSleepDuration = (*int64)(unsafe.Pointer(in.ForceSleepDuration)) + out.DeleteAllPods = in.DeleteAllPods + out.DeleteAfter = in.DeleteAfter + out.SleepAfter = in.SleepAfter + out.SleepSchedule = in.SleepSchedule + out.WakeupSchedule = in.WakeupSchedule + out.Timezone = in.Timezone + out.IgnoreActiveConnections = in.IgnoreActiveConnections + out.IgnoreAll = in.IgnoreAll + out.IgnoreIngresses = in.IgnoreIngresses + out.IgnoreVClusters = in.IgnoreVClusters + out.IgnoreGroups = in.IgnoreGroups + out.IgnoreVerbs = in.IgnoreVerbs + out.IgnoreResources = in.IgnoreResources + out.IgnoreResourceVerbs = in.IgnoreResourceVerbs + out.IgnoreResourceNames = in.IgnoreResourceNames + return nil +} + +// Convert_cluster_SleepModeConfigSpec_To_v1_SleepModeConfigSpec is an autogenerated conversion function. +func Convert_cluster_SleepModeConfigSpec_To_v1_SleepModeConfigSpec(in *cluster.SleepModeConfigSpec, out *SleepModeConfigSpec, s conversion.Scope) error { + return autoConvert_cluster_SleepModeConfigSpec_To_v1_SleepModeConfigSpec(in, out, s) +} + +func autoConvert_v1_SleepModeConfigStatus_To_cluster_SleepModeConfigStatus(in *SleepModeConfigStatus, out *cluster.SleepModeConfigStatus, s conversion.Scope) error { + out.LastActivity = in.LastActivity + out.LastActivityInfo = (*cluster.LastActivityInfo)(unsafe.Pointer(in.LastActivityInfo)) + out.SleepingSince = in.SleepingSince + out.CurrentEpoch = (*cluster.EpochInfo)(unsafe.Pointer(in.CurrentEpoch)) + out.LastEpoch = (*cluster.EpochInfo)(unsafe.Pointer(in.LastEpoch)) + out.SleptLastThirtyDays = (*float64)(unsafe.Pointer(in.SleptLastThirtyDays)) + out.SleptLastSevenDays = (*float64)(unsafe.Pointer(in.SleptLastSevenDays)) + out.ScheduledSleep = (*int64)(unsafe.Pointer(in.ScheduledSleep)) + out.ScheduledWakeup = (*int64)(unsafe.Pointer(in.ScheduledWakeup)) + out.SleepType = in.SleepType + return nil +} + +// Convert_v1_SleepModeConfigStatus_To_cluster_SleepModeConfigStatus is an autogenerated conversion function. +func Convert_v1_SleepModeConfigStatus_To_cluster_SleepModeConfigStatus(in *SleepModeConfigStatus, out *cluster.SleepModeConfigStatus, s conversion.Scope) error { + return autoConvert_v1_SleepModeConfigStatus_To_cluster_SleepModeConfigStatus(in, out, s) +} + +func autoConvert_cluster_SleepModeConfigStatus_To_v1_SleepModeConfigStatus(in *cluster.SleepModeConfigStatus, out *SleepModeConfigStatus, s conversion.Scope) error { + out.LastActivity = in.LastActivity + out.LastActivityInfo = (*LastActivityInfo)(unsafe.Pointer(in.LastActivityInfo)) + out.SleepingSince = in.SleepingSince + out.CurrentEpoch = (*EpochInfo)(unsafe.Pointer(in.CurrentEpoch)) + out.LastEpoch = (*EpochInfo)(unsafe.Pointer(in.LastEpoch)) + out.SleptLastThirtyDays = (*float64)(unsafe.Pointer(in.SleptLastThirtyDays)) + out.SleptLastSevenDays = (*float64)(unsafe.Pointer(in.SleptLastSevenDays)) + out.ScheduledSleep = (*int64)(unsafe.Pointer(in.ScheduledSleep)) + out.ScheduledWakeup = (*int64)(unsafe.Pointer(in.ScheduledWakeup)) + out.SleepType = in.SleepType + return nil +} + +// Convert_cluster_SleepModeConfigStatus_To_v1_SleepModeConfigStatus is an autogenerated conversion function. +func Convert_cluster_SleepModeConfigStatus_To_v1_SleepModeConfigStatus(in *cluster.SleepModeConfigStatus, out *SleepModeConfigStatus, s conversion.Scope) error { + return autoConvert_cluster_SleepModeConfigStatus_To_v1_SleepModeConfigStatus(in, out, s) +} + +func autoConvert_v1_Space_To_cluster_Space(in *Space, out *cluster.Space, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SpaceSpec_To_cluster_SpaceSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SpaceStatus_To_cluster_SpaceStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Space_To_cluster_Space is an autogenerated conversion function. +func Convert_v1_Space_To_cluster_Space(in *Space, out *cluster.Space, s conversion.Scope) error { + return autoConvert_v1_Space_To_cluster_Space(in, out, s) +} + +func autoConvert_cluster_Space_To_v1_Space(in *cluster.Space, out *Space, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_cluster_SpaceSpec_To_v1_SpaceSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_cluster_SpaceStatus_To_v1_SpaceStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_cluster_Space_To_v1_Space is an autogenerated conversion function. +func Convert_cluster_Space_To_v1_Space(in *cluster.Space, out *Space, s conversion.Scope) error { + return autoConvert_cluster_Space_To_v1_Space(in, out, s) +} + +func autoConvert_v1_SpaceList_To_cluster_SpaceList(in *SpaceList, out *cluster.SpaceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]cluster.Space)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_SpaceList_To_cluster_SpaceList is an autogenerated conversion function. +func Convert_v1_SpaceList_To_cluster_SpaceList(in *SpaceList, out *cluster.SpaceList, s conversion.Scope) error { + return autoConvert_v1_SpaceList_To_cluster_SpaceList(in, out, s) +} + +func autoConvert_cluster_SpaceList_To_v1_SpaceList(in *cluster.SpaceList, out *SpaceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Space)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_cluster_SpaceList_To_v1_SpaceList is an autogenerated conversion function. +func Convert_cluster_SpaceList_To_v1_SpaceList(in *cluster.SpaceList, out *SpaceList, s conversion.Scope) error { + return autoConvert_cluster_SpaceList_To_v1_SpaceList(in, out, s) +} + +func autoConvert_v1_SpaceObjectsNamespaceStatus_To_cluster_SpaceObjectsNamespaceStatus(in *SpaceObjectsNamespaceStatus, out *cluster.SpaceObjectsNamespaceStatus, s conversion.Scope) error { + out.Phase = in.Phase + out.Reason = in.Reason + out.Message = in.Message + out.AppliedObjects = *(*[]cluster.AppliedObject)(unsafe.Pointer(&in.AppliedObjects)) + return nil +} + +// Convert_v1_SpaceObjectsNamespaceStatus_To_cluster_SpaceObjectsNamespaceStatus is an autogenerated conversion function. +func Convert_v1_SpaceObjectsNamespaceStatus_To_cluster_SpaceObjectsNamespaceStatus(in *SpaceObjectsNamespaceStatus, out *cluster.SpaceObjectsNamespaceStatus, s conversion.Scope) error { + return autoConvert_v1_SpaceObjectsNamespaceStatus_To_cluster_SpaceObjectsNamespaceStatus(in, out, s) +} + +func autoConvert_cluster_SpaceObjectsNamespaceStatus_To_v1_SpaceObjectsNamespaceStatus(in *cluster.SpaceObjectsNamespaceStatus, out *SpaceObjectsNamespaceStatus, s conversion.Scope) error { + out.Phase = in.Phase + out.Reason = in.Reason + out.Message = in.Message + out.AppliedObjects = *(*[]AppliedObject)(unsafe.Pointer(&in.AppliedObjects)) + return nil +} + +// Convert_cluster_SpaceObjectsNamespaceStatus_To_v1_SpaceObjectsNamespaceStatus is an autogenerated conversion function. +func Convert_cluster_SpaceObjectsNamespaceStatus_To_v1_SpaceObjectsNamespaceStatus(in *cluster.SpaceObjectsNamespaceStatus, out *SpaceObjectsNamespaceStatus, s conversion.Scope) error { + return autoConvert_cluster_SpaceObjectsNamespaceStatus_To_v1_SpaceObjectsNamespaceStatus(in, out, s) +} + +func autoConvert_v1_SpaceSpec_To_cluster_SpaceSpec(in *SpaceSpec, out *cluster.SpaceSpec, s conversion.Scope) error { + out.User = in.User + out.Team = in.Team + out.Objects = in.Objects + out.Finalizers = *(*[]corev1.FinalizerName)(unsafe.Pointer(&in.Finalizers)) + return nil +} + +// Convert_v1_SpaceSpec_To_cluster_SpaceSpec is an autogenerated conversion function. +func Convert_v1_SpaceSpec_To_cluster_SpaceSpec(in *SpaceSpec, out *cluster.SpaceSpec, s conversion.Scope) error { + return autoConvert_v1_SpaceSpec_To_cluster_SpaceSpec(in, out, s) +} + +func autoConvert_cluster_SpaceSpec_To_v1_SpaceSpec(in *cluster.SpaceSpec, out *SpaceSpec, s conversion.Scope) error { + out.User = in.User + out.Team = in.Team + out.Objects = in.Objects + out.Finalizers = *(*[]corev1.FinalizerName)(unsafe.Pointer(&in.Finalizers)) + return nil +} + +// Convert_cluster_SpaceSpec_To_v1_SpaceSpec is an autogenerated conversion function. +func Convert_cluster_SpaceSpec_To_v1_SpaceSpec(in *cluster.SpaceSpec, out *SpaceSpec, s conversion.Scope) error { + return autoConvert_cluster_SpaceSpec_To_v1_SpaceSpec(in, out, s) +} + +func autoConvert_v1_SpaceStatus_To_cluster_SpaceStatus(in *SpaceStatus, out *cluster.SpaceStatus, s conversion.Scope) error { + out.Phase = corev1.NamespacePhase(in.Phase) + out.SleepModeConfig = (*cluster.SleepModeConfig)(unsafe.Pointer(in.SleepModeConfig)) + out.Owner = (*cluster.UserOrTeam)(unsafe.Pointer(in.Owner)) + out.SpaceObjectsStatus = (*cluster.SpaceObjectsNamespaceStatus)(unsafe.Pointer(in.SpaceObjectsStatus)) + out.TemplateSyncStatus = (*cluster.TemplateSyncStatus)(unsafe.Pointer(in.TemplateSyncStatus)) + return nil +} + +// Convert_v1_SpaceStatus_To_cluster_SpaceStatus is an autogenerated conversion function. +func Convert_v1_SpaceStatus_To_cluster_SpaceStatus(in *SpaceStatus, out *cluster.SpaceStatus, s conversion.Scope) error { + return autoConvert_v1_SpaceStatus_To_cluster_SpaceStatus(in, out, s) +} + +func autoConvert_cluster_SpaceStatus_To_v1_SpaceStatus(in *cluster.SpaceStatus, out *SpaceStatus, s conversion.Scope) error { + out.Phase = corev1.NamespacePhase(in.Phase) + out.SleepModeConfig = (*SleepModeConfig)(unsafe.Pointer(in.SleepModeConfig)) + out.Owner = (*UserOrTeam)(unsafe.Pointer(in.Owner)) + out.SpaceObjectsStatus = (*SpaceObjectsNamespaceStatus)(unsafe.Pointer(in.SpaceObjectsStatus)) + out.TemplateSyncStatus = (*TemplateSyncStatus)(unsafe.Pointer(in.TemplateSyncStatus)) + return nil +} + +// Convert_cluster_SpaceStatus_To_v1_SpaceStatus is an autogenerated conversion function. +func Convert_cluster_SpaceStatus_To_v1_SpaceStatus(in *cluster.SpaceStatus, out *SpaceStatus, s conversion.Scope) error { + return autoConvert_cluster_SpaceStatus_To_v1_SpaceStatus(in, out, s) +} + +func autoConvert_v1_TemplateSyncStatus_To_cluster_TemplateSyncStatus(in *TemplateSyncStatus, out *cluster.TemplateSyncStatus, s conversion.Scope) error { + out.Template = in.Template + out.Phase = in.Phase + return nil +} + +// Convert_v1_TemplateSyncStatus_To_cluster_TemplateSyncStatus is an autogenerated conversion function. +func Convert_v1_TemplateSyncStatus_To_cluster_TemplateSyncStatus(in *TemplateSyncStatus, out *cluster.TemplateSyncStatus, s conversion.Scope) error { + return autoConvert_v1_TemplateSyncStatus_To_cluster_TemplateSyncStatus(in, out, s) +} + +func autoConvert_cluster_TemplateSyncStatus_To_v1_TemplateSyncStatus(in *cluster.TemplateSyncStatus, out *TemplateSyncStatus, s conversion.Scope) error { + out.Template = in.Template + out.Phase = in.Phase + return nil +} + +// Convert_cluster_TemplateSyncStatus_To_v1_TemplateSyncStatus is an autogenerated conversion function. +func Convert_cluster_TemplateSyncStatus_To_v1_TemplateSyncStatus(in *cluster.TemplateSyncStatus, out *TemplateSyncStatus, s conversion.Scope) error { + return autoConvert_cluster_TemplateSyncStatus_To_v1_TemplateSyncStatus(in, out, s) +} + +func autoConvert_v1_UserOrTeam_To_cluster_UserOrTeam(in *UserOrTeam, out *cluster.UserOrTeam, s conversion.Scope) error { + out.User = (*cluster.EntityInfo)(unsafe.Pointer(in.User)) + out.Team = (*cluster.EntityInfo)(unsafe.Pointer(in.Team)) + return nil +} + +// Convert_v1_UserOrTeam_To_cluster_UserOrTeam is an autogenerated conversion function. +func Convert_v1_UserOrTeam_To_cluster_UserOrTeam(in *UserOrTeam, out *cluster.UserOrTeam, s conversion.Scope) error { + return autoConvert_v1_UserOrTeam_To_cluster_UserOrTeam(in, out, s) +} + +func autoConvert_cluster_UserOrTeam_To_v1_UserOrTeam(in *cluster.UserOrTeam, out *UserOrTeam, s conversion.Scope) error { + out.User = (*EntityInfo)(unsafe.Pointer(in.User)) + out.Team = (*EntityInfo)(unsafe.Pointer(in.Team)) + return nil +} + +// Convert_cluster_UserOrTeam_To_v1_UserOrTeam is an autogenerated conversion function. +func Convert_cluster_UserOrTeam_To_v1_UserOrTeam(in *cluster.UserOrTeam, out *UserOrTeam, s conversion.Scope) error { + return autoConvert_cluster_UserOrTeam_To_v1_UserOrTeam(in, out, s) +} + +func autoConvert_v1_VirtualCluster_To_cluster_VirtualCluster(in *VirtualCluster, out *cluster.VirtualCluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_VirtualClusterSpec_To_cluster_VirtualClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_VirtualClusterStatus_To_cluster_VirtualClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_VirtualCluster_To_cluster_VirtualCluster is an autogenerated conversion function. +func Convert_v1_VirtualCluster_To_cluster_VirtualCluster(in *VirtualCluster, out *cluster.VirtualCluster, s conversion.Scope) error { + return autoConvert_v1_VirtualCluster_To_cluster_VirtualCluster(in, out, s) +} + +func autoConvert_cluster_VirtualCluster_To_v1_VirtualCluster(in *cluster.VirtualCluster, out *VirtualCluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_cluster_VirtualClusterSpec_To_v1_VirtualClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_cluster_VirtualClusterStatus_To_v1_VirtualClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_cluster_VirtualCluster_To_v1_VirtualCluster is an autogenerated conversion function. +func Convert_cluster_VirtualCluster_To_v1_VirtualCluster(in *cluster.VirtualCluster, out *VirtualCluster, s conversion.Scope) error { + return autoConvert_cluster_VirtualCluster_To_v1_VirtualCluster(in, out, s) +} + +func autoConvert_v1_VirtualClusterList_To_cluster_VirtualClusterList(in *VirtualClusterList, out *cluster.VirtualClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]cluster.VirtualCluster)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_VirtualClusterList_To_cluster_VirtualClusterList is an autogenerated conversion function. +func Convert_v1_VirtualClusterList_To_cluster_VirtualClusterList(in *VirtualClusterList, out *cluster.VirtualClusterList, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterList_To_cluster_VirtualClusterList(in, out, s) +} + +func autoConvert_cluster_VirtualClusterList_To_v1_VirtualClusterList(in *cluster.VirtualClusterList, out *VirtualClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]VirtualCluster)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_cluster_VirtualClusterList_To_v1_VirtualClusterList is an autogenerated conversion function. +func Convert_cluster_VirtualClusterList_To_v1_VirtualClusterList(in *cluster.VirtualClusterList, out *VirtualClusterList, s conversion.Scope) error { + return autoConvert_cluster_VirtualClusterList_To_v1_VirtualClusterList(in, out, s) +} + +func autoConvert_v1_VirtualClusterSpec_To_cluster_VirtualClusterSpec(in *VirtualClusterSpec, out *cluster.VirtualClusterSpec, s conversion.Scope) error { + out.VirtualClusterSpec = in.VirtualClusterSpec + return nil +} + +// Convert_v1_VirtualClusterSpec_To_cluster_VirtualClusterSpec is an autogenerated conversion function. +func Convert_v1_VirtualClusterSpec_To_cluster_VirtualClusterSpec(in *VirtualClusterSpec, out *cluster.VirtualClusterSpec, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterSpec_To_cluster_VirtualClusterSpec(in, out, s) +} + +func autoConvert_cluster_VirtualClusterSpec_To_v1_VirtualClusterSpec(in *cluster.VirtualClusterSpec, out *VirtualClusterSpec, s conversion.Scope) error { + out.VirtualClusterSpec = in.VirtualClusterSpec + return nil +} + +// Convert_cluster_VirtualClusterSpec_To_v1_VirtualClusterSpec is an autogenerated conversion function. +func Convert_cluster_VirtualClusterSpec_To_v1_VirtualClusterSpec(in *cluster.VirtualClusterSpec, out *VirtualClusterSpec, s conversion.Scope) error { + return autoConvert_cluster_VirtualClusterSpec_To_v1_VirtualClusterSpec(in, out, s) +} + +func autoConvert_v1_VirtualClusterStatus_To_cluster_VirtualClusterStatus(in *VirtualClusterStatus, out *cluster.VirtualClusterStatus, s conversion.Scope) error { + out.VirtualClusterStatus = in.VirtualClusterStatus + out.SyncerPod = (*corev1.Pod)(unsafe.Pointer(in.SyncerPod)) + out.ClusterPod = (*corev1.Pod)(unsafe.Pointer(in.ClusterPod)) + out.SleepModeConfig = (*cluster.SleepModeConfig)(unsafe.Pointer(in.SleepModeConfig)) + out.TemplateSyncStatus = (*cluster.TemplateSyncStatus)(unsafe.Pointer(in.TemplateSyncStatus)) + return nil +} + +// Convert_v1_VirtualClusterStatus_To_cluster_VirtualClusterStatus is an autogenerated conversion function. +func Convert_v1_VirtualClusterStatus_To_cluster_VirtualClusterStatus(in *VirtualClusterStatus, out *cluster.VirtualClusterStatus, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterStatus_To_cluster_VirtualClusterStatus(in, out, s) +} + +func autoConvert_cluster_VirtualClusterStatus_To_v1_VirtualClusterStatus(in *cluster.VirtualClusterStatus, out *VirtualClusterStatus, s conversion.Scope) error { + out.VirtualClusterStatus = in.VirtualClusterStatus + out.SyncerPod = (*corev1.Pod)(unsafe.Pointer(in.SyncerPod)) + out.ClusterPod = (*corev1.Pod)(unsafe.Pointer(in.ClusterPod)) + out.SleepModeConfig = (*SleepModeConfig)(unsafe.Pointer(in.SleepModeConfig)) + out.TemplateSyncStatus = (*TemplateSyncStatus)(unsafe.Pointer(in.TemplateSyncStatus)) + return nil +} + +// Convert_cluster_VirtualClusterStatus_To_v1_VirtualClusterStatus is an autogenerated conversion function. +func Convert_cluster_VirtualClusterStatus_To_v1_VirtualClusterStatus(in *cluster.VirtualClusterStatus, out *VirtualClusterStatus, s conversion.Scope) error { + return autoConvert_cluster_VirtualClusterStatus_To_v1_VirtualClusterStatus(in, out, s) +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..f95ef5058 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.deepcopy.go @@ -0,0 +1,1219 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppliedMetadata) DeepCopyInto(out *AppliedMetadata) { + *out = *in + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedMetadata. +func (in *AppliedMetadata) DeepCopy() *AppliedMetadata { + if in == nil { + return nil + } + out := new(AppliedMetadata) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppliedObject) DeepCopyInto(out *AppliedObject) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedObject. +func (in *AppliedObject) DeepCopy() *AppliedObject { + if in == nil { + return nil + } + out := new(AppliedObject) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Bash) DeepCopyInto(out *Bash) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bash. +func (in *Bash) DeepCopy() *Bash { + if in == nil { + return nil + } + out := new(Bash) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChartInfo) DeepCopyInto(out *ChartInfo) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfo. +func (in *ChartInfo) DeepCopy() *ChartInfo { + if in == nil { + return nil + } + out := new(ChartInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ChartInfo) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChartInfoList) DeepCopyInto(out *ChartInfoList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ChartInfo, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfoList. +func (in *ChartInfoList) DeepCopy() *ChartInfoList { + if in == nil { + return nil + } + out := new(ChartInfoList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ChartInfoList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChartInfoSpec) DeepCopyInto(out *ChartInfoSpec) { + *out = *in + out.Chart = in.Chart + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfoSpec. +func (in *ChartInfoSpec) DeepCopy() *ChartInfoSpec { + if in == nil { + return nil + } + out := new(ChartInfoSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChartInfoStatus) DeepCopyInto(out *ChartInfoStatus) { + *out = *in + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = new(Metadata) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfoStatus. +func (in *ChartInfoStatus) DeepCopy() *ChartInfoStatus { + if in == nil { + return nil + } + out := new(ChartInfoStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuota) DeepCopyInto(out *ClusterQuota) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuota. +func (in *ClusterQuota) DeepCopy() *ClusterQuota { + if in == nil { + return nil + } + out := new(ClusterQuota) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterQuota) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuotaList) DeepCopyInto(out *ClusterQuotaList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterQuota, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotaList. +func (in *ClusterQuotaList) DeepCopy() *ClusterQuotaList { + if in == nil { + return nil + } + out := new(ClusterQuotaList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterQuotaList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuotaSpec) DeepCopyInto(out *ClusterQuotaSpec) { + *out = *in + in.ClusterQuotaSpec.DeepCopyInto(&out.ClusterQuotaSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotaSpec. +func (in *ClusterQuotaSpec) DeepCopy() *ClusterQuotaSpec { + if in == nil { + return nil + } + out := new(ClusterQuotaSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuotaStatus) DeepCopyInto(out *ClusterQuotaStatus) { + *out = *in + in.ClusterQuotaStatus.DeepCopyInto(&out.ClusterQuotaStatus) + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotaStatus. +func (in *ClusterQuotaStatus) DeepCopy() *ClusterQuotaStatus { + if in == nil { + return nil + } + out := new(ClusterQuotaStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EntityInfo) DeepCopyInto(out *EntityInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EntityInfo. +func (in *EntityInfo) DeepCopy() *EntityInfo { + if in == nil { + return nil + } + out := new(EntityInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EpochInfo) DeepCopyInto(out *EpochInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EpochInfo. +func (in *EpochInfo) DeepCopy() *EpochInfo { + if in == nil { + return nil + } + out := new(EpochInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Feature) DeepCopyInto(out *Feature) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature. +func (in *Feature) DeepCopy() *Feature { + if in == nil { + return nil + } + out := new(Feature) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Feature) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureList) DeepCopyInto(out *FeatureList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Feature, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureList. +func (in *FeatureList) DeepCopy() *FeatureList { + if in == nil { + return nil + } + out := new(FeatureList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FeatureList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSpec. +func (in *FeatureSpec) DeepCopy() *FeatureSpec { + if in == nil { + return nil + } + out := new(FeatureSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureStatus) DeepCopyInto(out *FeatureStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureStatus. +func (in *FeatureStatus) DeepCopy() *FeatureStatus { + if in == nil { + return nil + } + out := new(FeatureStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmRelease) DeepCopyInto(out *HelmRelease) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease. +func (in *HelmRelease) DeepCopy() *HelmRelease { + if in == nil { + return nil + } + out := new(HelmRelease) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmRelease) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseApp) DeepCopyInto(out *HelmReleaseApp) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseApp. +func (in *HelmReleaseApp) DeepCopy() *HelmReleaseApp { + if in == nil { + return nil + } + out := new(HelmReleaseApp) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseConfig) DeepCopyInto(out *HelmReleaseConfig) { + *out = *in + out.Chart = in.Chart + if in.Bash != nil { + in, out := &in.Bash, &out.Bash + *out = new(Bash) + **out = **in + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseConfig. +func (in *HelmReleaseConfig) DeepCopy() *HelmReleaseConfig { + if in == nil { + return nil + } + out := new(HelmReleaseConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseList) DeepCopyInto(out *HelmReleaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HelmRelease, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseList. +func (in *HelmReleaseList) DeepCopy() *HelmReleaseList { + if in == nil { + return nil + } + out := new(HelmReleaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmReleaseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) { + *out = *in + in.HelmReleaseConfig.DeepCopyInto(&out.HelmReleaseConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseSpec. +func (in *HelmReleaseSpec) DeepCopy() *HelmReleaseSpec { + if in == nil { + return nil + } + out := new(HelmReleaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) { + *out = *in + if in.Info != nil { + in, out := &in.Info, &out.Info + *out = new(Info) + (*in).DeepCopyInto(*out) + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = new(Metadata) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseStatus. +func (in *HelmReleaseStatus) DeepCopy() *HelmReleaseStatus { + if in == nil { + return nil + } + out := new(HelmReleaseStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Info) DeepCopyInto(out *Info) { + *out = *in + in.FirstDeployed.DeepCopyInto(&out.FirstDeployed) + in.LastDeployed.DeepCopyInto(&out.LastDeployed) + in.Deleted.DeepCopyInto(&out.Deleted) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Info. +func (in *Info) DeepCopy() *Info { + if in == nil { + return nil + } + out := new(Info) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastActivityInfo) DeepCopyInto(out *LastActivityInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastActivityInfo. +func (in *LastActivityInfo) DeepCopy() *LastActivityInfo { + if in == nil { + return nil + } + out := new(LastActivityInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccess) DeepCopyInto(out *LocalClusterAccess) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccess. +func (in *LocalClusterAccess) DeepCopy() *LocalClusterAccess { + if in == nil { + return nil + } + out := new(LocalClusterAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalClusterAccess) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccessList) DeepCopyInto(out *LocalClusterAccessList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LocalClusterAccess, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccessList. +func (in *LocalClusterAccessList) DeepCopy() *LocalClusterAccessList { + if in == nil { + return nil + } + out := new(LocalClusterAccessList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalClusterAccessList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccessSpec) DeepCopyInto(out *LocalClusterAccessSpec) { + *out = *in + in.LocalClusterAccessSpec.DeepCopyInto(&out.LocalClusterAccessSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccessSpec. +func (in *LocalClusterAccessSpec) DeepCopy() *LocalClusterAccessSpec { + if in == nil { + return nil + } + out := new(LocalClusterAccessSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccessStatus) DeepCopyInto(out *LocalClusterAccessStatus) { + *out = *in + out.LocalClusterAccessStatus = in.LocalClusterAccessStatus + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]*UserOrTeam, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(UserOrTeam) + (*in).DeepCopyInto(*out) + } + } + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]*EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccessStatus. +func (in *LocalClusterAccessStatus) DeepCopy() *LocalClusterAccessStatus { + if in == nil { + return nil + } + out := new(LocalClusterAccessStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Maintainer) DeepCopyInto(out *Maintainer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Maintainer. +func (in *Maintainer) DeepCopy() *Maintainer { + if in == nil { + return nil + } + out := new(Maintainer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Metadata) DeepCopyInto(out *Metadata) { + *out = *in + if in.Sources != nil { + in, out := &in.Sources, &out.Sources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Keywords != nil { + in, out := &in.Keywords, &out.Keywords + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Maintainers != nil { + in, out := &in.Maintainers, &out.Maintainers + *out = make([]*Maintainer, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Maintainer) + **out = **in + } + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Urls != nil { + in, out := &in.Urls, &out.Urls + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata. +func (in *Metadata) DeepCopy() *Metadata { + if in == nil { + return nil + } + out := new(Metadata) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SleepModeConfig) DeepCopyInto(out *SleepModeConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepModeConfig. +func (in *SleepModeConfig) DeepCopy() *SleepModeConfig { + if in == nil { + return nil + } + out := new(SleepModeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SleepModeConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SleepModeConfigList) DeepCopyInto(out *SleepModeConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SleepModeConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepModeConfigList. +func (in *SleepModeConfigList) DeepCopy() *SleepModeConfigList { + if in == nil { + return nil + } + out := new(SleepModeConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SleepModeConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SleepModeConfigSpec) DeepCopyInto(out *SleepModeConfigSpec) { + *out = *in + if in.ForceSleepDuration != nil { + in, out := &in.ForceSleepDuration, &out.ForceSleepDuration + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepModeConfigSpec. +func (in *SleepModeConfigSpec) DeepCopy() *SleepModeConfigSpec { + if in == nil { + return nil + } + out := new(SleepModeConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SleepModeConfigStatus) DeepCopyInto(out *SleepModeConfigStatus) { + *out = *in + if in.LastActivityInfo != nil { + in, out := &in.LastActivityInfo, &out.LastActivityInfo + *out = new(LastActivityInfo) + **out = **in + } + if in.CurrentEpoch != nil { + in, out := &in.CurrentEpoch, &out.CurrentEpoch + *out = new(EpochInfo) + **out = **in + } + if in.LastEpoch != nil { + in, out := &in.LastEpoch, &out.LastEpoch + *out = new(EpochInfo) + **out = **in + } + if in.SleptLastThirtyDays != nil { + in, out := &in.SleptLastThirtyDays, &out.SleptLastThirtyDays + *out = new(float64) + **out = **in + } + if in.SleptLastSevenDays != nil { + in, out := &in.SleptLastSevenDays, &out.SleptLastSevenDays + *out = new(float64) + **out = **in + } + if in.ScheduledSleep != nil { + in, out := &in.ScheduledSleep, &out.ScheduledSleep + *out = new(int64) + **out = **in + } + if in.ScheduledWakeup != nil { + in, out := &in.ScheduledWakeup, &out.ScheduledWakeup + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepModeConfigStatus. +func (in *SleepModeConfigStatus) DeepCopy() *SleepModeConfigStatus { + if in == nil { + return nil + } + out := new(SleepModeConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Space) DeepCopyInto(out *Space) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Space. +func (in *Space) DeepCopy() *Space { + if in == nil { + return nil + } + out := new(Space) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Space) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraintNamespaceStatus) DeepCopyInto(out *SpaceConstraintNamespaceStatus) { + *out = *in + if in.AppliedClusterRole != nil { + in, out := &in.AppliedClusterRole, &out.AppliedClusterRole + *out = new(string) + **out = **in + } + in.AppliedMetadata.DeepCopyInto(&out.AppliedMetadata) + if in.AppliedObjects != nil { + in, out := &in.AppliedObjects, &out.AppliedObjects + *out = make([]AppliedObject, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraintNamespaceStatus. +func (in *SpaceConstraintNamespaceStatus) DeepCopy() *SpaceConstraintNamespaceStatus { + if in == nil { + return nil + } + out := new(SpaceConstraintNamespaceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceList) DeepCopyInto(out *SpaceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Space, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceList. +func (in *SpaceList) DeepCopy() *SpaceList { + if in == nil { + return nil + } + out := new(SpaceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceObjectsNamespaceStatus) DeepCopyInto(out *SpaceObjectsNamespaceStatus) { + *out = *in + if in.AppliedObjects != nil { + in, out := &in.AppliedObjects, &out.AppliedObjects + *out = make([]AppliedObject, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceObjectsNamespaceStatus. +func (in *SpaceObjectsNamespaceStatus) DeepCopy() *SpaceObjectsNamespaceStatus { + if in == nil { + return nil + } + out := new(SpaceObjectsNamespaceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceSpec) DeepCopyInto(out *SpaceSpec) { + *out = *in + if in.Finalizers != nil { + in, out := &in.Finalizers, &out.Finalizers + *out = make([]corev1.FinalizerName, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpec. +func (in *SpaceSpec) DeepCopy() *SpaceSpec { + if in == nil { + return nil + } + out := new(SpaceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceStatus) DeepCopyInto(out *SpaceStatus) { + *out = *in + if in.SleepModeConfig != nil { + in, out := &in.SleepModeConfig, &out.SleepModeConfig + *out = new(SleepModeConfig) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + (*in).DeepCopyInto(*out) + } + if in.SpaceObjectsStatus != nil { + in, out := &in.SpaceObjectsStatus, &out.SpaceObjectsStatus + *out = new(SpaceObjectsNamespaceStatus) + (*in).DeepCopyInto(*out) + } + if in.TemplateSyncStatus != nil { + in, out := &in.TemplateSyncStatus, &out.TemplateSyncStatus + *out = new(TemplateSyncStatus) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceStatus. +func (in *SpaceStatus) DeepCopy() *SpaceStatus { + if in == nil { + return nil + } + out := new(SpaceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateSyncStatus) DeepCopyInto(out *TemplateSyncStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSyncStatus. +func (in *TemplateSyncStatus) DeepCopy() *TemplateSyncStatus { + if in == nil { + return nil + } + out := new(TemplateSyncStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserOrTeam) DeepCopyInto(out *UserOrTeam) { + *out = *in + if in.User != nil { + in, out := &in.User, &out.User + *out = new(EntityInfo) + **out = **in + } + if in.Team != nil { + in, out := &in.Team, &out.Team + *out = new(EntityInfo) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserOrTeam. +func (in *UserOrTeam) DeepCopy() *UserOrTeam { + if in == nil { + return nil + } + out := new(UserOrTeam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualCluster) DeepCopyInto(out *VirtualCluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualCluster. +func (in *VirtualCluster) DeepCopy() *VirtualCluster { + if in == nil { + return nil + } + out := new(VirtualCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualCluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterList) DeepCopyInto(out *VirtualClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualCluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterList. +func (in *VirtualClusterList) DeepCopy() *VirtualClusterList { + if in == nil { + return nil + } + out := new(VirtualClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSpec) DeepCopyInto(out *VirtualClusterSpec) { + *out = *in + in.VirtualClusterSpec.DeepCopyInto(&out.VirtualClusterSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterSpec. +func (in *VirtualClusterSpec) DeepCopy() *VirtualClusterSpec { + if in == nil { + return nil + } + out := new(VirtualClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterStatus) DeepCopyInto(out *VirtualClusterStatus) { + *out = *in + in.VirtualClusterStatus.DeepCopyInto(&out.VirtualClusterStatus) + if in.SyncerPod != nil { + in, out := &in.SyncerPod, &out.SyncerPod + *out = new(corev1.Pod) + (*in).DeepCopyInto(*out) + } + if in.ClusterPod != nil { + in, out := &in.ClusterPod, &out.ClusterPod + *out = new(corev1.Pod) + (*in).DeepCopyInto(*out) + } + if in.SleepModeConfig != nil { + in, out := &in.SleepModeConfig, &out.SleepModeConfig + *out = new(SleepModeConfig) + (*in).DeepCopyInto(*out) + } + if in.TemplateSyncStatus != nil { + in, out := &in.TemplateSyncStatus, &out.TemplateSyncStatus + *out = new(TemplateSyncStatus) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterStatus. +func (in *VirtualClusterStatus) DeepCopy() *VirtualClusterStatus { + if in == nil { + return nil + } + out := new(VirtualClusterStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.defaults.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.defaults.go new file mode 100644 index 000000000..2f172f20a --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1/zz_generated.defaults.go @@ -0,0 +1,231 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&VirtualCluster{}, func(obj interface{}) { SetObjectDefaults_VirtualCluster(obj.(*VirtualCluster)) }) + scheme.AddTypeDefaultingFunc(&VirtualClusterList{}, func(obj interface{}) { SetObjectDefaults_VirtualClusterList(obj.(*VirtualClusterList)) }) + return nil +} + +func SetObjectDefaults_VirtualCluster(in *VirtualCluster) { + if in.Status.SyncerPod != nil { + for i := range in.Status.SyncerPod.Spec.InitContainers { + a := &in.Status.SyncerPod.Spec.InitContainers[i] + for j := range a.Ports { + b := &a.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.LivenessProbe != nil { + if a.LivenessProbe.ProbeHandler.GRPC != nil { + if a.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.ReadinessProbe != nil { + if a.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.StartupProbe != nil { + if a.StartupProbe.ProbeHandler.GRPC != nil { + if a.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for i := range in.Status.SyncerPod.Spec.Containers { + a := &in.Status.SyncerPod.Spec.Containers[i] + for j := range a.Ports { + b := &a.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.LivenessProbe != nil { + if a.LivenessProbe.ProbeHandler.GRPC != nil { + if a.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.ReadinessProbe != nil { + if a.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.StartupProbe != nil { + if a.StartupProbe.ProbeHandler.GRPC != nil { + if a.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for i := range in.Status.SyncerPod.Spec.EphemeralContainers { + a := &in.Status.SyncerPod.Spec.EphemeralContainers[i] + for j := range a.EphemeralContainerCommon.Ports { + b := &a.EphemeralContainerCommon.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.EphemeralContainerCommon.LivenessProbe != nil { + if a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.EphemeralContainerCommon.ReadinessProbe != nil { + if a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.EphemeralContainerCommon.StartupProbe != nil { + if a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + } + if in.Status.ClusterPod != nil { + for i := range in.Status.ClusterPod.Spec.InitContainers { + a := &in.Status.ClusterPod.Spec.InitContainers[i] + for j := range a.Ports { + b := &a.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.LivenessProbe != nil { + if a.LivenessProbe.ProbeHandler.GRPC != nil { + if a.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.ReadinessProbe != nil { + if a.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.StartupProbe != nil { + if a.StartupProbe.ProbeHandler.GRPC != nil { + if a.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for i := range in.Status.ClusterPod.Spec.Containers { + a := &in.Status.ClusterPod.Spec.Containers[i] + for j := range a.Ports { + b := &a.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.LivenessProbe != nil { + if a.LivenessProbe.ProbeHandler.GRPC != nil { + if a.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.ReadinessProbe != nil { + if a.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.StartupProbe != nil { + if a.StartupProbe.ProbeHandler.GRPC != nil { + if a.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for i := range in.Status.ClusterPod.Spec.EphemeralContainers { + a := &in.Status.ClusterPod.Spec.EphemeralContainers[i] + for j := range a.EphemeralContainerCommon.Ports { + b := &a.EphemeralContainerCommon.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.EphemeralContainerCommon.LivenessProbe != nil { + if a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.EphemeralContainerCommon.ReadinessProbe != nil { + if a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.EphemeralContainerCommon.StartupProbe != nil { + if a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + } +} + +func SetObjectDefaults_VirtualClusterList(in *VirtualClusterList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_VirtualCluster(a) + } +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/zz_generated.api.register.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/zz_generated.api.register.go new file mode 100644 index 000000000..2d739a784 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/zz_generated.api.register.go @@ -0,0 +1,1489 @@ +// Code generated by generator. DO NOT EDIT. + +package cluster + +import ( + "context" + "fmt" + + storagev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + "github.com/loft-sh/apiserver/pkg/builders" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/registry/rest" + configrest "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +type NewRESTFunc func(config *configrest.Config, cachedClient, uncachedClient, cachedManagementClient, uncachedManagementClient client.Client) rest.Storage + +var ( + ClusterChartInfoStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalChartInfo, + func() runtime.Object { return &ChartInfo{} }, // Register versioned resource + func() runtime.Object { return &ChartInfoList{} }, // Register versioned resource list + NewChartInfoREST, + ) + NewChartInfoREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewChartInfoRESTFunc(Config, CachedClient, UncachedClient, CachedManagementClient, UncachedManagementClient) + } + NewChartInfoRESTFunc NewRESTFunc + ClusterClusterQuotaStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalClusterQuota, + func() runtime.Object { return &ClusterQuota{} }, // Register versioned resource + func() runtime.Object { return &ClusterQuotaList{} }, // Register versioned resource list + NewClusterQuotaREST, + ) + NewClusterQuotaREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterQuotaRESTFunc(Config, CachedClient, UncachedClient, CachedManagementClient, UncachedManagementClient) + } + NewClusterQuotaRESTFunc NewRESTFunc + ClusterFeatureStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalFeature, + func() runtime.Object { return &Feature{} }, // Register versioned resource + func() runtime.Object { return &FeatureList{} }, // Register versioned resource list + NewFeatureREST, + ) + NewFeatureREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewFeatureRESTFunc(Config, CachedClient, UncachedClient, CachedManagementClient, UncachedManagementClient) + } + NewFeatureRESTFunc NewRESTFunc + ClusterHelmReleaseStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalHelmRelease, + func() runtime.Object { return &HelmRelease{} }, // Register versioned resource + func() runtime.Object { return &HelmReleaseList{} }, // Register versioned resource list + NewHelmReleaseREST, + ) + NewHelmReleaseREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewHelmReleaseRESTFunc(Config, CachedClient, UncachedClient, CachedManagementClient, UncachedManagementClient) + } + NewHelmReleaseRESTFunc NewRESTFunc + ClusterLocalClusterAccessStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalLocalClusterAccess, + func() runtime.Object { return &LocalClusterAccess{} }, // Register versioned resource + func() runtime.Object { return &LocalClusterAccessList{} }, // Register versioned resource list + NewLocalClusterAccessREST, + ) + NewLocalClusterAccessREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewLocalClusterAccessRESTFunc(Config, CachedClient, UncachedClient, CachedManagementClient, UncachedManagementClient) + } + NewLocalClusterAccessRESTFunc NewRESTFunc + ClusterSleepModeConfigStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalSleepModeConfig, + func() runtime.Object { return &SleepModeConfig{} }, // Register versioned resource + func() runtime.Object { return &SleepModeConfigList{} }, // Register versioned resource list + NewSleepModeConfigREST, + ) + NewSleepModeConfigREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewSleepModeConfigRESTFunc(Config, CachedClient, UncachedClient, CachedManagementClient, UncachedManagementClient) + } + NewSleepModeConfigRESTFunc NewRESTFunc + ClusterSpaceStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalSpace, + func() runtime.Object { return &Space{} }, // Register versioned resource + func() runtime.Object { return &SpaceList{} }, // Register versioned resource list + NewSpaceREST, + ) + NewSpaceREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewSpaceRESTFunc(Config, CachedClient, UncachedClient, CachedManagementClient, UncachedManagementClient) + } + NewSpaceRESTFunc NewRESTFunc + ClusterVirtualClusterStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalVirtualCluster, + func() runtime.Object { return &VirtualCluster{} }, // Register versioned resource + func() runtime.Object { return &VirtualClusterList{} }, // Register versioned resource list + NewVirtualClusterREST, + ) + NewVirtualClusterREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewVirtualClusterRESTFunc(Config, CachedClient, UncachedClient, CachedManagementClient, UncachedManagementClient) + } + NewVirtualClusterRESTFunc NewRESTFunc + InternalChartInfo = builders.NewInternalResource( + "chartinfos", + "ChartInfo", + func() runtime.Object { return &ChartInfo{} }, + func() runtime.Object { return &ChartInfoList{} }, + ) + InternalChartInfoStatus = builders.NewInternalResourceStatus( + "chartinfos", + "ChartInfoStatus", + func() runtime.Object { return &ChartInfo{} }, + func() runtime.Object { return &ChartInfoList{} }, + ) + InternalClusterQuota = builders.NewInternalResource( + "clusterquotas", + "ClusterQuota", + func() runtime.Object { return &ClusterQuota{} }, + func() runtime.Object { return &ClusterQuotaList{} }, + ) + InternalClusterQuotaStatus = builders.NewInternalResourceStatus( + "clusterquotas", + "ClusterQuotaStatus", + func() runtime.Object { return &ClusterQuota{} }, + func() runtime.Object { return &ClusterQuotaList{} }, + ) + InternalFeature = builders.NewInternalResource( + "features", + "Feature", + func() runtime.Object { return &Feature{} }, + func() runtime.Object { return &FeatureList{} }, + ) + InternalFeatureStatus = builders.NewInternalResourceStatus( + "features", + "FeatureStatus", + func() runtime.Object { return &Feature{} }, + func() runtime.Object { return &FeatureList{} }, + ) + InternalHelmRelease = builders.NewInternalResource( + "helmreleases", + "HelmRelease", + func() runtime.Object { return &HelmRelease{} }, + func() runtime.Object { return &HelmReleaseList{} }, + ) + InternalHelmReleaseStatus = builders.NewInternalResourceStatus( + "helmreleases", + "HelmReleaseStatus", + func() runtime.Object { return &HelmRelease{} }, + func() runtime.Object { return &HelmReleaseList{} }, + ) + InternalLocalClusterAccess = builders.NewInternalResource( + "localclusteraccesses", + "LocalClusterAccess", + func() runtime.Object { return &LocalClusterAccess{} }, + func() runtime.Object { return &LocalClusterAccessList{} }, + ) + InternalLocalClusterAccessStatus = builders.NewInternalResourceStatus( + "localclusteraccesses", + "LocalClusterAccessStatus", + func() runtime.Object { return &LocalClusterAccess{} }, + func() runtime.Object { return &LocalClusterAccessList{} }, + ) + InternalSleepModeConfig = builders.NewInternalResource( + "sleepmodeconfigs", + "SleepModeConfig", + func() runtime.Object { return &SleepModeConfig{} }, + func() runtime.Object { return &SleepModeConfigList{} }, + ) + InternalSleepModeConfigStatus = builders.NewInternalResourceStatus( + "sleepmodeconfigs", + "SleepModeConfigStatus", + func() runtime.Object { return &SleepModeConfig{} }, + func() runtime.Object { return &SleepModeConfigList{} }, + ) + InternalSpace = builders.NewInternalResource( + "spaces", + "Space", + func() runtime.Object { return &Space{} }, + func() runtime.Object { return &SpaceList{} }, + ) + InternalSpaceStatus = builders.NewInternalResourceStatus( + "spaces", + "SpaceStatus", + func() runtime.Object { return &Space{} }, + func() runtime.Object { return &SpaceList{} }, + ) + InternalVirtualCluster = builders.NewInternalResource( + "virtualclusters", + "VirtualCluster", + func() runtime.Object { return &VirtualCluster{} }, + func() runtime.Object { return &VirtualClusterList{} }, + ) + InternalVirtualClusterStatus = builders.NewInternalResourceStatus( + "virtualclusters", + "VirtualClusterStatus", + func() runtime.Object { return &VirtualCluster{} }, + func() runtime.Object { return &VirtualClusterList{} }, + ) + // Registered resources and subresources + ApiVersion = builders.NewApiGroup("cluster.loft.sh").WithKinds( + InternalChartInfo, + InternalChartInfoStatus, + InternalClusterQuota, + InternalClusterQuotaStatus, + InternalFeature, + InternalFeatureStatus, + InternalHelmRelease, + InternalHelmReleaseStatus, + InternalLocalClusterAccess, + InternalLocalClusterAccessStatus, + InternalSleepModeConfig, + InternalSleepModeConfigStatus, + InternalSpace, + InternalSpaceStatus, + InternalVirtualCluster, + InternalVirtualClusterStatus, + ) + + // Required by code generated by go2idl + AddToScheme = (&runtime.SchemeBuilder{ + ApiVersion.SchemeBuilder.AddToScheme, + RegisterDefaults, + }).AddToScheme + SchemeBuilder = ApiVersion.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + SchemeGroupVersion = ApiVersion.GroupVersion +) + +// Required by code generated by go2idl +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Required by code generated by go2idl +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +type FinalizerName string +type NamespacePhase string +type Status string + +type AppliedObject struct { + APIVersion string + Kind string + Name string +} + +type Bash struct { + Script string + Image string + ClusterRole string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ChartInfo struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ChartInfoSpec + Status ChartInfoStatus +} + +type ChartInfoSpec struct { + Chart storagev1.Chart +} + +type ChartInfoStatus struct { + Metadata *Metadata + Readme string + Values string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterQuota struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ClusterQuotaSpec + Status ClusterQuotaStatus +} + +type ClusterQuotaSpec struct { + storagev1.ClusterQuotaSpec +} + +type ClusterQuotaStatus struct { + storagev1.ClusterQuotaStatus + Owner *UserOrTeam +} + +type EntityInfo struct { + Name string + DisplayName string + Icon string + Username string + Email string + Subject string +} + +type EpochInfo struct { + Start int64 + Slept int64 +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Feature struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec FeatureSpec + Status FeatureStatus +} + +type FeatureSpec struct { +} + +type FeatureStatus struct { + Enabled bool +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type HelmRelease struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec HelmReleaseSpec + Status HelmReleaseStatus +} + +type HelmReleaseConfig struct { + Chart storagev1.Chart + Manifests string + Bash *Bash + Values string + Parameters string + Annotations map[string]string +} + +type HelmReleaseSpec struct { + HelmReleaseConfig +} + +type HelmReleaseStatus struct { + Revision int + Info *Info + Metadata *Metadata +} + +type Info struct { + FirstDeployed metav1.Time + LastDeployed metav1.Time + Deleted metav1.Time + Description string + Status Status + Notes string +} + +type LastActivityInfo struct { + Subject string + Host string + Verb string + APIGroup string + Resource string + Subresource string + Name string + VirtualCluster string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LocalClusterAccess struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec LocalClusterAccessSpec + Status LocalClusterAccessStatus +} + +type LocalClusterAccessSpec struct { + storagev1.LocalClusterAccessSpec +} + +type LocalClusterAccessStatus struct { + storagev1.LocalClusterAccessStatus + Users []*UserOrTeam + Teams []*EntityInfo +} + +type Maintainer struct { + Name string + Email string + URL string +} + +type Metadata struct { + Name string + Home string + Sources []string + Version string + Description string + Keywords []string + Maintainers []*Maintainer + Icon string + APIVersion string + Condition string + Tags string + AppVersion string + Deprecated bool + Annotations map[string]string + KubeVersion string + Type string + Urls []string +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SleepModeConfig struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec SleepModeConfigSpec + Status SleepModeConfigStatus +} + +type SleepModeConfigSpec struct { + ForceSleep bool + ForceSleepDuration *int64 + DeleteAllPods bool + DeleteAfter int64 + SleepAfter int64 + SleepSchedule string + WakeupSchedule string + Timezone string + IgnoreActiveConnections bool + IgnoreAll bool + IgnoreIngresses bool + IgnoreVClusters bool + IgnoreGroups string + IgnoreVerbs string + IgnoreResources string + IgnoreResourceVerbs string + IgnoreResourceNames string +} + +type SleepModeConfigStatus struct { + LastActivity int64 + LastActivityInfo *LastActivityInfo + SleepingSince int64 + CurrentEpoch *EpochInfo + LastEpoch *EpochInfo + SleptLastThirtyDays *float64 + SleptLastSevenDays *float64 + ScheduledSleep *int64 + ScheduledWakeup *int64 + SleepType string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Space struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec SpaceSpec + Status SpaceStatus +} + +type SpaceObjectsNamespaceStatus struct { + Phase string + Reason string + Message string + AppliedObjects []AppliedObject +} + +type SpaceSpec struct { + User string + Team string + Objects string + Finalizers []corev1.FinalizerName +} + +type SpaceStatus struct { + Phase corev1.NamespacePhase + SleepModeConfig *SleepModeConfig + Owner *UserOrTeam + SpaceObjectsStatus *SpaceObjectsNamespaceStatus + TemplateSyncStatus *TemplateSyncStatus +} + +type TemplateSyncStatus struct { + Template string + Phase string +} + +type UserOrTeam struct { + User *EntityInfo + Team *EntityInfo +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualCluster struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec VirtualClusterSpec + Status VirtualClusterStatus +} + +type VirtualClusterSpec struct { + storagev1.VirtualClusterSpec +} + +type VirtualClusterStatus struct { + storagev1.VirtualClusterStatus + SyncerPod *corev1.Pod + ClusterPod *corev1.Pod + SleepModeConfig *SleepModeConfig + TemplateSyncStatus *TemplateSyncStatus +} + +// ChartInfo Functions and Structs +// +// +k8s:deepcopy-gen=false +type ChartInfoStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type ChartInfoStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ChartInfoList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ChartInfo +} + +func (ChartInfo) NewStatus() interface{} { + return ChartInfoStatus{} +} + +func (pc *ChartInfo) GetStatus() interface{} { + return pc.Status +} + +func (pc *ChartInfo) SetStatus(s interface{}) { + pc.Status = s.(ChartInfoStatus) +} + +func (pc *ChartInfo) GetSpec() interface{} { + return pc.Spec +} + +func (pc *ChartInfo) SetSpec(s interface{}) { + pc.Spec = s.(ChartInfoSpec) +} + +func (pc *ChartInfo) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *ChartInfo) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc ChartInfo) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store ChartInfo. +// +k8s:deepcopy-gen=false +type ChartInfoRegistry interface { + ListChartInfos(ctx context.Context, options *internalversion.ListOptions) (*ChartInfoList, error) + GetChartInfo(ctx context.Context, id string, options *metav1.GetOptions) (*ChartInfo, error) + CreateChartInfo(ctx context.Context, id *ChartInfo) (*ChartInfo, error) + UpdateChartInfo(ctx context.Context, id *ChartInfo) (*ChartInfo, error) + DeleteChartInfo(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewChartInfoRegistry(sp builders.StandardStorageProvider) ChartInfoRegistry { + return &storageChartInfo{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageChartInfo struct { + builders.StandardStorageProvider +} + +func (s *storageChartInfo) ListChartInfos(ctx context.Context, options *internalversion.ListOptions) (*ChartInfoList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*ChartInfoList), err +} + +func (s *storageChartInfo) GetChartInfo(ctx context.Context, id string, options *metav1.GetOptions) (*ChartInfo, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*ChartInfo), nil +} + +func (s *storageChartInfo) CreateChartInfo(ctx context.Context, object *ChartInfo) (*ChartInfo, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ChartInfo), nil +} + +func (s *storageChartInfo) UpdateChartInfo(ctx context.Context, object *ChartInfo) (*ChartInfo, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ChartInfo), nil +} + +func (s *storageChartInfo) DeleteChartInfo(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// ClusterQuota Functions and Structs +// +// +k8s:deepcopy-gen=false +type ClusterQuotaStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type ClusterQuotaStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterQuotaList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterQuota +} + +func (ClusterQuota) NewStatus() interface{} { + return ClusterQuotaStatus{} +} + +func (pc *ClusterQuota) GetStatus() interface{} { + return pc.Status +} + +func (pc *ClusterQuota) SetStatus(s interface{}) { + pc.Status = s.(ClusterQuotaStatus) +} + +func (pc *ClusterQuota) GetSpec() interface{} { + return pc.Spec +} + +func (pc *ClusterQuota) SetSpec(s interface{}) { + pc.Spec = s.(ClusterQuotaSpec) +} + +func (pc *ClusterQuota) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *ClusterQuota) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc ClusterQuota) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store ClusterQuota. +// +k8s:deepcopy-gen=false +type ClusterQuotaRegistry interface { + ListClusterQuotas(ctx context.Context, options *internalversion.ListOptions) (*ClusterQuotaList, error) + GetClusterQuota(ctx context.Context, id string, options *metav1.GetOptions) (*ClusterQuota, error) + CreateClusterQuota(ctx context.Context, id *ClusterQuota) (*ClusterQuota, error) + UpdateClusterQuota(ctx context.Context, id *ClusterQuota) (*ClusterQuota, error) + DeleteClusterQuota(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewClusterQuotaRegistry(sp builders.StandardStorageProvider) ClusterQuotaRegistry { + return &storageClusterQuota{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageClusterQuota struct { + builders.StandardStorageProvider +} + +func (s *storageClusterQuota) ListClusterQuotas(ctx context.Context, options *internalversion.ListOptions) (*ClusterQuotaList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*ClusterQuotaList), err +} + +func (s *storageClusterQuota) GetClusterQuota(ctx context.Context, id string, options *metav1.GetOptions) (*ClusterQuota, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*ClusterQuota), nil +} + +func (s *storageClusterQuota) CreateClusterQuota(ctx context.Context, object *ClusterQuota) (*ClusterQuota, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ClusterQuota), nil +} + +func (s *storageClusterQuota) UpdateClusterQuota(ctx context.Context, object *ClusterQuota) (*ClusterQuota, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ClusterQuota), nil +} + +func (s *storageClusterQuota) DeleteClusterQuota(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Feature Functions and Structs +// +// +k8s:deepcopy-gen=false +type FeatureStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type FeatureStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type FeatureList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Feature +} + +func (Feature) NewStatus() interface{} { + return FeatureStatus{} +} + +func (pc *Feature) GetStatus() interface{} { + return pc.Status +} + +func (pc *Feature) SetStatus(s interface{}) { + pc.Status = s.(FeatureStatus) +} + +func (pc *Feature) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Feature) SetSpec(s interface{}) { + pc.Spec = s.(FeatureSpec) +} + +func (pc *Feature) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Feature) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Feature) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Feature. +// +k8s:deepcopy-gen=false +type FeatureRegistry interface { + ListFeatures(ctx context.Context, options *internalversion.ListOptions) (*FeatureList, error) + GetFeature(ctx context.Context, id string, options *metav1.GetOptions) (*Feature, error) + CreateFeature(ctx context.Context, id *Feature) (*Feature, error) + UpdateFeature(ctx context.Context, id *Feature) (*Feature, error) + DeleteFeature(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewFeatureRegistry(sp builders.StandardStorageProvider) FeatureRegistry { + return &storageFeature{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageFeature struct { + builders.StandardStorageProvider +} + +func (s *storageFeature) ListFeatures(ctx context.Context, options *internalversion.ListOptions) (*FeatureList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*FeatureList), err +} + +func (s *storageFeature) GetFeature(ctx context.Context, id string, options *metav1.GetOptions) (*Feature, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Feature), nil +} + +func (s *storageFeature) CreateFeature(ctx context.Context, object *Feature) (*Feature, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Feature), nil +} + +func (s *storageFeature) UpdateFeature(ctx context.Context, object *Feature) (*Feature, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Feature), nil +} + +func (s *storageFeature) DeleteFeature(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// HelmRelease Functions and Structs +// +// +k8s:deepcopy-gen=false +type HelmReleaseStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type HelmReleaseStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type HelmReleaseList struct { + metav1.TypeMeta + metav1.ListMeta + Items []HelmRelease +} + +func (HelmRelease) NewStatus() interface{} { + return HelmReleaseStatus{} +} + +func (pc *HelmRelease) GetStatus() interface{} { + return pc.Status +} + +func (pc *HelmRelease) SetStatus(s interface{}) { + pc.Status = s.(HelmReleaseStatus) +} + +func (pc *HelmRelease) GetSpec() interface{} { + return pc.Spec +} + +func (pc *HelmRelease) SetSpec(s interface{}) { + pc.Spec = s.(HelmReleaseSpec) +} + +func (pc *HelmRelease) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *HelmRelease) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc HelmRelease) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store HelmRelease. +// +k8s:deepcopy-gen=false +type HelmReleaseRegistry interface { + ListHelmReleases(ctx context.Context, options *internalversion.ListOptions) (*HelmReleaseList, error) + GetHelmRelease(ctx context.Context, id string, options *metav1.GetOptions) (*HelmRelease, error) + CreateHelmRelease(ctx context.Context, id *HelmRelease) (*HelmRelease, error) + UpdateHelmRelease(ctx context.Context, id *HelmRelease) (*HelmRelease, error) + DeleteHelmRelease(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewHelmReleaseRegistry(sp builders.StandardStorageProvider) HelmReleaseRegistry { + return &storageHelmRelease{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageHelmRelease struct { + builders.StandardStorageProvider +} + +func (s *storageHelmRelease) ListHelmReleases(ctx context.Context, options *internalversion.ListOptions) (*HelmReleaseList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*HelmReleaseList), err +} + +func (s *storageHelmRelease) GetHelmRelease(ctx context.Context, id string, options *metav1.GetOptions) (*HelmRelease, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*HelmRelease), nil +} + +func (s *storageHelmRelease) CreateHelmRelease(ctx context.Context, object *HelmRelease) (*HelmRelease, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*HelmRelease), nil +} + +func (s *storageHelmRelease) UpdateHelmRelease(ctx context.Context, object *HelmRelease) (*HelmRelease, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*HelmRelease), nil +} + +func (s *storageHelmRelease) DeleteHelmRelease(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// LocalClusterAccess Functions and Structs +// +// +k8s:deepcopy-gen=false +type LocalClusterAccessStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type LocalClusterAccessStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LocalClusterAccessList struct { + metav1.TypeMeta + metav1.ListMeta + Items []LocalClusterAccess +} + +func (LocalClusterAccess) NewStatus() interface{} { + return LocalClusterAccessStatus{} +} + +func (pc *LocalClusterAccess) GetStatus() interface{} { + return pc.Status +} + +func (pc *LocalClusterAccess) SetStatus(s interface{}) { + pc.Status = s.(LocalClusterAccessStatus) +} + +func (pc *LocalClusterAccess) GetSpec() interface{} { + return pc.Spec +} + +func (pc *LocalClusterAccess) SetSpec(s interface{}) { + pc.Spec = s.(LocalClusterAccessSpec) +} + +func (pc *LocalClusterAccess) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *LocalClusterAccess) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc LocalClusterAccess) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store LocalClusterAccess. +// +k8s:deepcopy-gen=false +type LocalClusterAccessRegistry interface { + ListLocalClusterAccesss(ctx context.Context, options *internalversion.ListOptions) (*LocalClusterAccessList, error) + GetLocalClusterAccess(ctx context.Context, id string, options *metav1.GetOptions) (*LocalClusterAccess, error) + CreateLocalClusterAccess(ctx context.Context, id *LocalClusterAccess) (*LocalClusterAccess, error) + UpdateLocalClusterAccess(ctx context.Context, id *LocalClusterAccess) (*LocalClusterAccess, error) + DeleteLocalClusterAccess(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewLocalClusterAccessRegistry(sp builders.StandardStorageProvider) LocalClusterAccessRegistry { + return &storageLocalClusterAccess{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageLocalClusterAccess struct { + builders.StandardStorageProvider +} + +func (s *storageLocalClusterAccess) ListLocalClusterAccesss(ctx context.Context, options *internalversion.ListOptions) (*LocalClusterAccessList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*LocalClusterAccessList), err +} + +func (s *storageLocalClusterAccess) GetLocalClusterAccess(ctx context.Context, id string, options *metav1.GetOptions) (*LocalClusterAccess, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*LocalClusterAccess), nil +} + +func (s *storageLocalClusterAccess) CreateLocalClusterAccess(ctx context.Context, object *LocalClusterAccess) (*LocalClusterAccess, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*LocalClusterAccess), nil +} + +func (s *storageLocalClusterAccess) UpdateLocalClusterAccess(ctx context.Context, object *LocalClusterAccess) (*LocalClusterAccess, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*LocalClusterAccess), nil +} + +func (s *storageLocalClusterAccess) DeleteLocalClusterAccess(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// SleepModeConfig Functions and Structs +// +// +k8s:deepcopy-gen=false +type SleepModeConfigStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type SleepModeConfigStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SleepModeConfigList struct { + metav1.TypeMeta + metav1.ListMeta + Items []SleepModeConfig +} + +func (SleepModeConfig) NewStatus() interface{} { + return SleepModeConfigStatus{} +} + +func (pc *SleepModeConfig) GetStatus() interface{} { + return pc.Status +} + +func (pc *SleepModeConfig) SetStatus(s interface{}) { + pc.Status = s.(SleepModeConfigStatus) +} + +func (pc *SleepModeConfig) GetSpec() interface{} { + return pc.Spec +} + +func (pc *SleepModeConfig) SetSpec(s interface{}) { + pc.Spec = s.(SleepModeConfigSpec) +} + +func (pc *SleepModeConfig) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *SleepModeConfig) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc SleepModeConfig) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store SleepModeConfig. +// +k8s:deepcopy-gen=false +type SleepModeConfigRegistry interface { + ListSleepModeConfigs(ctx context.Context, options *internalversion.ListOptions) (*SleepModeConfigList, error) + GetSleepModeConfig(ctx context.Context, id string, options *metav1.GetOptions) (*SleepModeConfig, error) + CreateSleepModeConfig(ctx context.Context, id *SleepModeConfig) (*SleepModeConfig, error) + UpdateSleepModeConfig(ctx context.Context, id *SleepModeConfig) (*SleepModeConfig, error) + DeleteSleepModeConfig(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewSleepModeConfigRegistry(sp builders.StandardStorageProvider) SleepModeConfigRegistry { + return &storageSleepModeConfig{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageSleepModeConfig struct { + builders.StandardStorageProvider +} + +func (s *storageSleepModeConfig) ListSleepModeConfigs(ctx context.Context, options *internalversion.ListOptions) (*SleepModeConfigList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*SleepModeConfigList), err +} + +func (s *storageSleepModeConfig) GetSleepModeConfig(ctx context.Context, id string, options *metav1.GetOptions) (*SleepModeConfig, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*SleepModeConfig), nil +} + +func (s *storageSleepModeConfig) CreateSleepModeConfig(ctx context.Context, object *SleepModeConfig) (*SleepModeConfig, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SleepModeConfig), nil +} + +func (s *storageSleepModeConfig) UpdateSleepModeConfig(ctx context.Context, object *SleepModeConfig) (*SleepModeConfig, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SleepModeConfig), nil +} + +func (s *storageSleepModeConfig) DeleteSleepModeConfig(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Space Functions and Structs +// +// +k8s:deepcopy-gen=false +type SpaceStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type SpaceStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Space +} + +func (Space) NewStatus() interface{} { + return SpaceStatus{} +} + +func (pc *Space) GetStatus() interface{} { + return pc.Status +} + +func (pc *Space) SetStatus(s interface{}) { + pc.Status = s.(SpaceStatus) +} + +func (pc *Space) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Space) SetSpec(s interface{}) { + pc.Spec = s.(SpaceSpec) +} + +func (pc *Space) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Space) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Space) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Space. +// +k8s:deepcopy-gen=false +type SpaceRegistry interface { + ListSpaces(ctx context.Context, options *internalversion.ListOptions) (*SpaceList, error) + GetSpace(ctx context.Context, id string, options *metav1.GetOptions) (*Space, error) + CreateSpace(ctx context.Context, id *Space) (*Space, error) + UpdateSpace(ctx context.Context, id *Space) (*Space, error) + DeleteSpace(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewSpaceRegistry(sp builders.StandardStorageProvider) SpaceRegistry { + return &storageSpace{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageSpace struct { + builders.StandardStorageProvider +} + +func (s *storageSpace) ListSpaces(ctx context.Context, options *internalversion.ListOptions) (*SpaceList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*SpaceList), err +} + +func (s *storageSpace) GetSpace(ctx context.Context, id string, options *metav1.GetOptions) (*Space, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Space), nil +} + +func (s *storageSpace) CreateSpace(ctx context.Context, object *Space) (*Space, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Space), nil +} + +func (s *storageSpace) UpdateSpace(ctx context.Context, object *Space) (*Space, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Space), nil +} + +func (s *storageSpace) DeleteSpace(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// VirtualCluster Functions and Structs +// +// +k8s:deepcopy-gen=false +type VirtualClusterStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type VirtualClusterStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterList struct { + metav1.TypeMeta + metav1.ListMeta + Items []VirtualCluster +} + +func (VirtualCluster) NewStatus() interface{} { + return VirtualClusterStatus{} +} + +func (pc *VirtualCluster) GetStatus() interface{} { + return pc.Status +} + +func (pc *VirtualCluster) SetStatus(s interface{}) { + pc.Status = s.(VirtualClusterStatus) +} + +func (pc *VirtualCluster) GetSpec() interface{} { + return pc.Spec +} + +func (pc *VirtualCluster) SetSpec(s interface{}) { + pc.Spec = s.(VirtualClusterSpec) +} + +func (pc *VirtualCluster) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *VirtualCluster) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc VirtualCluster) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store VirtualCluster. +// +k8s:deepcopy-gen=false +type VirtualClusterRegistry interface { + ListVirtualClusters(ctx context.Context, options *internalversion.ListOptions) (*VirtualClusterList, error) + GetVirtualCluster(ctx context.Context, id string, options *metav1.GetOptions) (*VirtualCluster, error) + CreateVirtualCluster(ctx context.Context, id *VirtualCluster) (*VirtualCluster, error) + UpdateVirtualCluster(ctx context.Context, id *VirtualCluster) (*VirtualCluster, error) + DeleteVirtualCluster(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewVirtualClusterRegistry(sp builders.StandardStorageProvider) VirtualClusterRegistry { + return &storageVirtualCluster{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageVirtualCluster struct { + builders.StandardStorageProvider +} + +func (s *storageVirtualCluster) ListVirtualClusters(ctx context.Context, options *internalversion.ListOptions) (*VirtualClusterList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterList), err +} + +func (s *storageVirtualCluster) GetVirtualCluster(ctx context.Context, id string, options *metav1.GetOptions) (*VirtualCluster, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*VirtualCluster), nil +} + +func (s *storageVirtualCluster) CreateVirtualCluster(ctx context.Context, object *VirtualCluster) (*VirtualCluster, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*VirtualCluster), nil +} + +func (s *storageVirtualCluster) UpdateVirtualCluster(ctx context.Context, object *VirtualCluster) (*VirtualCluster, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*VirtualCluster), nil +} + +func (s *storageVirtualCluster) DeleteVirtualCluster(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/zz_generated.deepcopy.go new file mode 100644 index 000000000..e0c627401 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/zz_generated.deepcopy.go @@ -0,0 +1,1146 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package cluster + +import ( + v1 "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppliedObject) DeepCopyInto(out *AppliedObject) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedObject. +func (in *AppliedObject) DeepCopy() *AppliedObject { + if in == nil { + return nil + } + out := new(AppliedObject) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Bash) DeepCopyInto(out *Bash) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bash. +func (in *Bash) DeepCopy() *Bash { + if in == nil { + return nil + } + out := new(Bash) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChartInfo) DeepCopyInto(out *ChartInfo) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfo. +func (in *ChartInfo) DeepCopy() *ChartInfo { + if in == nil { + return nil + } + out := new(ChartInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ChartInfo) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChartInfoList) DeepCopyInto(out *ChartInfoList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ChartInfo, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfoList. +func (in *ChartInfoList) DeepCopy() *ChartInfoList { + if in == nil { + return nil + } + out := new(ChartInfoList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ChartInfoList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChartInfoSpec) DeepCopyInto(out *ChartInfoSpec) { + *out = *in + out.Chart = in.Chart + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfoSpec. +func (in *ChartInfoSpec) DeepCopy() *ChartInfoSpec { + if in == nil { + return nil + } + out := new(ChartInfoSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChartInfoStatus) DeepCopyInto(out *ChartInfoStatus) { + *out = *in + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = new(Metadata) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfoStatus. +func (in *ChartInfoStatus) DeepCopy() *ChartInfoStatus { + if in == nil { + return nil + } + out := new(ChartInfoStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuota) DeepCopyInto(out *ClusterQuota) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuota. +func (in *ClusterQuota) DeepCopy() *ClusterQuota { + if in == nil { + return nil + } + out := new(ClusterQuota) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterQuota) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuotaList) DeepCopyInto(out *ClusterQuotaList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterQuota, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotaList. +func (in *ClusterQuotaList) DeepCopy() *ClusterQuotaList { + if in == nil { + return nil + } + out := new(ClusterQuotaList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterQuotaList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuotaSpec) DeepCopyInto(out *ClusterQuotaSpec) { + *out = *in + in.ClusterQuotaSpec.DeepCopyInto(&out.ClusterQuotaSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotaSpec. +func (in *ClusterQuotaSpec) DeepCopy() *ClusterQuotaSpec { + if in == nil { + return nil + } + out := new(ClusterQuotaSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuotaStatus) DeepCopyInto(out *ClusterQuotaStatus) { + *out = *in + in.ClusterQuotaStatus.DeepCopyInto(&out.ClusterQuotaStatus) + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotaStatus. +func (in *ClusterQuotaStatus) DeepCopy() *ClusterQuotaStatus { + if in == nil { + return nil + } + out := new(ClusterQuotaStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EntityInfo) DeepCopyInto(out *EntityInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EntityInfo. +func (in *EntityInfo) DeepCopy() *EntityInfo { + if in == nil { + return nil + } + out := new(EntityInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EpochInfo) DeepCopyInto(out *EpochInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EpochInfo. +func (in *EpochInfo) DeepCopy() *EpochInfo { + if in == nil { + return nil + } + out := new(EpochInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Feature) DeepCopyInto(out *Feature) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature. +func (in *Feature) DeepCopy() *Feature { + if in == nil { + return nil + } + out := new(Feature) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Feature) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureList) DeepCopyInto(out *FeatureList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Feature, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureList. +func (in *FeatureList) DeepCopy() *FeatureList { + if in == nil { + return nil + } + out := new(FeatureList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FeatureList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSpec. +func (in *FeatureSpec) DeepCopy() *FeatureSpec { + if in == nil { + return nil + } + out := new(FeatureSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureStatus) DeepCopyInto(out *FeatureStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureStatus. +func (in *FeatureStatus) DeepCopy() *FeatureStatus { + if in == nil { + return nil + } + out := new(FeatureStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmRelease) DeepCopyInto(out *HelmRelease) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease. +func (in *HelmRelease) DeepCopy() *HelmRelease { + if in == nil { + return nil + } + out := new(HelmRelease) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmRelease) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseConfig) DeepCopyInto(out *HelmReleaseConfig) { + *out = *in + out.Chart = in.Chart + if in.Bash != nil { + in, out := &in.Bash, &out.Bash + *out = new(Bash) + **out = **in + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseConfig. +func (in *HelmReleaseConfig) DeepCopy() *HelmReleaseConfig { + if in == nil { + return nil + } + out := new(HelmReleaseConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseList) DeepCopyInto(out *HelmReleaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HelmRelease, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseList. +func (in *HelmReleaseList) DeepCopy() *HelmReleaseList { + if in == nil { + return nil + } + out := new(HelmReleaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmReleaseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) { + *out = *in + in.HelmReleaseConfig.DeepCopyInto(&out.HelmReleaseConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseSpec. +func (in *HelmReleaseSpec) DeepCopy() *HelmReleaseSpec { + if in == nil { + return nil + } + out := new(HelmReleaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) { + *out = *in + if in.Info != nil { + in, out := &in.Info, &out.Info + *out = new(Info) + (*in).DeepCopyInto(*out) + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = new(Metadata) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseStatus. +func (in *HelmReleaseStatus) DeepCopy() *HelmReleaseStatus { + if in == nil { + return nil + } + out := new(HelmReleaseStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Info) DeepCopyInto(out *Info) { + *out = *in + in.FirstDeployed.DeepCopyInto(&out.FirstDeployed) + in.LastDeployed.DeepCopyInto(&out.LastDeployed) + in.Deleted.DeepCopyInto(&out.Deleted) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Info. +func (in *Info) DeepCopy() *Info { + if in == nil { + return nil + } + out := new(Info) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastActivityInfo) DeepCopyInto(out *LastActivityInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastActivityInfo. +func (in *LastActivityInfo) DeepCopy() *LastActivityInfo { + if in == nil { + return nil + } + out := new(LastActivityInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccess) DeepCopyInto(out *LocalClusterAccess) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccess. +func (in *LocalClusterAccess) DeepCopy() *LocalClusterAccess { + if in == nil { + return nil + } + out := new(LocalClusterAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalClusterAccess) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccessList) DeepCopyInto(out *LocalClusterAccessList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LocalClusterAccess, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccessList. +func (in *LocalClusterAccessList) DeepCopy() *LocalClusterAccessList { + if in == nil { + return nil + } + out := new(LocalClusterAccessList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalClusterAccessList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccessSpec) DeepCopyInto(out *LocalClusterAccessSpec) { + *out = *in + in.LocalClusterAccessSpec.DeepCopyInto(&out.LocalClusterAccessSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccessSpec. +func (in *LocalClusterAccessSpec) DeepCopy() *LocalClusterAccessSpec { + if in == nil { + return nil + } + out := new(LocalClusterAccessSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccessStatus) DeepCopyInto(out *LocalClusterAccessStatus) { + *out = *in + out.LocalClusterAccessStatus = in.LocalClusterAccessStatus + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]*UserOrTeam, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(UserOrTeam) + (*in).DeepCopyInto(*out) + } + } + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]*EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccessStatus. +func (in *LocalClusterAccessStatus) DeepCopy() *LocalClusterAccessStatus { + if in == nil { + return nil + } + out := new(LocalClusterAccessStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Maintainer) DeepCopyInto(out *Maintainer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Maintainer. +func (in *Maintainer) DeepCopy() *Maintainer { + if in == nil { + return nil + } + out := new(Maintainer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Metadata) DeepCopyInto(out *Metadata) { + *out = *in + if in.Sources != nil { + in, out := &in.Sources, &out.Sources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Keywords != nil { + in, out := &in.Keywords, &out.Keywords + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Maintainers != nil { + in, out := &in.Maintainers, &out.Maintainers + *out = make([]*Maintainer, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Maintainer) + **out = **in + } + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Urls != nil { + in, out := &in.Urls, &out.Urls + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata. +func (in *Metadata) DeepCopy() *Metadata { + if in == nil { + return nil + } + out := new(Metadata) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SleepModeConfig) DeepCopyInto(out *SleepModeConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepModeConfig. +func (in *SleepModeConfig) DeepCopy() *SleepModeConfig { + if in == nil { + return nil + } + out := new(SleepModeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SleepModeConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SleepModeConfigList) DeepCopyInto(out *SleepModeConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SleepModeConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepModeConfigList. +func (in *SleepModeConfigList) DeepCopy() *SleepModeConfigList { + if in == nil { + return nil + } + out := new(SleepModeConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SleepModeConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SleepModeConfigSpec) DeepCopyInto(out *SleepModeConfigSpec) { + *out = *in + if in.ForceSleepDuration != nil { + in, out := &in.ForceSleepDuration, &out.ForceSleepDuration + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepModeConfigSpec. +func (in *SleepModeConfigSpec) DeepCopy() *SleepModeConfigSpec { + if in == nil { + return nil + } + out := new(SleepModeConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SleepModeConfigStatus) DeepCopyInto(out *SleepModeConfigStatus) { + *out = *in + if in.LastActivityInfo != nil { + in, out := &in.LastActivityInfo, &out.LastActivityInfo + *out = new(LastActivityInfo) + **out = **in + } + if in.CurrentEpoch != nil { + in, out := &in.CurrentEpoch, &out.CurrentEpoch + *out = new(EpochInfo) + **out = **in + } + if in.LastEpoch != nil { + in, out := &in.LastEpoch, &out.LastEpoch + *out = new(EpochInfo) + **out = **in + } + if in.SleptLastThirtyDays != nil { + in, out := &in.SleptLastThirtyDays, &out.SleptLastThirtyDays + *out = new(float64) + **out = **in + } + if in.SleptLastSevenDays != nil { + in, out := &in.SleptLastSevenDays, &out.SleptLastSevenDays + *out = new(float64) + **out = **in + } + if in.ScheduledSleep != nil { + in, out := &in.ScheduledSleep, &out.ScheduledSleep + *out = new(int64) + **out = **in + } + if in.ScheduledWakeup != nil { + in, out := &in.ScheduledWakeup, &out.ScheduledWakeup + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepModeConfigStatus. +func (in *SleepModeConfigStatus) DeepCopy() *SleepModeConfigStatus { + if in == nil { + return nil + } + out := new(SleepModeConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Space) DeepCopyInto(out *Space) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Space. +func (in *Space) DeepCopy() *Space { + if in == nil { + return nil + } + out := new(Space) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Space) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceList) DeepCopyInto(out *SpaceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Space, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceList. +func (in *SpaceList) DeepCopy() *SpaceList { + if in == nil { + return nil + } + out := new(SpaceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceObjectsNamespaceStatus) DeepCopyInto(out *SpaceObjectsNamespaceStatus) { + *out = *in + if in.AppliedObjects != nil { + in, out := &in.AppliedObjects, &out.AppliedObjects + *out = make([]AppliedObject, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceObjectsNamespaceStatus. +func (in *SpaceObjectsNamespaceStatus) DeepCopy() *SpaceObjectsNamespaceStatus { + if in == nil { + return nil + } + out := new(SpaceObjectsNamespaceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceSpec) DeepCopyInto(out *SpaceSpec) { + *out = *in + if in.Finalizers != nil { + in, out := &in.Finalizers, &out.Finalizers + *out = make([]v1.FinalizerName, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpec. +func (in *SpaceSpec) DeepCopy() *SpaceSpec { + if in == nil { + return nil + } + out := new(SpaceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceStatus) DeepCopyInto(out *SpaceStatus) { + *out = *in + if in.SleepModeConfig != nil { + in, out := &in.SleepModeConfig, &out.SleepModeConfig + *out = new(SleepModeConfig) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + (*in).DeepCopyInto(*out) + } + if in.SpaceObjectsStatus != nil { + in, out := &in.SpaceObjectsStatus, &out.SpaceObjectsStatus + *out = new(SpaceObjectsNamespaceStatus) + (*in).DeepCopyInto(*out) + } + if in.TemplateSyncStatus != nil { + in, out := &in.TemplateSyncStatus, &out.TemplateSyncStatus + *out = new(TemplateSyncStatus) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceStatus. +func (in *SpaceStatus) DeepCopy() *SpaceStatus { + if in == nil { + return nil + } + out := new(SpaceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateSyncStatus) DeepCopyInto(out *TemplateSyncStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSyncStatus. +func (in *TemplateSyncStatus) DeepCopy() *TemplateSyncStatus { + if in == nil { + return nil + } + out := new(TemplateSyncStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserOrTeam) DeepCopyInto(out *UserOrTeam) { + *out = *in + if in.User != nil { + in, out := &in.User, &out.User + *out = new(EntityInfo) + **out = **in + } + if in.Team != nil { + in, out := &in.Team, &out.Team + *out = new(EntityInfo) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserOrTeam. +func (in *UserOrTeam) DeepCopy() *UserOrTeam { + if in == nil { + return nil + } + out := new(UserOrTeam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualCluster) DeepCopyInto(out *VirtualCluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualCluster. +func (in *VirtualCluster) DeepCopy() *VirtualCluster { + if in == nil { + return nil + } + out := new(VirtualCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualCluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterList) DeepCopyInto(out *VirtualClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualCluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterList. +func (in *VirtualClusterList) DeepCopy() *VirtualClusterList { + if in == nil { + return nil + } + out := new(VirtualClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSpec) DeepCopyInto(out *VirtualClusterSpec) { + *out = *in + in.VirtualClusterSpec.DeepCopyInto(&out.VirtualClusterSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterSpec. +func (in *VirtualClusterSpec) DeepCopy() *VirtualClusterSpec { + if in == nil { + return nil + } + out := new(VirtualClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterStatus) DeepCopyInto(out *VirtualClusterStatus) { + *out = *in + in.VirtualClusterStatus.DeepCopyInto(&out.VirtualClusterStatus) + if in.SyncerPod != nil { + in, out := &in.SyncerPod, &out.SyncerPod + *out = new(v1.Pod) + (*in).DeepCopyInto(*out) + } + if in.ClusterPod != nil { + in, out := &in.ClusterPod, &out.ClusterPod + *out = new(v1.Pod) + (*in).DeepCopyInto(*out) + } + if in.SleepModeConfig != nil { + in, out := &in.SleepModeConfig, &out.SleepModeConfig + *out = new(SleepModeConfig) + (*in).DeepCopyInto(*out) + } + if in.TemplateSyncStatus != nil { + in, out := &in.TemplateSyncStatus, &out.TemplateSyncStatus + *out = new(TemplateSyncStatus) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterStatus. +func (in *VirtualClusterStatus) DeepCopy() *VirtualClusterStatus { + if in == nil { + return nil + } + out := new(VirtualClusterStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/zz_generated.defaults.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/zz_generated.defaults.go new file mode 100644 index 000000000..cc2f7524d --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/zz_generated.defaults.go @@ -0,0 +1,17 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package cluster + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/clusterquota_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/clusterquota_types.go new file mode 100644 index 000000000..8458b597a --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/clusterquota_types.go @@ -0,0 +1,81 @@ +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterQuota is the Schema for the cluster quotas api +// +k8s:openapi-gen=true +type ClusterQuota struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterQuotaSpec `json:"spec,omitempty"` + + // +optional + Status ClusterQuotaStatus `json:"status,omitempty"` +} + +// ClusterQuotasStatusByNamespace bundles multiple resource quota status +type ClusterQuotasStatusByNamespace []ClusterQuotaStatusByNamespace + +// ClusterQuotaSpec defines the desired state of ClusterQuota +type ClusterQuotaSpec struct { + // User is the name of the user this quota should apply to + // +optional + User string `json:"user,omitempty"` + + // Team is the name of the team this quota should apply to + // +optional + Team string `json:"team,omitempty"` + + // Project is the project that this cluster quota should apply to + // +optional + Project string `json:"project,omitempty"` + + // quota is the quota definition with all the limits and selectors + // +optional + Quota corev1.ResourceQuotaSpec `json:"quota,omitempty"` +} + +// ClusterQuotaStatus defines the observed state of ClusterQuota +type ClusterQuotaStatus struct { + // Total defines the actual enforced quota and its current usage across all projects + // +optional + Total corev1.ResourceQuotaStatus `json:"total"` + + // Namespaces slices the usage by project. This division allows for quick resolution of + // deletion reconciliation inside of a single project without requiring a recalculation + // across all projects. This can be used to pull the deltas for a given project. + // +optional + // +nullable + Namespaces ClusterQuotasStatusByNamespace `json:"namespaces"` +} + +// ClusterQuotaStatusByNamespace holds the status of a specific namespace +type ClusterQuotaStatusByNamespace struct { + // Namespace of the account this account quota applies to + Namespace string `json:"namespace"` + + // Status indicates how many resources have been consumed by this project + // +optional + Status corev1.ResourceQuotaStatus `json:"status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterQuotaList contains a list of ClusterQuota +type ClusterQuotaList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterQuota `json:"items"` +} + +func init() { + SchemeBuilder.Register(&ClusterQuota{}, &ClusterQuotaList{}) +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/condition_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/condition_types.go new file mode 100644 index 000000000..7be0237ea --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/condition_types.go @@ -0,0 +1,77 @@ +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// Common ConditionTypes used by Cluster API objects. +const ( + // ReadyCondition defines the Ready condition type that summarizes the operational state of the virtual cluster API object. + ReadyCondition ConditionType = "Ready" + + // ControlPlaneReadyCondition defines the ready condition type if the virtual cluster is reachable. + ControlPlaneReadyCondition ConditionType = "ControlPlaneReady" + + // HelmChartDeployedCondition defines the helm chart deployed condition type that defines if the helm chart was deployed correctly. + HelmChartDeployedCondition ConditionType = "HelmChartDeployed" +) + +// ConditionSeverity expresses the severity of a Condition Type failing. +type ConditionSeverity string + +const ( + // ConditionSeverityError specifies that a condition with `Status=False` is an error. + ConditionSeverityError ConditionSeverity = "Error" + + // ConditionSeverityWarning specifies that a condition with `Status=False` is a warning. + ConditionSeverityWarning ConditionSeverity = "Warning" + + // ConditionSeverityInfo specifies that a condition with `Status=False` is informative. + ConditionSeverityInfo ConditionSeverity = "Info" + + // ConditionSeverityNone should apply only to conditions with `Status=True`. + ConditionSeverityNone ConditionSeverity = "" +) + +// Conditions is an array of conditions +type Conditions []Condition + +// ConditionType is a valid value for Condition.Type. +type ConditionType string + +// Condition defines an observation of a Cluster API resource operational state. +type Condition struct { + // Type of condition in CamelCase or in foo.example.com/CamelCase. + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + // can be useful (see .node.status.conditions), the ability to deconflict is important. + // +required + Type ConditionType `json:"type"` + + // Status of the condition, one of True, False, Unknown. + // +required + Status corev1.ConditionStatus `json:"status"` + + // Severity provides an explicit classification of Reason code, so the users or machines can immediately + // understand the current situation and act accordingly. + // The Severity field MUST be set only when Status=False. + // +optional + Severity ConditionSeverity `json:"severity,omitempty"` + + // Last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when + // the API field changed is acceptable. + // +required + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + + // The reason for the condition's last transition in CamelCase. + // The specific API may choose whether this field is considered a guaranteed API. + // This field may not be empty. + // +optional + Reason string `json:"reason,omitempty"` + + // A human readable message indicating details about the transition. + // This field may be empty. + // +optional + Message string `json:"message,omitempty"` +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/doc.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/doc.go new file mode 100644 index 000000000..35e54ef02 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/doc.go @@ -0,0 +1,9 @@ +// Api versions allow the api contract for a resource to be changed while keeping +// backward compatibility by support multiple concurrent versions +// of the same resource + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:defaulter-gen=TypeMeta +// +groupName=storage.loft.sh +package v1 // import "github.com/loft-sh/agentapi/v3/apis/loft/storage/v1" diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/groupversion_info.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/groupversion_info.go new file mode 100644 index 000000000..94b775875 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/groupversion_info.go @@ -0,0 +1,23 @@ +// Package v1alpha1 contains API Schema definitions for the config v1alpha1 API group +// +kubebuilder:object:generate=true +// +groupName=storage.loft.sh +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "storage.loft.sh", Version: "v1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme + + // SchemeGroupVersion is a shim that expect this to be present in the api package + SchemeGroupVersion = GroupVersion +) diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/localclusteraccess_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/localclusteraccess_types.go new file mode 100644 index 000000000..0502698db --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/localclusteraccess_types.go @@ -0,0 +1,97 @@ +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// LocalClusterAccess holds the cluster access information +// +k8s:openapi-gen=true +type LocalClusterAccess struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec LocalClusterAccessSpec `json:"spec,omitempty"` + Status LocalClusterAccessStatus `json:"status,omitempty"` +} + +type LocalClusterAccessSpec struct { + // DisplayName is the name that should be shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description is the description of this object in + // human-readable text. + // +optional + Description string `json:"description,omitempty"` + + // Users are the users affected by this cluster access object + // +optional + Users []UserOrTeam `json:"users,omitempty"` + + // Teams are the teams affected by this cluster access object + // +optional + Teams []string `json:"teams,omitempty"` + + // ClusterRoles define the cluster roles that the users should have assigned in the cluster. + // +optional + ClusterRoles []ClusterRoleRef `json:"clusterRoles,omitempty"` + + // Priority is a unique value that specifies the priority of this cluster access + // for the space constraints and quota. A higher priority means the cluster access object + // will override the space constraints of lower priority cluster access objects + // +optional + Priority int `json:"priority,omitempty"` + + // SpaceConstraintsRef is a reference to a space constraints object + // +optional + SpaceConstraintsRef *string `json:"spaceConstraintsRef,omitempty"` + + // Quota defines the quotas for the members that should be created. + // +optional + Quota *AccessQuota `json:"quota,omitempty"` +} + +type AccessQuota struct { + // hard is the set of desired hard limits for each named resource. + // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ + // +optional + Hard corev1.ResourceList `json:"hard,omitempty"` +} + +type ClusterRoleRef struct { + // Name is the cluster role to assign + // +optional + Name string `json:"name,omitempty"` +} + +type UserOrTeam struct { + // Name of a Loft user + // +optional + User string `json:"user,omitempty"` + + // Name of a Loft team the user is part of + // +optional + Team string `json:"team,omitempty"` +} + +// LocalClusterAccessStatus holds the status of a user access +type LocalClusterAccessStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// LocalClusterAccessList contains a list of cluster access objects +type LocalClusterAccessList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []LocalClusterAccess `json:"items"` +} + +func init() { + SchemeBuilder.Register(&LocalClusterAccess{}, &LocalClusterAccessList{}) +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/localteam_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/localteam_types.go new file mode 100644 index 000000000..dae46a166 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/localteam_types.go @@ -0,0 +1,62 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// LocalTeam holds the cluster user information +// +k8s:openapi-gen=true +type LocalTeam struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec LocalTeamSpec `json:"spec,omitempty"` + Status LocalTeamStatus `json:"status,omitempty"` +} + +type LocalTeamSpec struct { +} + +// LocalTeamStatus holds the status of a user access +type LocalTeamStatus struct { + // The display name shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // The username of the team that will be used for identification and docker registry namespace + // +optional + Username string `json:"username,omitempty"` + + // The loft users that belong to a team + // +optional + Users []string `json:"users,omitempty"` + + // The groups defined in a token that belong to a team + // +optional + Groups []string `json:"groups,omitempty"` + + // Labels are the labels of the user + // +optional + Labels map[string]string `json:"labels,omitempty"` + + // Annotations are the annotations of the user + // +optional + Annotations map[string]string `json:"annotations,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// LocalTeamList contains a list of LocalTeam objects +type LocalTeamList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []LocalTeam `json:"items"` +} + +func init() { + SchemeBuilder.Register(&LocalTeam{}, &LocalTeamList{}) +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/localuser_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/localuser_types.go new file mode 100644 index 000000000..55e545c6a --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/localuser_types.go @@ -0,0 +1,67 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// LocalUser holds the cluster user information +// +k8s:openapi-gen=true +type LocalUser struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec LocalUserSpec `json:"spec,omitempty"` + Status LocalUserStatus `json:"status,omitempty"` +} + +type LocalUserSpec struct{} + +// LocalUserStatus holds the status of a user access +type LocalUserStatus struct { + // The display name shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // The username that is used to login + Username string `json:"username,omitempty"` + + // The users email address + // +optional + Email string `json:"email,omitempty"` + + // The user subject as presented by the token + Subject string `json:"subject,omitempty"` + + // The groups the user has access to + // +optional + Groups []string `json:"groups,omitempty"` + + // Teams the user is currently part of + // +optional + Teams []string `json:"teams,omitempty"` + + // Labels are the labels of the user + // +optional + Labels map[string]string `json:"labels,omitempty"` + + // Annotations are the annotations of the user + // +optional + Annotations map[string]string `json:"annotations,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// LocalUserList contains a list of LocalUser objects +type LocalUserList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []LocalUser `json:"items"` +} + +func init() { + SchemeBuilder.Register(&LocalUser{}, &LocalUserList{}) +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/virtualcluster_types.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/virtualcluster_types.go new file mode 100644 index 000000000..ac7c8f191 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/virtualcluster_types.go @@ -0,0 +1,353 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualCluster holds the information +// +k8s:openapi-gen=true +// +kubebuilder:subresource:status +type VirtualCluster struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualClusterSpec `json:"spec,omitempty"` + Status VirtualClusterStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (in *VirtualCluster) GetConditions() Conditions { + return in.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (in *VirtualCluster) SetConditions(conditions Conditions) { + in.Status.Conditions = conditions +} + +type VirtualClusterSpec struct { + // VirtualClusterCommonSpec defines virtual cluster spec that is common between the virtual + // cluster templates, and virtual cluster + VirtualClusterCommonSpec `json:",inline"` + + // DEPRECATED: don't use anymore + // A label selector to select the virtual cluster pod to route + // incoming requests to. + // +optional + Pod *PodSelector `json:"pod,omitempty"` + + // DEPRECATED: don't use anymore + // A reference to the cluster admin kube config. This is needed for + // the cli & ui to access the virtual clusters + // +optional + KubeConfigRef *SecretRef `json:"kubeConfigRef,omitempty"` +} + +// VirtualClusterCommonSpec holds common attributes for virtual clusters and virtual cluster templates +type VirtualClusterCommonSpec struct { + // Apps specifies the apps that should get deployed by this template + // +optional + Apps []AppReference `json:"apps,omitempty"` + + // Charts are helm charts that should get deployed + // +optional + Charts []TemplateHelmChart `json:"charts,omitempty"` + + // Objects are Kubernetes style yamls that should get deployed into the virtual cluster + // +optional + Objects string `json:"objects,omitempty"` + + // Access defines the access of users and teams to the virtual cluster. + // +optional + Access *InstanceAccess `json:"access,omitempty"` + + // HelmRelease is the helm release configuration for the virtual cluster. + // +optional + HelmRelease VirtualClusterHelmRelease `json:"helmRelease,omitempty"` + + // AccessPoint defines settings to expose the virtual cluster directly via an ingress rather than + // through the (default) Loft proxy + // +optional + AccessPoint VirtualClusterAccessPoint `json:"accessPoint,omitempty"` + + // ForwardToken signals the proxy to pass through the used token to the virtual Kubernetes + // api server and do a TokenReview there. + // +optional + ForwardToken bool `json:"forwardToken,omitempty"` +} + +type VirtualClusterAccessPoint struct { + // Ingress defines virtual cluster access via ingress + // +optional + Ingress VirtualClusterAccessPointIngressSpec `json:"ingress,omitempty"` +} + +type VirtualClusterAccessPointIngressSpec struct { + // Enabled defines if the virtual cluster access point (via ingress) is enabled or not; requires + // the connected cluster to have the `loft.sh/ingress-suffix` annotation set to define the domain + // name suffix used for the ingress. + Enabled bool `json:"enabled,omitempty"` +} + +// Chart describes a chart +type Chart struct { + // Name is the chart name in the repository + Name string `json:"name,omitempty"` + + // Version is the chart version in the repository + // +optional + Version string `json:"version,omitempty"` + + // RepoURL is the repo url where the chart can be found + // +optional + RepoURL string `json:"repoURL,omitempty"` + + // The username that is required for this repository + // +optional + Username string `json:"username,omitempty"` + + // The password that is required for this repository + // +optional + Password string `json:"password,omitempty"` + + // If tls certificate checks for the chart download should be skipped + // +optional + InsecureSkipTlsVerify bool `json:"insecureSkipTlsVerify,omitempty"` +} + +type TemplateHelmChart struct { + Chart `json:",inline"` + + // ReleaseName is the preferred release name of the app + // +optional + ReleaseName string `json:"releaseName,omitempty"` + + // ReleaseNamespace is the preferred release namespace of the app + // +optional + ReleaseNamespace string `json:"releaseNamespace,omitempty"` + + // Values are the values that should get passed to the chart + // +optional + Values string `json:"values,omitempty"` + + // Wait determines if Loft should wait during deploy for the app to become ready + // +optional + Wait bool `json:"wait,omitempty"` + + // Timeout is the time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s) + // +optional + Timeout string `json:"timeout,omitempty"` +} + +type InstanceAccess struct { + // Specifies which cluster role should get applied to users or teams that do not + // match a rule below. + // +optional + DefaultClusterRole string `json:"defaultClusterRole,omitempty"` + + // Rules defines which users and teams should have which access to the virtual + // cluster. If no rule matches an authenticated incoming user, the user will get cluster admin + // access. + // +optional + Rules []InstanceAccessRule `json:"rules,omitempty"` +} + +type InstanceAccessRule struct { + // Users this rule matches. * means all users. + // +optional + Users []string `json:"users,omitempty"` + + // Teams that this rule matches. + // +optional + Teams []string `json:"teams,omitempty"` + + // ClusterRole is the cluster role that should be assigned to the + // +optional + ClusterRole string `json:"clusterRole,omitempty"` +} + +// SecretRef is the reference to a secret containing the user password +type SecretRef struct { + // +optional + SecretName string `json:"secretName,omitempty"` + // +optional + SecretNamespace string `json:"secretNamespace,omitempty"` + // +optional + Key string `json:"key,omitempty"` +} + +type AppReference struct { + // Name of the target app + // +optional + Name string `json:"name,omitempty"` + + // Namespace specifies in which target namespace the app should + // get deployed in + // +optional + Namespace string `json:"namespace,omitempty"` + + // ReleaseName is the name of the app release + // +optional + ReleaseName string `json:"releaseName,omitempty"` + + // Version of the app + // +optional + Version string `json:"version,omitempty"` + + // Parameters to use for the app + // +optional + Parameters string `json:"parameters,omitempty"` +} + +type VirtualClusterHelmRelease struct { + // infos about what chart to deploy + // +optional + Chart VirtualClusterHelmChart `json:"chart,omitempty"` + + // the values for the given chart + // +optional + Values string `json:"values,omitempty"` +} + +type VirtualClusterHelmChart struct { + // the name of the helm chart + // +optional + Name string `json:"name,omitempty"` + + // the repo of the helm chart + // +optional + Repo string `json:"repo,omitempty"` + + // the version of the helm chart to use + // +optional + Version string `json:"version,omitempty"` +} + +type PodSelector struct { + // A label selector to select the virtual cluster pod to route + // incoming requests to. + // +optional + Selector metav1.LabelSelector `json:"podSelector,omitempty"` + + // The port of the pod to route to + // +optional + Port *int `json:"port,omitempty"` +} + +// VirtualClusterStatus holds the status of a virtual cluster +type VirtualClusterStatus struct { + // Phase describes the current phase the virtual cluster is in + // +optional + Phase VirtualClusterPhase `json:"phase,omitempty"` + + // Reason describes the reason in machine readable form why the cluster is in the current + // phase + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes the reason in human readable form why the cluster is in the current + // phase + // +optional + Message string `json:"message,omitempty"` + + // ControlPlaneReady defines if the virtual cluster control plane is ready. + // +optional + ControlPlaneReady bool `json:"controlPlaneReady,omitempty"` + + // Conditions holds several conditions the virtual cluster might be in + // +optional + Conditions Conditions `json:"conditions,omitempty"` + + // ObservedGeneration is the latest generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // VirtualClusterObjects are the objects that were applied within the virtual cluster itself + // +optional + VirtualClusterObjects *ObjectsStatus `json:"virtualClusterObjects,omitempty"` + + // DeployHash saves the latest applied chart hash + // +optional + DeployHash string `json:"deployHash,omitempty"` + + // MultiNamespace indicates if this is a multinamespace enabled virtual cluster + MultiNamespace bool `json:"multiNamespace,omitempty"` + + // DEPRECATED: do not use anymore + // the status of the helm release that was used to deploy the virtual cluster + // +optional + HelmRelease *VirtualClusterHelmReleaseStatus `json:"helmRelease,omitempty"` +} + +type ObjectsStatus struct { + // LastAppliedObjects holds the status for the objects that were applied + // +optional + LastAppliedObjects string `json:"lastAppliedObjects,omitempty"` + + // Charts are the charts that were applied + // +optional + Charts []ChartStatus `json:"charts,omitempty"` + + // Apps are the apps that were applied + // +optional + Apps []AppReference `json:"apps,omitempty"` +} + +type ChartStatus struct { + // Name of the chart that was applied + // +optional + Name string `json:"name,omitempty"` + + // Namespace of the chart that was applied + // +optional + Namespace string `json:"namespace,omitempty"` + + // LastAppliedChartConfigHash is the last applied configuration + // +optional + LastAppliedChartConfigHash string `json:"lastAppliedChartConfigHash,omitempty"` +} + +type VirtualClusterHelmReleaseStatus struct { + // +optional + Phase string `json:"phase,omitempty"` + + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + + // +optional + Reason string `json:"reason,omitempty"` + + // +optional + Message string `json:"message,omitempty"` + + // the release that was deployed + // +optional + Release VirtualClusterHelmRelease `json:"release,omitempty"` +} + +// VirtualClusterPhase describes the phase of a virtual cluster +type VirtualClusterPhase string + +// These are the valid admin account types +const ( + VirtualClusterUnknown VirtualClusterPhase = "" + VirtualClusterPending VirtualClusterPhase = "Pending" + VirtualClusterDeployed VirtualClusterPhase = "Deployed" + VirtualClusterFailed VirtualClusterPhase = "Failed" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterList contains a list of User +type VirtualClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualCluster `json:"items"` +} + +func init() { + SchemeBuilder.Register(&VirtualCluster{}, &VirtualClusterList{}) +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..8acda6858 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/zz_generated.deepcopy.go @@ -0,0 +1,1014 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessQuota) DeepCopyInto(out *AccessQuota) { + *out = *in + if in.Hard != nil { + in, out := &in.Hard, &out.Hard + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessQuota. +func (in *AccessQuota) DeepCopy() *AccessQuota { + if in == nil { + return nil + } + out := new(AccessQuota) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppReference) DeepCopyInto(out *AppReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppReference. +func (in *AppReference) DeepCopy() *AppReference { + if in == nil { + return nil + } + out := new(AppReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Chart) DeepCopyInto(out *Chart) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Chart. +func (in *Chart) DeepCopy() *Chart { + if in == nil { + return nil + } + out := new(Chart) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChartStatus) DeepCopyInto(out *ChartStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartStatus. +func (in *ChartStatus) DeepCopy() *ChartStatus { + if in == nil { + return nil + } + out := new(ChartStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuota) DeepCopyInto(out *ClusterQuota) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuota. +func (in *ClusterQuota) DeepCopy() *ClusterQuota { + if in == nil { + return nil + } + out := new(ClusterQuota) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterQuota) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuotaList) DeepCopyInto(out *ClusterQuotaList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterQuota, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotaList. +func (in *ClusterQuotaList) DeepCopy() *ClusterQuotaList { + if in == nil { + return nil + } + out := new(ClusterQuotaList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterQuotaList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuotaSpec) DeepCopyInto(out *ClusterQuotaSpec) { + *out = *in + in.Quota.DeepCopyInto(&out.Quota) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotaSpec. +func (in *ClusterQuotaSpec) DeepCopy() *ClusterQuotaSpec { + if in == nil { + return nil + } + out := new(ClusterQuotaSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuotaStatus) DeepCopyInto(out *ClusterQuotaStatus) { + *out = *in + in.Total.DeepCopyInto(&out.Total) + if in.Namespaces != nil { + in, out := &in.Namespaces, &out.Namespaces + *out = make(ClusterQuotasStatusByNamespace, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotaStatus. +func (in *ClusterQuotaStatus) DeepCopy() *ClusterQuotaStatus { + if in == nil { + return nil + } + out := new(ClusterQuotaStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterQuotaStatusByNamespace) DeepCopyInto(out *ClusterQuotaStatusByNamespace) { + *out = *in + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotaStatusByNamespace. +func (in *ClusterQuotaStatusByNamespace) DeepCopy() *ClusterQuotaStatusByNamespace { + if in == nil { + return nil + } + out := new(ClusterQuotaStatusByNamespace) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ClusterQuotasStatusByNamespace) DeepCopyInto(out *ClusterQuotasStatusByNamespace) { + { + in := &in + *out = make(ClusterQuotasStatusByNamespace, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQuotasStatusByNamespace. +func (in ClusterQuotasStatusByNamespace) DeepCopy() ClusterQuotasStatusByNamespace { + if in == nil { + return nil + } + out := new(ClusterQuotasStatusByNamespace) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleRef) DeepCopyInto(out *ClusterRoleRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleRef. +func (in *ClusterRoleRef) DeepCopy() *ClusterRoleRef { + if in == nil { + return nil + } + out := new(ClusterRoleRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in Conditions) DeepCopyInto(out *Conditions) { + { + in := &in + *out = make(Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions. +func (in Conditions) DeepCopy() Conditions { + if in == nil { + return nil + } + out := new(Conditions) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstanceAccess) DeepCopyInto(out *InstanceAccess) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]InstanceAccessRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceAccess. +func (in *InstanceAccess) DeepCopy() *InstanceAccess { + if in == nil { + return nil + } + out := new(InstanceAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstanceAccessRule) DeepCopyInto(out *InstanceAccessRule) { + *out = *in + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceAccessRule. +func (in *InstanceAccessRule) DeepCopy() *InstanceAccessRule { + if in == nil { + return nil + } + out := new(InstanceAccessRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccess) DeepCopyInto(out *LocalClusterAccess) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccess. +func (in *LocalClusterAccess) DeepCopy() *LocalClusterAccess { + if in == nil { + return nil + } + out := new(LocalClusterAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalClusterAccess) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccessList) DeepCopyInto(out *LocalClusterAccessList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LocalClusterAccess, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccessList. +func (in *LocalClusterAccessList) DeepCopy() *LocalClusterAccessList { + if in == nil { + return nil + } + out := new(LocalClusterAccessList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalClusterAccessList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccessSpec) DeepCopyInto(out *LocalClusterAccessSpec) { + *out = *in + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]UserOrTeam, len(*in)) + copy(*out, *in) + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ClusterRoles != nil { + in, out := &in.ClusterRoles, &out.ClusterRoles + *out = make([]ClusterRoleRef, len(*in)) + copy(*out, *in) + } + if in.SpaceConstraintsRef != nil { + in, out := &in.SpaceConstraintsRef, &out.SpaceConstraintsRef + *out = new(string) + **out = **in + } + if in.Quota != nil { + in, out := &in.Quota, &out.Quota + *out = new(AccessQuota) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccessSpec. +func (in *LocalClusterAccessSpec) DeepCopy() *LocalClusterAccessSpec { + if in == nil { + return nil + } + out := new(LocalClusterAccessSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccessStatus) DeepCopyInto(out *LocalClusterAccessStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccessStatus. +func (in *LocalClusterAccessStatus) DeepCopy() *LocalClusterAccessStatus { + if in == nil { + return nil + } + out := new(LocalClusterAccessStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalTeam) DeepCopyInto(out *LocalTeam) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalTeam. +func (in *LocalTeam) DeepCopy() *LocalTeam { + if in == nil { + return nil + } + out := new(LocalTeam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalTeam) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalTeamList) DeepCopyInto(out *LocalTeamList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LocalTeam, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalTeamList. +func (in *LocalTeamList) DeepCopy() *LocalTeamList { + if in == nil { + return nil + } + out := new(LocalTeamList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalTeamList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalTeamSpec) DeepCopyInto(out *LocalTeamSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalTeamSpec. +func (in *LocalTeamSpec) DeepCopy() *LocalTeamSpec { + if in == nil { + return nil + } + out := new(LocalTeamSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalTeamStatus) DeepCopyInto(out *LocalTeamStatus) { + *out = *in + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalTeamStatus. +func (in *LocalTeamStatus) DeepCopy() *LocalTeamStatus { + if in == nil { + return nil + } + out := new(LocalTeamStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalUser) DeepCopyInto(out *LocalUser) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalUser. +func (in *LocalUser) DeepCopy() *LocalUser { + if in == nil { + return nil + } + out := new(LocalUser) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalUser) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalUserList) DeepCopyInto(out *LocalUserList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LocalUser, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalUserList. +func (in *LocalUserList) DeepCopy() *LocalUserList { + if in == nil { + return nil + } + out := new(LocalUserList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalUserList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalUserSpec) DeepCopyInto(out *LocalUserSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalUserSpec. +func (in *LocalUserSpec) DeepCopy() *LocalUserSpec { + if in == nil { + return nil + } + out := new(LocalUserSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalUserStatus) DeepCopyInto(out *LocalUserStatus) { + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalUserStatus. +func (in *LocalUserStatus) DeepCopy() *LocalUserStatus { + if in == nil { + return nil + } + out := new(LocalUserStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectsStatus) DeepCopyInto(out *ObjectsStatus) { + *out = *in + if in.Charts != nil { + in, out := &in.Charts, &out.Charts + *out = make([]ChartStatus, len(*in)) + copy(*out, *in) + } + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = make([]AppReference, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectsStatus. +func (in *ObjectsStatus) DeepCopy() *ObjectsStatus { + if in == nil { + return nil + } + out := new(ObjectsStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodSelector) DeepCopyInto(out *PodSelector) { + *out = *in + in.Selector.DeepCopyInto(&out.Selector) + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSelector. +func (in *PodSelector) DeepCopy() *PodSelector { + if in == nil { + return nil + } + out := new(PodSelector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretRef) DeepCopyInto(out *SecretRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef. +func (in *SecretRef) DeepCopy() *SecretRef { + if in == nil { + return nil + } + out := new(SecretRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateHelmChart) DeepCopyInto(out *TemplateHelmChart) { + *out = *in + out.Chart = in.Chart + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateHelmChart. +func (in *TemplateHelmChart) DeepCopy() *TemplateHelmChart { + if in == nil { + return nil + } + out := new(TemplateHelmChart) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserOrTeam) DeepCopyInto(out *UserOrTeam) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserOrTeam. +func (in *UserOrTeam) DeepCopy() *UserOrTeam { + if in == nil { + return nil + } + out := new(UserOrTeam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualCluster) DeepCopyInto(out *VirtualCluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualCluster. +func (in *VirtualCluster) DeepCopy() *VirtualCluster { + if in == nil { + return nil + } + out := new(VirtualCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualCluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterAccessPoint) DeepCopyInto(out *VirtualClusterAccessPoint) { + *out = *in + out.Ingress = in.Ingress + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterAccessPoint. +func (in *VirtualClusterAccessPoint) DeepCopy() *VirtualClusterAccessPoint { + if in == nil { + return nil + } + out := new(VirtualClusterAccessPoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterAccessPointIngressSpec) DeepCopyInto(out *VirtualClusterAccessPointIngressSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterAccessPointIngressSpec. +func (in *VirtualClusterAccessPointIngressSpec) DeepCopy() *VirtualClusterAccessPointIngressSpec { + if in == nil { + return nil + } + out := new(VirtualClusterAccessPointIngressSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterCommonSpec) DeepCopyInto(out *VirtualClusterCommonSpec) { + *out = *in + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = make([]AppReference, len(*in)) + copy(*out, *in) + } + if in.Charts != nil { + in, out := &in.Charts, &out.Charts + *out = make([]TemplateHelmChart, len(*in)) + copy(*out, *in) + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = new(InstanceAccess) + (*in).DeepCopyInto(*out) + } + out.HelmRelease = in.HelmRelease + out.AccessPoint = in.AccessPoint + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterCommonSpec. +func (in *VirtualClusterCommonSpec) DeepCopy() *VirtualClusterCommonSpec { + if in == nil { + return nil + } + out := new(VirtualClusterCommonSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterHelmChart) DeepCopyInto(out *VirtualClusterHelmChart) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterHelmChart. +func (in *VirtualClusterHelmChart) DeepCopy() *VirtualClusterHelmChart { + if in == nil { + return nil + } + out := new(VirtualClusterHelmChart) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterHelmRelease) DeepCopyInto(out *VirtualClusterHelmRelease) { + *out = *in + out.Chart = in.Chart + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterHelmRelease. +func (in *VirtualClusterHelmRelease) DeepCopy() *VirtualClusterHelmRelease { + if in == nil { + return nil + } + out := new(VirtualClusterHelmRelease) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterHelmReleaseStatus) DeepCopyInto(out *VirtualClusterHelmReleaseStatus) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + out.Release = in.Release + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterHelmReleaseStatus. +func (in *VirtualClusterHelmReleaseStatus) DeepCopy() *VirtualClusterHelmReleaseStatus { + if in == nil { + return nil + } + out := new(VirtualClusterHelmReleaseStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterList) DeepCopyInto(out *VirtualClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualCluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterList. +func (in *VirtualClusterList) DeepCopy() *VirtualClusterList { + if in == nil { + return nil + } + out := new(VirtualClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSpec) DeepCopyInto(out *VirtualClusterSpec) { + *out = *in + in.VirtualClusterCommonSpec.DeepCopyInto(&out.VirtualClusterCommonSpec) + if in.Pod != nil { + in, out := &in.Pod, &out.Pod + *out = new(PodSelector) + (*in).DeepCopyInto(*out) + } + if in.KubeConfigRef != nil { + in, out := &in.KubeConfigRef, &out.KubeConfigRef + *out = new(SecretRef) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterSpec. +func (in *VirtualClusterSpec) DeepCopy() *VirtualClusterSpec { + if in == nil { + return nil + } + out := new(VirtualClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterStatus) DeepCopyInto(out *VirtualClusterStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualClusterObjects != nil { + in, out := &in.VirtualClusterObjects, &out.VirtualClusterObjects + *out = new(ObjectsStatus) + (*in).DeepCopyInto(*out) + } + if in.HelmRelease != nil { + in, out := &in.HelmRelease, &out.HelmRelease + *out = new(VirtualClusterHelmReleaseStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterStatus. +func (in *VirtualClusterStatus) DeepCopy() *VirtualClusterStatus { + if in == nil { + return nil + } + out := new(VirtualClusterStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/zz_generated.defaults.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/zz_generated.defaults.go new file mode 100644 index 000000000..88694caac --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1/zz_generated.defaults.go @@ -0,0 +1,17 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/clientset.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/clientset.go new file mode 100644 index 000000000..c9aa8c68e --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/clientset.go @@ -0,0 +1,117 @@ +// Code generated by client-gen. DO NOT EDIT. + +package clientset + +import ( + "fmt" + "net/http" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1" + storagev1 "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + ClusterV1() clusterv1.ClusterV1Interface + StorageV1() storagev1.StorageV1Interface +} + +// Clientset contains the clients for groups. +type Clientset struct { + *discovery.DiscoveryClient + clusterV1 *clusterv1.ClusterV1Client + storageV1 *storagev1.StorageV1Client +} + +// ClusterV1 retrieves the ClusterV1Client +func (c *Clientset) ClusterV1() clusterv1.ClusterV1Interface { + return c.clusterV1 +} + +// StorageV1 retrieves the StorageV1Client +func (c *Clientset) StorageV1() storagev1.StorageV1Interface { + return c.storageV1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + + var cs Clientset + var err error + cs.clusterV1, err = clusterv1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + cs.storageV1, err = storagev1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.clusterV1 = clusterv1.New(c) + cs.storageV1 = storagev1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/doc.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/doc.go new file mode 100644 index 000000000..2b617906e --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package clientset diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme/doc.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme/doc.go new file mode 100644 index 000000000..14db57a58 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme/register.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme/register.go new file mode 100644 index 000000000..a3f9f0cb9 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme/register.go @@ -0,0 +1,42 @@ +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + clusterv1.AddToScheme, + storagev1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/chartinfo.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/chartinfo.go new file mode 100644 index 000000000..7323031ea --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/chartinfo.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ChartInfosGetter has a method to return a ChartInfoInterface. +// A group's client should implement this interface. +type ChartInfosGetter interface { + ChartInfos() ChartInfoInterface +} + +// ChartInfoInterface has methods to work with ChartInfo resources. +type ChartInfoInterface interface { + Create(ctx context.Context, chartInfo *v1.ChartInfo, opts metav1.CreateOptions) (*v1.ChartInfo, error) + Update(ctx context.Context, chartInfo *v1.ChartInfo, opts metav1.UpdateOptions) (*v1.ChartInfo, error) + UpdateStatus(ctx context.Context, chartInfo *v1.ChartInfo, opts metav1.UpdateOptions) (*v1.ChartInfo, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ChartInfo, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ChartInfoList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ChartInfo, err error) + ChartInfoExpansion +} + +// chartInfos implements ChartInfoInterface +type chartInfos struct { + client rest.Interface +} + +// newChartInfos returns a ChartInfos +func newChartInfos(c *ClusterV1Client) *chartInfos { + return &chartInfos{ + client: c.RESTClient(), + } +} + +// Get takes name of the chartInfo, and returns the corresponding chartInfo object, and an error if there is any. +func (c *chartInfos) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ChartInfo, err error) { + result = &v1.ChartInfo{} + err = c.client.Get(). + Resource("chartinfos"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ChartInfos that match those selectors. +func (c *chartInfos) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ChartInfoList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ChartInfoList{} + err = c.client.Get(). + Resource("chartinfos"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested chartInfos. +func (c *chartInfos) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("chartinfos"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a chartInfo and creates it. Returns the server's representation of the chartInfo, and an error, if there is any. +func (c *chartInfos) Create(ctx context.Context, chartInfo *v1.ChartInfo, opts metav1.CreateOptions) (result *v1.ChartInfo, err error) { + result = &v1.ChartInfo{} + err = c.client.Post(). + Resource("chartinfos"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(chartInfo). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a chartInfo and updates it. Returns the server's representation of the chartInfo, and an error, if there is any. +func (c *chartInfos) Update(ctx context.Context, chartInfo *v1.ChartInfo, opts metav1.UpdateOptions) (result *v1.ChartInfo, err error) { + result = &v1.ChartInfo{} + err = c.client.Put(). + Resource("chartinfos"). + Name(chartInfo.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(chartInfo). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *chartInfos) UpdateStatus(ctx context.Context, chartInfo *v1.ChartInfo, opts metav1.UpdateOptions) (result *v1.ChartInfo, err error) { + result = &v1.ChartInfo{} + err = c.client.Put(). + Resource("chartinfos"). + Name(chartInfo.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(chartInfo). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the chartInfo and deletes it. Returns an error if one occurs. +func (c *chartInfos) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("chartinfos"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *chartInfos) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("chartinfos"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched chartInfo. +func (c *chartInfos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ChartInfo, err error) { + result = &v1.ChartInfo{} + err = c.client.Patch(pt). + Resource("chartinfos"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/cluster_client.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/cluster_client.go new file mode 100644 index 000000000..3a930f556 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/cluster_client.go @@ -0,0 +1,126 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "net/http" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + rest "k8s.io/client-go/rest" +) + +type ClusterV1Interface interface { + RESTClient() rest.Interface + ChartInfosGetter + ClusterQuotasGetter + FeaturesGetter + HelmReleasesGetter + LocalClusterAccessesGetter + SleepModeConfigsGetter + SpacesGetter + VirtualClustersGetter +} + +// ClusterV1Client is used to interact with features provided by the cluster.loft.sh group. +type ClusterV1Client struct { + restClient rest.Interface +} + +func (c *ClusterV1Client) ChartInfos() ChartInfoInterface { + return newChartInfos(c) +} + +func (c *ClusterV1Client) ClusterQuotas() ClusterQuotaInterface { + return newClusterQuotas(c) +} + +func (c *ClusterV1Client) Features() FeatureInterface { + return newFeatures(c) +} + +func (c *ClusterV1Client) HelmReleases(namespace string) HelmReleaseInterface { + return newHelmReleases(c, namespace) +} + +func (c *ClusterV1Client) LocalClusterAccesses() LocalClusterAccessInterface { + return newLocalClusterAccesses(c) +} + +func (c *ClusterV1Client) SleepModeConfigs(namespace string) SleepModeConfigInterface { + return newSleepModeConfigs(c, namespace) +} + +func (c *ClusterV1Client) Spaces() SpaceInterface { + return newSpaces(c) +} + +func (c *ClusterV1Client) VirtualClusters(namespace string) VirtualClusterInterface { + return newVirtualClusters(c, namespace) +} + +// NewForConfig creates a new ClusterV1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*ClusterV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new ClusterV1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ClusterV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &ClusterV1Client{client}, nil +} + +// NewForConfigOrDie creates a new ClusterV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ClusterV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ClusterV1Client for the given RESTClient. +func New(c rest.Interface) *ClusterV1Client { + return &ClusterV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *ClusterV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/clusterquota.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/clusterquota.go new file mode 100644 index 000000000..f047927e6 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/clusterquota.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ClusterQuotasGetter has a method to return a ClusterQuotaInterface. +// A group's client should implement this interface. +type ClusterQuotasGetter interface { + ClusterQuotas() ClusterQuotaInterface +} + +// ClusterQuotaInterface has methods to work with ClusterQuota resources. +type ClusterQuotaInterface interface { + Create(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.CreateOptions) (*v1.ClusterQuota, error) + Update(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.UpdateOptions) (*v1.ClusterQuota, error) + UpdateStatus(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.UpdateOptions) (*v1.ClusterQuota, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterQuota, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterQuotaList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterQuota, err error) + ClusterQuotaExpansion +} + +// clusterQuotas implements ClusterQuotaInterface +type clusterQuotas struct { + client rest.Interface +} + +// newClusterQuotas returns a ClusterQuotas +func newClusterQuotas(c *ClusterV1Client) *clusterQuotas { + return &clusterQuotas{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterQuota, and returns the corresponding clusterQuota object, and an error if there is any. +func (c *clusterQuotas) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterQuota, err error) { + result = &v1.ClusterQuota{} + err = c.client.Get(). + Resource("clusterquotas"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterQuotas that match those selectors. +func (c *clusterQuotas) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterQuotaList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ClusterQuotaList{} + err = c.client.Get(). + Resource("clusterquotas"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterQuotas. +func (c *clusterQuotas) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("clusterquotas"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a clusterQuota and creates it. Returns the server's representation of the clusterQuota, and an error, if there is any. +func (c *clusterQuotas) Create(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.CreateOptions) (result *v1.ClusterQuota, err error) { + result = &v1.ClusterQuota{} + err = c.client.Post(). + Resource("clusterquotas"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterQuota). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a clusterQuota and updates it. Returns the server's representation of the clusterQuota, and an error, if there is any. +func (c *clusterQuotas) Update(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.UpdateOptions) (result *v1.ClusterQuota, err error) { + result = &v1.ClusterQuota{} + err = c.client.Put(). + Resource("clusterquotas"). + Name(clusterQuota.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterQuota). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *clusterQuotas) UpdateStatus(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.UpdateOptions) (result *v1.ClusterQuota, err error) { + result = &v1.ClusterQuota{} + err = c.client.Put(). + Resource("clusterquotas"). + Name(clusterQuota.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterQuota). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the clusterQuota and deletes it. Returns an error if one occurs. +func (c *clusterQuotas) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterquotas"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterQuotas) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("clusterquotas"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched clusterQuota. +func (c *clusterQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterQuota, err error) { + result = &v1.ClusterQuota{} + err = c.client.Patch(pt). + Resource("clusterquotas"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/doc.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/doc.go new file mode 100644 index 000000000..225e6b2be --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/feature.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/feature.go new file mode 100644 index 000000000..49ee1f8aa --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/feature.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// FeaturesGetter has a method to return a FeatureInterface. +// A group's client should implement this interface. +type FeaturesGetter interface { + Features() FeatureInterface +} + +// FeatureInterface has methods to work with Feature resources. +type FeatureInterface interface { + Create(ctx context.Context, feature *v1.Feature, opts metav1.CreateOptions) (*v1.Feature, error) + Update(ctx context.Context, feature *v1.Feature, opts metav1.UpdateOptions) (*v1.Feature, error) + UpdateStatus(ctx context.Context, feature *v1.Feature, opts metav1.UpdateOptions) (*v1.Feature, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Feature, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.FeatureList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Feature, err error) + FeatureExpansion +} + +// features implements FeatureInterface +type features struct { + client rest.Interface +} + +// newFeatures returns a Features +func newFeatures(c *ClusterV1Client) *features { + return &features{ + client: c.RESTClient(), + } +} + +// Get takes name of the feature, and returns the corresponding feature object, and an error if there is any. +func (c *features) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Feature, err error) { + result = &v1.Feature{} + err = c.client.Get(). + Resource("features"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Features that match those selectors. +func (c *features) List(ctx context.Context, opts metav1.ListOptions) (result *v1.FeatureList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.FeatureList{} + err = c.client.Get(). + Resource("features"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested features. +func (c *features) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("features"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a feature and creates it. Returns the server's representation of the feature, and an error, if there is any. +func (c *features) Create(ctx context.Context, feature *v1.Feature, opts metav1.CreateOptions) (result *v1.Feature, err error) { + result = &v1.Feature{} + err = c.client.Post(). + Resource("features"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(feature). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a feature and updates it. Returns the server's representation of the feature, and an error, if there is any. +func (c *features) Update(ctx context.Context, feature *v1.Feature, opts metav1.UpdateOptions) (result *v1.Feature, err error) { + result = &v1.Feature{} + err = c.client.Put(). + Resource("features"). + Name(feature.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(feature). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *features) UpdateStatus(ctx context.Context, feature *v1.Feature, opts metav1.UpdateOptions) (result *v1.Feature, err error) { + result = &v1.Feature{} + err = c.client.Put(). + Resource("features"). + Name(feature.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(feature). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the feature and deletes it. Returns an error if one occurs. +func (c *features) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("features"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *features) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("features"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched feature. +func (c *features) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Feature, err error) { + result = &v1.Feature{} + err = c.client.Patch(pt). + Resource("features"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/generated_expansion.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/generated_expansion.go new file mode 100644 index 000000000..89664f171 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/generated_expansion.go @@ -0,0 +1,19 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type ChartInfoExpansion interface{} + +type ClusterQuotaExpansion interface{} + +type FeatureExpansion interface{} + +type HelmReleaseExpansion interface{} + +type LocalClusterAccessExpansion interface{} + +type SleepModeConfigExpansion interface{} + +type SpaceExpansion interface{} + +type VirtualClusterExpansion interface{} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/helmrelease.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/helmrelease.go new file mode 100644 index 000000000..a470da159 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/helmrelease.go @@ -0,0 +1,179 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// HelmReleasesGetter has a method to return a HelmReleaseInterface. +// A group's client should implement this interface. +type HelmReleasesGetter interface { + HelmReleases(namespace string) HelmReleaseInterface +} + +// HelmReleaseInterface has methods to work with HelmRelease resources. +type HelmReleaseInterface interface { + Create(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.CreateOptions) (*v1.HelmRelease, error) + Update(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.UpdateOptions) (*v1.HelmRelease, error) + UpdateStatus(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.UpdateOptions) (*v1.HelmRelease, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HelmRelease, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.HelmReleaseList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HelmRelease, err error) + HelmReleaseExpansion +} + +// helmReleases implements HelmReleaseInterface +type helmReleases struct { + client rest.Interface + ns string +} + +// newHelmReleases returns a HelmReleases +func newHelmReleases(c *ClusterV1Client, namespace string) *helmReleases { + return &helmReleases{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the helmRelease, and returns the corresponding helmRelease object, and an error if there is any. +func (c *helmReleases) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HelmRelease, err error) { + result = &v1.HelmRelease{} + err = c.client.Get(). + Namespace(c.ns). + Resource("helmreleases"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of HelmReleases that match those selectors. +func (c *helmReleases) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HelmReleaseList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.HelmReleaseList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("helmreleases"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested helmReleases. +func (c *helmReleases) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("helmreleases"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a helmRelease and creates it. Returns the server's representation of the helmRelease, and an error, if there is any. +func (c *helmReleases) Create(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.CreateOptions) (result *v1.HelmRelease, err error) { + result = &v1.HelmRelease{} + err = c.client.Post(). + Namespace(c.ns). + Resource("helmreleases"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(helmRelease). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a helmRelease and updates it. Returns the server's representation of the helmRelease, and an error, if there is any. +func (c *helmReleases) Update(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.UpdateOptions) (result *v1.HelmRelease, err error) { + result = &v1.HelmRelease{} + err = c.client.Put(). + Namespace(c.ns). + Resource("helmreleases"). + Name(helmRelease.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(helmRelease). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *helmReleases) UpdateStatus(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.UpdateOptions) (result *v1.HelmRelease, err error) { + result = &v1.HelmRelease{} + err = c.client.Put(). + Namespace(c.ns). + Resource("helmreleases"). + Name(helmRelease.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(helmRelease). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the helmRelease and deletes it. Returns an error if one occurs. +func (c *helmReleases) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("helmreleases"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *helmReleases) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("helmreleases"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched helmRelease. +func (c *helmReleases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HelmRelease, err error) { + result = &v1.HelmRelease{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("helmreleases"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/localclusteraccess.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/localclusteraccess.go new file mode 100644 index 000000000..66cb0a02a --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/localclusteraccess.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// LocalClusterAccessesGetter has a method to return a LocalClusterAccessInterface. +// A group's client should implement this interface. +type LocalClusterAccessesGetter interface { + LocalClusterAccesses() LocalClusterAccessInterface +} + +// LocalClusterAccessInterface has methods to work with LocalClusterAccess resources. +type LocalClusterAccessInterface interface { + Create(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.CreateOptions) (*v1.LocalClusterAccess, error) + Update(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.UpdateOptions) (*v1.LocalClusterAccess, error) + UpdateStatus(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.UpdateOptions) (*v1.LocalClusterAccess, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.LocalClusterAccess, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.LocalClusterAccessList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LocalClusterAccess, err error) + LocalClusterAccessExpansion +} + +// localClusterAccesses implements LocalClusterAccessInterface +type localClusterAccesses struct { + client rest.Interface +} + +// newLocalClusterAccesses returns a LocalClusterAccesses +func newLocalClusterAccesses(c *ClusterV1Client) *localClusterAccesses { + return &localClusterAccesses{ + client: c.RESTClient(), + } +} + +// Get takes name of the localClusterAccess, and returns the corresponding localClusterAccess object, and an error if there is any. +func (c *localClusterAccesses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.LocalClusterAccess, err error) { + result = &v1.LocalClusterAccess{} + err = c.client.Get(). + Resource("localclusteraccesses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of LocalClusterAccesses that match those selectors. +func (c *localClusterAccesses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LocalClusterAccessList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.LocalClusterAccessList{} + err = c.client.Get(). + Resource("localclusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested localClusterAccesses. +func (c *localClusterAccesses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("localclusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a localClusterAccess and creates it. Returns the server's representation of the localClusterAccess, and an error, if there is any. +func (c *localClusterAccesses) Create(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.CreateOptions) (result *v1.LocalClusterAccess, err error) { + result = &v1.LocalClusterAccess{} + err = c.client.Post(). + Resource("localclusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localClusterAccess). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a localClusterAccess and updates it. Returns the server's representation of the localClusterAccess, and an error, if there is any. +func (c *localClusterAccesses) Update(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.UpdateOptions) (result *v1.LocalClusterAccess, err error) { + result = &v1.LocalClusterAccess{} + err = c.client.Put(). + Resource("localclusteraccesses"). + Name(localClusterAccess.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localClusterAccess). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *localClusterAccesses) UpdateStatus(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.UpdateOptions) (result *v1.LocalClusterAccess, err error) { + result = &v1.LocalClusterAccess{} + err = c.client.Put(). + Resource("localclusteraccesses"). + Name(localClusterAccess.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localClusterAccess). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the localClusterAccess and deletes it. Returns an error if one occurs. +func (c *localClusterAccesses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("localclusteraccesses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *localClusterAccesses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("localclusteraccesses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched localClusterAccess. +func (c *localClusterAccesses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LocalClusterAccess, err error) { + result = &v1.LocalClusterAccess{} + err = c.client.Patch(pt). + Resource("localclusteraccesses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/sleepmodeconfig.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/sleepmodeconfig.go new file mode 100644 index 000000000..bb29a0684 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/sleepmodeconfig.go @@ -0,0 +1,179 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SleepModeConfigsGetter has a method to return a SleepModeConfigInterface. +// A group's client should implement this interface. +type SleepModeConfigsGetter interface { + SleepModeConfigs(namespace string) SleepModeConfigInterface +} + +// SleepModeConfigInterface has methods to work with SleepModeConfig resources. +type SleepModeConfigInterface interface { + Create(ctx context.Context, sleepModeConfig *v1.SleepModeConfig, opts metav1.CreateOptions) (*v1.SleepModeConfig, error) + Update(ctx context.Context, sleepModeConfig *v1.SleepModeConfig, opts metav1.UpdateOptions) (*v1.SleepModeConfig, error) + UpdateStatus(ctx context.Context, sleepModeConfig *v1.SleepModeConfig, opts metav1.UpdateOptions) (*v1.SleepModeConfig, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SleepModeConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SleepModeConfigList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SleepModeConfig, err error) + SleepModeConfigExpansion +} + +// sleepModeConfigs implements SleepModeConfigInterface +type sleepModeConfigs struct { + client rest.Interface + ns string +} + +// newSleepModeConfigs returns a SleepModeConfigs +func newSleepModeConfigs(c *ClusterV1Client, namespace string) *sleepModeConfigs { + return &sleepModeConfigs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the sleepModeConfig, and returns the corresponding sleepModeConfig object, and an error if there is any. +func (c *sleepModeConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SleepModeConfig, err error) { + result = &v1.SleepModeConfig{} + err = c.client.Get(). + Namespace(c.ns). + Resource("sleepmodeconfigs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SleepModeConfigs that match those selectors. +func (c *sleepModeConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SleepModeConfigList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SleepModeConfigList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("sleepmodeconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested sleepModeConfigs. +func (c *sleepModeConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("sleepmodeconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a sleepModeConfig and creates it. Returns the server's representation of the sleepModeConfig, and an error, if there is any. +func (c *sleepModeConfigs) Create(ctx context.Context, sleepModeConfig *v1.SleepModeConfig, opts metav1.CreateOptions) (result *v1.SleepModeConfig, err error) { + result = &v1.SleepModeConfig{} + err = c.client.Post(). + Namespace(c.ns). + Resource("sleepmodeconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sleepModeConfig). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a sleepModeConfig and updates it. Returns the server's representation of the sleepModeConfig, and an error, if there is any. +func (c *sleepModeConfigs) Update(ctx context.Context, sleepModeConfig *v1.SleepModeConfig, opts metav1.UpdateOptions) (result *v1.SleepModeConfig, err error) { + result = &v1.SleepModeConfig{} + err = c.client.Put(). + Namespace(c.ns). + Resource("sleepmodeconfigs"). + Name(sleepModeConfig.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sleepModeConfig). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *sleepModeConfigs) UpdateStatus(ctx context.Context, sleepModeConfig *v1.SleepModeConfig, opts metav1.UpdateOptions) (result *v1.SleepModeConfig, err error) { + result = &v1.SleepModeConfig{} + err = c.client.Put(). + Namespace(c.ns). + Resource("sleepmodeconfigs"). + Name(sleepModeConfig.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sleepModeConfig). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the sleepModeConfig and deletes it. Returns an error if one occurs. +func (c *sleepModeConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("sleepmodeconfigs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *sleepModeConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("sleepmodeconfigs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched sleepModeConfig. +func (c *sleepModeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SleepModeConfig, err error) { + result = &v1.SleepModeConfig{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("sleepmodeconfigs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/space.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/space.go new file mode 100644 index 000000000..63daf3ad9 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/space.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SpacesGetter has a method to return a SpaceInterface. +// A group's client should implement this interface. +type SpacesGetter interface { + Spaces() SpaceInterface +} + +// SpaceInterface has methods to work with Space resources. +type SpaceInterface interface { + Create(ctx context.Context, space *v1.Space, opts metav1.CreateOptions) (*v1.Space, error) + Update(ctx context.Context, space *v1.Space, opts metav1.UpdateOptions) (*v1.Space, error) + UpdateStatus(ctx context.Context, space *v1.Space, opts metav1.UpdateOptions) (*v1.Space, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Space, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SpaceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Space, err error) + SpaceExpansion +} + +// spaces implements SpaceInterface +type spaces struct { + client rest.Interface +} + +// newSpaces returns a Spaces +func newSpaces(c *ClusterV1Client) *spaces { + return &spaces{ + client: c.RESTClient(), + } +} + +// Get takes name of the space, and returns the corresponding space object, and an error if there is any. +func (c *spaces) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Space, err error) { + result = &v1.Space{} + err = c.client.Get(). + Resource("spaces"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Spaces that match those selectors. +func (c *spaces) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SpaceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SpaceList{} + err = c.client.Get(). + Resource("spaces"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested spaces. +func (c *spaces) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("spaces"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a space and creates it. Returns the server's representation of the space, and an error, if there is any. +func (c *spaces) Create(ctx context.Context, space *v1.Space, opts metav1.CreateOptions) (result *v1.Space, err error) { + result = &v1.Space{} + err = c.client.Post(). + Resource("spaces"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(space). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a space and updates it. Returns the server's representation of the space, and an error, if there is any. +func (c *spaces) Update(ctx context.Context, space *v1.Space, opts metav1.UpdateOptions) (result *v1.Space, err error) { + result = &v1.Space{} + err = c.client.Put(). + Resource("spaces"). + Name(space.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(space). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *spaces) UpdateStatus(ctx context.Context, space *v1.Space, opts metav1.UpdateOptions) (result *v1.Space, err error) { + result = &v1.Space{} + err = c.client.Put(). + Resource("spaces"). + Name(space.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(space). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the space and deletes it. Returns an error if one occurs. +func (c *spaces) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("spaces"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *spaces) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("spaces"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched space. +func (c *spaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Space, err error) { + result = &v1.Space{} + err = c.client.Patch(pt). + Resource("spaces"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/virtualcluster.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/virtualcluster.go new file mode 100644 index 000000000..3511ac8d5 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1/virtualcluster.go @@ -0,0 +1,179 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VirtualClustersGetter has a method to return a VirtualClusterInterface. +// A group's client should implement this interface. +type VirtualClustersGetter interface { + VirtualClusters(namespace string) VirtualClusterInterface +} + +// VirtualClusterInterface has methods to work with VirtualCluster resources. +type VirtualClusterInterface interface { + Create(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.CreateOptions) (*v1.VirtualCluster, error) + Update(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.UpdateOptions) (*v1.VirtualCluster, error) + UpdateStatus(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.UpdateOptions) (*v1.VirtualCluster, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualCluster, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualClusterList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualCluster, err error) + VirtualClusterExpansion +} + +// virtualClusters implements VirtualClusterInterface +type virtualClusters struct { + client rest.Interface + ns string +} + +// newVirtualClusters returns a VirtualClusters +func newVirtualClusters(c *ClusterV1Client, namespace string) *virtualClusters { + return &virtualClusters{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the virtualCluster, and returns the corresponding virtualCluster object, and an error if there is any. +func (c *virtualClusters) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualCluster, err error) { + result = &v1.VirtualCluster{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualclusters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualClusters that match those selectors. +func (c *virtualClusters) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualClusterList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.VirtualClusterList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualclusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualClusters. +func (c *virtualClusters) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("virtualclusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualCluster and creates it. Returns the server's representation of the virtualCluster, and an error, if there is any. +func (c *virtualClusters) Create(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.CreateOptions) (result *v1.VirtualCluster, err error) { + result = &v1.VirtualCluster{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualclusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualCluster). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualCluster and updates it. Returns the server's representation of the virtualCluster, and an error, if there is any. +func (c *virtualClusters) Update(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.UpdateOptions) (result *v1.VirtualCluster, err error) { + result = &v1.VirtualCluster{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualclusters"). + Name(virtualCluster.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualCluster). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *virtualClusters) UpdateStatus(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.UpdateOptions) (result *v1.VirtualCluster, err error) { + result = &v1.VirtualCluster{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualclusters"). + Name(virtualCluster.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualCluster). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualCluster and deletes it. Returns an error if one occurs. +func (c *virtualClusters) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualclusters"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualClusters) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualclusters"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualCluster. +func (c *virtualClusters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualCluster, err error) { + result = &v1.VirtualCluster{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("virtualclusters"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/clusterquota.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/clusterquota.go new file mode 100644 index 000000000..019c2cee6 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/clusterquota.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ClusterQuotasGetter has a method to return a ClusterQuotaInterface. +// A group's client should implement this interface. +type ClusterQuotasGetter interface { + ClusterQuotas() ClusterQuotaInterface +} + +// ClusterQuotaInterface has methods to work with ClusterQuota resources. +type ClusterQuotaInterface interface { + Create(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.CreateOptions) (*v1.ClusterQuota, error) + Update(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.UpdateOptions) (*v1.ClusterQuota, error) + UpdateStatus(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.UpdateOptions) (*v1.ClusterQuota, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterQuota, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterQuotaList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterQuota, err error) + ClusterQuotaExpansion +} + +// clusterQuotas implements ClusterQuotaInterface +type clusterQuotas struct { + client rest.Interface +} + +// newClusterQuotas returns a ClusterQuotas +func newClusterQuotas(c *StorageV1Client) *clusterQuotas { + return &clusterQuotas{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterQuota, and returns the corresponding clusterQuota object, and an error if there is any. +func (c *clusterQuotas) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterQuota, err error) { + result = &v1.ClusterQuota{} + err = c.client.Get(). + Resource("clusterquotas"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterQuotas that match those selectors. +func (c *clusterQuotas) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterQuotaList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ClusterQuotaList{} + err = c.client.Get(). + Resource("clusterquotas"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterQuotas. +func (c *clusterQuotas) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("clusterquotas"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a clusterQuota and creates it. Returns the server's representation of the clusterQuota, and an error, if there is any. +func (c *clusterQuotas) Create(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.CreateOptions) (result *v1.ClusterQuota, err error) { + result = &v1.ClusterQuota{} + err = c.client.Post(). + Resource("clusterquotas"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterQuota). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a clusterQuota and updates it. Returns the server's representation of the clusterQuota, and an error, if there is any. +func (c *clusterQuotas) Update(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.UpdateOptions) (result *v1.ClusterQuota, err error) { + result = &v1.ClusterQuota{} + err = c.client.Put(). + Resource("clusterquotas"). + Name(clusterQuota.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterQuota). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *clusterQuotas) UpdateStatus(ctx context.Context, clusterQuota *v1.ClusterQuota, opts metav1.UpdateOptions) (result *v1.ClusterQuota, err error) { + result = &v1.ClusterQuota{} + err = c.client.Put(). + Resource("clusterquotas"). + Name(clusterQuota.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterQuota). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the clusterQuota and deletes it. Returns an error if one occurs. +func (c *clusterQuotas) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterquotas"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterQuotas) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("clusterquotas"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched clusterQuota. +func (c *clusterQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterQuota, err error) { + result = &v1.ClusterQuota{} + err = c.client.Patch(pt). + Resource("clusterquotas"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/doc.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/doc.go new file mode 100644 index 000000000..225e6b2be --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/generated_expansion.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/generated_expansion.go new file mode 100644 index 000000000..87f72b708 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/generated_expansion.go @@ -0,0 +1,13 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type ClusterQuotaExpansion interface{} + +type LocalClusterAccessExpansion interface{} + +type LocalTeamExpansion interface{} + +type LocalUserExpansion interface{} + +type VirtualClusterExpansion interface{} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/localclusteraccess.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/localclusteraccess.go new file mode 100644 index 000000000..b8bc0dfbb --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/localclusteraccess.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// LocalClusterAccessesGetter has a method to return a LocalClusterAccessInterface. +// A group's client should implement this interface. +type LocalClusterAccessesGetter interface { + LocalClusterAccesses() LocalClusterAccessInterface +} + +// LocalClusterAccessInterface has methods to work with LocalClusterAccess resources. +type LocalClusterAccessInterface interface { + Create(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.CreateOptions) (*v1.LocalClusterAccess, error) + Update(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.UpdateOptions) (*v1.LocalClusterAccess, error) + UpdateStatus(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.UpdateOptions) (*v1.LocalClusterAccess, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.LocalClusterAccess, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.LocalClusterAccessList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LocalClusterAccess, err error) + LocalClusterAccessExpansion +} + +// localClusterAccesses implements LocalClusterAccessInterface +type localClusterAccesses struct { + client rest.Interface +} + +// newLocalClusterAccesses returns a LocalClusterAccesses +func newLocalClusterAccesses(c *StorageV1Client) *localClusterAccesses { + return &localClusterAccesses{ + client: c.RESTClient(), + } +} + +// Get takes name of the localClusterAccess, and returns the corresponding localClusterAccess object, and an error if there is any. +func (c *localClusterAccesses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.LocalClusterAccess, err error) { + result = &v1.LocalClusterAccess{} + err = c.client.Get(). + Resource("localclusteraccesses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of LocalClusterAccesses that match those selectors. +func (c *localClusterAccesses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LocalClusterAccessList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.LocalClusterAccessList{} + err = c.client.Get(). + Resource("localclusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested localClusterAccesses. +func (c *localClusterAccesses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("localclusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a localClusterAccess and creates it. Returns the server's representation of the localClusterAccess, and an error, if there is any. +func (c *localClusterAccesses) Create(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.CreateOptions) (result *v1.LocalClusterAccess, err error) { + result = &v1.LocalClusterAccess{} + err = c.client.Post(). + Resource("localclusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localClusterAccess). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a localClusterAccess and updates it. Returns the server's representation of the localClusterAccess, and an error, if there is any. +func (c *localClusterAccesses) Update(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.UpdateOptions) (result *v1.LocalClusterAccess, err error) { + result = &v1.LocalClusterAccess{} + err = c.client.Put(). + Resource("localclusteraccesses"). + Name(localClusterAccess.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localClusterAccess). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *localClusterAccesses) UpdateStatus(ctx context.Context, localClusterAccess *v1.LocalClusterAccess, opts metav1.UpdateOptions) (result *v1.LocalClusterAccess, err error) { + result = &v1.LocalClusterAccess{} + err = c.client.Put(). + Resource("localclusteraccesses"). + Name(localClusterAccess.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localClusterAccess). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the localClusterAccess and deletes it. Returns an error if one occurs. +func (c *localClusterAccesses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("localclusteraccesses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *localClusterAccesses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("localclusteraccesses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched localClusterAccess. +func (c *localClusterAccesses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LocalClusterAccess, err error) { + result = &v1.LocalClusterAccess{} + err = c.client.Patch(pt). + Resource("localclusteraccesses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/localteam.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/localteam.go new file mode 100644 index 000000000..18deeee9b --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/localteam.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// LocalTeamsGetter has a method to return a LocalTeamInterface. +// A group's client should implement this interface. +type LocalTeamsGetter interface { + LocalTeams() LocalTeamInterface +} + +// LocalTeamInterface has methods to work with LocalTeam resources. +type LocalTeamInterface interface { + Create(ctx context.Context, localTeam *v1.LocalTeam, opts metav1.CreateOptions) (*v1.LocalTeam, error) + Update(ctx context.Context, localTeam *v1.LocalTeam, opts metav1.UpdateOptions) (*v1.LocalTeam, error) + UpdateStatus(ctx context.Context, localTeam *v1.LocalTeam, opts metav1.UpdateOptions) (*v1.LocalTeam, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.LocalTeam, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.LocalTeamList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LocalTeam, err error) + LocalTeamExpansion +} + +// localTeams implements LocalTeamInterface +type localTeams struct { + client rest.Interface +} + +// newLocalTeams returns a LocalTeams +func newLocalTeams(c *StorageV1Client) *localTeams { + return &localTeams{ + client: c.RESTClient(), + } +} + +// Get takes name of the localTeam, and returns the corresponding localTeam object, and an error if there is any. +func (c *localTeams) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.LocalTeam, err error) { + result = &v1.LocalTeam{} + err = c.client.Get(). + Resource("localteams"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of LocalTeams that match those selectors. +func (c *localTeams) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LocalTeamList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.LocalTeamList{} + err = c.client.Get(). + Resource("localteams"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested localTeams. +func (c *localTeams) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("localteams"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a localTeam and creates it. Returns the server's representation of the localTeam, and an error, if there is any. +func (c *localTeams) Create(ctx context.Context, localTeam *v1.LocalTeam, opts metav1.CreateOptions) (result *v1.LocalTeam, err error) { + result = &v1.LocalTeam{} + err = c.client.Post(). + Resource("localteams"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localTeam). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a localTeam and updates it. Returns the server's representation of the localTeam, and an error, if there is any. +func (c *localTeams) Update(ctx context.Context, localTeam *v1.LocalTeam, opts metav1.UpdateOptions) (result *v1.LocalTeam, err error) { + result = &v1.LocalTeam{} + err = c.client.Put(). + Resource("localteams"). + Name(localTeam.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localTeam). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *localTeams) UpdateStatus(ctx context.Context, localTeam *v1.LocalTeam, opts metav1.UpdateOptions) (result *v1.LocalTeam, err error) { + result = &v1.LocalTeam{} + err = c.client.Put(). + Resource("localteams"). + Name(localTeam.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localTeam). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the localTeam and deletes it. Returns an error if one occurs. +func (c *localTeams) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("localteams"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *localTeams) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("localteams"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched localTeam. +func (c *localTeams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LocalTeam, err error) { + result = &v1.LocalTeam{} + err = c.client.Patch(pt). + Resource("localteams"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/localuser.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/localuser.go new file mode 100644 index 000000000..2026f862e --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/localuser.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// LocalUsersGetter has a method to return a LocalUserInterface. +// A group's client should implement this interface. +type LocalUsersGetter interface { + LocalUsers() LocalUserInterface +} + +// LocalUserInterface has methods to work with LocalUser resources. +type LocalUserInterface interface { + Create(ctx context.Context, localUser *v1.LocalUser, opts metav1.CreateOptions) (*v1.LocalUser, error) + Update(ctx context.Context, localUser *v1.LocalUser, opts metav1.UpdateOptions) (*v1.LocalUser, error) + UpdateStatus(ctx context.Context, localUser *v1.LocalUser, opts metav1.UpdateOptions) (*v1.LocalUser, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.LocalUser, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.LocalUserList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LocalUser, err error) + LocalUserExpansion +} + +// localUsers implements LocalUserInterface +type localUsers struct { + client rest.Interface +} + +// newLocalUsers returns a LocalUsers +func newLocalUsers(c *StorageV1Client) *localUsers { + return &localUsers{ + client: c.RESTClient(), + } +} + +// Get takes name of the localUser, and returns the corresponding localUser object, and an error if there is any. +func (c *localUsers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.LocalUser, err error) { + result = &v1.LocalUser{} + err = c.client.Get(). + Resource("localusers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of LocalUsers that match those selectors. +func (c *localUsers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LocalUserList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.LocalUserList{} + err = c.client.Get(). + Resource("localusers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested localUsers. +func (c *localUsers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("localusers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a localUser and creates it. Returns the server's representation of the localUser, and an error, if there is any. +func (c *localUsers) Create(ctx context.Context, localUser *v1.LocalUser, opts metav1.CreateOptions) (result *v1.LocalUser, err error) { + result = &v1.LocalUser{} + err = c.client.Post(). + Resource("localusers"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localUser). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a localUser and updates it. Returns the server's representation of the localUser, and an error, if there is any. +func (c *localUsers) Update(ctx context.Context, localUser *v1.LocalUser, opts metav1.UpdateOptions) (result *v1.LocalUser, err error) { + result = &v1.LocalUser{} + err = c.client.Put(). + Resource("localusers"). + Name(localUser.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localUser). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *localUsers) UpdateStatus(ctx context.Context, localUser *v1.LocalUser, opts metav1.UpdateOptions) (result *v1.LocalUser, err error) { + result = &v1.LocalUser{} + err = c.client.Put(). + Resource("localusers"). + Name(localUser.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localUser). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the localUser and deletes it. Returns an error if one occurs. +func (c *localUsers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("localusers"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *localUsers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("localusers"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched localUser. +func (c *localUsers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LocalUser, err error) { + result = &v1.LocalUser{} + err = c.client.Patch(pt). + Resource("localusers"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/storage_client.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/storage_client.go new file mode 100644 index 000000000..6c1c0a1d8 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/storage_client.go @@ -0,0 +1,111 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "net/http" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + rest "k8s.io/client-go/rest" +) + +type StorageV1Interface interface { + RESTClient() rest.Interface + ClusterQuotasGetter + LocalClusterAccessesGetter + LocalTeamsGetter + LocalUsersGetter + VirtualClustersGetter +} + +// StorageV1Client is used to interact with features provided by the storage.loft.sh group. +type StorageV1Client struct { + restClient rest.Interface +} + +func (c *StorageV1Client) ClusterQuotas() ClusterQuotaInterface { + return newClusterQuotas(c) +} + +func (c *StorageV1Client) LocalClusterAccesses() LocalClusterAccessInterface { + return newLocalClusterAccesses(c) +} + +func (c *StorageV1Client) LocalTeams() LocalTeamInterface { + return newLocalTeams(c) +} + +func (c *StorageV1Client) LocalUsers() LocalUserInterface { + return newLocalUsers(c) +} + +func (c *StorageV1Client) VirtualClusters(namespace string) VirtualClusterInterface { + return newVirtualClusters(c, namespace) +} + +// NewForConfig creates a new StorageV1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*StorageV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new StorageV1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*StorageV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &StorageV1Client{client}, nil +} + +// NewForConfigOrDie creates a new StorageV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *StorageV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new StorageV1Client for the given RESTClient. +func New(c rest.Interface) *StorageV1Client { + return &StorageV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *StorageV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/virtualcluster.go b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/virtualcluster.go new file mode 100644 index 000000000..dee81d201 --- /dev/null +++ b/vendor/github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1/virtualcluster.go @@ -0,0 +1,179 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + scheme "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VirtualClustersGetter has a method to return a VirtualClusterInterface. +// A group's client should implement this interface. +type VirtualClustersGetter interface { + VirtualClusters(namespace string) VirtualClusterInterface +} + +// VirtualClusterInterface has methods to work with VirtualCluster resources. +type VirtualClusterInterface interface { + Create(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.CreateOptions) (*v1.VirtualCluster, error) + Update(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.UpdateOptions) (*v1.VirtualCluster, error) + UpdateStatus(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.UpdateOptions) (*v1.VirtualCluster, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualCluster, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualClusterList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualCluster, err error) + VirtualClusterExpansion +} + +// virtualClusters implements VirtualClusterInterface +type virtualClusters struct { + client rest.Interface + ns string +} + +// newVirtualClusters returns a VirtualClusters +func newVirtualClusters(c *StorageV1Client, namespace string) *virtualClusters { + return &virtualClusters{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the virtualCluster, and returns the corresponding virtualCluster object, and an error if there is any. +func (c *virtualClusters) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualCluster, err error) { + result = &v1.VirtualCluster{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualclusters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualClusters that match those selectors. +func (c *virtualClusters) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualClusterList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.VirtualClusterList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualclusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualClusters. +func (c *virtualClusters) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("virtualclusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualCluster and creates it. Returns the server's representation of the virtualCluster, and an error, if there is any. +func (c *virtualClusters) Create(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.CreateOptions) (result *v1.VirtualCluster, err error) { + result = &v1.VirtualCluster{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualclusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualCluster). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualCluster and updates it. Returns the server's representation of the virtualCluster, and an error, if there is any. +func (c *virtualClusters) Update(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.UpdateOptions) (result *v1.VirtualCluster, err error) { + result = &v1.VirtualCluster{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualclusters"). + Name(virtualCluster.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualCluster). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *virtualClusters) UpdateStatus(ctx context.Context, virtualCluster *v1.VirtualCluster, opts metav1.UpdateOptions) (result *v1.VirtualCluster, err error) { + result = &v1.VirtualCluster{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualclusters"). + Name(virtualCluster.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualCluster). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualCluster and deletes it. Returns an error if one occurs. +func (c *virtualClusters) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualclusters"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualClusters) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualclusters"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualCluster. +func (c *virtualClusters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualCluster, err error) { + result = &v1.VirtualCluster{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("virtualclusters"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/doc.go new file mode 100644 index 000000000..acc2c0305 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/doc.go @@ -0,0 +1,13 @@ +// Api versions allow the api contract for a resource to be changed while keeping +// backward compatibility by support multiple concurrent versions +// of the same resource + +//go:generate go run ../../../../vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i . -h ../../../../boilerplate.go.txt +//go:generate go run ../../../../vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go -O zz_generated.defaults -i . -h ../../../../boilerplate.go.txt +//go:generate go run ../../../../vendor/k8s.io/code-generator/cmd/conversion-gen/main.go -O zz_generated.conversion -i . -h ../../../../boilerplate.go.txt + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:defaulter-gen=TypeMeta +// +groupName=audit.loft.sh +package v1 // import "github.com/loft-sh/api/apis/audit/v1" diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/event_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/event_types.go new file mode 100644 index 000000000..d524ffc01 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/event_types.go @@ -0,0 +1,187 @@ +package v1 + +import ( + authenticationv1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" +) + +// Level defines the amount of information logged during auditing +type Level string + +// Valid audit levels +const ( + // LevelNone disables auditing + LevelNone Level = "None" + // LevelMetadata provides the basic level of auditing. + LevelMetadata Level = "Metadata" + // LevelRequest provides Metadata level of auditing, and additionally + // logs the request object (does not apply for non-resource requests). + LevelRequest Level = "Request" + // LevelRequestResponse provides Request level of auditing, and additionally + // logs the response object (does not apply for non-resource requests). + LevelRequestResponse Level = "RequestResponse" +) + +// RequestTarget defines the target of an incoming request +type RequestTarget string + +// Valid request targets +const ( + // RequestTargetManagement specifies a loft management api request + RequestTargetManagement RequestTarget = "Management" + // RequestTargetCluster specifies a connected kubernetes cluster request + RequestTargetCluster RequestTarget = "Cluster" + // RequestTargetVCluster specifies a virtual kubernetes cluster request + RequestTargetVCluster RequestTarget = "VCluster" + // RequestTargetProjectSpace specifies a project space request + RequestTargetProjectSpace RequestTarget = "ProjectSpace" + // RequestTargetProjectVCluster specifies a project vcluster request + RequestTargetProjectVCluster RequestTarget = "ProjectVCluster" +) + +func ordLevel(l Level) int { + switch l { + case LevelMetadata: + return 1 + case LevelRequest: + return 2 + case LevelRequestResponse: + return 3 + case LevelNone: + return 0 + default: + return 0 + } +} + +func (a Level) Less(b Level) bool { + return ordLevel(a) < ordLevel(b) +} + +func (a Level) GreaterOrEqual(b Level) bool { + return ordLevel(a) >= ordLevel(b) +} + +// Stage defines the stages in request handling that audit events may be generated. +type Stage string + +// Valid audit stages. +const ( + // The stage for events generated as soon as the audit handler receives the request, and before it + // is delegated down the handler chain. + StageRequestReceived Stage = "RequestReceived" + // The stage for events generated once the response headers are sent, but before the response body + // is sent. This stage is only generated for long-running requests (e.g. watch). + StageResponseStarted Stage = "ResponseStarted" + // The stage for events generated once the response body has been completed, and no more bytes + // will be sent. + StageResponseComplete Stage = "ResponseComplete" + // The stage for events generated when a panic occurred. + StagePanic Stage = "Panic" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Event holds the event information +// +k8s:openapi-gen=true +type Event struct { + metav1.TypeMeta `json:",inline"` + + // AuditLevel at which event was generated + Level Level `json:"level" protobuf:"bytes,1,opt,name=level,casttype=Level"` + + // Unique audit ID, generated for each request. + AuditID types.UID `json:"auditID" protobuf:"bytes,2,opt,name=auditID,casttype=k8s.io/apimachinery/pkg/types.UID"` + // Stage of the request handling when this event instance was generated. + Stage Stage `json:"stage" protobuf:"bytes,3,opt,name=stage,casttype=Stage"` + + // RequestURI is the request URI as sent by the client to a server. + RequestURI string `json:"requestURI" protobuf:"bytes,4,opt,name=requestURI"` + // Verb is the kubernetes verb associated with the request. + // For non-resource requests, this is the lower-cased HTTP method. + Verb string `json:"verb" protobuf:"bytes,5,opt,name=verb"` + // Authenticated user information. + User authenticationv1.UserInfo `json:"user" protobuf:"bytes,6,opt,name=user"` + // Impersonated user information. + // +optional + ImpersonatedUser *authenticationv1.UserInfo `json:"impersonatedUser,omitempty" protobuf:"bytes,7,opt,name=impersonatedUser"` + // Source IPs, from where the request originated and intermediate proxies. + // +optional + SourceIPs []string `json:"sourceIPs,omitempty" protobuf:"bytes,8,rep,name=sourceIPs"` + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + UserAgent string `json:"userAgent,omitempty" protobuf:"bytes,16,opt,name=userAgent"` + // Object reference this request is targeted at. + // Does not apply for List-type requests, or non-resource requests. + // +optional + ObjectRef *ObjectReference `json:"objectRef,omitempty" protobuf:"bytes,9,opt,name=objectRef"` + // The response status. + // For successful and non-successful responses, this will only include the Code and StatusSuccess. + // For panic type error responses, this will be auto-populated with the error Message. + // +optional + ResponseStatus *metav1.Status `json:"responseStatus,omitempty" protobuf:"bytes,10,opt,name=responseStatus"` + + // API object from the request, in JSON format. The RequestObject is recorded as-is in the request + // (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or + // merging. It is an external versioned object type, and may not be a valid object on its own. + // Omitted for non-resource requests. Only logged at Request Level and higher. + // +optional + RequestObject *runtime.Unknown `json:"requestObject,omitempty" protobuf:"bytes,11,opt,name=requestObject"` + // API object returned in the response, in JSON. The ResponseObject is recorded after conversion + // to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged + // at Response Level. + // +optional + ResponseObject *runtime.Unknown `json:"responseObject,omitempty" protobuf:"bytes,12,opt,name=responseObject"` + // Time the request reached the apiserver. + // +optional + RequestReceivedTimestamp metav1.MicroTime `json:"requestReceivedTimestamp" protobuf:"bytes,13,opt,name=requestReceivedTimestamp"` + // Time the request reached current audit stage. + // +optional + StageTimestamp metav1.MicroTime `json:"stageTimestamp" protobuf:"bytes,14,opt,name=stageTimestamp"` + + // Annotations is an unstructured key value map stored with an audit event that may be set by + // plugins invoked in the request serving chain, including authentication, authorization and + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. + // +optional + Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,15,rep,name=annotations"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// EventList is a list of audit Events. +type EventList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// ObjectReference contains enough information to let you inspect or modify the referred object. +type ObjectReference struct { + // +optional + Resource string `json:"resource,omitempty" protobuf:"bytes,1,opt,name=resource"` + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"` + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` + // APIGroup is the name of the API group that contains the referred object. + // The empty string represents the core API group. + // +optional + APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,5,opt,name=apiGroup"` + // APIVersion is the version of the API group that contains the referred object. + // +optional + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,6,opt,name=apiVersion"` + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,7,opt,name=resourceVersion"` + // +optional + Subresource string `json:"subresource,omitempty" protobuf:"bytes,8,opt,name=subresource"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..fb7cc18f3 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/zz_generated.deepcopy.go @@ -0,0 +1,126 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + authenticationv1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Event) DeepCopyInto(out *Event) { + *out = *in + out.TypeMeta = in.TypeMeta + in.User.DeepCopyInto(&out.User) + if in.ImpersonatedUser != nil { + in, out := &in.ImpersonatedUser, &out.ImpersonatedUser + *out = new(authenticationv1.UserInfo) + (*in).DeepCopyInto(*out) + } + if in.SourceIPs != nil { + in, out := &in.SourceIPs, &out.SourceIPs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ObjectRef != nil { + in, out := &in.ObjectRef, &out.ObjectRef + *out = new(ObjectReference) + **out = **in + } + if in.ResponseStatus != nil { + in, out := &in.ResponseStatus, &out.ResponseStatus + *out = new(metav1.Status) + (*in).DeepCopyInto(*out) + } + if in.RequestObject != nil { + in, out := &in.RequestObject, &out.RequestObject + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) + } + if in.ResponseObject != nil { + in, out := &in.ResponseObject, &out.ResponseObject + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) + } + in.RequestReceivedTimestamp.DeepCopyInto(&out.RequestReceivedTimestamp) + in.StageTimestamp.DeepCopyInto(&out.StageTimestamp) + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event. +func (in *Event) DeepCopy() *Event { + if in == nil { + return nil + } + out := new(Event) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Event) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventList) DeepCopyInto(out *EventList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Event, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList. +func (in *EventList) DeepCopy() *EventList { + if in == nil { + return nil + } + out := new(EventList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EventList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference. +func (in *ObjectReference) DeepCopy() *ObjectReference { + if in == nil { + return nil + } + out := new(ObjectReference) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/zz_generated.defaults.go new file mode 100644 index 000000000..88694caac --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/audit/v1/zz_generated.defaults.go @@ -0,0 +1,17 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/doc.go new file mode 100644 index 000000000..8ca44332c --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/doc.go @@ -0,0 +1,5 @@ +// +k8s:deepcopy-gen=package,register +// +groupName=management.loft.sh + +// Package api is the internal version of the API. +package management diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/inject.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/inject.go new file mode 100644 index 000000000..8155d1630 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/inject.go @@ -0,0 +1,7 @@ +package management + +import ( + "github.com/loft-sh/api/v3/pkg/managerfactory" +) + +var Factory managerfactory.SharedManagerFactory diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/doc.go new file mode 100644 index 000000000..e355f6461 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/doc.go @@ -0,0 +1,2 @@ +// Package api is the internal version of the API. +package install diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/install.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/install.go new file mode 100644 index 000000000..391c40882 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/install.go @@ -0,0 +1,37 @@ +package install + +import ( + "github.com/loft-sh/api/v3/pkg/apis/management" + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/apiserver/pkg/builders" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +func init() { + InstallOptions(builders.Scheme) + InstallOptions(builders.ParameterScheme) + utilruntime.Must(managementv1.RegisterConversions(builders.ParameterScheme)) +} + +func InstallOptions(scheme *runtime.Scheme) { + utilruntime.Must(managementv1.InstallOptions(scheme)) + utilruntime.Must(addKnownOptionsTypes(scheme)) +} + +func addKnownOptionsTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes( + management.SchemeGroupVersion, + &management.TaskLogOptions{}, + &management.VirtualClusterInstanceLogOptions{}, + &management.UserSpacesOptions{}, + &management.UserVirtualClustersOptions{}, + &management.UserQuotasOptions{}, + &management.DevPodUpOptions{}, + &management.DevPodDeleteOptions{}, + &management.DevPodStopOptions{}, + &management.DevPodStatusOptions{}, + &management.DevPodSshOptions{}, + ) + return nil +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/zz_generated.api.register.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/zz_generated.api.register.go new file mode 100644 index 000000000..fb997c53e --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/zz_generated.api.register.go @@ -0,0 +1,135 @@ +// Code generated by generator. DO NOT EDIT. + +package install + +import ( + "github.com/loft-sh/api/v3/pkg/apis/management" + "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/apiserver/pkg/builders" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +func init() { + Install(builders.Scheme) +} + +func Install(scheme *runtime.Scheme) { + utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(management.AddToScheme(scheme)) + utilruntime.Must(addKnownTypes(scheme)) +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(management.SchemeGroupVersion, + &management.AgentAuditEvent{}, + &management.AgentAuditEventList{}, + &management.Announcement{}, + &management.AnnouncementList{}, + &management.App{}, + &management.AppList{}, + &management.Cluster{}, + &management.ClusterList{}, + &management.ClusterAgentConfig{}, + &management.ClusterCharts{}, + &management.ClusterDomain{}, + &management.ClusterMemberAccess{}, + &management.ClusterMembers{}, + &management.ClusterReset{}, + &management.ClusterVirtualClusterDefaults{}, + &management.ClusterAccess{}, + &management.ClusterAccessList{}, + &management.ClusterConnect{}, + &management.ClusterConnectList{}, + &management.ClusterRoleTemplate{}, + &management.ClusterRoleTemplateList{}, + &management.Config{}, + &management.ConfigList{}, + &management.DevPodWorkspaceInstance{}, + &management.DevPodWorkspaceInstanceList{}, + &management.DevPodWorkspaceInstanceDelete{}, + &management.DevPodWorkspaceInstanceGetStatus{}, + &management.DevPodWorkspaceInstanceSsh{}, + &management.DevPodWorkspaceInstanceStop{}, + &management.DevPodWorkspaceInstanceUp{}, + &management.DevPodWorkspaceTemplate{}, + &management.DevPodWorkspaceTemplateList{}, + &management.DirectClusterEndpointToken{}, + &management.DirectClusterEndpointTokenList{}, + &management.Event{}, + &management.EventList{}, + &management.Feature{}, + &management.FeatureList{}, + &management.IngressAuthToken{}, + &management.IngressAuthTokenList{}, + &management.Kiosk{}, + &management.KioskList{}, + &management.License{}, + &management.LicenseList{}, + &management.LicenseRequest{}, + &management.LicenseToken{}, + &management.LicenseTokenList{}, + &management.LoftUpgrade{}, + &management.LoftUpgradeList{}, + &management.OwnedAccessKey{}, + &management.OwnedAccessKeyList{}, + &management.PolicyViolation{}, + &management.PolicyViolationList{}, + &management.Project{}, + &management.ProjectList{}, + &management.ProjectChartInfo{}, + &management.ProjectCharts{}, + &management.ProjectClusters{}, + &management.ProjectImportSpace{}, + &management.ProjectImportVirtualCluster{}, + &management.ProjectMembers{}, + &management.ProjectMigrateSpaceInstance{}, + &management.ProjectMigrateVirtualClusterInstance{}, + &management.ProjectTemplates{}, + &management.ProjectSecret{}, + &management.ProjectSecretList{}, + &management.RedirectToken{}, + &management.RedirectTokenList{}, + &management.ResetAccessKey{}, + &management.ResetAccessKeyList{}, + &management.Runner{}, + &management.RunnerList{}, + &management.RunnerAccessKey{}, + &management.RunnerConfig{}, + &management.Self{}, + &management.SelfList{}, + &management.SelfSubjectAccessReview{}, + &management.SelfSubjectAccessReviewList{}, + &management.SharedSecret{}, + &management.SharedSecretList{}, + &management.SpaceConstraint{}, + &management.SpaceConstraintList{}, + &management.SpaceInstance{}, + &management.SpaceInstanceList{}, + &management.SpaceTemplate{}, + &management.SpaceTemplateList{}, + &management.SubjectAccessReview{}, + &management.SubjectAccessReviewList{}, + &management.Task{}, + &management.TaskList{}, + &management.TaskLog{}, + &management.Team{}, + &management.TeamList{}, + &management.TeamAccessKeys{}, + &management.TeamClusters{}, + &management.User{}, + &management.UserList{}, + &management.UserAccessKeys{}, + &management.UserClusters{}, + &management.UserPermissions{}, + &management.UserProfile{}, + &management.VirtualClusterInstance{}, + &management.VirtualClusterInstanceList{}, + &management.VirtualClusterInstanceKubeConfig{}, + &management.VirtualClusterInstanceLog{}, + &management.VirtualClusterInstanceWorkloadKubeConfig{}, + &management.VirtualClusterTemplate{}, + &management.VirtualClusterTemplateList{}, + ) + return nil +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/zz_generated.defaults.go new file mode 100644 index 000000000..2a202c330 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/install/zz_generated.defaults.go @@ -0,0 +1,17 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package install + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/types.go new file mode 100644 index 000000000..16d429f51 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/types.go @@ -0,0 +1,188 @@ +package management + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceLogOptions struct { + metav1.TypeMeta `json:",inline"` + + // The container for which to stream logs. Defaults to only container if there is one container in the pod. + // +optional + Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"` + // Follow the log stream of the pod. Defaults to false. + // +optional + Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"` + // Return previous terminated container logs. Defaults to false. + // +optional + Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"` + // A relative time in seconds before the current time from which to show logs. If this value + // precedes the time a pod was started, only logs since the pod start will be returned. + // If this value is in the future, no logs will be returned. + // Only one of sinceSeconds or sinceTime may be specified. + // +optional + SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"` + // An RFC3339 timestamp from which to show logs. If this value + // precedes the time a pod was started, only logs since the pod start will be returned. + // If this value is in the future, no logs will be returned. + // Only one of sinceSeconds or sinceTime may be specified. + // +optional + SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"` + // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line + // of log output. Defaults to false. + // +optional + Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"` + // If set, the number of lines from the end of the logs to show. If not specified, + // logs are shown from the creation of the container or sinceSeconds or sinceTime + // +optional + TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"` + // If set, the number of bytes to read from the server before terminating the + // log output. This may not display a complete final line of logging, and may return + // slightly more or slightly less than the specified limit. + // +optional + LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"` + + // insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the + // serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver + // and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real + // kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the + // connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept + // the actual log data coming from the real kubelet). + // +optional + InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty" protobuf:"varint,9,opt,name=insecureSkipTLSVerifyBackend"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TaskLogOptions struct { + metav1.TypeMeta `json:",inline"` + + // Follow the log stream of the pod. Defaults to false. + // +optional + Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"` + // Return previous terminated container logs. Defaults to false. + // +optional + Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"` + // A relative time in seconds before the current time from which to show logs. If this value + // precedes the time a pod was started, only logs since the pod start will be returned. + // If this value is in the future, no logs will be returned. + // Only one of sinceSeconds or sinceTime may be specified. + // +optional + SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"` + // An RFC3339 timestamp from which to show logs. If this value + // precedes the time a pod was started, only logs since the pod start will be returned. + // If this value is in the future, no logs will be returned. + // Only one of sinceSeconds or sinceTime may be specified. + // +optional + SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"` + // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line + // of log output. Defaults to false. + // +optional + Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"` + // If set, the number of lines from the end of the logs to show. If not specified, + // logs are shown from the creation of the container or sinceSeconds or sinceTime + // +optional + TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"` + // If set, the number of bytes to read from the server before terminating the + // log output. This may not display a complete final line of logging, and may return + // slightly more or slightly less than the specified limit. + // +optional + LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"` + + // insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the + // serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver + // and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real + // kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the + // connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept + // the actual log data coming from the real kubelet). + // +optional + InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty" protobuf:"varint,9,opt,name=insecureSkipTLSVerifyBackend"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserSpacesOptions struct { + metav1.TypeMeta `json:",inline"` + + // Cluster where to retrieve spaces from + // +optional + Cluster []string `json:"cluster,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserVirtualClustersOptions struct { + metav1.TypeMeta `json:",inline"` + + // Cluster where to retrieve virtual clusters from + // +optional + Cluster []string `json:"cluster,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserQuotasOptions struct { + metav1.TypeMeta `json:",inline"` + + // Cluster where to retrieve quotas from + // +optional + Cluster []string `json:"cluster,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodUpOptions struct { + metav1.TypeMeta `json:",inline"` + + // WebMode executes the up command directly. + // +optional + WebMode bool `json:"webMode,omitempty"` + + // Debug includes debug logs. + // +optional + Debug bool `json:"debug,omitempty"` + + // Options are the options to pass. + // +optional + Options string `json:"options,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodDeleteOptions struct { + metav1.TypeMeta `json:",inline"` + + // Options are the options to pass. + // +optional + Options string `json:"options,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodStopOptions struct { + metav1.TypeMeta `json:",inline"` + + // Options are the options to pass. + // +optional + Options string `json:"options,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodStatusOptions struct { + metav1.TypeMeta `json:",inline"` + + // Options are the options to pass. + // +optional + Options string `json:"options,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodSshOptions struct { + metav1.TypeMeta `json:",inline"` + + // Options are the options to pass. + // +optional + Options string `json:"options,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/agentauditevent_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/agentauditevent_types.go new file mode 100644 index 000000000..599d0ce31 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/agentauditevent_types.go @@ -0,0 +1,32 @@ +package v1 + +import ( + auditv1 "github.com/loft-sh/api/v3/pkg/apis/audit/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AgentAuditEvent holds an event +// +k8s:openapi-gen=true +// +resource:path=agentauditevents,rest=AgentAuditEventsREST +type AgentAuditEvent struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec AgentAuditEventSpec `json:"spec,omitempty"` + Status AgentAuditEventStatus `json:"status,omitempty"` +} + +// AgentAuditEventSpec holds the specification +type AgentAuditEventSpec struct { + // Events are the events the agent has recorded + // +optional + Events []*auditv1.Event `json:"events,omitempty"` +} + +// AgentAuditEventStatus holds the status +type AgentAuditEventStatus struct { +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/announcement_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/announcement_types.go new file mode 100644 index 000000000..022bfb4f7 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/announcement_types.go @@ -0,0 +1,34 @@ +package v1 + +import ( + admintypes "github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Announcement holds the announcement information +// +k8s:openapi-gen=true +// +resource:path=announcements,rest=AnnouncementREST +type Announcement struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec AnnouncementSpec `json:"spec,omitempty"` + Status AnnouncementStatus `json:"status,omitempty"` +} + +type AnnouncementSpec struct { +} + +type AnnouncementStatus struct { + // Announcement is the html announcement that should be displayed in the frontend + // +optional + Announcement string `json:"announcement,omitempty"` + + // InstanceTokenAuth is an instance auth token signed for the user that is used by the frontend + // +optional + InstanceTokenAuth *admintypes.InstanceTokenAuth `json:"analyticsToken,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/app_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/app_types.go new file mode 100644 index 000000000..1ff757ac1 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/app_types.go @@ -0,0 +1,47 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// App holds the information +// +k8s:openapi-gen=true +// +resource:path=apps,rest=AppREST +type App struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec AppSpec `json:"spec,omitempty"` + Status AppStatus `json:"status,omitempty"` +} + +// AppSpec holds the specification +type AppSpec struct { + storagev1.AppSpec `json:",inline"` +} + +// AppStatus holds the status +type AppStatus struct { + storagev1.AppStatus `json:",inline"` +} + +func (a *App) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *App) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *App) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *App) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_agentconfig_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_agentconfig_types.go new file mode 100644 index 000000000..0bec807a5 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_agentconfig_types.go @@ -0,0 +1,109 @@ +package v1 + +import ( + "github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterAgentConfig holds the loft agent configuration +// +subresource-request +type ClusterAgentConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Cluster is the cluster the agent is running in. + // +optional + Cluster string `json:"cluster,omitempty"` + + // Audit holds the agent audit config + // +optional + Audit *AgentAuditConfig `json:"audit,omitempty"` + + // DefaultImageRegistry defines if we should prefix the virtual cluster image + // +optional + DefaultImageRegistry string `json:"defaultImageRegistry,omitempty"` + + // TokenCaCert is the certificate authority the Loft tokens will + // be signed with + // +optional + TokenCaCert []byte `json:"tokenCaCert,omitempty"` + + // LoftHost defines the host for the agent's loft instance + // +optional + LoftHost string `json:"loftHost,omitempty"` + + // AnalyticsSpec holds info needed for the agent to send analytics data to the analytics backend. + AnalyticsSpec AgentAnalyticsSpec `json:"analyticsSpec"` +} + +// AgentLoftAccess holds the config how the agent can reach loft +type AgentLoftAccess struct { + // Cluster is the name of the cluster the agent is running in + // +optional + Cluster string `json:"cluster,omitempty"` + + // LoftAPIHost defines the host for the loft api. If empty, Loft will + // create an ssh tunnel to the agent pod. + // +optional + LoftAPIHost string `json:"loftAPIHost,omitempty"` + + // LoftAPIKey defines the api key the agent should use to connect to the + // loft api server. + // +optional + LoftAPIKey string `json:"loftAPIKey,omitempty"` +} + +type AgentAuditConfig struct { + // If audit is enabled and incoming api requests will be logged based on the supplied policy. + // +optional + Enabled bool `json:"enabled,omitempty"` + + // If true, the agent will not send back any audit logs to Loft itself. + // +optional + DisableAgentSyncBack bool `json:"disableAgentSyncBack,omitempty"` + + // Level is an optional log level for audit logs. Cannot be used together with policy + // +optional + Level int `json:"level,omitempty"` + + // The audit policy to use and log requests. By default loft will not log anything + // +optional + Policy AuditPolicy `json:"policy,omitempty"` + + // The path where to save the audit log files. This is required if audit is enabled. Backup log files will + // be retained in the same directory. + // +optional + Path string `json:"path,omitempty"` + + // MaxAge is the maximum number of days to retain old log files based on the + // timestamp encoded in their filename. Note that a day is defined as 24 + // hours and may not exactly correspond to calendar days due to daylight + // savings, leap seconds, etc. The default is not to remove old log files + // based on age. + // +optional + MaxAge int `json:"maxAge,omitempty"` + + // MaxBackups is the maximum number of old log files to retain. The default + // is to retain all old log files (though MaxAge may still cause them to get + // deleted.) + // +optional + MaxBackups int `json:"maxBackups,omitempty"` + + // MaxSize is the maximum size in megabytes of the log file before it gets + // rotated. It defaults to 100 megabytes. + // +optional + MaxSize int `json:"maxSize,omitempty"` + + // Compress determines if the rotated log files should be compressed + // using gzip. The default is not to perform compression. + // +optional + Compress bool `json:"compress,omitempty"` +} + +// AgentAnalyticsSpec holds info the agent can use to send analytics data to the analytics backend. +type AgentAnalyticsSpec struct { + AnalyticsEndpoint string `json:"analyticsEndpoint,omitempty"` + InstanceTokenAuth *server.InstanceTokenAuth `json:"instanceTokenAuth,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_charts_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_charts_types.go new file mode 100644 index 000000000..28013a13b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_charts_types.go @@ -0,0 +1,22 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ClusterCharts struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Holds the available helm charts for this cluster + Charts []storagev1.HelmChart `json:"charts"` + + // Busy will indicate if the chart parsing is still + // in progress. + // +optional + Busy bool `json:"busy,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_connect_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_connect_types.go new file mode 100644 index 000000000..660427620 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_connect_types.go @@ -0,0 +1,44 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterConnect holds the information +// +k8s:openapi-gen=true +// +resource:path=clusterconnect,rest=ClusterConnectREST +type ClusterConnect struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterConnectSpec `json:"spec,omitempty"` + Status ClusterConnectStatus `json:"status,omitempty"` +} + +type ClusterConnectSpec struct { + // the kube config used to connect the cluster + // +optional + Config string `json:"config,omitempty"` + + // The user to create an admin account for + // +optional + AdminUser string `json:"adminUser,omitempty"` + + // the cluster template to create + ClusterTemplate Cluster `json:"clusterTemplate,omitempty"` +} + +type ClusterConnectStatus struct { + // +optional + Failed bool `json:"failed,omitempty"` + + // +optional + Reason string `json:"reason,omitempty"` + + // +optional + Message string `json:"message,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_domain_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_domain_types.go new file mode 100644 index 000000000..999485c5c --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_domain_types.go @@ -0,0 +1,19 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ClusterDomain struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // +optional + Target string `json:"target,omitempty"` + + // +optional + Domain string `json:"domain,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_memberaccess_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_memberaccess_types.go new file mode 100644 index 000000000..dc0f9981f --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_memberaccess_types.go @@ -0,0 +1,19 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ClusterMemberAccess struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Teams holds all the teams that the current user has access to the cluster + Teams []ClusterMember `json:"teams,omitempty"` + + // Users holds all the users that the current user has access to the cluster + Users []ClusterMember `json:"users,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_members_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_members_types.go new file mode 100644 index 000000000..76dbe289d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_members_types.go @@ -0,0 +1,26 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ClusterMembers struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Teams holds all the teams that have access to the cluster + Teams []ClusterMember `json:"teams,omitempty"` + + // Users holds all the users that have access to the cluster + Users []ClusterMember `json:"users,omitempty"` +} + +type ClusterMember struct { + // Info about the user or team + // +optional + Info clusterv1.EntityInfo `json:"info,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_reset_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_reset_types.go new file mode 100644 index 000000000..cbf930622 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_reset_types.go @@ -0,0 +1,19 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ClusterReset struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // +optional + Agent bool `json:"agent,omitempty"` + + // +optional + RBAC bool `json:"rbac,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_types.go new file mode 100644 index 000000000..0f780cded --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_types.go @@ -0,0 +1,58 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +genclient:method=ListAccess,verb=get,subresource=memberaccess,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ClusterMemberAccess +// +genclient:method=ListMembers,verb=get,subresource=members,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ClusterMembers +// +genclient:method=ListVirtualClusterDefaults,verb=get,subresource=virtualclusterdefaults,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ClusterVirtualClusterDefaults +// +genclient:method=GetAgentConfig,verb=get,subresource=agentconfig,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ClusterAgentConfig +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Cluster holds the cluster information +// +k8s:openapi-gen=true +// +resource:path=clusters,rest=ClusterREST +// +subresource:request=ClusterMemberAccess,path=memberaccess,kind=ClusterMemberAccess,rest=ClusterMemberAccessREST +// +subresource:request=ClusterReset,path=reset,kind=ClusterReset,rest=ClusterResetREST +// +subresource:request=ClusterDomain,path=domain,kind=ClusterDomain,rest=ClusterDomainREST +// +subresource:request=ClusterMembers,path=members,kind=ClusterMembers,rest=ClusterMembersREST +// +subresource:request=ClusterCharts,path=charts,kind=ClusterCharts,rest=ClusterChartsREST +// +subresource:request=ClusterVirtualClusterDefaults,path=virtualclusterdefaults,kind=ClusterVirtualClusterDefaults,rest=ClusterVirtualClusterDefaultsREST +// +subresource:request=ClusterAgentConfig,path=agentconfig,kind=ClusterAgentConfig,rest=ClusterAgentConfigREST +type Cluster struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterSpec `json:"spec,omitempty"` + Status ClusterStatus `json:"status,omitempty"` +} + +// ClusterSpec holds the specification +type ClusterSpec struct { + storagev1.ClusterSpec `json:",inline"` +} + +// ClusterStatus holds the status +type ClusterStatus struct { + storagev1.ClusterStatus `json:",inline"` +} + +func (a *Cluster) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *Cluster) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *Cluster) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *Cluster) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_virtualclusterdefaults_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_virtualclusterdefaults_types.go new file mode 100644 index 000000000..d9018e8d8 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/cluster_virtualclusterdefaults_types.go @@ -0,0 +1,31 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ClusterVirtualClusterDefaults struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // DefaultTemplate is the default virtual cluster template + // +optional + DefaultTemplate *storagev1.VirtualClusterTemplate `json:"defaultTemplate,omitempty"` + + // LatestVersion is the latest virtual cluster version + // +optional + LatestVersion string `json:"latestVersion,omitempty"` + + // Default values for the virtual cluster chart + // +optional + Values string `json:"values,omitempty"` + + // Warning should be somehow shown to the user when + // there is a problem retrieving the defaults + // +optional + Warning string `json:"warning,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/clusteraccess_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/clusteraccess_types.go new file mode 100644 index 000000000..901d9df51 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/clusteraccess_types.go @@ -0,0 +1,60 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterAccess holds the globalClusterAccess information +// +k8s:openapi-gen=true +// +resource:path=clusteraccesses,rest=ClusterAccessREST +type ClusterAccess struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterAccessSpec `json:"spec,omitempty"` + Status ClusterAccessStatus `json:"status,omitempty"` +} + +// ClusterAccessSpec holds the specification +type ClusterAccessSpec struct { + storagev1.ClusterAccessSpec `json:",inline"` +} + +// ClusterAccessStatus holds the status +type ClusterAccessStatus struct { + storagev1.ClusterAccessStatus `json:",inline"` + + // +optional + Clusters []*clusterv1.EntityInfo `json:"clusters,omitempty"` + + // +optional + Users []*clusterv1.UserOrTeam `json:"users,omitempty"` + + // +optional + Teams []*clusterv1.EntityInfo `json:"teams,omitempty"` + + // +optional + SpaceConstraint *clusterv1.EntityInfo `json:"spaceConstraint,omitempty"` +} + +func (a *ClusterAccess) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *ClusterAccess) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *ClusterAccess) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *ClusterAccess) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/clusterroletemplate_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/clusterroletemplate_types.go new file mode 100644 index 000000000..0815814a1 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/clusterroletemplate_types.go @@ -0,0 +1,51 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterRoleTemplate holds the clusterRoleTemplate information +// +k8s:openapi-gen=true +// +resource:path=clusterroletemplates,rest=ClusterRoleTemplateREST +type ClusterRoleTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterRoleTemplateSpec `json:"spec,omitempty"` + Status ClusterRoleTemplateStatus `json:"status,omitempty"` +} + +// ClusterRoleTemplateSpec holds the specification +type ClusterRoleTemplateSpec struct { + storagev1.ClusterRoleTemplateSpec `json:",inline"` +} + +// ClusterRoleTemplateStatus holds the status +type ClusterRoleTemplateStatus struct { + storagev1.ClusterRoleTemplateStatus `json:",inline"` + + // +optional + Clusters []*clusterv1.EntityInfo `json:"clusters,omitempty"` +} + +func (a *ClusterRoleTemplate) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *ClusterRoleTemplate) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *ClusterRoleTemplate) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *ClusterRoleTemplate) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/config_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/config_types.go new file mode 100644 index 000000000..80e0c0172 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/config_types.go @@ -0,0 +1,706 @@ +package v1 + +import ( + auditv1 "github.com/loft-sh/api/v3/pkg/apis/audit/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + uiv1 "github.com/loft-sh/api/v3/pkg/apis/ui/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Config holds the loft configuration +// +k8s:openapi-gen=true +// +resource:path=configs,rest=ConfigREST +type Config struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ConfigSpec `json:"spec,omitempty"` + Status ConfigStatus `json:"status,omitempty"` +} + +// ConfigSpec holds the specification +type ConfigSpec struct { + // Raw holds the raw config + // +optional + Raw []byte `json:"raw,omitempty"` +} + +// ConfigStatus holds the status, which is the parsed raw config +type ConfigStatus struct { + // Authentication holds the information for authentication + // +optional + Authentication Authentication `json:"auth,omitempty"` + + // OIDC holds oidc provider relevant information + // +optional + OIDC *OIDC `json:"oidc,omitempty"` + + // Apps holds configuration around apps + // +optional + Apps *Apps `json:"apps,omitempty"` + + // Audit holds audit configuration + // +optional + Audit *Audit `json:"audit,omitempty"` + + // LoftHost holds the domain where the loft instance is hosted. This should not include https or http. E.g. loft.my-domain.com + // +optional + LoftHost string `json:"loftHost,omitempty"` + + // DevPodSubDomain holds a subdomain in the following form *.workspace.my-domain.com + // +optional + DevPodSubDomain string `json:"devPodSubDomain,omitempty"` + + // UISettings holds the settings for modifying the Loft user interface + // +optional + UISettings *uiv1.UISettingsConfig `json:"uiSettings,omitempty"` + + // VaultIntegration holds the vault integration configuration + // +optional + VaultIntegration *storagev1.VaultIntegrationSpec `json:"vault,omitempty"` +} + +// Audit holds the audit configuration options for loft. Changing any options will require a loft restart +// to take effect. +type Audit struct { + // If audit is enabled and incoming api requests will be logged based on the supplied policy. + // +optional + Enabled bool `json:"enabled,omitempty"` + + // If true, the agent will not send back any audit logs to Loft itself. + // +optional + DisableAgentSyncBack bool `json:"disableAgentSyncBack,omitempty"` + + // Level is an optional log level for audit logs. Cannot be used together with policy + // +optional + Level int `json:"level,omitempty"` + + // The audit policy to use and log requests. By default loft will not log anything + // +optional + Policy AuditPolicy `json:"policy,omitempty"` + + // DataStoreEndpoint is an endpoint to store events in. + // +optional + DataStoreEndpoint string `json:"dataStoreEndpoint,omitempty"` + + // DataStoreMaxAge is the maximum number of hours to retain old log events in the datastore + // +optional + DataStoreMaxAge *int `json:"dataStoreTTL,omitempty"` + + // The path where to save the audit log files. This is required if audit is enabled. Backup log files will + // be retained in the same directory. + // +optional + Path string `json:"path,omitempty"` + + // MaxAge is the maximum number of days to retain old log files based on the + // timestamp encoded in their filename. Note that a day is defined as 24 + // hours and may not exactly correspond to calendar days due to daylight + // savings, leap seconds, etc. The default is not to remove old log files + // based on age. + // +optional + MaxAge int `json:"maxAge,omitempty"` + + // MaxBackups is the maximum number of old log files to retain. The default + // is to retain all old log files (though MaxAge may still cause them to get + // deleted.) + // +optional + MaxBackups int `json:"maxBackups,omitempty"` + + // MaxSize is the maximum size in megabytes of the log file before it gets + // rotated. It defaults to 100 megabytes. + // +optional + MaxSize int `json:"maxSize,omitempty"` + + // Compress determines if the rotated log files should be compressed + // using gzip. The default is not to perform compression. + // +optional + Compress bool `json:"compress,omitempty"` +} + +// AuditPolicy describes the audit policy to use for loft +type AuditPolicy struct { + // Rules specify the audit Level a request should be recorded at. + // A request may match multiple rules, in which case the FIRST matching rule is used. + // The default audit level is None, but can be overridden by a catch-all rule at the end of the list. + // PolicyRules are strictly ordered. + Rules []AuditPolicyRule `json:"rules,omitempty"` + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified per rule in which case the union of both are omitted. + // +optional + OmitStages []auditv1.Stage `json:"omitStages,omitempty"` +} + +// AuditPolicyRule describes a policy for auditing +type AuditPolicyRule struct { + // The Level that requests matching this rule are recorded at. + Level auditv1.Level `json:"level"` + + // The users (by authenticated user name) this rule applies to. + // An empty list implies every user. + // +optional + Users []string `json:"users,omitempty"` + // The user groups this rule applies to. A user is considered matching + // if it is a member of any of the UserGroups. + // An empty list implies every user group. + // +optional + UserGroups []string `json:"userGroups,omitempty"` + + // The verbs that match this rule. + // An empty list implies every verb. + // +optional + Verbs []string `json:"verbs,omitempty"` + + // Rules can apply to API resources (such as "pods" or "secrets"), + // non-resource URL paths (such as "/api"), or neither, but not both. + // If neither is specified, the rule is treated as a default for all URLs. + + // Resources that this rule matches. An empty list implies all kinds in all API groups. + // +optional + Resources []GroupResources `json:"resources,omitempty"` + // Namespaces that this rule matches. + // The empty string "" matches non-namespaced resources. + // An empty list implies every namespace. + // +optional + Namespaces []string `json:"namespaces,omitempty"` + + // NonResourceURLs is a set of URL paths that should be audited. + // *s are allowed, but only as the full, final step in the path. + // Examples: + // "/metrics" - Log requests for apiserver metrics + // "/healthz*" - Log all health checks + // +optional + NonResourceURLs []string `json:"nonResourceURLs,omitempty"` + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified policy wide in which case the union of both are omitted. + // An empty list means no restrictions will apply. + // +optional + OmitStages []auditv1.Stage `json:"omitStages,omitempty" protobuf:"bytes,8,rep,name=omitStages"` + + // RequestTargets is a list of request targets for which events are created. + // An empty list implies every request. + // +optional + RequestTargets []auditv1.RequestTarget `json:"requestTargets,omitempty"` + + // Clusters that this rule matches. Only applies to cluster requests. + // If this is set, no events for non cluster requests will be created. + // An empty list means no restrictions will apply. + // +optional + Clusters []string `json:"clusters,omitempty"` +} + +// GroupResources represents resource kinds in an API group. +type GroupResources struct { + // Group is the name of the API group that contains the resources. + // The empty string represents the core API group. + // +optional + Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. + // +optional + Resources []string `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"` + // ResourceNames is a list of resource instance names that the policy matches. + // Using this field requires Resources to be specified. + // An empty list implies that every instance of the resource is matched. + // +optional + ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,3,rep,name=resourceNames"` +} + +// Apps holds configuration for apps that should be shown +type Apps struct { + // If this option is true, loft will not try to parse the default apps + // +optional + NoDefault bool `json:"noDefault,omitempty"` + + // These are additional repositories that are parsed by loft + // +optional + Repositories []storagev1.HelmChartRepository `json:"repositories,omitempty"` + + // Predefined apps that can be selected in the Spaces > Space menu + // +optional + PredefinedApps []PredefinedApp `json:"predefinedApps,omitempty"` +} + +// PredefinedApp holds information about a predefined app +type PredefinedApp struct { + // Chart holds the repo/chart name of the predefined app + // +optional + Chart string `json:"chart"` + + // InitialVersion holds the initial version of this app. + // This version will be selected automatically. + // +optional + InitialVersion string `json:"initialVersion,omitempty"` + + // InitialValues holds the initial values for this app. + // The values will be prefilled automatically. There are certain + // placeholders that can be used within the values that are replaced + // by the loft UI automatically. + // +optional + InitialValues string `json:"initialValues,omitempty"` + + // Holds the cluster names where to display this app + // +optional + Clusters []string `json:"clusters,omitempty"` + + // Title is the name that should be displayed for the predefined app. + // If empty the chart name is used. + // +optional + Title string `json:"title,omitempty"` + + // IconURL specifies an url to the icon that should be displayed for this app. + // If none is specified the icon from the chart metadata is used. + // +optional + IconURL string `json:"iconUrl,omitempty"` + + // ReadmeURL specifies an url to the readme page of this predefined app. If empty + // an url will be constructed to artifact hub. + // +optional + ReadmeURL string `json:"readmeUrl,omitempty"` +} + +// OIDC holds oidc provider relevant information +type OIDC struct { + // If true indicates that loft will act as an OIDC server + Enabled bool `json:"enabled,omitempty"` + + // If true indicates that loft will allow wildcard '*' in client redirectURIs + WildcardRedirect bool `json:"wildcardRedirect,omitempty"` + + // The clients that are allowed to request loft tokens + Clients []OIDCClient `json:"clients,omitempty"` +} + +// OIDCClient holds information about a client +type OIDCClient struct { + // The client name + Name string `json:"name,omitempty"` + + // The client id of the client + ClientID string `json:"clientId,omitempty"` + + // The client secret of the client + ClientSecret string `json:"clientSecret,omitempty"` + + // A registered set of redirect URIs. When redirecting from dex to the client, the URI + // requested to redirect to MUST match one of these values, unless the client is "public". + RedirectURIs []string `json:"redirectURIs"` +} + +// Authentication holds authentication relevant information +type Authentication struct { + Connector `json:",inline"` + + // Password holds password authentication relevant information + // +optional + Password *AuthenticationPassword `json:"password,omitempty"` + + // Connectors are optional additional connectors for Loft. + // +optional + Connectors []ConnectorWithName `json:"connectors,omitempty"` + + // Prevents from team creation for the new groups associated with the user at the time of logging in through sso, + // Default behaviour is false, this means that teams will be created for new groups. + // +optional + DisableTeamCreation bool `json:"disableTeamCreation,omitempty"` + + // AccessKeyMaxTTLSeconds is the global maximum lifespan of an accesskey in seconds. + // Leaving it 0 or unspecified will disable it. + // Specifying 2592000 will mean all keys have a Time-To-Live of 30 days. + // +optional + AccessKeyMaxTTLSeconds int64 `json:"accessKeyMaxTTLSeconds,omitempty"` + + // LoginAccessKeyTTLSeconds is the time in seconds an access key is kept + // until it is deleted. + // Leaving it unspecified will default to 20 days. + // Setting it to zero will disable the ttl. + // Specifying 2592000 will mean all keys have a default Time-To-Live of 30 days. + // +optional + LoginAccessKeyTTLSeconds *int64 `json:"loginAccessKeyTTLSeconds,omitempty"` + + // CustomHttpHeaders are additional headers that should be set for the authentication endpoints + // +optional + CustomHttpHeaders map[string]string `json:"customHttpHeaders,omitempty"` +} + +type ConnectorWithName struct { + // ID is the id that should show up in the url + // +optional + ID string `json:"id,omitempty"` + + // DisplayName is the name that should show up in the ui + // +optional + DisplayName string `json:"displayName,omitempty"` + + Connector `json:",inline"` +} + +type Connector struct { + // OIDC holds oidc authentication configuration + // +optional + OIDC *AuthenticationOIDC `json:"oidc,omitempty"` + + // Github holds github authentication configuration + // +optional + Github *AuthenticationGithub `json:"github,omitempty"` + + // Gitlab holds gitlab authentication configuration + // +optional + Gitlab *AuthenticationGitlab `json:"gitlab,omitempty"` + + // Google holds google authentication configuration + // +optional + Google *AuthenticationGoogle `json:"google,omitempty"` + + // Microsoft holds microsoft authentication configuration + // +optional + Microsoft *AuthenticationMicrosoft `json:"microsoft,omitempty"` + + // SAML holds saml authentication configuration + // +optional + SAML *AuthenticationSAML `json:"saml,omitempty"` +} + +type AuthenticationSAML struct { + // If the response assertion status value contains a Destination element, it + // must match this value exactly. + // Usually looks like https://your-loft-domain/auth/saml/callback + RedirectURI string `json:"redirectURI,omitempty"` + // SSO URL used for POST value. + SSOURL string `json:"ssoURL,omitempty"` + // CAData is a base64 encoded string that holds the ca certificate for validating the signature of the SAML response. + // Either CAData, CA or InsecureSkipSignatureValidation needs to be defined. + // +optional + CAData []byte `json:"caData,omitempty"` + + // Name of attribute in the returned assertions to map to username + UsernameAttr string `json:"usernameAttr,omitempty"` + // Name of attribute in the returned assertions to map to email + EmailAttr string `json:"emailAttr,omitempty"` + // Name of attribute in the returned assertions to map to groups + // +optional + GroupsAttr string `json:"groupsAttr,omitempty"` + + // CA to use when validating the signature of the SAML response. + // +optional + CA string `json:"ca,omitempty"` + // Ignore the ca cert + // +optional + InsecureSkipSignatureValidation bool `json:"insecureSkipSignatureValidation,omitempty"` + + // When provided Loft will include this as the Issuer value during AuthnRequest. + // It will also override the redirectURI as the required audience when evaluating + // AudienceRestriction elements in the response. + // +optional + EntityIssuer string `json:"entityIssuer,omitempty"` + // Issuer value expected in the SAML response. Optional. + // +optional + SSOIssuer string `json:"ssoIssuer,omitempty"` + + // If GroupsDelim is supplied the connector assumes groups are returned as a + // single string instead of multiple attribute values. This delimiter will be + // used split the groups string. + // +optional + GroupsDelim string `json:"groupsDelim,omitempty"` + // List of groups to filter access based on membership + // +optional + AllowedGroups []string `json:"allowedGroups,omitempty"` + // If used with allowed groups, only forwards the allowed groups and not all + // groups specified. + // +optional + FilterGroups bool `json:"filterGroups,omitempty"` + + // Requested format of the NameID. The NameID value is is mapped to the ID Token + // 'sub' claim. + // + // This can be an abbreviated form of the full URI with just the last component. For + // example, if this value is set to "emailAddress" the format will resolve to: + // + // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + // + // If no value is specified, this value defaults to: + // + // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + // + // +optional + NameIDPolicyFormat string `json:"nameIDPolicyFormat,omitempty"` +} + +type AuthenticationPassword struct { + // If true login via password is disabled + Disabled bool `json:"disabled,omitempty"` +} + +type AuthenticationMicrosoft struct { + // Microsoft client id + ClientID string `json:"clientId"` + + // Microsoft client secret + ClientSecret string `json:"clientSecret"` + + // loft redirect uri. Usually https://loft.my.domain/auth/microsoft/callback + RedirectURI string `json:"redirectURI"` + + // tenant configuration parameter controls what kinds of accounts may be authenticated in loft. + // By default, all types of Microsoft accounts (consumers and organizations) can authenticate in loft via Microsoft. + // To change this, set the tenant parameter to one of the following: + // + // common - both personal and business/school accounts can authenticate in loft via Microsoft (default) + // consumers - only personal accounts can authenticate in loft + // organizations - only business/school accounts can authenticate in loft + // tenant uuid or tenant name - only accounts belonging to specific tenant identified by either tenant uuid or tenant name can authenticate in loft + // +optional + Tenant string `json:"tenant,omitempty"` + + // It is possible to require a user to be a member of a particular group in order to be successfully authenticated in loft. + // +optional + Groups []string `json:"groups,omitempty"` + + // configuration option restricts the list to include only security groups. By default all groups (security, Office 365, mailing lists) are included. + // +optional + OnlySecurityGroups bool `json:"onlySecurityGroups,omitempty"` + + // Restrict the groups claims to include only the user’s groups that are in the configured groups + // +optional + UseGroupsAsWhitelist bool `json:"useGroupsAsWhitelist,omitempty"` + + AuthenticationClusterAccountTemplates `json:",inline"` +} + +type AuthenticationGoogle struct { + // Google client id + ClientID string `json:"clientId"` + + // Google client secret + ClientSecret string `json:"clientSecret"` + + // loft redirect uri. E.g. https://loft.my.domain/auth/google/callback + RedirectURI string `json:"redirectURI"` + + // defaults to "profile" and "email" + // +optional + Scopes []string `json:"scopes,omitempty"` + + // Optional list of whitelisted domains + // If this field is nonempty, only users from a listed domain will be allowed to log in + // +optional + HostedDomains []string `json:"hostedDomains,omitempty"` + + // Optional list of whitelisted groups + // If this field is nonempty, only users from a listed group will be allowed to log in + // +optional + Groups []string `json:"groups,omitempty"` + + // Optional path to service account json + // If nonempty, and groups claim is made, will use authentication from file to + // check groups with the admin directory api + // +optional + ServiceAccountFilePath string `json:"serviceAccountFilePath,omitempty"` + + // Required if ServiceAccountFilePath + // The email of a GSuite super user which the service account will impersonate + // when listing groups + // +optional + AdminEmail string `json:"adminEmail,omitempty"` + + AuthenticationClusterAccountTemplates `json:",inline"` +} + +type AuthenticationGitlab struct { + // Gitlab client id + ClientID string `json:"clientId"` + + // Gitlab client secret + ClientSecret string `json:"clientSecret"` + + // Redirect URI + RedirectURI string `json:"redirectURI"` + + // BaseURL is optional, default = https://gitlab.com + // +optional + BaseURL string `json:"baseURL,omitempty"` + + // Optional groups whitelist, communicated through the "groups" scope. + // If `groups` is omitted, all of the user's GitLab groups are returned. + // If `groups` is provided, this acts as a whitelist - only the user's GitLab groups that are in the configured `groups` below will go into the groups claim. Conversely, if the user is not in any of the configured `groups`, the user will not be authenticated. + // +optional + Groups []string `json:"groups,omitempty"` + + AuthenticationClusterAccountTemplates `json:",inline"` +} + +type AuthenticationGithub struct { + // ClientID holds the github client id + ClientID string `json:"clientId,omitempty"` + + // ClientID holds the github client secret + ClientSecret string `json:"clientSecret"` + + // RedirectURI holds the redirect URI. Should be https://loft.domain.tld/auth/github/callback + RedirectURI string `json:"redirectURI"` + + // Loft queries the following organizations for group information. + // Group claims are formatted as "(org):(team)". + // For example if a user is part of the "engineering" team of the "coreos" + // org, the group claim would include "coreos:engineering". + // + // If orgs are specified in the config then user MUST be a member of at least one of the specified orgs to + // authenticate with loft. + // +optional + Orgs []AuthenticationGithubOrg `json:"orgs,omitempty"` + + // Required ONLY for GitHub Enterprise. + // This is the Hostname of the GitHub Enterprise account listed on the + // management console. Ensure this domain is routable on your network. + // +optional + HostName string `json:"hostName,omitempty"` + + // ONLY for GitHub Enterprise. Optional field. + // Used to support self-signed or untrusted CA root certificates. + // +optional + RootCA string `json:"rootCA,omitempty"` + + AuthenticationClusterAccountTemplates `json:",inline"` +} + +// AuthenticationGithubOrg holds org-team filters, in which teams are optional. +type AuthenticationGithubOrg struct { + // Organization name in github (not slug, full name). Only users in this github + // organization can authenticate. + // +optional + Name string `json:"name"` + + // Names of teams in a github organization. A user will be able to + // authenticate if they are members of at least one of these teams. Users + // in the organization can authenticate if this field is omitted from the + // config file. + // +optional + Teams []string `json:"teams,omitempty"` +} + +type AuthenticationOIDC struct { + // IssuerURL is the URL the provider signs ID Tokens as. This will be the "iss" + // field of all tokens produced by the provider and is used for configuration + // discovery. + // + // The URL is usually the provider's URL without a path, for example + // "https://accounts.google.com" or "https://login.salesforce.com". + // + // The provider must implement configuration discovery. + // See: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig + IssuerURL string `json:"issuerUrl,omitempty"` + + // ClientID the JWT must be issued for, the "sub" field. This plugin only trusts a single + // client to ensure the plugin can be used with public providers. + // + // The plugin supports the "authorized party" OpenID Connect claim, which allows + // specialized providers to issue tokens to a client for a different client. + // See: https://openid.net/specs/openid-connect-core-1_0.html#IDToken + ClientID string `json:"clientId,omitempty"` + + // ClientSecret to issue tokens from the OIDC provider + ClientSecret string `json:"clientSecret,omitempty"` + + // loft redirect uri. E.g. https://loft.my.domain/auth/oidc/callback + RedirectURI string `json:"redirectURI,omitempty"` + + // Loft URI to be redirected to after successful logout by OIDC Provider + // +optional + PostLogoutRedirectURI string `json:"postLogoutRedirectURI,omitempty"` + + // Path to a PEM encoded root certificate of the provider. Optional + // +optional + CAFile string `json:"caFile,omitempty"` + + // Specify whether to communicate without validating SSL certificates + // +optional + InsecureCA bool `json:"insecureCa,omitempty"` + + // Configurable key which contains the preferred username claims + // +optional + PreferredUsernameClaim string `json:"preferredUsername,omitempty"` + + // LoftUsernameClaim is the JWT field to use as the user's username. + // +optional + LoftUsernameClaim string `json:"loftUsernameClaim,omitempty"` + + // UsernameClaim is the JWT field to use as the user's id. + // +optional + UsernameClaim string `json:"usernameClaim,omitempty"` + + // EmailClaim is the JWT field to use as the user's email. + // +optional + EmailClaim string `json:"emailClaim,omitempty"` + + // UsernamePrefix, if specified, causes claims mapping to username to be prefix with + // the provided value. A value "oidc:" would result in usernames like "oidc:john". + // +optional + UsernamePrefix string `json:"usernamePrefix,omitempty"` + + // GroupsClaim, if specified, causes the OIDCAuthenticator to try to populate the user's + // groups with an ID Token field. If the GroupsClaim field is present in an ID Token the value + // must be a string or list of strings. + // +optional + GroupsClaim string `json:"groupsClaim,omitempty"` + + // If required groups is non empty, access is denied if the user is not part of at least one + // of the specified groups. + // +optional + Groups []string `json:"groups,omitempty"` + + // Scopes that should be sent to the server. If empty, defaults to "email" and "profile". + // +optional + Scopes []string `json:"scopes,omitempty"` + + // GetUserInfo, if specified, tells the OIDCAuthenticator to try to populate the user's + // information from the UserInfo. + // +optional + GetUserInfo bool `json:"getUserInfo,omitempty"` + + // GroupsPrefix, if specified, causes claims mapping to group names to be prefixed with the + // value. A value "oidc:" would result in groups like "oidc:engineering" and "oidc:marketing". + // +optional + GroupsPrefix string `json:"groupsPrefix,omitempty"` + + // Type of the OIDC to show in the UI. Only for displaying purposes + // +optional + Type string `json:"type,omitempty"` + + AuthenticationClusterAccountTemplates `json:",inline"` +} + +type AuthenticationClusterAccountTemplates struct { + // Cluster Account Templates that will be applied for users logging in through this authentication + // +optional + ClusterAccountTemplates []storagev1.UserClusterAccountTemplate `json:"clusterAccountTemplates,omitempty"` + + // A mapping between groups and cluster account templates. If the user has a certain group, the cluster + // account template will be added during creation + // +optional + GroupClusterAccountTemplates []AuthenticationGroupClusterAccountTemplate `json:"groupClusterAccountTemplates,omitempty"` +} + +type AuthenticationGroupClusterAccountTemplate struct { + // Group is the name of the group that should be matched + Group string `json:"group"` + + // Cluster Account Templates that will be applied for users logging in through this authentication + // +optional + ClusterAccountTemplates []storagev1.UserClusterAccountTemplate `json:"clusterAccountTemplates,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_delete_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_delete_types.go new file mode 100644 index 000000000..3c60b2302 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_delete_types.go @@ -0,0 +1,13 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type DevPodWorkspaceInstanceDelete struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_getstatus_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_getstatus_types.go new file mode 100644 index 000000000..69218ff2a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_getstatus_types.go @@ -0,0 +1,13 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type DevPodWorkspaceInstanceGetStatus struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_ssh_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_ssh_types.go new file mode 100644 index 000000000..ce5236f87 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_ssh_types.go @@ -0,0 +1,13 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type DevPodWorkspaceInstanceSsh struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_stop_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_stop_types.go new file mode 100644 index 000000000..205bfac86 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_stop_types.go @@ -0,0 +1,13 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type DevPodWorkspaceInstanceStop struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_types.go new file mode 100644 index 000000000..319f912fc --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_types.go @@ -0,0 +1,67 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevPodWorkspaceInstance holds the DevPodWorkspaceInstance information +// +k8s:openapi-gen=true +// +resource:path=devpodworkspaceinstances,rest=DevPodWorkspaceInstanceREST +// +subresource:request=DevPodWorkspaceInstanceUp,path=up,kind=DevPodWorkspaceInstanceUp,rest=DevPodWorkspaceInstanceUpREST +// +subresource:request=DevPodWorkspaceInstanceDelete,path=delete,kind=DevPodWorkspaceInstanceDelete,rest=DevPodWorkspaceInstanceDeleteREST +// +subresource:request=DevPodWorkspaceInstanceSsh,path=ssh,kind=DevPodWorkspaceInstanceSsh,rest=DevPodWorkspaceInstanceSshREST +// +subresource:request=DevPodWorkspaceInstanceStop,path=stop,kind=DevPodWorkspaceInstanceStop,rest=DevPodWorkspaceInstanceStopREST +// +subresource:request=DevPodWorkspaceInstanceGetStatus,path=getstatus,kind=DevPodWorkspaceInstanceGetStatus,rest=DevPodWorkspaceInstanceGetStatusREST +type DevPodWorkspaceInstance struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DevPodWorkspaceInstanceSpec `json:"spec,omitempty"` + Status DevPodWorkspaceInstanceStatus `json:"status,omitempty"` +} + +// DevPodWorkspaceInstanceSpec holds the specification +type DevPodWorkspaceInstanceSpec struct { + storagev1.DevPodWorkspaceInstanceSpec `json:",inline"` +} + +// DevPodWorkspaceInstanceStatus holds the status +type DevPodWorkspaceInstanceStatus struct { + storagev1.DevPodWorkspaceInstanceStatus `json:",inline"` + + // SleepModeConfig is the sleep mode config of the workspace. This will only be shown + // in the front end. + // +optional + SleepModeConfig *clusterv1.SleepModeConfig `json:"sleepModeConfig,omitempty"` +} + +func (a *DevPodWorkspaceInstance) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *DevPodWorkspaceInstance) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *DevPodWorkspaceInstance) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *DevPodWorkspaceInstance) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *DevPodWorkspaceInstance) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *DevPodWorkspaceInstance) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_up_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_up_types.go new file mode 100644 index 000000000..51cd72c83 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspaceinstance_up_types.go @@ -0,0 +1,13 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type DevPodWorkspaceInstanceUp struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspacetemplate_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspacetemplate_types.go new file mode 100644 index 000000000..31ff9d0d6 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/devpodworkspacetemplate_types.go @@ -0,0 +1,57 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevPodWorkspaceTemplate holds the information +// +k8s:openapi-gen=true +// +resource:path=devpodworkspacetemplates,rest=DevPodWorkspaceTemplateREST +type DevPodWorkspaceTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DevPodWorkspaceTemplateSpec `json:"spec,omitempty"` + Status DevPodWorkspaceTemplateStatus `json:"status,omitempty"` +} + +// DevPodWorkspaceTemplateSpec holds the specification +type DevPodWorkspaceTemplateSpec struct { + storagev1.DevPodWorkspaceTemplateSpec `json:",inline"` +} + +// DevPodWorkspaceTemplateStatus holds the status +type DevPodWorkspaceTemplateStatus struct { + storagev1.DevPodWorkspaceTemplateStatus `json:",inline"` +} + +func (a *DevPodWorkspaceTemplate) GetVersions() []storagev1.VersionAccessor { + var retVersions []storagev1.VersionAccessor + for _, v := range a.Spec.Versions { + b := v + retVersions = append(retVersions, &b) + } + + return retVersions +} + +func (a *DevPodWorkspaceTemplate) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *DevPodWorkspaceTemplate) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *DevPodWorkspaceTemplate) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *DevPodWorkspaceTemplate) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/directclusterendpointtokens_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/directclusterendpointtokens_types.go new file mode 100644 index 000000000..b74b339d7 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/directclusterendpointtokens_types.go @@ -0,0 +1,40 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// LEGACY: Please use access keys + direct cluster endpoint + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DirectClusterEndpointToken holds the object information +// +k8s:openapi-gen=true +// +resource:path=directclusterendpointtokens,rest=DirectClusterEndpointTokenREST +type DirectClusterEndpointToken struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DirectClusterEndpointTokenSpec `json:"spec,omitempty"` + Status DirectClusterEndpointTokenStatus `json:"status,omitempty"` +} + +// DirectClusterEndpointTokenSpec holds the object specification +type DirectClusterEndpointTokenSpec struct { + // The time to life for this access token in seconds + // +optional + TTL int64 `json:"ttl,omitempty"` + + // Scope is the optional scope of the direct cluster endpoint + // +optional + Scope *storagev1.AccessKeyScope `json:"scope,omitempty"` +} + +// DirectClusterEndpointTokenStatus holds the object status +type DirectClusterEndpointTokenStatus struct { + // +optional + Token string `json:"token,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/doc.go new file mode 100644 index 000000000..ca98fc88d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/doc.go @@ -0,0 +1,10 @@ +// Api versions allow the api contract for a resource to be changed while keeping +// backward compatibility by support multiple concurrent versions +// of the same resource + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/loft-sh/api/v3/pkg/apis/management +// +k8s:defaulter-gen=TypeMeta +// +groupName=management.loft.sh +package v1 // import "github.com/loft-sh/api/v3/pkg/apis/management/v1" diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/event_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/event_types.go new file mode 100644 index 000000000..61d2be4d1 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/event_types.go @@ -0,0 +1,30 @@ +package v1 + +import ( + auditv1 "github.com/loft-sh/api/v3/pkg/apis/audit/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Event holds an event +// +k8s:openapi-gen=true +// +resource:path=events,rest=EventREST +type Event struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec EventSpec `json:"spec,omitempty"` + Status EventStatus `json:"status,omitempty"` +} + +// EventSpec holds the specification +type EventSpec struct { +} + +// EventStatus holds the status, which is the parsed raw config +type EventStatus struct { + auditv1.Event `json:",inline"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/feature_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/feature_types.go new file mode 100644 index 000000000..fd94cdc4f --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/feature_types.go @@ -0,0 +1,31 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Feature holds the feature information +// +k8s:openapi-gen=true +// +resource:path=features,rest=FeatureREST +type Feature struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec FeatureSpec `json:"spec,omitempty"` + Status FeatureStatus `json:"status,omitempty"` +} + +// FeatureSpec holds the specification +type FeatureSpec struct { +} + +// FeatureStatus holds the status +type FeatureStatus struct { + // Enabled signals if the feature is currently enabled or disabled + // +optional + Enabled bool `json:"enabled,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/ingressauthtoken_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/ingressauthtoken_types.go new file mode 100644 index 000000000..acf0f7704 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/ingressauthtoken_types.go @@ -0,0 +1,37 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IngressAuthToken holds the object information +// +k8s:openapi-gen=true +// +resource:path=ingressauthtokens,rest=IngressAuthTokenREST +type IngressAuthToken struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec IngressAuthTokenSpec `json:"spec,omitempty"` + Status IngressAuthTokenStatus `json:"status,omitempty"` +} + +// IngressAuthTokenSpec holds the object specification +type IngressAuthTokenSpec struct { + // Host is the host where the UI should get redirected + // +optional + Host string `json:"host,omitempty"` + + // Signature is the signature of the agent for the host + // +optional + Signature string `json:"signature,omitempty"` +} + +// IngressAuthTokenStatus holds the object status +type IngressAuthTokenStatus struct { + // +optional + Token string `json:"token,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/kiosk_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/kiosk_types.go new file mode 100644 index 000000000..136000e2d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/kiosk_types.go @@ -0,0 +1,53 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + uiv1 "github.com/loft-sh/api/v3/pkg/apis/ui/v1" + "github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// This file is just used as a collector for kiosk objects we want to generate stuff for + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Kiosk holds the kiosk types +// +k8s:openapi-gen=true +// +resource:path=kiosk,rest=KioskREST +type Kiosk struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec KioskSpec `json:"spec,omitempty"` + Status KioskStatus `json:"status,omitempty"` +} + +type KioskSpec struct { + // policy.loft.sh + JsPolicy v1beta1.JsPolicy `json:"jsPolicy,omitempty"` + JsPolicyBundle v1beta1.JsPolicyBundle `json:"jsPolicyBundle,omitempty"` + JsPolicyViolations v1beta1.JsPolicyViolations `json:"jsPolicyViolations,omitempty"` + + // cluster.loft.sh + HelmRelease clusterv1.HelmRelease `json:"helmRelease,omitempty"` + SleepModeConfig clusterv1.SleepModeConfig `json:"sleepModeConfig,omitempty"` + Space clusterv1.Space `json:"space,omitempty"` + VirtualCluster clusterv1.VirtualCluster `json:"virtualCluster,omitempty"` + LocalClusterAccess clusterv1.LocalClusterAccess `json:"localClusterAccess,omitempty"` + ClusterQuota clusterv1.ClusterQuota `json:"clusterQuota,omitempty"` + ChartInfo clusterv1.ChartInfo `json:"chartInfo,omitempty"` + + // storage.loft.sh + StorageClusterAccess agentstoragev1.LocalClusterAccess `json:"localStorageClusterAccess,omitempty"` + StorageClusterQuota agentstoragev1.ClusterQuota `json:"storageClusterQuota,omitempty"` + StorageVirtualCluster agentstoragev1.VirtualCluster `json:"storageVirtualCluster,omitempty"` + LocalUser agentstoragev1.LocalUser `json:"localUser,omitempty"` + LocalTeam agentstoragev1.LocalTeam `json:"localTeam,omitempty"` + + // ui.loft.sh + UISettings uiv1.UISettings `json:"UISettings,omitempty"` +} + +type KioskStatus struct { +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/license_token_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/license_token_types.go new file mode 100644 index 000000000..d1ac3fc9a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/license_token_types.go @@ -0,0 +1,28 @@ +package v1 + +import ( + "github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// License Token holds the license token information +// +k8s:openapi-gen=true +// +resource:path=licensetokens,rest=LicenseTokenREST +type LicenseToken struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec LicenseTokenSpec `json:"spec,omitempty"` + Status LicenseTokenStatus `json:"status,omitempty"` +} + +type LicenseTokenSpec struct { +} + +type LicenseTokenStatus struct { + Token *server.InstanceTokenAuth `json:"token,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/license_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/license_types.go new file mode 100644 index 000000000..7d0bb5ac7 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/license_types.go @@ -0,0 +1,39 @@ +package v1 + +import ( + admintypes "github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +genclient:method=LicenseRequest,verb=create,subresource=request,input=github.com/loft-sh/api/v3/pkg/apis/management/v1.LicenseRequest,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.LicenseRequest +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// License holds the license information +// +k8s:openapi-gen=true +// +resource:path=licenses,rest=LicenseREST +// +subresource:request=LicenseRequest,path=request,kind=LicenseRequest,rest=LicenseRequestREST +type License struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec LicenseSpec `json:"spec,omitempty"` + Status LicenseStatus `json:"status,omitempty"` +} + +type LicenseSpec struct { +} + +type LicenseStatus struct { + // Buttons is the selection of routes or endpoints in the license server that are used for license related + // operations such as updating subscriptions. + // +optional + Buttons admintypes.Buttons `json:"buttons,omitempty"` + // License is the license data received from the license server. + // +optional + License *admintypes.License `json:"info,omitempty"` + // InstanceID is the instance ID for the Loft license/instance. + // +optional + InstanceID string `json:"instanceID,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/licenserequest_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/licenserequest_types.go new file mode 100644 index 000000000..d6ab84691 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/licenserequest_types.go @@ -0,0 +1,38 @@ +package v1 + +import ( + "github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// LicenseRequest holds license request information +// +subresource-request +type LicenseRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec is the admin request spec (the input for the request). + Spec LicenseRequestSpec `json:"spec,omitempty"` + + // Status is the admin request output (the output or result of the request). + Status LicenseRequestStatus `json:"status,omitempty"` +} + +type LicenseRequestSpec struct { + // Route is the route to make the request to on the license server. + Route string `json:"url"` + // Input is the input payload to send to the url. + Input server.StandardRequestInputFrontEnd `json:"input,omitempty"` +} + +type LicenseRequestStatus struct { + // OK indicates if the license request operation was successful or not. If OK is true, the front end should follow + // the link in the output. + // +optional + OK bool `json:"ok,omitempty"` + // Output is where the request output is stored. + // +optional + Output server.StandardRequestOutput `json:"output,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/loftupgrade_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/loftupgrade_types.go new file mode 100644 index 000000000..1648bc1b5 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/loftupgrade_types.go @@ -0,0 +1,36 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// LoftUpgrade holds the upgrade information +// +k8s:openapi-gen=true +// +resource:path=loftupgrades,rest=LoftUpgradeREST +type LoftUpgrade struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec LoftUpgradeSpec `json:"spec,omitempty"` + Status LoftUpgradeStatus `json:"status,omitempty"` +} + +type LoftUpgradeSpec struct { + // If specified, updated the release in the given namespace + // +optional + Namespace string `json:"namespace,omitempty"` + + // If specified, uses this as release name + // +optional + Release string `json:"release,omitempty"` + + // +optional + Version string `json:"version,omitempty"` +} + +type LoftUpgradeStatus struct { +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/options.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/options.go new file mode 100644 index 000000000..d0d3f1d46 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/options.go @@ -0,0 +1,223 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// +k8s:conversion-gen:explicit-from=net/url.Values +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceLogOptions struct { + metav1.TypeMeta `json:",inline"` + + // The container for which to stream logs. Defaults to only container if there is one container in the pod. + // +optional + Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"` + // Follow the log stream of the pod. Defaults to false. + // +optional + Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"` + // Return previous terminated container logs. Defaults to false. + // +optional + Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"` + // A relative time in seconds before the current time from which to show logs. If this value + // precedes the time a pod was started, only logs since the pod start will be returned. + // If this value is in the future, no logs will be returned. + // Only one of sinceSeconds or sinceTime may be specified. + // +optional + SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"` + // An RFC3339 timestamp from which to show logs. If this value + // precedes the time a pod was started, only logs since the pod start will be returned. + // If this value is in the future, no logs will be returned. + // Only one of sinceSeconds or sinceTime may be specified. + // +optional + SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"` + // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line + // of log output. Defaults to false. + // +optional + Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"` + // If set, the number of lines from the end of the logs to show. If not specified, + // logs are shown from the creation of the container or sinceSeconds or sinceTime + // +optional + TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"` + // If set, the number of bytes to read from the server before terminating the + // log output. This may not display a complete final line of logging, and may return + // slightly more or slightly less than the specified limit. + // +optional + LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"` + + // insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the + // serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver + // and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real + // kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the + // connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept + // the actual log data coming from the real kubelet). + // +optional + InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty" protobuf:"varint,9,opt,name=insecureSkipTLSVerifyBackend"` +} + +// +k8s:conversion-gen:explicit-from=net/url.Values +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TaskLogOptions struct { + metav1.TypeMeta `json:",inline"` + + // Follow the log stream of the pod. Defaults to false. + // +optional + Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"` + // Return previous terminated container logs. Defaults to false. + // +optional + Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"` + // A relative time in seconds before the current time from which to show logs. If this value + // precedes the time a pod was started, only logs since the pod start will be returned. + // If this value is in the future, no logs will be returned. + // Only one of sinceSeconds or sinceTime may be specified. + // +optional + SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"` + // An RFC3339 timestamp from which to show logs. If this value + // precedes the time a pod was started, only logs since the pod start will be returned. + // If this value is in the future, no logs will be returned. + // Only one of sinceSeconds or sinceTime may be specified. + // +optional + SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"` + // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line + // of log output. Defaults to false. + // +optional + Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"` + // If set, the number of lines from the end of the logs to show. If not specified, + // logs are shown from the creation of the container or sinceSeconds or sinceTime + // +optional + TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"` + // If set, the number of bytes to read from the server before terminating the + // log output. This may not display a complete final line of logging, and may return + // slightly more or slightly less than the specified limit. + // +optional + LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"` + + // insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the + // serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver + // and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real + // kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the + // connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept + // the actual log data coming from the real kubelet). + // +optional + InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty" protobuf:"varint,9,opt,name=insecureSkipTLSVerifyBackend"` +} + +// +k8s:conversion-gen:explicit-from=net/url.Values +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserSpacesOptions struct { + metav1.TypeMeta `json:",inline"` + + // Cluster where to retrieve spaces from + // +optional + Cluster []string `json:"cluster,omitempty"` +} + +// +k8s:conversion-gen:explicit-from=net/url.Values +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserVirtualClustersOptions struct { + metav1.TypeMeta `json:",inline"` + + // Cluster where to retrieve virtual clusters from + // +optional + Cluster []string `json:"cluster,omitempty"` +} + +// +k8s:conversion-gen:explicit-from=net/url.Values +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserQuotasOptions struct { + metav1.TypeMeta `json:",inline"` + + // Cluster where to retrieve quotas from + // +optional + Cluster []string `json:"cluster,omitempty"` +} + +// +k8s:conversion-gen:explicit-from=net/url.Values +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodUpOptions struct { + metav1.TypeMeta `json:",inline"` + + // WebMode executes the up command directly. + // +optional + WebMode bool `json:"webMode,omitempty"` + + // Debug includes debug logs. + // +optional + Debug bool `json:"debug,omitempty"` + + // Options are the options to pass. + // +optional + Options string `json:"options,omitempty"` +} + +// +k8s:conversion-gen:explicit-from=net/url.Values +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodDeleteOptions struct { + metav1.TypeMeta `json:",inline"` + + // Options are the options to pass. + // +optional + Options string `json:"options,omitempty"` +} + +// +k8s:conversion-gen:explicit-from=net/url.Values +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodStopOptions struct { + metav1.TypeMeta `json:",inline"` + + // Options are the options to pass. + // +optional + Options string `json:"options,omitempty"` +} + +// +k8s:conversion-gen:explicit-from=net/url.Values +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodStatusOptions struct { + metav1.TypeMeta `json:",inline"` + + // Options are the options to pass. + // +optional + Options string `json:"options,omitempty"` +} + +// +k8s:conversion-gen:explicit-from=net/url.Values +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodSshOptions struct { + metav1.TypeMeta `json:",inline"` + + // Options are the options to pass. + // +optional + Options string `json:"options,omitempty"` +} + +func InstallOptions(scheme *runtime.Scheme) error { + return addKnownOptionsTypes(scheme) +} + +func addKnownOptionsTypes(scheme *runtime.Scheme) error { + // TODO this will get cleaned up with the scheme types are fixed + scheme.AddKnownTypes( + SchemeGroupVersion, + &VirtualClusterInstanceLogOptions{}, + &TaskLogOptions{}, + &UserSpacesOptions{}, + &UserVirtualClustersOptions{}, + &UserQuotasOptions{}, + &DevPodUpOptions{}, + &DevPodDeleteOptions{}, + &DevPodStopOptions{}, + &DevPodStatusOptions{}, + &DevPodSshOptions{}, + ) + return nil +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/ownedaccesskey_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/ownedaccesskey_types.go new file mode 100644 index 000000000..6f9aba408 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/ownedaccesskey_types.go @@ -0,0 +1,29 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// OwnedAccessKey is an access key that is owned by the current user +// +k8s:openapi-gen=true +// +resource:path=ownedaccesskeys,rest=OwnedAccessKeyREST +type OwnedAccessKey struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec OwnedAccessKeySpec `json:"spec,omitempty"` + Status OwnedAccessKeyStatus `json:"status,omitempty"` +} + +type OwnedAccessKeySpec struct { + storagev1.AccessKeySpec `json:",inline"` +} + +type OwnedAccessKeyStatus struct { + storagev1.AccessKeyStatus `json:",inline"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/policyviolation_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/policyviolation_types.go new file mode 100644 index 000000000..c0f009fab --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/policyviolation_types.go @@ -0,0 +1,43 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + policyv1beta1 "github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PolicyViolation +// +k8s:openapi-gen=true +// +resource:path=policyviolations,rest=PolicyViolationREST +type PolicyViolation struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec PolicyViolationSpec `json:"spec,omitempty"` + Status PolicyViolationStatus `json:"status,omitempty"` +} + +type PolicyViolationSpec struct { +} + +type PolicyViolationStatus struct { + // Policy is the name of the policy where the violation occurred + // +optional + Policy string `json:"policy,omitempty"` + + // Cluster is the cluster where the violation occurred in + // +optional + Cluster string `json:"cluster,omitempty"` + + // The Loft user that caused the violation + // +optional + User *clusterv1.EntityInfo `json:"user,omitempty"` + + // Violation contains information about the violation + // +optional + Violation policyv1beta1.PolicyViolation `json:"violation,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_chartinfo_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_chartinfo_types.go new file mode 100644 index 000000000..5c1f1389e --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_chartinfo_types.go @@ -0,0 +1,25 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ProjectChartInfo struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ProjectChartInfoSpec `json:"spec,omitempty"` + Status ProjectChartInfoStatus `json:"status,omitempty"` +} + +type ProjectChartInfoSpec struct { + clusterv1.ChartInfoSpec `json:",inline"` +} + +type ProjectChartInfoStatus struct { + clusterv1.ChartInfoStatus `json:",inline"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_charts_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_charts_types.go new file mode 100644 index 000000000..c742db967 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_charts_types.go @@ -0,0 +1,22 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ProjectCharts struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Holds the available helm charts for this cluster + Charts []storagev1.HelmChart `json:"charts"` + + // Busy will indicate if the chart parsing is still + // in progress. + // +optional + Busy bool `json:"busy,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_clusters_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_clusters_types.go new file mode 100644 index 000000000..468e769e1 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_clusters_types.go @@ -0,0 +1,19 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ProjectClusters struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Clusters holds all the allowed clusters + Clusters []Cluster `json:"clusters,omitempty"` + + // Runners holds all the allowed runners + Runners []Runner `json:"runners,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_importspace_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_importspace_types.go new file mode 100644 index 000000000..c96676240 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_importspace_types.go @@ -0,0 +1,28 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ProjectImportSpace holds project space import information +// +subresource-request +type ProjectImportSpace struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // SourceSpace is the space to import into this project + SourceSpace ProjectImportSpaceSource `json:"sourceSpace"` +} + +type ProjectImportSpaceSource struct { + // Name of the space to import + Name string `json:"name,omitempty"` + // Cluster name of the cluster the space is running on + Cluster string `json:"cluster,omitempty"` + // ImportName is an optional name to use as the spaceinstance name, if not provided the space + // name will be used + // +optional + ImportName string `json:"importName,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_importvirtualcluster_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_importvirtualcluster_types.go new file mode 100644 index 000000000..e11a1d3ea --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_importvirtualcluster_types.go @@ -0,0 +1,30 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ProjectImportVirtualCluster holds project vcluster import information +// +subresource-request +type ProjectImportVirtualCluster struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // SourceVirtualCluster is the virtual cluster to import into this project + SourceVirtualCluster ProjectImportVirtualClusterSource `json:"sourceVirtualCluster"` +} + +type ProjectImportVirtualClusterSource struct { + // Name of the virtual cluster to import + Name string `json:"name,omitempty"` + // Namespace of the virtual cluster to import + Namespace string `json:"namespace,omitempty"` + // Cluster name of the cluster the virtual cluster is running on + Cluster string `json:"cluster,omitempty"` + // ImportName is an optional name to use as the virtualclusterinstance name, if not provided + // the vcluster name will be used + // +optional + ImportName string `json:"importName,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_members_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_members_types.go new file mode 100644 index 000000000..c1b9f15f8 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_members_types.go @@ -0,0 +1,26 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ProjectMembers struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Teams holds all the teams that have access to the cluster + Teams []ProjectMember `json:"teams,omitempty"` + + // Users holds all the users that have access to the cluster + Users []ProjectMember `json:"users,omitempty"` +} + +type ProjectMember struct { + // Info about the user or team + // +optional + Info clusterv1.EntityInfo `json:"info,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_migratespaceinstance_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_migratespaceinstance_types.go new file mode 100644 index 000000000..41b8ea5b7 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_migratespaceinstance_types.go @@ -0,0 +1,24 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ProjectMigrateSpaceInstance holds project spaceinstance migrate information +// +subresource-request +type ProjectMigrateSpaceInstance struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // SourceSpaceInstance is the spaceinstance to migrate into this project + SourceSpaceInstance ProjectMigrateSpaceInstanceSource `json:"sourceSpaceInstance"` +} + +type ProjectMigrateSpaceInstanceSource struct { + // Name of the spaceinstance to migrate + Name string `json:"name,omitempty"` + // Namespace of the spaceinstance to migrate + Namespace string `json:"namespace,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_migratevirtualclusterinstance_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_migratevirtualclusterinstance_types.go new file mode 100644 index 000000000..38e2b0106 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_migratevirtualclusterinstance_types.go @@ -0,0 +1,24 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ProjectMigrateVirtualClusterInstance holds project vclusterinstance migrate information +// +subresource-request +type ProjectMigrateVirtualClusterInstance struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // SourceVirtualClusterInstance is the virtual cluster instance to migrate into this project + SourceVirtualClusterInstance ProjectMigrateVirtualClusterInstanceSource `json:"sourceVirtualClusterInstance"` +} + +type ProjectMigrateVirtualClusterInstanceSource struct { + // Name of the virtual cluster instance to migrate + Name string `json:"name,omitempty"` + // Namespace of the virtual cluster instance to migrate + Namespace string `json:"namespace,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_secret_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_secret_types.go new file mode 100644 index 000000000..a7ff13b49 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_secret_types.go @@ -0,0 +1,81 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + LoftProjectSecret = "loft.sh/project-secret" + LoftProjectSecretNameLabel = "loft.sh/project-secret-name" + LoftProjectSecretDescription = "loft.sh/project-secret-description" + LoftProjectSecretDisplayName = "loft.sh/project-secret-displayname" + LoftProjectSecretOwner = "loft.sh/project-secret-owner" + LoftProjectSecretAccess = "loft.sh/project-secret-access" + LoftProjectSecretStatusConditionsAnnotation = "loft.sh/project-secret-status-conditions" +) + +// +genclient +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ProjectSecret holds the Project Secret information +// +k8s:openapi-gen=true +// +resource:path=projectsecrets,rest=ProjectSecretREST +type ProjectSecret struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ProjectSecretSpec `json:"spec,omitempty"` + Status ProjectSecretStatus `json:"status,omitempty"` +} + +func (a *ProjectSecret) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *ProjectSecret) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *ProjectSecret) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *ProjectSecret) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} + +// ProjectSecretSpec holds the specification +type ProjectSecretSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a Project secret + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *storagev1.UserOrTeam `json:"owner,omitempty"` + + // Data contains the secret data. Each key must consist of alphanumeric + // characters, '-', '_' or '.'. The serialized form of the secret data is a + // base64 encoded string, representing the arbitrary (possibly non-string) + // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 + // +optional + Data map[string][]byte `json:"data,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []storagev1.Access `json:"access,omitempty"` +} + +// ProjectSecretStatus holds the status +type ProjectSecretStatus struct { + // Conditions holds several conditions the project might be in + // +optional + Conditions agentstoragev1.Conditions `json:"conditions,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_templates_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_templates_types.go new file mode 100644 index 000000000..b9d4f81af --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_templates_types.go @@ -0,0 +1,31 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ProjectTemplates struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // DefaultVirtualClusterTemplate is the default template for the project + DefaultVirtualClusterTemplate string `json:"defaultVirtualClusterTemplate,omitempty"` + + // VirtualClusterTemplates holds all the allowed virtual cluster templates + VirtualClusterTemplates []VirtualClusterTemplate `json:"virtualClusterTemplates,omitempty"` + + // DefaultSpaceTemplate + DefaultSpaceTemplate string `json:"defaultSpaceTemplate,omitempty"` + + // SpaceTemplates holds all the allowed space templates + SpaceTemplates []SpaceTemplate `json:"spaceTemplates,omitempty"` + + // DefaultDevPodWorkspaceTemplate + DefaultDevPodWorkspaceTemplate string `json:"defaultDevPodWorkspaceTemplate,omitempty"` + + // DevPodWorkspaceTemplates holds all the allowed space templates + DevPodWorkspaceTemplates []DevPodWorkspaceTemplate `json:"devPodWorkspaceTemplates,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_types.go new file mode 100644 index 000000000..17a65972d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/project_types.go @@ -0,0 +1,63 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +genclient:method=ListMembers,verb=get,subresource=members,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectMembers +// +genclient:method=ListTemplates,verb=get,subresource=templates,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectTemplates +// +genclient:method=ListClusters,verb=get,subresource=clusters,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectClusters +// +genclient:method=ImportVirtualCluster,verb=create,subresource=importvirtualcluster,input=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectImportVirtualCluster,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectImportVirtualCluster +// +genclient:method=MigrateVirtualClusterInstance,verb=create,subresource=migratevirtualclusterinstance,input=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectMigrateVirtualClusterInstance,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectMigrateVirtualClusterInstance +// +genclient:method=ImportSpace,verb=create,subresource=importspace,input=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectImportSpace,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectImportSpace +// +genclient:method=MigrateSpaceInstance,verb=create,subresource=migratespaceinstance,input=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectMigrateSpaceInstance,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.ProjectMigrateSpaceInstance +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Project holds the Project information +// +k8s:openapi-gen=true +// +resource:path=projects,rest=ProjectREST,statusRest=ProjectStatusREST +// +subresource:request=ProjectCharts,path=charts,kind=ProjectCharts,rest=ProjectChartsREST +// +subresource:request=ProjectTemplates,path=templates,kind=ProjectTemplates,rest=ProjectTemplatesREST +// +subresource:request=ProjectMembers,path=members,kind=ProjectMembers,rest=ProjectMembersREST +// +subresource:request=ProjectClusters,path=clusters,kind=ProjectClusters,rest=ProjectClustersREST +// +subresource:request=ProjectChartInfo,path=chartinfo,kind=ProjectChartInfo,rest=ProjectChartInfoREST +// +subresource:request=ProjectImportVirtualCluster,path=importvirtualcluster,kind=ProjectImportVirtualCluster,rest=ProjectImportVirtualClusterREST +// +subresource:request=ProjectMigrateVirtualClusterInstance,path=migratevirtualclusterinstance,kind=ProjectMigrateVirtualClusterInstance,rest=ProjectMigrateVirtualClusterInstanceREST +// +subresource:request=ProjectImportSpace,path=importspace,kind=ProjectImportSpace,rest=ProjectImportSpaceREST +// +subresource:request=ProjectMigrateSpaceInstance,path=migratespaceinstance,kind=ProjectMigrateSpaceInstance,rest=ProjectMigrateSpaceInstanceREST +type Project struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ProjectSpec `json:"spec,omitempty"` + Status ProjectStatus `json:"status,omitempty"` +} + +// ProjectSpec holds the specification +type ProjectSpec struct { + storagev1.ProjectSpec `json:",inline"` +} + +// ProjectStatus holds the status +type ProjectStatus struct { + storagev1.ProjectStatus `json:",inline"` +} + +func (a *Project) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *Project) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *Project) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *Project) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/redirecttoken_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/redirecttoken_types.go new file mode 100644 index 000000000..0bb25692d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/redirecttoken_types.go @@ -0,0 +1,40 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// RedirectToken holds the object information +// +k8s:openapi-gen=true +// +resource:path=redirecttokens,rest=RedirectTokenREST +type RedirectToken struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec RedirectTokenSpec `json:"spec,omitempty"` + Status RedirectTokenStatus `json:"status,omitempty"` +} + +// RedirectTokenSpec holds the object specification +type RedirectTokenSpec struct { + // Token is the token that includes the redirect request + // +optional + Token string `json:"token,omitempty"` +} + +// RedirectTokenStatus holds the object status +type RedirectTokenStatus struct { + // +optional + RedirectURL string `json:"redirectURL,omitempty"` +} + +// RedirectTokenClaims holds the private claims of the redirect token +type RedirectTokenClaims struct { + // URL is the url to redirect to. + // +optional + URL string `json:"url,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/resetaccesskey_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/resetaccesskey_types.go new file mode 100644 index 000000000..c1a33dd5e --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/resetaccesskey_types.go @@ -0,0 +1,29 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ResetAccessKey is an access key that is owned by another user +// +k8s:openapi-gen=true +// +resource:path=resetaccesskeys,rest=ResetAccessKeyREST +type ResetAccessKey struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ResetAccessKeySpec `json:"spec,omitempty"` + Status ResetAccessKeyStatus `json:"status,omitempty"` +} + +type ResetAccessKeySpec struct { + storagev1.AccessKeySpec `json:",inline"` +} + +type ResetAccessKeyStatus struct { + storagev1.AccessKeyStatus `json:",inline"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/runner_accesskey_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/runner_accesskey_types.go new file mode 100644 index 000000000..8fb0a8b27 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/runner_accesskey_types.go @@ -0,0 +1,18 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// RunnerAccessKey holds the access key for the runner +// +subresource-request +type RunnerAccessKey struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // AccessKey is the access key used by the runner + // +optional + AccessKey string `json:"accessKey,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/runner_config_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/runner_config_types.go new file mode 100644 index 000000000..f92a05f41 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/runner_config_types.go @@ -0,0 +1,19 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// RunnerConfig holds the config the runner retrieves from Loft +// +subresource-request +type RunnerConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // TokenCaCert is the certificate authority the Loft tokens will + // be signed with + // +optional + TokenCaCert []byte `json:"tokenCaCert,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/runner_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/runner_types.go new file mode 100644 index 000000000..731ceed10 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/runner_types.go @@ -0,0 +1,60 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +genclient:method=GetConfig,verb=get,subresource=config,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.RunnerConfig +// +genclient:method=GetAccessKey,verb=get,subresource=accesskey,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.RunnerAccessKey +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Runner holds the Runner information +// +k8s:openapi-gen=true +// +resource:path=runners,rest=RunnerREST,statusRest=RunnerStatusREST +// +subresource:request=RunnerConfig,path=config,kind=RunnerConfig,rest=RunnerConfigREST +// +subresource:request=RunnerAccessKey,path=accesskey,kind=RunnerAccessKey,rest=RunnerAccessKeyREST +type Runner struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec RunnerSpec `json:"spec,omitempty"` + Status RunnerStatus `json:"status,omitempty"` +} + +// RunnerSpec holds the specification +type RunnerSpec struct { + storagev1.RunnerSpec `json:",inline"` +} + +// RunnerStatus holds the status +type RunnerStatus struct { + storagev1.RunnerStatus `json:",inline"` +} + +func (a *Runner) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *Runner) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *Runner) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *Runner) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *Runner) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *Runner) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/self_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/self_types.go new file mode 100644 index 000000000..cd1c25156 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/self_types.go @@ -0,0 +1,78 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Self holds information about the currently logged in user +// +k8s:openapi-gen=true +// +resource:path=selves,rest=SelfREST +type Self struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SelfSpec `json:"spec,omitempty"` + Status SelfStatus `json:"status,omitempty"` +} + +type SelfSpec struct { + // AccessKey is an optional access key to use instead of the provided one + // +optional + AccessKey string `json:"accessKey,omitempty"` +} + +type SelfStatus struct { + // The name of the currently logged in user + // +optional + User *UserInfo `json:"user,omitempty"` + + // The name of the currently logged in team + // +optional + Team *clusterv1.EntityInfo `json:"team,omitempty"` + + // The name of the currently used access key + // +optional + AccessKey string `json:"accessKey,omitempty"` + + // The scope of the currently used access key + // +optional + AccessKeyScope *storagev1.AccessKeyScope `json:"accessKeyScope,omitempty"` + + // The type of the currently used access key + // +optional + AccessKeyType storagev1.AccessKeyType `json:"accessKeyType,omitempty"` + + // The subject of the currently logged in user + // +optional + Subject string `json:"subject,omitempty"` + + // UID is the user uid + // +optional + UID string `json:"uid,omitempty"` + + // The groups of the currently logged in user + // +optional + Groups []string `json:"groups,omitempty"` + + // IntercomHash is the hmac used to link a user/instance to intercomm + // +optional + IntercomHash string `json:"intercomHash"` + + // InstanceID is the loft instance id + // +optional + InstanceID string `json:"instanceID"` +} + +type UserInfo struct { + clusterv1.EntityInfo `json:",inline"` + + // Teams are the teams the user is part of + // +optional + Teams []*clusterv1.EntityInfo `json:"teams,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/selfsubjectaccessreview_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/selfsubjectaccessreview_types.go new file mode 100644 index 000000000..82c3d1fa9 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/selfsubjectaccessreview_types.go @@ -0,0 +1,29 @@ +package v1 + +import ( + authorizationv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// User holds the user information +// +k8s:openapi-gen=true +// +resource:path=selfsubjectaccessreviews,rest=SelfSubjectAccessReviewREST +type SelfSubjectAccessReview struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SelfSubjectAccessReviewSpec `json:"spec,omitempty"` + Status SelfSubjectAccessReviewStatus `json:"status,omitempty"` +} + +type SelfSubjectAccessReviewSpec struct { + authorizationv1.SelfSubjectAccessReviewSpec `json:",inline"` +} + +type SelfSubjectAccessReviewStatus struct { + authorizationv1.SubjectAccessReviewStatus `json:",inline"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/sharedsecret_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/sharedsecret_types.go new file mode 100644 index 000000000..7a627985a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/sharedsecret_types.go @@ -0,0 +1,46 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SharedSecret holds the secret information +// +k8s:openapi-gen=true +// +resource:path=sharedsecrets,rest=SharedSecretREST +type SharedSecret struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SharedSecretSpec `json:"spec,omitempty"` + Status SharedSecretStatus `json:"status,omitempty"` +} + +// SharedSecretSpec holds the specification +type SharedSecretSpec struct { + storagev1.SharedSecretSpec `json:",inline"` +} + +// SharedSecretStatus holds the status +type SharedSecretStatus struct { + storagev1.SharedSecretStatus `json:",inline"` +} + +func (a *SharedSecret) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *SharedSecret) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *SharedSecret) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *SharedSecret) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/spaceconstraint_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/spaceconstraint_types.go new file mode 100644 index 000000000..cd665e2d7 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/spaceconstraint_types.go @@ -0,0 +1,54 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SpaceConstraint holds the globalSpaceConstraint information +// +k8s:openapi-gen=true +// +resource:path=spaceconstraints,rest=SpaceConstraintREST +type SpaceConstraint struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SpaceConstraintSpec `json:"spec,omitempty"` + Status SpaceConstraintStatus `json:"status,omitempty"` +} + +// SpaceConstraintSpec holds the specification +type SpaceConstraintSpec struct { + storagev1.SpaceConstraintSpec `json:",inline"` +} + +// SpaceConstraintStatus holds the status +type SpaceConstraintStatus struct { + storagev1.SpaceConstraintStatus `json:",inline"` + + // +optional + ClusterRole *clusterv1.EntityInfo `json:"clusterRole,omitempty"` + + // +optional + Clusters []*clusterv1.EntityInfo `json:"clusters,omitempty"` +} + +func (a *SpaceConstraint) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *SpaceConstraint) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *SpaceConstraint) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *SpaceConstraint) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/spaceinstance_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/spaceinstance_types.go new file mode 100644 index 000000000..9e7a53332 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/spaceinstance_types.go @@ -0,0 +1,70 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SpaceInstance holds the SpaceInstance information +// +k8s:openapi-gen=true +// +resource:path=spaceinstances,rest=SpaceInstanceREST +type SpaceInstance struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SpaceInstanceSpec `json:"spec,omitempty"` + Status SpaceInstanceStatus `json:"status,omitempty"` +} + +// SpaceInstanceSpec holds the specification +type SpaceInstanceSpec struct { + storagev1.SpaceInstanceSpec `json:",inline"` +} + +// SpaceInstanceStatus holds the status +type SpaceInstanceStatus struct { + storagev1.SpaceInstanceStatus `json:",inline"` + + // SleepModeConfig is the sleep mode config of the space. This will only be shown + // in the front end. + // +optional + SleepModeConfig *clusterv1.SleepModeConfig `json:"sleepModeConfig,omitempty"` + + // CanUse specifies if the requester can use the instance + // +optional + CanUse bool `json:"canUse,omitempty"` + + // CanUpdate specifies if the requester can update the instance + // +optional + CanUpdate bool `json:"canUpdate,omitempty"` +} + +func (a *SpaceInstance) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *SpaceInstance) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *SpaceInstance) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *SpaceInstance) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *SpaceInstance) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *SpaceInstance) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/spacetemplate_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/spacetemplate_types.go new file mode 100644 index 000000000..156a193c8 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/spacetemplate_types.go @@ -0,0 +1,61 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SpaceTemplate holds the information +// +k8s:openapi-gen=true +// +resource:path=spacetemplates,rest=SpaceTemplateREST +type SpaceTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SpaceTemplateSpec `json:"spec,omitempty"` + Status SpaceTemplateStatus `json:"status,omitempty"` +} + +// SpaceTemplateSpec holds the specification +type SpaceTemplateSpec struct { + storagev1.SpaceTemplateSpec `json:",inline"` +} + +// SpaceTemplateStatus holds the status +type SpaceTemplateStatus struct { + storagev1.SpaceTemplateStatus `json:",inline"` + + // +optional + Apps []*clusterv1.EntityInfo `json:"apps,omitempty"` +} + +func (a *SpaceTemplate) GetVersions() []storagev1.VersionAccessor { + var retVersions []storagev1.VersionAccessor + for _, v := range a.Spec.Versions { + b := v + retVersions = append(retVersions, &b) + } + + return retVersions +} + +func (a *SpaceTemplate) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *SpaceTemplate) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *SpaceTemplate) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *SpaceTemplate) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/subjectaccessreview_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/subjectaccessreview_types.go new file mode 100644 index 000000000..fdcfe1c09 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/subjectaccessreview_types.go @@ -0,0 +1,29 @@ +package v1 + +import ( + authorizationv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// User holds the user information +// +k8s:openapi-gen=true +// +resource:path=subjectaccessreviews,rest=SubjectAccessReviewREST +type SubjectAccessReview struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SubjectAccessReviewSpec `json:"spec,omitempty"` + Status SubjectAccessReviewStatus `json:"status,omitempty"` +} + +type SubjectAccessReviewSpec struct { + authorizationv1.SubjectAccessReviewSpec `json:",inline"` +} + +type SubjectAccessReviewStatus struct { + authorizationv1.SubjectAccessReviewStatus `json:",inline"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/task_log_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/task_log_types.go new file mode 100644 index 000000000..1cbca631f --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/task_log_types.go @@ -0,0 +1,13 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type TaskLog struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/task_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/task_types.go new file mode 100644 index 000000000..81064c99a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/task_types.go @@ -0,0 +1,55 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Task holds the Task information +// +k8s:openapi-gen=true +// +resource:path=tasks,rest=TaskREST +// +subresource:request=TaskLog,path=log,kind=TaskLog,rest=TaskLogREST +type Task struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TaskSpec `json:"spec,omitempty"` + Status TaskStatus `json:"status,omitempty"` +} + +// TaskSpec holds the specification +type TaskSpec struct { + storagev1.TaskSpec `json:",inline"` +} + +// TaskStatus holds the status +type TaskStatus struct { + storagev1.TaskStatus `json:",inline"` + + // +optional + Owner *clusterv1.UserOrTeam `json:"owner,omitempty"` + + // +optional + Cluster *clusterv1.EntityInfo `json:"cluster,omitempty"` +} + +func (a *Task) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *Task) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *Task) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *Task) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/team_accesskeys_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/team_accesskeys_types.go new file mode 100644 index 000000000..0749912fa --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/team_accesskeys_types.go @@ -0,0 +1,15 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type TeamAccessKeys struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + AccessKeys []OwnedAccessKey `json:"accessKeys,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/team_clusters_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/team_clusters_types.go new file mode 100644 index 000000000..5701ae473 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/team_clusters_types.go @@ -0,0 +1,15 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type TeamClusters struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Clusters []ClusterAccounts `json:"clusters,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/team_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/team_types.go new file mode 100644 index 000000000..604444463 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/team_types.go @@ -0,0 +1,49 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +genclient:method=ListClusters,verb=get,subresource=clusters,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.TeamClusters +// +genclient:method=ListAccessKeys,verb=get,subresource=accesskeys,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.TeamAccessKeys +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Team holds the team information +// +k8s:openapi-gen=true +// +resource:path=teams,rest=TeamREST +// +subresource:request=TeamClusters,path=clusters,kind=TeamClusters,rest=TeamClustersREST +// +subresource:request=TeamAccessKeys,path=accesskeys,kind=TeamAccessKeys,rest=TeamAccessKeysREST +type Team struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TeamSpec `json:"spec,omitempty"` + Status TeamStatus `json:"status,omitempty"` +} + +type TeamSpec struct { + storagev1.TeamSpec `json:",inline"` +} + +type TeamStatus struct { + storagev1.TeamStatus `json:",inline"` +} + +func (a *Team) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *Team) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *Team) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *Team) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_accesskeys_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_accesskeys_types.go new file mode 100644 index 000000000..1c1303e7d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_accesskeys_types.go @@ -0,0 +1,15 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type UserAccessKeys struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + AccessKeys []OwnedAccessKey `json:"accessKeys,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_clusters_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_clusters_types.go new file mode 100644 index 000000000..6fae14f8e --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_clusters_types.go @@ -0,0 +1,24 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type UserClusters struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Clusters []ClusterAccounts `json:"clusters,omitempty"` +} + +type ClusterAccounts struct { + // Accounts are the accounts that belong to the user in the cluster + Accounts []string `json:"accounts,omitempty"` + + // Cluster is the cluster object + Cluster storagev1.Cluster `json:"cluster,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_permissions_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_permissions_types.go new file mode 100644 index 000000000..477879063 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_permissions_types.go @@ -0,0 +1,41 @@ +package v1 + +import ( + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type UserPermissions struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // ClusterRoles that apply to the user. + // +optional + ClusterRoles []UserPermissionsRole `json:"clusterRoles,omitempty"` + + // NamespaceRoles that apply to the user. Can be either regular roles or cluster roles that are namespace scoped. + // +optional + NamespaceRoles []UserPermissionsRole `json:"namespaceRoles,omitempty"` +} + +type UserPermissionsRole struct { + // ClusterRole is the name of the cluster role assigned + // to this user. + // +optional + ClusterRole string `json:"clusterRole,omitempty"` + + // Role is the name of the role assigned to this user. + // +optional + Role string `json:"role,omitempty"` + + // Namespace where this rules are valid. + // +optional + Namespace string `json:"namespace,omitempty"` + + // Rules are the roles rules + // +optional + Rules []rbacv1.PolicyRule `json:"rules,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_profile_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_profile_types.go new file mode 100644 index 000000000..4a314ccbb --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_profile_types.go @@ -0,0 +1,35 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type UserProfile struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // The new display name shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + // Username is the new username of the user + // +optional + Username string `json:"username,omitempty"` + // Password is the new password of the user + // +optional + Password string `json:"password,omitempty"` + // CurrentPassword is the current password of the user + // +optional + CurrentPassword string `json:"currentPassword,omitempty"` + // Email is the new email of the user + // +optional + Email string `json:"email,omitempty"` + // Icon is the new icon of the user + // +optional + Icon *string `json:"icon,omitempty"` + // Custom is custom information that should be saved of the user + // +optional + Custom string `json:"custom,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_types.go new file mode 100644 index 000000000..88d8d8408 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/user_types.go @@ -0,0 +1,53 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +genclient:method=GetProfile,verb=get,subresource=profile,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.UserProfile +// +genclient:method=ListClusters,verb=get,subresource=clusters,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.UserClusters +// +genclient:method=ListAccessKeys,verb=get,subresource=accesskeys,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.UserAccessKeys +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// User holds the user information +// +k8s:openapi-gen=true +// +resource:path=users,rest=UserREST +// +subresource:request=UserClusters,path=clusters,kind=UserClusters,rest=UserClustersREST +// +subresource:request=UserProfile,path=profile,kind=UserProfile,rest=UserProfileREST +// +subresource:request=UserAccessKeys,path=accesskeys,kind=UserAccessKeys,rest=UserAccessKeysREST +// +subresource:request=UserPermissions,path=permissions,kind=UserPermissions,rest=UserPermissionsREST +type User struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec UserSpec `json:"spec,omitempty"` + Status UserStatus `json:"status,omitempty"` +} + +type UserSpec struct { + storagev1.UserSpec `json:",inline"` +} + +// UserStatus holds the status of an user +type UserStatus struct { + storagev1.UserStatus `json:",inline"` +} + +func (a *User) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *User) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *User) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *User) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_kubeconfig_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_kubeconfig_types.go new file mode 100644 index 000000000..820cd0eca --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_kubeconfig_types.go @@ -0,0 +1,31 @@ +package v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterInstanceKubeConfig holds kube config request and response data for virtual clusters +// +subresource-request +type VirtualClusterInstanceKubeConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualClusterInstanceKubeConfigSpec `json:"spec,omitempty"` + Status VirtualClusterInstanceKubeConfigStatus `json:"status,omitempty"` +} + +type VirtualClusterInstanceKubeConfigSpec struct { + // CertificateTTL holds the ttl (in seconds) to set for the certificate associated with the + // returned kubeconfig. + // This field is optional, if no value is provided, the certificate TTL will be set to one day. + // If set to zero, this will cause loft to pass nil to the certificate signing request, which + // will result in the certificate being valid for the clusters `cluster-signing-duration` value + // which is typically one year. + // +optional + CertificateTTL *int32 `json:"certificateTTL,omitempty"` +} + +type VirtualClusterInstanceKubeConfigStatus struct { + // KubeConfig holds the final kubeconfig output + KubeConfig string `json:"kubeConfig,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_log_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_log_types.go new file mode 100644 index 000000000..fd63d90f1 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_log_types.go @@ -0,0 +1,13 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type VirtualClusterInstanceLog struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_types.go new file mode 100644 index 000000000..8394585dc --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_types.go @@ -0,0 +1,76 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:noStatus +// +genclient:method=GetKubeConfig,verb=create,subresource=kubeconfig,input=github.com/loft-sh/api/v3/pkg/apis/management/v1.VirtualClusterInstanceKubeConfig,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.VirtualClusterInstanceKubeConfig +// +genclient:method=CreateWorkloadKubeConfig,verb=create,subresource=workloadkubeconfig,input=github.com/loft-sh/api/v3/pkg/apis/management/v1.VirtualClusterInstanceWorkloadKubeConfig,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.VirtualClusterInstanceWorkloadKubeConfig +// +genclient:method=GetWorkloadKubeConfig,verb=get,subresource=workloadkubeconfig,result=github.com/loft-sh/api/v3/pkg/apis/management/v1.VirtualClusterInstanceWorkloadKubeConfig +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterInstance holds the VirtualClusterInstance information +// +k8s:openapi-gen=true +// +resource:path=virtualclusterinstances,rest=VirtualClusterInstanceREST +// +subresource:request=VirtualClusterInstanceWorkloadKubeConfig,path=workloadkubeconfig,kind=VirtualClusterInstanceWorkloadKubeConfig,rest=VirtualClusterInstanceWorkloadKubeConfigREST +// +subresource:request=VirtualClusterInstanceLog,path=log,kind=VirtualClusterInstanceLog,rest=VirtualClusterInstanceLogREST +// +subresource:request=VirtualClusterInstanceKubeConfig,path=kubeconfig,kind=VirtualClusterInstanceKubeConfig,rest=VirtualClusterInstanceKubeConfigREST +type VirtualClusterInstance struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualClusterInstanceSpec `json:"spec,omitempty"` + Status VirtualClusterInstanceStatus `json:"status,omitempty"` +} + +// VirtualClusterInstanceSpec holds the specification +type VirtualClusterInstanceSpec struct { + storagev1.VirtualClusterInstanceSpec `json:",inline"` +} + +// VirtualClusterInstanceStatus holds the status +type VirtualClusterInstanceStatus struct { + storagev1.VirtualClusterInstanceStatus `json:",inline"` + + // SleepModeConfig is the sleep mode config of the space. This will only be shown + // in the front end. + // +optional + SleepModeConfig *clusterv1.SleepModeConfig `json:"sleepModeConfig,omitempty"` + + // CanUse specifies if the requester can use the instance + // +optional + CanUse bool `json:"canUse,omitempty"` + + // CanUpdate specifies if the requester can update the instance + // +optional + CanUpdate bool `json:"canUpdate,omitempty"` +} + +func (a *VirtualClusterInstance) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *VirtualClusterInstance) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *VirtualClusterInstance) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *VirtualClusterInstance) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *VirtualClusterInstance) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *VirtualClusterInstance) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_workloadkubeconfig_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_workloadkubeconfig_types.go new file mode 100644 index 000000000..9f06a273d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclusterinstance_workloadkubeconfig_types.go @@ -0,0 +1,20 @@ +package v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterInstanceWorkloadKubeConfig holds kube config request and response data for virtual clusters +// +subresource-request +type VirtualClusterInstanceWorkloadKubeConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // KubeConfig holds the workload cluster's kubeconfig to access the virtual cluster + // +optional + KubeConfig string `json:"kubeConfig,omitempty"` + + // Token holds the service account token vcluster should use to connect to the remote cluster + // +optional + Token string `json:"token,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclustertemplate_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclustertemplate_types.go new file mode 100644 index 000000000..3c830b738 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/virtualclustertemplate_types.go @@ -0,0 +1,61 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterTemplate holds the information +// +k8s:openapi-gen=true +// +resource:path=virtualclustertemplates,rest=VirtualClusterTemplateREST +type VirtualClusterTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualClusterTemplateSpec `json:"spec,omitempty"` + Status VirtualClusterTemplateStatus `json:"status,omitempty"` +} + +// VirtualClusterTemplateSpec holds the specification +type VirtualClusterTemplateSpec struct { + storagev1.VirtualClusterTemplateSpec `json:",inline"` +} + +// VirtualClusterTemplateStatus holds the status +type VirtualClusterTemplateStatus struct { + storagev1.VirtualClusterTemplateStatus `json:",inline"` + + // +optional + Apps []*clusterv1.EntityInfo `json:"apps,omitempty"` +} + +func (a *VirtualClusterTemplate) GetVersions() []storagev1.VersionAccessor { + var retVersions []storagev1.VersionAccessor + for _, v := range a.Spec.Versions { + b := v + retVersions = append(retVersions, &b) + } + + return retVersions +} + +func (a *VirtualClusterTemplate) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *VirtualClusterTemplate) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *VirtualClusterTemplate) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *VirtualClusterTemplate) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.api.register.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.api.register.go new file mode 100644 index 000000000..00f3c2a47 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.api.register.go @@ -0,0 +1,944 @@ +// Code generated by generator. DO NOT EDIT. + +package v1 + +import ( + "github.com/loft-sh/api/v3/pkg/apis/management" + "github.com/loft-sh/apiserver/pkg/builders" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func addKnownTypes(scheme *runtime.Scheme) error { + // TODO this will get cleaned up with the scheme types are fixed + scheme.AddKnownTypes(SchemeGroupVersion, + &AgentAuditEvent{}, + &AgentAuditEventList{}, + &Announcement{}, + &AnnouncementList{}, + &App{}, + &AppList{}, + &Cluster{}, + &ClusterList{}, + &ClusterAgentConfig{}, + &ClusterCharts{}, + &ClusterDomain{}, + &ClusterMemberAccess{}, + &ClusterMembers{}, + &ClusterReset{}, + &ClusterVirtualClusterDefaults{}, + &ClusterAccess{}, + &ClusterAccessList{}, + &ClusterConnect{}, + &ClusterConnectList{}, + &ClusterRoleTemplate{}, + &ClusterRoleTemplateList{}, + &Config{}, + &ConfigList{}, + &DevPodWorkspaceInstance{}, + &DevPodWorkspaceInstanceList{}, + &DevPodWorkspaceInstanceDelete{}, + &DevPodWorkspaceInstanceGetStatus{}, + &DevPodWorkspaceInstanceSsh{}, + &DevPodWorkspaceInstanceStop{}, + &DevPodWorkspaceInstanceUp{}, + &DevPodWorkspaceTemplate{}, + &DevPodWorkspaceTemplateList{}, + &DirectClusterEndpointToken{}, + &DirectClusterEndpointTokenList{}, + &Event{}, + &EventList{}, + &Feature{}, + &FeatureList{}, + &IngressAuthToken{}, + &IngressAuthTokenList{}, + &Kiosk{}, + &KioskList{}, + &License{}, + &LicenseList{}, + &LicenseRequest{}, + &LicenseToken{}, + &LicenseTokenList{}, + &LoftUpgrade{}, + &LoftUpgradeList{}, + &OwnedAccessKey{}, + &OwnedAccessKeyList{}, + &PolicyViolation{}, + &PolicyViolationList{}, + &Project{}, + &ProjectList{}, + &ProjectChartInfo{}, + &ProjectCharts{}, + &ProjectClusters{}, + &ProjectImportSpace{}, + &ProjectImportVirtualCluster{}, + &ProjectMembers{}, + &ProjectMigrateSpaceInstance{}, + &ProjectMigrateVirtualClusterInstance{}, + &ProjectTemplates{}, + &ProjectSecret{}, + &ProjectSecretList{}, + &RedirectToken{}, + &RedirectTokenList{}, + &ResetAccessKey{}, + &ResetAccessKeyList{}, + &Runner{}, + &RunnerList{}, + &RunnerAccessKey{}, + &RunnerConfig{}, + &Self{}, + &SelfList{}, + &SelfSubjectAccessReview{}, + &SelfSubjectAccessReviewList{}, + &SharedSecret{}, + &SharedSecretList{}, + &SpaceConstraint{}, + &SpaceConstraintList{}, + &SpaceInstance{}, + &SpaceInstanceList{}, + &SpaceTemplate{}, + &SpaceTemplateList{}, + &SubjectAccessReview{}, + &SubjectAccessReviewList{}, + &Task{}, + &TaskList{}, + &TaskLog{}, + &Team{}, + &TeamList{}, + &TeamAccessKeys{}, + &TeamClusters{}, + &User{}, + &UserList{}, + &UserAccessKeys{}, + &UserClusters{}, + &UserPermissions{}, + &UserProfile{}, + &VirtualClusterInstance{}, + &VirtualClusterInstanceList{}, + &VirtualClusterInstanceKubeConfig{}, + &VirtualClusterInstanceLog{}, + &VirtualClusterInstanceWorkloadKubeConfig{}, + &VirtualClusterTemplate{}, + &VirtualClusterTemplateList{}, + ) + return nil +} + +var ( + ApiVersion = builders.NewApiVersion("management.loft.sh", "v1").WithResources( + management.ManagementAgentAuditEventStorage, + management.ManagementAnnouncementStorage, + management.ManagementAppStorage, + management.ManagementClusterStorage, + builders.NewApiResourceWithStorage( + management.InternalClusterAgentConfigREST, + func() runtime.Object { return &ClusterAgentConfig{} }, // Register versioned resource + nil, + management.NewClusterAgentConfigREST), + builders.NewApiResourceWithStorage( + management.InternalClusterChartsREST, + func() runtime.Object { return &ClusterCharts{} }, // Register versioned resource + nil, + management.NewClusterChartsREST), + builders.NewApiResourceWithStorage( + management.InternalClusterDomainREST, + func() runtime.Object { return &ClusterDomain{} }, // Register versioned resource + nil, + management.NewClusterDomainREST), + builders.NewApiResourceWithStorage( + management.InternalClusterMemberAccessREST, + func() runtime.Object { return &ClusterMemberAccess{} }, // Register versioned resource + nil, + management.NewClusterMemberAccessREST), + builders.NewApiResourceWithStorage( + management.InternalClusterMembersREST, + func() runtime.Object { return &ClusterMembers{} }, // Register versioned resource + nil, + management.NewClusterMembersREST), + builders.NewApiResourceWithStorage( + management.InternalClusterResetREST, + func() runtime.Object { return &ClusterReset{} }, // Register versioned resource + nil, + management.NewClusterResetREST), + builders.NewApiResourceWithStorage( + management.InternalClusterVirtualClusterDefaultsREST, + func() runtime.Object { return &ClusterVirtualClusterDefaults{} }, // Register versioned resource + nil, + management.NewClusterVirtualClusterDefaultsREST), + management.ManagementClusterAccessStorage, + management.ManagementClusterConnectStorage, + management.ManagementClusterRoleTemplateStorage, + management.ManagementConfigStorage, + management.ManagementDevPodWorkspaceInstanceStorage, + builders.NewApiResourceWithStorage( + management.InternalDevPodWorkspaceInstanceDeleteREST, + func() runtime.Object { return &DevPodWorkspaceInstanceDelete{} }, // Register versioned resource + nil, + management.NewDevPodWorkspaceInstanceDeleteREST), + builders.NewApiResourceWithStorage( + management.InternalDevPodWorkspaceInstanceGetStatusREST, + func() runtime.Object { return &DevPodWorkspaceInstanceGetStatus{} }, // Register versioned resource + nil, + management.NewDevPodWorkspaceInstanceGetStatusREST), + builders.NewApiResourceWithStorage( + management.InternalDevPodWorkspaceInstanceSshREST, + func() runtime.Object { return &DevPodWorkspaceInstanceSsh{} }, // Register versioned resource + nil, + management.NewDevPodWorkspaceInstanceSshREST), + builders.NewApiResourceWithStorage( + management.InternalDevPodWorkspaceInstanceStopREST, + func() runtime.Object { return &DevPodWorkspaceInstanceStop{} }, // Register versioned resource + nil, + management.NewDevPodWorkspaceInstanceStopREST), + builders.NewApiResourceWithStorage( + management.InternalDevPodWorkspaceInstanceUpREST, + func() runtime.Object { return &DevPodWorkspaceInstanceUp{} }, // Register versioned resource + nil, + management.NewDevPodWorkspaceInstanceUpREST), + management.ManagementDevPodWorkspaceTemplateStorage, + management.ManagementDirectClusterEndpointTokenStorage, + management.ManagementEventStorage, + management.ManagementFeatureStorage, + management.ManagementIngressAuthTokenStorage, + management.ManagementKioskStorage, + management.ManagementLicenseStorage, + builders.NewApiResourceWithStorage( + management.InternalLicenseRequestREST, + func() runtime.Object { return &LicenseRequest{} }, // Register versioned resource + nil, + management.NewLicenseRequestREST), + management.ManagementLicenseTokenStorage, + management.ManagementLoftUpgradeStorage, + management.ManagementOwnedAccessKeyStorage, + management.ManagementPolicyViolationStorage, + management.ManagementProjectStorage, + builders.NewApiResourceWithStorage( + management.InternalProjectStatus, + func() runtime.Object { return &Project{} }, // Register versioned resource + func() runtime.Object { return &ProjectList{} }, // Register versioned resource list + management.NewProjectStatusREST), + builders.NewApiResourceWithStorage( + management.InternalProjectChartInfoREST, + func() runtime.Object { return &ProjectChartInfo{} }, // Register versioned resource + nil, + management.NewProjectChartInfoREST), + builders.NewApiResourceWithStorage( + management.InternalProjectChartsREST, + func() runtime.Object { return &ProjectCharts{} }, // Register versioned resource + nil, + management.NewProjectChartsREST), + builders.NewApiResourceWithStorage( + management.InternalProjectClustersREST, + func() runtime.Object { return &ProjectClusters{} }, // Register versioned resource + nil, + management.NewProjectClustersREST), + builders.NewApiResourceWithStorage( + management.InternalProjectImportSpaceREST, + func() runtime.Object { return &ProjectImportSpace{} }, // Register versioned resource + nil, + management.NewProjectImportSpaceREST), + builders.NewApiResourceWithStorage( + management.InternalProjectImportVirtualClusterREST, + func() runtime.Object { return &ProjectImportVirtualCluster{} }, // Register versioned resource + nil, + management.NewProjectImportVirtualClusterREST), + builders.NewApiResourceWithStorage( + management.InternalProjectMembersREST, + func() runtime.Object { return &ProjectMembers{} }, // Register versioned resource + nil, + management.NewProjectMembersREST), + builders.NewApiResourceWithStorage( + management.InternalProjectMigrateSpaceInstanceREST, + func() runtime.Object { return &ProjectMigrateSpaceInstance{} }, // Register versioned resource + nil, + management.NewProjectMigrateSpaceInstanceREST), + builders.NewApiResourceWithStorage( + management.InternalProjectMigrateVirtualClusterInstanceREST, + func() runtime.Object { return &ProjectMigrateVirtualClusterInstance{} }, // Register versioned resource + nil, + management.NewProjectMigrateVirtualClusterInstanceREST), + builders.NewApiResourceWithStorage( + management.InternalProjectTemplatesREST, + func() runtime.Object { return &ProjectTemplates{} }, // Register versioned resource + nil, + management.NewProjectTemplatesREST), + management.ManagementProjectSecretStorage, + management.ManagementRedirectTokenStorage, + management.ManagementResetAccessKeyStorage, + management.ManagementRunnerStorage, + builders.NewApiResourceWithStorage( + management.InternalRunnerStatus, + func() runtime.Object { return &Runner{} }, // Register versioned resource + func() runtime.Object { return &RunnerList{} }, // Register versioned resource list + management.NewRunnerStatusREST), + builders.NewApiResourceWithStorage( + management.InternalRunnerAccessKeyREST, + func() runtime.Object { return &RunnerAccessKey{} }, // Register versioned resource + nil, + management.NewRunnerAccessKeyREST), + builders.NewApiResourceWithStorage( + management.InternalRunnerConfigREST, + func() runtime.Object { return &RunnerConfig{} }, // Register versioned resource + nil, + management.NewRunnerConfigREST), + management.ManagementSelfStorage, + management.ManagementSelfSubjectAccessReviewStorage, + management.ManagementSharedSecretStorage, + management.ManagementSpaceConstraintStorage, + management.ManagementSpaceInstanceStorage, + management.ManagementSpaceTemplateStorage, + management.ManagementSubjectAccessReviewStorage, + management.ManagementTaskStorage, + builders.NewApiResourceWithStorage( + management.InternalTaskLogREST, + func() runtime.Object { return &TaskLog{} }, // Register versioned resource + nil, + management.NewTaskLogREST), + management.ManagementTeamStorage, + builders.NewApiResourceWithStorage( + management.InternalTeamAccessKeysREST, + func() runtime.Object { return &TeamAccessKeys{} }, // Register versioned resource + nil, + management.NewTeamAccessKeysREST), + builders.NewApiResourceWithStorage( + management.InternalTeamClustersREST, + func() runtime.Object { return &TeamClusters{} }, // Register versioned resource + nil, + management.NewTeamClustersREST), + management.ManagementUserStorage, + builders.NewApiResourceWithStorage( + management.InternalUserAccessKeysREST, + func() runtime.Object { return &UserAccessKeys{} }, // Register versioned resource + nil, + management.NewUserAccessKeysREST), + builders.NewApiResourceWithStorage( + management.InternalUserClustersREST, + func() runtime.Object { return &UserClusters{} }, // Register versioned resource + nil, + management.NewUserClustersREST), + builders.NewApiResourceWithStorage( + management.InternalUserPermissionsREST, + func() runtime.Object { return &UserPermissions{} }, // Register versioned resource + nil, + management.NewUserPermissionsREST), + builders.NewApiResourceWithStorage( + management.InternalUserProfileREST, + func() runtime.Object { return &UserProfile{} }, // Register versioned resource + nil, + management.NewUserProfileREST), + management.ManagementVirtualClusterInstanceStorage, + builders.NewApiResourceWithStorage( + management.InternalVirtualClusterInstanceKubeConfigREST, + func() runtime.Object { return &VirtualClusterInstanceKubeConfig{} }, // Register versioned resource + nil, + management.NewVirtualClusterInstanceKubeConfigREST), + builders.NewApiResourceWithStorage( + management.InternalVirtualClusterInstanceLogREST, + func() runtime.Object { return &VirtualClusterInstanceLog{} }, // Register versioned resource + nil, + management.NewVirtualClusterInstanceLogREST), + builders.NewApiResourceWithStorage( + management.InternalVirtualClusterInstanceWorkloadKubeConfigREST, + func() runtime.Object { return &VirtualClusterInstanceWorkloadKubeConfig{} }, // Register versioned resource + nil, + management.NewVirtualClusterInstanceWorkloadKubeConfigREST), + management.ManagementVirtualClusterTemplateStorage, + ) + + // Required by code generated by go2idl + AddToScheme = (&runtime.SchemeBuilder{ + ApiVersion.SchemeBuilder.AddToScheme, + RegisterDefaults, + RegisterConversions, + addKnownTypes, + func(scheme *runtime.Scheme) error { + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil + }, + }).AddToScheme + + SchemeBuilder = ApiVersion.SchemeBuilder + localSchemeBuilder = SchemeBuilder + SchemeGroupVersion = ApiVersion.GroupVersion +) + +// Required by code generated by go2idl +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Required by code generated by go2idl +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type AgentAuditEventList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []AgentAuditEvent `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type AnnouncementList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Announcement `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type AppList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []App `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Cluster `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterAgentConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterAgentConfig `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterChartsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterCharts `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterDomainList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterDomain `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterMemberAccessList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterMemberAccess `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterMembersList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterMembers `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterResetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterReset `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterVirtualClusterDefaultsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterVirtualClusterDefaults `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterAccessList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterAccess `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterConnectList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterConnect `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterRoleTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterRoleTemplate `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Config `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstance `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceDeleteList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstanceDelete `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceGetStatusList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstanceGetStatus `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceSshList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstanceSsh `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceStopList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstanceStop `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceUpList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstanceUp `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceTemplate `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DirectClusterEndpointTokenList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DirectClusterEndpointToken `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type EventList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Event `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type FeatureList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Feature `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type IngressAuthTokenList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []IngressAuthToken `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type KioskList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Kiosk `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LicenseList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []License `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LicenseRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []LicenseRequest `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LicenseTokenList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []LicenseToken `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LoftUpgradeList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []LoftUpgrade `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type OwnedAccessKeyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OwnedAccessKey `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type PolicyViolationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []PolicyViolation `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Project `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectChartInfoList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectChartInfo `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectChartsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectCharts `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectClustersList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectClusters `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectImportSpaceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectImportSpace `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectImportVirtualClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectImportVirtualCluster `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectMembersList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectMembers `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectMigrateSpaceInstanceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectMigrateSpaceInstance `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectMigrateVirtualClusterInstanceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectMigrateVirtualClusterInstance `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectTemplatesList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectTemplates `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectSecretList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectSecret `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RedirectTokenList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []RedirectToken `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ResetAccessKeyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ResetAccessKey `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RunnerList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Runner `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RunnerAccessKeyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []RunnerAccessKey `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RunnerConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []RunnerConfig `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SelfList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Self `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SelfSubjectAccessReviewList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SelfSubjectAccessReview `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SharedSecretList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SharedSecret `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceConstraintList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SpaceConstraint `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceInstanceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SpaceInstance `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SpaceTemplate `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SubjectAccessReviewList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SubjectAccessReview `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TaskList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Task `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TaskLogList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TaskLog `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Team `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamAccessKeysList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TeamAccessKeys `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamClustersList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TeamClusters `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []User `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserAccessKeysList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []UserAccessKeys `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserClustersList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []UserClusters `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserPermissionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []UserPermissions `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserProfileList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []UserProfile `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterInstance `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceKubeConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterInstanceKubeConfig `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceLogList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterInstanceLog `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceWorkloadKubeConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterInstanceWorkloadKubeConfig `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterTemplate `json:"items"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.conversion.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.conversion.go new file mode 100644 index 000000000..40d51ba28 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.conversion.go @@ -0,0 +1,9500 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1 + +import ( + url "net/url" + unsafe "unsafe" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + loftstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + auditv1 "github.com/loft-sh/api/v3/pkg/apis/audit/v1" + management "github.com/loft-sh/api/v3/pkg/apis/management" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + uiv1 "github.com/loft-sh/api/v3/pkg/apis/ui/v1" + server "github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server" + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*AgentAnalyticsSpec)(nil), (*management.AgentAnalyticsSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AgentAnalyticsSpec_To_management_AgentAnalyticsSpec(a.(*AgentAnalyticsSpec), b.(*management.AgentAnalyticsSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AgentAnalyticsSpec)(nil), (*AgentAnalyticsSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AgentAnalyticsSpec_To_v1_AgentAnalyticsSpec(a.(*management.AgentAnalyticsSpec), b.(*AgentAnalyticsSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AgentAuditConfig)(nil), (*management.AgentAuditConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AgentAuditConfig_To_management_AgentAuditConfig(a.(*AgentAuditConfig), b.(*management.AgentAuditConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AgentAuditConfig)(nil), (*AgentAuditConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AgentAuditConfig_To_v1_AgentAuditConfig(a.(*management.AgentAuditConfig), b.(*AgentAuditConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AgentAuditEvent)(nil), (*management.AgentAuditEvent)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AgentAuditEvent_To_management_AgentAuditEvent(a.(*AgentAuditEvent), b.(*management.AgentAuditEvent), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AgentAuditEvent)(nil), (*AgentAuditEvent)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AgentAuditEvent_To_v1_AgentAuditEvent(a.(*management.AgentAuditEvent), b.(*AgentAuditEvent), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AgentAuditEventList)(nil), (*management.AgentAuditEventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AgentAuditEventList_To_management_AgentAuditEventList(a.(*AgentAuditEventList), b.(*management.AgentAuditEventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AgentAuditEventList)(nil), (*AgentAuditEventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AgentAuditEventList_To_v1_AgentAuditEventList(a.(*management.AgentAuditEventList), b.(*AgentAuditEventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AgentAuditEventSpec)(nil), (*management.AgentAuditEventSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AgentAuditEventSpec_To_management_AgentAuditEventSpec(a.(*AgentAuditEventSpec), b.(*management.AgentAuditEventSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AgentAuditEventSpec)(nil), (*AgentAuditEventSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AgentAuditEventSpec_To_v1_AgentAuditEventSpec(a.(*management.AgentAuditEventSpec), b.(*AgentAuditEventSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AgentAuditEventStatus)(nil), (*management.AgentAuditEventStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AgentAuditEventStatus_To_management_AgentAuditEventStatus(a.(*AgentAuditEventStatus), b.(*management.AgentAuditEventStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AgentAuditEventStatus)(nil), (*AgentAuditEventStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AgentAuditEventStatus_To_v1_AgentAuditEventStatus(a.(*management.AgentAuditEventStatus), b.(*AgentAuditEventStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Announcement)(nil), (*management.Announcement)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Announcement_To_management_Announcement(a.(*Announcement), b.(*management.Announcement), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Announcement)(nil), (*Announcement)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Announcement_To_v1_Announcement(a.(*management.Announcement), b.(*Announcement), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AnnouncementList)(nil), (*management.AnnouncementList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AnnouncementList_To_management_AnnouncementList(a.(*AnnouncementList), b.(*management.AnnouncementList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AnnouncementList)(nil), (*AnnouncementList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AnnouncementList_To_v1_AnnouncementList(a.(*management.AnnouncementList), b.(*AnnouncementList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AnnouncementSpec)(nil), (*management.AnnouncementSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AnnouncementSpec_To_management_AnnouncementSpec(a.(*AnnouncementSpec), b.(*management.AnnouncementSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AnnouncementSpec)(nil), (*AnnouncementSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AnnouncementSpec_To_v1_AnnouncementSpec(a.(*management.AnnouncementSpec), b.(*AnnouncementSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AnnouncementStatus)(nil), (*management.AnnouncementStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AnnouncementStatus_To_management_AnnouncementStatus(a.(*AnnouncementStatus), b.(*management.AnnouncementStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AnnouncementStatus)(nil), (*AnnouncementStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AnnouncementStatus_To_v1_AnnouncementStatus(a.(*management.AnnouncementStatus), b.(*AnnouncementStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*App)(nil), (*management.App)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_App_To_management_App(a.(*App), b.(*management.App), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.App)(nil), (*App)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_App_To_v1_App(a.(*management.App), b.(*App), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AppList)(nil), (*management.AppList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AppList_To_management_AppList(a.(*AppList), b.(*management.AppList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AppList)(nil), (*AppList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AppList_To_v1_AppList(a.(*management.AppList), b.(*AppList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AppSpec)(nil), (*management.AppSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AppSpec_To_management_AppSpec(a.(*AppSpec), b.(*management.AppSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AppSpec)(nil), (*AppSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AppSpec_To_v1_AppSpec(a.(*management.AppSpec), b.(*AppSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AppStatus)(nil), (*management.AppStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AppStatus_To_management_AppStatus(a.(*AppStatus), b.(*management.AppStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AppStatus)(nil), (*AppStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AppStatus_To_v1_AppStatus(a.(*management.AppStatus), b.(*AppStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Apps)(nil), (*management.Apps)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Apps_To_management_Apps(a.(*Apps), b.(*management.Apps), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Apps)(nil), (*Apps)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Apps_To_v1_Apps(a.(*management.Apps), b.(*Apps), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Audit)(nil), (*management.Audit)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Audit_To_management_Audit(a.(*Audit), b.(*management.Audit), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Audit)(nil), (*Audit)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Audit_To_v1_Audit(a.(*management.Audit), b.(*Audit), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuditPolicy)(nil), (*management.AuditPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuditPolicy_To_management_AuditPolicy(a.(*AuditPolicy), b.(*management.AuditPolicy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuditPolicy)(nil), (*AuditPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuditPolicy_To_v1_AuditPolicy(a.(*management.AuditPolicy), b.(*AuditPolicy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuditPolicyRule)(nil), (*management.AuditPolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuditPolicyRule_To_management_AuditPolicyRule(a.(*AuditPolicyRule), b.(*management.AuditPolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuditPolicyRule)(nil), (*AuditPolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuditPolicyRule_To_v1_AuditPolicyRule(a.(*management.AuditPolicyRule), b.(*AuditPolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Authentication)(nil), (*management.Authentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Authentication_To_management_Authentication(a.(*Authentication), b.(*management.Authentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Authentication)(nil), (*Authentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Authentication_To_v1_Authentication(a.(*management.Authentication), b.(*Authentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuthenticationClusterAccountTemplates)(nil), (*management.AuthenticationClusterAccountTemplates)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuthenticationClusterAccountTemplates_To_management_AuthenticationClusterAccountTemplates(a.(*AuthenticationClusterAccountTemplates), b.(*management.AuthenticationClusterAccountTemplates), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuthenticationClusterAccountTemplates)(nil), (*AuthenticationClusterAccountTemplates)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuthenticationClusterAccountTemplates_To_v1_AuthenticationClusterAccountTemplates(a.(*management.AuthenticationClusterAccountTemplates), b.(*AuthenticationClusterAccountTemplates), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuthenticationGithub)(nil), (*management.AuthenticationGithub)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuthenticationGithub_To_management_AuthenticationGithub(a.(*AuthenticationGithub), b.(*management.AuthenticationGithub), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuthenticationGithub)(nil), (*AuthenticationGithub)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuthenticationGithub_To_v1_AuthenticationGithub(a.(*management.AuthenticationGithub), b.(*AuthenticationGithub), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuthenticationGithubOrg)(nil), (*management.AuthenticationGithubOrg)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuthenticationGithubOrg_To_management_AuthenticationGithubOrg(a.(*AuthenticationGithubOrg), b.(*management.AuthenticationGithubOrg), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuthenticationGithubOrg)(nil), (*AuthenticationGithubOrg)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuthenticationGithubOrg_To_v1_AuthenticationGithubOrg(a.(*management.AuthenticationGithubOrg), b.(*AuthenticationGithubOrg), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuthenticationGitlab)(nil), (*management.AuthenticationGitlab)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuthenticationGitlab_To_management_AuthenticationGitlab(a.(*AuthenticationGitlab), b.(*management.AuthenticationGitlab), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuthenticationGitlab)(nil), (*AuthenticationGitlab)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuthenticationGitlab_To_v1_AuthenticationGitlab(a.(*management.AuthenticationGitlab), b.(*AuthenticationGitlab), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuthenticationGoogle)(nil), (*management.AuthenticationGoogle)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuthenticationGoogle_To_management_AuthenticationGoogle(a.(*AuthenticationGoogle), b.(*management.AuthenticationGoogle), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuthenticationGoogle)(nil), (*AuthenticationGoogle)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuthenticationGoogle_To_v1_AuthenticationGoogle(a.(*management.AuthenticationGoogle), b.(*AuthenticationGoogle), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuthenticationGroupClusterAccountTemplate)(nil), (*management.AuthenticationGroupClusterAccountTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuthenticationGroupClusterAccountTemplate_To_management_AuthenticationGroupClusterAccountTemplate(a.(*AuthenticationGroupClusterAccountTemplate), b.(*management.AuthenticationGroupClusterAccountTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuthenticationGroupClusterAccountTemplate)(nil), (*AuthenticationGroupClusterAccountTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuthenticationGroupClusterAccountTemplate_To_v1_AuthenticationGroupClusterAccountTemplate(a.(*management.AuthenticationGroupClusterAccountTemplate), b.(*AuthenticationGroupClusterAccountTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuthenticationMicrosoft)(nil), (*management.AuthenticationMicrosoft)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuthenticationMicrosoft_To_management_AuthenticationMicrosoft(a.(*AuthenticationMicrosoft), b.(*management.AuthenticationMicrosoft), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuthenticationMicrosoft)(nil), (*AuthenticationMicrosoft)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuthenticationMicrosoft_To_v1_AuthenticationMicrosoft(a.(*management.AuthenticationMicrosoft), b.(*AuthenticationMicrosoft), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuthenticationOIDC)(nil), (*management.AuthenticationOIDC)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuthenticationOIDC_To_management_AuthenticationOIDC(a.(*AuthenticationOIDC), b.(*management.AuthenticationOIDC), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuthenticationOIDC)(nil), (*AuthenticationOIDC)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuthenticationOIDC_To_v1_AuthenticationOIDC(a.(*management.AuthenticationOIDC), b.(*AuthenticationOIDC), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuthenticationPassword)(nil), (*management.AuthenticationPassword)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuthenticationPassword_To_management_AuthenticationPassword(a.(*AuthenticationPassword), b.(*management.AuthenticationPassword), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuthenticationPassword)(nil), (*AuthenticationPassword)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuthenticationPassword_To_v1_AuthenticationPassword(a.(*management.AuthenticationPassword), b.(*AuthenticationPassword), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuthenticationSAML)(nil), (*management.AuthenticationSAML)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AuthenticationSAML_To_management_AuthenticationSAML(a.(*AuthenticationSAML), b.(*management.AuthenticationSAML), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AuthenticationSAML)(nil), (*AuthenticationSAML)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AuthenticationSAML_To_v1_AuthenticationSAML(a.(*management.AuthenticationSAML), b.(*AuthenticationSAML), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Cluster)(nil), (*management.Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Cluster_To_management_Cluster(a.(*Cluster), b.(*management.Cluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Cluster)(nil), (*Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Cluster_To_v1_Cluster(a.(*management.Cluster), b.(*Cluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterAccess)(nil), (*management.ClusterAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterAccess_To_management_ClusterAccess(a.(*ClusterAccess), b.(*management.ClusterAccess), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterAccess)(nil), (*ClusterAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterAccess_To_v1_ClusterAccess(a.(*management.ClusterAccess), b.(*ClusterAccess), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterAccessList)(nil), (*management.ClusterAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterAccessList_To_management_ClusterAccessList(a.(*ClusterAccessList), b.(*management.ClusterAccessList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterAccessList)(nil), (*ClusterAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterAccessList_To_v1_ClusterAccessList(a.(*management.ClusterAccessList), b.(*ClusterAccessList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterAccessSpec)(nil), (*management.ClusterAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterAccessSpec_To_management_ClusterAccessSpec(a.(*ClusterAccessSpec), b.(*management.ClusterAccessSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterAccessSpec)(nil), (*ClusterAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterAccessSpec_To_v1_ClusterAccessSpec(a.(*management.ClusterAccessSpec), b.(*ClusterAccessSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterAccessStatus)(nil), (*management.ClusterAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterAccessStatus_To_management_ClusterAccessStatus(a.(*ClusterAccessStatus), b.(*management.ClusterAccessStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterAccessStatus)(nil), (*ClusterAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterAccessStatus_To_v1_ClusterAccessStatus(a.(*management.ClusterAccessStatus), b.(*ClusterAccessStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterAccounts)(nil), (*management.ClusterAccounts)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterAccounts_To_management_ClusterAccounts(a.(*ClusterAccounts), b.(*management.ClusterAccounts), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterAccounts)(nil), (*ClusterAccounts)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterAccounts_To_v1_ClusterAccounts(a.(*management.ClusterAccounts), b.(*ClusterAccounts), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterAgentConfig)(nil), (*management.ClusterAgentConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterAgentConfig_To_management_ClusterAgentConfig(a.(*ClusterAgentConfig), b.(*management.ClusterAgentConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterAgentConfig)(nil), (*ClusterAgentConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterAgentConfig_To_v1_ClusterAgentConfig(a.(*management.ClusterAgentConfig), b.(*ClusterAgentConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterAgentConfigList)(nil), (*management.ClusterAgentConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterAgentConfigList_To_management_ClusterAgentConfigList(a.(*ClusterAgentConfigList), b.(*management.ClusterAgentConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterAgentConfigList)(nil), (*ClusterAgentConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterAgentConfigList_To_v1_ClusterAgentConfigList(a.(*management.ClusterAgentConfigList), b.(*ClusterAgentConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterCharts)(nil), (*management.ClusterCharts)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterCharts_To_management_ClusterCharts(a.(*ClusterCharts), b.(*management.ClusterCharts), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterCharts)(nil), (*ClusterCharts)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterCharts_To_v1_ClusterCharts(a.(*management.ClusterCharts), b.(*ClusterCharts), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterChartsList)(nil), (*management.ClusterChartsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterChartsList_To_management_ClusterChartsList(a.(*ClusterChartsList), b.(*management.ClusterChartsList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterChartsList)(nil), (*ClusterChartsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterChartsList_To_v1_ClusterChartsList(a.(*management.ClusterChartsList), b.(*ClusterChartsList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterConnect)(nil), (*management.ClusterConnect)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterConnect_To_management_ClusterConnect(a.(*ClusterConnect), b.(*management.ClusterConnect), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterConnect)(nil), (*ClusterConnect)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterConnect_To_v1_ClusterConnect(a.(*management.ClusterConnect), b.(*ClusterConnect), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterConnectList)(nil), (*management.ClusterConnectList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterConnectList_To_management_ClusterConnectList(a.(*ClusterConnectList), b.(*management.ClusterConnectList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterConnectList)(nil), (*ClusterConnectList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterConnectList_To_v1_ClusterConnectList(a.(*management.ClusterConnectList), b.(*ClusterConnectList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterConnectSpec)(nil), (*management.ClusterConnectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterConnectSpec_To_management_ClusterConnectSpec(a.(*ClusterConnectSpec), b.(*management.ClusterConnectSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterConnectSpec)(nil), (*ClusterConnectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterConnectSpec_To_v1_ClusterConnectSpec(a.(*management.ClusterConnectSpec), b.(*ClusterConnectSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterConnectStatus)(nil), (*management.ClusterConnectStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterConnectStatus_To_management_ClusterConnectStatus(a.(*ClusterConnectStatus), b.(*management.ClusterConnectStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterConnectStatus)(nil), (*ClusterConnectStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterConnectStatus_To_v1_ClusterConnectStatus(a.(*management.ClusterConnectStatus), b.(*ClusterConnectStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterDomain)(nil), (*management.ClusterDomain)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterDomain_To_management_ClusterDomain(a.(*ClusterDomain), b.(*management.ClusterDomain), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterDomain)(nil), (*ClusterDomain)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterDomain_To_v1_ClusterDomain(a.(*management.ClusterDomain), b.(*ClusterDomain), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterDomainList)(nil), (*management.ClusterDomainList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterDomainList_To_management_ClusterDomainList(a.(*ClusterDomainList), b.(*management.ClusterDomainList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterDomainList)(nil), (*ClusterDomainList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterDomainList_To_v1_ClusterDomainList(a.(*management.ClusterDomainList), b.(*ClusterDomainList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterList)(nil), (*management.ClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterList_To_management_ClusterList(a.(*ClusterList), b.(*management.ClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterList)(nil), (*ClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterList_To_v1_ClusterList(a.(*management.ClusterList), b.(*ClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterMember)(nil), (*management.ClusterMember)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterMember_To_management_ClusterMember(a.(*ClusterMember), b.(*management.ClusterMember), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterMember)(nil), (*ClusterMember)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterMember_To_v1_ClusterMember(a.(*management.ClusterMember), b.(*ClusterMember), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterMemberAccess)(nil), (*management.ClusterMemberAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterMemberAccess_To_management_ClusterMemberAccess(a.(*ClusterMemberAccess), b.(*management.ClusterMemberAccess), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterMemberAccess)(nil), (*ClusterMemberAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterMemberAccess_To_v1_ClusterMemberAccess(a.(*management.ClusterMemberAccess), b.(*ClusterMemberAccess), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterMemberAccessList)(nil), (*management.ClusterMemberAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterMemberAccessList_To_management_ClusterMemberAccessList(a.(*ClusterMemberAccessList), b.(*management.ClusterMemberAccessList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterMemberAccessList)(nil), (*ClusterMemberAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterMemberAccessList_To_v1_ClusterMemberAccessList(a.(*management.ClusterMemberAccessList), b.(*ClusterMemberAccessList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterMembers)(nil), (*management.ClusterMembers)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterMembers_To_management_ClusterMembers(a.(*ClusterMembers), b.(*management.ClusterMembers), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterMembers)(nil), (*ClusterMembers)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterMembers_To_v1_ClusterMembers(a.(*management.ClusterMembers), b.(*ClusterMembers), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterMembersList)(nil), (*management.ClusterMembersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterMembersList_To_management_ClusterMembersList(a.(*ClusterMembersList), b.(*management.ClusterMembersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterMembersList)(nil), (*ClusterMembersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterMembersList_To_v1_ClusterMembersList(a.(*management.ClusterMembersList), b.(*ClusterMembersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterReset)(nil), (*management.ClusterReset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterReset_To_management_ClusterReset(a.(*ClusterReset), b.(*management.ClusterReset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterReset)(nil), (*ClusterReset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterReset_To_v1_ClusterReset(a.(*management.ClusterReset), b.(*ClusterReset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterResetList)(nil), (*management.ClusterResetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterResetList_To_management_ClusterResetList(a.(*ClusterResetList), b.(*management.ClusterResetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterResetList)(nil), (*ClusterResetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterResetList_To_v1_ClusterResetList(a.(*management.ClusterResetList), b.(*ClusterResetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterRoleTemplate)(nil), (*management.ClusterRoleTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterRoleTemplate_To_management_ClusterRoleTemplate(a.(*ClusterRoleTemplate), b.(*management.ClusterRoleTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterRoleTemplate)(nil), (*ClusterRoleTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterRoleTemplate_To_v1_ClusterRoleTemplate(a.(*management.ClusterRoleTemplate), b.(*ClusterRoleTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterRoleTemplateList)(nil), (*management.ClusterRoleTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterRoleTemplateList_To_management_ClusterRoleTemplateList(a.(*ClusterRoleTemplateList), b.(*management.ClusterRoleTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterRoleTemplateList)(nil), (*ClusterRoleTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterRoleTemplateList_To_v1_ClusterRoleTemplateList(a.(*management.ClusterRoleTemplateList), b.(*ClusterRoleTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterRoleTemplateSpec)(nil), (*management.ClusterRoleTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterRoleTemplateSpec_To_management_ClusterRoleTemplateSpec(a.(*ClusterRoleTemplateSpec), b.(*management.ClusterRoleTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterRoleTemplateSpec)(nil), (*ClusterRoleTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterRoleTemplateSpec_To_v1_ClusterRoleTemplateSpec(a.(*management.ClusterRoleTemplateSpec), b.(*ClusterRoleTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterRoleTemplateStatus)(nil), (*management.ClusterRoleTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterRoleTemplateStatus_To_management_ClusterRoleTemplateStatus(a.(*ClusterRoleTemplateStatus), b.(*management.ClusterRoleTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterRoleTemplateStatus)(nil), (*ClusterRoleTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterRoleTemplateStatus_To_v1_ClusterRoleTemplateStatus(a.(*management.ClusterRoleTemplateStatus), b.(*ClusterRoleTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterSpec)(nil), (*management.ClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterSpec_To_management_ClusterSpec(a.(*ClusterSpec), b.(*management.ClusterSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterSpec)(nil), (*ClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterSpec_To_v1_ClusterSpec(a.(*management.ClusterSpec), b.(*ClusterSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterStatus)(nil), (*management.ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterStatus_To_management_ClusterStatus(a.(*ClusterStatus), b.(*management.ClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterStatus)(nil), (*ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterStatus_To_v1_ClusterStatus(a.(*management.ClusterStatus), b.(*ClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterVirtualClusterDefaults)(nil), (*management.ClusterVirtualClusterDefaults)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterVirtualClusterDefaults_To_management_ClusterVirtualClusterDefaults(a.(*ClusterVirtualClusterDefaults), b.(*management.ClusterVirtualClusterDefaults), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterVirtualClusterDefaults)(nil), (*ClusterVirtualClusterDefaults)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterVirtualClusterDefaults_To_v1_ClusterVirtualClusterDefaults(a.(*management.ClusterVirtualClusterDefaults), b.(*ClusterVirtualClusterDefaults), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterVirtualClusterDefaultsList)(nil), (*management.ClusterVirtualClusterDefaultsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterVirtualClusterDefaultsList_To_management_ClusterVirtualClusterDefaultsList(a.(*ClusterVirtualClusterDefaultsList), b.(*management.ClusterVirtualClusterDefaultsList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterVirtualClusterDefaultsList)(nil), (*ClusterVirtualClusterDefaultsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterVirtualClusterDefaultsList_To_v1_ClusterVirtualClusterDefaultsList(a.(*management.ClusterVirtualClusterDefaultsList), b.(*ClusterVirtualClusterDefaultsList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Config)(nil), (*management.Config)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Config_To_management_Config(a.(*Config), b.(*management.Config), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Config)(nil), (*Config)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Config_To_v1_Config(a.(*management.Config), b.(*Config), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ConfigList)(nil), (*management.ConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ConfigList_To_management_ConfigList(a.(*ConfigList), b.(*management.ConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ConfigList)(nil), (*ConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ConfigList_To_v1_ConfigList(a.(*management.ConfigList), b.(*ConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ConfigSpec)(nil), (*management.ConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ConfigSpec_To_management_ConfigSpec(a.(*ConfigSpec), b.(*management.ConfigSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ConfigSpec)(nil), (*ConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ConfigSpec_To_v1_ConfigSpec(a.(*management.ConfigSpec), b.(*ConfigSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ConfigStatus)(nil), (*management.ConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ConfigStatus_To_management_ConfigStatus(a.(*ConfigStatus), b.(*management.ConfigStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ConfigStatus)(nil), (*ConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ConfigStatus_To_v1_ConfigStatus(a.(*management.ConfigStatus), b.(*ConfigStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Connector)(nil), (*management.Connector)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Connector_To_management_Connector(a.(*Connector), b.(*management.Connector), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Connector)(nil), (*Connector)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Connector_To_v1_Connector(a.(*management.Connector), b.(*Connector), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ConnectorWithName)(nil), (*management.ConnectorWithName)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ConnectorWithName_To_management_ConnectorWithName(a.(*ConnectorWithName), b.(*management.ConnectorWithName), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ConnectorWithName)(nil), (*ConnectorWithName)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ConnectorWithName_To_v1_ConnectorWithName(a.(*management.ConnectorWithName), b.(*ConnectorWithName), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodDeleteOptions)(nil), (*management.DevPodDeleteOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodDeleteOptions_To_management_DevPodDeleteOptions(a.(*DevPodDeleteOptions), b.(*management.DevPodDeleteOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodDeleteOptions)(nil), (*DevPodDeleteOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodDeleteOptions_To_v1_DevPodDeleteOptions(a.(*management.DevPodDeleteOptions), b.(*DevPodDeleteOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodSshOptions)(nil), (*management.DevPodSshOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodSshOptions_To_management_DevPodSshOptions(a.(*DevPodSshOptions), b.(*management.DevPodSshOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodSshOptions)(nil), (*DevPodSshOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodSshOptions_To_v1_DevPodSshOptions(a.(*management.DevPodSshOptions), b.(*DevPodSshOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodStatusOptions)(nil), (*management.DevPodStatusOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodStatusOptions_To_management_DevPodStatusOptions(a.(*DevPodStatusOptions), b.(*management.DevPodStatusOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodStatusOptions)(nil), (*DevPodStatusOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodStatusOptions_To_v1_DevPodStatusOptions(a.(*management.DevPodStatusOptions), b.(*DevPodStatusOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodStopOptions)(nil), (*management.DevPodStopOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodStopOptions_To_management_DevPodStopOptions(a.(*DevPodStopOptions), b.(*management.DevPodStopOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodStopOptions)(nil), (*DevPodStopOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodStopOptions_To_v1_DevPodStopOptions(a.(*management.DevPodStopOptions), b.(*DevPodStopOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodUpOptions)(nil), (*management.DevPodUpOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodUpOptions_To_management_DevPodUpOptions(a.(*DevPodUpOptions), b.(*management.DevPodUpOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodUpOptions)(nil), (*DevPodUpOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodUpOptions_To_v1_DevPodUpOptions(a.(*management.DevPodUpOptions), b.(*DevPodUpOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstance)(nil), (*management.DevPodWorkspaceInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstance_To_management_DevPodWorkspaceInstance(a.(*DevPodWorkspaceInstance), b.(*management.DevPodWorkspaceInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstance)(nil), (*DevPodWorkspaceInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstance_To_v1_DevPodWorkspaceInstance(a.(*management.DevPodWorkspaceInstance), b.(*DevPodWorkspaceInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceDelete)(nil), (*management.DevPodWorkspaceInstanceDelete)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceDelete_To_management_DevPodWorkspaceInstanceDelete(a.(*DevPodWorkspaceInstanceDelete), b.(*management.DevPodWorkspaceInstanceDelete), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceDelete)(nil), (*DevPodWorkspaceInstanceDelete)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceDelete_To_v1_DevPodWorkspaceInstanceDelete(a.(*management.DevPodWorkspaceInstanceDelete), b.(*DevPodWorkspaceInstanceDelete), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceDeleteList)(nil), (*management.DevPodWorkspaceInstanceDeleteList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceDeleteList_To_management_DevPodWorkspaceInstanceDeleteList(a.(*DevPodWorkspaceInstanceDeleteList), b.(*management.DevPodWorkspaceInstanceDeleteList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceDeleteList)(nil), (*DevPodWorkspaceInstanceDeleteList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceDeleteList_To_v1_DevPodWorkspaceInstanceDeleteList(a.(*management.DevPodWorkspaceInstanceDeleteList), b.(*DevPodWorkspaceInstanceDeleteList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceGetStatus)(nil), (*management.DevPodWorkspaceInstanceGetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceGetStatus_To_management_DevPodWorkspaceInstanceGetStatus(a.(*DevPodWorkspaceInstanceGetStatus), b.(*management.DevPodWorkspaceInstanceGetStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceGetStatus)(nil), (*DevPodWorkspaceInstanceGetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceGetStatus_To_v1_DevPodWorkspaceInstanceGetStatus(a.(*management.DevPodWorkspaceInstanceGetStatus), b.(*DevPodWorkspaceInstanceGetStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceGetStatusList)(nil), (*management.DevPodWorkspaceInstanceGetStatusList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceGetStatusList_To_management_DevPodWorkspaceInstanceGetStatusList(a.(*DevPodWorkspaceInstanceGetStatusList), b.(*management.DevPodWorkspaceInstanceGetStatusList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceGetStatusList)(nil), (*DevPodWorkspaceInstanceGetStatusList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceGetStatusList_To_v1_DevPodWorkspaceInstanceGetStatusList(a.(*management.DevPodWorkspaceInstanceGetStatusList), b.(*DevPodWorkspaceInstanceGetStatusList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceList)(nil), (*management.DevPodWorkspaceInstanceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceList_To_management_DevPodWorkspaceInstanceList(a.(*DevPodWorkspaceInstanceList), b.(*management.DevPodWorkspaceInstanceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceList)(nil), (*DevPodWorkspaceInstanceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceList_To_v1_DevPodWorkspaceInstanceList(a.(*management.DevPodWorkspaceInstanceList), b.(*DevPodWorkspaceInstanceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceSpec)(nil), (*management.DevPodWorkspaceInstanceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceSpec_To_management_DevPodWorkspaceInstanceSpec(a.(*DevPodWorkspaceInstanceSpec), b.(*management.DevPodWorkspaceInstanceSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceSpec)(nil), (*DevPodWorkspaceInstanceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceSpec_To_v1_DevPodWorkspaceInstanceSpec(a.(*management.DevPodWorkspaceInstanceSpec), b.(*DevPodWorkspaceInstanceSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceSsh)(nil), (*management.DevPodWorkspaceInstanceSsh)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceSsh_To_management_DevPodWorkspaceInstanceSsh(a.(*DevPodWorkspaceInstanceSsh), b.(*management.DevPodWorkspaceInstanceSsh), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceSsh)(nil), (*DevPodWorkspaceInstanceSsh)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceSsh_To_v1_DevPodWorkspaceInstanceSsh(a.(*management.DevPodWorkspaceInstanceSsh), b.(*DevPodWorkspaceInstanceSsh), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceSshList)(nil), (*management.DevPodWorkspaceInstanceSshList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceSshList_To_management_DevPodWorkspaceInstanceSshList(a.(*DevPodWorkspaceInstanceSshList), b.(*management.DevPodWorkspaceInstanceSshList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceSshList)(nil), (*DevPodWorkspaceInstanceSshList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceSshList_To_v1_DevPodWorkspaceInstanceSshList(a.(*management.DevPodWorkspaceInstanceSshList), b.(*DevPodWorkspaceInstanceSshList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceStatus)(nil), (*management.DevPodWorkspaceInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceStatus_To_management_DevPodWorkspaceInstanceStatus(a.(*DevPodWorkspaceInstanceStatus), b.(*management.DevPodWorkspaceInstanceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceStatus)(nil), (*DevPodWorkspaceInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceStatus_To_v1_DevPodWorkspaceInstanceStatus(a.(*management.DevPodWorkspaceInstanceStatus), b.(*DevPodWorkspaceInstanceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceStop)(nil), (*management.DevPodWorkspaceInstanceStop)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceStop_To_management_DevPodWorkspaceInstanceStop(a.(*DevPodWorkspaceInstanceStop), b.(*management.DevPodWorkspaceInstanceStop), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceStop)(nil), (*DevPodWorkspaceInstanceStop)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceStop_To_v1_DevPodWorkspaceInstanceStop(a.(*management.DevPodWorkspaceInstanceStop), b.(*DevPodWorkspaceInstanceStop), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceStopList)(nil), (*management.DevPodWorkspaceInstanceStopList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceStopList_To_management_DevPodWorkspaceInstanceStopList(a.(*DevPodWorkspaceInstanceStopList), b.(*management.DevPodWorkspaceInstanceStopList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceStopList)(nil), (*DevPodWorkspaceInstanceStopList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceStopList_To_v1_DevPodWorkspaceInstanceStopList(a.(*management.DevPodWorkspaceInstanceStopList), b.(*DevPodWorkspaceInstanceStopList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceUp)(nil), (*management.DevPodWorkspaceInstanceUp)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceUp_To_management_DevPodWorkspaceInstanceUp(a.(*DevPodWorkspaceInstanceUp), b.(*management.DevPodWorkspaceInstanceUp), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceUp)(nil), (*DevPodWorkspaceInstanceUp)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceUp_To_v1_DevPodWorkspaceInstanceUp(a.(*management.DevPodWorkspaceInstanceUp), b.(*DevPodWorkspaceInstanceUp), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceUpList)(nil), (*management.DevPodWorkspaceInstanceUpList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceUpList_To_management_DevPodWorkspaceInstanceUpList(a.(*DevPodWorkspaceInstanceUpList), b.(*management.DevPodWorkspaceInstanceUpList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceUpList)(nil), (*DevPodWorkspaceInstanceUpList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceUpList_To_v1_DevPodWorkspaceInstanceUpList(a.(*management.DevPodWorkspaceInstanceUpList), b.(*DevPodWorkspaceInstanceUpList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceTemplate)(nil), (*management.DevPodWorkspaceTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceTemplate_To_management_DevPodWorkspaceTemplate(a.(*DevPodWorkspaceTemplate), b.(*management.DevPodWorkspaceTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceTemplate)(nil), (*DevPodWorkspaceTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceTemplate_To_v1_DevPodWorkspaceTemplate(a.(*management.DevPodWorkspaceTemplate), b.(*DevPodWorkspaceTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceTemplateList)(nil), (*management.DevPodWorkspaceTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceTemplateList_To_management_DevPodWorkspaceTemplateList(a.(*DevPodWorkspaceTemplateList), b.(*management.DevPodWorkspaceTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceTemplateList)(nil), (*DevPodWorkspaceTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceTemplateList_To_v1_DevPodWorkspaceTemplateList(a.(*management.DevPodWorkspaceTemplateList), b.(*DevPodWorkspaceTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceTemplateSpec)(nil), (*management.DevPodWorkspaceTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceTemplateSpec_To_management_DevPodWorkspaceTemplateSpec(a.(*DevPodWorkspaceTemplateSpec), b.(*management.DevPodWorkspaceTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceTemplateSpec)(nil), (*DevPodWorkspaceTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceTemplateSpec_To_v1_DevPodWorkspaceTemplateSpec(a.(*management.DevPodWorkspaceTemplateSpec), b.(*DevPodWorkspaceTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceTemplateStatus)(nil), (*management.DevPodWorkspaceTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceTemplateStatus_To_management_DevPodWorkspaceTemplateStatus(a.(*DevPodWorkspaceTemplateStatus), b.(*management.DevPodWorkspaceTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceTemplateStatus)(nil), (*DevPodWorkspaceTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceTemplateStatus_To_v1_DevPodWorkspaceTemplateStatus(a.(*management.DevPodWorkspaceTemplateStatus), b.(*DevPodWorkspaceTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DirectClusterEndpointToken)(nil), (*management.DirectClusterEndpointToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DirectClusterEndpointToken_To_management_DirectClusterEndpointToken(a.(*DirectClusterEndpointToken), b.(*management.DirectClusterEndpointToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DirectClusterEndpointToken)(nil), (*DirectClusterEndpointToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DirectClusterEndpointToken_To_v1_DirectClusterEndpointToken(a.(*management.DirectClusterEndpointToken), b.(*DirectClusterEndpointToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DirectClusterEndpointTokenList)(nil), (*management.DirectClusterEndpointTokenList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DirectClusterEndpointTokenList_To_management_DirectClusterEndpointTokenList(a.(*DirectClusterEndpointTokenList), b.(*management.DirectClusterEndpointTokenList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DirectClusterEndpointTokenList)(nil), (*DirectClusterEndpointTokenList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DirectClusterEndpointTokenList_To_v1_DirectClusterEndpointTokenList(a.(*management.DirectClusterEndpointTokenList), b.(*DirectClusterEndpointTokenList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DirectClusterEndpointTokenSpec)(nil), (*management.DirectClusterEndpointTokenSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DirectClusterEndpointTokenSpec_To_management_DirectClusterEndpointTokenSpec(a.(*DirectClusterEndpointTokenSpec), b.(*management.DirectClusterEndpointTokenSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DirectClusterEndpointTokenSpec)(nil), (*DirectClusterEndpointTokenSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DirectClusterEndpointTokenSpec_To_v1_DirectClusterEndpointTokenSpec(a.(*management.DirectClusterEndpointTokenSpec), b.(*DirectClusterEndpointTokenSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DirectClusterEndpointTokenStatus)(nil), (*management.DirectClusterEndpointTokenStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DirectClusterEndpointTokenStatus_To_management_DirectClusterEndpointTokenStatus(a.(*DirectClusterEndpointTokenStatus), b.(*management.DirectClusterEndpointTokenStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DirectClusterEndpointTokenStatus)(nil), (*DirectClusterEndpointTokenStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DirectClusterEndpointTokenStatus_To_v1_DirectClusterEndpointTokenStatus(a.(*management.DirectClusterEndpointTokenStatus), b.(*DirectClusterEndpointTokenStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Event)(nil), (*management.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Event_To_management_Event(a.(*Event), b.(*management.Event), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Event)(nil), (*Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Event_To_v1_Event(a.(*management.Event), b.(*Event), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*EventList)(nil), (*management.EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_EventList_To_management_EventList(a.(*EventList), b.(*management.EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.EventList)(nil), (*EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_EventList_To_v1_EventList(a.(*management.EventList), b.(*EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*EventSpec)(nil), (*management.EventSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_EventSpec_To_management_EventSpec(a.(*EventSpec), b.(*management.EventSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.EventSpec)(nil), (*EventSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_EventSpec_To_v1_EventSpec(a.(*management.EventSpec), b.(*EventSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*EventStatus)(nil), (*management.EventStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_EventStatus_To_management_EventStatus(a.(*EventStatus), b.(*management.EventStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.EventStatus)(nil), (*EventStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_EventStatus_To_v1_EventStatus(a.(*management.EventStatus), b.(*EventStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Feature)(nil), (*management.Feature)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Feature_To_management_Feature(a.(*Feature), b.(*management.Feature), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Feature)(nil), (*Feature)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Feature_To_v1_Feature(a.(*management.Feature), b.(*Feature), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FeatureList)(nil), (*management.FeatureList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_FeatureList_To_management_FeatureList(a.(*FeatureList), b.(*management.FeatureList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.FeatureList)(nil), (*FeatureList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_FeatureList_To_v1_FeatureList(a.(*management.FeatureList), b.(*FeatureList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FeatureSpec)(nil), (*management.FeatureSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_FeatureSpec_To_management_FeatureSpec(a.(*FeatureSpec), b.(*management.FeatureSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.FeatureSpec)(nil), (*FeatureSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_FeatureSpec_To_v1_FeatureSpec(a.(*management.FeatureSpec), b.(*FeatureSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FeatureStatus)(nil), (*management.FeatureStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_FeatureStatus_To_management_FeatureStatus(a.(*FeatureStatus), b.(*management.FeatureStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.FeatureStatus)(nil), (*FeatureStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_FeatureStatus_To_v1_FeatureStatus(a.(*management.FeatureStatus), b.(*FeatureStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GroupResources)(nil), (*management.GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_GroupResources_To_management_GroupResources(a.(*GroupResources), b.(*management.GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.GroupResources)(nil), (*GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_GroupResources_To_v1_GroupResources(a.(*management.GroupResources), b.(*GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*IngressAuthToken)(nil), (*management.IngressAuthToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressAuthToken_To_management_IngressAuthToken(a.(*IngressAuthToken), b.(*management.IngressAuthToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.IngressAuthToken)(nil), (*IngressAuthToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_IngressAuthToken_To_v1_IngressAuthToken(a.(*management.IngressAuthToken), b.(*IngressAuthToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*IngressAuthTokenList)(nil), (*management.IngressAuthTokenList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressAuthTokenList_To_management_IngressAuthTokenList(a.(*IngressAuthTokenList), b.(*management.IngressAuthTokenList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.IngressAuthTokenList)(nil), (*IngressAuthTokenList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_IngressAuthTokenList_To_v1_IngressAuthTokenList(a.(*management.IngressAuthTokenList), b.(*IngressAuthTokenList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*IngressAuthTokenSpec)(nil), (*management.IngressAuthTokenSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressAuthTokenSpec_To_management_IngressAuthTokenSpec(a.(*IngressAuthTokenSpec), b.(*management.IngressAuthTokenSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.IngressAuthTokenSpec)(nil), (*IngressAuthTokenSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_IngressAuthTokenSpec_To_v1_IngressAuthTokenSpec(a.(*management.IngressAuthTokenSpec), b.(*IngressAuthTokenSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*IngressAuthTokenStatus)(nil), (*management.IngressAuthTokenStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressAuthTokenStatus_To_management_IngressAuthTokenStatus(a.(*IngressAuthTokenStatus), b.(*management.IngressAuthTokenStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.IngressAuthTokenStatus)(nil), (*IngressAuthTokenStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_IngressAuthTokenStatus_To_v1_IngressAuthTokenStatus(a.(*management.IngressAuthTokenStatus), b.(*IngressAuthTokenStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Kiosk)(nil), (*management.Kiosk)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Kiosk_To_management_Kiosk(a.(*Kiosk), b.(*management.Kiosk), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Kiosk)(nil), (*Kiosk)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Kiosk_To_v1_Kiosk(a.(*management.Kiosk), b.(*Kiosk), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KioskList)(nil), (*management.KioskList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_KioskList_To_management_KioskList(a.(*KioskList), b.(*management.KioskList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.KioskList)(nil), (*KioskList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_KioskList_To_v1_KioskList(a.(*management.KioskList), b.(*KioskList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KioskSpec)(nil), (*management.KioskSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_KioskSpec_To_management_KioskSpec(a.(*KioskSpec), b.(*management.KioskSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.KioskSpec)(nil), (*KioskSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_KioskSpec_To_v1_KioskSpec(a.(*management.KioskSpec), b.(*KioskSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KioskStatus)(nil), (*management.KioskStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_KioskStatus_To_management_KioskStatus(a.(*KioskStatus), b.(*management.KioskStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.KioskStatus)(nil), (*KioskStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_KioskStatus_To_v1_KioskStatus(a.(*management.KioskStatus), b.(*KioskStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*License)(nil), (*management.License)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_License_To_management_License(a.(*License), b.(*management.License), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.License)(nil), (*License)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_License_To_v1_License(a.(*management.License), b.(*License), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseList)(nil), (*management.LicenseList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseList_To_management_LicenseList(a.(*LicenseList), b.(*management.LicenseList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseList)(nil), (*LicenseList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseList_To_v1_LicenseList(a.(*management.LicenseList), b.(*LicenseList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseRequest)(nil), (*management.LicenseRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseRequest_To_management_LicenseRequest(a.(*LicenseRequest), b.(*management.LicenseRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseRequest)(nil), (*LicenseRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseRequest_To_v1_LicenseRequest(a.(*management.LicenseRequest), b.(*LicenseRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseRequestList)(nil), (*management.LicenseRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseRequestList_To_management_LicenseRequestList(a.(*LicenseRequestList), b.(*management.LicenseRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseRequestList)(nil), (*LicenseRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseRequestList_To_v1_LicenseRequestList(a.(*management.LicenseRequestList), b.(*LicenseRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseRequestSpec)(nil), (*management.LicenseRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseRequestSpec_To_management_LicenseRequestSpec(a.(*LicenseRequestSpec), b.(*management.LicenseRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseRequestSpec)(nil), (*LicenseRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseRequestSpec_To_v1_LicenseRequestSpec(a.(*management.LicenseRequestSpec), b.(*LicenseRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseRequestStatus)(nil), (*management.LicenseRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseRequestStatus_To_management_LicenseRequestStatus(a.(*LicenseRequestStatus), b.(*management.LicenseRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseRequestStatus)(nil), (*LicenseRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseRequestStatus_To_v1_LicenseRequestStatus(a.(*management.LicenseRequestStatus), b.(*LicenseRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseSpec)(nil), (*management.LicenseSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseSpec_To_management_LicenseSpec(a.(*LicenseSpec), b.(*management.LicenseSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseSpec)(nil), (*LicenseSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseSpec_To_v1_LicenseSpec(a.(*management.LicenseSpec), b.(*LicenseSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseStatus)(nil), (*management.LicenseStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseStatus_To_management_LicenseStatus(a.(*LicenseStatus), b.(*management.LicenseStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseStatus)(nil), (*LicenseStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseStatus_To_v1_LicenseStatus(a.(*management.LicenseStatus), b.(*LicenseStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseToken)(nil), (*management.LicenseToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseToken_To_management_LicenseToken(a.(*LicenseToken), b.(*management.LicenseToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseToken)(nil), (*LicenseToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseToken_To_v1_LicenseToken(a.(*management.LicenseToken), b.(*LicenseToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseTokenList)(nil), (*management.LicenseTokenList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseTokenList_To_management_LicenseTokenList(a.(*LicenseTokenList), b.(*management.LicenseTokenList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseTokenList)(nil), (*LicenseTokenList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseTokenList_To_v1_LicenseTokenList(a.(*management.LicenseTokenList), b.(*LicenseTokenList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseTokenSpec)(nil), (*management.LicenseTokenSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseTokenSpec_To_management_LicenseTokenSpec(a.(*LicenseTokenSpec), b.(*management.LicenseTokenSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseTokenSpec)(nil), (*LicenseTokenSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseTokenSpec_To_v1_LicenseTokenSpec(a.(*management.LicenseTokenSpec), b.(*LicenseTokenSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LicenseTokenStatus)(nil), (*management.LicenseTokenStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LicenseTokenStatus_To_management_LicenseTokenStatus(a.(*LicenseTokenStatus), b.(*management.LicenseTokenStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LicenseTokenStatus)(nil), (*LicenseTokenStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LicenseTokenStatus_To_v1_LicenseTokenStatus(a.(*management.LicenseTokenStatus), b.(*LicenseTokenStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LoftUpgrade)(nil), (*management.LoftUpgrade)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LoftUpgrade_To_management_LoftUpgrade(a.(*LoftUpgrade), b.(*management.LoftUpgrade), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LoftUpgrade)(nil), (*LoftUpgrade)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LoftUpgrade_To_v1_LoftUpgrade(a.(*management.LoftUpgrade), b.(*LoftUpgrade), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LoftUpgradeList)(nil), (*management.LoftUpgradeList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LoftUpgradeList_To_management_LoftUpgradeList(a.(*LoftUpgradeList), b.(*management.LoftUpgradeList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LoftUpgradeList)(nil), (*LoftUpgradeList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LoftUpgradeList_To_v1_LoftUpgradeList(a.(*management.LoftUpgradeList), b.(*LoftUpgradeList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LoftUpgradeSpec)(nil), (*management.LoftUpgradeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LoftUpgradeSpec_To_management_LoftUpgradeSpec(a.(*LoftUpgradeSpec), b.(*management.LoftUpgradeSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LoftUpgradeSpec)(nil), (*LoftUpgradeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LoftUpgradeSpec_To_v1_LoftUpgradeSpec(a.(*management.LoftUpgradeSpec), b.(*LoftUpgradeSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LoftUpgradeStatus)(nil), (*management.LoftUpgradeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LoftUpgradeStatus_To_management_LoftUpgradeStatus(a.(*LoftUpgradeStatus), b.(*management.LoftUpgradeStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.LoftUpgradeStatus)(nil), (*LoftUpgradeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_LoftUpgradeStatus_To_v1_LoftUpgradeStatus(a.(*management.LoftUpgradeStatus), b.(*LoftUpgradeStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDC)(nil), (*management.OIDC)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_OIDC_To_management_OIDC(a.(*OIDC), b.(*management.OIDC), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.OIDC)(nil), (*OIDC)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_OIDC_To_v1_OIDC(a.(*management.OIDC), b.(*OIDC), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClient)(nil), (*management.OIDCClient)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_OIDCClient_To_management_OIDCClient(a.(*OIDCClient), b.(*management.OIDCClient), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.OIDCClient)(nil), (*OIDCClient)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_OIDCClient_To_v1_OIDCClient(a.(*management.OIDCClient), b.(*OIDCClient), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OwnedAccessKey)(nil), (*management.OwnedAccessKey)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_OwnedAccessKey_To_management_OwnedAccessKey(a.(*OwnedAccessKey), b.(*management.OwnedAccessKey), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.OwnedAccessKey)(nil), (*OwnedAccessKey)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_OwnedAccessKey_To_v1_OwnedAccessKey(a.(*management.OwnedAccessKey), b.(*OwnedAccessKey), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OwnedAccessKeyList)(nil), (*management.OwnedAccessKeyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_OwnedAccessKeyList_To_management_OwnedAccessKeyList(a.(*OwnedAccessKeyList), b.(*management.OwnedAccessKeyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.OwnedAccessKeyList)(nil), (*OwnedAccessKeyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_OwnedAccessKeyList_To_v1_OwnedAccessKeyList(a.(*management.OwnedAccessKeyList), b.(*OwnedAccessKeyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OwnedAccessKeySpec)(nil), (*management.OwnedAccessKeySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_OwnedAccessKeySpec_To_management_OwnedAccessKeySpec(a.(*OwnedAccessKeySpec), b.(*management.OwnedAccessKeySpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.OwnedAccessKeySpec)(nil), (*OwnedAccessKeySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_OwnedAccessKeySpec_To_v1_OwnedAccessKeySpec(a.(*management.OwnedAccessKeySpec), b.(*OwnedAccessKeySpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OwnedAccessKeyStatus)(nil), (*management.OwnedAccessKeyStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_OwnedAccessKeyStatus_To_management_OwnedAccessKeyStatus(a.(*OwnedAccessKeyStatus), b.(*management.OwnedAccessKeyStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.OwnedAccessKeyStatus)(nil), (*OwnedAccessKeyStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_OwnedAccessKeyStatus_To_v1_OwnedAccessKeyStatus(a.(*management.OwnedAccessKeyStatus), b.(*OwnedAccessKeyStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyViolation)(nil), (*management.PolicyViolation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_PolicyViolation_To_management_PolicyViolation(a.(*PolicyViolation), b.(*management.PolicyViolation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.PolicyViolation)(nil), (*PolicyViolation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_PolicyViolation_To_v1_PolicyViolation(a.(*management.PolicyViolation), b.(*PolicyViolation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyViolationList)(nil), (*management.PolicyViolationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_PolicyViolationList_To_management_PolicyViolationList(a.(*PolicyViolationList), b.(*management.PolicyViolationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.PolicyViolationList)(nil), (*PolicyViolationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_PolicyViolationList_To_v1_PolicyViolationList(a.(*management.PolicyViolationList), b.(*PolicyViolationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyViolationSpec)(nil), (*management.PolicyViolationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_PolicyViolationSpec_To_management_PolicyViolationSpec(a.(*PolicyViolationSpec), b.(*management.PolicyViolationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.PolicyViolationSpec)(nil), (*PolicyViolationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_PolicyViolationSpec_To_v1_PolicyViolationSpec(a.(*management.PolicyViolationSpec), b.(*PolicyViolationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyViolationStatus)(nil), (*management.PolicyViolationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_PolicyViolationStatus_To_management_PolicyViolationStatus(a.(*PolicyViolationStatus), b.(*management.PolicyViolationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.PolicyViolationStatus)(nil), (*PolicyViolationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_PolicyViolationStatus_To_v1_PolicyViolationStatus(a.(*management.PolicyViolationStatus), b.(*PolicyViolationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PredefinedApp)(nil), (*management.PredefinedApp)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_PredefinedApp_To_management_PredefinedApp(a.(*PredefinedApp), b.(*management.PredefinedApp), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.PredefinedApp)(nil), (*PredefinedApp)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_PredefinedApp_To_v1_PredefinedApp(a.(*management.PredefinedApp), b.(*PredefinedApp), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Project)(nil), (*management.Project)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Project_To_management_Project(a.(*Project), b.(*management.Project), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Project)(nil), (*Project)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Project_To_v1_Project(a.(*management.Project), b.(*Project), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectChartInfo)(nil), (*management.ProjectChartInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectChartInfo_To_management_ProjectChartInfo(a.(*ProjectChartInfo), b.(*management.ProjectChartInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectChartInfo)(nil), (*ProjectChartInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectChartInfo_To_v1_ProjectChartInfo(a.(*management.ProjectChartInfo), b.(*ProjectChartInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectChartInfoList)(nil), (*management.ProjectChartInfoList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectChartInfoList_To_management_ProjectChartInfoList(a.(*ProjectChartInfoList), b.(*management.ProjectChartInfoList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectChartInfoList)(nil), (*ProjectChartInfoList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectChartInfoList_To_v1_ProjectChartInfoList(a.(*management.ProjectChartInfoList), b.(*ProjectChartInfoList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectChartInfoSpec)(nil), (*management.ProjectChartInfoSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectChartInfoSpec_To_management_ProjectChartInfoSpec(a.(*ProjectChartInfoSpec), b.(*management.ProjectChartInfoSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectChartInfoSpec)(nil), (*ProjectChartInfoSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectChartInfoSpec_To_v1_ProjectChartInfoSpec(a.(*management.ProjectChartInfoSpec), b.(*ProjectChartInfoSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectChartInfoStatus)(nil), (*management.ProjectChartInfoStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectChartInfoStatus_To_management_ProjectChartInfoStatus(a.(*ProjectChartInfoStatus), b.(*management.ProjectChartInfoStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectChartInfoStatus)(nil), (*ProjectChartInfoStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectChartInfoStatus_To_v1_ProjectChartInfoStatus(a.(*management.ProjectChartInfoStatus), b.(*ProjectChartInfoStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectCharts)(nil), (*management.ProjectCharts)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectCharts_To_management_ProjectCharts(a.(*ProjectCharts), b.(*management.ProjectCharts), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectCharts)(nil), (*ProjectCharts)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectCharts_To_v1_ProjectCharts(a.(*management.ProjectCharts), b.(*ProjectCharts), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectChartsList)(nil), (*management.ProjectChartsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectChartsList_To_management_ProjectChartsList(a.(*ProjectChartsList), b.(*management.ProjectChartsList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectChartsList)(nil), (*ProjectChartsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectChartsList_To_v1_ProjectChartsList(a.(*management.ProjectChartsList), b.(*ProjectChartsList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectClusters)(nil), (*management.ProjectClusters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectClusters_To_management_ProjectClusters(a.(*ProjectClusters), b.(*management.ProjectClusters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectClusters)(nil), (*ProjectClusters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectClusters_To_v1_ProjectClusters(a.(*management.ProjectClusters), b.(*ProjectClusters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectClustersList)(nil), (*management.ProjectClustersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectClustersList_To_management_ProjectClustersList(a.(*ProjectClustersList), b.(*management.ProjectClustersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectClustersList)(nil), (*ProjectClustersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectClustersList_To_v1_ProjectClustersList(a.(*management.ProjectClustersList), b.(*ProjectClustersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectImportSpace)(nil), (*management.ProjectImportSpace)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectImportSpace_To_management_ProjectImportSpace(a.(*ProjectImportSpace), b.(*management.ProjectImportSpace), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectImportSpace)(nil), (*ProjectImportSpace)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectImportSpace_To_v1_ProjectImportSpace(a.(*management.ProjectImportSpace), b.(*ProjectImportSpace), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectImportSpaceList)(nil), (*management.ProjectImportSpaceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectImportSpaceList_To_management_ProjectImportSpaceList(a.(*ProjectImportSpaceList), b.(*management.ProjectImportSpaceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectImportSpaceList)(nil), (*ProjectImportSpaceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectImportSpaceList_To_v1_ProjectImportSpaceList(a.(*management.ProjectImportSpaceList), b.(*ProjectImportSpaceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectImportSpaceSource)(nil), (*management.ProjectImportSpaceSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectImportSpaceSource_To_management_ProjectImportSpaceSource(a.(*ProjectImportSpaceSource), b.(*management.ProjectImportSpaceSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectImportSpaceSource)(nil), (*ProjectImportSpaceSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectImportSpaceSource_To_v1_ProjectImportSpaceSource(a.(*management.ProjectImportSpaceSource), b.(*ProjectImportSpaceSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectImportVirtualCluster)(nil), (*management.ProjectImportVirtualCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectImportVirtualCluster_To_management_ProjectImportVirtualCluster(a.(*ProjectImportVirtualCluster), b.(*management.ProjectImportVirtualCluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectImportVirtualCluster)(nil), (*ProjectImportVirtualCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectImportVirtualCluster_To_v1_ProjectImportVirtualCluster(a.(*management.ProjectImportVirtualCluster), b.(*ProjectImportVirtualCluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectImportVirtualClusterList)(nil), (*management.ProjectImportVirtualClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectImportVirtualClusterList_To_management_ProjectImportVirtualClusterList(a.(*ProjectImportVirtualClusterList), b.(*management.ProjectImportVirtualClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectImportVirtualClusterList)(nil), (*ProjectImportVirtualClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectImportVirtualClusterList_To_v1_ProjectImportVirtualClusterList(a.(*management.ProjectImportVirtualClusterList), b.(*ProjectImportVirtualClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectImportVirtualClusterSource)(nil), (*management.ProjectImportVirtualClusterSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectImportVirtualClusterSource_To_management_ProjectImportVirtualClusterSource(a.(*ProjectImportVirtualClusterSource), b.(*management.ProjectImportVirtualClusterSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectImportVirtualClusterSource)(nil), (*ProjectImportVirtualClusterSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectImportVirtualClusterSource_To_v1_ProjectImportVirtualClusterSource(a.(*management.ProjectImportVirtualClusterSource), b.(*ProjectImportVirtualClusterSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectList)(nil), (*management.ProjectList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectList_To_management_ProjectList(a.(*ProjectList), b.(*management.ProjectList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectList)(nil), (*ProjectList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectList_To_v1_ProjectList(a.(*management.ProjectList), b.(*ProjectList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMember)(nil), (*management.ProjectMember)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectMember_To_management_ProjectMember(a.(*ProjectMember), b.(*management.ProjectMember), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectMember)(nil), (*ProjectMember)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectMember_To_v1_ProjectMember(a.(*management.ProjectMember), b.(*ProjectMember), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMembers)(nil), (*management.ProjectMembers)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectMembers_To_management_ProjectMembers(a.(*ProjectMembers), b.(*management.ProjectMembers), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectMembers)(nil), (*ProjectMembers)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectMembers_To_v1_ProjectMembers(a.(*management.ProjectMembers), b.(*ProjectMembers), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMembersList)(nil), (*management.ProjectMembersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectMembersList_To_management_ProjectMembersList(a.(*ProjectMembersList), b.(*management.ProjectMembersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectMembersList)(nil), (*ProjectMembersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectMembersList_To_v1_ProjectMembersList(a.(*management.ProjectMembersList), b.(*ProjectMembersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMigrateSpaceInstance)(nil), (*management.ProjectMigrateSpaceInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectMigrateSpaceInstance_To_management_ProjectMigrateSpaceInstance(a.(*ProjectMigrateSpaceInstance), b.(*management.ProjectMigrateSpaceInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectMigrateSpaceInstance)(nil), (*ProjectMigrateSpaceInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectMigrateSpaceInstance_To_v1_ProjectMigrateSpaceInstance(a.(*management.ProjectMigrateSpaceInstance), b.(*ProjectMigrateSpaceInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMigrateSpaceInstanceList)(nil), (*management.ProjectMigrateSpaceInstanceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectMigrateSpaceInstanceList_To_management_ProjectMigrateSpaceInstanceList(a.(*ProjectMigrateSpaceInstanceList), b.(*management.ProjectMigrateSpaceInstanceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectMigrateSpaceInstanceList)(nil), (*ProjectMigrateSpaceInstanceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectMigrateSpaceInstanceList_To_v1_ProjectMigrateSpaceInstanceList(a.(*management.ProjectMigrateSpaceInstanceList), b.(*ProjectMigrateSpaceInstanceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMigrateSpaceInstanceSource)(nil), (*management.ProjectMigrateSpaceInstanceSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectMigrateSpaceInstanceSource_To_management_ProjectMigrateSpaceInstanceSource(a.(*ProjectMigrateSpaceInstanceSource), b.(*management.ProjectMigrateSpaceInstanceSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectMigrateSpaceInstanceSource)(nil), (*ProjectMigrateSpaceInstanceSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectMigrateSpaceInstanceSource_To_v1_ProjectMigrateSpaceInstanceSource(a.(*management.ProjectMigrateSpaceInstanceSource), b.(*ProjectMigrateSpaceInstanceSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMigrateVirtualClusterInstance)(nil), (*management.ProjectMigrateVirtualClusterInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectMigrateVirtualClusterInstance_To_management_ProjectMigrateVirtualClusterInstance(a.(*ProjectMigrateVirtualClusterInstance), b.(*management.ProjectMigrateVirtualClusterInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectMigrateVirtualClusterInstance)(nil), (*ProjectMigrateVirtualClusterInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectMigrateVirtualClusterInstance_To_v1_ProjectMigrateVirtualClusterInstance(a.(*management.ProjectMigrateVirtualClusterInstance), b.(*ProjectMigrateVirtualClusterInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMigrateVirtualClusterInstanceList)(nil), (*management.ProjectMigrateVirtualClusterInstanceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectMigrateVirtualClusterInstanceList_To_management_ProjectMigrateVirtualClusterInstanceList(a.(*ProjectMigrateVirtualClusterInstanceList), b.(*management.ProjectMigrateVirtualClusterInstanceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectMigrateVirtualClusterInstanceList)(nil), (*ProjectMigrateVirtualClusterInstanceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectMigrateVirtualClusterInstanceList_To_v1_ProjectMigrateVirtualClusterInstanceList(a.(*management.ProjectMigrateVirtualClusterInstanceList), b.(*ProjectMigrateVirtualClusterInstanceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMigrateVirtualClusterInstanceSource)(nil), (*management.ProjectMigrateVirtualClusterInstanceSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectMigrateVirtualClusterInstanceSource_To_management_ProjectMigrateVirtualClusterInstanceSource(a.(*ProjectMigrateVirtualClusterInstanceSource), b.(*management.ProjectMigrateVirtualClusterInstanceSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectMigrateVirtualClusterInstanceSource)(nil), (*ProjectMigrateVirtualClusterInstanceSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectMigrateVirtualClusterInstanceSource_To_v1_ProjectMigrateVirtualClusterInstanceSource(a.(*management.ProjectMigrateVirtualClusterInstanceSource), b.(*ProjectMigrateVirtualClusterInstanceSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectSecret)(nil), (*management.ProjectSecret)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectSecret_To_management_ProjectSecret(a.(*ProjectSecret), b.(*management.ProjectSecret), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectSecret)(nil), (*ProjectSecret)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectSecret_To_v1_ProjectSecret(a.(*management.ProjectSecret), b.(*ProjectSecret), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectSecretList)(nil), (*management.ProjectSecretList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectSecretList_To_management_ProjectSecretList(a.(*ProjectSecretList), b.(*management.ProjectSecretList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectSecretList)(nil), (*ProjectSecretList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectSecretList_To_v1_ProjectSecretList(a.(*management.ProjectSecretList), b.(*ProjectSecretList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectSecretSpec)(nil), (*management.ProjectSecretSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectSecretSpec_To_management_ProjectSecretSpec(a.(*ProjectSecretSpec), b.(*management.ProjectSecretSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectSecretSpec)(nil), (*ProjectSecretSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectSecretSpec_To_v1_ProjectSecretSpec(a.(*management.ProjectSecretSpec), b.(*ProjectSecretSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectSecretStatus)(nil), (*management.ProjectSecretStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectSecretStatus_To_management_ProjectSecretStatus(a.(*ProjectSecretStatus), b.(*management.ProjectSecretStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectSecretStatus)(nil), (*ProjectSecretStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectSecretStatus_To_v1_ProjectSecretStatus(a.(*management.ProjectSecretStatus), b.(*ProjectSecretStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectSpec)(nil), (*management.ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectSpec_To_management_ProjectSpec(a.(*ProjectSpec), b.(*management.ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectSpec)(nil), (*ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectSpec_To_v1_ProjectSpec(a.(*management.ProjectSpec), b.(*ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectStatus)(nil), (*management.ProjectStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectStatus_To_management_ProjectStatus(a.(*ProjectStatus), b.(*management.ProjectStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectStatus)(nil), (*ProjectStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectStatus_To_v1_ProjectStatus(a.(*management.ProjectStatus), b.(*ProjectStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectTemplates)(nil), (*management.ProjectTemplates)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectTemplates_To_management_ProjectTemplates(a.(*ProjectTemplates), b.(*management.ProjectTemplates), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectTemplates)(nil), (*ProjectTemplates)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectTemplates_To_v1_ProjectTemplates(a.(*management.ProjectTemplates), b.(*ProjectTemplates), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectTemplatesList)(nil), (*management.ProjectTemplatesList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectTemplatesList_To_management_ProjectTemplatesList(a.(*ProjectTemplatesList), b.(*management.ProjectTemplatesList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectTemplatesList)(nil), (*ProjectTemplatesList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectTemplatesList_To_v1_ProjectTemplatesList(a.(*management.ProjectTemplatesList), b.(*ProjectTemplatesList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RedirectToken)(nil), (*management.RedirectToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RedirectToken_To_management_RedirectToken(a.(*RedirectToken), b.(*management.RedirectToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RedirectToken)(nil), (*RedirectToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RedirectToken_To_v1_RedirectToken(a.(*management.RedirectToken), b.(*RedirectToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RedirectTokenList)(nil), (*management.RedirectTokenList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RedirectTokenList_To_management_RedirectTokenList(a.(*RedirectTokenList), b.(*management.RedirectTokenList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RedirectTokenList)(nil), (*RedirectTokenList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RedirectTokenList_To_v1_RedirectTokenList(a.(*management.RedirectTokenList), b.(*RedirectTokenList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RedirectTokenSpec)(nil), (*management.RedirectTokenSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RedirectTokenSpec_To_management_RedirectTokenSpec(a.(*RedirectTokenSpec), b.(*management.RedirectTokenSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RedirectTokenSpec)(nil), (*RedirectTokenSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RedirectTokenSpec_To_v1_RedirectTokenSpec(a.(*management.RedirectTokenSpec), b.(*RedirectTokenSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RedirectTokenStatus)(nil), (*management.RedirectTokenStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RedirectTokenStatus_To_management_RedirectTokenStatus(a.(*RedirectTokenStatus), b.(*management.RedirectTokenStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RedirectTokenStatus)(nil), (*RedirectTokenStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RedirectTokenStatus_To_v1_RedirectTokenStatus(a.(*management.RedirectTokenStatus), b.(*RedirectTokenStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ResetAccessKey)(nil), (*management.ResetAccessKey)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ResetAccessKey_To_management_ResetAccessKey(a.(*ResetAccessKey), b.(*management.ResetAccessKey), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ResetAccessKey)(nil), (*ResetAccessKey)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ResetAccessKey_To_v1_ResetAccessKey(a.(*management.ResetAccessKey), b.(*ResetAccessKey), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ResetAccessKeyList)(nil), (*management.ResetAccessKeyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ResetAccessKeyList_To_management_ResetAccessKeyList(a.(*ResetAccessKeyList), b.(*management.ResetAccessKeyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ResetAccessKeyList)(nil), (*ResetAccessKeyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ResetAccessKeyList_To_v1_ResetAccessKeyList(a.(*management.ResetAccessKeyList), b.(*ResetAccessKeyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ResetAccessKeySpec)(nil), (*management.ResetAccessKeySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ResetAccessKeySpec_To_management_ResetAccessKeySpec(a.(*ResetAccessKeySpec), b.(*management.ResetAccessKeySpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ResetAccessKeySpec)(nil), (*ResetAccessKeySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ResetAccessKeySpec_To_v1_ResetAccessKeySpec(a.(*management.ResetAccessKeySpec), b.(*ResetAccessKeySpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ResetAccessKeyStatus)(nil), (*management.ResetAccessKeyStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ResetAccessKeyStatus_To_management_ResetAccessKeyStatus(a.(*ResetAccessKeyStatus), b.(*management.ResetAccessKeyStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ResetAccessKeyStatus)(nil), (*ResetAccessKeyStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ResetAccessKeyStatus_To_v1_ResetAccessKeyStatus(a.(*management.ResetAccessKeyStatus), b.(*ResetAccessKeyStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Runner)(nil), (*management.Runner)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Runner_To_management_Runner(a.(*Runner), b.(*management.Runner), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Runner)(nil), (*Runner)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Runner_To_v1_Runner(a.(*management.Runner), b.(*Runner), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RunnerAccessKey)(nil), (*management.RunnerAccessKey)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RunnerAccessKey_To_management_RunnerAccessKey(a.(*RunnerAccessKey), b.(*management.RunnerAccessKey), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RunnerAccessKey)(nil), (*RunnerAccessKey)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RunnerAccessKey_To_v1_RunnerAccessKey(a.(*management.RunnerAccessKey), b.(*RunnerAccessKey), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RunnerAccessKeyList)(nil), (*management.RunnerAccessKeyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RunnerAccessKeyList_To_management_RunnerAccessKeyList(a.(*RunnerAccessKeyList), b.(*management.RunnerAccessKeyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RunnerAccessKeyList)(nil), (*RunnerAccessKeyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RunnerAccessKeyList_To_v1_RunnerAccessKeyList(a.(*management.RunnerAccessKeyList), b.(*RunnerAccessKeyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RunnerConfig)(nil), (*management.RunnerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RunnerConfig_To_management_RunnerConfig(a.(*RunnerConfig), b.(*management.RunnerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RunnerConfig)(nil), (*RunnerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RunnerConfig_To_v1_RunnerConfig(a.(*management.RunnerConfig), b.(*RunnerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RunnerConfigList)(nil), (*management.RunnerConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RunnerConfigList_To_management_RunnerConfigList(a.(*RunnerConfigList), b.(*management.RunnerConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RunnerConfigList)(nil), (*RunnerConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RunnerConfigList_To_v1_RunnerConfigList(a.(*management.RunnerConfigList), b.(*RunnerConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RunnerList)(nil), (*management.RunnerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RunnerList_To_management_RunnerList(a.(*RunnerList), b.(*management.RunnerList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RunnerList)(nil), (*RunnerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RunnerList_To_v1_RunnerList(a.(*management.RunnerList), b.(*RunnerList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RunnerSpec)(nil), (*management.RunnerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RunnerSpec_To_management_RunnerSpec(a.(*RunnerSpec), b.(*management.RunnerSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RunnerSpec)(nil), (*RunnerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RunnerSpec_To_v1_RunnerSpec(a.(*management.RunnerSpec), b.(*RunnerSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RunnerStatus)(nil), (*management.RunnerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_RunnerStatus_To_management_RunnerStatus(a.(*RunnerStatus), b.(*management.RunnerStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.RunnerStatus)(nil), (*RunnerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_RunnerStatus_To_v1_RunnerStatus(a.(*management.RunnerStatus), b.(*RunnerStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Self)(nil), (*management.Self)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Self_To_management_Self(a.(*Self), b.(*management.Self), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Self)(nil), (*Self)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Self_To_v1_Self(a.(*management.Self), b.(*Self), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SelfList)(nil), (*management.SelfList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SelfList_To_management_SelfList(a.(*SelfList), b.(*management.SelfList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SelfList)(nil), (*SelfList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SelfList_To_v1_SelfList(a.(*management.SelfList), b.(*SelfList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SelfSpec)(nil), (*management.SelfSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SelfSpec_To_management_SelfSpec(a.(*SelfSpec), b.(*management.SelfSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SelfSpec)(nil), (*SelfSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SelfSpec_To_v1_SelfSpec(a.(*management.SelfSpec), b.(*SelfSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SelfStatus)(nil), (*management.SelfStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SelfStatus_To_management_SelfStatus(a.(*SelfStatus), b.(*management.SelfStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SelfStatus)(nil), (*SelfStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SelfStatus_To_v1_SelfStatus(a.(*management.SelfStatus), b.(*SelfStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SelfSubjectAccessReview)(nil), (*management.SelfSubjectAccessReview)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SelfSubjectAccessReview_To_management_SelfSubjectAccessReview(a.(*SelfSubjectAccessReview), b.(*management.SelfSubjectAccessReview), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SelfSubjectAccessReview)(nil), (*SelfSubjectAccessReview)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(a.(*management.SelfSubjectAccessReview), b.(*SelfSubjectAccessReview), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SelfSubjectAccessReviewList)(nil), (*management.SelfSubjectAccessReviewList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SelfSubjectAccessReviewList_To_management_SelfSubjectAccessReviewList(a.(*SelfSubjectAccessReviewList), b.(*management.SelfSubjectAccessReviewList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SelfSubjectAccessReviewList)(nil), (*SelfSubjectAccessReviewList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SelfSubjectAccessReviewList_To_v1_SelfSubjectAccessReviewList(a.(*management.SelfSubjectAccessReviewList), b.(*SelfSubjectAccessReviewList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SelfSubjectAccessReviewSpec)(nil), (*management.SelfSubjectAccessReviewSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SelfSubjectAccessReviewSpec_To_management_SelfSubjectAccessReviewSpec(a.(*SelfSubjectAccessReviewSpec), b.(*management.SelfSubjectAccessReviewSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SelfSubjectAccessReviewSpec)(nil), (*SelfSubjectAccessReviewSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(a.(*management.SelfSubjectAccessReviewSpec), b.(*SelfSubjectAccessReviewSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SelfSubjectAccessReviewStatus)(nil), (*management.SelfSubjectAccessReviewStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SelfSubjectAccessReviewStatus_To_management_SelfSubjectAccessReviewStatus(a.(*SelfSubjectAccessReviewStatus), b.(*management.SelfSubjectAccessReviewStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SelfSubjectAccessReviewStatus)(nil), (*SelfSubjectAccessReviewStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SelfSubjectAccessReviewStatus_To_v1_SelfSubjectAccessReviewStatus(a.(*management.SelfSubjectAccessReviewStatus), b.(*SelfSubjectAccessReviewStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SharedSecret)(nil), (*management.SharedSecret)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SharedSecret_To_management_SharedSecret(a.(*SharedSecret), b.(*management.SharedSecret), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SharedSecret)(nil), (*SharedSecret)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SharedSecret_To_v1_SharedSecret(a.(*management.SharedSecret), b.(*SharedSecret), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SharedSecretList)(nil), (*management.SharedSecretList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SharedSecretList_To_management_SharedSecretList(a.(*SharedSecretList), b.(*management.SharedSecretList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SharedSecretList)(nil), (*SharedSecretList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SharedSecretList_To_v1_SharedSecretList(a.(*management.SharedSecretList), b.(*SharedSecretList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SharedSecretSpec)(nil), (*management.SharedSecretSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SharedSecretSpec_To_management_SharedSecretSpec(a.(*SharedSecretSpec), b.(*management.SharedSecretSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SharedSecretSpec)(nil), (*SharedSecretSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SharedSecretSpec_To_v1_SharedSecretSpec(a.(*management.SharedSecretSpec), b.(*SharedSecretSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SharedSecretStatus)(nil), (*management.SharedSecretStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SharedSecretStatus_To_management_SharedSecretStatus(a.(*SharedSecretStatus), b.(*management.SharedSecretStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SharedSecretStatus)(nil), (*SharedSecretStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SharedSecretStatus_To_v1_SharedSecretStatus(a.(*management.SharedSecretStatus), b.(*SharedSecretStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceConstraint)(nil), (*management.SpaceConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceConstraint_To_management_SpaceConstraint(a.(*SpaceConstraint), b.(*management.SpaceConstraint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceConstraint)(nil), (*SpaceConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceConstraint_To_v1_SpaceConstraint(a.(*management.SpaceConstraint), b.(*SpaceConstraint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceConstraintList)(nil), (*management.SpaceConstraintList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceConstraintList_To_management_SpaceConstraintList(a.(*SpaceConstraintList), b.(*management.SpaceConstraintList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceConstraintList)(nil), (*SpaceConstraintList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceConstraintList_To_v1_SpaceConstraintList(a.(*management.SpaceConstraintList), b.(*SpaceConstraintList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceConstraintSpec)(nil), (*management.SpaceConstraintSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceConstraintSpec_To_management_SpaceConstraintSpec(a.(*SpaceConstraintSpec), b.(*management.SpaceConstraintSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceConstraintSpec)(nil), (*SpaceConstraintSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceConstraintSpec_To_v1_SpaceConstraintSpec(a.(*management.SpaceConstraintSpec), b.(*SpaceConstraintSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceConstraintStatus)(nil), (*management.SpaceConstraintStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceConstraintStatus_To_management_SpaceConstraintStatus(a.(*SpaceConstraintStatus), b.(*management.SpaceConstraintStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceConstraintStatus)(nil), (*SpaceConstraintStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceConstraintStatus_To_v1_SpaceConstraintStatus(a.(*management.SpaceConstraintStatus), b.(*SpaceConstraintStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceInstance)(nil), (*management.SpaceInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceInstance_To_management_SpaceInstance(a.(*SpaceInstance), b.(*management.SpaceInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceInstance)(nil), (*SpaceInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceInstance_To_v1_SpaceInstance(a.(*management.SpaceInstance), b.(*SpaceInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceInstanceList)(nil), (*management.SpaceInstanceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceInstanceList_To_management_SpaceInstanceList(a.(*SpaceInstanceList), b.(*management.SpaceInstanceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceInstanceList)(nil), (*SpaceInstanceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceInstanceList_To_v1_SpaceInstanceList(a.(*management.SpaceInstanceList), b.(*SpaceInstanceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceInstanceSpec)(nil), (*management.SpaceInstanceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceInstanceSpec_To_management_SpaceInstanceSpec(a.(*SpaceInstanceSpec), b.(*management.SpaceInstanceSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceInstanceSpec)(nil), (*SpaceInstanceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceInstanceSpec_To_v1_SpaceInstanceSpec(a.(*management.SpaceInstanceSpec), b.(*SpaceInstanceSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceInstanceStatus)(nil), (*management.SpaceInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceInstanceStatus_To_management_SpaceInstanceStatus(a.(*SpaceInstanceStatus), b.(*management.SpaceInstanceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceInstanceStatus)(nil), (*SpaceInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceInstanceStatus_To_v1_SpaceInstanceStatus(a.(*management.SpaceInstanceStatus), b.(*SpaceInstanceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceTemplate)(nil), (*management.SpaceTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceTemplate_To_management_SpaceTemplate(a.(*SpaceTemplate), b.(*management.SpaceTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceTemplate)(nil), (*SpaceTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceTemplate_To_v1_SpaceTemplate(a.(*management.SpaceTemplate), b.(*SpaceTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceTemplateList)(nil), (*management.SpaceTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceTemplateList_To_management_SpaceTemplateList(a.(*SpaceTemplateList), b.(*management.SpaceTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceTemplateList)(nil), (*SpaceTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceTemplateList_To_v1_SpaceTemplateList(a.(*management.SpaceTemplateList), b.(*SpaceTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceTemplateSpec)(nil), (*management.SpaceTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceTemplateSpec_To_management_SpaceTemplateSpec(a.(*SpaceTemplateSpec), b.(*management.SpaceTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceTemplateSpec)(nil), (*SpaceTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceTemplateSpec_To_v1_SpaceTemplateSpec(a.(*management.SpaceTemplateSpec), b.(*SpaceTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SpaceTemplateStatus)(nil), (*management.SpaceTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SpaceTemplateStatus_To_management_SpaceTemplateStatus(a.(*SpaceTemplateStatus), b.(*management.SpaceTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SpaceTemplateStatus)(nil), (*SpaceTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SpaceTemplateStatus_To_v1_SpaceTemplateStatus(a.(*management.SpaceTemplateStatus), b.(*SpaceTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SubjectAccessReview)(nil), (*management.SubjectAccessReview)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SubjectAccessReview_To_management_SubjectAccessReview(a.(*SubjectAccessReview), b.(*management.SubjectAccessReview), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SubjectAccessReview)(nil), (*SubjectAccessReview)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SubjectAccessReview_To_v1_SubjectAccessReview(a.(*management.SubjectAccessReview), b.(*SubjectAccessReview), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SubjectAccessReviewList)(nil), (*management.SubjectAccessReviewList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SubjectAccessReviewList_To_management_SubjectAccessReviewList(a.(*SubjectAccessReviewList), b.(*management.SubjectAccessReviewList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SubjectAccessReviewList)(nil), (*SubjectAccessReviewList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SubjectAccessReviewList_To_v1_SubjectAccessReviewList(a.(*management.SubjectAccessReviewList), b.(*SubjectAccessReviewList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SubjectAccessReviewSpec)(nil), (*management.SubjectAccessReviewSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SubjectAccessReviewSpec_To_management_SubjectAccessReviewSpec(a.(*SubjectAccessReviewSpec), b.(*management.SubjectAccessReviewSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SubjectAccessReviewSpec)(nil), (*SubjectAccessReviewSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(a.(*management.SubjectAccessReviewSpec), b.(*SubjectAccessReviewSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SubjectAccessReviewStatus)(nil), (*management.SubjectAccessReviewStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SubjectAccessReviewStatus_To_management_SubjectAccessReviewStatus(a.(*SubjectAccessReviewStatus), b.(*management.SubjectAccessReviewStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.SubjectAccessReviewStatus)(nil), (*SubjectAccessReviewStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(a.(*management.SubjectAccessReviewStatus), b.(*SubjectAccessReviewStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Task)(nil), (*management.Task)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Task_To_management_Task(a.(*Task), b.(*management.Task), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Task)(nil), (*Task)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Task_To_v1_Task(a.(*management.Task), b.(*Task), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TaskList)(nil), (*management.TaskList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TaskList_To_management_TaskList(a.(*TaskList), b.(*management.TaskList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TaskList)(nil), (*TaskList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TaskList_To_v1_TaskList(a.(*management.TaskList), b.(*TaskList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TaskLog)(nil), (*management.TaskLog)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TaskLog_To_management_TaskLog(a.(*TaskLog), b.(*management.TaskLog), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TaskLog)(nil), (*TaskLog)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TaskLog_To_v1_TaskLog(a.(*management.TaskLog), b.(*TaskLog), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TaskLogList)(nil), (*management.TaskLogList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TaskLogList_To_management_TaskLogList(a.(*TaskLogList), b.(*management.TaskLogList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TaskLogList)(nil), (*TaskLogList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TaskLogList_To_v1_TaskLogList(a.(*management.TaskLogList), b.(*TaskLogList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TaskLogOptions)(nil), (*management.TaskLogOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TaskLogOptions_To_management_TaskLogOptions(a.(*TaskLogOptions), b.(*management.TaskLogOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TaskLogOptions)(nil), (*TaskLogOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TaskLogOptions_To_v1_TaskLogOptions(a.(*management.TaskLogOptions), b.(*TaskLogOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TaskSpec)(nil), (*management.TaskSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TaskSpec_To_management_TaskSpec(a.(*TaskSpec), b.(*management.TaskSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TaskSpec)(nil), (*TaskSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TaskSpec_To_v1_TaskSpec(a.(*management.TaskSpec), b.(*TaskSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TaskStatus)(nil), (*management.TaskStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TaskStatus_To_management_TaskStatus(a.(*TaskStatus), b.(*management.TaskStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TaskStatus)(nil), (*TaskStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TaskStatus_To_v1_TaskStatus(a.(*management.TaskStatus), b.(*TaskStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Team)(nil), (*management.Team)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Team_To_management_Team(a.(*Team), b.(*management.Team), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Team)(nil), (*Team)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Team_To_v1_Team(a.(*management.Team), b.(*Team), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TeamAccessKeys)(nil), (*management.TeamAccessKeys)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamAccessKeys_To_management_TeamAccessKeys(a.(*TeamAccessKeys), b.(*management.TeamAccessKeys), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TeamAccessKeys)(nil), (*TeamAccessKeys)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamAccessKeys_To_v1_TeamAccessKeys(a.(*management.TeamAccessKeys), b.(*TeamAccessKeys), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TeamAccessKeysList)(nil), (*management.TeamAccessKeysList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamAccessKeysList_To_management_TeamAccessKeysList(a.(*TeamAccessKeysList), b.(*management.TeamAccessKeysList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TeamAccessKeysList)(nil), (*TeamAccessKeysList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamAccessKeysList_To_v1_TeamAccessKeysList(a.(*management.TeamAccessKeysList), b.(*TeamAccessKeysList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TeamClusters)(nil), (*management.TeamClusters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamClusters_To_management_TeamClusters(a.(*TeamClusters), b.(*management.TeamClusters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TeamClusters)(nil), (*TeamClusters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamClusters_To_v1_TeamClusters(a.(*management.TeamClusters), b.(*TeamClusters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TeamClustersList)(nil), (*management.TeamClustersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamClustersList_To_management_TeamClustersList(a.(*TeamClustersList), b.(*management.TeamClustersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TeamClustersList)(nil), (*TeamClustersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamClustersList_To_v1_TeamClustersList(a.(*management.TeamClustersList), b.(*TeamClustersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TeamList)(nil), (*management.TeamList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamList_To_management_TeamList(a.(*TeamList), b.(*management.TeamList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TeamList)(nil), (*TeamList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamList_To_v1_TeamList(a.(*management.TeamList), b.(*TeamList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TeamSpec)(nil), (*management.TeamSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamSpec_To_management_TeamSpec(a.(*TeamSpec), b.(*management.TeamSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TeamSpec)(nil), (*TeamSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamSpec_To_v1_TeamSpec(a.(*management.TeamSpec), b.(*TeamSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TeamStatus)(nil), (*management.TeamStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamStatus_To_management_TeamStatus(a.(*TeamStatus), b.(*management.TeamStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TeamStatus)(nil), (*TeamStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamStatus_To_v1_TeamStatus(a.(*management.TeamStatus), b.(*TeamStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*User)(nil), (*management.User)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_User_To_management_User(a.(*User), b.(*management.User), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.User)(nil), (*User)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_User_To_v1_User(a.(*management.User), b.(*User), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserAccessKeys)(nil), (*management.UserAccessKeys)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserAccessKeys_To_management_UserAccessKeys(a.(*UserAccessKeys), b.(*management.UserAccessKeys), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserAccessKeys)(nil), (*UserAccessKeys)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserAccessKeys_To_v1_UserAccessKeys(a.(*management.UserAccessKeys), b.(*UserAccessKeys), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserAccessKeysList)(nil), (*management.UserAccessKeysList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserAccessKeysList_To_management_UserAccessKeysList(a.(*UserAccessKeysList), b.(*management.UserAccessKeysList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserAccessKeysList)(nil), (*UserAccessKeysList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserAccessKeysList_To_v1_UserAccessKeysList(a.(*management.UserAccessKeysList), b.(*UserAccessKeysList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserClusters)(nil), (*management.UserClusters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserClusters_To_management_UserClusters(a.(*UserClusters), b.(*management.UserClusters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserClusters)(nil), (*UserClusters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserClusters_To_v1_UserClusters(a.(*management.UserClusters), b.(*UserClusters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserClustersList)(nil), (*management.UserClustersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserClustersList_To_management_UserClustersList(a.(*UserClustersList), b.(*management.UserClustersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserClustersList)(nil), (*UserClustersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserClustersList_To_v1_UserClustersList(a.(*management.UserClustersList), b.(*UserClustersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserInfo)(nil), (*management.UserInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserInfo_To_management_UserInfo(a.(*UserInfo), b.(*management.UserInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserInfo)(nil), (*UserInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserInfo_To_v1_UserInfo(a.(*management.UserInfo), b.(*UserInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserList)(nil), (*management.UserList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserList_To_management_UserList(a.(*UserList), b.(*management.UserList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserList)(nil), (*UserList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserList_To_v1_UserList(a.(*management.UserList), b.(*UserList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserPermissions)(nil), (*management.UserPermissions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserPermissions_To_management_UserPermissions(a.(*UserPermissions), b.(*management.UserPermissions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserPermissions)(nil), (*UserPermissions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserPermissions_To_v1_UserPermissions(a.(*management.UserPermissions), b.(*UserPermissions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserPermissionsList)(nil), (*management.UserPermissionsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserPermissionsList_To_management_UserPermissionsList(a.(*UserPermissionsList), b.(*management.UserPermissionsList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserPermissionsList)(nil), (*UserPermissionsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserPermissionsList_To_v1_UserPermissionsList(a.(*management.UserPermissionsList), b.(*UserPermissionsList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserPermissionsRole)(nil), (*management.UserPermissionsRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserPermissionsRole_To_management_UserPermissionsRole(a.(*UserPermissionsRole), b.(*management.UserPermissionsRole), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserPermissionsRole)(nil), (*UserPermissionsRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserPermissionsRole_To_v1_UserPermissionsRole(a.(*management.UserPermissionsRole), b.(*UserPermissionsRole), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserProfile)(nil), (*management.UserProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserProfile_To_management_UserProfile(a.(*UserProfile), b.(*management.UserProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserProfile)(nil), (*UserProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserProfile_To_v1_UserProfile(a.(*management.UserProfile), b.(*UserProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserProfileList)(nil), (*management.UserProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserProfileList_To_management_UserProfileList(a.(*UserProfileList), b.(*management.UserProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserProfileList)(nil), (*UserProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserProfileList_To_v1_UserProfileList(a.(*management.UserProfileList), b.(*UserProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserQuotasOptions)(nil), (*management.UserQuotasOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserQuotasOptions_To_management_UserQuotasOptions(a.(*UserQuotasOptions), b.(*management.UserQuotasOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserQuotasOptions)(nil), (*UserQuotasOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserQuotasOptions_To_v1_UserQuotasOptions(a.(*management.UserQuotasOptions), b.(*UserQuotasOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserSpacesOptions)(nil), (*management.UserSpacesOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserSpacesOptions_To_management_UserSpacesOptions(a.(*UserSpacesOptions), b.(*management.UserSpacesOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserSpacesOptions)(nil), (*UserSpacesOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserSpacesOptions_To_v1_UserSpacesOptions(a.(*management.UserSpacesOptions), b.(*UserSpacesOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserSpec)(nil), (*management.UserSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserSpec_To_management_UserSpec(a.(*UserSpec), b.(*management.UserSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserSpec)(nil), (*UserSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserSpec_To_v1_UserSpec(a.(*management.UserSpec), b.(*UserSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserStatus)(nil), (*management.UserStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserStatus_To_management_UserStatus(a.(*UserStatus), b.(*management.UserStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserStatus)(nil), (*UserStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserStatus_To_v1_UserStatus(a.(*management.UserStatus), b.(*UserStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserVirtualClustersOptions)(nil), (*management.UserVirtualClustersOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserVirtualClustersOptions_To_management_UserVirtualClustersOptions(a.(*UserVirtualClustersOptions), b.(*management.UserVirtualClustersOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserVirtualClustersOptions)(nil), (*UserVirtualClustersOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserVirtualClustersOptions_To_v1_UserVirtualClustersOptions(a.(*management.UserVirtualClustersOptions), b.(*UserVirtualClustersOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstance)(nil), (*management.VirtualClusterInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstance_To_management_VirtualClusterInstance(a.(*VirtualClusterInstance), b.(*management.VirtualClusterInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstance)(nil), (*VirtualClusterInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstance_To_v1_VirtualClusterInstance(a.(*management.VirtualClusterInstance), b.(*VirtualClusterInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceKubeConfig)(nil), (*management.VirtualClusterInstanceKubeConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceKubeConfig_To_management_VirtualClusterInstanceKubeConfig(a.(*VirtualClusterInstanceKubeConfig), b.(*management.VirtualClusterInstanceKubeConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceKubeConfig)(nil), (*VirtualClusterInstanceKubeConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceKubeConfig_To_v1_VirtualClusterInstanceKubeConfig(a.(*management.VirtualClusterInstanceKubeConfig), b.(*VirtualClusterInstanceKubeConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceKubeConfigList)(nil), (*management.VirtualClusterInstanceKubeConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceKubeConfigList_To_management_VirtualClusterInstanceKubeConfigList(a.(*VirtualClusterInstanceKubeConfigList), b.(*management.VirtualClusterInstanceKubeConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceKubeConfigList)(nil), (*VirtualClusterInstanceKubeConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceKubeConfigList_To_v1_VirtualClusterInstanceKubeConfigList(a.(*management.VirtualClusterInstanceKubeConfigList), b.(*VirtualClusterInstanceKubeConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceKubeConfigSpec)(nil), (*management.VirtualClusterInstanceKubeConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceKubeConfigSpec_To_management_VirtualClusterInstanceKubeConfigSpec(a.(*VirtualClusterInstanceKubeConfigSpec), b.(*management.VirtualClusterInstanceKubeConfigSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceKubeConfigSpec)(nil), (*VirtualClusterInstanceKubeConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceKubeConfigSpec_To_v1_VirtualClusterInstanceKubeConfigSpec(a.(*management.VirtualClusterInstanceKubeConfigSpec), b.(*VirtualClusterInstanceKubeConfigSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceKubeConfigStatus)(nil), (*management.VirtualClusterInstanceKubeConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceKubeConfigStatus_To_management_VirtualClusterInstanceKubeConfigStatus(a.(*VirtualClusterInstanceKubeConfigStatus), b.(*management.VirtualClusterInstanceKubeConfigStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceKubeConfigStatus)(nil), (*VirtualClusterInstanceKubeConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceKubeConfigStatus_To_v1_VirtualClusterInstanceKubeConfigStatus(a.(*management.VirtualClusterInstanceKubeConfigStatus), b.(*VirtualClusterInstanceKubeConfigStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceList)(nil), (*management.VirtualClusterInstanceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceList_To_management_VirtualClusterInstanceList(a.(*VirtualClusterInstanceList), b.(*management.VirtualClusterInstanceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceList)(nil), (*VirtualClusterInstanceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceList_To_v1_VirtualClusterInstanceList(a.(*management.VirtualClusterInstanceList), b.(*VirtualClusterInstanceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceLog)(nil), (*management.VirtualClusterInstanceLog)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceLog_To_management_VirtualClusterInstanceLog(a.(*VirtualClusterInstanceLog), b.(*management.VirtualClusterInstanceLog), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceLog)(nil), (*VirtualClusterInstanceLog)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceLog_To_v1_VirtualClusterInstanceLog(a.(*management.VirtualClusterInstanceLog), b.(*VirtualClusterInstanceLog), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceLogList)(nil), (*management.VirtualClusterInstanceLogList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceLogList_To_management_VirtualClusterInstanceLogList(a.(*VirtualClusterInstanceLogList), b.(*management.VirtualClusterInstanceLogList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceLogList)(nil), (*VirtualClusterInstanceLogList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceLogList_To_v1_VirtualClusterInstanceLogList(a.(*management.VirtualClusterInstanceLogList), b.(*VirtualClusterInstanceLogList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceLogOptions)(nil), (*management.VirtualClusterInstanceLogOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceLogOptions_To_management_VirtualClusterInstanceLogOptions(a.(*VirtualClusterInstanceLogOptions), b.(*management.VirtualClusterInstanceLogOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceLogOptions)(nil), (*VirtualClusterInstanceLogOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceLogOptions_To_v1_VirtualClusterInstanceLogOptions(a.(*management.VirtualClusterInstanceLogOptions), b.(*VirtualClusterInstanceLogOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceSpec)(nil), (*management.VirtualClusterInstanceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceSpec_To_management_VirtualClusterInstanceSpec(a.(*VirtualClusterInstanceSpec), b.(*management.VirtualClusterInstanceSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceSpec)(nil), (*VirtualClusterInstanceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceSpec_To_v1_VirtualClusterInstanceSpec(a.(*management.VirtualClusterInstanceSpec), b.(*VirtualClusterInstanceSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceStatus)(nil), (*management.VirtualClusterInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceStatus_To_management_VirtualClusterInstanceStatus(a.(*VirtualClusterInstanceStatus), b.(*management.VirtualClusterInstanceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceStatus)(nil), (*VirtualClusterInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceStatus_To_v1_VirtualClusterInstanceStatus(a.(*management.VirtualClusterInstanceStatus), b.(*VirtualClusterInstanceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceWorkloadKubeConfig)(nil), (*management.VirtualClusterInstanceWorkloadKubeConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceWorkloadKubeConfig_To_management_VirtualClusterInstanceWorkloadKubeConfig(a.(*VirtualClusterInstanceWorkloadKubeConfig), b.(*management.VirtualClusterInstanceWorkloadKubeConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceWorkloadKubeConfig)(nil), (*VirtualClusterInstanceWorkloadKubeConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceWorkloadKubeConfig_To_v1_VirtualClusterInstanceWorkloadKubeConfig(a.(*management.VirtualClusterInstanceWorkloadKubeConfig), b.(*VirtualClusterInstanceWorkloadKubeConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterInstanceWorkloadKubeConfigList)(nil), (*management.VirtualClusterInstanceWorkloadKubeConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterInstanceWorkloadKubeConfigList_To_management_VirtualClusterInstanceWorkloadKubeConfigList(a.(*VirtualClusterInstanceWorkloadKubeConfigList), b.(*management.VirtualClusterInstanceWorkloadKubeConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterInstanceWorkloadKubeConfigList)(nil), (*VirtualClusterInstanceWorkloadKubeConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterInstanceWorkloadKubeConfigList_To_v1_VirtualClusterInstanceWorkloadKubeConfigList(a.(*management.VirtualClusterInstanceWorkloadKubeConfigList), b.(*VirtualClusterInstanceWorkloadKubeConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterTemplate)(nil), (*management.VirtualClusterTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterTemplate_To_management_VirtualClusterTemplate(a.(*VirtualClusterTemplate), b.(*management.VirtualClusterTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterTemplate)(nil), (*VirtualClusterTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterTemplate_To_v1_VirtualClusterTemplate(a.(*management.VirtualClusterTemplate), b.(*VirtualClusterTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterTemplateList)(nil), (*management.VirtualClusterTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterTemplateList_To_management_VirtualClusterTemplateList(a.(*VirtualClusterTemplateList), b.(*management.VirtualClusterTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterTemplateList)(nil), (*VirtualClusterTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterTemplateList_To_v1_VirtualClusterTemplateList(a.(*management.VirtualClusterTemplateList), b.(*VirtualClusterTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterTemplateSpec)(nil), (*management.VirtualClusterTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterTemplateSpec_To_management_VirtualClusterTemplateSpec(a.(*VirtualClusterTemplateSpec), b.(*management.VirtualClusterTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterTemplateSpec)(nil), (*VirtualClusterTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterTemplateSpec_To_v1_VirtualClusterTemplateSpec(a.(*management.VirtualClusterTemplateSpec), b.(*VirtualClusterTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterTemplateStatus)(nil), (*management.VirtualClusterTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterTemplateStatus_To_management_VirtualClusterTemplateStatus(a.(*VirtualClusterTemplateStatus), b.(*management.VirtualClusterTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterTemplateStatus)(nil), (*VirtualClusterTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterTemplateStatus_To_v1_VirtualClusterTemplateStatus(a.(*management.VirtualClusterTemplateStatus), b.(*VirtualClusterTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*DevPodDeleteOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_url_Values_To_v1_DevPodDeleteOptions(a.(*url.Values), b.(*DevPodDeleteOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*DevPodSshOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_url_Values_To_v1_DevPodSshOptions(a.(*url.Values), b.(*DevPodSshOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*DevPodStatusOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_url_Values_To_v1_DevPodStatusOptions(a.(*url.Values), b.(*DevPodStatusOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*DevPodStopOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_url_Values_To_v1_DevPodStopOptions(a.(*url.Values), b.(*DevPodStopOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*DevPodUpOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_url_Values_To_v1_DevPodUpOptions(a.(*url.Values), b.(*DevPodUpOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*TaskLogOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_url_Values_To_v1_TaskLogOptions(a.(*url.Values), b.(*TaskLogOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*UserQuotasOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_url_Values_To_v1_UserQuotasOptions(a.(*url.Values), b.(*UserQuotasOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*UserSpacesOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_url_Values_To_v1_UserSpacesOptions(a.(*url.Values), b.(*UserSpacesOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*UserVirtualClustersOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_url_Values_To_v1_UserVirtualClustersOptions(a.(*url.Values), b.(*UserVirtualClustersOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*VirtualClusterInstanceLogOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_url_Values_To_v1_VirtualClusterInstanceLogOptions(a.(*url.Values), b.(*VirtualClusterInstanceLogOptions), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1_AgentAnalyticsSpec_To_management_AgentAnalyticsSpec(in *AgentAnalyticsSpec, out *management.AgentAnalyticsSpec, s conversion.Scope) error { + out.AnalyticsEndpoint = in.AnalyticsEndpoint + out.InstanceTokenAuth = (*server.InstanceTokenAuth)(unsafe.Pointer(in.InstanceTokenAuth)) + return nil +} + +// Convert_v1_AgentAnalyticsSpec_To_management_AgentAnalyticsSpec is an autogenerated conversion function. +func Convert_v1_AgentAnalyticsSpec_To_management_AgentAnalyticsSpec(in *AgentAnalyticsSpec, out *management.AgentAnalyticsSpec, s conversion.Scope) error { + return autoConvert_v1_AgentAnalyticsSpec_To_management_AgentAnalyticsSpec(in, out, s) +} + +func autoConvert_management_AgentAnalyticsSpec_To_v1_AgentAnalyticsSpec(in *management.AgentAnalyticsSpec, out *AgentAnalyticsSpec, s conversion.Scope) error { + out.AnalyticsEndpoint = in.AnalyticsEndpoint + out.InstanceTokenAuth = (*server.InstanceTokenAuth)(unsafe.Pointer(in.InstanceTokenAuth)) + return nil +} + +// Convert_management_AgentAnalyticsSpec_To_v1_AgentAnalyticsSpec is an autogenerated conversion function. +func Convert_management_AgentAnalyticsSpec_To_v1_AgentAnalyticsSpec(in *management.AgentAnalyticsSpec, out *AgentAnalyticsSpec, s conversion.Scope) error { + return autoConvert_management_AgentAnalyticsSpec_To_v1_AgentAnalyticsSpec(in, out, s) +} + +func autoConvert_v1_AgentAuditConfig_To_management_AgentAuditConfig(in *AgentAuditConfig, out *management.AgentAuditConfig, s conversion.Scope) error { + out.Enabled = in.Enabled + out.DisableAgentSyncBack = in.DisableAgentSyncBack + out.Level = in.Level + if err := Convert_v1_AuditPolicy_To_management_AuditPolicy(&in.Policy, &out.Policy, s); err != nil { + return err + } + out.Path = in.Path + out.MaxAge = in.MaxAge + out.MaxBackups = in.MaxBackups + out.MaxSize = in.MaxSize + out.Compress = in.Compress + return nil +} + +// Convert_v1_AgentAuditConfig_To_management_AgentAuditConfig is an autogenerated conversion function. +func Convert_v1_AgentAuditConfig_To_management_AgentAuditConfig(in *AgentAuditConfig, out *management.AgentAuditConfig, s conversion.Scope) error { + return autoConvert_v1_AgentAuditConfig_To_management_AgentAuditConfig(in, out, s) +} + +func autoConvert_management_AgentAuditConfig_To_v1_AgentAuditConfig(in *management.AgentAuditConfig, out *AgentAuditConfig, s conversion.Scope) error { + out.Enabled = in.Enabled + out.DisableAgentSyncBack = in.DisableAgentSyncBack + out.Level = in.Level + if err := Convert_management_AuditPolicy_To_v1_AuditPolicy(&in.Policy, &out.Policy, s); err != nil { + return err + } + out.Path = in.Path + out.MaxAge = in.MaxAge + out.MaxBackups = in.MaxBackups + out.MaxSize = in.MaxSize + out.Compress = in.Compress + return nil +} + +// Convert_management_AgentAuditConfig_To_v1_AgentAuditConfig is an autogenerated conversion function. +func Convert_management_AgentAuditConfig_To_v1_AgentAuditConfig(in *management.AgentAuditConfig, out *AgentAuditConfig, s conversion.Scope) error { + return autoConvert_management_AgentAuditConfig_To_v1_AgentAuditConfig(in, out, s) +} + +func autoConvert_v1_AgentAuditEvent_To_management_AgentAuditEvent(in *AgentAuditEvent, out *management.AgentAuditEvent, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_AgentAuditEventSpec_To_management_AgentAuditEventSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_AgentAuditEventStatus_To_management_AgentAuditEventStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_AgentAuditEvent_To_management_AgentAuditEvent is an autogenerated conversion function. +func Convert_v1_AgentAuditEvent_To_management_AgentAuditEvent(in *AgentAuditEvent, out *management.AgentAuditEvent, s conversion.Scope) error { + return autoConvert_v1_AgentAuditEvent_To_management_AgentAuditEvent(in, out, s) +} + +func autoConvert_management_AgentAuditEvent_To_v1_AgentAuditEvent(in *management.AgentAuditEvent, out *AgentAuditEvent, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_AgentAuditEventSpec_To_v1_AgentAuditEventSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_AgentAuditEventStatus_To_v1_AgentAuditEventStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_AgentAuditEvent_To_v1_AgentAuditEvent is an autogenerated conversion function. +func Convert_management_AgentAuditEvent_To_v1_AgentAuditEvent(in *management.AgentAuditEvent, out *AgentAuditEvent, s conversion.Scope) error { + return autoConvert_management_AgentAuditEvent_To_v1_AgentAuditEvent(in, out, s) +} + +func autoConvert_v1_AgentAuditEventList_To_management_AgentAuditEventList(in *AgentAuditEventList, out *management.AgentAuditEventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.AgentAuditEvent)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_AgentAuditEventList_To_management_AgentAuditEventList is an autogenerated conversion function. +func Convert_v1_AgentAuditEventList_To_management_AgentAuditEventList(in *AgentAuditEventList, out *management.AgentAuditEventList, s conversion.Scope) error { + return autoConvert_v1_AgentAuditEventList_To_management_AgentAuditEventList(in, out, s) +} + +func autoConvert_management_AgentAuditEventList_To_v1_AgentAuditEventList(in *management.AgentAuditEventList, out *AgentAuditEventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]AgentAuditEvent)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_AgentAuditEventList_To_v1_AgentAuditEventList is an autogenerated conversion function. +func Convert_management_AgentAuditEventList_To_v1_AgentAuditEventList(in *management.AgentAuditEventList, out *AgentAuditEventList, s conversion.Scope) error { + return autoConvert_management_AgentAuditEventList_To_v1_AgentAuditEventList(in, out, s) +} + +func autoConvert_v1_AgentAuditEventSpec_To_management_AgentAuditEventSpec(in *AgentAuditEventSpec, out *management.AgentAuditEventSpec, s conversion.Scope) error { + out.Events = *(*[]*auditv1.Event)(unsafe.Pointer(&in.Events)) + return nil +} + +// Convert_v1_AgentAuditEventSpec_To_management_AgentAuditEventSpec is an autogenerated conversion function. +func Convert_v1_AgentAuditEventSpec_To_management_AgentAuditEventSpec(in *AgentAuditEventSpec, out *management.AgentAuditEventSpec, s conversion.Scope) error { + return autoConvert_v1_AgentAuditEventSpec_To_management_AgentAuditEventSpec(in, out, s) +} + +func autoConvert_management_AgentAuditEventSpec_To_v1_AgentAuditEventSpec(in *management.AgentAuditEventSpec, out *AgentAuditEventSpec, s conversion.Scope) error { + out.Events = *(*[]*auditv1.Event)(unsafe.Pointer(&in.Events)) + return nil +} + +// Convert_management_AgentAuditEventSpec_To_v1_AgentAuditEventSpec is an autogenerated conversion function. +func Convert_management_AgentAuditEventSpec_To_v1_AgentAuditEventSpec(in *management.AgentAuditEventSpec, out *AgentAuditEventSpec, s conversion.Scope) error { + return autoConvert_management_AgentAuditEventSpec_To_v1_AgentAuditEventSpec(in, out, s) +} + +func autoConvert_v1_AgentAuditEventStatus_To_management_AgentAuditEventStatus(in *AgentAuditEventStatus, out *management.AgentAuditEventStatus, s conversion.Scope) error { + return nil +} + +// Convert_v1_AgentAuditEventStatus_To_management_AgentAuditEventStatus is an autogenerated conversion function. +func Convert_v1_AgentAuditEventStatus_To_management_AgentAuditEventStatus(in *AgentAuditEventStatus, out *management.AgentAuditEventStatus, s conversion.Scope) error { + return autoConvert_v1_AgentAuditEventStatus_To_management_AgentAuditEventStatus(in, out, s) +} + +func autoConvert_management_AgentAuditEventStatus_To_v1_AgentAuditEventStatus(in *management.AgentAuditEventStatus, out *AgentAuditEventStatus, s conversion.Scope) error { + return nil +} + +// Convert_management_AgentAuditEventStatus_To_v1_AgentAuditEventStatus is an autogenerated conversion function. +func Convert_management_AgentAuditEventStatus_To_v1_AgentAuditEventStatus(in *management.AgentAuditEventStatus, out *AgentAuditEventStatus, s conversion.Scope) error { + return autoConvert_management_AgentAuditEventStatus_To_v1_AgentAuditEventStatus(in, out, s) +} + +func autoConvert_v1_Announcement_To_management_Announcement(in *Announcement, out *management.Announcement, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_AnnouncementSpec_To_management_AnnouncementSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_AnnouncementStatus_To_management_AnnouncementStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Announcement_To_management_Announcement is an autogenerated conversion function. +func Convert_v1_Announcement_To_management_Announcement(in *Announcement, out *management.Announcement, s conversion.Scope) error { + return autoConvert_v1_Announcement_To_management_Announcement(in, out, s) +} + +func autoConvert_management_Announcement_To_v1_Announcement(in *management.Announcement, out *Announcement, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_AnnouncementSpec_To_v1_AnnouncementSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_AnnouncementStatus_To_v1_AnnouncementStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Announcement_To_v1_Announcement is an autogenerated conversion function. +func Convert_management_Announcement_To_v1_Announcement(in *management.Announcement, out *Announcement, s conversion.Scope) error { + return autoConvert_management_Announcement_To_v1_Announcement(in, out, s) +} + +func autoConvert_v1_AnnouncementList_To_management_AnnouncementList(in *AnnouncementList, out *management.AnnouncementList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Announcement)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_AnnouncementList_To_management_AnnouncementList is an autogenerated conversion function. +func Convert_v1_AnnouncementList_To_management_AnnouncementList(in *AnnouncementList, out *management.AnnouncementList, s conversion.Scope) error { + return autoConvert_v1_AnnouncementList_To_management_AnnouncementList(in, out, s) +} + +func autoConvert_management_AnnouncementList_To_v1_AnnouncementList(in *management.AnnouncementList, out *AnnouncementList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Announcement)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_AnnouncementList_To_v1_AnnouncementList is an autogenerated conversion function. +func Convert_management_AnnouncementList_To_v1_AnnouncementList(in *management.AnnouncementList, out *AnnouncementList, s conversion.Scope) error { + return autoConvert_management_AnnouncementList_To_v1_AnnouncementList(in, out, s) +} + +func autoConvert_v1_AnnouncementSpec_To_management_AnnouncementSpec(in *AnnouncementSpec, out *management.AnnouncementSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1_AnnouncementSpec_To_management_AnnouncementSpec is an autogenerated conversion function. +func Convert_v1_AnnouncementSpec_To_management_AnnouncementSpec(in *AnnouncementSpec, out *management.AnnouncementSpec, s conversion.Scope) error { + return autoConvert_v1_AnnouncementSpec_To_management_AnnouncementSpec(in, out, s) +} + +func autoConvert_management_AnnouncementSpec_To_v1_AnnouncementSpec(in *management.AnnouncementSpec, out *AnnouncementSpec, s conversion.Scope) error { + return nil +} + +// Convert_management_AnnouncementSpec_To_v1_AnnouncementSpec is an autogenerated conversion function. +func Convert_management_AnnouncementSpec_To_v1_AnnouncementSpec(in *management.AnnouncementSpec, out *AnnouncementSpec, s conversion.Scope) error { + return autoConvert_management_AnnouncementSpec_To_v1_AnnouncementSpec(in, out, s) +} + +func autoConvert_v1_AnnouncementStatus_To_management_AnnouncementStatus(in *AnnouncementStatus, out *management.AnnouncementStatus, s conversion.Scope) error { + out.Announcement = in.Announcement + out.InstanceTokenAuth = (*server.InstanceTokenAuth)(unsafe.Pointer(in.InstanceTokenAuth)) + return nil +} + +// Convert_v1_AnnouncementStatus_To_management_AnnouncementStatus is an autogenerated conversion function. +func Convert_v1_AnnouncementStatus_To_management_AnnouncementStatus(in *AnnouncementStatus, out *management.AnnouncementStatus, s conversion.Scope) error { + return autoConvert_v1_AnnouncementStatus_To_management_AnnouncementStatus(in, out, s) +} + +func autoConvert_management_AnnouncementStatus_To_v1_AnnouncementStatus(in *management.AnnouncementStatus, out *AnnouncementStatus, s conversion.Scope) error { + out.Announcement = in.Announcement + out.InstanceTokenAuth = (*server.InstanceTokenAuth)(unsafe.Pointer(in.InstanceTokenAuth)) + return nil +} + +// Convert_management_AnnouncementStatus_To_v1_AnnouncementStatus is an autogenerated conversion function. +func Convert_management_AnnouncementStatus_To_v1_AnnouncementStatus(in *management.AnnouncementStatus, out *AnnouncementStatus, s conversion.Scope) error { + return autoConvert_management_AnnouncementStatus_To_v1_AnnouncementStatus(in, out, s) +} + +func autoConvert_v1_App_To_management_App(in *App, out *management.App, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_AppSpec_To_management_AppSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_AppStatus_To_management_AppStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_App_To_management_App is an autogenerated conversion function. +func Convert_v1_App_To_management_App(in *App, out *management.App, s conversion.Scope) error { + return autoConvert_v1_App_To_management_App(in, out, s) +} + +func autoConvert_management_App_To_v1_App(in *management.App, out *App, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_AppSpec_To_v1_AppSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_AppStatus_To_v1_AppStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_App_To_v1_App is an autogenerated conversion function. +func Convert_management_App_To_v1_App(in *management.App, out *App, s conversion.Scope) error { + return autoConvert_management_App_To_v1_App(in, out, s) +} + +func autoConvert_v1_AppList_To_management_AppList(in *AppList, out *management.AppList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.App)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_AppList_To_management_AppList is an autogenerated conversion function. +func Convert_v1_AppList_To_management_AppList(in *AppList, out *management.AppList, s conversion.Scope) error { + return autoConvert_v1_AppList_To_management_AppList(in, out, s) +} + +func autoConvert_management_AppList_To_v1_AppList(in *management.AppList, out *AppList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]App)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_AppList_To_v1_AppList is an autogenerated conversion function. +func Convert_management_AppList_To_v1_AppList(in *management.AppList, out *AppList, s conversion.Scope) error { + return autoConvert_management_AppList_To_v1_AppList(in, out, s) +} + +func autoConvert_v1_AppSpec_To_management_AppSpec(in *AppSpec, out *management.AppSpec, s conversion.Scope) error { + out.AppSpec = in.AppSpec + return nil +} + +// Convert_v1_AppSpec_To_management_AppSpec is an autogenerated conversion function. +func Convert_v1_AppSpec_To_management_AppSpec(in *AppSpec, out *management.AppSpec, s conversion.Scope) error { + return autoConvert_v1_AppSpec_To_management_AppSpec(in, out, s) +} + +func autoConvert_management_AppSpec_To_v1_AppSpec(in *management.AppSpec, out *AppSpec, s conversion.Scope) error { + out.AppSpec = in.AppSpec + return nil +} + +// Convert_management_AppSpec_To_v1_AppSpec is an autogenerated conversion function. +func Convert_management_AppSpec_To_v1_AppSpec(in *management.AppSpec, out *AppSpec, s conversion.Scope) error { + return autoConvert_management_AppSpec_To_v1_AppSpec(in, out, s) +} + +func autoConvert_v1_AppStatus_To_management_AppStatus(in *AppStatus, out *management.AppStatus, s conversion.Scope) error { + out.AppStatus = in.AppStatus + return nil +} + +// Convert_v1_AppStatus_To_management_AppStatus is an autogenerated conversion function. +func Convert_v1_AppStatus_To_management_AppStatus(in *AppStatus, out *management.AppStatus, s conversion.Scope) error { + return autoConvert_v1_AppStatus_To_management_AppStatus(in, out, s) +} + +func autoConvert_management_AppStatus_To_v1_AppStatus(in *management.AppStatus, out *AppStatus, s conversion.Scope) error { + out.AppStatus = in.AppStatus + return nil +} + +// Convert_management_AppStatus_To_v1_AppStatus is an autogenerated conversion function. +func Convert_management_AppStatus_To_v1_AppStatus(in *management.AppStatus, out *AppStatus, s conversion.Scope) error { + return autoConvert_management_AppStatus_To_v1_AppStatus(in, out, s) +} + +func autoConvert_v1_Apps_To_management_Apps(in *Apps, out *management.Apps, s conversion.Scope) error { + out.NoDefault = in.NoDefault + out.Repositories = *(*[]storagev1.HelmChartRepository)(unsafe.Pointer(&in.Repositories)) + out.PredefinedApps = *(*[]management.PredefinedApp)(unsafe.Pointer(&in.PredefinedApps)) + return nil +} + +// Convert_v1_Apps_To_management_Apps is an autogenerated conversion function. +func Convert_v1_Apps_To_management_Apps(in *Apps, out *management.Apps, s conversion.Scope) error { + return autoConvert_v1_Apps_To_management_Apps(in, out, s) +} + +func autoConvert_management_Apps_To_v1_Apps(in *management.Apps, out *Apps, s conversion.Scope) error { + out.NoDefault = in.NoDefault + out.Repositories = *(*[]storagev1.HelmChartRepository)(unsafe.Pointer(&in.Repositories)) + out.PredefinedApps = *(*[]PredefinedApp)(unsafe.Pointer(&in.PredefinedApps)) + return nil +} + +// Convert_management_Apps_To_v1_Apps is an autogenerated conversion function. +func Convert_management_Apps_To_v1_Apps(in *management.Apps, out *Apps, s conversion.Scope) error { + return autoConvert_management_Apps_To_v1_Apps(in, out, s) +} + +func autoConvert_v1_Audit_To_management_Audit(in *Audit, out *management.Audit, s conversion.Scope) error { + out.Enabled = in.Enabled + out.DisableAgentSyncBack = in.DisableAgentSyncBack + out.Level = in.Level + if err := Convert_v1_AuditPolicy_To_management_AuditPolicy(&in.Policy, &out.Policy, s); err != nil { + return err + } + out.DataStoreEndpoint = in.DataStoreEndpoint + out.DataStoreMaxAge = (*int)(unsafe.Pointer(in.DataStoreMaxAge)) + out.Path = in.Path + out.MaxAge = in.MaxAge + out.MaxBackups = in.MaxBackups + out.MaxSize = in.MaxSize + out.Compress = in.Compress + return nil +} + +// Convert_v1_Audit_To_management_Audit is an autogenerated conversion function. +func Convert_v1_Audit_To_management_Audit(in *Audit, out *management.Audit, s conversion.Scope) error { + return autoConvert_v1_Audit_To_management_Audit(in, out, s) +} + +func autoConvert_management_Audit_To_v1_Audit(in *management.Audit, out *Audit, s conversion.Scope) error { + out.Enabled = in.Enabled + out.DisableAgentSyncBack = in.DisableAgentSyncBack + out.Level = in.Level + if err := Convert_management_AuditPolicy_To_v1_AuditPolicy(&in.Policy, &out.Policy, s); err != nil { + return err + } + out.DataStoreEndpoint = in.DataStoreEndpoint + out.DataStoreMaxAge = (*int)(unsafe.Pointer(in.DataStoreMaxAge)) + out.Path = in.Path + out.MaxAge = in.MaxAge + out.MaxBackups = in.MaxBackups + out.MaxSize = in.MaxSize + out.Compress = in.Compress + return nil +} + +// Convert_management_Audit_To_v1_Audit is an autogenerated conversion function. +func Convert_management_Audit_To_v1_Audit(in *management.Audit, out *Audit, s conversion.Scope) error { + return autoConvert_management_Audit_To_v1_Audit(in, out, s) +} + +func autoConvert_v1_AuditPolicy_To_management_AuditPolicy(in *AuditPolicy, out *management.AuditPolicy, s conversion.Scope) error { + out.Rules = *(*[]management.AuditPolicyRule)(unsafe.Pointer(&in.Rules)) + out.OmitStages = *(*[]auditv1.Stage)(unsafe.Pointer(&in.OmitStages)) + return nil +} + +// Convert_v1_AuditPolicy_To_management_AuditPolicy is an autogenerated conversion function. +func Convert_v1_AuditPolicy_To_management_AuditPolicy(in *AuditPolicy, out *management.AuditPolicy, s conversion.Scope) error { + return autoConvert_v1_AuditPolicy_To_management_AuditPolicy(in, out, s) +} + +func autoConvert_management_AuditPolicy_To_v1_AuditPolicy(in *management.AuditPolicy, out *AuditPolicy, s conversion.Scope) error { + out.Rules = *(*[]AuditPolicyRule)(unsafe.Pointer(&in.Rules)) + out.OmitStages = *(*[]auditv1.Stage)(unsafe.Pointer(&in.OmitStages)) + return nil +} + +// Convert_management_AuditPolicy_To_v1_AuditPolicy is an autogenerated conversion function. +func Convert_management_AuditPolicy_To_v1_AuditPolicy(in *management.AuditPolicy, out *AuditPolicy, s conversion.Scope) error { + return autoConvert_management_AuditPolicy_To_v1_AuditPolicy(in, out, s) +} + +func autoConvert_v1_AuditPolicyRule_To_management_AuditPolicyRule(in *AuditPolicyRule, out *management.AuditPolicyRule, s conversion.Scope) error { + out.Level = auditv1.Level(in.Level) + out.Users = *(*[]string)(unsafe.Pointer(&in.Users)) + out.UserGroups = *(*[]string)(unsafe.Pointer(&in.UserGroups)) + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.Resources = *(*[]management.GroupResources)(unsafe.Pointer(&in.Resources)) + out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + out.OmitStages = *(*[]auditv1.Stage)(unsafe.Pointer(&in.OmitStages)) + out.RequestTargets = *(*[]auditv1.RequestTarget)(unsafe.Pointer(&in.RequestTargets)) + out.Clusters = *(*[]string)(unsafe.Pointer(&in.Clusters)) + return nil +} + +// Convert_v1_AuditPolicyRule_To_management_AuditPolicyRule is an autogenerated conversion function. +func Convert_v1_AuditPolicyRule_To_management_AuditPolicyRule(in *AuditPolicyRule, out *management.AuditPolicyRule, s conversion.Scope) error { + return autoConvert_v1_AuditPolicyRule_To_management_AuditPolicyRule(in, out, s) +} + +func autoConvert_management_AuditPolicyRule_To_v1_AuditPolicyRule(in *management.AuditPolicyRule, out *AuditPolicyRule, s conversion.Scope) error { + out.Level = auditv1.Level(in.Level) + out.Users = *(*[]string)(unsafe.Pointer(&in.Users)) + out.UserGroups = *(*[]string)(unsafe.Pointer(&in.UserGroups)) + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.Resources = *(*[]GroupResources)(unsafe.Pointer(&in.Resources)) + out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + out.OmitStages = *(*[]auditv1.Stage)(unsafe.Pointer(&in.OmitStages)) + out.RequestTargets = *(*[]auditv1.RequestTarget)(unsafe.Pointer(&in.RequestTargets)) + out.Clusters = *(*[]string)(unsafe.Pointer(&in.Clusters)) + return nil +} + +// Convert_management_AuditPolicyRule_To_v1_AuditPolicyRule is an autogenerated conversion function. +func Convert_management_AuditPolicyRule_To_v1_AuditPolicyRule(in *management.AuditPolicyRule, out *AuditPolicyRule, s conversion.Scope) error { + return autoConvert_management_AuditPolicyRule_To_v1_AuditPolicyRule(in, out, s) +} + +func autoConvert_v1_Authentication_To_management_Authentication(in *Authentication, out *management.Authentication, s conversion.Scope) error { + if err := Convert_v1_Connector_To_management_Connector(&in.Connector, &out.Connector, s); err != nil { + return err + } + out.Password = (*management.AuthenticationPassword)(unsafe.Pointer(in.Password)) + out.Connectors = *(*[]management.ConnectorWithName)(unsafe.Pointer(&in.Connectors)) + out.DisableTeamCreation = in.DisableTeamCreation + out.AccessKeyMaxTTLSeconds = in.AccessKeyMaxTTLSeconds + out.LoginAccessKeyTTLSeconds = (*int64)(unsafe.Pointer(in.LoginAccessKeyTTLSeconds)) + out.CustomHttpHeaders = *(*map[string]string)(unsafe.Pointer(&in.CustomHttpHeaders)) + return nil +} + +// Convert_v1_Authentication_To_management_Authentication is an autogenerated conversion function. +func Convert_v1_Authentication_To_management_Authentication(in *Authentication, out *management.Authentication, s conversion.Scope) error { + return autoConvert_v1_Authentication_To_management_Authentication(in, out, s) +} + +func autoConvert_management_Authentication_To_v1_Authentication(in *management.Authentication, out *Authentication, s conversion.Scope) error { + if err := Convert_management_Connector_To_v1_Connector(&in.Connector, &out.Connector, s); err != nil { + return err + } + out.Password = (*AuthenticationPassword)(unsafe.Pointer(in.Password)) + out.Connectors = *(*[]ConnectorWithName)(unsafe.Pointer(&in.Connectors)) + out.DisableTeamCreation = in.DisableTeamCreation + out.AccessKeyMaxTTLSeconds = in.AccessKeyMaxTTLSeconds + out.LoginAccessKeyTTLSeconds = (*int64)(unsafe.Pointer(in.LoginAccessKeyTTLSeconds)) + out.CustomHttpHeaders = *(*map[string]string)(unsafe.Pointer(&in.CustomHttpHeaders)) + return nil +} + +// Convert_management_Authentication_To_v1_Authentication is an autogenerated conversion function. +func Convert_management_Authentication_To_v1_Authentication(in *management.Authentication, out *Authentication, s conversion.Scope) error { + return autoConvert_management_Authentication_To_v1_Authentication(in, out, s) +} + +func autoConvert_v1_AuthenticationClusterAccountTemplates_To_management_AuthenticationClusterAccountTemplates(in *AuthenticationClusterAccountTemplates, out *management.AuthenticationClusterAccountTemplates, s conversion.Scope) error { + out.ClusterAccountTemplates = *(*[]storagev1.UserClusterAccountTemplate)(unsafe.Pointer(&in.ClusterAccountTemplates)) + out.GroupClusterAccountTemplates = *(*[]management.AuthenticationGroupClusterAccountTemplate)(unsafe.Pointer(&in.GroupClusterAccountTemplates)) + return nil +} + +// Convert_v1_AuthenticationClusterAccountTemplates_To_management_AuthenticationClusterAccountTemplates is an autogenerated conversion function. +func Convert_v1_AuthenticationClusterAccountTemplates_To_management_AuthenticationClusterAccountTemplates(in *AuthenticationClusterAccountTemplates, out *management.AuthenticationClusterAccountTemplates, s conversion.Scope) error { + return autoConvert_v1_AuthenticationClusterAccountTemplates_To_management_AuthenticationClusterAccountTemplates(in, out, s) +} + +func autoConvert_management_AuthenticationClusterAccountTemplates_To_v1_AuthenticationClusterAccountTemplates(in *management.AuthenticationClusterAccountTemplates, out *AuthenticationClusterAccountTemplates, s conversion.Scope) error { + out.ClusterAccountTemplates = *(*[]storagev1.UserClusterAccountTemplate)(unsafe.Pointer(&in.ClusterAccountTemplates)) + out.GroupClusterAccountTemplates = *(*[]AuthenticationGroupClusterAccountTemplate)(unsafe.Pointer(&in.GroupClusterAccountTemplates)) + return nil +} + +// Convert_management_AuthenticationClusterAccountTemplates_To_v1_AuthenticationClusterAccountTemplates is an autogenerated conversion function. +func Convert_management_AuthenticationClusterAccountTemplates_To_v1_AuthenticationClusterAccountTemplates(in *management.AuthenticationClusterAccountTemplates, out *AuthenticationClusterAccountTemplates, s conversion.Scope) error { + return autoConvert_management_AuthenticationClusterAccountTemplates_To_v1_AuthenticationClusterAccountTemplates(in, out, s) +} + +func autoConvert_v1_AuthenticationGithub_To_management_AuthenticationGithub(in *AuthenticationGithub, out *management.AuthenticationGithub, s conversion.Scope) error { + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURI = in.RedirectURI + out.Orgs = *(*[]management.AuthenticationGithubOrg)(unsafe.Pointer(&in.Orgs)) + out.HostName = in.HostName + out.RootCA = in.RootCA + if err := Convert_v1_AuthenticationClusterAccountTemplates_To_management_AuthenticationClusterAccountTemplates(&in.AuthenticationClusterAccountTemplates, &out.AuthenticationClusterAccountTemplates, s); err != nil { + return err + } + return nil +} + +// Convert_v1_AuthenticationGithub_To_management_AuthenticationGithub is an autogenerated conversion function. +func Convert_v1_AuthenticationGithub_To_management_AuthenticationGithub(in *AuthenticationGithub, out *management.AuthenticationGithub, s conversion.Scope) error { + return autoConvert_v1_AuthenticationGithub_To_management_AuthenticationGithub(in, out, s) +} + +func autoConvert_management_AuthenticationGithub_To_v1_AuthenticationGithub(in *management.AuthenticationGithub, out *AuthenticationGithub, s conversion.Scope) error { + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURI = in.RedirectURI + out.Orgs = *(*[]AuthenticationGithubOrg)(unsafe.Pointer(&in.Orgs)) + out.HostName = in.HostName + out.RootCA = in.RootCA + if err := Convert_management_AuthenticationClusterAccountTemplates_To_v1_AuthenticationClusterAccountTemplates(&in.AuthenticationClusterAccountTemplates, &out.AuthenticationClusterAccountTemplates, s); err != nil { + return err + } + return nil +} + +// Convert_management_AuthenticationGithub_To_v1_AuthenticationGithub is an autogenerated conversion function. +func Convert_management_AuthenticationGithub_To_v1_AuthenticationGithub(in *management.AuthenticationGithub, out *AuthenticationGithub, s conversion.Scope) error { + return autoConvert_management_AuthenticationGithub_To_v1_AuthenticationGithub(in, out, s) +} + +func autoConvert_v1_AuthenticationGithubOrg_To_management_AuthenticationGithubOrg(in *AuthenticationGithubOrg, out *management.AuthenticationGithubOrg, s conversion.Scope) error { + out.Name = in.Name + out.Teams = *(*[]string)(unsafe.Pointer(&in.Teams)) + return nil +} + +// Convert_v1_AuthenticationGithubOrg_To_management_AuthenticationGithubOrg is an autogenerated conversion function. +func Convert_v1_AuthenticationGithubOrg_To_management_AuthenticationGithubOrg(in *AuthenticationGithubOrg, out *management.AuthenticationGithubOrg, s conversion.Scope) error { + return autoConvert_v1_AuthenticationGithubOrg_To_management_AuthenticationGithubOrg(in, out, s) +} + +func autoConvert_management_AuthenticationGithubOrg_To_v1_AuthenticationGithubOrg(in *management.AuthenticationGithubOrg, out *AuthenticationGithubOrg, s conversion.Scope) error { + out.Name = in.Name + out.Teams = *(*[]string)(unsafe.Pointer(&in.Teams)) + return nil +} + +// Convert_management_AuthenticationGithubOrg_To_v1_AuthenticationGithubOrg is an autogenerated conversion function. +func Convert_management_AuthenticationGithubOrg_To_v1_AuthenticationGithubOrg(in *management.AuthenticationGithubOrg, out *AuthenticationGithubOrg, s conversion.Scope) error { + return autoConvert_management_AuthenticationGithubOrg_To_v1_AuthenticationGithubOrg(in, out, s) +} + +func autoConvert_v1_AuthenticationGitlab_To_management_AuthenticationGitlab(in *AuthenticationGitlab, out *management.AuthenticationGitlab, s conversion.Scope) error { + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURI = in.RedirectURI + out.BaseURL = in.BaseURL + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + if err := Convert_v1_AuthenticationClusterAccountTemplates_To_management_AuthenticationClusterAccountTemplates(&in.AuthenticationClusterAccountTemplates, &out.AuthenticationClusterAccountTemplates, s); err != nil { + return err + } + return nil +} + +// Convert_v1_AuthenticationGitlab_To_management_AuthenticationGitlab is an autogenerated conversion function. +func Convert_v1_AuthenticationGitlab_To_management_AuthenticationGitlab(in *AuthenticationGitlab, out *management.AuthenticationGitlab, s conversion.Scope) error { + return autoConvert_v1_AuthenticationGitlab_To_management_AuthenticationGitlab(in, out, s) +} + +func autoConvert_management_AuthenticationGitlab_To_v1_AuthenticationGitlab(in *management.AuthenticationGitlab, out *AuthenticationGitlab, s conversion.Scope) error { + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURI = in.RedirectURI + out.BaseURL = in.BaseURL + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + if err := Convert_management_AuthenticationClusterAccountTemplates_To_v1_AuthenticationClusterAccountTemplates(&in.AuthenticationClusterAccountTemplates, &out.AuthenticationClusterAccountTemplates, s); err != nil { + return err + } + return nil +} + +// Convert_management_AuthenticationGitlab_To_v1_AuthenticationGitlab is an autogenerated conversion function. +func Convert_management_AuthenticationGitlab_To_v1_AuthenticationGitlab(in *management.AuthenticationGitlab, out *AuthenticationGitlab, s conversion.Scope) error { + return autoConvert_management_AuthenticationGitlab_To_v1_AuthenticationGitlab(in, out, s) +} + +func autoConvert_v1_AuthenticationGoogle_To_management_AuthenticationGoogle(in *AuthenticationGoogle, out *management.AuthenticationGoogle, s conversion.Scope) error { + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURI = in.RedirectURI + out.Scopes = *(*[]string)(unsafe.Pointer(&in.Scopes)) + out.HostedDomains = *(*[]string)(unsafe.Pointer(&in.HostedDomains)) + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.ServiceAccountFilePath = in.ServiceAccountFilePath + out.AdminEmail = in.AdminEmail + if err := Convert_v1_AuthenticationClusterAccountTemplates_To_management_AuthenticationClusterAccountTemplates(&in.AuthenticationClusterAccountTemplates, &out.AuthenticationClusterAccountTemplates, s); err != nil { + return err + } + return nil +} + +// Convert_v1_AuthenticationGoogle_To_management_AuthenticationGoogle is an autogenerated conversion function. +func Convert_v1_AuthenticationGoogle_To_management_AuthenticationGoogle(in *AuthenticationGoogle, out *management.AuthenticationGoogle, s conversion.Scope) error { + return autoConvert_v1_AuthenticationGoogle_To_management_AuthenticationGoogle(in, out, s) +} + +func autoConvert_management_AuthenticationGoogle_To_v1_AuthenticationGoogle(in *management.AuthenticationGoogle, out *AuthenticationGoogle, s conversion.Scope) error { + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURI = in.RedirectURI + out.Scopes = *(*[]string)(unsafe.Pointer(&in.Scopes)) + out.HostedDomains = *(*[]string)(unsafe.Pointer(&in.HostedDomains)) + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.ServiceAccountFilePath = in.ServiceAccountFilePath + out.AdminEmail = in.AdminEmail + if err := Convert_management_AuthenticationClusterAccountTemplates_To_v1_AuthenticationClusterAccountTemplates(&in.AuthenticationClusterAccountTemplates, &out.AuthenticationClusterAccountTemplates, s); err != nil { + return err + } + return nil +} + +// Convert_management_AuthenticationGoogle_To_v1_AuthenticationGoogle is an autogenerated conversion function. +func Convert_management_AuthenticationGoogle_To_v1_AuthenticationGoogle(in *management.AuthenticationGoogle, out *AuthenticationGoogle, s conversion.Scope) error { + return autoConvert_management_AuthenticationGoogle_To_v1_AuthenticationGoogle(in, out, s) +} + +func autoConvert_v1_AuthenticationGroupClusterAccountTemplate_To_management_AuthenticationGroupClusterAccountTemplate(in *AuthenticationGroupClusterAccountTemplate, out *management.AuthenticationGroupClusterAccountTemplate, s conversion.Scope) error { + out.Group = in.Group + out.ClusterAccountTemplates = *(*[]storagev1.UserClusterAccountTemplate)(unsafe.Pointer(&in.ClusterAccountTemplates)) + return nil +} + +// Convert_v1_AuthenticationGroupClusterAccountTemplate_To_management_AuthenticationGroupClusterAccountTemplate is an autogenerated conversion function. +func Convert_v1_AuthenticationGroupClusterAccountTemplate_To_management_AuthenticationGroupClusterAccountTemplate(in *AuthenticationGroupClusterAccountTemplate, out *management.AuthenticationGroupClusterAccountTemplate, s conversion.Scope) error { + return autoConvert_v1_AuthenticationGroupClusterAccountTemplate_To_management_AuthenticationGroupClusterAccountTemplate(in, out, s) +} + +func autoConvert_management_AuthenticationGroupClusterAccountTemplate_To_v1_AuthenticationGroupClusterAccountTemplate(in *management.AuthenticationGroupClusterAccountTemplate, out *AuthenticationGroupClusterAccountTemplate, s conversion.Scope) error { + out.Group = in.Group + out.ClusterAccountTemplates = *(*[]storagev1.UserClusterAccountTemplate)(unsafe.Pointer(&in.ClusterAccountTemplates)) + return nil +} + +// Convert_management_AuthenticationGroupClusterAccountTemplate_To_v1_AuthenticationGroupClusterAccountTemplate is an autogenerated conversion function. +func Convert_management_AuthenticationGroupClusterAccountTemplate_To_v1_AuthenticationGroupClusterAccountTemplate(in *management.AuthenticationGroupClusterAccountTemplate, out *AuthenticationGroupClusterAccountTemplate, s conversion.Scope) error { + return autoConvert_management_AuthenticationGroupClusterAccountTemplate_To_v1_AuthenticationGroupClusterAccountTemplate(in, out, s) +} + +func autoConvert_v1_AuthenticationMicrosoft_To_management_AuthenticationMicrosoft(in *AuthenticationMicrosoft, out *management.AuthenticationMicrosoft, s conversion.Scope) error { + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURI = in.RedirectURI + out.Tenant = in.Tenant + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.OnlySecurityGroups = in.OnlySecurityGroups + out.UseGroupsAsWhitelist = in.UseGroupsAsWhitelist + if err := Convert_v1_AuthenticationClusterAccountTemplates_To_management_AuthenticationClusterAccountTemplates(&in.AuthenticationClusterAccountTemplates, &out.AuthenticationClusterAccountTemplates, s); err != nil { + return err + } + return nil +} + +// Convert_v1_AuthenticationMicrosoft_To_management_AuthenticationMicrosoft is an autogenerated conversion function. +func Convert_v1_AuthenticationMicrosoft_To_management_AuthenticationMicrosoft(in *AuthenticationMicrosoft, out *management.AuthenticationMicrosoft, s conversion.Scope) error { + return autoConvert_v1_AuthenticationMicrosoft_To_management_AuthenticationMicrosoft(in, out, s) +} + +func autoConvert_management_AuthenticationMicrosoft_To_v1_AuthenticationMicrosoft(in *management.AuthenticationMicrosoft, out *AuthenticationMicrosoft, s conversion.Scope) error { + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURI = in.RedirectURI + out.Tenant = in.Tenant + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.OnlySecurityGroups = in.OnlySecurityGroups + out.UseGroupsAsWhitelist = in.UseGroupsAsWhitelist + if err := Convert_management_AuthenticationClusterAccountTemplates_To_v1_AuthenticationClusterAccountTemplates(&in.AuthenticationClusterAccountTemplates, &out.AuthenticationClusterAccountTemplates, s); err != nil { + return err + } + return nil +} + +// Convert_management_AuthenticationMicrosoft_To_v1_AuthenticationMicrosoft is an autogenerated conversion function. +func Convert_management_AuthenticationMicrosoft_To_v1_AuthenticationMicrosoft(in *management.AuthenticationMicrosoft, out *AuthenticationMicrosoft, s conversion.Scope) error { + return autoConvert_management_AuthenticationMicrosoft_To_v1_AuthenticationMicrosoft(in, out, s) +} + +func autoConvert_v1_AuthenticationOIDC_To_management_AuthenticationOIDC(in *AuthenticationOIDC, out *management.AuthenticationOIDC, s conversion.Scope) error { + out.IssuerURL = in.IssuerURL + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURI = in.RedirectURI + out.PostLogoutRedirectURI = in.PostLogoutRedirectURI + out.CAFile = in.CAFile + out.InsecureCA = in.InsecureCA + out.PreferredUsernameClaim = in.PreferredUsernameClaim + out.LoftUsernameClaim = in.LoftUsernameClaim + out.UsernameClaim = in.UsernameClaim + out.EmailClaim = in.EmailClaim + out.UsernamePrefix = in.UsernamePrefix + out.GroupsClaim = in.GroupsClaim + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Scopes = *(*[]string)(unsafe.Pointer(&in.Scopes)) + out.GetUserInfo = in.GetUserInfo + out.GroupsPrefix = in.GroupsPrefix + out.Type = in.Type + if err := Convert_v1_AuthenticationClusterAccountTemplates_To_management_AuthenticationClusterAccountTemplates(&in.AuthenticationClusterAccountTemplates, &out.AuthenticationClusterAccountTemplates, s); err != nil { + return err + } + return nil +} + +// Convert_v1_AuthenticationOIDC_To_management_AuthenticationOIDC is an autogenerated conversion function. +func Convert_v1_AuthenticationOIDC_To_management_AuthenticationOIDC(in *AuthenticationOIDC, out *management.AuthenticationOIDC, s conversion.Scope) error { + return autoConvert_v1_AuthenticationOIDC_To_management_AuthenticationOIDC(in, out, s) +} + +func autoConvert_management_AuthenticationOIDC_To_v1_AuthenticationOIDC(in *management.AuthenticationOIDC, out *AuthenticationOIDC, s conversion.Scope) error { + out.IssuerURL = in.IssuerURL + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURI = in.RedirectURI + out.PostLogoutRedirectURI = in.PostLogoutRedirectURI + out.CAFile = in.CAFile + out.InsecureCA = in.InsecureCA + out.PreferredUsernameClaim = in.PreferredUsernameClaim + out.LoftUsernameClaim = in.LoftUsernameClaim + out.UsernameClaim = in.UsernameClaim + out.EmailClaim = in.EmailClaim + out.UsernamePrefix = in.UsernamePrefix + out.GroupsClaim = in.GroupsClaim + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Scopes = *(*[]string)(unsafe.Pointer(&in.Scopes)) + out.GetUserInfo = in.GetUserInfo + out.GroupsPrefix = in.GroupsPrefix + out.Type = in.Type + if err := Convert_management_AuthenticationClusterAccountTemplates_To_v1_AuthenticationClusterAccountTemplates(&in.AuthenticationClusterAccountTemplates, &out.AuthenticationClusterAccountTemplates, s); err != nil { + return err + } + return nil +} + +// Convert_management_AuthenticationOIDC_To_v1_AuthenticationOIDC is an autogenerated conversion function. +func Convert_management_AuthenticationOIDC_To_v1_AuthenticationOIDC(in *management.AuthenticationOIDC, out *AuthenticationOIDC, s conversion.Scope) error { + return autoConvert_management_AuthenticationOIDC_To_v1_AuthenticationOIDC(in, out, s) +} + +func autoConvert_v1_AuthenticationPassword_To_management_AuthenticationPassword(in *AuthenticationPassword, out *management.AuthenticationPassword, s conversion.Scope) error { + out.Disabled = in.Disabled + return nil +} + +// Convert_v1_AuthenticationPassword_To_management_AuthenticationPassword is an autogenerated conversion function. +func Convert_v1_AuthenticationPassword_To_management_AuthenticationPassword(in *AuthenticationPassword, out *management.AuthenticationPassword, s conversion.Scope) error { + return autoConvert_v1_AuthenticationPassword_To_management_AuthenticationPassword(in, out, s) +} + +func autoConvert_management_AuthenticationPassword_To_v1_AuthenticationPassword(in *management.AuthenticationPassword, out *AuthenticationPassword, s conversion.Scope) error { + out.Disabled = in.Disabled + return nil +} + +// Convert_management_AuthenticationPassword_To_v1_AuthenticationPassword is an autogenerated conversion function. +func Convert_management_AuthenticationPassword_To_v1_AuthenticationPassword(in *management.AuthenticationPassword, out *AuthenticationPassword, s conversion.Scope) error { + return autoConvert_management_AuthenticationPassword_To_v1_AuthenticationPassword(in, out, s) +} + +func autoConvert_v1_AuthenticationSAML_To_management_AuthenticationSAML(in *AuthenticationSAML, out *management.AuthenticationSAML, s conversion.Scope) error { + out.RedirectURI = in.RedirectURI + out.SSOURL = in.SSOURL + out.CAData = *(*[]byte)(unsafe.Pointer(&in.CAData)) + out.UsernameAttr = in.UsernameAttr + out.EmailAttr = in.EmailAttr + out.GroupsAttr = in.GroupsAttr + out.CA = in.CA + out.InsecureSkipSignatureValidation = in.InsecureSkipSignatureValidation + out.EntityIssuer = in.EntityIssuer + out.SSOIssuer = in.SSOIssuer + out.GroupsDelim = in.GroupsDelim + out.AllowedGroups = *(*[]string)(unsafe.Pointer(&in.AllowedGroups)) + out.FilterGroups = in.FilterGroups + out.NameIDPolicyFormat = in.NameIDPolicyFormat + return nil +} + +// Convert_v1_AuthenticationSAML_To_management_AuthenticationSAML is an autogenerated conversion function. +func Convert_v1_AuthenticationSAML_To_management_AuthenticationSAML(in *AuthenticationSAML, out *management.AuthenticationSAML, s conversion.Scope) error { + return autoConvert_v1_AuthenticationSAML_To_management_AuthenticationSAML(in, out, s) +} + +func autoConvert_management_AuthenticationSAML_To_v1_AuthenticationSAML(in *management.AuthenticationSAML, out *AuthenticationSAML, s conversion.Scope) error { + out.RedirectURI = in.RedirectURI + out.SSOURL = in.SSOURL + out.CAData = *(*[]byte)(unsafe.Pointer(&in.CAData)) + out.UsernameAttr = in.UsernameAttr + out.EmailAttr = in.EmailAttr + out.GroupsAttr = in.GroupsAttr + out.CA = in.CA + out.InsecureSkipSignatureValidation = in.InsecureSkipSignatureValidation + out.EntityIssuer = in.EntityIssuer + out.SSOIssuer = in.SSOIssuer + out.GroupsDelim = in.GroupsDelim + out.AllowedGroups = *(*[]string)(unsafe.Pointer(&in.AllowedGroups)) + out.FilterGroups = in.FilterGroups + out.NameIDPolicyFormat = in.NameIDPolicyFormat + return nil +} + +// Convert_management_AuthenticationSAML_To_v1_AuthenticationSAML is an autogenerated conversion function. +func Convert_management_AuthenticationSAML_To_v1_AuthenticationSAML(in *management.AuthenticationSAML, out *AuthenticationSAML, s conversion.Scope) error { + return autoConvert_management_AuthenticationSAML_To_v1_AuthenticationSAML(in, out, s) +} + +func autoConvert_v1_Cluster_To_management_Cluster(in *Cluster, out *management.Cluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ClusterSpec_To_management_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ClusterStatus_To_management_ClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Cluster_To_management_Cluster is an autogenerated conversion function. +func Convert_v1_Cluster_To_management_Cluster(in *Cluster, out *management.Cluster, s conversion.Scope) error { + return autoConvert_v1_Cluster_To_management_Cluster(in, out, s) +} + +func autoConvert_management_Cluster_To_v1_Cluster(in *management.Cluster, out *Cluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ClusterSpec_To_v1_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_ClusterStatus_To_v1_ClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Cluster_To_v1_Cluster is an autogenerated conversion function. +func Convert_management_Cluster_To_v1_Cluster(in *management.Cluster, out *Cluster, s conversion.Scope) error { + return autoConvert_management_Cluster_To_v1_Cluster(in, out, s) +} + +func autoConvert_v1_ClusterAccess_To_management_ClusterAccess(in *ClusterAccess, out *management.ClusterAccess, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ClusterAccessSpec_To_management_ClusterAccessSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ClusterAccessStatus_To_management_ClusterAccessStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ClusterAccess_To_management_ClusterAccess is an autogenerated conversion function. +func Convert_v1_ClusterAccess_To_management_ClusterAccess(in *ClusterAccess, out *management.ClusterAccess, s conversion.Scope) error { + return autoConvert_v1_ClusterAccess_To_management_ClusterAccess(in, out, s) +} + +func autoConvert_management_ClusterAccess_To_v1_ClusterAccess(in *management.ClusterAccess, out *ClusterAccess, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ClusterAccessSpec_To_v1_ClusterAccessSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_ClusterAccessStatus_To_v1_ClusterAccessStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_ClusterAccess_To_v1_ClusterAccess is an autogenerated conversion function. +func Convert_management_ClusterAccess_To_v1_ClusterAccess(in *management.ClusterAccess, out *ClusterAccess, s conversion.Scope) error { + return autoConvert_management_ClusterAccess_To_v1_ClusterAccess(in, out, s) +} + +func autoConvert_v1_ClusterAccessList_To_management_ClusterAccessList(in *ClusterAccessList, out *management.ClusterAccessList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ClusterAccess)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterAccessList_To_management_ClusterAccessList is an autogenerated conversion function. +func Convert_v1_ClusterAccessList_To_management_ClusterAccessList(in *ClusterAccessList, out *management.ClusterAccessList, s conversion.Scope) error { + return autoConvert_v1_ClusterAccessList_To_management_ClusterAccessList(in, out, s) +} + +func autoConvert_management_ClusterAccessList_To_v1_ClusterAccessList(in *management.ClusterAccessList, out *ClusterAccessList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterAccess)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterAccessList_To_v1_ClusterAccessList is an autogenerated conversion function. +func Convert_management_ClusterAccessList_To_v1_ClusterAccessList(in *management.ClusterAccessList, out *ClusterAccessList, s conversion.Scope) error { + return autoConvert_management_ClusterAccessList_To_v1_ClusterAccessList(in, out, s) +} + +func autoConvert_v1_ClusterAccessSpec_To_management_ClusterAccessSpec(in *ClusterAccessSpec, out *management.ClusterAccessSpec, s conversion.Scope) error { + out.ClusterAccessSpec = in.ClusterAccessSpec + return nil +} + +// Convert_v1_ClusterAccessSpec_To_management_ClusterAccessSpec is an autogenerated conversion function. +func Convert_v1_ClusterAccessSpec_To_management_ClusterAccessSpec(in *ClusterAccessSpec, out *management.ClusterAccessSpec, s conversion.Scope) error { + return autoConvert_v1_ClusterAccessSpec_To_management_ClusterAccessSpec(in, out, s) +} + +func autoConvert_management_ClusterAccessSpec_To_v1_ClusterAccessSpec(in *management.ClusterAccessSpec, out *ClusterAccessSpec, s conversion.Scope) error { + out.ClusterAccessSpec = in.ClusterAccessSpec + return nil +} + +// Convert_management_ClusterAccessSpec_To_v1_ClusterAccessSpec is an autogenerated conversion function. +func Convert_management_ClusterAccessSpec_To_v1_ClusterAccessSpec(in *management.ClusterAccessSpec, out *ClusterAccessSpec, s conversion.Scope) error { + return autoConvert_management_ClusterAccessSpec_To_v1_ClusterAccessSpec(in, out, s) +} + +func autoConvert_v1_ClusterAccessStatus_To_management_ClusterAccessStatus(in *ClusterAccessStatus, out *management.ClusterAccessStatus, s conversion.Scope) error { + out.ClusterAccessStatus = in.ClusterAccessStatus + out.Clusters = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Clusters)) + out.Users = *(*[]*clusterv1.UserOrTeam)(unsafe.Pointer(&in.Users)) + out.Teams = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Teams)) + out.SpaceConstraint = (*clusterv1.EntityInfo)(unsafe.Pointer(in.SpaceConstraint)) + return nil +} + +// Convert_v1_ClusterAccessStatus_To_management_ClusterAccessStatus is an autogenerated conversion function. +func Convert_v1_ClusterAccessStatus_To_management_ClusterAccessStatus(in *ClusterAccessStatus, out *management.ClusterAccessStatus, s conversion.Scope) error { + return autoConvert_v1_ClusterAccessStatus_To_management_ClusterAccessStatus(in, out, s) +} + +func autoConvert_management_ClusterAccessStatus_To_v1_ClusterAccessStatus(in *management.ClusterAccessStatus, out *ClusterAccessStatus, s conversion.Scope) error { + out.ClusterAccessStatus = in.ClusterAccessStatus + out.Clusters = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Clusters)) + out.Users = *(*[]*clusterv1.UserOrTeam)(unsafe.Pointer(&in.Users)) + out.Teams = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Teams)) + out.SpaceConstraint = (*clusterv1.EntityInfo)(unsafe.Pointer(in.SpaceConstraint)) + return nil +} + +// Convert_management_ClusterAccessStatus_To_v1_ClusterAccessStatus is an autogenerated conversion function. +func Convert_management_ClusterAccessStatus_To_v1_ClusterAccessStatus(in *management.ClusterAccessStatus, out *ClusterAccessStatus, s conversion.Scope) error { + return autoConvert_management_ClusterAccessStatus_To_v1_ClusterAccessStatus(in, out, s) +} + +func autoConvert_v1_ClusterAccounts_To_management_ClusterAccounts(in *ClusterAccounts, out *management.ClusterAccounts, s conversion.Scope) error { + out.Accounts = *(*[]string)(unsafe.Pointer(&in.Accounts)) + out.Cluster = in.Cluster + return nil +} + +// Convert_v1_ClusterAccounts_To_management_ClusterAccounts is an autogenerated conversion function. +func Convert_v1_ClusterAccounts_To_management_ClusterAccounts(in *ClusterAccounts, out *management.ClusterAccounts, s conversion.Scope) error { + return autoConvert_v1_ClusterAccounts_To_management_ClusterAccounts(in, out, s) +} + +func autoConvert_management_ClusterAccounts_To_v1_ClusterAccounts(in *management.ClusterAccounts, out *ClusterAccounts, s conversion.Scope) error { + out.Accounts = *(*[]string)(unsafe.Pointer(&in.Accounts)) + out.Cluster = in.Cluster + return nil +} + +// Convert_management_ClusterAccounts_To_v1_ClusterAccounts is an autogenerated conversion function. +func Convert_management_ClusterAccounts_To_v1_ClusterAccounts(in *management.ClusterAccounts, out *ClusterAccounts, s conversion.Scope) error { + return autoConvert_management_ClusterAccounts_To_v1_ClusterAccounts(in, out, s) +} + +func autoConvert_v1_ClusterAgentConfig_To_management_ClusterAgentConfig(in *ClusterAgentConfig, out *management.ClusterAgentConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Cluster = in.Cluster + out.Audit = (*management.AgentAuditConfig)(unsafe.Pointer(in.Audit)) + out.DefaultImageRegistry = in.DefaultImageRegistry + out.TokenCaCert = *(*[]byte)(unsafe.Pointer(&in.TokenCaCert)) + out.LoftHost = in.LoftHost + if err := Convert_v1_AgentAnalyticsSpec_To_management_AgentAnalyticsSpec(&in.AnalyticsSpec, &out.AnalyticsSpec, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ClusterAgentConfig_To_management_ClusterAgentConfig is an autogenerated conversion function. +func Convert_v1_ClusterAgentConfig_To_management_ClusterAgentConfig(in *ClusterAgentConfig, out *management.ClusterAgentConfig, s conversion.Scope) error { + return autoConvert_v1_ClusterAgentConfig_To_management_ClusterAgentConfig(in, out, s) +} + +func autoConvert_management_ClusterAgentConfig_To_v1_ClusterAgentConfig(in *management.ClusterAgentConfig, out *ClusterAgentConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Cluster = in.Cluster + out.Audit = (*AgentAuditConfig)(unsafe.Pointer(in.Audit)) + out.DefaultImageRegistry = in.DefaultImageRegistry + out.TokenCaCert = *(*[]byte)(unsafe.Pointer(&in.TokenCaCert)) + out.LoftHost = in.LoftHost + if err := Convert_management_AgentAnalyticsSpec_To_v1_AgentAnalyticsSpec(&in.AnalyticsSpec, &out.AnalyticsSpec, s); err != nil { + return err + } + return nil +} + +// Convert_management_ClusterAgentConfig_To_v1_ClusterAgentConfig is an autogenerated conversion function. +func Convert_management_ClusterAgentConfig_To_v1_ClusterAgentConfig(in *management.ClusterAgentConfig, out *ClusterAgentConfig, s conversion.Scope) error { + return autoConvert_management_ClusterAgentConfig_To_v1_ClusterAgentConfig(in, out, s) +} + +func autoConvert_v1_ClusterAgentConfigList_To_management_ClusterAgentConfigList(in *ClusterAgentConfigList, out *management.ClusterAgentConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ClusterAgentConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterAgentConfigList_To_management_ClusterAgentConfigList is an autogenerated conversion function. +func Convert_v1_ClusterAgentConfigList_To_management_ClusterAgentConfigList(in *ClusterAgentConfigList, out *management.ClusterAgentConfigList, s conversion.Scope) error { + return autoConvert_v1_ClusterAgentConfigList_To_management_ClusterAgentConfigList(in, out, s) +} + +func autoConvert_management_ClusterAgentConfigList_To_v1_ClusterAgentConfigList(in *management.ClusterAgentConfigList, out *ClusterAgentConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterAgentConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterAgentConfigList_To_v1_ClusterAgentConfigList is an autogenerated conversion function. +func Convert_management_ClusterAgentConfigList_To_v1_ClusterAgentConfigList(in *management.ClusterAgentConfigList, out *ClusterAgentConfigList, s conversion.Scope) error { + return autoConvert_management_ClusterAgentConfigList_To_v1_ClusterAgentConfigList(in, out, s) +} + +func autoConvert_v1_ClusterCharts_To_management_ClusterCharts(in *ClusterCharts, out *management.ClusterCharts, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Charts = *(*[]storagev1.HelmChart)(unsafe.Pointer(&in.Charts)) + out.Busy = in.Busy + return nil +} + +// Convert_v1_ClusterCharts_To_management_ClusterCharts is an autogenerated conversion function. +func Convert_v1_ClusterCharts_To_management_ClusterCharts(in *ClusterCharts, out *management.ClusterCharts, s conversion.Scope) error { + return autoConvert_v1_ClusterCharts_To_management_ClusterCharts(in, out, s) +} + +func autoConvert_management_ClusterCharts_To_v1_ClusterCharts(in *management.ClusterCharts, out *ClusterCharts, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Charts = *(*[]storagev1.HelmChart)(unsafe.Pointer(&in.Charts)) + out.Busy = in.Busy + return nil +} + +// Convert_management_ClusterCharts_To_v1_ClusterCharts is an autogenerated conversion function. +func Convert_management_ClusterCharts_To_v1_ClusterCharts(in *management.ClusterCharts, out *ClusterCharts, s conversion.Scope) error { + return autoConvert_management_ClusterCharts_To_v1_ClusterCharts(in, out, s) +} + +func autoConvert_v1_ClusterChartsList_To_management_ClusterChartsList(in *ClusterChartsList, out *management.ClusterChartsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ClusterCharts)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterChartsList_To_management_ClusterChartsList is an autogenerated conversion function. +func Convert_v1_ClusterChartsList_To_management_ClusterChartsList(in *ClusterChartsList, out *management.ClusterChartsList, s conversion.Scope) error { + return autoConvert_v1_ClusterChartsList_To_management_ClusterChartsList(in, out, s) +} + +func autoConvert_management_ClusterChartsList_To_v1_ClusterChartsList(in *management.ClusterChartsList, out *ClusterChartsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterCharts)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterChartsList_To_v1_ClusterChartsList is an autogenerated conversion function. +func Convert_management_ClusterChartsList_To_v1_ClusterChartsList(in *management.ClusterChartsList, out *ClusterChartsList, s conversion.Scope) error { + return autoConvert_management_ClusterChartsList_To_v1_ClusterChartsList(in, out, s) +} + +func autoConvert_v1_ClusterConnect_To_management_ClusterConnect(in *ClusterConnect, out *management.ClusterConnect, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ClusterConnectSpec_To_management_ClusterConnectSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ClusterConnectStatus_To_management_ClusterConnectStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ClusterConnect_To_management_ClusterConnect is an autogenerated conversion function. +func Convert_v1_ClusterConnect_To_management_ClusterConnect(in *ClusterConnect, out *management.ClusterConnect, s conversion.Scope) error { + return autoConvert_v1_ClusterConnect_To_management_ClusterConnect(in, out, s) +} + +func autoConvert_management_ClusterConnect_To_v1_ClusterConnect(in *management.ClusterConnect, out *ClusterConnect, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ClusterConnectSpec_To_v1_ClusterConnectSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_ClusterConnectStatus_To_v1_ClusterConnectStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_ClusterConnect_To_v1_ClusterConnect is an autogenerated conversion function. +func Convert_management_ClusterConnect_To_v1_ClusterConnect(in *management.ClusterConnect, out *ClusterConnect, s conversion.Scope) error { + return autoConvert_management_ClusterConnect_To_v1_ClusterConnect(in, out, s) +} + +func autoConvert_v1_ClusterConnectList_To_management_ClusterConnectList(in *ClusterConnectList, out *management.ClusterConnectList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ClusterConnect)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterConnectList_To_management_ClusterConnectList is an autogenerated conversion function. +func Convert_v1_ClusterConnectList_To_management_ClusterConnectList(in *ClusterConnectList, out *management.ClusterConnectList, s conversion.Scope) error { + return autoConvert_v1_ClusterConnectList_To_management_ClusterConnectList(in, out, s) +} + +func autoConvert_management_ClusterConnectList_To_v1_ClusterConnectList(in *management.ClusterConnectList, out *ClusterConnectList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterConnect)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterConnectList_To_v1_ClusterConnectList is an autogenerated conversion function. +func Convert_management_ClusterConnectList_To_v1_ClusterConnectList(in *management.ClusterConnectList, out *ClusterConnectList, s conversion.Scope) error { + return autoConvert_management_ClusterConnectList_To_v1_ClusterConnectList(in, out, s) +} + +func autoConvert_v1_ClusterConnectSpec_To_management_ClusterConnectSpec(in *ClusterConnectSpec, out *management.ClusterConnectSpec, s conversion.Scope) error { + out.Config = in.Config + out.AdminUser = in.AdminUser + if err := Convert_v1_Cluster_To_management_Cluster(&in.ClusterTemplate, &out.ClusterTemplate, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ClusterConnectSpec_To_management_ClusterConnectSpec is an autogenerated conversion function. +func Convert_v1_ClusterConnectSpec_To_management_ClusterConnectSpec(in *ClusterConnectSpec, out *management.ClusterConnectSpec, s conversion.Scope) error { + return autoConvert_v1_ClusterConnectSpec_To_management_ClusterConnectSpec(in, out, s) +} + +func autoConvert_management_ClusterConnectSpec_To_v1_ClusterConnectSpec(in *management.ClusterConnectSpec, out *ClusterConnectSpec, s conversion.Scope) error { + out.Config = in.Config + out.AdminUser = in.AdminUser + if err := Convert_management_Cluster_To_v1_Cluster(&in.ClusterTemplate, &out.ClusterTemplate, s); err != nil { + return err + } + return nil +} + +// Convert_management_ClusterConnectSpec_To_v1_ClusterConnectSpec is an autogenerated conversion function. +func Convert_management_ClusterConnectSpec_To_v1_ClusterConnectSpec(in *management.ClusterConnectSpec, out *ClusterConnectSpec, s conversion.Scope) error { + return autoConvert_management_ClusterConnectSpec_To_v1_ClusterConnectSpec(in, out, s) +} + +func autoConvert_v1_ClusterConnectStatus_To_management_ClusterConnectStatus(in *ClusterConnectStatus, out *management.ClusterConnectStatus, s conversion.Scope) error { + out.Failed = in.Failed + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +// Convert_v1_ClusterConnectStatus_To_management_ClusterConnectStatus is an autogenerated conversion function. +func Convert_v1_ClusterConnectStatus_To_management_ClusterConnectStatus(in *ClusterConnectStatus, out *management.ClusterConnectStatus, s conversion.Scope) error { + return autoConvert_v1_ClusterConnectStatus_To_management_ClusterConnectStatus(in, out, s) +} + +func autoConvert_management_ClusterConnectStatus_To_v1_ClusterConnectStatus(in *management.ClusterConnectStatus, out *ClusterConnectStatus, s conversion.Scope) error { + out.Failed = in.Failed + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +// Convert_management_ClusterConnectStatus_To_v1_ClusterConnectStatus is an autogenerated conversion function. +func Convert_management_ClusterConnectStatus_To_v1_ClusterConnectStatus(in *management.ClusterConnectStatus, out *ClusterConnectStatus, s conversion.Scope) error { + return autoConvert_management_ClusterConnectStatus_To_v1_ClusterConnectStatus(in, out, s) +} + +func autoConvert_v1_ClusterDomain_To_management_ClusterDomain(in *ClusterDomain, out *management.ClusterDomain, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Target = in.Target + out.Domain = in.Domain + return nil +} + +// Convert_v1_ClusterDomain_To_management_ClusterDomain is an autogenerated conversion function. +func Convert_v1_ClusterDomain_To_management_ClusterDomain(in *ClusterDomain, out *management.ClusterDomain, s conversion.Scope) error { + return autoConvert_v1_ClusterDomain_To_management_ClusterDomain(in, out, s) +} + +func autoConvert_management_ClusterDomain_To_v1_ClusterDomain(in *management.ClusterDomain, out *ClusterDomain, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Target = in.Target + out.Domain = in.Domain + return nil +} + +// Convert_management_ClusterDomain_To_v1_ClusterDomain is an autogenerated conversion function. +func Convert_management_ClusterDomain_To_v1_ClusterDomain(in *management.ClusterDomain, out *ClusterDomain, s conversion.Scope) error { + return autoConvert_management_ClusterDomain_To_v1_ClusterDomain(in, out, s) +} + +func autoConvert_v1_ClusterDomainList_To_management_ClusterDomainList(in *ClusterDomainList, out *management.ClusterDomainList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ClusterDomain)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterDomainList_To_management_ClusterDomainList is an autogenerated conversion function. +func Convert_v1_ClusterDomainList_To_management_ClusterDomainList(in *ClusterDomainList, out *management.ClusterDomainList, s conversion.Scope) error { + return autoConvert_v1_ClusterDomainList_To_management_ClusterDomainList(in, out, s) +} + +func autoConvert_management_ClusterDomainList_To_v1_ClusterDomainList(in *management.ClusterDomainList, out *ClusterDomainList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterDomain)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterDomainList_To_v1_ClusterDomainList is an autogenerated conversion function. +func Convert_management_ClusterDomainList_To_v1_ClusterDomainList(in *management.ClusterDomainList, out *ClusterDomainList, s conversion.Scope) error { + return autoConvert_management_ClusterDomainList_To_v1_ClusterDomainList(in, out, s) +} + +func autoConvert_v1_ClusterList_To_management_ClusterList(in *ClusterList, out *management.ClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Cluster)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterList_To_management_ClusterList is an autogenerated conversion function. +func Convert_v1_ClusterList_To_management_ClusterList(in *ClusterList, out *management.ClusterList, s conversion.Scope) error { + return autoConvert_v1_ClusterList_To_management_ClusterList(in, out, s) +} + +func autoConvert_management_ClusterList_To_v1_ClusterList(in *management.ClusterList, out *ClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Cluster)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterList_To_v1_ClusterList is an autogenerated conversion function. +func Convert_management_ClusterList_To_v1_ClusterList(in *management.ClusterList, out *ClusterList, s conversion.Scope) error { + return autoConvert_management_ClusterList_To_v1_ClusterList(in, out, s) +} + +func autoConvert_v1_ClusterMember_To_management_ClusterMember(in *ClusterMember, out *management.ClusterMember, s conversion.Scope) error { + out.Info = in.Info + return nil +} + +// Convert_v1_ClusterMember_To_management_ClusterMember is an autogenerated conversion function. +func Convert_v1_ClusterMember_To_management_ClusterMember(in *ClusterMember, out *management.ClusterMember, s conversion.Scope) error { + return autoConvert_v1_ClusterMember_To_management_ClusterMember(in, out, s) +} + +func autoConvert_management_ClusterMember_To_v1_ClusterMember(in *management.ClusterMember, out *ClusterMember, s conversion.Scope) error { + out.Info = in.Info + return nil +} + +// Convert_management_ClusterMember_To_v1_ClusterMember is an autogenerated conversion function. +func Convert_management_ClusterMember_To_v1_ClusterMember(in *management.ClusterMember, out *ClusterMember, s conversion.Scope) error { + return autoConvert_management_ClusterMember_To_v1_ClusterMember(in, out, s) +} + +func autoConvert_v1_ClusterMemberAccess_To_management_ClusterMemberAccess(in *ClusterMemberAccess, out *management.ClusterMemberAccess, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Teams = *(*[]management.ClusterMember)(unsafe.Pointer(&in.Teams)) + out.Users = *(*[]management.ClusterMember)(unsafe.Pointer(&in.Users)) + return nil +} + +// Convert_v1_ClusterMemberAccess_To_management_ClusterMemberAccess is an autogenerated conversion function. +func Convert_v1_ClusterMemberAccess_To_management_ClusterMemberAccess(in *ClusterMemberAccess, out *management.ClusterMemberAccess, s conversion.Scope) error { + return autoConvert_v1_ClusterMemberAccess_To_management_ClusterMemberAccess(in, out, s) +} + +func autoConvert_management_ClusterMemberAccess_To_v1_ClusterMemberAccess(in *management.ClusterMemberAccess, out *ClusterMemberAccess, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Teams = *(*[]ClusterMember)(unsafe.Pointer(&in.Teams)) + out.Users = *(*[]ClusterMember)(unsafe.Pointer(&in.Users)) + return nil +} + +// Convert_management_ClusterMemberAccess_To_v1_ClusterMemberAccess is an autogenerated conversion function. +func Convert_management_ClusterMemberAccess_To_v1_ClusterMemberAccess(in *management.ClusterMemberAccess, out *ClusterMemberAccess, s conversion.Scope) error { + return autoConvert_management_ClusterMemberAccess_To_v1_ClusterMemberAccess(in, out, s) +} + +func autoConvert_v1_ClusterMemberAccessList_To_management_ClusterMemberAccessList(in *ClusterMemberAccessList, out *management.ClusterMemberAccessList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ClusterMemberAccess)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterMemberAccessList_To_management_ClusterMemberAccessList is an autogenerated conversion function. +func Convert_v1_ClusterMemberAccessList_To_management_ClusterMemberAccessList(in *ClusterMemberAccessList, out *management.ClusterMemberAccessList, s conversion.Scope) error { + return autoConvert_v1_ClusterMemberAccessList_To_management_ClusterMemberAccessList(in, out, s) +} + +func autoConvert_management_ClusterMemberAccessList_To_v1_ClusterMemberAccessList(in *management.ClusterMemberAccessList, out *ClusterMemberAccessList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterMemberAccess)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterMemberAccessList_To_v1_ClusterMemberAccessList is an autogenerated conversion function. +func Convert_management_ClusterMemberAccessList_To_v1_ClusterMemberAccessList(in *management.ClusterMemberAccessList, out *ClusterMemberAccessList, s conversion.Scope) error { + return autoConvert_management_ClusterMemberAccessList_To_v1_ClusterMemberAccessList(in, out, s) +} + +func autoConvert_v1_ClusterMembers_To_management_ClusterMembers(in *ClusterMembers, out *management.ClusterMembers, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Teams = *(*[]management.ClusterMember)(unsafe.Pointer(&in.Teams)) + out.Users = *(*[]management.ClusterMember)(unsafe.Pointer(&in.Users)) + return nil +} + +// Convert_v1_ClusterMembers_To_management_ClusterMembers is an autogenerated conversion function. +func Convert_v1_ClusterMembers_To_management_ClusterMembers(in *ClusterMembers, out *management.ClusterMembers, s conversion.Scope) error { + return autoConvert_v1_ClusterMembers_To_management_ClusterMembers(in, out, s) +} + +func autoConvert_management_ClusterMembers_To_v1_ClusterMembers(in *management.ClusterMembers, out *ClusterMembers, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Teams = *(*[]ClusterMember)(unsafe.Pointer(&in.Teams)) + out.Users = *(*[]ClusterMember)(unsafe.Pointer(&in.Users)) + return nil +} + +// Convert_management_ClusterMembers_To_v1_ClusterMembers is an autogenerated conversion function. +func Convert_management_ClusterMembers_To_v1_ClusterMembers(in *management.ClusterMembers, out *ClusterMembers, s conversion.Scope) error { + return autoConvert_management_ClusterMembers_To_v1_ClusterMembers(in, out, s) +} + +func autoConvert_v1_ClusterMembersList_To_management_ClusterMembersList(in *ClusterMembersList, out *management.ClusterMembersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ClusterMembers)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterMembersList_To_management_ClusterMembersList is an autogenerated conversion function. +func Convert_v1_ClusterMembersList_To_management_ClusterMembersList(in *ClusterMembersList, out *management.ClusterMembersList, s conversion.Scope) error { + return autoConvert_v1_ClusterMembersList_To_management_ClusterMembersList(in, out, s) +} + +func autoConvert_management_ClusterMembersList_To_v1_ClusterMembersList(in *management.ClusterMembersList, out *ClusterMembersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterMembers)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterMembersList_To_v1_ClusterMembersList is an autogenerated conversion function. +func Convert_management_ClusterMembersList_To_v1_ClusterMembersList(in *management.ClusterMembersList, out *ClusterMembersList, s conversion.Scope) error { + return autoConvert_management_ClusterMembersList_To_v1_ClusterMembersList(in, out, s) +} + +func autoConvert_v1_ClusterReset_To_management_ClusterReset(in *ClusterReset, out *management.ClusterReset, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Agent = in.Agent + out.RBAC = in.RBAC + return nil +} + +// Convert_v1_ClusterReset_To_management_ClusterReset is an autogenerated conversion function. +func Convert_v1_ClusterReset_To_management_ClusterReset(in *ClusterReset, out *management.ClusterReset, s conversion.Scope) error { + return autoConvert_v1_ClusterReset_To_management_ClusterReset(in, out, s) +} + +func autoConvert_management_ClusterReset_To_v1_ClusterReset(in *management.ClusterReset, out *ClusterReset, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Agent = in.Agent + out.RBAC = in.RBAC + return nil +} + +// Convert_management_ClusterReset_To_v1_ClusterReset is an autogenerated conversion function. +func Convert_management_ClusterReset_To_v1_ClusterReset(in *management.ClusterReset, out *ClusterReset, s conversion.Scope) error { + return autoConvert_management_ClusterReset_To_v1_ClusterReset(in, out, s) +} + +func autoConvert_v1_ClusterResetList_To_management_ClusterResetList(in *ClusterResetList, out *management.ClusterResetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ClusterReset)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterResetList_To_management_ClusterResetList is an autogenerated conversion function. +func Convert_v1_ClusterResetList_To_management_ClusterResetList(in *ClusterResetList, out *management.ClusterResetList, s conversion.Scope) error { + return autoConvert_v1_ClusterResetList_To_management_ClusterResetList(in, out, s) +} + +func autoConvert_management_ClusterResetList_To_v1_ClusterResetList(in *management.ClusterResetList, out *ClusterResetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterReset)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterResetList_To_v1_ClusterResetList is an autogenerated conversion function. +func Convert_management_ClusterResetList_To_v1_ClusterResetList(in *management.ClusterResetList, out *ClusterResetList, s conversion.Scope) error { + return autoConvert_management_ClusterResetList_To_v1_ClusterResetList(in, out, s) +} + +func autoConvert_v1_ClusterRoleTemplate_To_management_ClusterRoleTemplate(in *ClusterRoleTemplate, out *management.ClusterRoleTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ClusterRoleTemplateSpec_To_management_ClusterRoleTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ClusterRoleTemplateStatus_To_management_ClusterRoleTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ClusterRoleTemplate_To_management_ClusterRoleTemplate is an autogenerated conversion function. +func Convert_v1_ClusterRoleTemplate_To_management_ClusterRoleTemplate(in *ClusterRoleTemplate, out *management.ClusterRoleTemplate, s conversion.Scope) error { + return autoConvert_v1_ClusterRoleTemplate_To_management_ClusterRoleTemplate(in, out, s) +} + +func autoConvert_management_ClusterRoleTemplate_To_v1_ClusterRoleTemplate(in *management.ClusterRoleTemplate, out *ClusterRoleTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ClusterRoleTemplateSpec_To_v1_ClusterRoleTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_ClusterRoleTemplateStatus_To_v1_ClusterRoleTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_ClusterRoleTemplate_To_v1_ClusterRoleTemplate is an autogenerated conversion function. +func Convert_management_ClusterRoleTemplate_To_v1_ClusterRoleTemplate(in *management.ClusterRoleTemplate, out *ClusterRoleTemplate, s conversion.Scope) error { + return autoConvert_management_ClusterRoleTemplate_To_v1_ClusterRoleTemplate(in, out, s) +} + +func autoConvert_v1_ClusterRoleTemplateList_To_management_ClusterRoleTemplateList(in *ClusterRoleTemplateList, out *management.ClusterRoleTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ClusterRoleTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterRoleTemplateList_To_management_ClusterRoleTemplateList is an autogenerated conversion function. +func Convert_v1_ClusterRoleTemplateList_To_management_ClusterRoleTemplateList(in *ClusterRoleTemplateList, out *management.ClusterRoleTemplateList, s conversion.Scope) error { + return autoConvert_v1_ClusterRoleTemplateList_To_management_ClusterRoleTemplateList(in, out, s) +} + +func autoConvert_management_ClusterRoleTemplateList_To_v1_ClusterRoleTemplateList(in *management.ClusterRoleTemplateList, out *ClusterRoleTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterRoleTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterRoleTemplateList_To_v1_ClusterRoleTemplateList is an autogenerated conversion function. +func Convert_management_ClusterRoleTemplateList_To_v1_ClusterRoleTemplateList(in *management.ClusterRoleTemplateList, out *ClusterRoleTemplateList, s conversion.Scope) error { + return autoConvert_management_ClusterRoleTemplateList_To_v1_ClusterRoleTemplateList(in, out, s) +} + +func autoConvert_v1_ClusterRoleTemplateSpec_To_management_ClusterRoleTemplateSpec(in *ClusterRoleTemplateSpec, out *management.ClusterRoleTemplateSpec, s conversion.Scope) error { + out.ClusterRoleTemplateSpec = in.ClusterRoleTemplateSpec + return nil +} + +// Convert_v1_ClusterRoleTemplateSpec_To_management_ClusterRoleTemplateSpec is an autogenerated conversion function. +func Convert_v1_ClusterRoleTemplateSpec_To_management_ClusterRoleTemplateSpec(in *ClusterRoleTemplateSpec, out *management.ClusterRoleTemplateSpec, s conversion.Scope) error { + return autoConvert_v1_ClusterRoleTemplateSpec_To_management_ClusterRoleTemplateSpec(in, out, s) +} + +func autoConvert_management_ClusterRoleTemplateSpec_To_v1_ClusterRoleTemplateSpec(in *management.ClusterRoleTemplateSpec, out *ClusterRoleTemplateSpec, s conversion.Scope) error { + out.ClusterRoleTemplateSpec = in.ClusterRoleTemplateSpec + return nil +} + +// Convert_management_ClusterRoleTemplateSpec_To_v1_ClusterRoleTemplateSpec is an autogenerated conversion function. +func Convert_management_ClusterRoleTemplateSpec_To_v1_ClusterRoleTemplateSpec(in *management.ClusterRoleTemplateSpec, out *ClusterRoleTemplateSpec, s conversion.Scope) error { + return autoConvert_management_ClusterRoleTemplateSpec_To_v1_ClusterRoleTemplateSpec(in, out, s) +} + +func autoConvert_v1_ClusterRoleTemplateStatus_To_management_ClusterRoleTemplateStatus(in *ClusterRoleTemplateStatus, out *management.ClusterRoleTemplateStatus, s conversion.Scope) error { + out.ClusterRoleTemplateStatus = in.ClusterRoleTemplateStatus + out.Clusters = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Clusters)) + return nil +} + +// Convert_v1_ClusterRoleTemplateStatus_To_management_ClusterRoleTemplateStatus is an autogenerated conversion function. +func Convert_v1_ClusterRoleTemplateStatus_To_management_ClusterRoleTemplateStatus(in *ClusterRoleTemplateStatus, out *management.ClusterRoleTemplateStatus, s conversion.Scope) error { + return autoConvert_v1_ClusterRoleTemplateStatus_To_management_ClusterRoleTemplateStatus(in, out, s) +} + +func autoConvert_management_ClusterRoleTemplateStatus_To_v1_ClusterRoleTemplateStatus(in *management.ClusterRoleTemplateStatus, out *ClusterRoleTemplateStatus, s conversion.Scope) error { + out.ClusterRoleTemplateStatus = in.ClusterRoleTemplateStatus + out.Clusters = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Clusters)) + return nil +} + +// Convert_management_ClusterRoleTemplateStatus_To_v1_ClusterRoleTemplateStatus is an autogenerated conversion function. +func Convert_management_ClusterRoleTemplateStatus_To_v1_ClusterRoleTemplateStatus(in *management.ClusterRoleTemplateStatus, out *ClusterRoleTemplateStatus, s conversion.Scope) error { + return autoConvert_management_ClusterRoleTemplateStatus_To_v1_ClusterRoleTemplateStatus(in, out, s) +} + +func autoConvert_v1_ClusterSpec_To_management_ClusterSpec(in *ClusterSpec, out *management.ClusterSpec, s conversion.Scope) error { + out.ClusterSpec = in.ClusterSpec + return nil +} + +// Convert_v1_ClusterSpec_To_management_ClusterSpec is an autogenerated conversion function. +func Convert_v1_ClusterSpec_To_management_ClusterSpec(in *ClusterSpec, out *management.ClusterSpec, s conversion.Scope) error { + return autoConvert_v1_ClusterSpec_To_management_ClusterSpec(in, out, s) +} + +func autoConvert_management_ClusterSpec_To_v1_ClusterSpec(in *management.ClusterSpec, out *ClusterSpec, s conversion.Scope) error { + out.ClusterSpec = in.ClusterSpec + return nil +} + +// Convert_management_ClusterSpec_To_v1_ClusterSpec is an autogenerated conversion function. +func Convert_management_ClusterSpec_To_v1_ClusterSpec(in *management.ClusterSpec, out *ClusterSpec, s conversion.Scope) error { + return autoConvert_management_ClusterSpec_To_v1_ClusterSpec(in, out, s) +} + +func autoConvert_v1_ClusterStatus_To_management_ClusterStatus(in *ClusterStatus, out *management.ClusterStatus, s conversion.Scope) error { + out.ClusterStatus = in.ClusterStatus + return nil +} + +// Convert_v1_ClusterStatus_To_management_ClusterStatus is an autogenerated conversion function. +func Convert_v1_ClusterStatus_To_management_ClusterStatus(in *ClusterStatus, out *management.ClusterStatus, s conversion.Scope) error { + return autoConvert_v1_ClusterStatus_To_management_ClusterStatus(in, out, s) +} + +func autoConvert_management_ClusterStatus_To_v1_ClusterStatus(in *management.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + out.ClusterStatus = in.ClusterStatus + return nil +} + +// Convert_management_ClusterStatus_To_v1_ClusterStatus is an autogenerated conversion function. +func Convert_management_ClusterStatus_To_v1_ClusterStatus(in *management.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + return autoConvert_management_ClusterStatus_To_v1_ClusterStatus(in, out, s) +} + +func autoConvert_v1_ClusterVirtualClusterDefaults_To_management_ClusterVirtualClusterDefaults(in *ClusterVirtualClusterDefaults, out *management.ClusterVirtualClusterDefaults, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.DefaultTemplate = (*storagev1.VirtualClusterTemplate)(unsafe.Pointer(in.DefaultTemplate)) + out.LatestVersion = in.LatestVersion + out.Values = in.Values + out.Warning = in.Warning + return nil +} + +// Convert_v1_ClusterVirtualClusterDefaults_To_management_ClusterVirtualClusterDefaults is an autogenerated conversion function. +func Convert_v1_ClusterVirtualClusterDefaults_To_management_ClusterVirtualClusterDefaults(in *ClusterVirtualClusterDefaults, out *management.ClusterVirtualClusterDefaults, s conversion.Scope) error { + return autoConvert_v1_ClusterVirtualClusterDefaults_To_management_ClusterVirtualClusterDefaults(in, out, s) +} + +func autoConvert_management_ClusterVirtualClusterDefaults_To_v1_ClusterVirtualClusterDefaults(in *management.ClusterVirtualClusterDefaults, out *ClusterVirtualClusterDefaults, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.DefaultTemplate = (*storagev1.VirtualClusterTemplate)(unsafe.Pointer(in.DefaultTemplate)) + out.LatestVersion = in.LatestVersion + out.Values = in.Values + out.Warning = in.Warning + return nil +} + +// Convert_management_ClusterVirtualClusterDefaults_To_v1_ClusterVirtualClusterDefaults is an autogenerated conversion function. +func Convert_management_ClusterVirtualClusterDefaults_To_v1_ClusterVirtualClusterDefaults(in *management.ClusterVirtualClusterDefaults, out *ClusterVirtualClusterDefaults, s conversion.Scope) error { + return autoConvert_management_ClusterVirtualClusterDefaults_To_v1_ClusterVirtualClusterDefaults(in, out, s) +} + +func autoConvert_v1_ClusterVirtualClusterDefaultsList_To_management_ClusterVirtualClusterDefaultsList(in *ClusterVirtualClusterDefaultsList, out *management.ClusterVirtualClusterDefaultsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ClusterVirtualClusterDefaults)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ClusterVirtualClusterDefaultsList_To_management_ClusterVirtualClusterDefaultsList is an autogenerated conversion function. +func Convert_v1_ClusterVirtualClusterDefaultsList_To_management_ClusterVirtualClusterDefaultsList(in *ClusterVirtualClusterDefaultsList, out *management.ClusterVirtualClusterDefaultsList, s conversion.Scope) error { + return autoConvert_v1_ClusterVirtualClusterDefaultsList_To_management_ClusterVirtualClusterDefaultsList(in, out, s) +} + +func autoConvert_management_ClusterVirtualClusterDefaultsList_To_v1_ClusterVirtualClusterDefaultsList(in *management.ClusterVirtualClusterDefaultsList, out *ClusterVirtualClusterDefaultsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterVirtualClusterDefaults)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ClusterVirtualClusterDefaultsList_To_v1_ClusterVirtualClusterDefaultsList is an autogenerated conversion function. +func Convert_management_ClusterVirtualClusterDefaultsList_To_v1_ClusterVirtualClusterDefaultsList(in *management.ClusterVirtualClusterDefaultsList, out *ClusterVirtualClusterDefaultsList, s conversion.Scope) error { + return autoConvert_management_ClusterVirtualClusterDefaultsList_To_v1_ClusterVirtualClusterDefaultsList(in, out, s) +} + +func autoConvert_v1_Config_To_management_Config(in *Config, out *management.Config, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ConfigSpec_To_management_ConfigSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ConfigStatus_To_management_ConfigStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Config_To_management_Config is an autogenerated conversion function. +func Convert_v1_Config_To_management_Config(in *Config, out *management.Config, s conversion.Scope) error { + return autoConvert_v1_Config_To_management_Config(in, out, s) +} + +func autoConvert_management_Config_To_v1_Config(in *management.Config, out *Config, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ConfigSpec_To_v1_ConfigSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_ConfigStatus_To_v1_ConfigStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Config_To_v1_Config is an autogenerated conversion function. +func Convert_management_Config_To_v1_Config(in *management.Config, out *Config, s conversion.Scope) error { + return autoConvert_management_Config_To_v1_Config(in, out, s) +} + +func autoConvert_v1_ConfigList_To_management_ConfigList(in *ConfigList, out *management.ConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Config)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ConfigList_To_management_ConfigList is an autogenerated conversion function. +func Convert_v1_ConfigList_To_management_ConfigList(in *ConfigList, out *management.ConfigList, s conversion.Scope) error { + return autoConvert_v1_ConfigList_To_management_ConfigList(in, out, s) +} + +func autoConvert_management_ConfigList_To_v1_ConfigList(in *management.ConfigList, out *ConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Config)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ConfigList_To_v1_ConfigList is an autogenerated conversion function. +func Convert_management_ConfigList_To_v1_ConfigList(in *management.ConfigList, out *ConfigList, s conversion.Scope) error { + return autoConvert_management_ConfigList_To_v1_ConfigList(in, out, s) +} + +func autoConvert_v1_ConfigSpec_To_management_ConfigSpec(in *ConfigSpec, out *management.ConfigSpec, s conversion.Scope) error { + out.Raw = *(*[]byte)(unsafe.Pointer(&in.Raw)) + return nil +} + +// Convert_v1_ConfigSpec_To_management_ConfigSpec is an autogenerated conversion function. +func Convert_v1_ConfigSpec_To_management_ConfigSpec(in *ConfigSpec, out *management.ConfigSpec, s conversion.Scope) error { + return autoConvert_v1_ConfigSpec_To_management_ConfigSpec(in, out, s) +} + +func autoConvert_management_ConfigSpec_To_v1_ConfigSpec(in *management.ConfigSpec, out *ConfigSpec, s conversion.Scope) error { + out.Raw = *(*[]byte)(unsafe.Pointer(&in.Raw)) + return nil +} + +// Convert_management_ConfigSpec_To_v1_ConfigSpec is an autogenerated conversion function. +func Convert_management_ConfigSpec_To_v1_ConfigSpec(in *management.ConfigSpec, out *ConfigSpec, s conversion.Scope) error { + return autoConvert_management_ConfigSpec_To_v1_ConfigSpec(in, out, s) +} + +func autoConvert_v1_ConfigStatus_To_management_ConfigStatus(in *ConfigStatus, out *management.ConfigStatus, s conversion.Scope) error { + if err := Convert_v1_Authentication_To_management_Authentication(&in.Authentication, &out.Authentication, s); err != nil { + return err + } + out.OIDC = (*management.OIDC)(unsafe.Pointer(in.OIDC)) + out.Apps = (*management.Apps)(unsafe.Pointer(in.Apps)) + out.Audit = (*management.Audit)(unsafe.Pointer(in.Audit)) + out.LoftHost = in.LoftHost + out.DevPodSubDomain = in.DevPodSubDomain + out.UISettings = (*uiv1.UISettingsConfig)(unsafe.Pointer(in.UISettings)) + out.VaultIntegration = (*storagev1.VaultIntegrationSpec)(unsafe.Pointer(in.VaultIntegration)) + return nil +} + +// Convert_v1_ConfigStatus_To_management_ConfigStatus is an autogenerated conversion function. +func Convert_v1_ConfigStatus_To_management_ConfigStatus(in *ConfigStatus, out *management.ConfigStatus, s conversion.Scope) error { + return autoConvert_v1_ConfigStatus_To_management_ConfigStatus(in, out, s) +} + +func autoConvert_management_ConfigStatus_To_v1_ConfigStatus(in *management.ConfigStatus, out *ConfigStatus, s conversion.Scope) error { + if err := Convert_management_Authentication_To_v1_Authentication(&in.Authentication, &out.Authentication, s); err != nil { + return err + } + out.OIDC = (*OIDC)(unsafe.Pointer(in.OIDC)) + out.Apps = (*Apps)(unsafe.Pointer(in.Apps)) + out.Audit = (*Audit)(unsafe.Pointer(in.Audit)) + out.LoftHost = in.LoftHost + out.DevPodSubDomain = in.DevPodSubDomain + out.UISettings = (*uiv1.UISettingsConfig)(unsafe.Pointer(in.UISettings)) + out.VaultIntegration = (*storagev1.VaultIntegrationSpec)(unsafe.Pointer(in.VaultIntegration)) + return nil +} + +// Convert_management_ConfigStatus_To_v1_ConfigStatus is an autogenerated conversion function. +func Convert_management_ConfigStatus_To_v1_ConfigStatus(in *management.ConfigStatus, out *ConfigStatus, s conversion.Scope) error { + return autoConvert_management_ConfigStatus_To_v1_ConfigStatus(in, out, s) +} + +func autoConvert_v1_Connector_To_management_Connector(in *Connector, out *management.Connector, s conversion.Scope) error { + out.OIDC = (*management.AuthenticationOIDC)(unsafe.Pointer(in.OIDC)) + out.Github = (*management.AuthenticationGithub)(unsafe.Pointer(in.Github)) + out.Gitlab = (*management.AuthenticationGitlab)(unsafe.Pointer(in.Gitlab)) + out.Google = (*management.AuthenticationGoogle)(unsafe.Pointer(in.Google)) + out.Microsoft = (*management.AuthenticationMicrosoft)(unsafe.Pointer(in.Microsoft)) + out.SAML = (*management.AuthenticationSAML)(unsafe.Pointer(in.SAML)) + return nil +} + +// Convert_v1_Connector_To_management_Connector is an autogenerated conversion function. +func Convert_v1_Connector_To_management_Connector(in *Connector, out *management.Connector, s conversion.Scope) error { + return autoConvert_v1_Connector_To_management_Connector(in, out, s) +} + +func autoConvert_management_Connector_To_v1_Connector(in *management.Connector, out *Connector, s conversion.Scope) error { + out.OIDC = (*AuthenticationOIDC)(unsafe.Pointer(in.OIDC)) + out.Github = (*AuthenticationGithub)(unsafe.Pointer(in.Github)) + out.Gitlab = (*AuthenticationGitlab)(unsafe.Pointer(in.Gitlab)) + out.Google = (*AuthenticationGoogle)(unsafe.Pointer(in.Google)) + out.Microsoft = (*AuthenticationMicrosoft)(unsafe.Pointer(in.Microsoft)) + out.SAML = (*AuthenticationSAML)(unsafe.Pointer(in.SAML)) + return nil +} + +// Convert_management_Connector_To_v1_Connector is an autogenerated conversion function. +func Convert_management_Connector_To_v1_Connector(in *management.Connector, out *Connector, s conversion.Scope) error { + return autoConvert_management_Connector_To_v1_Connector(in, out, s) +} + +func autoConvert_v1_ConnectorWithName_To_management_ConnectorWithName(in *ConnectorWithName, out *management.ConnectorWithName, s conversion.Scope) error { + out.ID = in.ID + out.DisplayName = in.DisplayName + if err := Convert_v1_Connector_To_management_Connector(&in.Connector, &out.Connector, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ConnectorWithName_To_management_ConnectorWithName is an autogenerated conversion function. +func Convert_v1_ConnectorWithName_To_management_ConnectorWithName(in *ConnectorWithName, out *management.ConnectorWithName, s conversion.Scope) error { + return autoConvert_v1_ConnectorWithName_To_management_ConnectorWithName(in, out, s) +} + +func autoConvert_management_ConnectorWithName_To_v1_ConnectorWithName(in *management.ConnectorWithName, out *ConnectorWithName, s conversion.Scope) error { + out.ID = in.ID + out.DisplayName = in.DisplayName + if err := Convert_management_Connector_To_v1_Connector(&in.Connector, &out.Connector, s); err != nil { + return err + } + return nil +} + +// Convert_management_ConnectorWithName_To_v1_ConnectorWithName is an autogenerated conversion function. +func Convert_management_ConnectorWithName_To_v1_ConnectorWithName(in *management.ConnectorWithName, out *ConnectorWithName, s conversion.Scope) error { + return autoConvert_management_ConnectorWithName_To_v1_ConnectorWithName(in, out, s) +} + +func autoConvert_v1_DevPodDeleteOptions_To_management_DevPodDeleteOptions(in *DevPodDeleteOptions, out *management.DevPodDeleteOptions, s conversion.Scope) error { + out.Options = in.Options + return nil +} + +// Convert_v1_DevPodDeleteOptions_To_management_DevPodDeleteOptions is an autogenerated conversion function. +func Convert_v1_DevPodDeleteOptions_To_management_DevPodDeleteOptions(in *DevPodDeleteOptions, out *management.DevPodDeleteOptions, s conversion.Scope) error { + return autoConvert_v1_DevPodDeleteOptions_To_management_DevPodDeleteOptions(in, out, s) +} + +func autoConvert_management_DevPodDeleteOptions_To_v1_DevPodDeleteOptions(in *management.DevPodDeleteOptions, out *DevPodDeleteOptions, s conversion.Scope) error { + out.Options = in.Options + return nil +} + +// Convert_management_DevPodDeleteOptions_To_v1_DevPodDeleteOptions is an autogenerated conversion function. +func Convert_management_DevPodDeleteOptions_To_v1_DevPodDeleteOptions(in *management.DevPodDeleteOptions, out *DevPodDeleteOptions, s conversion.Scope) error { + return autoConvert_management_DevPodDeleteOptions_To_v1_DevPodDeleteOptions(in, out, s) +} + +func autoConvert_url_Values_To_v1_DevPodDeleteOptions(in *url.Values, out *DevPodDeleteOptions, s conversion.Scope) error { + // WARNING: Field TypeMeta does not have json tag, skipping. + + if values, ok := map[string][]string(*in)["options"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_string(&values, &out.Options, s); err != nil { + return err + } + } else { + out.Options = "" + } + return nil +} + +// Convert_url_Values_To_v1_DevPodDeleteOptions is an autogenerated conversion function. +func Convert_url_Values_To_v1_DevPodDeleteOptions(in *url.Values, out *DevPodDeleteOptions, s conversion.Scope) error { + return autoConvert_url_Values_To_v1_DevPodDeleteOptions(in, out, s) +} + +func autoConvert_v1_DevPodSshOptions_To_management_DevPodSshOptions(in *DevPodSshOptions, out *management.DevPodSshOptions, s conversion.Scope) error { + out.Options = in.Options + return nil +} + +// Convert_v1_DevPodSshOptions_To_management_DevPodSshOptions is an autogenerated conversion function. +func Convert_v1_DevPodSshOptions_To_management_DevPodSshOptions(in *DevPodSshOptions, out *management.DevPodSshOptions, s conversion.Scope) error { + return autoConvert_v1_DevPodSshOptions_To_management_DevPodSshOptions(in, out, s) +} + +func autoConvert_management_DevPodSshOptions_To_v1_DevPodSshOptions(in *management.DevPodSshOptions, out *DevPodSshOptions, s conversion.Scope) error { + out.Options = in.Options + return nil +} + +// Convert_management_DevPodSshOptions_To_v1_DevPodSshOptions is an autogenerated conversion function. +func Convert_management_DevPodSshOptions_To_v1_DevPodSshOptions(in *management.DevPodSshOptions, out *DevPodSshOptions, s conversion.Scope) error { + return autoConvert_management_DevPodSshOptions_To_v1_DevPodSshOptions(in, out, s) +} + +func autoConvert_url_Values_To_v1_DevPodSshOptions(in *url.Values, out *DevPodSshOptions, s conversion.Scope) error { + // WARNING: Field TypeMeta does not have json tag, skipping. + + if values, ok := map[string][]string(*in)["options"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_string(&values, &out.Options, s); err != nil { + return err + } + } else { + out.Options = "" + } + return nil +} + +// Convert_url_Values_To_v1_DevPodSshOptions is an autogenerated conversion function. +func Convert_url_Values_To_v1_DevPodSshOptions(in *url.Values, out *DevPodSshOptions, s conversion.Scope) error { + return autoConvert_url_Values_To_v1_DevPodSshOptions(in, out, s) +} + +func autoConvert_v1_DevPodStatusOptions_To_management_DevPodStatusOptions(in *DevPodStatusOptions, out *management.DevPodStatusOptions, s conversion.Scope) error { + out.Options = in.Options + return nil +} + +// Convert_v1_DevPodStatusOptions_To_management_DevPodStatusOptions is an autogenerated conversion function. +func Convert_v1_DevPodStatusOptions_To_management_DevPodStatusOptions(in *DevPodStatusOptions, out *management.DevPodStatusOptions, s conversion.Scope) error { + return autoConvert_v1_DevPodStatusOptions_To_management_DevPodStatusOptions(in, out, s) +} + +func autoConvert_management_DevPodStatusOptions_To_v1_DevPodStatusOptions(in *management.DevPodStatusOptions, out *DevPodStatusOptions, s conversion.Scope) error { + out.Options = in.Options + return nil +} + +// Convert_management_DevPodStatusOptions_To_v1_DevPodStatusOptions is an autogenerated conversion function. +func Convert_management_DevPodStatusOptions_To_v1_DevPodStatusOptions(in *management.DevPodStatusOptions, out *DevPodStatusOptions, s conversion.Scope) error { + return autoConvert_management_DevPodStatusOptions_To_v1_DevPodStatusOptions(in, out, s) +} + +func autoConvert_url_Values_To_v1_DevPodStatusOptions(in *url.Values, out *DevPodStatusOptions, s conversion.Scope) error { + // WARNING: Field TypeMeta does not have json tag, skipping. + + if values, ok := map[string][]string(*in)["options"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_string(&values, &out.Options, s); err != nil { + return err + } + } else { + out.Options = "" + } + return nil +} + +// Convert_url_Values_To_v1_DevPodStatusOptions is an autogenerated conversion function. +func Convert_url_Values_To_v1_DevPodStatusOptions(in *url.Values, out *DevPodStatusOptions, s conversion.Scope) error { + return autoConvert_url_Values_To_v1_DevPodStatusOptions(in, out, s) +} + +func autoConvert_v1_DevPodStopOptions_To_management_DevPodStopOptions(in *DevPodStopOptions, out *management.DevPodStopOptions, s conversion.Scope) error { + out.Options = in.Options + return nil +} + +// Convert_v1_DevPodStopOptions_To_management_DevPodStopOptions is an autogenerated conversion function. +func Convert_v1_DevPodStopOptions_To_management_DevPodStopOptions(in *DevPodStopOptions, out *management.DevPodStopOptions, s conversion.Scope) error { + return autoConvert_v1_DevPodStopOptions_To_management_DevPodStopOptions(in, out, s) +} + +func autoConvert_management_DevPodStopOptions_To_v1_DevPodStopOptions(in *management.DevPodStopOptions, out *DevPodStopOptions, s conversion.Scope) error { + out.Options = in.Options + return nil +} + +// Convert_management_DevPodStopOptions_To_v1_DevPodStopOptions is an autogenerated conversion function. +func Convert_management_DevPodStopOptions_To_v1_DevPodStopOptions(in *management.DevPodStopOptions, out *DevPodStopOptions, s conversion.Scope) error { + return autoConvert_management_DevPodStopOptions_To_v1_DevPodStopOptions(in, out, s) +} + +func autoConvert_url_Values_To_v1_DevPodStopOptions(in *url.Values, out *DevPodStopOptions, s conversion.Scope) error { + // WARNING: Field TypeMeta does not have json tag, skipping. + + if values, ok := map[string][]string(*in)["options"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_string(&values, &out.Options, s); err != nil { + return err + } + } else { + out.Options = "" + } + return nil +} + +// Convert_url_Values_To_v1_DevPodStopOptions is an autogenerated conversion function. +func Convert_url_Values_To_v1_DevPodStopOptions(in *url.Values, out *DevPodStopOptions, s conversion.Scope) error { + return autoConvert_url_Values_To_v1_DevPodStopOptions(in, out, s) +} + +func autoConvert_v1_DevPodUpOptions_To_management_DevPodUpOptions(in *DevPodUpOptions, out *management.DevPodUpOptions, s conversion.Scope) error { + out.WebMode = in.WebMode + out.Debug = in.Debug + out.Options = in.Options + return nil +} + +// Convert_v1_DevPodUpOptions_To_management_DevPodUpOptions is an autogenerated conversion function. +func Convert_v1_DevPodUpOptions_To_management_DevPodUpOptions(in *DevPodUpOptions, out *management.DevPodUpOptions, s conversion.Scope) error { + return autoConvert_v1_DevPodUpOptions_To_management_DevPodUpOptions(in, out, s) +} + +func autoConvert_management_DevPodUpOptions_To_v1_DevPodUpOptions(in *management.DevPodUpOptions, out *DevPodUpOptions, s conversion.Scope) error { + out.WebMode = in.WebMode + out.Debug = in.Debug + out.Options = in.Options + return nil +} + +// Convert_management_DevPodUpOptions_To_v1_DevPodUpOptions is an autogenerated conversion function. +func Convert_management_DevPodUpOptions_To_v1_DevPodUpOptions(in *management.DevPodUpOptions, out *DevPodUpOptions, s conversion.Scope) error { + return autoConvert_management_DevPodUpOptions_To_v1_DevPodUpOptions(in, out, s) +} + +func autoConvert_url_Values_To_v1_DevPodUpOptions(in *url.Values, out *DevPodUpOptions, s conversion.Scope) error { + // WARNING: Field TypeMeta does not have json tag, skipping. + + if values, ok := map[string][]string(*in)["webMode"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_bool(&values, &out.WebMode, s); err != nil { + return err + } + } else { + out.WebMode = false + } + if values, ok := map[string][]string(*in)["debug"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_bool(&values, &out.Debug, s); err != nil { + return err + } + } else { + out.Debug = false + } + if values, ok := map[string][]string(*in)["options"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_string(&values, &out.Options, s); err != nil { + return err + } + } else { + out.Options = "" + } + return nil +} + +// Convert_url_Values_To_v1_DevPodUpOptions is an autogenerated conversion function. +func Convert_url_Values_To_v1_DevPodUpOptions(in *url.Values, out *DevPodUpOptions, s conversion.Scope) error { + return autoConvert_url_Values_To_v1_DevPodUpOptions(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstance_To_management_DevPodWorkspaceInstance(in *DevPodWorkspaceInstance, out *management.DevPodWorkspaceInstance, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_DevPodWorkspaceInstanceSpec_To_management_DevPodWorkspaceInstanceSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_DevPodWorkspaceInstanceStatus_To_management_DevPodWorkspaceInstanceStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_DevPodWorkspaceInstance_To_management_DevPodWorkspaceInstance is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstance_To_management_DevPodWorkspaceInstance(in *DevPodWorkspaceInstance, out *management.DevPodWorkspaceInstance, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstance_To_management_DevPodWorkspaceInstance(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstance_To_v1_DevPodWorkspaceInstance(in *management.DevPodWorkspaceInstance, out *DevPodWorkspaceInstance, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_DevPodWorkspaceInstanceSpec_To_v1_DevPodWorkspaceInstanceSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_DevPodWorkspaceInstanceStatus_To_v1_DevPodWorkspaceInstanceStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_DevPodWorkspaceInstance_To_v1_DevPodWorkspaceInstance is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstance_To_v1_DevPodWorkspaceInstance(in *management.DevPodWorkspaceInstance, out *DevPodWorkspaceInstance, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstance_To_v1_DevPodWorkspaceInstance(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceDelete_To_management_DevPodWorkspaceInstanceDelete(in *DevPodWorkspaceInstanceDelete, out *management.DevPodWorkspaceInstanceDelete, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceDelete_To_management_DevPodWorkspaceInstanceDelete is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceDelete_To_management_DevPodWorkspaceInstanceDelete(in *DevPodWorkspaceInstanceDelete, out *management.DevPodWorkspaceInstanceDelete, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceDelete_To_management_DevPodWorkspaceInstanceDelete(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceDelete_To_v1_DevPodWorkspaceInstanceDelete(in *management.DevPodWorkspaceInstanceDelete, out *DevPodWorkspaceInstanceDelete, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_management_DevPodWorkspaceInstanceDelete_To_v1_DevPodWorkspaceInstanceDelete is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceDelete_To_v1_DevPodWorkspaceInstanceDelete(in *management.DevPodWorkspaceInstanceDelete, out *DevPodWorkspaceInstanceDelete, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceDelete_To_v1_DevPodWorkspaceInstanceDelete(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceDeleteList_To_management_DevPodWorkspaceInstanceDeleteList(in *DevPodWorkspaceInstanceDeleteList, out *management.DevPodWorkspaceInstanceDeleteList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodWorkspaceInstanceDelete)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceDeleteList_To_management_DevPodWorkspaceInstanceDeleteList is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceDeleteList_To_management_DevPodWorkspaceInstanceDeleteList(in *DevPodWorkspaceInstanceDeleteList, out *management.DevPodWorkspaceInstanceDeleteList, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceDeleteList_To_management_DevPodWorkspaceInstanceDeleteList(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceDeleteList_To_v1_DevPodWorkspaceInstanceDeleteList(in *management.DevPodWorkspaceInstanceDeleteList, out *DevPodWorkspaceInstanceDeleteList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodWorkspaceInstanceDelete)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodWorkspaceInstanceDeleteList_To_v1_DevPodWorkspaceInstanceDeleteList is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceDeleteList_To_v1_DevPodWorkspaceInstanceDeleteList(in *management.DevPodWorkspaceInstanceDeleteList, out *DevPodWorkspaceInstanceDeleteList, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceDeleteList_To_v1_DevPodWorkspaceInstanceDeleteList(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceGetStatus_To_management_DevPodWorkspaceInstanceGetStatus(in *DevPodWorkspaceInstanceGetStatus, out *management.DevPodWorkspaceInstanceGetStatus, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceGetStatus_To_management_DevPodWorkspaceInstanceGetStatus is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceGetStatus_To_management_DevPodWorkspaceInstanceGetStatus(in *DevPodWorkspaceInstanceGetStatus, out *management.DevPodWorkspaceInstanceGetStatus, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceGetStatus_To_management_DevPodWorkspaceInstanceGetStatus(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceGetStatus_To_v1_DevPodWorkspaceInstanceGetStatus(in *management.DevPodWorkspaceInstanceGetStatus, out *DevPodWorkspaceInstanceGetStatus, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_management_DevPodWorkspaceInstanceGetStatus_To_v1_DevPodWorkspaceInstanceGetStatus is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceGetStatus_To_v1_DevPodWorkspaceInstanceGetStatus(in *management.DevPodWorkspaceInstanceGetStatus, out *DevPodWorkspaceInstanceGetStatus, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceGetStatus_To_v1_DevPodWorkspaceInstanceGetStatus(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceGetStatusList_To_management_DevPodWorkspaceInstanceGetStatusList(in *DevPodWorkspaceInstanceGetStatusList, out *management.DevPodWorkspaceInstanceGetStatusList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodWorkspaceInstanceGetStatus)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceGetStatusList_To_management_DevPodWorkspaceInstanceGetStatusList is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceGetStatusList_To_management_DevPodWorkspaceInstanceGetStatusList(in *DevPodWorkspaceInstanceGetStatusList, out *management.DevPodWorkspaceInstanceGetStatusList, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceGetStatusList_To_management_DevPodWorkspaceInstanceGetStatusList(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceGetStatusList_To_v1_DevPodWorkspaceInstanceGetStatusList(in *management.DevPodWorkspaceInstanceGetStatusList, out *DevPodWorkspaceInstanceGetStatusList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodWorkspaceInstanceGetStatus)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodWorkspaceInstanceGetStatusList_To_v1_DevPodWorkspaceInstanceGetStatusList is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceGetStatusList_To_v1_DevPodWorkspaceInstanceGetStatusList(in *management.DevPodWorkspaceInstanceGetStatusList, out *DevPodWorkspaceInstanceGetStatusList, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceGetStatusList_To_v1_DevPodWorkspaceInstanceGetStatusList(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceList_To_management_DevPodWorkspaceInstanceList(in *DevPodWorkspaceInstanceList, out *management.DevPodWorkspaceInstanceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodWorkspaceInstance)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceList_To_management_DevPodWorkspaceInstanceList is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceList_To_management_DevPodWorkspaceInstanceList(in *DevPodWorkspaceInstanceList, out *management.DevPodWorkspaceInstanceList, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceList_To_management_DevPodWorkspaceInstanceList(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceList_To_v1_DevPodWorkspaceInstanceList(in *management.DevPodWorkspaceInstanceList, out *DevPodWorkspaceInstanceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodWorkspaceInstance)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodWorkspaceInstanceList_To_v1_DevPodWorkspaceInstanceList is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceList_To_v1_DevPodWorkspaceInstanceList(in *management.DevPodWorkspaceInstanceList, out *DevPodWorkspaceInstanceList, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceList_To_v1_DevPodWorkspaceInstanceList(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceSpec_To_management_DevPodWorkspaceInstanceSpec(in *DevPodWorkspaceInstanceSpec, out *management.DevPodWorkspaceInstanceSpec, s conversion.Scope) error { + out.DevPodWorkspaceInstanceSpec = in.DevPodWorkspaceInstanceSpec + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceSpec_To_management_DevPodWorkspaceInstanceSpec is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceSpec_To_management_DevPodWorkspaceInstanceSpec(in *DevPodWorkspaceInstanceSpec, out *management.DevPodWorkspaceInstanceSpec, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceSpec_To_management_DevPodWorkspaceInstanceSpec(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceSpec_To_v1_DevPodWorkspaceInstanceSpec(in *management.DevPodWorkspaceInstanceSpec, out *DevPodWorkspaceInstanceSpec, s conversion.Scope) error { + out.DevPodWorkspaceInstanceSpec = in.DevPodWorkspaceInstanceSpec + return nil +} + +// Convert_management_DevPodWorkspaceInstanceSpec_To_v1_DevPodWorkspaceInstanceSpec is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceSpec_To_v1_DevPodWorkspaceInstanceSpec(in *management.DevPodWorkspaceInstanceSpec, out *DevPodWorkspaceInstanceSpec, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceSpec_To_v1_DevPodWorkspaceInstanceSpec(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceSsh_To_management_DevPodWorkspaceInstanceSsh(in *DevPodWorkspaceInstanceSsh, out *management.DevPodWorkspaceInstanceSsh, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceSsh_To_management_DevPodWorkspaceInstanceSsh is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceSsh_To_management_DevPodWorkspaceInstanceSsh(in *DevPodWorkspaceInstanceSsh, out *management.DevPodWorkspaceInstanceSsh, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceSsh_To_management_DevPodWorkspaceInstanceSsh(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceSsh_To_v1_DevPodWorkspaceInstanceSsh(in *management.DevPodWorkspaceInstanceSsh, out *DevPodWorkspaceInstanceSsh, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_management_DevPodWorkspaceInstanceSsh_To_v1_DevPodWorkspaceInstanceSsh is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceSsh_To_v1_DevPodWorkspaceInstanceSsh(in *management.DevPodWorkspaceInstanceSsh, out *DevPodWorkspaceInstanceSsh, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceSsh_To_v1_DevPodWorkspaceInstanceSsh(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceSshList_To_management_DevPodWorkspaceInstanceSshList(in *DevPodWorkspaceInstanceSshList, out *management.DevPodWorkspaceInstanceSshList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodWorkspaceInstanceSsh)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceSshList_To_management_DevPodWorkspaceInstanceSshList is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceSshList_To_management_DevPodWorkspaceInstanceSshList(in *DevPodWorkspaceInstanceSshList, out *management.DevPodWorkspaceInstanceSshList, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceSshList_To_management_DevPodWorkspaceInstanceSshList(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceSshList_To_v1_DevPodWorkspaceInstanceSshList(in *management.DevPodWorkspaceInstanceSshList, out *DevPodWorkspaceInstanceSshList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodWorkspaceInstanceSsh)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodWorkspaceInstanceSshList_To_v1_DevPodWorkspaceInstanceSshList is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceSshList_To_v1_DevPodWorkspaceInstanceSshList(in *management.DevPodWorkspaceInstanceSshList, out *DevPodWorkspaceInstanceSshList, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceSshList_To_v1_DevPodWorkspaceInstanceSshList(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceStatus_To_management_DevPodWorkspaceInstanceStatus(in *DevPodWorkspaceInstanceStatus, out *management.DevPodWorkspaceInstanceStatus, s conversion.Scope) error { + out.DevPodWorkspaceInstanceStatus = in.DevPodWorkspaceInstanceStatus + out.SleepModeConfig = (*clusterv1.SleepModeConfig)(unsafe.Pointer(in.SleepModeConfig)) + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceStatus_To_management_DevPodWorkspaceInstanceStatus is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceStatus_To_management_DevPodWorkspaceInstanceStatus(in *DevPodWorkspaceInstanceStatus, out *management.DevPodWorkspaceInstanceStatus, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceStatus_To_management_DevPodWorkspaceInstanceStatus(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceStatus_To_v1_DevPodWorkspaceInstanceStatus(in *management.DevPodWorkspaceInstanceStatus, out *DevPodWorkspaceInstanceStatus, s conversion.Scope) error { + out.DevPodWorkspaceInstanceStatus = in.DevPodWorkspaceInstanceStatus + out.SleepModeConfig = (*clusterv1.SleepModeConfig)(unsafe.Pointer(in.SleepModeConfig)) + return nil +} + +// Convert_management_DevPodWorkspaceInstanceStatus_To_v1_DevPodWorkspaceInstanceStatus is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceStatus_To_v1_DevPodWorkspaceInstanceStatus(in *management.DevPodWorkspaceInstanceStatus, out *DevPodWorkspaceInstanceStatus, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceStatus_To_v1_DevPodWorkspaceInstanceStatus(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceStop_To_management_DevPodWorkspaceInstanceStop(in *DevPodWorkspaceInstanceStop, out *management.DevPodWorkspaceInstanceStop, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceStop_To_management_DevPodWorkspaceInstanceStop is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceStop_To_management_DevPodWorkspaceInstanceStop(in *DevPodWorkspaceInstanceStop, out *management.DevPodWorkspaceInstanceStop, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceStop_To_management_DevPodWorkspaceInstanceStop(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceStop_To_v1_DevPodWorkspaceInstanceStop(in *management.DevPodWorkspaceInstanceStop, out *DevPodWorkspaceInstanceStop, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_management_DevPodWorkspaceInstanceStop_To_v1_DevPodWorkspaceInstanceStop is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceStop_To_v1_DevPodWorkspaceInstanceStop(in *management.DevPodWorkspaceInstanceStop, out *DevPodWorkspaceInstanceStop, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceStop_To_v1_DevPodWorkspaceInstanceStop(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceStopList_To_management_DevPodWorkspaceInstanceStopList(in *DevPodWorkspaceInstanceStopList, out *management.DevPodWorkspaceInstanceStopList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodWorkspaceInstanceStop)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceStopList_To_management_DevPodWorkspaceInstanceStopList is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceStopList_To_management_DevPodWorkspaceInstanceStopList(in *DevPodWorkspaceInstanceStopList, out *management.DevPodWorkspaceInstanceStopList, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceStopList_To_management_DevPodWorkspaceInstanceStopList(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceStopList_To_v1_DevPodWorkspaceInstanceStopList(in *management.DevPodWorkspaceInstanceStopList, out *DevPodWorkspaceInstanceStopList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodWorkspaceInstanceStop)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodWorkspaceInstanceStopList_To_v1_DevPodWorkspaceInstanceStopList is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceStopList_To_v1_DevPodWorkspaceInstanceStopList(in *management.DevPodWorkspaceInstanceStopList, out *DevPodWorkspaceInstanceStopList, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceStopList_To_v1_DevPodWorkspaceInstanceStopList(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceUp_To_management_DevPodWorkspaceInstanceUp(in *DevPodWorkspaceInstanceUp, out *management.DevPodWorkspaceInstanceUp, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceUp_To_management_DevPodWorkspaceInstanceUp is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceUp_To_management_DevPodWorkspaceInstanceUp(in *DevPodWorkspaceInstanceUp, out *management.DevPodWorkspaceInstanceUp, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceUp_To_management_DevPodWorkspaceInstanceUp(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceUp_To_v1_DevPodWorkspaceInstanceUp(in *management.DevPodWorkspaceInstanceUp, out *DevPodWorkspaceInstanceUp, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_management_DevPodWorkspaceInstanceUp_To_v1_DevPodWorkspaceInstanceUp is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceUp_To_v1_DevPodWorkspaceInstanceUp(in *management.DevPodWorkspaceInstanceUp, out *DevPodWorkspaceInstanceUp, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceUp_To_v1_DevPodWorkspaceInstanceUp(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceUpList_To_management_DevPodWorkspaceInstanceUpList(in *DevPodWorkspaceInstanceUpList, out *management.DevPodWorkspaceInstanceUpList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodWorkspaceInstanceUp)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceUpList_To_management_DevPodWorkspaceInstanceUpList is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceUpList_To_management_DevPodWorkspaceInstanceUpList(in *DevPodWorkspaceInstanceUpList, out *management.DevPodWorkspaceInstanceUpList, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceUpList_To_management_DevPodWorkspaceInstanceUpList(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceUpList_To_v1_DevPodWorkspaceInstanceUpList(in *management.DevPodWorkspaceInstanceUpList, out *DevPodWorkspaceInstanceUpList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodWorkspaceInstanceUp)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodWorkspaceInstanceUpList_To_v1_DevPodWorkspaceInstanceUpList is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceUpList_To_v1_DevPodWorkspaceInstanceUpList(in *management.DevPodWorkspaceInstanceUpList, out *DevPodWorkspaceInstanceUpList, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceUpList_To_v1_DevPodWorkspaceInstanceUpList(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceTemplate_To_management_DevPodWorkspaceTemplate(in *DevPodWorkspaceTemplate, out *management.DevPodWorkspaceTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_DevPodWorkspaceTemplateSpec_To_management_DevPodWorkspaceTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_DevPodWorkspaceTemplateStatus_To_management_DevPodWorkspaceTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_DevPodWorkspaceTemplate_To_management_DevPodWorkspaceTemplate is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceTemplate_To_management_DevPodWorkspaceTemplate(in *DevPodWorkspaceTemplate, out *management.DevPodWorkspaceTemplate, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceTemplate_To_management_DevPodWorkspaceTemplate(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceTemplate_To_v1_DevPodWorkspaceTemplate(in *management.DevPodWorkspaceTemplate, out *DevPodWorkspaceTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_DevPodWorkspaceTemplateSpec_To_v1_DevPodWorkspaceTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_DevPodWorkspaceTemplateStatus_To_v1_DevPodWorkspaceTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_DevPodWorkspaceTemplate_To_v1_DevPodWorkspaceTemplate is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceTemplate_To_v1_DevPodWorkspaceTemplate(in *management.DevPodWorkspaceTemplate, out *DevPodWorkspaceTemplate, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceTemplate_To_v1_DevPodWorkspaceTemplate(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceTemplateList_To_management_DevPodWorkspaceTemplateList(in *DevPodWorkspaceTemplateList, out *management.DevPodWorkspaceTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodWorkspaceTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodWorkspaceTemplateList_To_management_DevPodWorkspaceTemplateList is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceTemplateList_To_management_DevPodWorkspaceTemplateList(in *DevPodWorkspaceTemplateList, out *management.DevPodWorkspaceTemplateList, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceTemplateList_To_management_DevPodWorkspaceTemplateList(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceTemplateList_To_v1_DevPodWorkspaceTemplateList(in *management.DevPodWorkspaceTemplateList, out *DevPodWorkspaceTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodWorkspaceTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodWorkspaceTemplateList_To_v1_DevPodWorkspaceTemplateList is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceTemplateList_To_v1_DevPodWorkspaceTemplateList(in *management.DevPodWorkspaceTemplateList, out *DevPodWorkspaceTemplateList, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceTemplateList_To_v1_DevPodWorkspaceTemplateList(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceTemplateSpec_To_management_DevPodWorkspaceTemplateSpec(in *DevPodWorkspaceTemplateSpec, out *management.DevPodWorkspaceTemplateSpec, s conversion.Scope) error { + out.DevPodWorkspaceTemplateSpec = in.DevPodWorkspaceTemplateSpec + return nil +} + +// Convert_v1_DevPodWorkspaceTemplateSpec_To_management_DevPodWorkspaceTemplateSpec is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceTemplateSpec_To_management_DevPodWorkspaceTemplateSpec(in *DevPodWorkspaceTemplateSpec, out *management.DevPodWorkspaceTemplateSpec, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceTemplateSpec_To_management_DevPodWorkspaceTemplateSpec(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceTemplateSpec_To_v1_DevPodWorkspaceTemplateSpec(in *management.DevPodWorkspaceTemplateSpec, out *DevPodWorkspaceTemplateSpec, s conversion.Scope) error { + out.DevPodWorkspaceTemplateSpec = in.DevPodWorkspaceTemplateSpec + return nil +} + +// Convert_management_DevPodWorkspaceTemplateSpec_To_v1_DevPodWorkspaceTemplateSpec is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceTemplateSpec_To_v1_DevPodWorkspaceTemplateSpec(in *management.DevPodWorkspaceTemplateSpec, out *DevPodWorkspaceTemplateSpec, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceTemplateSpec_To_v1_DevPodWorkspaceTemplateSpec(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceTemplateStatus_To_management_DevPodWorkspaceTemplateStatus(in *DevPodWorkspaceTemplateStatus, out *management.DevPodWorkspaceTemplateStatus, s conversion.Scope) error { + out.DevPodWorkspaceTemplateStatus = in.DevPodWorkspaceTemplateStatus + return nil +} + +// Convert_v1_DevPodWorkspaceTemplateStatus_To_management_DevPodWorkspaceTemplateStatus is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceTemplateStatus_To_management_DevPodWorkspaceTemplateStatus(in *DevPodWorkspaceTemplateStatus, out *management.DevPodWorkspaceTemplateStatus, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceTemplateStatus_To_management_DevPodWorkspaceTemplateStatus(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceTemplateStatus_To_v1_DevPodWorkspaceTemplateStatus(in *management.DevPodWorkspaceTemplateStatus, out *DevPodWorkspaceTemplateStatus, s conversion.Scope) error { + out.DevPodWorkspaceTemplateStatus = in.DevPodWorkspaceTemplateStatus + return nil +} + +// Convert_management_DevPodWorkspaceTemplateStatus_To_v1_DevPodWorkspaceTemplateStatus is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceTemplateStatus_To_v1_DevPodWorkspaceTemplateStatus(in *management.DevPodWorkspaceTemplateStatus, out *DevPodWorkspaceTemplateStatus, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceTemplateStatus_To_v1_DevPodWorkspaceTemplateStatus(in, out, s) +} + +func autoConvert_v1_DirectClusterEndpointToken_To_management_DirectClusterEndpointToken(in *DirectClusterEndpointToken, out *management.DirectClusterEndpointToken, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_DirectClusterEndpointTokenSpec_To_management_DirectClusterEndpointTokenSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_DirectClusterEndpointTokenStatus_To_management_DirectClusterEndpointTokenStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_DirectClusterEndpointToken_To_management_DirectClusterEndpointToken is an autogenerated conversion function. +func Convert_v1_DirectClusterEndpointToken_To_management_DirectClusterEndpointToken(in *DirectClusterEndpointToken, out *management.DirectClusterEndpointToken, s conversion.Scope) error { + return autoConvert_v1_DirectClusterEndpointToken_To_management_DirectClusterEndpointToken(in, out, s) +} + +func autoConvert_management_DirectClusterEndpointToken_To_v1_DirectClusterEndpointToken(in *management.DirectClusterEndpointToken, out *DirectClusterEndpointToken, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_DirectClusterEndpointTokenSpec_To_v1_DirectClusterEndpointTokenSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_DirectClusterEndpointTokenStatus_To_v1_DirectClusterEndpointTokenStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_DirectClusterEndpointToken_To_v1_DirectClusterEndpointToken is an autogenerated conversion function. +func Convert_management_DirectClusterEndpointToken_To_v1_DirectClusterEndpointToken(in *management.DirectClusterEndpointToken, out *DirectClusterEndpointToken, s conversion.Scope) error { + return autoConvert_management_DirectClusterEndpointToken_To_v1_DirectClusterEndpointToken(in, out, s) +} + +func autoConvert_v1_DirectClusterEndpointTokenList_To_management_DirectClusterEndpointTokenList(in *DirectClusterEndpointTokenList, out *management.DirectClusterEndpointTokenList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DirectClusterEndpointToken)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DirectClusterEndpointTokenList_To_management_DirectClusterEndpointTokenList is an autogenerated conversion function. +func Convert_v1_DirectClusterEndpointTokenList_To_management_DirectClusterEndpointTokenList(in *DirectClusterEndpointTokenList, out *management.DirectClusterEndpointTokenList, s conversion.Scope) error { + return autoConvert_v1_DirectClusterEndpointTokenList_To_management_DirectClusterEndpointTokenList(in, out, s) +} + +func autoConvert_management_DirectClusterEndpointTokenList_To_v1_DirectClusterEndpointTokenList(in *management.DirectClusterEndpointTokenList, out *DirectClusterEndpointTokenList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DirectClusterEndpointToken)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DirectClusterEndpointTokenList_To_v1_DirectClusterEndpointTokenList is an autogenerated conversion function. +func Convert_management_DirectClusterEndpointTokenList_To_v1_DirectClusterEndpointTokenList(in *management.DirectClusterEndpointTokenList, out *DirectClusterEndpointTokenList, s conversion.Scope) error { + return autoConvert_management_DirectClusterEndpointTokenList_To_v1_DirectClusterEndpointTokenList(in, out, s) +} + +func autoConvert_v1_DirectClusterEndpointTokenSpec_To_management_DirectClusterEndpointTokenSpec(in *DirectClusterEndpointTokenSpec, out *management.DirectClusterEndpointTokenSpec, s conversion.Scope) error { + out.TTL = in.TTL + out.Scope = (*storagev1.AccessKeyScope)(unsafe.Pointer(in.Scope)) + return nil +} + +// Convert_v1_DirectClusterEndpointTokenSpec_To_management_DirectClusterEndpointTokenSpec is an autogenerated conversion function. +func Convert_v1_DirectClusterEndpointTokenSpec_To_management_DirectClusterEndpointTokenSpec(in *DirectClusterEndpointTokenSpec, out *management.DirectClusterEndpointTokenSpec, s conversion.Scope) error { + return autoConvert_v1_DirectClusterEndpointTokenSpec_To_management_DirectClusterEndpointTokenSpec(in, out, s) +} + +func autoConvert_management_DirectClusterEndpointTokenSpec_To_v1_DirectClusterEndpointTokenSpec(in *management.DirectClusterEndpointTokenSpec, out *DirectClusterEndpointTokenSpec, s conversion.Scope) error { + out.TTL = in.TTL + out.Scope = (*storagev1.AccessKeyScope)(unsafe.Pointer(in.Scope)) + return nil +} + +// Convert_management_DirectClusterEndpointTokenSpec_To_v1_DirectClusterEndpointTokenSpec is an autogenerated conversion function. +func Convert_management_DirectClusterEndpointTokenSpec_To_v1_DirectClusterEndpointTokenSpec(in *management.DirectClusterEndpointTokenSpec, out *DirectClusterEndpointTokenSpec, s conversion.Scope) error { + return autoConvert_management_DirectClusterEndpointTokenSpec_To_v1_DirectClusterEndpointTokenSpec(in, out, s) +} + +func autoConvert_v1_DirectClusterEndpointTokenStatus_To_management_DirectClusterEndpointTokenStatus(in *DirectClusterEndpointTokenStatus, out *management.DirectClusterEndpointTokenStatus, s conversion.Scope) error { + out.Token = in.Token + return nil +} + +// Convert_v1_DirectClusterEndpointTokenStatus_To_management_DirectClusterEndpointTokenStatus is an autogenerated conversion function. +func Convert_v1_DirectClusterEndpointTokenStatus_To_management_DirectClusterEndpointTokenStatus(in *DirectClusterEndpointTokenStatus, out *management.DirectClusterEndpointTokenStatus, s conversion.Scope) error { + return autoConvert_v1_DirectClusterEndpointTokenStatus_To_management_DirectClusterEndpointTokenStatus(in, out, s) +} + +func autoConvert_management_DirectClusterEndpointTokenStatus_To_v1_DirectClusterEndpointTokenStatus(in *management.DirectClusterEndpointTokenStatus, out *DirectClusterEndpointTokenStatus, s conversion.Scope) error { + out.Token = in.Token + return nil +} + +// Convert_management_DirectClusterEndpointTokenStatus_To_v1_DirectClusterEndpointTokenStatus is an autogenerated conversion function. +func Convert_management_DirectClusterEndpointTokenStatus_To_v1_DirectClusterEndpointTokenStatus(in *management.DirectClusterEndpointTokenStatus, out *DirectClusterEndpointTokenStatus, s conversion.Scope) error { + return autoConvert_management_DirectClusterEndpointTokenStatus_To_v1_DirectClusterEndpointTokenStatus(in, out, s) +} + +func autoConvert_v1_Event_To_management_Event(in *Event, out *management.Event, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_EventSpec_To_management_EventSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_EventStatus_To_management_EventStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Event_To_management_Event is an autogenerated conversion function. +func Convert_v1_Event_To_management_Event(in *Event, out *management.Event, s conversion.Scope) error { + return autoConvert_v1_Event_To_management_Event(in, out, s) +} + +func autoConvert_management_Event_To_v1_Event(in *management.Event, out *Event, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_EventSpec_To_v1_EventSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_EventStatus_To_v1_EventStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Event_To_v1_Event is an autogenerated conversion function. +func Convert_management_Event_To_v1_Event(in *management.Event, out *Event, s conversion.Scope) error { + return autoConvert_management_Event_To_v1_Event(in, out, s) +} + +func autoConvert_v1_EventList_To_management_EventList(in *EventList, out *management.EventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Event)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_EventList_To_management_EventList is an autogenerated conversion function. +func Convert_v1_EventList_To_management_EventList(in *EventList, out *management.EventList, s conversion.Scope) error { + return autoConvert_v1_EventList_To_management_EventList(in, out, s) +} + +func autoConvert_management_EventList_To_v1_EventList(in *management.EventList, out *EventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Event)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_EventList_To_v1_EventList is an autogenerated conversion function. +func Convert_management_EventList_To_v1_EventList(in *management.EventList, out *EventList, s conversion.Scope) error { + return autoConvert_management_EventList_To_v1_EventList(in, out, s) +} + +func autoConvert_v1_EventSpec_To_management_EventSpec(in *EventSpec, out *management.EventSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1_EventSpec_To_management_EventSpec is an autogenerated conversion function. +func Convert_v1_EventSpec_To_management_EventSpec(in *EventSpec, out *management.EventSpec, s conversion.Scope) error { + return autoConvert_v1_EventSpec_To_management_EventSpec(in, out, s) +} + +func autoConvert_management_EventSpec_To_v1_EventSpec(in *management.EventSpec, out *EventSpec, s conversion.Scope) error { + return nil +} + +// Convert_management_EventSpec_To_v1_EventSpec is an autogenerated conversion function. +func Convert_management_EventSpec_To_v1_EventSpec(in *management.EventSpec, out *EventSpec, s conversion.Scope) error { + return autoConvert_management_EventSpec_To_v1_EventSpec(in, out, s) +} + +func autoConvert_v1_EventStatus_To_management_EventStatus(in *EventStatus, out *management.EventStatus, s conversion.Scope) error { + out.Event = in.Event + return nil +} + +// Convert_v1_EventStatus_To_management_EventStatus is an autogenerated conversion function. +func Convert_v1_EventStatus_To_management_EventStatus(in *EventStatus, out *management.EventStatus, s conversion.Scope) error { + return autoConvert_v1_EventStatus_To_management_EventStatus(in, out, s) +} + +func autoConvert_management_EventStatus_To_v1_EventStatus(in *management.EventStatus, out *EventStatus, s conversion.Scope) error { + out.Event = in.Event + return nil +} + +// Convert_management_EventStatus_To_v1_EventStatus is an autogenerated conversion function. +func Convert_management_EventStatus_To_v1_EventStatus(in *management.EventStatus, out *EventStatus, s conversion.Scope) error { + return autoConvert_management_EventStatus_To_v1_EventStatus(in, out, s) +} + +func autoConvert_v1_Feature_To_management_Feature(in *Feature, out *management.Feature, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_FeatureSpec_To_management_FeatureSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_FeatureStatus_To_management_FeatureStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Feature_To_management_Feature is an autogenerated conversion function. +func Convert_v1_Feature_To_management_Feature(in *Feature, out *management.Feature, s conversion.Scope) error { + return autoConvert_v1_Feature_To_management_Feature(in, out, s) +} + +func autoConvert_management_Feature_To_v1_Feature(in *management.Feature, out *Feature, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_FeatureSpec_To_v1_FeatureSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_FeatureStatus_To_v1_FeatureStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Feature_To_v1_Feature is an autogenerated conversion function. +func Convert_management_Feature_To_v1_Feature(in *management.Feature, out *Feature, s conversion.Scope) error { + return autoConvert_management_Feature_To_v1_Feature(in, out, s) +} + +func autoConvert_v1_FeatureList_To_management_FeatureList(in *FeatureList, out *management.FeatureList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Feature)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_FeatureList_To_management_FeatureList is an autogenerated conversion function. +func Convert_v1_FeatureList_To_management_FeatureList(in *FeatureList, out *management.FeatureList, s conversion.Scope) error { + return autoConvert_v1_FeatureList_To_management_FeatureList(in, out, s) +} + +func autoConvert_management_FeatureList_To_v1_FeatureList(in *management.FeatureList, out *FeatureList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Feature)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_FeatureList_To_v1_FeatureList is an autogenerated conversion function. +func Convert_management_FeatureList_To_v1_FeatureList(in *management.FeatureList, out *FeatureList, s conversion.Scope) error { + return autoConvert_management_FeatureList_To_v1_FeatureList(in, out, s) +} + +func autoConvert_v1_FeatureSpec_To_management_FeatureSpec(in *FeatureSpec, out *management.FeatureSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1_FeatureSpec_To_management_FeatureSpec is an autogenerated conversion function. +func Convert_v1_FeatureSpec_To_management_FeatureSpec(in *FeatureSpec, out *management.FeatureSpec, s conversion.Scope) error { + return autoConvert_v1_FeatureSpec_To_management_FeatureSpec(in, out, s) +} + +func autoConvert_management_FeatureSpec_To_v1_FeatureSpec(in *management.FeatureSpec, out *FeatureSpec, s conversion.Scope) error { + return nil +} + +// Convert_management_FeatureSpec_To_v1_FeatureSpec is an autogenerated conversion function. +func Convert_management_FeatureSpec_To_v1_FeatureSpec(in *management.FeatureSpec, out *FeatureSpec, s conversion.Scope) error { + return autoConvert_management_FeatureSpec_To_v1_FeatureSpec(in, out, s) +} + +func autoConvert_v1_FeatureStatus_To_management_FeatureStatus(in *FeatureStatus, out *management.FeatureStatus, s conversion.Scope) error { + out.Enabled = in.Enabled + return nil +} + +// Convert_v1_FeatureStatus_To_management_FeatureStatus is an autogenerated conversion function. +func Convert_v1_FeatureStatus_To_management_FeatureStatus(in *FeatureStatus, out *management.FeatureStatus, s conversion.Scope) error { + return autoConvert_v1_FeatureStatus_To_management_FeatureStatus(in, out, s) +} + +func autoConvert_management_FeatureStatus_To_v1_FeatureStatus(in *management.FeatureStatus, out *FeatureStatus, s conversion.Scope) error { + out.Enabled = in.Enabled + return nil +} + +// Convert_management_FeatureStatus_To_v1_FeatureStatus is an autogenerated conversion function. +func Convert_management_FeatureStatus_To_v1_FeatureStatus(in *management.FeatureStatus, out *FeatureStatus, s conversion.Scope) error { + return autoConvert_management_FeatureStatus_To_v1_FeatureStatus(in, out, s) +} + +func autoConvert_v1_GroupResources_To_management_GroupResources(in *GroupResources, out *management.GroupResources, s conversion.Scope) error { + out.Group = in.Group + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + return nil +} + +// Convert_v1_GroupResources_To_management_GroupResources is an autogenerated conversion function. +func Convert_v1_GroupResources_To_management_GroupResources(in *GroupResources, out *management.GroupResources, s conversion.Scope) error { + return autoConvert_v1_GroupResources_To_management_GroupResources(in, out, s) +} + +func autoConvert_management_GroupResources_To_v1_GroupResources(in *management.GroupResources, out *GroupResources, s conversion.Scope) error { + out.Group = in.Group + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + return nil +} + +// Convert_management_GroupResources_To_v1_GroupResources is an autogenerated conversion function. +func Convert_management_GroupResources_To_v1_GroupResources(in *management.GroupResources, out *GroupResources, s conversion.Scope) error { + return autoConvert_management_GroupResources_To_v1_GroupResources(in, out, s) +} + +func autoConvert_v1_IngressAuthToken_To_management_IngressAuthToken(in *IngressAuthToken, out *management.IngressAuthToken, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_IngressAuthTokenSpec_To_management_IngressAuthTokenSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_IngressAuthTokenStatus_To_management_IngressAuthTokenStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_IngressAuthToken_To_management_IngressAuthToken is an autogenerated conversion function. +func Convert_v1_IngressAuthToken_To_management_IngressAuthToken(in *IngressAuthToken, out *management.IngressAuthToken, s conversion.Scope) error { + return autoConvert_v1_IngressAuthToken_To_management_IngressAuthToken(in, out, s) +} + +func autoConvert_management_IngressAuthToken_To_v1_IngressAuthToken(in *management.IngressAuthToken, out *IngressAuthToken, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_IngressAuthTokenSpec_To_v1_IngressAuthTokenSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_IngressAuthTokenStatus_To_v1_IngressAuthTokenStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_IngressAuthToken_To_v1_IngressAuthToken is an autogenerated conversion function. +func Convert_management_IngressAuthToken_To_v1_IngressAuthToken(in *management.IngressAuthToken, out *IngressAuthToken, s conversion.Scope) error { + return autoConvert_management_IngressAuthToken_To_v1_IngressAuthToken(in, out, s) +} + +func autoConvert_v1_IngressAuthTokenList_To_management_IngressAuthTokenList(in *IngressAuthTokenList, out *management.IngressAuthTokenList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.IngressAuthToken)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_IngressAuthTokenList_To_management_IngressAuthTokenList is an autogenerated conversion function. +func Convert_v1_IngressAuthTokenList_To_management_IngressAuthTokenList(in *IngressAuthTokenList, out *management.IngressAuthTokenList, s conversion.Scope) error { + return autoConvert_v1_IngressAuthTokenList_To_management_IngressAuthTokenList(in, out, s) +} + +func autoConvert_management_IngressAuthTokenList_To_v1_IngressAuthTokenList(in *management.IngressAuthTokenList, out *IngressAuthTokenList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]IngressAuthToken)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_IngressAuthTokenList_To_v1_IngressAuthTokenList is an autogenerated conversion function. +func Convert_management_IngressAuthTokenList_To_v1_IngressAuthTokenList(in *management.IngressAuthTokenList, out *IngressAuthTokenList, s conversion.Scope) error { + return autoConvert_management_IngressAuthTokenList_To_v1_IngressAuthTokenList(in, out, s) +} + +func autoConvert_v1_IngressAuthTokenSpec_To_management_IngressAuthTokenSpec(in *IngressAuthTokenSpec, out *management.IngressAuthTokenSpec, s conversion.Scope) error { + out.Host = in.Host + out.Signature = in.Signature + return nil +} + +// Convert_v1_IngressAuthTokenSpec_To_management_IngressAuthTokenSpec is an autogenerated conversion function. +func Convert_v1_IngressAuthTokenSpec_To_management_IngressAuthTokenSpec(in *IngressAuthTokenSpec, out *management.IngressAuthTokenSpec, s conversion.Scope) error { + return autoConvert_v1_IngressAuthTokenSpec_To_management_IngressAuthTokenSpec(in, out, s) +} + +func autoConvert_management_IngressAuthTokenSpec_To_v1_IngressAuthTokenSpec(in *management.IngressAuthTokenSpec, out *IngressAuthTokenSpec, s conversion.Scope) error { + out.Host = in.Host + out.Signature = in.Signature + return nil +} + +// Convert_management_IngressAuthTokenSpec_To_v1_IngressAuthTokenSpec is an autogenerated conversion function. +func Convert_management_IngressAuthTokenSpec_To_v1_IngressAuthTokenSpec(in *management.IngressAuthTokenSpec, out *IngressAuthTokenSpec, s conversion.Scope) error { + return autoConvert_management_IngressAuthTokenSpec_To_v1_IngressAuthTokenSpec(in, out, s) +} + +func autoConvert_v1_IngressAuthTokenStatus_To_management_IngressAuthTokenStatus(in *IngressAuthTokenStatus, out *management.IngressAuthTokenStatus, s conversion.Scope) error { + out.Token = in.Token + return nil +} + +// Convert_v1_IngressAuthTokenStatus_To_management_IngressAuthTokenStatus is an autogenerated conversion function. +func Convert_v1_IngressAuthTokenStatus_To_management_IngressAuthTokenStatus(in *IngressAuthTokenStatus, out *management.IngressAuthTokenStatus, s conversion.Scope) error { + return autoConvert_v1_IngressAuthTokenStatus_To_management_IngressAuthTokenStatus(in, out, s) +} + +func autoConvert_management_IngressAuthTokenStatus_To_v1_IngressAuthTokenStatus(in *management.IngressAuthTokenStatus, out *IngressAuthTokenStatus, s conversion.Scope) error { + out.Token = in.Token + return nil +} + +// Convert_management_IngressAuthTokenStatus_To_v1_IngressAuthTokenStatus is an autogenerated conversion function. +func Convert_management_IngressAuthTokenStatus_To_v1_IngressAuthTokenStatus(in *management.IngressAuthTokenStatus, out *IngressAuthTokenStatus, s conversion.Scope) error { + return autoConvert_management_IngressAuthTokenStatus_To_v1_IngressAuthTokenStatus(in, out, s) +} + +func autoConvert_v1_Kiosk_To_management_Kiosk(in *Kiosk, out *management.Kiosk, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_KioskSpec_To_management_KioskSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_KioskStatus_To_management_KioskStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Kiosk_To_management_Kiosk is an autogenerated conversion function. +func Convert_v1_Kiosk_To_management_Kiosk(in *Kiosk, out *management.Kiosk, s conversion.Scope) error { + return autoConvert_v1_Kiosk_To_management_Kiosk(in, out, s) +} + +func autoConvert_management_Kiosk_To_v1_Kiosk(in *management.Kiosk, out *Kiosk, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_KioskSpec_To_v1_KioskSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_KioskStatus_To_v1_KioskStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Kiosk_To_v1_Kiosk is an autogenerated conversion function. +func Convert_management_Kiosk_To_v1_Kiosk(in *management.Kiosk, out *Kiosk, s conversion.Scope) error { + return autoConvert_management_Kiosk_To_v1_Kiosk(in, out, s) +} + +func autoConvert_v1_KioskList_To_management_KioskList(in *KioskList, out *management.KioskList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Kiosk)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_KioskList_To_management_KioskList is an autogenerated conversion function. +func Convert_v1_KioskList_To_management_KioskList(in *KioskList, out *management.KioskList, s conversion.Scope) error { + return autoConvert_v1_KioskList_To_management_KioskList(in, out, s) +} + +func autoConvert_management_KioskList_To_v1_KioskList(in *management.KioskList, out *KioskList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Kiosk)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_KioskList_To_v1_KioskList is an autogenerated conversion function. +func Convert_management_KioskList_To_v1_KioskList(in *management.KioskList, out *KioskList, s conversion.Scope) error { + return autoConvert_management_KioskList_To_v1_KioskList(in, out, s) +} + +func autoConvert_v1_KioskSpec_To_management_KioskSpec(in *KioskSpec, out *management.KioskSpec, s conversion.Scope) error { + out.JsPolicy = in.JsPolicy + out.JsPolicyBundle = in.JsPolicyBundle + out.JsPolicyViolations = in.JsPolicyViolations + out.HelmRelease = in.HelmRelease + out.SleepModeConfig = in.SleepModeConfig + out.Space = in.Space + out.VirtualCluster = in.VirtualCluster + out.LocalClusterAccess = in.LocalClusterAccess + out.ClusterQuota = in.ClusterQuota + out.ChartInfo = in.ChartInfo + out.StorageClusterAccess = in.StorageClusterAccess + out.StorageClusterQuota = in.StorageClusterQuota + out.StorageVirtualCluster = in.StorageVirtualCluster + out.LocalUser = in.LocalUser + out.LocalTeam = in.LocalTeam + out.UISettings = in.UISettings + return nil +} + +// Convert_v1_KioskSpec_To_management_KioskSpec is an autogenerated conversion function. +func Convert_v1_KioskSpec_To_management_KioskSpec(in *KioskSpec, out *management.KioskSpec, s conversion.Scope) error { + return autoConvert_v1_KioskSpec_To_management_KioskSpec(in, out, s) +} + +func autoConvert_management_KioskSpec_To_v1_KioskSpec(in *management.KioskSpec, out *KioskSpec, s conversion.Scope) error { + out.JsPolicy = in.JsPolicy + out.JsPolicyBundle = in.JsPolicyBundle + out.JsPolicyViolations = in.JsPolicyViolations + out.HelmRelease = in.HelmRelease + out.SleepModeConfig = in.SleepModeConfig + out.Space = in.Space + out.VirtualCluster = in.VirtualCluster + out.LocalClusterAccess = in.LocalClusterAccess + out.ClusterQuota = in.ClusterQuota + out.ChartInfo = in.ChartInfo + out.StorageClusterAccess = in.StorageClusterAccess + out.StorageClusterQuota = in.StorageClusterQuota + out.StorageVirtualCluster = in.StorageVirtualCluster + out.LocalUser = in.LocalUser + out.LocalTeam = in.LocalTeam + out.UISettings = in.UISettings + return nil +} + +// Convert_management_KioskSpec_To_v1_KioskSpec is an autogenerated conversion function. +func Convert_management_KioskSpec_To_v1_KioskSpec(in *management.KioskSpec, out *KioskSpec, s conversion.Scope) error { + return autoConvert_management_KioskSpec_To_v1_KioskSpec(in, out, s) +} + +func autoConvert_v1_KioskStatus_To_management_KioskStatus(in *KioskStatus, out *management.KioskStatus, s conversion.Scope) error { + return nil +} + +// Convert_v1_KioskStatus_To_management_KioskStatus is an autogenerated conversion function. +func Convert_v1_KioskStatus_To_management_KioskStatus(in *KioskStatus, out *management.KioskStatus, s conversion.Scope) error { + return autoConvert_v1_KioskStatus_To_management_KioskStatus(in, out, s) +} + +func autoConvert_management_KioskStatus_To_v1_KioskStatus(in *management.KioskStatus, out *KioskStatus, s conversion.Scope) error { + return nil +} + +// Convert_management_KioskStatus_To_v1_KioskStatus is an autogenerated conversion function. +func Convert_management_KioskStatus_To_v1_KioskStatus(in *management.KioskStatus, out *KioskStatus, s conversion.Scope) error { + return autoConvert_management_KioskStatus_To_v1_KioskStatus(in, out, s) +} + +func autoConvert_v1_License_To_management_License(in *License, out *management.License, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_LicenseSpec_To_management_LicenseSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_LicenseStatus_To_management_LicenseStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_License_To_management_License is an autogenerated conversion function. +func Convert_v1_License_To_management_License(in *License, out *management.License, s conversion.Scope) error { + return autoConvert_v1_License_To_management_License(in, out, s) +} + +func autoConvert_management_License_To_v1_License(in *management.License, out *License, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_LicenseSpec_To_v1_LicenseSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_LicenseStatus_To_v1_LicenseStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_License_To_v1_License is an autogenerated conversion function. +func Convert_management_License_To_v1_License(in *management.License, out *License, s conversion.Scope) error { + return autoConvert_management_License_To_v1_License(in, out, s) +} + +func autoConvert_v1_LicenseList_To_management_LicenseList(in *LicenseList, out *management.LicenseList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.License)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_LicenseList_To_management_LicenseList is an autogenerated conversion function. +func Convert_v1_LicenseList_To_management_LicenseList(in *LicenseList, out *management.LicenseList, s conversion.Scope) error { + return autoConvert_v1_LicenseList_To_management_LicenseList(in, out, s) +} + +func autoConvert_management_LicenseList_To_v1_LicenseList(in *management.LicenseList, out *LicenseList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]License)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_LicenseList_To_v1_LicenseList is an autogenerated conversion function. +func Convert_management_LicenseList_To_v1_LicenseList(in *management.LicenseList, out *LicenseList, s conversion.Scope) error { + return autoConvert_management_LicenseList_To_v1_LicenseList(in, out, s) +} + +func autoConvert_v1_LicenseRequest_To_management_LicenseRequest(in *LicenseRequest, out *management.LicenseRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_LicenseRequestSpec_To_management_LicenseRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_LicenseRequestStatus_To_management_LicenseRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_LicenseRequest_To_management_LicenseRequest is an autogenerated conversion function. +func Convert_v1_LicenseRequest_To_management_LicenseRequest(in *LicenseRequest, out *management.LicenseRequest, s conversion.Scope) error { + return autoConvert_v1_LicenseRequest_To_management_LicenseRequest(in, out, s) +} + +func autoConvert_management_LicenseRequest_To_v1_LicenseRequest(in *management.LicenseRequest, out *LicenseRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_LicenseRequestSpec_To_v1_LicenseRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_LicenseRequestStatus_To_v1_LicenseRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_LicenseRequest_To_v1_LicenseRequest is an autogenerated conversion function. +func Convert_management_LicenseRequest_To_v1_LicenseRequest(in *management.LicenseRequest, out *LicenseRequest, s conversion.Scope) error { + return autoConvert_management_LicenseRequest_To_v1_LicenseRequest(in, out, s) +} + +func autoConvert_v1_LicenseRequestList_To_management_LicenseRequestList(in *LicenseRequestList, out *management.LicenseRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.LicenseRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_LicenseRequestList_To_management_LicenseRequestList is an autogenerated conversion function. +func Convert_v1_LicenseRequestList_To_management_LicenseRequestList(in *LicenseRequestList, out *management.LicenseRequestList, s conversion.Scope) error { + return autoConvert_v1_LicenseRequestList_To_management_LicenseRequestList(in, out, s) +} + +func autoConvert_management_LicenseRequestList_To_v1_LicenseRequestList(in *management.LicenseRequestList, out *LicenseRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]LicenseRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_LicenseRequestList_To_v1_LicenseRequestList is an autogenerated conversion function. +func Convert_management_LicenseRequestList_To_v1_LicenseRequestList(in *management.LicenseRequestList, out *LicenseRequestList, s conversion.Scope) error { + return autoConvert_management_LicenseRequestList_To_v1_LicenseRequestList(in, out, s) +} + +func autoConvert_v1_LicenseRequestSpec_To_management_LicenseRequestSpec(in *LicenseRequestSpec, out *management.LicenseRequestSpec, s conversion.Scope) error { + out.Route = in.Route + out.Input = in.Input + return nil +} + +// Convert_v1_LicenseRequestSpec_To_management_LicenseRequestSpec is an autogenerated conversion function. +func Convert_v1_LicenseRequestSpec_To_management_LicenseRequestSpec(in *LicenseRequestSpec, out *management.LicenseRequestSpec, s conversion.Scope) error { + return autoConvert_v1_LicenseRequestSpec_To_management_LicenseRequestSpec(in, out, s) +} + +func autoConvert_management_LicenseRequestSpec_To_v1_LicenseRequestSpec(in *management.LicenseRequestSpec, out *LicenseRequestSpec, s conversion.Scope) error { + out.Route = in.Route + out.Input = in.Input + return nil +} + +// Convert_management_LicenseRequestSpec_To_v1_LicenseRequestSpec is an autogenerated conversion function. +func Convert_management_LicenseRequestSpec_To_v1_LicenseRequestSpec(in *management.LicenseRequestSpec, out *LicenseRequestSpec, s conversion.Scope) error { + return autoConvert_management_LicenseRequestSpec_To_v1_LicenseRequestSpec(in, out, s) +} + +func autoConvert_v1_LicenseRequestStatus_To_management_LicenseRequestStatus(in *LicenseRequestStatus, out *management.LicenseRequestStatus, s conversion.Scope) error { + out.OK = in.OK + out.Output = in.Output + return nil +} + +// Convert_v1_LicenseRequestStatus_To_management_LicenseRequestStatus is an autogenerated conversion function. +func Convert_v1_LicenseRequestStatus_To_management_LicenseRequestStatus(in *LicenseRequestStatus, out *management.LicenseRequestStatus, s conversion.Scope) error { + return autoConvert_v1_LicenseRequestStatus_To_management_LicenseRequestStatus(in, out, s) +} + +func autoConvert_management_LicenseRequestStatus_To_v1_LicenseRequestStatus(in *management.LicenseRequestStatus, out *LicenseRequestStatus, s conversion.Scope) error { + out.OK = in.OK + out.Output = in.Output + return nil +} + +// Convert_management_LicenseRequestStatus_To_v1_LicenseRequestStatus is an autogenerated conversion function. +func Convert_management_LicenseRequestStatus_To_v1_LicenseRequestStatus(in *management.LicenseRequestStatus, out *LicenseRequestStatus, s conversion.Scope) error { + return autoConvert_management_LicenseRequestStatus_To_v1_LicenseRequestStatus(in, out, s) +} + +func autoConvert_v1_LicenseSpec_To_management_LicenseSpec(in *LicenseSpec, out *management.LicenseSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1_LicenseSpec_To_management_LicenseSpec is an autogenerated conversion function. +func Convert_v1_LicenseSpec_To_management_LicenseSpec(in *LicenseSpec, out *management.LicenseSpec, s conversion.Scope) error { + return autoConvert_v1_LicenseSpec_To_management_LicenseSpec(in, out, s) +} + +func autoConvert_management_LicenseSpec_To_v1_LicenseSpec(in *management.LicenseSpec, out *LicenseSpec, s conversion.Scope) error { + return nil +} + +// Convert_management_LicenseSpec_To_v1_LicenseSpec is an autogenerated conversion function. +func Convert_management_LicenseSpec_To_v1_LicenseSpec(in *management.LicenseSpec, out *LicenseSpec, s conversion.Scope) error { + return autoConvert_management_LicenseSpec_To_v1_LicenseSpec(in, out, s) +} + +func autoConvert_v1_LicenseStatus_To_management_LicenseStatus(in *LicenseStatus, out *management.LicenseStatus, s conversion.Scope) error { + out.Buttons = *(*server.Buttons)(unsafe.Pointer(&in.Buttons)) + out.License = (*server.License)(unsafe.Pointer(in.License)) + out.InstanceID = in.InstanceID + return nil +} + +// Convert_v1_LicenseStatus_To_management_LicenseStatus is an autogenerated conversion function. +func Convert_v1_LicenseStatus_To_management_LicenseStatus(in *LicenseStatus, out *management.LicenseStatus, s conversion.Scope) error { + return autoConvert_v1_LicenseStatus_To_management_LicenseStatus(in, out, s) +} + +func autoConvert_management_LicenseStatus_To_v1_LicenseStatus(in *management.LicenseStatus, out *LicenseStatus, s conversion.Scope) error { + out.Buttons = *(*server.Buttons)(unsafe.Pointer(&in.Buttons)) + out.License = (*server.License)(unsafe.Pointer(in.License)) + out.InstanceID = in.InstanceID + return nil +} + +// Convert_management_LicenseStatus_To_v1_LicenseStatus is an autogenerated conversion function. +func Convert_management_LicenseStatus_To_v1_LicenseStatus(in *management.LicenseStatus, out *LicenseStatus, s conversion.Scope) error { + return autoConvert_management_LicenseStatus_To_v1_LicenseStatus(in, out, s) +} + +func autoConvert_v1_LicenseToken_To_management_LicenseToken(in *LicenseToken, out *management.LicenseToken, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_LicenseTokenSpec_To_management_LicenseTokenSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_LicenseTokenStatus_To_management_LicenseTokenStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_LicenseToken_To_management_LicenseToken is an autogenerated conversion function. +func Convert_v1_LicenseToken_To_management_LicenseToken(in *LicenseToken, out *management.LicenseToken, s conversion.Scope) error { + return autoConvert_v1_LicenseToken_To_management_LicenseToken(in, out, s) +} + +func autoConvert_management_LicenseToken_To_v1_LicenseToken(in *management.LicenseToken, out *LicenseToken, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_LicenseTokenSpec_To_v1_LicenseTokenSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_LicenseTokenStatus_To_v1_LicenseTokenStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_LicenseToken_To_v1_LicenseToken is an autogenerated conversion function. +func Convert_management_LicenseToken_To_v1_LicenseToken(in *management.LicenseToken, out *LicenseToken, s conversion.Scope) error { + return autoConvert_management_LicenseToken_To_v1_LicenseToken(in, out, s) +} + +func autoConvert_v1_LicenseTokenList_To_management_LicenseTokenList(in *LicenseTokenList, out *management.LicenseTokenList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.LicenseToken)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_LicenseTokenList_To_management_LicenseTokenList is an autogenerated conversion function. +func Convert_v1_LicenseTokenList_To_management_LicenseTokenList(in *LicenseTokenList, out *management.LicenseTokenList, s conversion.Scope) error { + return autoConvert_v1_LicenseTokenList_To_management_LicenseTokenList(in, out, s) +} + +func autoConvert_management_LicenseTokenList_To_v1_LicenseTokenList(in *management.LicenseTokenList, out *LicenseTokenList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]LicenseToken)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_LicenseTokenList_To_v1_LicenseTokenList is an autogenerated conversion function. +func Convert_management_LicenseTokenList_To_v1_LicenseTokenList(in *management.LicenseTokenList, out *LicenseTokenList, s conversion.Scope) error { + return autoConvert_management_LicenseTokenList_To_v1_LicenseTokenList(in, out, s) +} + +func autoConvert_v1_LicenseTokenSpec_To_management_LicenseTokenSpec(in *LicenseTokenSpec, out *management.LicenseTokenSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1_LicenseTokenSpec_To_management_LicenseTokenSpec is an autogenerated conversion function. +func Convert_v1_LicenseTokenSpec_To_management_LicenseTokenSpec(in *LicenseTokenSpec, out *management.LicenseTokenSpec, s conversion.Scope) error { + return autoConvert_v1_LicenseTokenSpec_To_management_LicenseTokenSpec(in, out, s) +} + +func autoConvert_management_LicenseTokenSpec_To_v1_LicenseTokenSpec(in *management.LicenseTokenSpec, out *LicenseTokenSpec, s conversion.Scope) error { + return nil +} + +// Convert_management_LicenseTokenSpec_To_v1_LicenseTokenSpec is an autogenerated conversion function. +func Convert_management_LicenseTokenSpec_To_v1_LicenseTokenSpec(in *management.LicenseTokenSpec, out *LicenseTokenSpec, s conversion.Scope) error { + return autoConvert_management_LicenseTokenSpec_To_v1_LicenseTokenSpec(in, out, s) +} + +func autoConvert_v1_LicenseTokenStatus_To_management_LicenseTokenStatus(in *LicenseTokenStatus, out *management.LicenseTokenStatus, s conversion.Scope) error { + out.Token = (*server.InstanceTokenAuth)(unsafe.Pointer(in.Token)) + return nil +} + +// Convert_v1_LicenseTokenStatus_To_management_LicenseTokenStatus is an autogenerated conversion function. +func Convert_v1_LicenseTokenStatus_To_management_LicenseTokenStatus(in *LicenseTokenStatus, out *management.LicenseTokenStatus, s conversion.Scope) error { + return autoConvert_v1_LicenseTokenStatus_To_management_LicenseTokenStatus(in, out, s) +} + +func autoConvert_management_LicenseTokenStatus_To_v1_LicenseTokenStatus(in *management.LicenseTokenStatus, out *LicenseTokenStatus, s conversion.Scope) error { + out.Token = (*server.InstanceTokenAuth)(unsafe.Pointer(in.Token)) + return nil +} + +// Convert_management_LicenseTokenStatus_To_v1_LicenseTokenStatus is an autogenerated conversion function. +func Convert_management_LicenseTokenStatus_To_v1_LicenseTokenStatus(in *management.LicenseTokenStatus, out *LicenseTokenStatus, s conversion.Scope) error { + return autoConvert_management_LicenseTokenStatus_To_v1_LicenseTokenStatus(in, out, s) +} + +func autoConvert_v1_LoftUpgrade_To_management_LoftUpgrade(in *LoftUpgrade, out *management.LoftUpgrade, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_LoftUpgradeSpec_To_management_LoftUpgradeSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_LoftUpgradeStatus_To_management_LoftUpgradeStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_LoftUpgrade_To_management_LoftUpgrade is an autogenerated conversion function. +func Convert_v1_LoftUpgrade_To_management_LoftUpgrade(in *LoftUpgrade, out *management.LoftUpgrade, s conversion.Scope) error { + return autoConvert_v1_LoftUpgrade_To_management_LoftUpgrade(in, out, s) +} + +func autoConvert_management_LoftUpgrade_To_v1_LoftUpgrade(in *management.LoftUpgrade, out *LoftUpgrade, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_LoftUpgradeSpec_To_v1_LoftUpgradeSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_LoftUpgradeStatus_To_v1_LoftUpgradeStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_LoftUpgrade_To_v1_LoftUpgrade is an autogenerated conversion function. +func Convert_management_LoftUpgrade_To_v1_LoftUpgrade(in *management.LoftUpgrade, out *LoftUpgrade, s conversion.Scope) error { + return autoConvert_management_LoftUpgrade_To_v1_LoftUpgrade(in, out, s) +} + +func autoConvert_v1_LoftUpgradeList_To_management_LoftUpgradeList(in *LoftUpgradeList, out *management.LoftUpgradeList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.LoftUpgrade)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_LoftUpgradeList_To_management_LoftUpgradeList is an autogenerated conversion function. +func Convert_v1_LoftUpgradeList_To_management_LoftUpgradeList(in *LoftUpgradeList, out *management.LoftUpgradeList, s conversion.Scope) error { + return autoConvert_v1_LoftUpgradeList_To_management_LoftUpgradeList(in, out, s) +} + +func autoConvert_management_LoftUpgradeList_To_v1_LoftUpgradeList(in *management.LoftUpgradeList, out *LoftUpgradeList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]LoftUpgrade)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_LoftUpgradeList_To_v1_LoftUpgradeList is an autogenerated conversion function. +func Convert_management_LoftUpgradeList_To_v1_LoftUpgradeList(in *management.LoftUpgradeList, out *LoftUpgradeList, s conversion.Scope) error { + return autoConvert_management_LoftUpgradeList_To_v1_LoftUpgradeList(in, out, s) +} + +func autoConvert_v1_LoftUpgradeSpec_To_management_LoftUpgradeSpec(in *LoftUpgradeSpec, out *management.LoftUpgradeSpec, s conversion.Scope) error { + out.Namespace = in.Namespace + out.Release = in.Release + out.Version = in.Version + return nil +} + +// Convert_v1_LoftUpgradeSpec_To_management_LoftUpgradeSpec is an autogenerated conversion function. +func Convert_v1_LoftUpgradeSpec_To_management_LoftUpgradeSpec(in *LoftUpgradeSpec, out *management.LoftUpgradeSpec, s conversion.Scope) error { + return autoConvert_v1_LoftUpgradeSpec_To_management_LoftUpgradeSpec(in, out, s) +} + +func autoConvert_management_LoftUpgradeSpec_To_v1_LoftUpgradeSpec(in *management.LoftUpgradeSpec, out *LoftUpgradeSpec, s conversion.Scope) error { + out.Namespace = in.Namespace + out.Release = in.Release + out.Version = in.Version + return nil +} + +// Convert_management_LoftUpgradeSpec_To_v1_LoftUpgradeSpec is an autogenerated conversion function. +func Convert_management_LoftUpgradeSpec_To_v1_LoftUpgradeSpec(in *management.LoftUpgradeSpec, out *LoftUpgradeSpec, s conversion.Scope) error { + return autoConvert_management_LoftUpgradeSpec_To_v1_LoftUpgradeSpec(in, out, s) +} + +func autoConvert_v1_LoftUpgradeStatus_To_management_LoftUpgradeStatus(in *LoftUpgradeStatus, out *management.LoftUpgradeStatus, s conversion.Scope) error { + return nil +} + +// Convert_v1_LoftUpgradeStatus_To_management_LoftUpgradeStatus is an autogenerated conversion function. +func Convert_v1_LoftUpgradeStatus_To_management_LoftUpgradeStatus(in *LoftUpgradeStatus, out *management.LoftUpgradeStatus, s conversion.Scope) error { + return autoConvert_v1_LoftUpgradeStatus_To_management_LoftUpgradeStatus(in, out, s) +} + +func autoConvert_management_LoftUpgradeStatus_To_v1_LoftUpgradeStatus(in *management.LoftUpgradeStatus, out *LoftUpgradeStatus, s conversion.Scope) error { + return nil +} + +// Convert_management_LoftUpgradeStatus_To_v1_LoftUpgradeStatus is an autogenerated conversion function. +func Convert_management_LoftUpgradeStatus_To_v1_LoftUpgradeStatus(in *management.LoftUpgradeStatus, out *LoftUpgradeStatus, s conversion.Scope) error { + return autoConvert_management_LoftUpgradeStatus_To_v1_LoftUpgradeStatus(in, out, s) +} + +func autoConvert_v1_OIDC_To_management_OIDC(in *OIDC, out *management.OIDC, s conversion.Scope) error { + out.Enabled = in.Enabled + out.WildcardRedirect = in.WildcardRedirect + out.Clients = *(*[]management.OIDCClient)(unsafe.Pointer(&in.Clients)) + return nil +} + +// Convert_v1_OIDC_To_management_OIDC is an autogenerated conversion function. +func Convert_v1_OIDC_To_management_OIDC(in *OIDC, out *management.OIDC, s conversion.Scope) error { + return autoConvert_v1_OIDC_To_management_OIDC(in, out, s) +} + +func autoConvert_management_OIDC_To_v1_OIDC(in *management.OIDC, out *OIDC, s conversion.Scope) error { + out.Enabled = in.Enabled + out.WildcardRedirect = in.WildcardRedirect + out.Clients = *(*[]OIDCClient)(unsafe.Pointer(&in.Clients)) + return nil +} + +// Convert_management_OIDC_To_v1_OIDC is an autogenerated conversion function. +func Convert_management_OIDC_To_v1_OIDC(in *management.OIDC, out *OIDC, s conversion.Scope) error { + return autoConvert_management_OIDC_To_v1_OIDC(in, out, s) +} + +func autoConvert_v1_OIDCClient_To_management_OIDCClient(in *OIDCClient, out *management.OIDCClient, s conversion.Scope) error { + out.Name = in.Name + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURIs = *(*[]string)(unsafe.Pointer(&in.RedirectURIs)) + return nil +} + +// Convert_v1_OIDCClient_To_management_OIDCClient is an autogenerated conversion function. +func Convert_v1_OIDCClient_To_management_OIDCClient(in *OIDCClient, out *management.OIDCClient, s conversion.Scope) error { + return autoConvert_v1_OIDCClient_To_management_OIDCClient(in, out, s) +} + +func autoConvert_management_OIDCClient_To_v1_OIDCClient(in *management.OIDCClient, out *OIDCClient, s conversion.Scope) error { + out.Name = in.Name + out.ClientID = in.ClientID + out.ClientSecret = in.ClientSecret + out.RedirectURIs = *(*[]string)(unsafe.Pointer(&in.RedirectURIs)) + return nil +} + +// Convert_management_OIDCClient_To_v1_OIDCClient is an autogenerated conversion function. +func Convert_management_OIDCClient_To_v1_OIDCClient(in *management.OIDCClient, out *OIDCClient, s conversion.Scope) error { + return autoConvert_management_OIDCClient_To_v1_OIDCClient(in, out, s) +} + +func autoConvert_v1_OwnedAccessKey_To_management_OwnedAccessKey(in *OwnedAccessKey, out *management.OwnedAccessKey, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_OwnedAccessKeySpec_To_management_OwnedAccessKeySpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_OwnedAccessKeyStatus_To_management_OwnedAccessKeyStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_OwnedAccessKey_To_management_OwnedAccessKey is an autogenerated conversion function. +func Convert_v1_OwnedAccessKey_To_management_OwnedAccessKey(in *OwnedAccessKey, out *management.OwnedAccessKey, s conversion.Scope) error { + return autoConvert_v1_OwnedAccessKey_To_management_OwnedAccessKey(in, out, s) +} + +func autoConvert_management_OwnedAccessKey_To_v1_OwnedAccessKey(in *management.OwnedAccessKey, out *OwnedAccessKey, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_OwnedAccessKeySpec_To_v1_OwnedAccessKeySpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_OwnedAccessKeyStatus_To_v1_OwnedAccessKeyStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_OwnedAccessKey_To_v1_OwnedAccessKey is an autogenerated conversion function. +func Convert_management_OwnedAccessKey_To_v1_OwnedAccessKey(in *management.OwnedAccessKey, out *OwnedAccessKey, s conversion.Scope) error { + return autoConvert_management_OwnedAccessKey_To_v1_OwnedAccessKey(in, out, s) +} + +func autoConvert_v1_OwnedAccessKeyList_To_management_OwnedAccessKeyList(in *OwnedAccessKeyList, out *management.OwnedAccessKeyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.OwnedAccessKey)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_OwnedAccessKeyList_To_management_OwnedAccessKeyList is an autogenerated conversion function. +func Convert_v1_OwnedAccessKeyList_To_management_OwnedAccessKeyList(in *OwnedAccessKeyList, out *management.OwnedAccessKeyList, s conversion.Scope) error { + return autoConvert_v1_OwnedAccessKeyList_To_management_OwnedAccessKeyList(in, out, s) +} + +func autoConvert_management_OwnedAccessKeyList_To_v1_OwnedAccessKeyList(in *management.OwnedAccessKeyList, out *OwnedAccessKeyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OwnedAccessKey)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_OwnedAccessKeyList_To_v1_OwnedAccessKeyList is an autogenerated conversion function. +func Convert_management_OwnedAccessKeyList_To_v1_OwnedAccessKeyList(in *management.OwnedAccessKeyList, out *OwnedAccessKeyList, s conversion.Scope) error { + return autoConvert_management_OwnedAccessKeyList_To_v1_OwnedAccessKeyList(in, out, s) +} + +func autoConvert_v1_OwnedAccessKeySpec_To_management_OwnedAccessKeySpec(in *OwnedAccessKeySpec, out *management.OwnedAccessKeySpec, s conversion.Scope) error { + out.AccessKeySpec = in.AccessKeySpec + return nil +} + +// Convert_v1_OwnedAccessKeySpec_To_management_OwnedAccessKeySpec is an autogenerated conversion function. +func Convert_v1_OwnedAccessKeySpec_To_management_OwnedAccessKeySpec(in *OwnedAccessKeySpec, out *management.OwnedAccessKeySpec, s conversion.Scope) error { + return autoConvert_v1_OwnedAccessKeySpec_To_management_OwnedAccessKeySpec(in, out, s) +} + +func autoConvert_management_OwnedAccessKeySpec_To_v1_OwnedAccessKeySpec(in *management.OwnedAccessKeySpec, out *OwnedAccessKeySpec, s conversion.Scope) error { + out.AccessKeySpec = in.AccessKeySpec + return nil +} + +// Convert_management_OwnedAccessKeySpec_To_v1_OwnedAccessKeySpec is an autogenerated conversion function. +func Convert_management_OwnedAccessKeySpec_To_v1_OwnedAccessKeySpec(in *management.OwnedAccessKeySpec, out *OwnedAccessKeySpec, s conversion.Scope) error { + return autoConvert_management_OwnedAccessKeySpec_To_v1_OwnedAccessKeySpec(in, out, s) +} + +func autoConvert_v1_OwnedAccessKeyStatus_To_management_OwnedAccessKeyStatus(in *OwnedAccessKeyStatus, out *management.OwnedAccessKeyStatus, s conversion.Scope) error { + out.AccessKeyStatus = in.AccessKeyStatus + return nil +} + +// Convert_v1_OwnedAccessKeyStatus_To_management_OwnedAccessKeyStatus is an autogenerated conversion function. +func Convert_v1_OwnedAccessKeyStatus_To_management_OwnedAccessKeyStatus(in *OwnedAccessKeyStatus, out *management.OwnedAccessKeyStatus, s conversion.Scope) error { + return autoConvert_v1_OwnedAccessKeyStatus_To_management_OwnedAccessKeyStatus(in, out, s) +} + +func autoConvert_management_OwnedAccessKeyStatus_To_v1_OwnedAccessKeyStatus(in *management.OwnedAccessKeyStatus, out *OwnedAccessKeyStatus, s conversion.Scope) error { + out.AccessKeyStatus = in.AccessKeyStatus + return nil +} + +// Convert_management_OwnedAccessKeyStatus_To_v1_OwnedAccessKeyStatus is an autogenerated conversion function. +func Convert_management_OwnedAccessKeyStatus_To_v1_OwnedAccessKeyStatus(in *management.OwnedAccessKeyStatus, out *OwnedAccessKeyStatus, s conversion.Scope) error { + return autoConvert_management_OwnedAccessKeyStatus_To_v1_OwnedAccessKeyStatus(in, out, s) +} + +func autoConvert_v1_PolicyViolation_To_management_PolicyViolation(in *PolicyViolation, out *management.PolicyViolation, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_PolicyViolationSpec_To_management_PolicyViolationSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_PolicyViolationStatus_To_management_PolicyViolationStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_PolicyViolation_To_management_PolicyViolation is an autogenerated conversion function. +func Convert_v1_PolicyViolation_To_management_PolicyViolation(in *PolicyViolation, out *management.PolicyViolation, s conversion.Scope) error { + return autoConvert_v1_PolicyViolation_To_management_PolicyViolation(in, out, s) +} + +func autoConvert_management_PolicyViolation_To_v1_PolicyViolation(in *management.PolicyViolation, out *PolicyViolation, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_PolicyViolationSpec_To_v1_PolicyViolationSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_PolicyViolationStatus_To_v1_PolicyViolationStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_PolicyViolation_To_v1_PolicyViolation is an autogenerated conversion function. +func Convert_management_PolicyViolation_To_v1_PolicyViolation(in *management.PolicyViolation, out *PolicyViolation, s conversion.Scope) error { + return autoConvert_management_PolicyViolation_To_v1_PolicyViolation(in, out, s) +} + +func autoConvert_v1_PolicyViolationList_To_management_PolicyViolationList(in *PolicyViolationList, out *management.PolicyViolationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.PolicyViolation)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_PolicyViolationList_To_management_PolicyViolationList is an autogenerated conversion function. +func Convert_v1_PolicyViolationList_To_management_PolicyViolationList(in *PolicyViolationList, out *management.PolicyViolationList, s conversion.Scope) error { + return autoConvert_v1_PolicyViolationList_To_management_PolicyViolationList(in, out, s) +} + +func autoConvert_management_PolicyViolationList_To_v1_PolicyViolationList(in *management.PolicyViolationList, out *PolicyViolationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]PolicyViolation)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_PolicyViolationList_To_v1_PolicyViolationList is an autogenerated conversion function. +func Convert_management_PolicyViolationList_To_v1_PolicyViolationList(in *management.PolicyViolationList, out *PolicyViolationList, s conversion.Scope) error { + return autoConvert_management_PolicyViolationList_To_v1_PolicyViolationList(in, out, s) +} + +func autoConvert_v1_PolicyViolationSpec_To_management_PolicyViolationSpec(in *PolicyViolationSpec, out *management.PolicyViolationSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1_PolicyViolationSpec_To_management_PolicyViolationSpec is an autogenerated conversion function. +func Convert_v1_PolicyViolationSpec_To_management_PolicyViolationSpec(in *PolicyViolationSpec, out *management.PolicyViolationSpec, s conversion.Scope) error { + return autoConvert_v1_PolicyViolationSpec_To_management_PolicyViolationSpec(in, out, s) +} + +func autoConvert_management_PolicyViolationSpec_To_v1_PolicyViolationSpec(in *management.PolicyViolationSpec, out *PolicyViolationSpec, s conversion.Scope) error { + return nil +} + +// Convert_management_PolicyViolationSpec_To_v1_PolicyViolationSpec is an autogenerated conversion function. +func Convert_management_PolicyViolationSpec_To_v1_PolicyViolationSpec(in *management.PolicyViolationSpec, out *PolicyViolationSpec, s conversion.Scope) error { + return autoConvert_management_PolicyViolationSpec_To_v1_PolicyViolationSpec(in, out, s) +} + +func autoConvert_v1_PolicyViolationStatus_To_management_PolicyViolationStatus(in *PolicyViolationStatus, out *management.PolicyViolationStatus, s conversion.Scope) error { + out.Policy = in.Policy + out.Cluster = in.Cluster + out.User = (*clusterv1.EntityInfo)(unsafe.Pointer(in.User)) + out.Violation = in.Violation + return nil +} + +// Convert_v1_PolicyViolationStatus_To_management_PolicyViolationStatus is an autogenerated conversion function. +func Convert_v1_PolicyViolationStatus_To_management_PolicyViolationStatus(in *PolicyViolationStatus, out *management.PolicyViolationStatus, s conversion.Scope) error { + return autoConvert_v1_PolicyViolationStatus_To_management_PolicyViolationStatus(in, out, s) +} + +func autoConvert_management_PolicyViolationStatus_To_v1_PolicyViolationStatus(in *management.PolicyViolationStatus, out *PolicyViolationStatus, s conversion.Scope) error { + out.Policy = in.Policy + out.Cluster = in.Cluster + out.User = (*clusterv1.EntityInfo)(unsafe.Pointer(in.User)) + out.Violation = in.Violation + return nil +} + +// Convert_management_PolicyViolationStatus_To_v1_PolicyViolationStatus is an autogenerated conversion function. +func Convert_management_PolicyViolationStatus_To_v1_PolicyViolationStatus(in *management.PolicyViolationStatus, out *PolicyViolationStatus, s conversion.Scope) error { + return autoConvert_management_PolicyViolationStatus_To_v1_PolicyViolationStatus(in, out, s) +} + +func autoConvert_v1_PredefinedApp_To_management_PredefinedApp(in *PredefinedApp, out *management.PredefinedApp, s conversion.Scope) error { + out.Chart = in.Chart + out.InitialVersion = in.InitialVersion + out.InitialValues = in.InitialValues + out.Clusters = *(*[]string)(unsafe.Pointer(&in.Clusters)) + out.Title = in.Title + out.IconURL = in.IconURL + out.ReadmeURL = in.ReadmeURL + return nil +} + +// Convert_v1_PredefinedApp_To_management_PredefinedApp is an autogenerated conversion function. +func Convert_v1_PredefinedApp_To_management_PredefinedApp(in *PredefinedApp, out *management.PredefinedApp, s conversion.Scope) error { + return autoConvert_v1_PredefinedApp_To_management_PredefinedApp(in, out, s) +} + +func autoConvert_management_PredefinedApp_To_v1_PredefinedApp(in *management.PredefinedApp, out *PredefinedApp, s conversion.Scope) error { + out.Chart = in.Chart + out.InitialVersion = in.InitialVersion + out.InitialValues = in.InitialValues + out.Clusters = *(*[]string)(unsafe.Pointer(&in.Clusters)) + out.Title = in.Title + out.IconURL = in.IconURL + out.ReadmeURL = in.ReadmeURL + return nil +} + +// Convert_management_PredefinedApp_To_v1_PredefinedApp is an autogenerated conversion function. +func Convert_management_PredefinedApp_To_v1_PredefinedApp(in *management.PredefinedApp, out *PredefinedApp, s conversion.Scope) error { + return autoConvert_management_PredefinedApp_To_v1_PredefinedApp(in, out, s) +} + +func autoConvert_v1_Project_To_management_Project(in *Project, out *management.Project, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ProjectSpec_To_management_ProjectSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ProjectStatus_To_management_ProjectStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Project_To_management_Project is an autogenerated conversion function. +func Convert_v1_Project_To_management_Project(in *Project, out *management.Project, s conversion.Scope) error { + return autoConvert_v1_Project_To_management_Project(in, out, s) +} + +func autoConvert_management_Project_To_v1_Project(in *management.Project, out *Project, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ProjectSpec_To_v1_ProjectSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_ProjectStatus_To_v1_ProjectStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Project_To_v1_Project is an autogenerated conversion function. +func Convert_management_Project_To_v1_Project(in *management.Project, out *Project, s conversion.Scope) error { + return autoConvert_management_Project_To_v1_Project(in, out, s) +} + +func autoConvert_v1_ProjectChartInfo_To_management_ProjectChartInfo(in *ProjectChartInfo, out *management.ProjectChartInfo, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ProjectChartInfoSpec_To_management_ProjectChartInfoSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ProjectChartInfoStatus_To_management_ProjectChartInfoStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ProjectChartInfo_To_management_ProjectChartInfo is an autogenerated conversion function. +func Convert_v1_ProjectChartInfo_To_management_ProjectChartInfo(in *ProjectChartInfo, out *management.ProjectChartInfo, s conversion.Scope) error { + return autoConvert_v1_ProjectChartInfo_To_management_ProjectChartInfo(in, out, s) +} + +func autoConvert_management_ProjectChartInfo_To_v1_ProjectChartInfo(in *management.ProjectChartInfo, out *ProjectChartInfo, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ProjectChartInfoSpec_To_v1_ProjectChartInfoSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_ProjectChartInfoStatus_To_v1_ProjectChartInfoStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_ProjectChartInfo_To_v1_ProjectChartInfo is an autogenerated conversion function. +func Convert_management_ProjectChartInfo_To_v1_ProjectChartInfo(in *management.ProjectChartInfo, out *ProjectChartInfo, s conversion.Scope) error { + return autoConvert_management_ProjectChartInfo_To_v1_ProjectChartInfo(in, out, s) +} + +func autoConvert_v1_ProjectChartInfoList_To_management_ProjectChartInfoList(in *ProjectChartInfoList, out *management.ProjectChartInfoList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectChartInfo)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectChartInfoList_To_management_ProjectChartInfoList is an autogenerated conversion function. +func Convert_v1_ProjectChartInfoList_To_management_ProjectChartInfoList(in *ProjectChartInfoList, out *management.ProjectChartInfoList, s conversion.Scope) error { + return autoConvert_v1_ProjectChartInfoList_To_management_ProjectChartInfoList(in, out, s) +} + +func autoConvert_management_ProjectChartInfoList_To_v1_ProjectChartInfoList(in *management.ProjectChartInfoList, out *ProjectChartInfoList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectChartInfo)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectChartInfoList_To_v1_ProjectChartInfoList is an autogenerated conversion function. +func Convert_management_ProjectChartInfoList_To_v1_ProjectChartInfoList(in *management.ProjectChartInfoList, out *ProjectChartInfoList, s conversion.Scope) error { + return autoConvert_management_ProjectChartInfoList_To_v1_ProjectChartInfoList(in, out, s) +} + +func autoConvert_v1_ProjectChartInfoSpec_To_management_ProjectChartInfoSpec(in *ProjectChartInfoSpec, out *management.ProjectChartInfoSpec, s conversion.Scope) error { + out.ChartInfoSpec = in.ChartInfoSpec + return nil +} + +// Convert_v1_ProjectChartInfoSpec_To_management_ProjectChartInfoSpec is an autogenerated conversion function. +func Convert_v1_ProjectChartInfoSpec_To_management_ProjectChartInfoSpec(in *ProjectChartInfoSpec, out *management.ProjectChartInfoSpec, s conversion.Scope) error { + return autoConvert_v1_ProjectChartInfoSpec_To_management_ProjectChartInfoSpec(in, out, s) +} + +func autoConvert_management_ProjectChartInfoSpec_To_v1_ProjectChartInfoSpec(in *management.ProjectChartInfoSpec, out *ProjectChartInfoSpec, s conversion.Scope) error { + out.ChartInfoSpec = in.ChartInfoSpec + return nil +} + +// Convert_management_ProjectChartInfoSpec_To_v1_ProjectChartInfoSpec is an autogenerated conversion function. +func Convert_management_ProjectChartInfoSpec_To_v1_ProjectChartInfoSpec(in *management.ProjectChartInfoSpec, out *ProjectChartInfoSpec, s conversion.Scope) error { + return autoConvert_management_ProjectChartInfoSpec_To_v1_ProjectChartInfoSpec(in, out, s) +} + +func autoConvert_v1_ProjectChartInfoStatus_To_management_ProjectChartInfoStatus(in *ProjectChartInfoStatus, out *management.ProjectChartInfoStatus, s conversion.Scope) error { + out.ChartInfoStatus = in.ChartInfoStatus + return nil +} + +// Convert_v1_ProjectChartInfoStatus_To_management_ProjectChartInfoStatus is an autogenerated conversion function. +func Convert_v1_ProjectChartInfoStatus_To_management_ProjectChartInfoStatus(in *ProjectChartInfoStatus, out *management.ProjectChartInfoStatus, s conversion.Scope) error { + return autoConvert_v1_ProjectChartInfoStatus_To_management_ProjectChartInfoStatus(in, out, s) +} + +func autoConvert_management_ProjectChartInfoStatus_To_v1_ProjectChartInfoStatus(in *management.ProjectChartInfoStatus, out *ProjectChartInfoStatus, s conversion.Scope) error { + out.ChartInfoStatus = in.ChartInfoStatus + return nil +} + +// Convert_management_ProjectChartInfoStatus_To_v1_ProjectChartInfoStatus is an autogenerated conversion function. +func Convert_management_ProjectChartInfoStatus_To_v1_ProjectChartInfoStatus(in *management.ProjectChartInfoStatus, out *ProjectChartInfoStatus, s conversion.Scope) error { + return autoConvert_management_ProjectChartInfoStatus_To_v1_ProjectChartInfoStatus(in, out, s) +} + +func autoConvert_v1_ProjectCharts_To_management_ProjectCharts(in *ProjectCharts, out *management.ProjectCharts, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Charts = *(*[]storagev1.HelmChart)(unsafe.Pointer(&in.Charts)) + out.Busy = in.Busy + return nil +} + +// Convert_v1_ProjectCharts_To_management_ProjectCharts is an autogenerated conversion function. +func Convert_v1_ProjectCharts_To_management_ProjectCharts(in *ProjectCharts, out *management.ProjectCharts, s conversion.Scope) error { + return autoConvert_v1_ProjectCharts_To_management_ProjectCharts(in, out, s) +} + +func autoConvert_management_ProjectCharts_To_v1_ProjectCharts(in *management.ProjectCharts, out *ProjectCharts, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Charts = *(*[]storagev1.HelmChart)(unsafe.Pointer(&in.Charts)) + out.Busy = in.Busy + return nil +} + +// Convert_management_ProjectCharts_To_v1_ProjectCharts is an autogenerated conversion function. +func Convert_management_ProjectCharts_To_v1_ProjectCharts(in *management.ProjectCharts, out *ProjectCharts, s conversion.Scope) error { + return autoConvert_management_ProjectCharts_To_v1_ProjectCharts(in, out, s) +} + +func autoConvert_v1_ProjectChartsList_To_management_ProjectChartsList(in *ProjectChartsList, out *management.ProjectChartsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectCharts)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectChartsList_To_management_ProjectChartsList is an autogenerated conversion function. +func Convert_v1_ProjectChartsList_To_management_ProjectChartsList(in *ProjectChartsList, out *management.ProjectChartsList, s conversion.Scope) error { + return autoConvert_v1_ProjectChartsList_To_management_ProjectChartsList(in, out, s) +} + +func autoConvert_management_ProjectChartsList_To_v1_ProjectChartsList(in *management.ProjectChartsList, out *ProjectChartsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectCharts)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectChartsList_To_v1_ProjectChartsList is an autogenerated conversion function. +func Convert_management_ProjectChartsList_To_v1_ProjectChartsList(in *management.ProjectChartsList, out *ProjectChartsList, s conversion.Scope) error { + return autoConvert_management_ProjectChartsList_To_v1_ProjectChartsList(in, out, s) +} + +func autoConvert_v1_ProjectClusters_To_management_ProjectClusters(in *ProjectClusters, out *management.ProjectClusters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Clusters = *(*[]management.Cluster)(unsafe.Pointer(&in.Clusters)) + out.Runners = *(*[]management.Runner)(unsafe.Pointer(&in.Runners)) + return nil +} + +// Convert_v1_ProjectClusters_To_management_ProjectClusters is an autogenerated conversion function. +func Convert_v1_ProjectClusters_To_management_ProjectClusters(in *ProjectClusters, out *management.ProjectClusters, s conversion.Scope) error { + return autoConvert_v1_ProjectClusters_To_management_ProjectClusters(in, out, s) +} + +func autoConvert_management_ProjectClusters_To_v1_ProjectClusters(in *management.ProjectClusters, out *ProjectClusters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Clusters = *(*[]Cluster)(unsafe.Pointer(&in.Clusters)) + out.Runners = *(*[]Runner)(unsafe.Pointer(&in.Runners)) + return nil +} + +// Convert_management_ProjectClusters_To_v1_ProjectClusters is an autogenerated conversion function. +func Convert_management_ProjectClusters_To_v1_ProjectClusters(in *management.ProjectClusters, out *ProjectClusters, s conversion.Scope) error { + return autoConvert_management_ProjectClusters_To_v1_ProjectClusters(in, out, s) +} + +func autoConvert_v1_ProjectClustersList_To_management_ProjectClustersList(in *ProjectClustersList, out *management.ProjectClustersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectClusters)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectClustersList_To_management_ProjectClustersList is an autogenerated conversion function. +func Convert_v1_ProjectClustersList_To_management_ProjectClustersList(in *ProjectClustersList, out *management.ProjectClustersList, s conversion.Scope) error { + return autoConvert_v1_ProjectClustersList_To_management_ProjectClustersList(in, out, s) +} + +func autoConvert_management_ProjectClustersList_To_v1_ProjectClustersList(in *management.ProjectClustersList, out *ProjectClustersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectClusters)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectClustersList_To_v1_ProjectClustersList is an autogenerated conversion function. +func Convert_management_ProjectClustersList_To_v1_ProjectClustersList(in *management.ProjectClustersList, out *ProjectClustersList, s conversion.Scope) error { + return autoConvert_management_ProjectClustersList_To_v1_ProjectClustersList(in, out, s) +} + +func autoConvert_v1_ProjectImportSpace_To_management_ProjectImportSpace(in *ProjectImportSpace, out *management.ProjectImportSpace, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ProjectImportSpaceSource_To_management_ProjectImportSpaceSource(&in.SourceSpace, &out.SourceSpace, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ProjectImportSpace_To_management_ProjectImportSpace is an autogenerated conversion function. +func Convert_v1_ProjectImportSpace_To_management_ProjectImportSpace(in *ProjectImportSpace, out *management.ProjectImportSpace, s conversion.Scope) error { + return autoConvert_v1_ProjectImportSpace_To_management_ProjectImportSpace(in, out, s) +} + +func autoConvert_management_ProjectImportSpace_To_v1_ProjectImportSpace(in *management.ProjectImportSpace, out *ProjectImportSpace, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ProjectImportSpaceSource_To_v1_ProjectImportSpaceSource(&in.SourceSpace, &out.SourceSpace, s); err != nil { + return err + } + return nil +} + +// Convert_management_ProjectImportSpace_To_v1_ProjectImportSpace is an autogenerated conversion function. +func Convert_management_ProjectImportSpace_To_v1_ProjectImportSpace(in *management.ProjectImportSpace, out *ProjectImportSpace, s conversion.Scope) error { + return autoConvert_management_ProjectImportSpace_To_v1_ProjectImportSpace(in, out, s) +} + +func autoConvert_v1_ProjectImportSpaceList_To_management_ProjectImportSpaceList(in *ProjectImportSpaceList, out *management.ProjectImportSpaceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectImportSpace)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectImportSpaceList_To_management_ProjectImportSpaceList is an autogenerated conversion function. +func Convert_v1_ProjectImportSpaceList_To_management_ProjectImportSpaceList(in *ProjectImportSpaceList, out *management.ProjectImportSpaceList, s conversion.Scope) error { + return autoConvert_v1_ProjectImportSpaceList_To_management_ProjectImportSpaceList(in, out, s) +} + +func autoConvert_management_ProjectImportSpaceList_To_v1_ProjectImportSpaceList(in *management.ProjectImportSpaceList, out *ProjectImportSpaceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectImportSpace)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectImportSpaceList_To_v1_ProjectImportSpaceList is an autogenerated conversion function. +func Convert_management_ProjectImportSpaceList_To_v1_ProjectImportSpaceList(in *management.ProjectImportSpaceList, out *ProjectImportSpaceList, s conversion.Scope) error { + return autoConvert_management_ProjectImportSpaceList_To_v1_ProjectImportSpaceList(in, out, s) +} + +func autoConvert_v1_ProjectImportSpaceSource_To_management_ProjectImportSpaceSource(in *ProjectImportSpaceSource, out *management.ProjectImportSpaceSource, s conversion.Scope) error { + out.Name = in.Name + out.Cluster = in.Cluster + out.ImportName = in.ImportName + return nil +} + +// Convert_v1_ProjectImportSpaceSource_To_management_ProjectImportSpaceSource is an autogenerated conversion function. +func Convert_v1_ProjectImportSpaceSource_To_management_ProjectImportSpaceSource(in *ProjectImportSpaceSource, out *management.ProjectImportSpaceSource, s conversion.Scope) error { + return autoConvert_v1_ProjectImportSpaceSource_To_management_ProjectImportSpaceSource(in, out, s) +} + +func autoConvert_management_ProjectImportSpaceSource_To_v1_ProjectImportSpaceSource(in *management.ProjectImportSpaceSource, out *ProjectImportSpaceSource, s conversion.Scope) error { + out.Name = in.Name + out.Cluster = in.Cluster + out.ImportName = in.ImportName + return nil +} + +// Convert_management_ProjectImportSpaceSource_To_v1_ProjectImportSpaceSource is an autogenerated conversion function. +func Convert_management_ProjectImportSpaceSource_To_v1_ProjectImportSpaceSource(in *management.ProjectImportSpaceSource, out *ProjectImportSpaceSource, s conversion.Scope) error { + return autoConvert_management_ProjectImportSpaceSource_To_v1_ProjectImportSpaceSource(in, out, s) +} + +func autoConvert_v1_ProjectImportVirtualCluster_To_management_ProjectImportVirtualCluster(in *ProjectImportVirtualCluster, out *management.ProjectImportVirtualCluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ProjectImportVirtualClusterSource_To_management_ProjectImportVirtualClusterSource(&in.SourceVirtualCluster, &out.SourceVirtualCluster, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ProjectImportVirtualCluster_To_management_ProjectImportVirtualCluster is an autogenerated conversion function. +func Convert_v1_ProjectImportVirtualCluster_To_management_ProjectImportVirtualCluster(in *ProjectImportVirtualCluster, out *management.ProjectImportVirtualCluster, s conversion.Scope) error { + return autoConvert_v1_ProjectImportVirtualCluster_To_management_ProjectImportVirtualCluster(in, out, s) +} + +func autoConvert_management_ProjectImportVirtualCluster_To_v1_ProjectImportVirtualCluster(in *management.ProjectImportVirtualCluster, out *ProjectImportVirtualCluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ProjectImportVirtualClusterSource_To_v1_ProjectImportVirtualClusterSource(&in.SourceVirtualCluster, &out.SourceVirtualCluster, s); err != nil { + return err + } + return nil +} + +// Convert_management_ProjectImportVirtualCluster_To_v1_ProjectImportVirtualCluster is an autogenerated conversion function. +func Convert_management_ProjectImportVirtualCluster_To_v1_ProjectImportVirtualCluster(in *management.ProjectImportVirtualCluster, out *ProjectImportVirtualCluster, s conversion.Scope) error { + return autoConvert_management_ProjectImportVirtualCluster_To_v1_ProjectImportVirtualCluster(in, out, s) +} + +func autoConvert_v1_ProjectImportVirtualClusterList_To_management_ProjectImportVirtualClusterList(in *ProjectImportVirtualClusterList, out *management.ProjectImportVirtualClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectImportVirtualCluster)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectImportVirtualClusterList_To_management_ProjectImportVirtualClusterList is an autogenerated conversion function. +func Convert_v1_ProjectImportVirtualClusterList_To_management_ProjectImportVirtualClusterList(in *ProjectImportVirtualClusterList, out *management.ProjectImportVirtualClusterList, s conversion.Scope) error { + return autoConvert_v1_ProjectImportVirtualClusterList_To_management_ProjectImportVirtualClusterList(in, out, s) +} + +func autoConvert_management_ProjectImportVirtualClusterList_To_v1_ProjectImportVirtualClusterList(in *management.ProjectImportVirtualClusterList, out *ProjectImportVirtualClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectImportVirtualCluster)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectImportVirtualClusterList_To_v1_ProjectImportVirtualClusterList is an autogenerated conversion function. +func Convert_management_ProjectImportVirtualClusterList_To_v1_ProjectImportVirtualClusterList(in *management.ProjectImportVirtualClusterList, out *ProjectImportVirtualClusterList, s conversion.Scope) error { + return autoConvert_management_ProjectImportVirtualClusterList_To_v1_ProjectImportVirtualClusterList(in, out, s) +} + +func autoConvert_v1_ProjectImportVirtualClusterSource_To_management_ProjectImportVirtualClusterSource(in *ProjectImportVirtualClusterSource, out *management.ProjectImportVirtualClusterSource, s conversion.Scope) error { + out.Name = in.Name + out.Namespace = in.Namespace + out.Cluster = in.Cluster + out.ImportName = in.ImportName + return nil +} + +// Convert_v1_ProjectImportVirtualClusterSource_To_management_ProjectImportVirtualClusterSource is an autogenerated conversion function. +func Convert_v1_ProjectImportVirtualClusterSource_To_management_ProjectImportVirtualClusterSource(in *ProjectImportVirtualClusterSource, out *management.ProjectImportVirtualClusterSource, s conversion.Scope) error { + return autoConvert_v1_ProjectImportVirtualClusterSource_To_management_ProjectImportVirtualClusterSource(in, out, s) +} + +func autoConvert_management_ProjectImportVirtualClusterSource_To_v1_ProjectImportVirtualClusterSource(in *management.ProjectImportVirtualClusterSource, out *ProjectImportVirtualClusterSource, s conversion.Scope) error { + out.Name = in.Name + out.Namespace = in.Namespace + out.Cluster = in.Cluster + out.ImportName = in.ImportName + return nil +} + +// Convert_management_ProjectImportVirtualClusterSource_To_v1_ProjectImportVirtualClusterSource is an autogenerated conversion function. +func Convert_management_ProjectImportVirtualClusterSource_To_v1_ProjectImportVirtualClusterSource(in *management.ProjectImportVirtualClusterSource, out *ProjectImportVirtualClusterSource, s conversion.Scope) error { + return autoConvert_management_ProjectImportVirtualClusterSource_To_v1_ProjectImportVirtualClusterSource(in, out, s) +} + +func autoConvert_v1_ProjectList_To_management_ProjectList(in *ProjectList, out *management.ProjectList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Project)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectList_To_management_ProjectList is an autogenerated conversion function. +func Convert_v1_ProjectList_To_management_ProjectList(in *ProjectList, out *management.ProjectList, s conversion.Scope) error { + return autoConvert_v1_ProjectList_To_management_ProjectList(in, out, s) +} + +func autoConvert_management_ProjectList_To_v1_ProjectList(in *management.ProjectList, out *ProjectList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Project)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectList_To_v1_ProjectList is an autogenerated conversion function. +func Convert_management_ProjectList_To_v1_ProjectList(in *management.ProjectList, out *ProjectList, s conversion.Scope) error { + return autoConvert_management_ProjectList_To_v1_ProjectList(in, out, s) +} + +func autoConvert_v1_ProjectMember_To_management_ProjectMember(in *ProjectMember, out *management.ProjectMember, s conversion.Scope) error { + out.Info = in.Info + return nil +} + +// Convert_v1_ProjectMember_To_management_ProjectMember is an autogenerated conversion function. +func Convert_v1_ProjectMember_To_management_ProjectMember(in *ProjectMember, out *management.ProjectMember, s conversion.Scope) error { + return autoConvert_v1_ProjectMember_To_management_ProjectMember(in, out, s) +} + +func autoConvert_management_ProjectMember_To_v1_ProjectMember(in *management.ProjectMember, out *ProjectMember, s conversion.Scope) error { + out.Info = in.Info + return nil +} + +// Convert_management_ProjectMember_To_v1_ProjectMember is an autogenerated conversion function. +func Convert_management_ProjectMember_To_v1_ProjectMember(in *management.ProjectMember, out *ProjectMember, s conversion.Scope) error { + return autoConvert_management_ProjectMember_To_v1_ProjectMember(in, out, s) +} + +func autoConvert_v1_ProjectMembers_To_management_ProjectMembers(in *ProjectMembers, out *management.ProjectMembers, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Teams = *(*[]management.ProjectMember)(unsafe.Pointer(&in.Teams)) + out.Users = *(*[]management.ProjectMember)(unsafe.Pointer(&in.Users)) + return nil +} + +// Convert_v1_ProjectMembers_To_management_ProjectMembers is an autogenerated conversion function. +func Convert_v1_ProjectMembers_To_management_ProjectMembers(in *ProjectMembers, out *management.ProjectMembers, s conversion.Scope) error { + return autoConvert_v1_ProjectMembers_To_management_ProjectMembers(in, out, s) +} + +func autoConvert_management_ProjectMembers_To_v1_ProjectMembers(in *management.ProjectMembers, out *ProjectMembers, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Teams = *(*[]ProjectMember)(unsafe.Pointer(&in.Teams)) + out.Users = *(*[]ProjectMember)(unsafe.Pointer(&in.Users)) + return nil +} + +// Convert_management_ProjectMembers_To_v1_ProjectMembers is an autogenerated conversion function. +func Convert_management_ProjectMembers_To_v1_ProjectMembers(in *management.ProjectMembers, out *ProjectMembers, s conversion.Scope) error { + return autoConvert_management_ProjectMembers_To_v1_ProjectMembers(in, out, s) +} + +func autoConvert_v1_ProjectMembersList_To_management_ProjectMembersList(in *ProjectMembersList, out *management.ProjectMembersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectMembers)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectMembersList_To_management_ProjectMembersList is an autogenerated conversion function. +func Convert_v1_ProjectMembersList_To_management_ProjectMembersList(in *ProjectMembersList, out *management.ProjectMembersList, s conversion.Scope) error { + return autoConvert_v1_ProjectMembersList_To_management_ProjectMembersList(in, out, s) +} + +func autoConvert_management_ProjectMembersList_To_v1_ProjectMembersList(in *management.ProjectMembersList, out *ProjectMembersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectMembers)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectMembersList_To_v1_ProjectMembersList is an autogenerated conversion function. +func Convert_management_ProjectMembersList_To_v1_ProjectMembersList(in *management.ProjectMembersList, out *ProjectMembersList, s conversion.Scope) error { + return autoConvert_management_ProjectMembersList_To_v1_ProjectMembersList(in, out, s) +} + +func autoConvert_v1_ProjectMigrateSpaceInstance_To_management_ProjectMigrateSpaceInstance(in *ProjectMigrateSpaceInstance, out *management.ProjectMigrateSpaceInstance, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ProjectMigrateSpaceInstanceSource_To_management_ProjectMigrateSpaceInstanceSource(&in.SourceSpaceInstance, &out.SourceSpaceInstance, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ProjectMigrateSpaceInstance_To_management_ProjectMigrateSpaceInstance is an autogenerated conversion function. +func Convert_v1_ProjectMigrateSpaceInstance_To_management_ProjectMigrateSpaceInstance(in *ProjectMigrateSpaceInstance, out *management.ProjectMigrateSpaceInstance, s conversion.Scope) error { + return autoConvert_v1_ProjectMigrateSpaceInstance_To_management_ProjectMigrateSpaceInstance(in, out, s) +} + +func autoConvert_management_ProjectMigrateSpaceInstance_To_v1_ProjectMigrateSpaceInstance(in *management.ProjectMigrateSpaceInstance, out *ProjectMigrateSpaceInstance, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ProjectMigrateSpaceInstanceSource_To_v1_ProjectMigrateSpaceInstanceSource(&in.SourceSpaceInstance, &out.SourceSpaceInstance, s); err != nil { + return err + } + return nil +} + +// Convert_management_ProjectMigrateSpaceInstance_To_v1_ProjectMigrateSpaceInstance is an autogenerated conversion function. +func Convert_management_ProjectMigrateSpaceInstance_To_v1_ProjectMigrateSpaceInstance(in *management.ProjectMigrateSpaceInstance, out *ProjectMigrateSpaceInstance, s conversion.Scope) error { + return autoConvert_management_ProjectMigrateSpaceInstance_To_v1_ProjectMigrateSpaceInstance(in, out, s) +} + +func autoConvert_v1_ProjectMigrateSpaceInstanceList_To_management_ProjectMigrateSpaceInstanceList(in *ProjectMigrateSpaceInstanceList, out *management.ProjectMigrateSpaceInstanceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectMigrateSpaceInstance)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectMigrateSpaceInstanceList_To_management_ProjectMigrateSpaceInstanceList is an autogenerated conversion function. +func Convert_v1_ProjectMigrateSpaceInstanceList_To_management_ProjectMigrateSpaceInstanceList(in *ProjectMigrateSpaceInstanceList, out *management.ProjectMigrateSpaceInstanceList, s conversion.Scope) error { + return autoConvert_v1_ProjectMigrateSpaceInstanceList_To_management_ProjectMigrateSpaceInstanceList(in, out, s) +} + +func autoConvert_management_ProjectMigrateSpaceInstanceList_To_v1_ProjectMigrateSpaceInstanceList(in *management.ProjectMigrateSpaceInstanceList, out *ProjectMigrateSpaceInstanceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectMigrateSpaceInstance)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectMigrateSpaceInstanceList_To_v1_ProjectMigrateSpaceInstanceList is an autogenerated conversion function. +func Convert_management_ProjectMigrateSpaceInstanceList_To_v1_ProjectMigrateSpaceInstanceList(in *management.ProjectMigrateSpaceInstanceList, out *ProjectMigrateSpaceInstanceList, s conversion.Scope) error { + return autoConvert_management_ProjectMigrateSpaceInstanceList_To_v1_ProjectMigrateSpaceInstanceList(in, out, s) +} + +func autoConvert_v1_ProjectMigrateSpaceInstanceSource_To_management_ProjectMigrateSpaceInstanceSource(in *ProjectMigrateSpaceInstanceSource, out *management.ProjectMigrateSpaceInstanceSource, s conversion.Scope) error { + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +// Convert_v1_ProjectMigrateSpaceInstanceSource_To_management_ProjectMigrateSpaceInstanceSource is an autogenerated conversion function. +func Convert_v1_ProjectMigrateSpaceInstanceSource_To_management_ProjectMigrateSpaceInstanceSource(in *ProjectMigrateSpaceInstanceSource, out *management.ProjectMigrateSpaceInstanceSource, s conversion.Scope) error { + return autoConvert_v1_ProjectMigrateSpaceInstanceSource_To_management_ProjectMigrateSpaceInstanceSource(in, out, s) +} + +func autoConvert_management_ProjectMigrateSpaceInstanceSource_To_v1_ProjectMigrateSpaceInstanceSource(in *management.ProjectMigrateSpaceInstanceSource, out *ProjectMigrateSpaceInstanceSource, s conversion.Scope) error { + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +// Convert_management_ProjectMigrateSpaceInstanceSource_To_v1_ProjectMigrateSpaceInstanceSource is an autogenerated conversion function. +func Convert_management_ProjectMigrateSpaceInstanceSource_To_v1_ProjectMigrateSpaceInstanceSource(in *management.ProjectMigrateSpaceInstanceSource, out *ProjectMigrateSpaceInstanceSource, s conversion.Scope) error { + return autoConvert_management_ProjectMigrateSpaceInstanceSource_To_v1_ProjectMigrateSpaceInstanceSource(in, out, s) +} + +func autoConvert_v1_ProjectMigrateVirtualClusterInstance_To_management_ProjectMigrateVirtualClusterInstance(in *ProjectMigrateVirtualClusterInstance, out *management.ProjectMigrateVirtualClusterInstance, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ProjectMigrateVirtualClusterInstanceSource_To_management_ProjectMigrateVirtualClusterInstanceSource(&in.SourceVirtualClusterInstance, &out.SourceVirtualClusterInstance, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ProjectMigrateVirtualClusterInstance_To_management_ProjectMigrateVirtualClusterInstance is an autogenerated conversion function. +func Convert_v1_ProjectMigrateVirtualClusterInstance_To_management_ProjectMigrateVirtualClusterInstance(in *ProjectMigrateVirtualClusterInstance, out *management.ProjectMigrateVirtualClusterInstance, s conversion.Scope) error { + return autoConvert_v1_ProjectMigrateVirtualClusterInstance_To_management_ProjectMigrateVirtualClusterInstance(in, out, s) +} + +func autoConvert_management_ProjectMigrateVirtualClusterInstance_To_v1_ProjectMigrateVirtualClusterInstance(in *management.ProjectMigrateVirtualClusterInstance, out *ProjectMigrateVirtualClusterInstance, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ProjectMigrateVirtualClusterInstanceSource_To_v1_ProjectMigrateVirtualClusterInstanceSource(&in.SourceVirtualClusterInstance, &out.SourceVirtualClusterInstance, s); err != nil { + return err + } + return nil +} + +// Convert_management_ProjectMigrateVirtualClusterInstance_To_v1_ProjectMigrateVirtualClusterInstance is an autogenerated conversion function. +func Convert_management_ProjectMigrateVirtualClusterInstance_To_v1_ProjectMigrateVirtualClusterInstance(in *management.ProjectMigrateVirtualClusterInstance, out *ProjectMigrateVirtualClusterInstance, s conversion.Scope) error { + return autoConvert_management_ProjectMigrateVirtualClusterInstance_To_v1_ProjectMigrateVirtualClusterInstance(in, out, s) +} + +func autoConvert_v1_ProjectMigrateVirtualClusterInstanceList_To_management_ProjectMigrateVirtualClusterInstanceList(in *ProjectMigrateVirtualClusterInstanceList, out *management.ProjectMigrateVirtualClusterInstanceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectMigrateVirtualClusterInstance)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectMigrateVirtualClusterInstanceList_To_management_ProjectMigrateVirtualClusterInstanceList is an autogenerated conversion function. +func Convert_v1_ProjectMigrateVirtualClusterInstanceList_To_management_ProjectMigrateVirtualClusterInstanceList(in *ProjectMigrateVirtualClusterInstanceList, out *management.ProjectMigrateVirtualClusterInstanceList, s conversion.Scope) error { + return autoConvert_v1_ProjectMigrateVirtualClusterInstanceList_To_management_ProjectMigrateVirtualClusterInstanceList(in, out, s) +} + +func autoConvert_management_ProjectMigrateVirtualClusterInstanceList_To_v1_ProjectMigrateVirtualClusterInstanceList(in *management.ProjectMigrateVirtualClusterInstanceList, out *ProjectMigrateVirtualClusterInstanceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectMigrateVirtualClusterInstance)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectMigrateVirtualClusterInstanceList_To_v1_ProjectMigrateVirtualClusterInstanceList is an autogenerated conversion function. +func Convert_management_ProjectMigrateVirtualClusterInstanceList_To_v1_ProjectMigrateVirtualClusterInstanceList(in *management.ProjectMigrateVirtualClusterInstanceList, out *ProjectMigrateVirtualClusterInstanceList, s conversion.Scope) error { + return autoConvert_management_ProjectMigrateVirtualClusterInstanceList_To_v1_ProjectMigrateVirtualClusterInstanceList(in, out, s) +} + +func autoConvert_v1_ProjectMigrateVirtualClusterInstanceSource_To_management_ProjectMigrateVirtualClusterInstanceSource(in *ProjectMigrateVirtualClusterInstanceSource, out *management.ProjectMigrateVirtualClusterInstanceSource, s conversion.Scope) error { + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +// Convert_v1_ProjectMigrateVirtualClusterInstanceSource_To_management_ProjectMigrateVirtualClusterInstanceSource is an autogenerated conversion function. +func Convert_v1_ProjectMigrateVirtualClusterInstanceSource_To_management_ProjectMigrateVirtualClusterInstanceSource(in *ProjectMigrateVirtualClusterInstanceSource, out *management.ProjectMigrateVirtualClusterInstanceSource, s conversion.Scope) error { + return autoConvert_v1_ProjectMigrateVirtualClusterInstanceSource_To_management_ProjectMigrateVirtualClusterInstanceSource(in, out, s) +} + +func autoConvert_management_ProjectMigrateVirtualClusterInstanceSource_To_v1_ProjectMigrateVirtualClusterInstanceSource(in *management.ProjectMigrateVirtualClusterInstanceSource, out *ProjectMigrateVirtualClusterInstanceSource, s conversion.Scope) error { + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +// Convert_management_ProjectMigrateVirtualClusterInstanceSource_To_v1_ProjectMigrateVirtualClusterInstanceSource is an autogenerated conversion function. +func Convert_management_ProjectMigrateVirtualClusterInstanceSource_To_v1_ProjectMigrateVirtualClusterInstanceSource(in *management.ProjectMigrateVirtualClusterInstanceSource, out *ProjectMigrateVirtualClusterInstanceSource, s conversion.Scope) error { + return autoConvert_management_ProjectMigrateVirtualClusterInstanceSource_To_v1_ProjectMigrateVirtualClusterInstanceSource(in, out, s) +} + +func autoConvert_v1_ProjectSecret_To_management_ProjectSecret(in *ProjectSecret, out *management.ProjectSecret, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ProjectSecretSpec_To_management_ProjectSecretSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ProjectSecretStatus_To_management_ProjectSecretStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ProjectSecret_To_management_ProjectSecret is an autogenerated conversion function. +func Convert_v1_ProjectSecret_To_management_ProjectSecret(in *ProjectSecret, out *management.ProjectSecret, s conversion.Scope) error { + return autoConvert_v1_ProjectSecret_To_management_ProjectSecret(in, out, s) +} + +func autoConvert_management_ProjectSecret_To_v1_ProjectSecret(in *management.ProjectSecret, out *ProjectSecret, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ProjectSecretSpec_To_v1_ProjectSecretSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_ProjectSecretStatus_To_v1_ProjectSecretStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_ProjectSecret_To_v1_ProjectSecret is an autogenerated conversion function. +func Convert_management_ProjectSecret_To_v1_ProjectSecret(in *management.ProjectSecret, out *ProjectSecret, s conversion.Scope) error { + return autoConvert_management_ProjectSecret_To_v1_ProjectSecret(in, out, s) +} + +func autoConvert_v1_ProjectSecretList_To_management_ProjectSecretList(in *ProjectSecretList, out *management.ProjectSecretList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectSecret)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectSecretList_To_management_ProjectSecretList is an autogenerated conversion function. +func Convert_v1_ProjectSecretList_To_management_ProjectSecretList(in *ProjectSecretList, out *management.ProjectSecretList, s conversion.Scope) error { + return autoConvert_v1_ProjectSecretList_To_management_ProjectSecretList(in, out, s) +} + +func autoConvert_management_ProjectSecretList_To_v1_ProjectSecretList(in *management.ProjectSecretList, out *ProjectSecretList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectSecret)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectSecretList_To_v1_ProjectSecretList is an autogenerated conversion function. +func Convert_management_ProjectSecretList_To_v1_ProjectSecretList(in *management.ProjectSecretList, out *ProjectSecretList, s conversion.Scope) error { + return autoConvert_management_ProjectSecretList_To_v1_ProjectSecretList(in, out, s) +} + +func autoConvert_v1_ProjectSecretSpec_To_management_ProjectSecretSpec(in *ProjectSecretSpec, out *management.ProjectSecretSpec, s conversion.Scope) error { + out.DisplayName = in.DisplayName + out.Description = in.Description + out.Owner = (*storagev1.UserOrTeam)(unsafe.Pointer(in.Owner)) + out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data)) + out.Access = *(*[]storagev1.Access)(unsafe.Pointer(&in.Access)) + return nil +} + +// Convert_v1_ProjectSecretSpec_To_management_ProjectSecretSpec is an autogenerated conversion function. +func Convert_v1_ProjectSecretSpec_To_management_ProjectSecretSpec(in *ProjectSecretSpec, out *management.ProjectSecretSpec, s conversion.Scope) error { + return autoConvert_v1_ProjectSecretSpec_To_management_ProjectSecretSpec(in, out, s) +} + +func autoConvert_management_ProjectSecretSpec_To_v1_ProjectSecretSpec(in *management.ProjectSecretSpec, out *ProjectSecretSpec, s conversion.Scope) error { + out.DisplayName = in.DisplayName + out.Description = in.Description + out.Owner = (*storagev1.UserOrTeam)(unsafe.Pointer(in.Owner)) + out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data)) + out.Access = *(*[]storagev1.Access)(unsafe.Pointer(&in.Access)) + return nil +} + +// Convert_management_ProjectSecretSpec_To_v1_ProjectSecretSpec is an autogenerated conversion function. +func Convert_management_ProjectSecretSpec_To_v1_ProjectSecretSpec(in *management.ProjectSecretSpec, out *ProjectSecretSpec, s conversion.Scope) error { + return autoConvert_management_ProjectSecretSpec_To_v1_ProjectSecretSpec(in, out, s) +} + +func autoConvert_v1_ProjectSecretStatus_To_management_ProjectSecretStatus(in *ProjectSecretStatus, out *management.ProjectSecretStatus, s conversion.Scope) error { + out.Conditions = *(*loftstoragev1.Conditions)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1_ProjectSecretStatus_To_management_ProjectSecretStatus is an autogenerated conversion function. +func Convert_v1_ProjectSecretStatus_To_management_ProjectSecretStatus(in *ProjectSecretStatus, out *management.ProjectSecretStatus, s conversion.Scope) error { + return autoConvert_v1_ProjectSecretStatus_To_management_ProjectSecretStatus(in, out, s) +} + +func autoConvert_management_ProjectSecretStatus_To_v1_ProjectSecretStatus(in *management.ProjectSecretStatus, out *ProjectSecretStatus, s conversion.Scope) error { + out.Conditions = *(*loftstoragev1.Conditions)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_management_ProjectSecretStatus_To_v1_ProjectSecretStatus is an autogenerated conversion function. +func Convert_management_ProjectSecretStatus_To_v1_ProjectSecretStatus(in *management.ProjectSecretStatus, out *ProjectSecretStatus, s conversion.Scope) error { + return autoConvert_management_ProjectSecretStatus_To_v1_ProjectSecretStatus(in, out, s) +} + +func autoConvert_v1_ProjectSpec_To_management_ProjectSpec(in *ProjectSpec, out *management.ProjectSpec, s conversion.Scope) error { + out.ProjectSpec = in.ProjectSpec + return nil +} + +// Convert_v1_ProjectSpec_To_management_ProjectSpec is an autogenerated conversion function. +func Convert_v1_ProjectSpec_To_management_ProjectSpec(in *ProjectSpec, out *management.ProjectSpec, s conversion.Scope) error { + return autoConvert_v1_ProjectSpec_To_management_ProjectSpec(in, out, s) +} + +func autoConvert_management_ProjectSpec_To_v1_ProjectSpec(in *management.ProjectSpec, out *ProjectSpec, s conversion.Scope) error { + out.ProjectSpec = in.ProjectSpec + return nil +} + +// Convert_management_ProjectSpec_To_v1_ProjectSpec is an autogenerated conversion function. +func Convert_management_ProjectSpec_To_v1_ProjectSpec(in *management.ProjectSpec, out *ProjectSpec, s conversion.Scope) error { + return autoConvert_management_ProjectSpec_To_v1_ProjectSpec(in, out, s) +} + +func autoConvert_v1_ProjectStatus_To_management_ProjectStatus(in *ProjectStatus, out *management.ProjectStatus, s conversion.Scope) error { + out.ProjectStatus = in.ProjectStatus + return nil +} + +// Convert_v1_ProjectStatus_To_management_ProjectStatus is an autogenerated conversion function. +func Convert_v1_ProjectStatus_To_management_ProjectStatus(in *ProjectStatus, out *management.ProjectStatus, s conversion.Scope) error { + return autoConvert_v1_ProjectStatus_To_management_ProjectStatus(in, out, s) +} + +func autoConvert_management_ProjectStatus_To_v1_ProjectStatus(in *management.ProjectStatus, out *ProjectStatus, s conversion.Scope) error { + out.ProjectStatus = in.ProjectStatus + return nil +} + +// Convert_management_ProjectStatus_To_v1_ProjectStatus is an autogenerated conversion function. +func Convert_management_ProjectStatus_To_v1_ProjectStatus(in *management.ProjectStatus, out *ProjectStatus, s conversion.Scope) error { + return autoConvert_management_ProjectStatus_To_v1_ProjectStatus(in, out, s) +} + +func autoConvert_v1_ProjectTemplates_To_management_ProjectTemplates(in *ProjectTemplates, out *management.ProjectTemplates, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.DefaultVirtualClusterTemplate = in.DefaultVirtualClusterTemplate + out.VirtualClusterTemplates = *(*[]management.VirtualClusterTemplate)(unsafe.Pointer(&in.VirtualClusterTemplates)) + out.DefaultSpaceTemplate = in.DefaultSpaceTemplate + out.SpaceTemplates = *(*[]management.SpaceTemplate)(unsafe.Pointer(&in.SpaceTemplates)) + out.DefaultDevPodWorkspaceTemplate = in.DefaultDevPodWorkspaceTemplate + out.DevPodWorkspaceTemplates = *(*[]management.DevPodWorkspaceTemplate)(unsafe.Pointer(&in.DevPodWorkspaceTemplates)) + return nil +} + +// Convert_v1_ProjectTemplates_To_management_ProjectTemplates is an autogenerated conversion function. +func Convert_v1_ProjectTemplates_To_management_ProjectTemplates(in *ProjectTemplates, out *management.ProjectTemplates, s conversion.Scope) error { + return autoConvert_v1_ProjectTemplates_To_management_ProjectTemplates(in, out, s) +} + +func autoConvert_management_ProjectTemplates_To_v1_ProjectTemplates(in *management.ProjectTemplates, out *ProjectTemplates, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.DefaultVirtualClusterTemplate = in.DefaultVirtualClusterTemplate + out.VirtualClusterTemplates = *(*[]VirtualClusterTemplate)(unsafe.Pointer(&in.VirtualClusterTemplates)) + out.DefaultSpaceTemplate = in.DefaultSpaceTemplate + out.SpaceTemplates = *(*[]SpaceTemplate)(unsafe.Pointer(&in.SpaceTemplates)) + out.DefaultDevPodWorkspaceTemplate = in.DefaultDevPodWorkspaceTemplate + out.DevPodWorkspaceTemplates = *(*[]DevPodWorkspaceTemplate)(unsafe.Pointer(&in.DevPodWorkspaceTemplates)) + return nil +} + +// Convert_management_ProjectTemplates_To_v1_ProjectTemplates is an autogenerated conversion function. +func Convert_management_ProjectTemplates_To_v1_ProjectTemplates(in *management.ProjectTemplates, out *ProjectTemplates, s conversion.Scope) error { + return autoConvert_management_ProjectTemplates_To_v1_ProjectTemplates(in, out, s) +} + +func autoConvert_v1_ProjectTemplatesList_To_management_ProjectTemplatesList(in *ProjectTemplatesList, out *management.ProjectTemplatesList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectTemplates)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectTemplatesList_To_management_ProjectTemplatesList is an autogenerated conversion function. +func Convert_v1_ProjectTemplatesList_To_management_ProjectTemplatesList(in *ProjectTemplatesList, out *management.ProjectTemplatesList, s conversion.Scope) error { + return autoConvert_v1_ProjectTemplatesList_To_management_ProjectTemplatesList(in, out, s) +} + +func autoConvert_management_ProjectTemplatesList_To_v1_ProjectTemplatesList(in *management.ProjectTemplatesList, out *ProjectTemplatesList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectTemplates)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectTemplatesList_To_v1_ProjectTemplatesList is an autogenerated conversion function. +func Convert_management_ProjectTemplatesList_To_v1_ProjectTemplatesList(in *management.ProjectTemplatesList, out *ProjectTemplatesList, s conversion.Scope) error { + return autoConvert_management_ProjectTemplatesList_To_v1_ProjectTemplatesList(in, out, s) +} + +func autoConvert_v1_RedirectToken_To_management_RedirectToken(in *RedirectToken, out *management.RedirectToken, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_RedirectTokenSpec_To_management_RedirectTokenSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_RedirectTokenStatus_To_management_RedirectTokenStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_RedirectToken_To_management_RedirectToken is an autogenerated conversion function. +func Convert_v1_RedirectToken_To_management_RedirectToken(in *RedirectToken, out *management.RedirectToken, s conversion.Scope) error { + return autoConvert_v1_RedirectToken_To_management_RedirectToken(in, out, s) +} + +func autoConvert_management_RedirectToken_To_v1_RedirectToken(in *management.RedirectToken, out *RedirectToken, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_RedirectTokenSpec_To_v1_RedirectTokenSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_RedirectTokenStatus_To_v1_RedirectTokenStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_RedirectToken_To_v1_RedirectToken is an autogenerated conversion function. +func Convert_management_RedirectToken_To_v1_RedirectToken(in *management.RedirectToken, out *RedirectToken, s conversion.Scope) error { + return autoConvert_management_RedirectToken_To_v1_RedirectToken(in, out, s) +} + +func autoConvert_v1_RedirectTokenList_To_management_RedirectTokenList(in *RedirectTokenList, out *management.RedirectTokenList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.RedirectToken)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_RedirectTokenList_To_management_RedirectTokenList is an autogenerated conversion function. +func Convert_v1_RedirectTokenList_To_management_RedirectTokenList(in *RedirectTokenList, out *management.RedirectTokenList, s conversion.Scope) error { + return autoConvert_v1_RedirectTokenList_To_management_RedirectTokenList(in, out, s) +} + +func autoConvert_management_RedirectTokenList_To_v1_RedirectTokenList(in *management.RedirectTokenList, out *RedirectTokenList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]RedirectToken)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_RedirectTokenList_To_v1_RedirectTokenList is an autogenerated conversion function. +func Convert_management_RedirectTokenList_To_v1_RedirectTokenList(in *management.RedirectTokenList, out *RedirectTokenList, s conversion.Scope) error { + return autoConvert_management_RedirectTokenList_To_v1_RedirectTokenList(in, out, s) +} + +func autoConvert_v1_RedirectTokenSpec_To_management_RedirectTokenSpec(in *RedirectTokenSpec, out *management.RedirectTokenSpec, s conversion.Scope) error { + out.Token = in.Token + return nil +} + +// Convert_v1_RedirectTokenSpec_To_management_RedirectTokenSpec is an autogenerated conversion function. +func Convert_v1_RedirectTokenSpec_To_management_RedirectTokenSpec(in *RedirectTokenSpec, out *management.RedirectTokenSpec, s conversion.Scope) error { + return autoConvert_v1_RedirectTokenSpec_To_management_RedirectTokenSpec(in, out, s) +} + +func autoConvert_management_RedirectTokenSpec_To_v1_RedirectTokenSpec(in *management.RedirectTokenSpec, out *RedirectTokenSpec, s conversion.Scope) error { + out.Token = in.Token + return nil +} + +// Convert_management_RedirectTokenSpec_To_v1_RedirectTokenSpec is an autogenerated conversion function. +func Convert_management_RedirectTokenSpec_To_v1_RedirectTokenSpec(in *management.RedirectTokenSpec, out *RedirectTokenSpec, s conversion.Scope) error { + return autoConvert_management_RedirectTokenSpec_To_v1_RedirectTokenSpec(in, out, s) +} + +func autoConvert_v1_RedirectTokenStatus_To_management_RedirectTokenStatus(in *RedirectTokenStatus, out *management.RedirectTokenStatus, s conversion.Scope) error { + out.RedirectURL = in.RedirectURL + return nil +} + +// Convert_v1_RedirectTokenStatus_To_management_RedirectTokenStatus is an autogenerated conversion function. +func Convert_v1_RedirectTokenStatus_To_management_RedirectTokenStatus(in *RedirectTokenStatus, out *management.RedirectTokenStatus, s conversion.Scope) error { + return autoConvert_v1_RedirectTokenStatus_To_management_RedirectTokenStatus(in, out, s) +} + +func autoConvert_management_RedirectTokenStatus_To_v1_RedirectTokenStatus(in *management.RedirectTokenStatus, out *RedirectTokenStatus, s conversion.Scope) error { + out.RedirectURL = in.RedirectURL + return nil +} + +// Convert_management_RedirectTokenStatus_To_v1_RedirectTokenStatus is an autogenerated conversion function. +func Convert_management_RedirectTokenStatus_To_v1_RedirectTokenStatus(in *management.RedirectTokenStatus, out *RedirectTokenStatus, s conversion.Scope) error { + return autoConvert_management_RedirectTokenStatus_To_v1_RedirectTokenStatus(in, out, s) +} + +func autoConvert_v1_ResetAccessKey_To_management_ResetAccessKey(in *ResetAccessKey, out *management.ResetAccessKey, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ResetAccessKeySpec_To_management_ResetAccessKeySpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ResetAccessKeyStatus_To_management_ResetAccessKeyStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ResetAccessKey_To_management_ResetAccessKey is an autogenerated conversion function. +func Convert_v1_ResetAccessKey_To_management_ResetAccessKey(in *ResetAccessKey, out *management.ResetAccessKey, s conversion.Scope) error { + return autoConvert_v1_ResetAccessKey_To_management_ResetAccessKey(in, out, s) +} + +func autoConvert_management_ResetAccessKey_To_v1_ResetAccessKey(in *management.ResetAccessKey, out *ResetAccessKey, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_ResetAccessKeySpec_To_v1_ResetAccessKeySpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_ResetAccessKeyStatus_To_v1_ResetAccessKeyStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_ResetAccessKey_To_v1_ResetAccessKey is an autogenerated conversion function. +func Convert_management_ResetAccessKey_To_v1_ResetAccessKey(in *management.ResetAccessKey, out *ResetAccessKey, s conversion.Scope) error { + return autoConvert_management_ResetAccessKey_To_v1_ResetAccessKey(in, out, s) +} + +func autoConvert_v1_ResetAccessKeyList_To_management_ResetAccessKeyList(in *ResetAccessKeyList, out *management.ResetAccessKeyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ResetAccessKey)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ResetAccessKeyList_To_management_ResetAccessKeyList is an autogenerated conversion function. +func Convert_v1_ResetAccessKeyList_To_management_ResetAccessKeyList(in *ResetAccessKeyList, out *management.ResetAccessKeyList, s conversion.Scope) error { + return autoConvert_v1_ResetAccessKeyList_To_management_ResetAccessKeyList(in, out, s) +} + +func autoConvert_management_ResetAccessKeyList_To_v1_ResetAccessKeyList(in *management.ResetAccessKeyList, out *ResetAccessKeyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ResetAccessKey)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ResetAccessKeyList_To_v1_ResetAccessKeyList is an autogenerated conversion function. +func Convert_management_ResetAccessKeyList_To_v1_ResetAccessKeyList(in *management.ResetAccessKeyList, out *ResetAccessKeyList, s conversion.Scope) error { + return autoConvert_management_ResetAccessKeyList_To_v1_ResetAccessKeyList(in, out, s) +} + +func autoConvert_v1_ResetAccessKeySpec_To_management_ResetAccessKeySpec(in *ResetAccessKeySpec, out *management.ResetAccessKeySpec, s conversion.Scope) error { + out.AccessKeySpec = in.AccessKeySpec + return nil +} + +// Convert_v1_ResetAccessKeySpec_To_management_ResetAccessKeySpec is an autogenerated conversion function. +func Convert_v1_ResetAccessKeySpec_To_management_ResetAccessKeySpec(in *ResetAccessKeySpec, out *management.ResetAccessKeySpec, s conversion.Scope) error { + return autoConvert_v1_ResetAccessKeySpec_To_management_ResetAccessKeySpec(in, out, s) +} + +func autoConvert_management_ResetAccessKeySpec_To_v1_ResetAccessKeySpec(in *management.ResetAccessKeySpec, out *ResetAccessKeySpec, s conversion.Scope) error { + out.AccessKeySpec = in.AccessKeySpec + return nil +} + +// Convert_management_ResetAccessKeySpec_To_v1_ResetAccessKeySpec is an autogenerated conversion function. +func Convert_management_ResetAccessKeySpec_To_v1_ResetAccessKeySpec(in *management.ResetAccessKeySpec, out *ResetAccessKeySpec, s conversion.Scope) error { + return autoConvert_management_ResetAccessKeySpec_To_v1_ResetAccessKeySpec(in, out, s) +} + +func autoConvert_v1_ResetAccessKeyStatus_To_management_ResetAccessKeyStatus(in *ResetAccessKeyStatus, out *management.ResetAccessKeyStatus, s conversion.Scope) error { + out.AccessKeyStatus = in.AccessKeyStatus + return nil +} + +// Convert_v1_ResetAccessKeyStatus_To_management_ResetAccessKeyStatus is an autogenerated conversion function. +func Convert_v1_ResetAccessKeyStatus_To_management_ResetAccessKeyStatus(in *ResetAccessKeyStatus, out *management.ResetAccessKeyStatus, s conversion.Scope) error { + return autoConvert_v1_ResetAccessKeyStatus_To_management_ResetAccessKeyStatus(in, out, s) +} + +func autoConvert_management_ResetAccessKeyStatus_To_v1_ResetAccessKeyStatus(in *management.ResetAccessKeyStatus, out *ResetAccessKeyStatus, s conversion.Scope) error { + out.AccessKeyStatus = in.AccessKeyStatus + return nil +} + +// Convert_management_ResetAccessKeyStatus_To_v1_ResetAccessKeyStatus is an autogenerated conversion function. +func Convert_management_ResetAccessKeyStatus_To_v1_ResetAccessKeyStatus(in *management.ResetAccessKeyStatus, out *ResetAccessKeyStatus, s conversion.Scope) error { + return autoConvert_management_ResetAccessKeyStatus_To_v1_ResetAccessKeyStatus(in, out, s) +} + +func autoConvert_v1_Runner_To_management_Runner(in *Runner, out *management.Runner, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_RunnerSpec_To_management_RunnerSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_RunnerStatus_To_management_RunnerStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Runner_To_management_Runner is an autogenerated conversion function. +func Convert_v1_Runner_To_management_Runner(in *Runner, out *management.Runner, s conversion.Scope) error { + return autoConvert_v1_Runner_To_management_Runner(in, out, s) +} + +func autoConvert_management_Runner_To_v1_Runner(in *management.Runner, out *Runner, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_RunnerSpec_To_v1_RunnerSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_RunnerStatus_To_v1_RunnerStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Runner_To_v1_Runner is an autogenerated conversion function. +func Convert_management_Runner_To_v1_Runner(in *management.Runner, out *Runner, s conversion.Scope) error { + return autoConvert_management_Runner_To_v1_Runner(in, out, s) +} + +func autoConvert_v1_RunnerAccessKey_To_management_RunnerAccessKey(in *RunnerAccessKey, out *management.RunnerAccessKey, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.AccessKey = in.AccessKey + return nil +} + +// Convert_v1_RunnerAccessKey_To_management_RunnerAccessKey is an autogenerated conversion function. +func Convert_v1_RunnerAccessKey_To_management_RunnerAccessKey(in *RunnerAccessKey, out *management.RunnerAccessKey, s conversion.Scope) error { + return autoConvert_v1_RunnerAccessKey_To_management_RunnerAccessKey(in, out, s) +} + +func autoConvert_management_RunnerAccessKey_To_v1_RunnerAccessKey(in *management.RunnerAccessKey, out *RunnerAccessKey, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.AccessKey = in.AccessKey + return nil +} + +// Convert_management_RunnerAccessKey_To_v1_RunnerAccessKey is an autogenerated conversion function. +func Convert_management_RunnerAccessKey_To_v1_RunnerAccessKey(in *management.RunnerAccessKey, out *RunnerAccessKey, s conversion.Scope) error { + return autoConvert_management_RunnerAccessKey_To_v1_RunnerAccessKey(in, out, s) +} + +func autoConvert_v1_RunnerAccessKeyList_To_management_RunnerAccessKeyList(in *RunnerAccessKeyList, out *management.RunnerAccessKeyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.RunnerAccessKey)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_RunnerAccessKeyList_To_management_RunnerAccessKeyList is an autogenerated conversion function. +func Convert_v1_RunnerAccessKeyList_To_management_RunnerAccessKeyList(in *RunnerAccessKeyList, out *management.RunnerAccessKeyList, s conversion.Scope) error { + return autoConvert_v1_RunnerAccessKeyList_To_management_RunnerAccessKeyList(in, out, s) +} + +func autoConvert_management_RunnerAccessKeyList_To_v1_RunnerAccessKeyList(in *management.RunnerAccessKeyList, out *RunnerAccessKeyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]RunnerAccessKey)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_RunnerAccessKeyList_To_v1_RunnerAccessKeyList is an autogenerated conversion function. +func Convert_management_RunnerAccessKeyList_To_v1_RunnerAccessKeyList(in *management.RunnerAccessKeyList, out *RunnerAccessKeyList, s conversion.Scope) error { + return autoConvert_management_RunnerAccessKeyList_To_v1_RunnerAccessKeyList(in, out, s) +} + +func autoConvert_v1_RunnerConfig_To_management_RunnerConfig(in *RunnerConfig, out *management.RunnerConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.TokenCaCert = *(*[]byte)(unsafe.Pointer(&in.TokenCaCert)) + return nil +} + +// Convert_v1_RunnerConfig_To_management_RunnerConfig is an autogenerated conversion function. +func Convert_v1_RunnerConfig_To_management_RunnerConfig(in *RunnerConfig, out *management.RunnerConfig, s conversion.Scope) error { + return autoConvert_v1_RunnerConfig_To_management_RunnerConfig(in, out, s) +} + +func autoConvert_management_RunnerConfig_To_v1_RunnerConfig(in *management.RunnerConfig, out *RunnerConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.TokenCaCert = *(*[]byte)(unsafe.Pointer(&in.TokenCaCert)) + return nil +} + +// Convert_management_RunnerConfig_To_v1_RunnerConfig is an autogenerated conversion function. +func Convert_management_RunnerConfig_To_v1_RunnerConfig(in *management.RunnerConfig, out *RunnerConfig, s conversion.Scope) error { + return autoConvert_management_RunnerConfig_To_v1_RunnerConfig(in, out, s) +} + +func autoConvert_v1_RunnerConfigList_To_management_RunnerConfigList(in *RunnerConfigList, out *management.RunnerConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.RunnerConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_RunnerConfigList_To_management_RunnerConfigList is an autogenerated conversion function. +func Convert_v1_RunnerConfigList_To_management_RunnerConfigList(in *RunnerConfigList, out *management.RunnerConfigList, s conversion.Scope) error { + return autoConvert_v1_RunnerConfigList_To_management_RunnerConfigList(in, out, s) +} + +func autoConvert_management_RunnerConfigList_To_v1_RunnerConfigList(in *management.RunnerConfigList, out *RunnerConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]RunnerConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_RunnerConfigList_To_v1_RunnerConfigList is an autogenerated conversion function. +func Convert_management_RunnerConfigList_To_v1_RunnerConfigList(in *management.RunnerConfigList, out *RunnerConfigList, s conversion.Scope) error { + return autoConvert_management_RunnerConfigList_To_v1_RunnerConfigList(in, out, s) +} + +func autoConvert_v1_RunnerList_To_management_RunnerList(in *RunnerList, out *management.RunnerList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Runner)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_RunnerList_To_management_RunnerList is an autogenerated conversion function. +func Convert_v1_RunnerList_To_management_RunnerList(in *RunnerList, out *management.RunnerList, s conversion.Scope) error { + return autoConvert_v1_RunnerList_To_management_RunnerList(in, out, s) +} + +func autoConvert_management_RunnerList_To_v1_RunnerList(in *management.RunnerList, out *RunnerList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Runner)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_RunnerList_To_v1_RunnerList is an autogenerated conversion function. +func Convert_management_RunnerList_To_v1_RunnerList(in *management.RunnerList, out *RunnerList, s conversion.Scope) error { + return autoConvert_management_RunnerList_To_v1_RunnerList(in, out, s) +} + +func autoConvert_v1_RunnerSpec_To_management_RunnerSpec(in *RunnerSpec, out *management.RunnerSpec, s conversion.Scope) error { + out.RunnerSpec = in.RunnerSpec + return nil +} + +// Convert_v1_RunnerSpec_To_management_RunnerSpec is an autogenerated conversion function. +func Convert_v1_RunnerSpec_To_management_RunnerSpec(in *RunnerSpec, out *management.RunnerSpec, s conversion.Scope) error { + return autoConvert_v1_RunnerSpec_To_management_RunnerSpec(in, out, s) +} + +func autoConvert_management_RunnerSpec_To_v1_RunnerSpec(in *management.RunnerSpec, out *RunnerSpec, s conversion.Scope) error { + out.RunnerSpec = in.RunnerSpec + return nil +} + +// Convert_management_RunnerSpec_To_v1_RunnerSpec is an autogenerated conversion function. +func Convert_management_RunnerSpec_To_v1_RunnerSpec(in *management.RunnerSpec, out *RunnerSpec, s conversion.Scope) error { + return autoConvert_management_RunnerSpec_To_v1_RunnerSpec(in, out, s) +} + +func autoConvert_v1_RunnerStatus_To_management_RunnerStatus(in *RunnerStatus, out *management.RunnerStatus, s conversion.Scope) error { + out.RunnerStatus = in.RunnerStatus + return nil +} + +// Convert_v1_RunnerStatus_To_management_RunnerStatus is an autogenerated conversion function. +func Convert_v1_RunnerStatus_To_management_RunnerStatus(in *RunnerStatus, out *management.RunnerStatus, s conversion.Scope) error { + return autoConvert_v1_RunnerStatus_To_management_RunnerStatus(in, out, s) +} + +func autoConvert_management_RunnerStatus_To_v1_RunnerStatus(in *management.RunnerStatus, out *RunnerStatus, s conversion.Scope) error { + out.RunnerStatus = in.RunnerStatus + return nil +} + +// Convert_management_RunnerStatus_To_v1_RunnerStatus is an autogenerated conversion function. +func Convert_management_RunnerStatus_To_v1_RunnerStatus(in *management.RunnerStatus, out *RunnerStatus, s conversion.Scope) error { + return autoConvert_management_RunnerStatus_To_v1_RunnerStatus(in, out, s) +} + +func autoConvert_v1_Self_To_management_Self(in *Self, out *management.Self, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SelfSpec_To_management_SelfSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SelfStatus_To_management_SelfStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Self_To_management_Self is an autogenerated conversion function. +func Convert_v1_Self_To_management_Self(in *Self, out *management.Self, s conversion.Scope) error { + return autoConvert_v1_Self_To_management_Self(in, out, s) +} + +func autoConvert_management_Self_To_v1_Self(in *management.Self, out *Self, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_SelfSpec_To_v1_SelfSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_SelfStatus_To_v1_SelfStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Self_To_v1_Self is an autogenerated conversion function. +func Convert_management_Self_To_v1_Self(in *management.Self, out *Self, s conversion.Scope) error { + return autoConvert_management_Self_To_v1_Self(in, out, s) +} + +func autoConvert_v1_SelfList_To_management_SelfList(in *SelfList, out *management.SelfList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Self)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_SelfList_To_management_SelfList is an autogenerated conversion function. +func Convert_v1_SelfList_To_management_SelfList(in *SelfList, out *management.SelfList, s conversion.Scope) error { + return autoConvert_v1_SelfList_To_management_SelfList(in, out, s) +} + +func autoConvert_management_SelfList_To_v1_SelfList(in *management.SelfList, out *SelfList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Self)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_SelfList_To_v1_SelfList is an autogenerated conversion function. +func Convert_management_SelfList_To_v1_SelfList(in *management.SelfList, out *SelfList, s conversion.Scope) error { + return autoConvert_management_SelfList_To_v1_SelfList(in, out, s) +} + +func autoConvert_v1_SelfSpec_To_management_SelfSpec(in *SelfSpec, out *management.SelfSpec, s conversion.Scope) error { + out.AccessKey = in.AccessKey + return nil +} + +// Convert_v1_SelfSpec_To_management_SelfSpec is an autogenerated conversion function. +func Convert_v1_SelfSpec_To_management_SelfSpec(in *SelfSpec, out *management.SelfSpec, s conversion.Scope) error { + return autoConvert_v1_SelfSpec_To_management_SelfSpec(in, out, s) +} + +func autoConvert_management_SelfSpec_To_v1_SelfSpec(in *management.SelfSpec, out *SelfSpec, s conversion.Scope) error { + out.AccessKey = in.AccessKey + return nil +} + +// Convert_management_SelfSpec_To_v1_SelfSpec is an autogenerated conversion function. +func Convert_management_SelfSpec_To_v1_SelfSpec(in *management.SelfSpec, out *SelfSpec, s conversion.Scope) error { + return autoConvert_management_SelfSpec_To_v1_SelfSpec(in, out, s) +} + +func autoConvert_v1_SelfStatus_To_management_SelfStatus(in *SelfStatus, out *management.SelfStatus, s conversion.Scope) error { + out.User = (*management.UserInfo)(unsafe.Pointer(in.User)) + out.Team = (*clusterv1.EntityInfo)(unsafe.Pointer(in.Team)) + out.AccessKey = in.AccessKey + out.AccessKeyScope = (*storagev1.AccessKeyScope)(unsafe.Pointer(in.AccessKeyScope)) + out.AccessKeyType = storagev1.AccessKeyType(in.AccessKeyType) + out.Subject = in.Subject + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.IntercomHash = in.IntercomHash + out.InstanceID = in.InstanceID + return nil +} + +// Convert_v1_SelfStatus_To_management_SelfStatus is an autogenerated conversion function. +func Convert_v1_SelfStatus_To_management_SelfStatus(in *SelfStatus, out *management.SelfStatus, s conversion.Scope) error { + return autoConvert_v1_SelfStatus_To_management_SelfStatus(in, out, s) +} + +func autoConvert_management_SelfStatus_To_v1_SelfStatus(in *management.SelfStatus, out *SelfStatus, s conversion.Scope) error { + out.User = (*UserInfo)(unsafe.Pointer(in.User)) + out.Team = (*clusterv1.EntityInfo)(unsafe.Pointer(in.Team)) + out.AccessKey = in.AccessKey + out.AccessKeyScope = (*storagev1.AccessKeyScope)(unsafe.Pointer(in.AccessKeyScope)) + out.AccessKeyType = storagev1.AccessKeyType(in.AccessKeyType) + out.Subject = in.Subject + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.IntercomHash = in.IntercomHash + out.InstanceID = in.InstanceID + return nil +} + +// Convert_management_SelfStatus_To_v1_SelfStatus is an autogenerated conversion function. +func Convert_management_SelfStatus_To_v1_SelfStatus(in *management.SelfStatus, out *SelfStatus, s conversion.Scope) error { + return autoConvert_management_SelfStatus_To_v1_SelfStatus(in, out, s) +} + +func autoConvert_v1_SelfSubjectAccessReview_To_management_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *management.SelfSubjectAccessReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SelfSubjectAccessReviewSpec_To_management_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SelfSubjectAccessReviewStatus_To_management_SelfSubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_SelfSubjectAccessReview_To_management_SelfSubjectAccessReview is an autogenerated conversion function. +func Convert_v1_SelfSubjectAccessReview_To_management_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *management.SelfSubjectAccessReview, s conversion.Scope) error { + return autoConvert_v1_SelfSubjectAccessReview_To_management_SelfSubjectAccessReview(in, out, s) +} + +func autoConvert_management_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in *management.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_SelfSubjectAccessReviewStatus_To_v1_SelfSubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview is an autogenerated conversion function. +func Convert_management_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in *management.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error { + return autoConvert_management_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in, out, s) +} + +func autoConvert_v1_SelfSubjectAccessReviewList_To_management_SelfSubjectAccessReviewList(in *SelfSubjectAccessReviewList, out *management.SelfSubjectAccessReviewList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.SelfSubjectAccessReview)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_SelfSubjectAccessReviewList_To_management_SelfSubjectAccessReviewList is an autogenerated conversion function. +func Convert_v1_SelfSubjectAccessReviewList_To_management_SelfSubjectAccessReviewList(in *SelfSubjectAccessReviewList, out *management.SelfSubjectAccessReviewList, s conversion.Scope) error { + return autoConvert_v1_SelfSubjectAccessReviewList_To_management_SelfSubjectAccessReviewList(in, out, s) +} + +func autoConvert_management_SelfSubjectAccessReviewList_To_v1_SelfSubjectAccessReviewList(in *management.SelfSubjectAccessReviewList, out *SelfSubjectAccessReviewList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SelfSubjectAccessReview)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_SelfSubjectAccessReviewList_To_v1_SelfSubjectAccessReviewList is an autogenerated conversion function. +func Convert_management_SelfSubjectAccessReviewList_To_v1_SelfSubjectAccessReviewList(in *management.SelfSubjectAccessReviewList, out *SelfSubjectAccessReviewList, s conversion.Scope) error { + return autoConvert_management_SelfSubjectAccessReviewList_To_v1_SelfSubjectAccessReviewList(in, out, s) +} + +func autoConvert_v1_SelfSubjectAccessReviewSpec_To_management_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *management.SelfSubjectAccessReviewSpec, s conversion.Scope) error { + out.SelfSubjectAccessReviewSpec = in.SelfSubjectAccessReviewSpec + return nil +} + +// Convert_v1_SelfSubjectAccessReviewSpec_To_management_SelfSubjectAccessReviewSpec is an autogenerated conversion function. +func Convert_v1_SelfSubjectAccessReviewSpec_To_management_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *management.SelfSubjectAccessReviewSpec, s conversion.Scope) error { + return autoConvert_v1_SelfSubjectAccessReviewSpec_To_management_SelfSubjectAccessReviewSpec(in, out, s) +} + +func autoConvert_management_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in *management.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error { + out.SelfSubjectAccessReviewSpec = in.SelfSubjectAccessReviewSpec + return nil +} + +// Convert_management_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec is an autogenerated conversion function. +func Convert_management_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in *management.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error { + return autoConvert_management_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in, out, s) +} + +func autoConvert_v1_SelfSubjectAccessReviewStatus_To_management_SelfSubjectAccessReviewStatus(in *SelfSubjectAccessReviewStatus, out *management.SelfSubjectAccessReviewStatus, s conversion.Scope) error { + out.SubjectAccessReviewStatus = in.SubjectAccessReviewStatus + return nil +} + +// Convert_v1_SelfSubjectAccessReviewStatus_To_management_SelfSubjectAccessReviewStatus is an autogenerated conversion function. +func Convert_v1_SelfSubjectAccessReviewStatus_To_management_SelfSubjectAccessReviewStatus(in *SelfSubjectAccessReviewStatus, out *management.SelfSubjectAccessReviewStatus, s conversion.Scope) error { + return autoConvert_v1_SelfSubjectAccessReviewStatus_To_management_SelfSubjectAccessReviewStatus(in, out, s) +} + +func autoConvert_management_SelfSubjectAccessReviewStatus_To_v1_SelfSubjectAccessReviewStatus(in *management.SelfSubjectAccessReviewStatus, out *SelfSubjectAccessReviewStatus, s conversion.Scope) error { + out.SubjectAccessReviewStatus = in.SubjectAccessReviewStatus + return nil +} + +// Convert_management_SelfSubjectAccessReviewStatus_To_v1_SelfSubjectAccessReviewStatus is an autogenerated conversion function. +func Convert_management_SelfSubjectAccessReviewStatus_To_v1_SelfSubjectAccessReviewStatus(in *management.SelfSubjectAccessReviewStatus, out *SelfSubjectAccessReviewStatus, s conversion.Scope) error { + return autoConvert_management_SelfSubjectAccessReviewStatus_To_v1_SelfSubjectAccessReviewStatus(in, out, s) +} + +func autoConvert_v1_SharedSecret_To_management_SharedSecret(in *SharedSecret, out *management.SharedSecret, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SharedSecretSpec_To_management_SharedSecretSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SharedSecretStatus_To_management_SharedSecretStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_SharedSecret_To_management_SharedSecret is an autogenerated conversion function. +func Convert_v1_SharedSecret_To_management_SharedSecret(in *SharedSecret, out *management.SharedSecret, s conversion.Scope) error { + return autoConvert_v1_SharedSecret_To_management_SharedSecret(in, out, s) +} + +func autoConvert_management_SharedSecret_To_v1_SharedSecret(in *management.SharedSecret, out *SharedSecret, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_SharedSecretSpec_To_v1_SharedSecretSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_SharedSecretStatus_To_v1_SharedSecretStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_SharedSecret_To_v1_SharedSecret is an autogenerated conversion function. +func Convert_management_SharedSecret_To_v1_SharedSecret(in *management.SharedSecret, out *SharedSecret, s conversion.Scope) error { + return autoConvert_management_SharedSecret_To_v1_SharedSecret(in, out, s) +} + +func autoConvert_v1_SharedSecretList_To_management_SharedSecretList(in *SharedSecretList, out *management.SharedSecretList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.SharedSecret)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_SharedSecretList_To_management_SharedSecretList is an autogenerated conversion function. +func Convert_v1_SharedSecretList_To_management_SharedSecretList(in *SharedSecretList, out *management.SharedSecretList, s conversion.Scope) error { + return autoConvert_v1_SharedSecretList_To_management_SharedSecretList(in, out, s) +} + +func autoConvert_management_SharedSecretList_To_v1_SharedSecretList(in *management.SharedSecretList, out *SharedSecretList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SharedSecret)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_SharedSecretList_To_v1_SharedSecretList is an autogenerated conversion function. +func Convert_management_SharedSecretList_To_v1_SharedSecretList(in *management.SharedSecretList, out *SharedSecretList, s conversion.Scope) error { + return autoConvert_management_SharedSecretList_To_v1_SharedSecretList(in, out, s) +} + +func autoConvert_v1_SharedSecretSpec_To_management_SharedSecretSpec(in *SharedSecretSpec, out *management.SharedSecretSpec, s conversion.Scope) error { + out.SharedSecretSpec = in.SharedSecretSpec + return nil +} + +// Convert_v1_SharedSecretSpec_To_management_SharedSecretSpec is an autogenerated conversion function. +func Convert_v1_SharedSecretSpec_To_management_SharedSecretSpec(in *SharedSecretSpec, out *management.SharedSecretSpec, s conversion.Scope) error { + return autoConvert_v1_SharedSecretSpec_To_management_SharedSecretSpec(in, out, s) +} + +func autoConvert_management_SharedSecretSpec_To_v1_SharedSecretSpec(in *management.SharedSecretSpec, out *SharedSecretSpec, s conversion.Scope) error { + out.SharedSecretSpec = in.SharedSecretSpec + return nil +} + +// Convert_management_SharedSecretSpec_To_v1_SharedSecretSpec is an autogenerated conversion function. +func Convert_management_SharedSecretSpec_To_v1_SharedSecretSpec(in *management.SharedSecretSpec, out *SharedSecretSpec, s conversion.Scope) error { + return autoConvert_management_SharedSecretSpec_To_v1_SharedSecretSpec(in, out, s) +} + +func autoConvert_v1_SharedSecretStatus_To_management_SharedSecretStatus(in *SharedSecretStatus, out *management.SharedSecretStatus, s conversion.Scope) error { + out.SharedSecretStatus = in.SharedSecretStatus + return nil +} + +// Convert_v1_SharedSecretStatus_To_management_SharedSecretStatus is an autogenerated conversion function. +func Convert_v1_SharedSecretStatus_To_management_SharedSecretStatus(in *SharedSecretStatus, out *management.SharedSecretStatus, s conversion.Scope) error { + return autoConvert_v1_SharedSecretStatus_To_management_SharedSecretStatus(in, out, s) +} + +func autoConvert_management_SharedSecretStatus_To_v1_SharedSecretStatus(in *management.SharedSecretStatus, out *SharedSecretStatus, s conversion.Scope) error { + out.SharedSecretStatus = in.SharedSecretStatus + return nil +} + +// Convert_management_SharedSecretStatus_To_v1_SharedSecretStatus is an autogenerated conversion function. +func Convert_management_SharedSecretStatus_To_v1_SharedSecretStatus(in *management.SharedSecretStatus, out *SharedSecretStatus, s conversion.Scope) error { + return autoConvert_management_SharedSecretStatus_To_v1_SharedSecretStatus(in, out, s) +} + +func autoConvert_v1_SpaceConstraint_To_management_SpaceConstraint(in *SpaceConstraint, out *management.SpaceConstraint, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SpaceConstraintSpec_To_management_SpaceConstraintSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SpaceConstraintStatus_To_management_SpaceConstraintStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_SpaceConstraint_To_management_SpaceConstraint is an autogenerated conversion function. +func Convert_v1_SpaceConstraint_To_management_SpaceConstraint(in *SpaceConstraint, out *management.SpaceConstraint, s conversion.Scope) error { + return autoConvert_v1_SpaceConstraint_To_management_SpaceConstraint(in, out, s) +} + +func autoConvert_management_SpaceConstraint_To_v1_SpaceConstraint(in *management.SpaceConstraint, out *SpaceConstraint, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_SpaceConstraintSpec_To_v1_SpaceConstraintSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_SpaceConstraintStatus_To_v1_SpaceConstraintStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_SpaceConstraint_To_v1_SpaceConstraint is an autogenerated conversion function. +func Convert_management_SpaceConstraint_To_v1_SpaceConstraint(in *management.SpaceConstraint, out *SpaceConstraint, s conversion.Scope) error { + return autoConvert_management_SpaceConstraint_To_v1_SpaceConstraint(in, out, s) +} + +func autoConvert_v1_SpaceConstraintList_To_management_SpaceConstraintList(in *SpaceConstraintList, out *management.SpaceConstraintList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.SpaceConstraint)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_SpaceConstraintList_To_management_SpaceConstraintList is an autogenerated conversion function. +func Convert_v1_SpaceConstraintList_To_management_SpaceConstraintList(in *SpaceConstraintList, out *management.SpaceConstraintList, s conversion.Scope) error { + return autoConvert_v1_SpaceConstraintList_To_management_SpaceConstraintList(in, out, s) +} + +func autoConvert_management_SpaceConstraintList_To_v1_SpaceConstraintList(in *management.SpaceConstraintList, out *SpaceConstraintList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SpaceConstraint)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_SpaceConstraintList_To_v1_SpaceConstraintList is an autogenerated conversion function. +func Convert_management_SpaceConstraintList_To_v1_SpaceConstraintList(in *management.SpaceConstraintList, out *SpaceConstraintList, s conversion.Scope) error { + return autoConvert_management_SpaceConstraintList_To_v1_SpaceConstraintList(in, out, s) +} + +func autoConvert_v1_SpaceConstraintSpec_To_management_SpaceConstraintSpec(in *SpaceConstraintSpec, out *management.SpaceConstraintSpec, s conversion.Scope) error { + out.SpaceConstraintSpec = in.SpaceConstraintSpec + return nil +} + +// Convert_v1_SpaceConstraintSpec_To_management_SpaceConstraintSpec is an autogenerated conversion function. +func Convert_v1_SpaceConstraintSpec_To_management_SpaceConstraintSpec(in *SpaceConstraintSpec, out *management.SpaceConstraintSpec, s conversion.Scope) error { + return autoConvert_v1_SpaceConstraintSpec_To_management_SpaceConstraintSpec(in, out, s) +} + +func autoConvert_management_SpaceConstraintSpec_To_v1_SpaceConstraintSpec(in *management.SpaceConstraintSpec, out *SpaceConstraintSpec, s conversion.Scope) error { + out.SpaceConstraintSpec = in.SpaceConstraintSpec + return nil +} + +// Convert_management_SpaceConstraintSpec_To_v1_SpaceConstraintSpec is an autogenerated conversion function. +func Convert_management_SpaceConstraintSpec_To_v1_SpaceConstraintSpec(in *management.SpaceConstraintSpec, out *SpaceConstraintSpec, s conversion.Scope) error { + return autoConvert_management_SpaceConstraintSpec_To_v1_SpaceConstraintSpec(in, out, s) +} + +func autoConvert_v1_SpaceConstraintStatus_To_management_SpaceConstraintStatus(in *SpaceConstraintStatus, out *management.SpaceConstraintStatus, s conversion.Scope) error { + out.SpaceConstraintStatus = in.SpaceConstraintStatus + out.ClusterRole = (*clusterv1.EntityInfo)(unsafe.Pointer(in.ClusterRole)) + out.Clusters = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Clusters)) + return nil +} + +// Convert_v1_SpaceConstraintStatus_To_management_SpaceConstraintStatus is an autogenerated conversion function. +func Convert_v1_SpaceConstraintStatus_To_management_SpaceConstraintStatus(in *SpaceConstraintStatus, out *management.SpaceConstraintStatus, s conversion.Scope) error { + return autoConvert_v1_SpaceConstraintStatus_To_management_SpaceConstraintStatus(in, out, s) +} + +func autoConvert_management_SpaceConstraintStatus_To_v1_SpaceConstraintStatus(in *management.SpaceConstraintStatus, out *SpaceConstraintStatus, s conversion.Scope) error { + out.SpaceConstraintStatus = in.SpaceConstraintStatus + out.ClusterRole = (*clusterv1.EntityInfo)(unsafe.Pointer(in.ClusterRole)) + out.Clusters = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Clusters)) + return nil +} + +// Convert_management_SpaceConstraintStatus_To_v1_SpaceConstraintStatus is an autogenerated conversion function. +func Convert_management_SpaceConstraintStatus_To_v1_SpaceConstraintStatus(in *management.SpaceConstraintStatus, out *SpaceConstraintStatus, s conversion.Scope) error { + return autoConvert_management_SpaceConstraintStatus_To_v1_SpaceConstraintStatus(in, out, s) +} + +func autoConvert_v1_SpaceInstance_To_management_SpaceInstance(in *SpaceInstance, out *management.SpaceInstance, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SpaceInstanceSpec_To_management_SpaceInstanceSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SpaceInstanceStatus_To_management_SpaceInstanceStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_SpaceInstance_To_management_SpaceInstance is an autogenerated conversion function. +func Convert_v1_SpaceInstance_To_management_SpaceInstance(in *SpaceInstance, out *management.SpaceInstance, s conversion.Scope) error { + return autoConvert_v1_SpaceInstance_To_management_SpaceInstance(in, out, s) +} + +func autoConvert_management_SpaceInstance_To_v1_SpaceInstance(in *management.SpaceInstance, out *SpaceInstance, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_SpaceInstanceSpec_To_v1_SpaceInstanceSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_SpaceInstanceStatus_To_v1_SpaceInstanceStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_SpaceInstance_To_v1_SpaceInstance is an autogenerated conversion function. +func Convert_management_SpaceInstance_To_v1_SpaceInstance(in *management.SpaceInstance, out *SpaceInstance, s conversion.Scope) error { + return autoConvert_management_SpaceInstance_To_v1_SpaceInstance(in, out, s) +} + +func autoConvert_v1_SpaceInstanceList_To_management_SpaceInstanceList(in *SpaceInstanceList, out *management.SpaceInstanceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.SpaceInstance)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_SpaceInstanceList_To_management_SpaceInstanceList is an autogenerated conversion function. +func Convert_v1_SpaceInstanceList_To_management_SpaceInstanceList(in *SpaceInstanceList, out *management.SpaceInstanceList, s conversion.Scope) error { + return autoConvert_v1_SpaceInstanceList_To_management_SpaceInstanceList(in, out, s) +} + +func autoConvert_management_SpaceInstanceList_To_v1_SpaceInstanceList(in *management.SpaceInstanceList, out *SpaceInstanceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SpaceInstance)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_SpaceInstanceList_To_v1_SpaceInstanceList is an autogenerated conversion function. +func Convert_management_SpaceInstanceList_To_v1_SpaceInstanceList(in *management.SpaceInstanceList, out *SpaceInstanceList, s conversion.Scope) error { + return autoConvert_management_SpaceInstanceList_To_v1_SpaceInstanceList(in, out, s) +} + +func autoConvert_v1_SpaceInstanceSpec_To_management_SpaceInstanceSpec(in *SpaceInstanceSpec, out *management.SpaceInstanceSpec, s conversion.Scope) error { + out.SpaceInstanceSpec = in.SpaceInstanceSpec + return nil +} + +// Convert_v1_SpaceInstanceSpec_To_management_SpaceInstanceSpec is an autogenerated conversion function. +func Convert_v1_SpaceInstanceSpec_To_management_SpaceInstanceSpec(in *SpaceInstanceSpec, out *management.SpaceInstanceSpec, s conversion.Scope) error { + return autoConvert_v1_SpaceInstanceSpec_To_management_SpaceInstanceSpec(in, out, s) +} + +func autoConvert_management_SpaceInstanceSpec_To_v1_SpaceInstanceSpec(in *management.SpaceInstanceSpec, out *SpaceInstanceSpec, s conversion.Scope) error { + out.SpaceInstanceSpec = in.SpaceInstanceSpec + return nil +} + +// Convert_management_SpaceInstanceSpec_To_v1_SpaceInstanceSpec is an autogenerated conversion function. +func Convert_management_SpaceInstanceSpec_To_v1_SpaceInstanceSpec(in *management.SpaceInstanceSpec, out *SpaceInstanceSpec, s conversion.Scope) error { + return autoConvert_management_SpaceInstanceSpec_To_v1_SpaceInstanceSpec(in, out, s) +} + +func autoConvert_v1_SpaceInstanceStatus_To_management_SpaceInstanceStatus(in *SpaceInstanceStatus, out *management.SpaceInstanceStatus, s conversion.Scope) error { + out.SpaceInstanceStatus = in.SpaceInstanceStatus + out.SleepModeConfig = (*clusterv1.SleepModeConfig)(unsafe.Pointer(in.SleepModeConfig)) + out.CanUse = in.CanUse + out.CanUpdate = in.CanUpdate + return nil +} + +// Convert_v1_SpaceInstanceStatus_To_management_SpaceInstanceStatus is an autogenerated conversion function. +func Convert_v1_SpaceInstanceStatus_To_management_SpaceInstanceStatus(in *SpaceInstanceStatus, out *management.SpaceInstanceStatus, s conversion.Scope) error { + return autoConvert_v1_SpaceInstanceStatus_To_management_SpaceInstanceStatus(in, out, s) +} + +func autoConvert_management_SpaceInstanceStatus_To_v1_SpaceInstanceStatus(in *management.SpaceInstanceStatus, out *SpaceInstanceStatus, s conversion.Scope) error { + out.SpaceInstanceStatus = in.SpaceInstanceStatus + out.SleepModeConfig = (*clusterv1.SleepModeConfig)(unsafe.Pointer(in.SleepModeConfig)) + out.CanUse = in.CanUse + out.CanUpdate = in.CanUpdate + return nil +} + +// Convert_management_SpaceInstanceStatus_To_v1_SpaceInstanceStatus is an autogenerated conversion function. +func Convert_management_SpaceInstanceStatus_To_v1_SpaceInstanceStatus(in *management.SpaceInstanceStatus, out *SpaceInstanceStatus, s conversion.Scope) error { + return autoConvert_management_SpaceInstanceStatus_To_v1_SpaceInstanceStatus(in, out, s) +} + +func autoConvert_v1_SpaceTemplate_To_management_SpaceTemplate(in *SpaceTemplate, out *management.SpaceTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SpaceTemplateSpec_To_management_SpaceTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SpaceTemplateStatus_To_management_SpaceTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_SpaceTemplate_To_management_SpaceTemplate is an autogenerated conversion function. +func Convert_v1_SpaceTemplate_To_management_SpaceTemplate(in *SpaceTemplate, out *management.SpaceTemplate, s conversion.Scope) error { + return autoConvert_v1_SpaceTemplate_To_management_SpaceTemplate(in, out, s) +} + +func autoConvert_management_SpaceTemplate_To_v1_SpaceTemplate(in *management.SpaceTemplate, out *SpaceTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_SpaceTemplateSpec_To_v1_SpaceTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_SpaceTemplateStatus_To_v1_SpaceTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_SpaceTemplate_To_v1_SpaceTemplate is an autogenerated conversion function. +func Convert_management_SpaceTemplate_To_v1_SpaceTemplate(in *management.SpaceTemplate, out *SpaceTemplate, s conversion.Scope) error { + return autoConvert_management_SpaceTemplate_To_v1_SpaceTemplate(in, out, s) +} + +func autoConvert_v1_SpaceTemplateList_To_management_SpaceTemplateList(in *SpaceTemplateList, out *management.SpaceTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.SpaceTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_SpaceTemplateList_To_management_SpaceTemplateList is an autogenerated conversion function. +func Convert_v1_SpaceTemplateList_To_management_SpaceTemplateList(in *SpaceTemplateList, out *management.SpaceTemplateList, s conversion.Scope) error { + return autoConvert_v1_SpaceTemplateList_To_management_SpaceTemplateList(in, out, s) +} + +func autoConvert_management_SpaceTemplateList_To_v1_SpaceTemplateList(in *management.SpaceTemplateList, out *SpaceTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SpaceTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_SpaceTemplateList_To_v1_SpaceTemplateList is an autogenerated conversion function. +func Convert_management_SpaceTemplateList_To_v1_SpaceTemplateList(in *management.SpaceTemplateList, out *SpaceTemplateList, s conversion.Scope) error { + return autoConvert_management_SpaceTemplateList_To_v1_SpaceTemplateList(in, out, s) +} + +func autoConvert_v1_SpaceTemplateSpec_To_management_SpaceTemplateSpec(in *SpaceTemplateSpec, out *management.SpaceTemplateSpec, s conversion.Scope) error { + out.SpaceTemplateSpec = in.SpaceTemplateSpec + return nil +} + +// Convert_v1_SpaceTemplateSpec_To_management_SpaceTemplateSpec is an autogenerated conversion function. +func Convert_v1_SpaceTemplateSpec_To_management_SpaceTemplateSpec(in *SpaceTemplateSpec, out *management.SpaceTemplateSpec, s conversion.Scope) error { + return autoConvert_v1_SpaceTemplateSpec_To_management_SpaceTemplateSpec(in, out, s) +} + +func autoConvert_management_SpaceTemplateSpec_To_v1_SpaceTemplateSpec(in *management.SpaceTemplateSpec, out *SpaceTemplateSpec, s conversion.Scope) error { + out.SpaceTemplateSpec = in.SpaceTemplateSpec + return nil +} + +// Convert_management_SpaceTemplateSpec_To_v1_SpaceTemplateSpec is an autogenerated conversion function. +func Convert_management_SpaceTemplateSpec_To_v1_SpaceTemplateSpec(in *management.SpaceTemplateSpec, out *SpaceTemplateSpec, s conversion.Scope) error { + return autoConvert_management_SpaceTemplateSpec_To_v1_SpaceTemplateSpec(in, out, s) +} + +func autoConvert_v1_SpaceTemplateStatus_To_management_SpaceTemplateStatus(in *SpaceTemplateStatus, out *management.SpaceTemplateStatus, s conversion.Scope) error { + out.SpaceTemplateStatus = in.SpaceTemplateStatus + out.Apps = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Apps)) + return nil +} + +// Convert_v1_SpaceTemplateStatus_To_management_SpaceTemplateStatus is an autogenerated conversion function. +func Convert_v1_SpaceTemplateStatus_To_management_SpaceTemplateStatus(in *SpaceTemplateStatus, out *management.SpaceTemplateStatus, s conversion.Scope) error { + return autoConvert_v1_SpaceTemplateStatus_To_management_SpaceTemplateStatus(in, out, s) +} + +func autoConvert_management_SpaceTemplateStatus_To_v1_SpaceTemplateStatus(in *management.SpaceTemplateStatus, out *SpaceTemplateStatus, s conversion.Scope) error { + out.SpaceTemplateStatus = in.SpaceTemplateStatus + out.Apps = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Apps)) + return nil +} + +// Convert_management_SpaceTemplateStatus_To_v1_SpaceTemplateStatus is an autogenerated conversion function. +func Convert_management_SpaceTemplateStatus_To_v1_SpaceTemplateStatus(in *management.SpaceTemplateStatus, out *SpaceTemplateStatus, s conversion.Scope) error { + return autoConvert_management_SpaceTemplateStatus_To_v1_SpaceTemplateStatus(in, out, s) +} + +func autoConvert_v1_SubjectAccessReview_To_management_SubjectAccessReview(in *SubjectAccessReview, out *management.SubjectAccessReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SubjectAccessReviewSpec_To_management_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SubjectAccessReviewStatus_To_management_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_SubjectAccessReview_To_management_SubjectAccessReview is an autogenerated conversion function. +func Convert_v1_SubjectAccessReview_To_management_SubjectAccessReview(in *SubjectAccessReview, out *management.SubjectAccessReview, s conversion.Scope) error { + return autoConvert_v1_SubjectAccessReview_To_management_SubjectAccessReview(in, out, s) +} + +func autoConvert_management_SubjectAccessReview_To_v1_SubjectAccessReview(in *management.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_SubjectAccessReview_To_v1_SubjectAccessReview is an autogenerated conversion function. +func Convert_management_SubjectAccessReview_To_v1_SubjectAccessReview(in *management.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error { + return autoConvert_management_SubjectAccessReview_To_v1_SubjectAccessReview(in, out, s) +} + +func autoConvert_v1_SubjectAccessReviewList_To_management_SubjectAccessReviewList(in *SubjectAccessReviewList, out *management.SubjectAccessReviewList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.SubjectAccessReview)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_SubjectAccessReviewList_To_management_SubjectAccessReviewList is an autogenerated conversion function. +func Convert_v1_SubjectAccessReviewList_To_management_SubjectAccessReviewList(in *SubjectAccessReviewList, out *management.SubjectAccessReviewList, s conversion.Scope) error { + return autoConvert_v1_SubjectAccessReviewList_To_management_SubjectAccessReviewList(in, out, s) +} + +func autoConvert_management_SubjectAccessReviewList_To_v1_SubjectAccessReviewList(in *management.SubjectAccessReviewList, out *SubjectAccessReviewList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SubjectAccessReview)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_SubjectAccessReviewList_To_v1_SubjectAccessReviewList is an autogenerated conversion function. +func Convert_management_SubjectAccessReviewList_To_v1_SubjectAccessReviewList(in *management.SubjectAccessReviewList, out *SubjectAccessReviewList, s conversion.Scope) error { + return autoConvert_management_SubjectAccessReviewList_To_v1_SubjectAccessReviewList(in, out, s) +} + +func autoConvert_v1_SubjectAccessReviewSpec_To_management_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *management.SubjectAccessReviewSpec, s conversion.Scope) error { + out.SubjectAccessReviewSpec = in.SubjectAccessReviewSpec + return nil +} + +// Convert_v1_SubjectAccessReviewSpec_To_management_SubjectAccessReviewSpec is an autogenerated conversion function. +func Convert_v1_SubjectAccessReviewSpec_To_management_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *management.SubjectAccessReviewSpec, s conversion.Scope) error { + return autoConvert_v1_SubjectAccessReviewSpec_To_management_SubjectAccessReviewSpec(in, out, s) +} + +func autoConvert_management_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in *management.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error { + out.SubjectAccessReviewSpec = in.SubjectAccessReviewSpec + return nil +} + +// Convert_management_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec is an autogenerated conversion function. +func Convert_management_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in *management.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error { + return autoConvert_management_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in, out, s) +} + +func autoConvert_v1_SubjectAccessReviewStatus_To_management_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *management.SubjectAccessReviewStatus, s conversion.Scope) error { + out.SubjectAccessReviewStatus = in.SubjectAccessReviewStatus + return nil +} + +// Convert_v1_SubjectAccessReviewStatus_To_management_SubjectAccessReviewStatus is an autogenerated conversion function. +func Convert_v1_SubjectAccessReviewStatus_To_management_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *management.SubjectAccessReviewStatus, s conversion.Scope) error { + return autoConvert_v1_SubjectAccessReviewStatus_To_management_SubjectAccessReviewStatus(in, out, s) +} + +func autoConvert_management_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in *management.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error { + out.SubjectAccessReviewStatus = in.SubjectAccessReviewStatus + return nil +} + +// Convert_management_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus is an autogenerated conversion function. +func Convert_management_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in *management.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error { + return autoConvert_management_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in, out, s) +} + +func autoConvert_v1_Task_To_management_Task(in *Task, out *management.Task, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_TaskSpec_To_management_TaskSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_TaskStatus_To_management_TaskStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Task_To_management_Task is an autogenerated conversion function. +func Convert_v1_Task_To_management_Task(in *Task, out *management.Task, s conversion.Scope) error { + return autoConvert_v1_Task_To_management_Task(in, out, s) +} + +func autoConvert_management_Task_To_v1_Task(in *management.Task, out *Task, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_TaskSpec_To_v1_TaskSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_TaskStatus_To_v1_TaskStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Task_To_v1_Task is an autogenerated conversion function. +func Convert_management_Task_To_v1_Task(in *management.Task, out *Task, s conversion.Scope) error { + return autoConvert_management_Task_To_v1_Task(in, out, s) +} + +func autoConvert_v1_TaskList_To_management_TaskList(in *TaskList, out *management.TaskList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Task)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_TaskList_To_management_TaskList is an autogenerated conversion function. +func Convert_v1_TaskList_To_management_TaskList(in *TaskList, out *management.TaskList, s conversion.Scope) error { + return autoConvert_v1_TaskList_To_management_TaskList(in, out, s) +} + +func autoConvert_management_TaskList_To_v1_TaskList(in *management.TaskList, out *TaskList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Task)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_TaskList_To_v1_TaskList is an autogenerated conversion function. +func Convert_management_TaskList_To_v1_TaskList(in *management.TaskList, out *TaskList, s conversion.Scope) error { + return autoConvert_management_TaskList_To_v1_TaskList(in, out, s) +} + +func autoConvert_v1_TaskLog_To_management_TaskLog(in *TaskLog, out *management.TaskLog, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_v1_TaskLog_To_management_TaskLog is an autogenerated conversion function. +func Convert_v1_TaskLog_To_management_TaskLog(in *TaskLog, out *management.TaskLog, s conversion.Scope) error { + return autoConvert_v1_TaskLog_To_management_TaskLog(in, out, s) +} + +func autoConvert_management_TaskLog_To_v1_TaskLog(in *management.TaskLog, out *TaskLog, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_management_TaskLog_To_v1_TaskLog is an autogenerated conversion function. +func Convert_management_TaskLog_To_v1_TaskLog(in *management.TaskLog, out *TaskLog, s conversion.Scope) error { + return autoConvert_management_TaskLog_To_v1_TaskLog(in, out, s) +} + +func autoConvert_v1_TaskLogList_To_management_TaskLogList(in *TaskLogList, out *management.TaskLogList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.TaskLog)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_TaskLogList_To_management_TaskLogList is an autogenerated conversion function. +func Convert_v1_TaskLogList_To_management_TaskLogList(in *TaskLogList, out *management.TaskLogList, s conversion.Scope) error { + return autoConvert_v1_TaskLogList_To_management_TaskLogList(in, out, s) +} + +func autoConvert_management_TaskLogList_To_v1_TaskLogList(in *management.TaskLogList, out *TaskLogList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]TaskLog)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_TaskLogList_To_v1_TaskLogList is an autogenerated conversion function. +func Convert_management_TaskLogList_To_v1_TaskLogList(in *management.TaskLogList, out *TaskLogList, s conversion.Scope) error { + return autoConvert_management_TaskLogList_To_v1_TaskLogList(in, out, s) +} + +func autoConvert_v1_TaskLogOptions_To_management_TaskLogOptions(in *TaskLogOptions, out *management.TaskLogOptions, s conversion.Scope) error { + out.Follow = in.Follow + out.Previous = in.Previous + out.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds)) + out.SinceTime = (*metav1.Time)(unsafe.Pointer(in.SinceTime)) + out.Timestamps = in.Timestamps + out.TailLines = (*int64)(unsafe.Pointer(in.TailLines)) + out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes)) + out.InsecureSkipTLSVerifyBackend = in.InsecureSkipTLSVerifyBackend + return nil +} + +// Convert_v1_TaskLogOptions_To_management_TaskLogOptions is an autogenerated conversion function. +func Convert_v1_TaskLogOptions_To_management_TaskLogOptions(in *TaskLogOptions, out *management.TaskLogOptions, s conversion.Scope) error { + return autoConvert_v1_TaskLogOptions_To_management_TaskLogOptions(in, out, s) +} + +func autoConvert_management_TaskLogOptions_To_v1_TaskLogOptions(in *management.TaskLogOptions, out *TaskLogOptions, s conversion.Scope) error { + out.Follow = in.Follow + out.Previous = in.Previous + out.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds)) + out.SinceTime = (*metav1.Time)(unsafe.Pointer(in.SinceTime)) + out.Timestamps = in.Timestamps + out.TailLines = (*int64)(unsafe.Pointer(in.TailLines)) + out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes)) + out.InsecureSkipTLSVerifyBackend = in.InsecureSkipTLSVerifyBackend + return nil +} + +// Convert_management_TaskLogOptions_To_v1_TaskLogOptions is an autogenerated conversion function. +func Convert_management_TaskLogOptions_To_v1_TaskLogOptions(in *management.TaskLogOptions, out *TaskLogOptions, s conversion.Scope) error { + return autoConvert_management_TaskLogOptions_To_v1_TaskLogOptions(in, out, s) +} + +func autoConvert_url_Values_To_v1_TaskLogOptions(in *url.Values, out *TaskLogOptions, s conversion.Scope) error { + // WARNING: Field TypeMeta does not have json tag, skipping. + + if values, ok := map[string][]string(*in)["follow"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_bool(&values, &out.Follow, s); err != nil { + return err + } + } else { + out.Follow = false + } + if values, ok := map[string][]string(*in)["previous"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_bool(&values, &out.Previous, s); err != nil { + return err + } + } else { + out.Previous = false + } + if values, ok := map[string][]string(*in)["sinceSeconds"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_Pointer_int64(&values, &out.SinceSeconds, s); err != nil { + return err + } + } else { + out.SinceSeconds = nil + } + if values, ok := map[string][]string(*in)["sinceTime"]; ok && len(values) > 0 { + if err := metav1.Convert_Slice_string_To_Pointer_v1_Time(&values, &out.SinceTime, s); err != nil { + return err + } + } else { + out.SinceTime = nil + } + if values, ok := map[string][]string(*in)["timestamps"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_bool(&values, &out.Timestamps, s); err != nil { + return err + } + } else { + out.Timestamps = false + } + if values, ok := map[string][]string(*in)["tailLines"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_Pointer_int64(&values, &out.TailLines, s); err != nil { + return err + } + } else { + out.TailLines = nil + } + if values, ok := map[string][]string(*in)["limitBytes"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_Pointer_int64(&values, &out.LimitBytes, s); err != nil { + return err + } + } else { + out.LimitBytes = nil + } + if values, ok := map[string][]string(*in)["insecureSkipTLSVerifyBackend"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_bool(&values, &out.InsecureSkipTLSVerifyBackend, s); err != nil { + return err + } + } else { + out.InsecureSkipTLSVerifyBackend = false + } + return nil +} + +// Convert_url_Values_To_v1_TaskLogOptions is an autogenerated conversion function. +func Convert_url_Values_To_v1_TaskLogOptions(in *url.Values, out *TaskLogOptions, s conversion.Scope) error { + return autoConvert_url_Values_To_v1_TaskLogOptions(in, out, s) +} + +func autoConvert_v1_TaskSpec_To_management_TaskSpec(in *TaskSpec, out *management.TaskSpec, s conversion.Scope) error { + out.TaskSpec = in.TaskSpec + return nil +} + +// Convert_v1_TaskSpec_To_management_TaskSpec is an autogenerated conversion function. +func Convert_v1_TaskSpec_To_management_TaskSpec(in *TaskSpec, out *management.TaskSpec, s conversion.Scope) error { + return autoConvert_v1_TaskSpec_To_management_TaskSpec(in, out, s) +} + +func autoConvert_management_TaskSpec_To_v1_TaskSpec(in *management.TaskSpec, out *TaskSpec, s conversion.Scope) error { + out.TaskSpec = in.TaskSpec + return nil +} + +// Convert_management_TaskSpec_To_v1_TaskSpec is an autogenerated conversion function. +func Convert_management_TaskSpec_To_v1_TaskSpec(in *management.TaskSpec, out *TaskSpec, s conversion.Scope) error { + return autoConvert_management_TaskSpec_To_v1_TaskSpec(in, out, s) +} + +func autoConvert_v1_TaskStatus_To_management_TaskStatus(in *TaskStatus, out *management.TaskStatus, s conversion.Scope) error { + out.TaskStatus = in.TaskStatus + out.Owner = (*clusterv1.UserOrTeam)(unsafe.Pointer(in.Owner)) + out.Cluster = (*clusterv1.EntityInfo)(unsafe.Pointer(in.Cluster)) + return nil +} + +// Convert_v1_TaskStatus_To_management_TaskStatus is an autogenerated conversion function. +func Convert_v1_TaskStatus_To_management_TaskStatus(in *TaskStatus, out *management.TaskStatus, s conversion.Scope) error { + return autoConvert_v1_TaskStatus_To_management_TaskStatus(in, out, s) +} + +func autoConvert_management_TaskStatus_To_v1_TaskStatus(in *management.TaskStatus, out *TaskStatus, s conversion.Scope) error { + out.TaskStatus = in.TaskStatus + out.Owner = (*clusterv1.UserOrTeam)(unsafe.Pointer(in.Owner)) + out.Cluster = (*clusterv1.EntityInfo)(unsafe.Pointer(in.Cluster)) + return nil +} + +// Convert_management_TaskStatus_To_v1_TaskStatus is an autogenerated conversion function. +func Convert_management_TaskStatus_To_v1_TaskStatus(in *management.TaskStatus, out *TaskStatus, s conversion.Scope) error { + return autoConvert_management_TaskStatus_To_v1_TaskStatus(in, out, s) +} + +func autoConvert_v1_Team_To_management_Team(in *Team, out *management.Team, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_TeamSpec_To_management_TeamSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_TeamStatus_To_management_TeamStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Team_To_management_Team is an autogenerated conversion function. +func Convert_v1_Team_To_management_Team(in *Team, out *management.Team, s conversion.Scope) error { + return autoConvert_v1_Team_To_management_Team(in, out, s) +} + +func autoConvert_management_Team_To_v1_Team(in *management.Team, out *Team, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_TeamSpec_To_v1_TeamSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_TeamStatus_To_v1_TeamStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_Team_To_v1_Team is an autogenerated conversion function. +func Convert_management_Team_To_v1_Team(in *management.Team, out *Team, s conversion.Scope) error { + return autoConvert_management_Team_To_v1_Team(in, out, s) +} + +func autoConvert_v1_TeamAccessKeys_To_management_TeamAccessKeys(in *TeamAccessKeys, out *management.TeamAccessKeys, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.AccessKeys = *(*[]management.OwnedAccessKey)(unsafe.Pointer(&in.AccessKeys)) + return nil +} + +// Convert_v1_TeamAccessKeys_To_management_TeamAccessKeys is an autogenerated conversion function. +func Convert_v1_TeamAccessKeys_To_management_TeamAccessKeys(in *TeamAccessKeys, out *management.TeamAccessKeys, s conversion.Scope) error { + return autoConvert_v1_TeamAccessKeys_To_management_TeamAccessKeys(in, out, s) +} + +func autoConvert_management_TeamAccessKeys_To_v1_TeamAccessKeys(in *management.TeamAccessKeys, out *TeamAccessKeys, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.AccessKeys = *(*[]OwnedAccessKey)(unsafe.Pointer(&in.AccessKeys)) + return nil +} + +// Convert_management_TeamAccessKeys_To_v1_TeamAccessKeys is an autogenerated conversion function. +func Convert_management_TeamAccessKeys_To_v1_TeamAccessKeys(in *management.TeamAccessKeys, out *TeamAccessKeys, s conversion.Scope) error { + return autoConvert_management_TeamAccessKeys_To_v1_TeamAccessKeys(in, out, s) +} + +func autoConvert_v1_TeamAccessKeysList_To_management_TeamAccessKeysList(in *TeamAccessKeysList, out *management.TeamAccessKeysList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.TeamAccessKeys)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_TeamAccessKeysList_To_management_TeamAccessKeysList is an autogenerated conversion function. +func Convert_v1_TeamAccessKeysList_To_management_TeamAccessKeysList(in *TeamAccessKeysList, out *management.TeamAccessKeysList, s conversion.Scope) error { + return autoConvert_v1_TeamAccessKeysList_To_management_TeamAccessKeysList(in, out, s) +} + +func autoConvert_management_TeamAccessKeysList_To_v1_TeamAccessKeysList(in *management.TeamAccessKeysList, out *TeamAccessKeysList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]TeamAccessKeys)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_TeamAccessKeysList_To_v1_TeamAccessKeysList is an autogenerated conversion function. +func Convert_management_TeamAccessKeysList_To_v1_TeamAccessKeysList(in *management.TeamAccessKeysList, out *TeamAccessKeysList, s conversion.Scope) error { + return autoConvert_management_TeamAccessKeysList_To_v1_TeamAccessKeysList(in, out, s) +} + +func autoConvert_v1_TeamClusters_To_management_TeamClusters(in *TeamClusters, out *management.TeamClusters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Clusters = *(*[]management.ClusterAccounts)(unsafe.Pointer(&in.Clusters)) + return nil +} + +// Convert_v1_TeamClusters_To_management_TeamClusters is an autogenerated conversion function. +func Convert_v1_TeamClusters_To_management_TeamClusters(in *TeamClusters, out *management.TeamClusters, s conversion.Scope) error { + return autoConvert_v1_TeamClusters_To_management_TeamClusters(in, out, s) +} + +func autoConvert_management_TeamClusters_To_v1_TeamClusters(in *management.TeamClusters, out *TeamClusters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Clusters = *(*[]ClusterAccounts)(unsafe.Pointer(&in.Clusters)) + return nil +} + +// Convert_management_TeamClusters_To_v1_TeamClusters is an autogenerated conversion function. +func Convert_management_TeamClusters_To_v1_TeamClusters(in *management.TeamClusters, out *TeamClusters, s conversion.Scope) error { + return autoConvert_management_TeamClusters_To_v1_TeamClusters(in, out, s) +} + +func autoConvert_v1_TeamClustersList_To_management_TeamClustersList(in *TeamClustersList, out *management.TeamClustersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.TeamClusters)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_TeamClustersList_To_management_TeamClustersList is an autogenerated conversion function. +func Convert_v1_TeamClustersList_To_management_TeamClustersList(in *TeamClustersList, out *management.TeamClustersList, s conversion.Scope) error { + return autoConvert_v1_TeamClustersList_To_management_TeamClustersList(in, out, s) +} + +func autoConvert_management_TeamClustersList_To_v1_TeamClustersList(in *management.TeamClustersList, out *TeamClustersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]TeamClusters)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_TeamClustersList_To_v1_TeamClustersList is an autogenerated conversion function. +func Convert_management_TeamClustersList_To_v1_TeamClustersList(in *management.TeamClustersList, out *TeamClustersList, s conversion.Scope) error { + return autoConvert_management_TeamClustersList_To_v1_TeamClustersList(in, out, s) +} + +func autoConvert_v1_TeamList_To_management_TeamList(in *TeamList, out *management.TeamList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.Team)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_TeamList_To_management_TeamList is an autogenerated conversion function. +func Convert_v1_TeamList_To_management_TeamList(in *TeamList, out *management.TeamList, s conversion.Scope) error { + return autoConvert_v1_TeamList_To_management_TeamList(in, out, s) +} + +func autoConvert_management_TeamList_To_v1_TeamList(in *management.TeamList, out *TeamList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Team)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_TeamList_To_v1_TeamList is an autogenerated conversion function. +func Convert_management_TeamList_To_v1_TeamList(in *management.TeamList, out *TeamList, s conversion.Scope) error { + return autoConvert_management_TeamList_To_v1_TeamList(in, out, s) +} + +func autoConvert_v1_TeamSpec_To_management_TeamSpec(in *TeamSpec, out *management.TeamSpec, s conversion.Scope) error { + out.TeamSpec = in.TeamSpec + return nil +} + +// Convert_v1_TeamSpec_To_management_TeamSpec is an autogenerated conversion function. +func Convert_v1_TeamSpec_To_management_TeamSpec(in *TeamSpec, out *management.TeamSpec, s conversion.Scope) error { + return autoConvert_v1_TeamSpec_To_management_TeamSpec(in, out, s) +} + +func autoConvert_management_TeamSpec_To_v1_TeamSpec(in *management.TeamSpec, out *TeamSpec, s conversion.Scope) error { + out.TeamSpec = in.TeamSpec + return nil +} + +// Convert_management_TeamSpec_To_v1_TeamSpec is an autogenerated conversion function. +func Convert_management_TeamSpec_To_v1_TeamSpec(in *management.TeamSpec, out *TeamSpec, s conversion.Scope) error { + return autoConvert_management_TeamSpec_To_v1_TeamSpec(in, out, s) +} + +func autoConvert_v1_TeamStatus_To_management_TeamStatus(in *TeamStatus, out *management.TeamStatus, s conversion.Scope) error { + out.TeamStatus = in.TeamStatus + return nil +} + +// Convert_v1_TeamStatus_To_management_TeamStatus is an autogenerated conversion function. +func Convert_v1_TeamStatus_To_management_TeamStatus(in *TeamStatus, out *management.TeamStatus, s conversion.Scope) error { + return autoConvert_v1_TeamStatus_To_management_TeamStatus(in, out, s) +} + +func autoConvert_management_TeamStatus_To_v1_TeamStatus(in *management.TeamStatus, out *TeamStatus, s conversion.Scope) error { + out.TeamStatus = in.TeamStatus + return nil +} + +// Convert_management_TeamStatus_To_v1_TeamStatus is an autogenerated conversion function. +func Convert_management_TeamStatus_To_v1_TeamStatus(in *management.TeamStatus, out *TeamStatus, s conversion.Scope) error { + return autoConvert_management_TeamStatus_To_v1_TeamStatus(in, out, s) +} + +func autoConvert_v1_User_To_management_User(in *User, out *management.User, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_UserSpec_To_management_UserSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_UserStatus_To_management_UserStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_User_To_management_User is an autogenerated conversion function. +func Convert_v1_User_To_management_User(in *User, out *management.User, s conversion.Scope) error { + return autoConvert_v1_User_To_management_User(in, out, s) +} + +func autoConvert_management_User_To_v1_User(in *management.User, out *User, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_UserSpec_To_v1_UserSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_UserStatus_To_v1_UserStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_User_To_v1_User is an autogenerated conversion function. +func Convert_management_User_To_v1_User(in *management.User, out *User, s conversion.Scope) error { + return autoConvert_management_User_To_v1_User(in, out, s) +} + +func autoConvert_v1_UserAccessKeys_To_management_UserAccessKeys(in *UserAccessKeys, out *management.UserAccessKeys, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.AccessKeys = *(*[]management.OwnedAccessKey)(unsafe.Pointer(&in.AccessKeys)) + return nil +} + +// Convert_v1_UserAccessKeys_To_management_UserAccessKeys is an autogenerated conversion function. +func Convert_v1_UserAccessKeys_To_management_UserAccessKeys(in *UserAccessKeys, out *management.UserAccessKeys, s conversion.Scope) error { + return autoConvert_v1_UserAccessKeys_To_management_UserAccessKeys(in, out, s) +} + +func autoConvert_management_UserAccessKeys_To_v1_UserAccessKeys(in *management.UserAccessKeys, out *UserAccessKeys, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.AccessKeys = *(*[]OwnedAccessKey)(unsafe.Pointer(&in.AccessKeys)) + return nil +} + +// Convert_management_UserAccessKeys_To_v1_UserAccessKeys is an autogenerated conversion function. +func Convert_management_UserAccessKeys_To_v1_UserAccessKeys(in *management.UserAccessKeys, out *UserAccessKeys, s conversion.Scope) error { + return autoConvert_management_UserAccessKeys_To_v1_UserAccessKeys(in, out, s) +} + +func autoConvert_v1_UserAccessKeysList_To_management_UserAccessKeysList(in *UserAccessKeysList, out *management.UserAccessKeysList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.UserAccessKeys)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_UserAccessKeysList_To_management_UserAccessKeysList is an autogenerated conversion function. +func Convert_v1_UserAccessKeysList_To_management_UserAccessKeysList(in *UserAccessKeysList, out *management.UserAccessKeysList, s conversion.Scope) error { + return autoConvert_v1_UserAccessKeysList_To_management_UserAccessKeysList(in, out, s) +} + +func autoConvert_management_UserAccessKeysList_To_v1_UserAccessKeysList(in *management.UserAccessKeysList, out *UserAccessKeysList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]UserAccessKeys)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_UserAccessKeysList_To_v1_UserAccessKeysList is an autogenerated conversion function. +func Convert_management_UserAccessKeysList_To_v1_UserAccessKeysList(in *management.UserAccessKeysList, out *UserAccessKeysList, s conversion.Scope) error { + return autoConvert_management_UserAccessKeysList_To_v1_UserAccessKeysList(in, out, s) +} + +func autoConvert_v1_UserClusters_To_management_UserClusters(in *UserClusters, out *management.UserClusters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Clusters = *(*[]management.ClusterAccounts)(unsafe.Pointer(&in.Clusters)) + return nil +} + +// Convert_v1_UserClusters_To_management_UserClusters is an autogenerated conversion function. +func Convert_v1_UserClusters_To_management_UserClusters(in *UserClusters, out *management.UserClusters, s conversion.Scope) error { + return autoConvert_v1_UserClusters_To_management_UserClusters(in, out, s) +} + +func autoConvert_management_UserClusters_To_v1_UserClusters(in *management.UserClusters, out *UserClusters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Clusters = *(*[]ClusterAccounts)(unsafe.Pointer(&in.Clusters)) + return nil +} + +// Convert_management_UserClusters_To_v1_UserClusters is an autogenerated conversion function. +func Convert_management_UserClusters_To_v1_UserClusters(in *management.UserClusters, out *UserClusters, s conversion.Scope) error { + return autoConvert_management_UserClusters_To_v1_UserClusters(in, out, s) +} + +func autoConvert_v1_UserClustersList_To_management_UserClustersList(in *UserClustersList, out *management.UserClustersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.UserClusters)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_UserClustersList_To_management_UserClustersList is an autogenerated conversion function. +func Convert_v1_UserClustersList_To_management_UserClustersList(in *UserClustersList, out *management.UserClustersList, s conversion.Scope) error { + return autoConvert_v1_UserClustersList_To_management_UserClustersList(in, out, s) +} + +func autoConvert_management_UserClustersList_To_v1_UserClustersList(in *management.UserClustersList, out *UserClustersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]UserClusters)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_UserClustersList_To_v1_UserClustersList is an autogenerated conversion function. +func Convert_management_UserClustersList_To_v1_UserClustersList(in *management.UserClustersList, out *UserClustersList, s conversion.Scope) error { + return autoConvert_management_UserClustersList_To_v1_UserClustersList(in, out, s) +} + +func autoConvert_v1_UserInfo_To_management_UserInfo(in *UserInfo, out *management.UserInfo, s conversion.Scope) error { + out.EntityInfo = in.EntityInfo + out.Teams = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Teams)) + return nil +} + +// Convert_v1_UserInfo_To_management_UserInfo is an autogenerated conversion function. +func Convert_v1_UserInfo_To_management_UserInfo(in *UserInfo, out *management.UserInfo, s conversion.Scope) error { + return autoConvert_v1_UserInfo_To_management_UserInfo(in, out, s) +} + +func autoConvert_management_UserInfo_To_v1_UserInfo(in *management.UserInfo, out *UserInfo, s conversion.Scope) error { + out.EntityInfo = in.EntityInfo + out.Teams = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Teams)) + return nil +} + +// Convert_management_UserInfo_To_v1_UserInfo is an autogenerated conversion function. +func Convert_management_UserInfo_To_v1_UserInfo(in *management.UserInfo, out *UserInfo, s conversion.Scope) error { + return autoConvert_management_UserInfo_To_v1_UserInfo(in, out, s) +} + +func autoConvert_v1_UserList_To_management_UserList(in *UserList, out *management.UserList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.User)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_UserList_To_management_UserList is an autogenerated conversion function. +func Convert_v1_UserList_To_management_UserList(in *UserList, out *management.UserList, s conversion.Scope) error { + return autoConvert_v1_UserList_To_management_UserList(in, out, s) +} + +func autoConvert_management_UserList_To_v1_UserList(in *management.UserList, out *UserList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]User)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_UserList_To_v1_UserList is an autogenerated conversion function. +func Convert_management_UserList_To_v1_UserList(in *management.UserList, out *UserList, s conversion.Scope) error { + return autoConvert_management_UserList_To_v1_UserList(in, out, s) +} + +func autoConvert_v1_UserPermissions_To_management_UserPermissions(in *UserPermissions, out *management.UserPermissions, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ClusterRoles = *(*[]management.UserPermissionsRole)(unsafe.Pointer(&in.ClusterRoles)) + out.NamespaceRoles = *(*[]management.UserPermissionsRole)(unsafe.Pointer(&in.NamespaceRoles)) + return nil +} + +// Convert_v1_UserPermissions_To_management_UserPermissions is an autogenerated conversion function. +func Convert_v1_UserPermissions_To_management_UserPermissions(in *UserPermissions, out *management.UserPermissions, s conversion.Scope) error { + return autoConvert_v1_UserPermissions_To_management_UserPermissions(in, out, s) +} + +func autoConvert_management_UserPermissions_To_v1_UserPermissions(in *management.UserPermissions, out *UserPermissions, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ClusterRoles = *(*[]UserPermissionsRole)(unsafe.Pointer(&in.ClusterRoles)) + out.NamespaceRoles = *(*[]UserPermissionsRole)(unsafe.Pointer(&in.NamespaceRoles)) + return nil +} + +// Convert_management_UserPermissions_To_v1_UserPermissions is an autogenerated conversion function. +func Convert_management_UserPermissions_To_v1_UserPermissions(in *management.UserPermissions, out *UserPermissions, s conversion.Scope) error { + return autoConvert_management_UserPermissions_To_v1_UserPermissions(in, out, s) +} + +func autoConvert_v1_UserPermissionsList_To_management_UserPermissionsList(in *UserPermissionsList, out *management.UserPermissionsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.UserPermissions)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_UserPermissionsList_To_management_UserPermissionsList is an autogenerated conversion function. +func Convert_v1_UserPermissionsList_To_management_UserPermissionsList(in *UserPermissionsList, out *management.UserPermissionsList, s conversion.Scope) error { + return autoConvert_v1_UserPermissionsList_To_management_UserPermissionsList(in, out, s) +} + +func autoConvert_management_UserPermissionsList_To_v1_UserPermissionsList(in *management.UserPermissionsList, out *UserPermissionsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]UserPermissions)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_UserPermissionsList_To_v1_UserPermissionsList is an autogenerated conversion function. +func Convert_management_UserPermissionsList_To_v1_UserPermissionsList(in *management.UserPermissionsList, out *UserPermissionsList, s conversion.Scope) error { + return autoConvert_management_UserPermissionsList_To_v1_UserPermissionsList(in, out, s) +} + +func autoConvert_v1_UserPermissionsRole_To_management_UserPermissionsRole(in *UserPermissionsRole, out *management.UserPermissionsRole, s conversion.Scope) error { + out.ClusterRole = in.ClusterRole + out.Role = in.Role + out.Namespace = in.Namespace + out.Rules = *(*[]rbacv1.PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +// Convert_v1_UserPermissionsRole_To_management_UserPermissionsRole is an autogenerated conversion function. +func Convert_v1_UserPermissionsRole_To_management_UserPermissionsRole(in *UserPermissionsRole, out *management.UserPermissionsRole, s conversion.Scope) error { + return autoConvert_v1_UserPermissionsRole_To_management_UserPermissionsRole(in, out, s) +} + +func autoConvert_management_UserPermissionsRole_To_v1_UserPermissionsRole(in *management.UserPermissionsRole, out *UserPermissionsRole, s conversion.Scope) error { + out.ClusterRole = in.ClusterRole + out.Role = in.Role + out.Namespace = in.Namespace + out.Rules = *(*[]rbacv1.PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +// Convert_management_UserPermissionsRole_To_v1_UserPermissionsRole is an autogenerated conversion function. +func Convert_management_UserPermissionsRole_To_v1_UserPermissionsRole(in *management.UserPermissionsRole, out *UserPermissionsRole, s conversion.Scope) error { + return autoConvert_management_UserPermissionsRole_To_v1_UserPermissionsRole(in, out, s) +} + +func autoConvert_v1_UserProfile_To_management_UserProfile(in *UserProfile, out *management.UserProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.DisplayName = in.DisplayName + out.Username = in.Username + out.Password = in.Password + out.CurrentPassword = in.CurrentPassword + out.Email = in.Email + out.Icon = (*string)(unsafe.Pointer(in.Icon)) + out.Custom = in.Custom + return nil +} + +// Convert_v1_UserProfile_To_management_UserProfile is an autogenerated conversion function. +func Convert_v1_UserProfile_To_management_UserProfile(in *UserProfile, out *management.UserProfile, s conversion.Scope) error { + return autoConvert_v1_UserProfile_To_management_UserProfile(in, out, s) +} + +func autoConvert_management_UserProfile_To_v1_UserProfile(in *management.UserProfile, out *UserProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.DisplayName = in.DisplayName + out.Username = in.Username + out.Password = in.Password + out.CurrentPassword = in.CurrentPassword + out.Email = in.Email + out.Icon = (*string)(unsafe.Pointer(in.Icon)) + out.Custom = in.Custom + return nil +} + +// Convert_management_UserProfile_To_v1_UserProfile is an autogenerated conversion function. +func Convert_management_UserProfile_To_v1_UserProfile(in *management.UserProfile, out *UserProfile, s conversion.Scope) error { + return autoConvert_management_UserProfile_To_v1_UserProfile(in, out, s) +} + +func autoConvert_v1_UserProfileList_To_management_UserProfileList(in *UserProfileList, out *management.UserProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.UserProfile)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_UserProfileList_To_management_UserProfileList is an autogenerated conversion function. +func Convert_v1_UserProfileList_To_management_UserProfileList(in *UserProfileList, out *management.UserProfileList, s conversion.Scope) error { + return autoConvert_v1_UserProfileList_To_management_UserProfileList(in, out, s) +} + +func autoConvert_management_UserProfileList_To_v1_UserProfileList(in *management.UserProfileList, out *UserProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]UserProfile)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_UserProfileList_To_v1_UserProfileList is an autogenerated conversion function. +func Convert_management_UserProfileList_To_v1_UserProfileList(in *management.UserProfileList, out *UserProfileList, s conversion.Scope) error { + return autoConvert_management_UserProfileList_To_v1_UserProfileList(in, out, s) +} + +func autoConvert_v1_UserQuotasOptions_To_management_UserQuotasOptions(in *UserQuotasOptions, out *management.UserQuotasOptions, s conversion.Scope) error { + out.Cluster = *(*[]string)(unsafe.Pointer(&in.Cluster)) + return nil +} + +// Convert_v1_UserQuotasOptions_To_management_UserQuotasOptions is an autogenerated conversion function. +func Convert_v1_UserQuotasOptions_To_management_UserQuotasOptions(in *UserQuotasOptions, out *management.UserQuotasOptions, s conversion.Scope) error { + return autoConvert_v1_UserQuotasOptions_To_management_UserQuotasOptions(in, out, s) +} + +func autoConvert_management_UserQuotasOptions_To_v1_UserQuotasOptions(in *management.UserQuotasOptions, out *UserQuotasOptions, s conversion.Scope) error { + out.Cluster = *(*[]string)(unsafe.Pointer(&in.Cluster)) + return nil +} + +// Convert_management_UserQuotasOptions_To_v1_UserQuotasOptions is an autogenerated conversion function. +func Convert_management_UserQuotasOptions_To_v1_UserQuotasOptions(in *management.UserQuotasOptions, out *UserQuotasOptions, s conversion.Scope) error { + return autoConvert_management_UserQuotasOptions_To_v1_UserQuotasOptions(in, out, s) +} + +func autoConvert_url_Values_To_v1_UserQuotasOptions(in *url.Values, out *UserQuotasOptions, s conversion.Scope) error { + // WARNING: Field TypeMeta does not have json tag, skipping. + + if values, ok := map[string][]string(*in)["cluster"]; ok && len(values) > 0 { + out.Cluster = *(*[]string)(unsafe.Pointer(&values)) + } else { + out.Cluster = nil + } + return nil +} + +// Convert_url_Values_To_v1_UserQuotasOptions is an autogenerated conversion function. +func Convert_url_Values_To_v1_UserQuotasOptions(in *url.Values, out *UserQuotasOptions, s conversion.Scope) error { + return autoConvert_url_Values_To_v1_UserQuotasOptions(in, out, s) +} + +func autoConvert_v1_UserSpacesOptions_To_management_UserSpacesOptions(in *UserSpacesOptions, out *management.UserSpacesOptions, s conversion.Scope) error { + out.Cluster = *(*[]string)(unsafe.Pointer(&in.Cluster)) + return nil +} + +// Convert_v1_UserSpacesOptions_To_management_UserSpacesOptions is an autogenerated conversion function. +func Convert_v1_UserSpacesOptions_To_management_UserSpacesOptions(in *UserSpacesOptions, out *management.UserSpacesOptions, s conversion.Scope) error { + return autoConvert_v1_UserSpacesOptions_To_management_UserSpacesOptions(in, out, s) +} + +func autoConvert_management_UserSpacesOptions_To_v1_UserSpacesOptions(in *management.UserSpacesOptions, out *UserSpacesOptions, s conversion.Scope) error { + out.Cluster = *(*[]string)(unsafe.Pointer(&in.Cluster)) + return nil +} + +// Convert_management_UserSpacesOptions_To_v1_UserSpacesOptions is an autogenerated conversion function. +func Convert_management_UserSpacesOptions_To_v1_UserSpacesOptions(in *management.UserSpacesOptions, out *UserSpacesOptions, s conversion.Scope) error { + return autoConvert_management_UserSpacesOptions_To_v1_UserSpacesOptions(in, out, s) +} + +func autoConvert_url_Values_To_v1_UserSpacesOptions(in *url.Values, out *UserSpacesOptions, s conversion.Scope) error { + // WARNING: Field TypeMeta does not have json tag, skipping. + + if values, ok := map[string][]string(*in)["cluster"]; ok && len(values) > 0 { + out.Cluster = *(*[]string)(unsafe.Pointer(&values)) + } else { + out.Cluster = nil + } + return nil +} + +// Convert_url_Values_To_v1_UserSpacesOptions is an autogenerated conversion function. +func Convert_url_Values_To_v1_UserSpacesOptions(in *url.Values, out *UserSpacesOptions, s conversion.Scope) error { + return autoConvert_url_Values_To_v1_UserSpacesOptions(in, out, s) +} + +func autoConvert_v1_UserSpec_To_management_UserSpec(in *UserSpec, out *management.UserSpec, s conversion.Scope) error { + out.UserSpec = in.UserSpec + return nil +} + +// Convert_v1_UserSpec_To_management_UserSpec is an autogenerated conversion function. +func Convert_v1_UserSpec_To_management_UserSpec(in *UserSpec, out *management.UserSpec, s conversion.Scope) error { + return autoConvert_v1_UserSpec_To_management_UserSpec(in, out, s) +} + +func autoConvert_management_UserSpec_To_v1_UserSpec(in *management.UserSpec, out *UserSpec, s conversion.Scope) error { + out.UserSpec = in.UserSpec + return nil +} + +// Convert_management_UserSpec_To_v1_UserSpec is an autogenerated conversion function. +func Convert_management_UserSpec_To_v1_UserSpec(in *management.UserSpec, out *UserSpec, s conversion.Scope) error { + return autoConvert_management_UserSpec_To_v1_UserSpec(in, out, s) +} + +func autoConvert_v1_UserStatus_To_management_UserStatus(in *UserStatus, out *management.UserStatus, s conversion.Scope) error { + out.UserStatus = in.UserStatus + return nil +} + +// Convert_v1_UserStatus_To_management_UserStatus is an autogenerated conversion function. +func Convert_v1_UserStatus_To_management_UserStatus(in *UserStatus, out *management.UserStatus, s conversion.Scope) error { + return autoConvert_v1_UserStatus_To_management_UserStatus(in, out, s) +} + +func autoConvert_management_UserStatus_To_v1_UserStatus(in *management.UserStatus, out *UserStatus, s conversion.Scope) error { + out.UserStatus = in.UserStatus + return nil +} + +// Convert_management_UserStatus_To_v1_UserStatus is an autogenerated conversion function. +func Convert_management_UserStatus_To_v1_UserStatus(in *management.UserStatus, out *UserStatus, s conversion.Scope) error { + return autoConvert_management_UserStatus_To_v1_UserStatus(in, out, s) +} + +func autoConvert_v1_UserVirtualClustersOptions_To_management_UserVirtualClustersOptions(in *UserVirtualClustersOptions, out *management.UserVirtualClustersOptions, s conversion.Scope) error { + out.Cluster = *(*[]string)(unsafe.Pointer(&in.Cluster)) + return nil +} + +// Convert_v1_UserVirtualClustersOptions_To_management_UserVirtualClustersOptions is an autogenerated conversion function. +func Convert_v1_UserVirtualClustersOptions_To_management_UserVirtualClustersOptions(in *UserVirtualClustersOptions, out *management.UserVirtualClustersOptions, s conversion.Scope) error { + return autoConvert_v1_UserVirtualClustersOptions_To_management_UserVirtualClustersOptions(in, out, s) +} + +func autoConvert_management_UserVirtualClustersOptions_To_v1_UserVirtualClustersOptions(in *management.UserVirtualClustersOptions, out *UserVirtualClustersOptions, s conversion.Scope) error { + out.Cluster = *(*[]string)(unsafe.Pointer(&in.Cluster)) + return nil +} + +// Convert_management_UserVirtualClustersOptions_To_v1_UserVirtualClustersOptions is an autogenerated conversion function. +func Convert_management_UserVirtualClustersOptions_To_v1_UserVirtualClustersOptions(in *management.UserVirtualClustersOptions, out *UserVirtualClustersOptions, s conversion.Scope) error { + return autoConvert_management_UserVirtualClustersOptions_To_v1_UserVirtualClustersOptions(in, out, s) +} + +func autoConvert_url_Values_To_v1_UserVirtualClustersOptions(in *url.Values, out *UserVirtualClustersOptions, s conversion.Scope) error { + // WARNING: Field TypeMeta does not have json tag, skipping. + + if values, ok := map[string][]string(*in)["cluster"]; ok && len(values) > 0 { + out.Cluster = *(*[]string)(unsafe.Pointer(&values)) + } else { + out.Cluster = nil + } + return nil +} + +// Convert_url_Values_To_v1_UserVirtualClustersOptions is an autogenerated conversion function. +func Convert_url_Values_To_v1_UserVirtualClustersOptions(in *url.Values, out *UserVirtualClustersOptions, s conversion.Scope) error { + return autoConvert_url_Values_To_v1_UserVirtualClustersOptions(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstance_To_management_VirtualClusterInstance(in *VirtualClusterInstance, out *management.VirtualClusterInstance, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_VirtualClusterInstanceSpec_To_management_VirtualClusterInstanceSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_VirtualClusterInstanceStatus_To_management_VirtualClusterInstanceStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_VirtualClusterInstance_To_management_VirtualClusterInstance is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstance_To_management_VirtualClusterInstance(in *VirtualClusterInstance, out *management.VirtualClusterInstance, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstance_To_management_VirtualClusterInstance(in, out, s) +} + +func autoConvert_management_VirtualClusterInstance_To_v1_VirtualClusterInstance(in *management.VirtualClusterInstance, out *VirtualClusterInstance, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_VirtualClusterInstanceSpec_To_v1_VirtualClusterInstanceSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_VirtualClusterInstanceStatus_To_v1_VirtualClusterInstanceStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_VirtualClusterInstance_To_v1_VirtualClusterInstance is an autogenerated conversion function. +func Convert_management_VirtualClusterInstance_To_v1_VirtualClusterInstance(in *management.VirtualClusterInstance, out *VirtualClusterInstance, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstance_To_v1_VirtualClusterInstance(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceKubeConfig_To_management_VirtualClusterInstanceKubeConfig(in *VirtualClusterInstanceKubeConfig, out *management.VirtualClusterInstanceKubeConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_VirtualClusterInstanceKubeConfigSpec_To_management_VirtualClusterInstanceKubeConfigSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_VirtualClusterInstanceKubeConfigStatus_To_management_VirtualClusterInstanceKubeConfigStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_VirtualClusterInstanceKubeConfig_To_management_VirtualClusterInstanceKubeConfig is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceKubeConfig_To_management_VirtualClusterInstanceKubeConfig(in *VirtualClusterInstanceKubeConfig, out *management.VirtualClusterInstanceKubeConfig, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceKubeConfig_To_management_VirtualClusterInstanceKubeConfig(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceKubeConfig_To_v1_VirtualClusterInstanceKubeConfig(in *management.VirtualClusterInstanceKubeConfig, out *VirtualClusterInstanceKubeConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_VirtualClusterInstanceKubeConfigSpec_To_v1_VirtualClusterInstanceKubeConfigSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_VirtualClusterInstanceKubeConfigStatus_To_v1_VirtualClusterInstanceKubeConfigStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_VirtualClusterInstanceKubeConfig_To_v1_VirtualClusterInstanceKubeConfig is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceKubeConfig_To_v1_VirtualClusterInstanceKubeConfig(in *management.VirtualClusterInstanceKubeConfig, out *VirtualClusterInstanceKubeConfig, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceKubeConfig_To_v1_VirtualClusterInstanceKubeConfig(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceKubeConfigList_To_management_VirtualClusterInstanceKubeConfigList(in *VirtualClusterInstanceKubeConfigList, out *management.VirtualClusterInstanceKubeConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.VirtualClusterInstanceKubeConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_VirtualClusterInstanceKubeConfigList_To_management_VirtualClusterInstanceKubeConfigList is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceKubeConfigList_To_management_VirtualClusterInstanceKubeConfigList(in *VirtualClusterInstanceKubeConfigList, out *management.VirtualClusterInstanceKubeConfigList, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceKubeConfigList_To_management_VirtualClusterInstanceKubeConfigList(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceKubeConfigList_To_v1_VirtualClusterInstanceKubeConfigList(in *management.VirtualClusterInstanceKubeConfigList, out *VirtualClusterInstanceKubeConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]VirtualClusterInstanceKubeConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_VirtualClusterInstanceKubeConfigList_To_v1_VirtualClusterInstanceKubeConfigList is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceKubeConfigList_To_v1_VirtualClusterInstanceKubeConfigList(in *management.VirtualClusterInstanceKubeConfigList, out *VirtualClusterInstanceKubeConfigList, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceKubeConfigList_To_v1_VirtualClusterInstanceKubeConfigList(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceKubeConfigSpec_To_management_VirtualClusterInstanceKubeConfigSpec(in *VirtualClusterInstanceKubeConfigSpec, out *management.VirtualClusterInstanceKubeConfigSpec, s conversion.Scope) error { + out.CertificateTTL = (*int32)(unsafe.Pointer(in.CertificateTTL)) + return nil +} + +// Convert_v1_VirtualClusterInstanceKubeConfigSpec_To_management_VirtualClusterInstanceKubeConfigSpec is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceKubeConfigSpec_To_management_VirtualClusterInstanceKubeConfigSpec(in *VirtualClusterInstanceKubeConfigSpec, out *management.VirtualClusterInstanceKubeConfigSpec, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceKubeConfigSpec_To_management_VirtualClusterInstanceKubeConfigSpec(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceKubeConfigSpec_To_v1_VirtualClusterInstanceKubeConfigSpec(in *management.VirtualClusterInstanceKubeConfigSpec, out *VirtualClusterInstanceKubeConfigSpec, s conversion.Scope) error { + out.CertificateTTL = (*int32)(unsafe.Pointer(in.CertificateTTL)) + return nil +} + +// Convert_management_VirtualClusterInstanceKubeConfigSpec_To_v1_VirtualClusterInstanceKubeConfigSpec is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceKubeConfigSpec_To_v1_VirtualClusterInstanceKubeConfigSpec(in *management.VirtualClusterInstanceKubeConfigSpec, out *VirtualClusterInstanceKubeConfigSpec, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceKubeConfigSpec_To_v1_VirtualClusterInstanceKubeConfigSpec(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceKubeConfigStatus_To_management_VirtualClusterInstanceKubeConfigStatus(in *VirtualClusterInstanceKubeConfigStatus, out *management.VirtualClusterInstanceKubeConfigStatus, s conversion.Scope) error { + out.KubeConfig = in.KubeConfig + return nil +} + +// Convert_v1_VirtualClusterInstanceKubeConfigStatus_To_management_VirtualClusterInstanceKubeConfigStatus is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceKubeConfigStatus_To_management_VirtualClusterInstanceKubeConfigStatus(in *VirtualClusterInstanceKubeConfigStatus, out *management.VirtualClusterInstanceKubeConfigStatus, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceKubeConfigStatus_To_management_VirtualClusterInstanceKubeConfigStatus(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceKubeConfigStatus_To_v1_VirtualClusterInstanceKubeConfigStatus(in *management.VirtualClusterInstanceKubeConfigStatus, out *VirtualClusterInstanceKubeConfigStatus, s conversion.Scope) error { + out.KubeConfig = in.KubeConfig + return nil +} + +// Convert_management_VirtualClusterInstanceKubeConfigStatus_To_v1_VirtualClusterInstanceKubeConfigStatus is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceKubeConfigStatus_To_v1_VirtualClusterInstanceKubeConfigStatus(in *management.VirtualClusterInstanceKubeConfigStatus, out *VirtualClusterInstanceKubeConfigStatus, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceKubeConfigStatus_To_v1_VirtualClusterInstanceKubeConfigStatus(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceList_To_management_VirtualClusterInstanceList(in *VirtualClusterInstanceList, out *management.VirtualClusterInstanceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.VirtualClusterInstance)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_VirtualClusterInstanceList_To_management_VirtualClusterInstanceList is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceList_To_management_VirtualClusterInstanceList(in *VirtualClusterInstanceList, out *management.VirtualClusterInstanceList, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceList_To_management_VirtualClusterInstanceList(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceList_To_v1_VirtualClusterInstanceList(in *management.VirtualClusterInstanceList, out *VirtualClusterInstanceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]VirtualClusterInstance)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_VirtualClusterInstanceList_To_v1_VirtualClusterInstanceList is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceList_To_v1_VirtualClusterInstanceList(in *management.VirtualClusterInstanceList, out *VirtualClusterInstanceList, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceList_To_v1_VirtualClusterInstanceList(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceLog_To_management_VirtualClusterInstanceLog(in *VirtualClusterInstanceLog, out *management.VirtualClusterInstanceLog, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_v1_VirtualClusterInstanceLog_To_management_VirtualClusterInstanceLog is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceLog_To_management_VirtualClusterInstanceLog(in *VirtualClusterInstanceLog, out *management.VirtualClusterInstanceLog, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceLog_To_management_VirtualClusterInstanceLog(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceLog_To_v1_VirtualClusterInstanceLog(in *management.VirtualClusterInstanceLog, out *VirtualClusterInstanceLog, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + return nil +} + +// Convert_management_VirtualClusterInstanceLog_To_v1_VirtualClusterInstanceLog is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceLog_To_v1_VirtualClusterInstanceLog(in *management.VirtualClusterInstanceLog, out *VirtualClusterInstanceLog, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceLog_To_v1_VirtualClusterInstanceLog(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceLogList_To_management_VirtualClusterInstanceLogList(in *VirtualClusterInstanceLogList, out *management.VirtualClusterInstanceLogList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.VirtualClusterInstanceLog)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_VirtualClusterInstanceLogList_To_management_VirtualClusterInstanceLogList is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceLogList_To_management_VirtualClusterInstanceLogList(in *VirtualClusterInstanceLogList, out *management.VirtualClusterInstanceLogList, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceLogList_To_management_VirtualClusterInstanceLogList(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceLogList_To_v1_VirtualClusterInstanceLogList(in *management.VirtualClusterInstanceLogList, out *VirtualClusterInstanceLogList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]VirtualClusterInstanceLog)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_VirtualClusterInstanceLogList_To_v1_VirtualClusterInstanceLogList is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceLogList_To_v1_VirtualClusterInstanceLogList(in *management.VirtualClusterInstanceLogList, out *VirtualClusterInstanceLogList, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceLogList_To_v1_VirtualClusterInstanceLogList(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceLogOptions_To_management_VirtualClusterInstanceLogOptions(in *VirtualClusterInstanceLogOptions, out *management.VirtualClusterInstanceLogOptions, s conversion.Scope) error { + out.Container = in.Container + out.Follow = in.Follow + out.Previous = in.Previous + out.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds)) + out.SinceTime = (*metav1.Time)(unsafe.Pointer(in.SinceTime)) + out.Timestamps = in.Timestamps + out.TailLines = (*int64)(unsafe.Pointer(in.TailLines)) + out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes)) + out.InsecureSkipTLSVerifyBackend = in.InsecureSkipTLSVerifyBackend + return nil +} + +// Convert_v1_VirtualClusterInstanceLogOptions_To_management_VirtualClusterInstanceLogOptions is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceLogOptions_To_management_VirtualClusterInstanceLogOptions(in *VirtualClusterInstanceLogOptions, out *management.VirtualClusterInstanceLogOptions, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceLogOptions_To_management_VirtualClusterInstanceLogOptions(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceLogOptions_To_v1_VirtualClusterInstanceLogOptions(in *management.VirtualClusterInstanceLogOptions, out *VirtualClusterInstanceLogOptions, s conversion.Scope) error { + out.Container = in.Container + out.Follow = in.Follow + out.Previous = in.Previous + out.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds)) + out.SinceTime = (*metav1.Time)(unsafe.Pointer(in.SinceTime)) + out.Timestamps = in.Timestamps + out.TailLines = (*int64)(unsafe.Pointer(in.TailLines)) + out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes)) + out.InsecureSkipTLSVerifyBackend = in.InsecureSkipTLSVerifyBackend + return nil +} + +// Convert_management_VirtualClusterInstanceLogOptions_To_v1_VirtualClusterInstanceLogOptions is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceLogOptions_To_v1_VirtualClusterInstanceLogOptions(in *management.VirtualClusterInstanceLogOptions, out *VirtualClusterInstanceLogOptions, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceLogOptions_To_v1_VirtualClusterInstanceLogOptions(in, out, s) +} + +func autoConvert_url_Values_To_v1_VirtualClusterInstanceLogOptions(in *url.Values, out *VirtualClusterInstanceLogOptions, s conversion.Scope) error { + // WARNING: Field TypeMeta does not have json tag, skipping. + + if values, ok := map[string][]string(*in)["container"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_string(&values, &out.Container, s); err != nil { + return err + } + } else { + out.Container = "" + } + if values, ok := map[string][]string(*in)["follow"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_bool(&values, &out.Follow, s); err != nil { + return err + } + } else { + out.Follow = false + } + if values, ok := map[string][]string(*in)["previous"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_bool(&values, &out.Previous, s); err != nil { + return err + } + } else { + out.Previous = false + } + if values, ok := map[string][]string(*in)["sinceSeconds"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_Pointer_int64(&values, &out.SinceSeconds, s); err != nil { + return err + } + } else { + out.SinceSeconds = nil + } + if values, ok := map[string][]string(*in)["sinceTime"]; ok && len(values) > 0 { + if err := metav1.Convert_Slice_string_To_Pointer_v1_Time(&values, &out.SinceTime, s); err != nil { + return err + } + } else { + out.SinceTime = nil + } + if values, ok := map[string][]string(*in)["timestamps"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_bool(&values, &out.Timestamps, s); err != nil { + return err + } + } else { + out.Timestamps = false + } + if values, ok := map[string][]string(*in)["tailLines"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_Pointer_int64(&values, &out.TailLines, s); err != nil { + return err + } + } else { + out.TailLines = nil + } + if values, ok := map[string][]string(*in)["limitBytes"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_Pointer_int64(&values, &out.LimitBytes, s); err != nil { + return err + } + } else { + out.LimitBytes = nil + } + if values, ok := map[string][]string(*in)["insecureSkipTLSVerifyBackend"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_bool(&values, &out.InsecureSkipTLSVerifyBackend, s); err != nil { + return err + } + } else { + out.InsecureSkipTLSVerifyBackend = false + } + return nil +} + +// Convert_url_Values_To_v1_VirtualClusterInstanceLogOptions is an autogenerated conversion function. +func Convert_url_Values_To_v1_VirtualClusterInstanceLogOptions(in *url.Values, out *VirtualClusterInstanceLogOptions, s conversion.Scope) error { + return autoConvert_url_Values_To_v1_VirtualClusterInstanceLogOptions(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceSpec_To_management_VirtualClusterInstanceSpec(in *VirtualClusterInstanceSpec, out *management.VirtualClusterInstanceSpec, s conversion.Scope) error { + out.VirtualClusterInstanceSpec = in.VirtualClusterInstanceSpec + return nil +} + +// Convert_v1_VirtualClusterInstanceSpec_To_management_VirtualClusterInstanceSpec is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceSpec_To_management_VirtualClusterInstanceSpec(in *VirtualClusterInstanceSpec, out *management.VirtualClusterInstanceSpec, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceSpec_To_management_VirtualClusterInstanceSpec(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceSpec_To_v1_VirtualClusterInstanceSpec(in *management.VirtualClusterInstanceSpec, out *VirtualClusterInstanceSpec, s conversion.Scope) error { + out.VirtualClusterInstanceSpec = in.VirtualClusterInstanceSpec + return nil +} + +// Convert_management_VirtualClusterInstanceSpec_To_v1_VirtualClusterInstanceSpec is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceSpec_To_v1_VirtualClusterInstanceSpec(in *management.VirtualClusterInstanceSpec, out *VirtualClusterInstanceSpec, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceSpec_To_v1_VirtualClusterInstanceSpec(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceStatus_To_management_VirtualClusterInstanceStatus(in *VirtualClusterInstanceStatus, out *management.VirtualClusterInstanceStatus, s conversion.Scope) error { + out.VirtualClusterInstanceStatus = in.VirtualClusterInstanceStatus + out.SleepModeConfig = (*clusterv1.SleepModeConfig)(unsafe.Pointer(in.SleepModeConfig)) + out.CanUse = in.CanUse + out.CanUpdate = in.CanUpdate + return nil +} + +// Convert_v1_VirtualClusterInstanceStatus_To_management_VirtualClusterInstanceStatus is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceStatus_To_management_VirtualClusterInstanceStatus(in *VirtualClusterInstanceStatus, out *management.VirtualClusterInstanceStatus, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceStatus_To_management_VirtualClusterInstanceStatus(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceStatus_To_v1_VirtualClusterInstanceStatus(in *management.VirtualClusterInstanceStatus, out *VirtualClusterInstanceStatus, s conversion.Scope) error { + out.VirtualClusterInstanceStatus = in.VirtualClusterInstanceStatus + out.SleepModeConfig = (*clusterv1.SleepModeConfig)(unsafe.Pointer(in.SleepModeConfig)) + out.CanUse = in.CanUse + out.CanUpdate = in.CanUpdate + return nil +} + +// Convert_management_VirtualClusterInstanceStatus_To_v1_VirtualClusterInstanceStatus is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceStatus_To_v1_VirtualClusterInstanceStatus(in *management.VirtualClusterInstanceStatus, out *VirtualClusterInstanceStatus, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceStatus_To_v1_VirtualClusterInstanceStatus(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceWorkloadKubeConfig_To_management_VirtualClusterInstanceWorkloadKubeConfig(in *VirtualClusterInstanceWorkloadKubeConfig, out *management.VirtualClusterInstanceWorkloadKubeConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.KubeConfig = in.KubeConfig + out.Token = in.Token + return nil +} + +// Convert_v1_VirtualClusterInstanceWorkloadKubeConfig_To_management_VirtualClusterInstanceWorkloadKubeConfig is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceWorkloadKubeConfig_To_management_VirtualClusterInstanceWorkloadKubeConfig(in *VirtualClusterInstanceWorkloadKubeConfig, out *management.VirtualClusterInstanceWorkloadKubeConfig, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceWorkloadKubeConfig_To_management_VirtualClusterInstanceWorkloadKubeConfig(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceWorkloadKubeConfig_To_v1_VirtualClusterInstanceWorkloadKubeConfig(in *management.VirtualClusterInstanceWorkloadKubeConfig, out *VirtualClusterInstanceWorkloadKubeConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.KubeConfig = in.KubeConfig + out.Token = in.Token + return nil +} + +// Convert_management_VirtualClusterInstanceWorkloadKubeConfig_To_v1_VirtualClusterInstanceWorkloadKubeConfig is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceWorkloadKubeConfig_To_v1_VirtualClusterInstanceWorkloadKubeConfig(in *management.VirtualClusterInstanceWorkloadKubeConfig, out *VirtualClusterInstanceWorkloadKubeConfig, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceWorkloadKubeConfig_To_v1_VirtualClusterInstanceWorkloadKubeConfig(in, out, s) +} + +func autoConvert_v1_VirtualClusterInstanceWorkloadKubeConfigList_To_management_VirtualClusterInstanceWorkloadKubeConfigList(in *VirtualClusterInstanceWorkloadKubeConfigList, out *management.VirtualClusterInstanceWorkloadKubeConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.VirtualClusterInstanceWorkloadKubeConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_VirtualClusterInstanceWorkloadKubeConfigList_To_management_VirtualClusterInstanceWorkloadKubeConfigList is an autogenerated conversion function. +func Convert_v1_VirtualClusterInstanceWorkloadKubeConfigList_To_management_VirtualClusterInstanceWorkloadKubeConfigList(in *VirtualClusterInstanceWorkloadKubeConfigList, out *management.VirtualClusterInstanceWorkloadKubeConfigList, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterInstanceWorkloadKubeConfigList_To_management_VirtualClusterInstanceWorkloadKubeConfigList(in, out, s) +} + +func autoConvert_management_VirtualClusterInstanceWorkloadKubeConfigList_To_v1_VirtualClusterInstanceWorkloadKubeConfigList(in *management.VirtualClusterInstanceWorkloadKubeConfigList, out *VirtualClusterInstanceWorkloadKubeConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]VirtualClusterInstanceWorkloadKubeConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_VirtualClusterInstanceWorkloadKubeConfigList_To_v1_VirtualClusterInstanceWorkloadKubeConfigList is an autogenerated conversion function. +func Convert_management_VirtualClusterInstanceWorkloadKubeConfigList_To_v1_VirtualClusterInstanceWorkloadKubeConfigList(in *management.VirtualClusterInstanceWorkloadKubeConfigList, out *VirtualClusterInstanceWorkloadKubeConfigList, s conversion.Scope) error { + return autoConvert_management_VirtualClusterInstanceWorkloadKubeConfigList_To_v1_VirtualClusterInstanceWorkloadKubeConfigList(in, out, s) +} + +func autoConvert_v1_VirtualClusterTemplate_To_management_VirtualClusterTemplate(in *VirtualClusterTemplate, out *management.VirtualClusterTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_VirtualClusterTemplateSpec_To_management_VirtualClusterTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_VirtualClusterTemplateStatus_To_management_VirtualClusterTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_VirtualClusterTemplate_To_management_VirtualClusterTemplate is an autogenerated conversion function. +func Convert_v1_VirtualClusterTemplate_To_management_VirtualClusterTemplate(in *VirtualClusterTemplate, out *management.VirtualClusterTemplate, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterTemplate_To_management_VirtualClusterTemplate(in, out, s) +} + +func autoConvert_management_VirtualClusterTemplate_To_v1_VirtualClusterTemplate(in *management.VirtualClusterTemplate, out *VirtualClusterTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_VirtualClusterTemplateSpec_To_v1_VirtualClusterTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_VirtualClusterTemplateStatus_To_v1_VirtualClusterTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_VirtualClusterTemplate_To_v1_VirtualClusterTemplate is an autogenerated conversion function. +func Convert_management_VirtualClusterTemplate_To_v1_VirtualClusterTemplate(in *management.VirtualClusterTemplate, out *VirtualClusterTemplate, s conversion.Scope) error { + return autoConvert_management_VirtualClusterTemplate_To_v1_VirtualClusterTemplate(in, out, s) +} + +func autoConvert_v1_VirtualClusterTemplateList_To_management_VirtualClusterTemplateList(in *VirtualClusterTemplateList, out *management.VirtualClusterTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.VirtualClusterTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_VirtualClusterTemplateList_To_management_VirtualClusterTemplateList is an autogenerated conversion function. +func Convert_v1_VirtualClusterTemplateList_To_management_VirtualClusterTemplateList(in *VirtualClusterTemplateList, out *management.VirtualClusterTemplateList, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterTemplateList_To_management_VirtualClusterTemplateList(in, out, s) +} + +func autoConvert_management_VirtualClusterTemplateList_To_v1_VirtualClusterTemplateList(in *management.VirtualClusterTemplateList, out *VirtualClusterTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]VirtualClusterTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_VirtualClusterTemplateList_To_v1_VirtualClusterTemplateList is an autogenerated conversion function. +func Convert_management_VirtualClusterTemplateList_To_v1_VirtualClusterTemplateList(in *management.VirtualClusterTemplateList, out *VirtualClusterTemplateList, s conversion.Scope) error { + return autoConvert_management_VirtualClusterTemplateList_To_v1_VirtualClusterTemplateList(in, out, s) +} + +func autoConvert_v1_VirtualClusterTemplateSpec_To_management_VirtualClusterTemplateSpec(in *VirtualClusterTemplateSpec, out *management.VirtualClusterTemplateSpec, s conversion.Scope) error { + out.VirtualClusterTemplateSpec = in.VirtualClusterTemplateSpec + return nil +} + +// Convert_v1_VirtualClusterTemplateSpec_To_management_VirtualClusterTemplateSpec is an autogenerated conversion function. +func Convert_v1_VirtualClusterTemplateSpec_To_management_VirtualClusterTemplateSpec(in *VirtualClusterTemplateSpec, out *management.VirtualClusterTemplateSpec, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterTemplateSpec_To_management_VirtualClusterTemplateSpec(in, out, s) +} + +func autoConvert_management_VirtualClusterTemplateSpec_To_v1_VirtualClusterTemplateSpec(in *management.VirtualClusterTemplateSpec, out *VirtualClusterTemplateSpec, s conversion.Scope) error { + out.VirtualClusterTemplateSpec = in.VirtualClusterTemplateSpec + return nil +} + +// Convert_management_VirtualClusterTemplateSpec_To_v1_VirtualClusterTemplateSpec is an autogenerated conversion function. +func Convert_management_VirtualClusterTemplateSpec_To_v1_VirtualClusterTemplateSpec(in *management.VirtualClusterTemplateSpec, out *VirtualClusterTemplateSpec, s conversion.Scope) error { + return autoConvert_management_VirtualClusterTemplateSpec_To_v1_VirtualClusterTemplateSpec(in, out, s) +} + +func autoConvert_v1_VirtualClusterTemplateStatus_To_management_VirtualClusterTemplateStatus(in *VirtualClusterTemplateStatus, out *management.VirtualClusterTemplateStatus, s conversion.Scope) error { + out.VirtualClusterTemplateStatus = in.VirtualClusterTemplateStatus + out.Apps = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Apps)) + return nil +} + +// Convert_v1_VirtualClusterTemplateStatus_To_management_VirtualClusterTemplateStatus is an autogenerated conversion function. +func Convert_v1_VirtualClusterTemplateStatus_To_management_VirtualClusterTemplateStatus(in *VirtualClusterTemplateStatus, out *management.VirtualClusterTemplateStatus, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterTemplateStatus_To_management_VirtualClusterTemplateStatus(in, out, s) +} + +func autoConvert_management_VirtualClusterTemplateStatus_To_v1_VirtualClusterTemplateStatus(in *management.VirtualClusterTemplateStatus, out *VirtualClusterTemplateStatus, s conversion.Scope) error { + out.VirtualClusterTemplateStatus = in.VirtualClusterTemplateStatus + out.Apps = *(*[]*clusterv1.EntityInfo)(unsafe.Pointer(&in.Apps)) + return nil +} + +// Convert_management_VirtualClusterTemplateStatus_To_v1_VirtualClusterTemplateStatus is an autogenerated conversion function. +func Convert_management_VirtualClusterTemplateStatus_To_v1_VirtualClusterTemplateStatus(in *management.VirtualClusterTemplateStatus, out *VirtualClusterTemplateStatus, s conversion.Scope) error { + return autoConvert_management_VirtualClusterTemplateStatus_To_v1_VirtualClusterTemplateStatus(in, out, s) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..192aa4871 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.deepcopy.go @@ -0,0 +1,7150 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + loftstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + auditv1 "github.com/loft-sh/api/v3/pkg/apis/audit/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + uiv1 "github.com/loft-sh/api/v3/pkg/apis/ui/v1" + server "github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server" + rbacv1 "k8s.io/api/rbac/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAnalyticsSpec) DeepCopyInto(out *AgentAnalyticsSpec) { + *out = *in + if in.InstanceTokenAuth != nil { + in, out := &in.InstanceTokenAuth, &out.InstanceTokenAuth + *out = new(server.InstanceTokenAuth) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAnalyticsSpec. +func (in *AgentAnalyticsSpec) DeepCopy() *AgentAnalyticsSpec { + if in == nil { + return nil + } + out := new(AgentAnalyticsSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAuditConfig) DeepCopyInto(out *AgentAuditConfig) { + *out = *in + in.Policy.DeepCopyInto(&out.Policy) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAuditConfig. +func (in *AgentAuditConfig) DeepCopy() *AgentAuditConfig { + if in == nil { + return nil + } + out := new(AgentAuditConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAuditEvent) DeepCopyInto(out *AgentAuditEvent) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAuditEvent. +func (in *AgentAuditEvent) DeepCopy() *AgentAuditEvent { + if in == nil { + return nil + } + out := new(AgentAuditEvent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AgentAuditEvent) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAuditEventList) DeepCopyInto(out *AgentAuditEventList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]AgentAuditEvent, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAuditEventList. +func (in *AgentAuditEventList) DeepCopy() *AgentAuditEventList { + if in == nil { + return nil + } + out := new(AgentAuditEventList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AgentAuditEventList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAuditEventSpec) DeepCopyInto(out *AgentAuditEventSpec) { + *out = *in + if in.Events != nil { + in, out := &in.Events, &out.Events + *out = make([]*auditv1.Event, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(auditv1.Event) + (*in).DeepCopyInto(*out) + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAuditEventSpec. +func (in *AgentAuditEventSpec) DeepCopy() *AgentAuditEventSpec { + if in == nil { + return nil + } + out := new(AgentAuditEventSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAuditEventStatus) DeepCopyInto(out *AgentAuditEventStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAuditEventStatus. +func (in *AgentAuditEventStatus) DeepCopy() *AgentAuditEventStatus { + if in == nil { + return nil + } + out := new(AgentAuditEventStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentLoftAccess) DeepCopyInto(out *AgentLoftAccess) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentLoftAccess. +func (in *AgentLoftAccess) DeepCopy() *AgentLoftAccess { + if in == nil { + return nil + } + out := new(AgentLoftAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Announcement) DeepCopyInto(out *Announcement) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Announcement. +func (in *Announcement) DeepCopy() *Announcement { + if in == nil { + return nil + } + out := new(Announcement) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Announcement) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AnnouncementList) DeepCopyInto(out *AnnouncementList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Announcement, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnnouncementList. +func (in *AnnouncementList) DeepCopy() *AnnouncementList { + if in == nil { + return nil + } + out := new(AnnouncementList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AnnouncementList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AnnouncementSpec) DeepCopyInto(out *AnnouncementSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnnouncementSpec. +func (in *AnnouncementSpec) DeepCopy() *AnnouncementSpec { + if in == nil { + return nil + } + out := new(AnnouncementSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AnnouncementStatus) DeepCopyInto(out *AnnouncementStatus) { + *out = *in + if in.InstanceTokenAuth != nil { + in, out := &in.InstanceTokenAuth, &out.InstanceTokenAuth + *out = new(server.InstanceTokenAuth) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnnouncementStatus. +func (in *AnnouncementStatus) DeepCopy() *AnnouncementStatus { + if in == nil { + return nil + } + out := new(AnnouncementStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *App) DeepCopyInto(out *App) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new App. +func (in *App) DeepCopy() *App { + if in == nil { + return nil + } + out := new(App) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *App) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppList) DeepCopyInto(out *AppList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]App, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppList. +func (in *AppList) DeepCopy() *AppList { + if in == nil { + return nil + } + out := new(AppList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AppList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppSpec) DeepCopyInto(out *AppSpec) { + *out = *in + in.AppSpec.DeepCopyInto(&out.AppSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpec. +func (in *AppSpec) DeepCopy() *AppSpec { + if in == nil { + return nil + } + out := new(AppSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppStatus) DeepCopyInto(out *AppStatus) { + *out = *in + out.AppStatus = in.AppStatus + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus. +func (in *AppStatus) DeepCopy() *AppStatus { + if in == nil { + return nil + } + out := new(AppStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Apps) DeepCopyInto(out *Apps) { + *out = *in + if in.Repositories != nil { + in, out := &in.Repositories, &out.Repositories + *out = make([]storagev1.HelmChartRepository, len(*in)) + copy(*out, *in) + } + if in.PredefinedApps != nil { + in, out := &in.PredefinedApps, &out.PredefinedApps + *out = make([]PredefinedApp, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Apps. +func (in *Apps) DeepCopy() *Apps { + if in == nil { + return nil + } + out := new(Apps) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Audit) DeepCopyInto(out *Audit) { + *out = *in + in.Policy.DeepCopyInto(&out.Policy) + if in.DataStoreMaxAge != nil { + in, out := &in.DataStoreMaxAge, &out.DataStoreMaxAge + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Audit. +func (in *Audit) DeepCopy() *Audit { + if in == nil { + return nil + } + out := new(Audit) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuditPolicy) DeepCopyInto(out *AuditPolicy) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]AuditPolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.OmitStages != nil { + in, out := &in.OmitStages, &out.OmitStages + *out = make([]auditv1.Stage, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditPolicy. +func (in *AuditPolicy) DeepCopy() *AuditPolicy { + if in == nil { + return nil + } + out := new(AuditPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuditPolicyRule) DeepCopyInto(out *AuditPolicyRule) { + *out = *in + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.UserGroups != nil { + in, out := &in.UserGroups, &out.UserGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]GroupResources, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Namespaces != nil { + in, out := &in.Namespaces, &out.Namespaces + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NonResourceURLs != nil { + in, out := &in.NonResourceURLs, &out.NonResourceURLs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.OmitStages != nil { + in, out := &in.OmitStages, &out.OmitStages + *out = make([]auditv1.Stage, len(*in)) + copy(*out, *in) + } + if in.RequestTargets != nil { + in, out := &in.RequestTargets, &out.RequestTargets + *out = make([]auditv1.RequestTarget, len(*in)) + copy(*out, *in) + } + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditPolicyRule. +func (in *AuditPolicyRule) DeepCopy() *AuditPolicyRule { + if in == nil { + return nil + } + out := new(AuditPolicyRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Authentication) DeepCopyInto(out *Authentication) { + *out = *in + in.Connector.DeepCopyInto(&out.Connector) + if in.Password != nil { + in, out := &in.Password, &out.Password + *out = new(AuthenticationPassword) + **out = **in + } + if in.Connectors != nil { + in, out := &in.Connectors, &out.Connectors + *out = make([]ConnectorWithName, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.LoginAccessKeyTTLSeconds != nil { + in, out := &in.LoginAccessKeyTTLSeconds, &out.LoginAccessKeyTTLSeconds + *out = new(int64) + **out = **in + } + if in.CustomHttpHeaders != nil { + in, out := &in.CustomHttpHeaders, &out.CustomHttpHeaders + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authentication. +func (in *Authentication) DeepCopy() *Authentication { + if in == nil { + return nil + } + out := new(Authentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationClusterAccountTemplates) DeepCopyInto(out *AuthenticationClusterAccountTemplates) { + *out = *in + if in.ClusterAccountTemplates != nil { + in, out := &in.ClusterAccountTemplates, &out.ClusterAccountTemplates + *out = make([]storagev1.UserClusterAccountTemplate, len(*in)) + copy(*out, *in) + } + if in.GroupClusterAccountTemplates != nil { + in, out := &in.GroupClusterAccountTemplates, &out.GroupClusterAccountTemplates + *out = make([]AuthenticationGroupClusterAccountTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationClusterAccountTemplates. +func (in *AuthenticationClusterAccountTemplates) DeepCopy() *AuthenticationClusterAccountTemplates { + if in == nil { + return nil + } + out := new(AuthenticationClusterAccountTemplates) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationGithub) DeepCopyInto(out *AuthenticationGithub) { + *out = *in + if in.Orgs != nil { + in, out := &in.Orgs, &out.Orgs + *out = make([]AuthenticationGithubOrg, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.AuthenticationClusterAccountTemplates.DeepCopyInto(&out.AuthenticationClusterAccountTemplates) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationGithub. +func (in *AuthenticationGithub) DeepCopy() *AuthenticationGithub { + if in == nil { + return nil + } + out := new(AuthenticationGithub) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationGithubOrg) DeepCopyInto(out *AuthenticationGithubOrg) { + *out = *in + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationGithubOrg. +func (in *AuthenticationGithubOrg) DeepCopy() *AuthenticationGithubOrg { + if in == nil { + return nil + } + out := new(AuthenticationGithubOrg) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationGitlab) DeepCopyInto(out *AuthenticationGitlab) { + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.AuthenticationClusterAccountTemplates.DeepCopyInto(&out.AuthenticationClusterAccountTemplates) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationGitlab. +func (in *AuthenticationGitlab) DeepCopy() *AuthenticationGitlab { + if in == nil { + return nil + } + out := new(AuthenticationGitlab) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationGoogle) DeepCopyInto(out *AuthenticationGoogle) { + *out = *in + if in.Scopes != nil { + in, out := &in.Scopes, &out.Scopes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.HostedDomains != nil { + in, out := &in.HostedDomains, &out.HostedDomains + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.AuthenticationClusterAccountTemplates.DeepCopyInto(&out.AuthenticationClusterAccountTemplates) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationGoogle. +func (in *AuthenticationGoogle) DeepCopy() *AuthenticationGoogle { + if in == nil { + return nil + } + out := new(AuthenticationGoogle) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationGroupClusterAccountTemplate) DeepCopyInto(out *AuthenticationGroupClusterAccountTemplate) { + *out = *in + if in.ClusterAccountTemplates != nil { + in, out := &in.ClusterAccountTemplates, &out.ClusterAccountTemplates + *out = make([]storagev1.UserClusterAccountTemplate, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationGroupClusterAccountTemplate. +func (in *AuthenticationGroupClusterAccountTemplate) DeepCopy() *AuthenticationGroupClusterAccountTemplate { + if in == nil { + return nil + } + out := new(AuthenticationGroupClusterAccountTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationMicrosoft) DeepCopyInto(out *AuthenticationMicrosoft) { + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.AuthenticationClusterAccountTemplates.DeepCopyInto(&out.AuthenticationClusterAccountTemplates) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationMicrosoft. +func (in *AuthenticationMicrosoft) DeepCopy() *AuthenticationMicrosoft { + if in == nil { + return nil + } + out := new(AuthenticationMicrosoft) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationOIDC) DeepCopyInto(out *AuthenticationOIDC) { + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Scopes != nil { + in, out := &in.Scopes, &out.Scopes + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.AuthenticationClusterAccountTemplates.DeepCopyInto(&out.AuthenticationClusterAccountTemplates) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationOIDC. +func (in *AuthenticationOIDC) DeepCopy() *AuthenticationOIDC { + if in == nil { + return nil + } + out := new(AuthenticationOIDC) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationPassword) DeepCopyInto(out *AuthenticationPassword) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationPassword. +func (in *AuthenticationPassword) DeepCopy() *AuthenticationPassword { + if in == nil { + return nil + } + out := new(AuthenticationPassword) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationSAML) DeepCopyInto(out *AuthenticationSAML) { + *out = *in + if in.CAData != nil { + in, out := &in.CAData, &out.CAData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.AllowedGroups != nil { + in, out := &in.AllowedGroups, &out.AllowedGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationSAML. +func (in *AuthenticationSAML) DeepCopy() *AuthenticationSAML { + if in == nil { + return nil + } + out := new(AuthenticationSAML) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Cluster) DeepCopyInto(out *Cluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. +func (in *Cluster) DeepCopy() *Cluster { + if in == nil { + return nil + } + out := new(Cluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Cluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccess) DeepCopyInto(out *ClusterAccess) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccess. +func (in *ClusterAccess) DeepCopy() *ClusterAccess { + if in == nil { + return nil + } + out := new(ClusterAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterAccess) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessList) DeepCopyInto(out *ClusterAccessList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterAccess, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessList. +func (in *ClusterAccessList) DeepCopy() *ClusterAccessList { + if in == nil { + return nil + } + out := new(ClusterAccessList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterAccessList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessSpec) DeepCopyInto(out *ClusterAccessSpec) { + *out = *in + in.ClusterAccessSpec.DeepCopyInto(&out.ClusterAccessSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessSpec. +func (in *ClusterAccessSpec) DeepCopy() *ClusterAccessSpec { + if in == nil { + return nil + } + out := new(ClusterAccessSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessStatus) DeepCopyInto(out *ClusterAccessStatus) { + *out = *in + out.ClusterAccessStatus = in.ClusterAccessStatus + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]*clusterv1.UserOrTeam, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.UserOrTeam) + (*in).DeepCopyInto(*out) + } + } + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + if in.SpaceConstraint != nil { + in, out := &in.SpaceConstraint, &out.SpaceConstraint + *out = new(clusterv1.EntityInfo) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessStatus. +func (in *ClusterAccessStatus) DeepCopy() *ClusterAccessStatus { + if in == nil { + return nil + } + out := new(ClusterAccessStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccounts) DeepCopyInto(out *ClusterAccounts) { + *out = *in + if in.Accounts != nil { + in, out := &in.Accounts, &out.Accounts + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.Cluster.DeepCopyInto(&out.Cluster) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccounts. +func (in *ClusterAccounts) DeepCopy() *ClusterAccounts { + if in == nil { + return nil + } + out := new(ClusterAccounts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAgentConfig) DeepCopyInto(out *ClusterAgentConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Audit != nil { + in, out := &in.Audit, &out.Audit + *out = new(AgentAuditConfig) + (*in).DeepCopyInto(*out) + } + if in.TokenCaCert != nil { + in, out := &in.TokenCaCert, &out.TokenCaCert + *out = make([]byte, len(*in)) + copy(*out, *in) + } + in.AnalyticsSpec.DeepCopyInto(&out.AnalyticsSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAgentConfig. +func (in *ClusterAgentConfig) DeepCopy() *ClusterAgentConfig { + if in == nil { + return nil + } + out := new(ClusterAgentConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterAgentConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAgentConfigList) DeepCopyInto(out *ClusterAgentConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterAgentConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAgentConfigList. +func (in *ClusterAgentConfigList) DeepCopy() *ClusterAgentConfigList { + if in == nil { + return nil + } + out := new(ClusterAgentConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterAgentConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterCharts) DeepCopyInto(out *ClusterCharts) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Charts != nil { + in, out := &in.Charts, &out.Charts + *out = make([]storagev1.HelmChart, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCharts. +func (in *ClusterCharts) DeepCopy() *ClusterCharts { + if in == nil { + return nil + } + out := new(ClusterCharts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterCharts) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterChartsList) DeepCopyInto(out *ClusterChartsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterCharts, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterChartsList. +func (in *ClusterChartsList) DeepCopy() *ClusterChartsList { + if in == nil { + return nil + } + out := new(ClusterChartsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterChartsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConnect) DeepCopyInto(out *ClusterConnect) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConnect. +func (in *ClusterConnect) DeepCopy() *ClusterConnect { + if in == nil { + return nil + } + out := new(ClusterConnect) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterConnect) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConnectList) DeepCopyInto(out *ClusterConnectList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterConnect, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConnectList. +func (in *ClusterConnectList) DeepCopy() *ClusterConnectList { + if in == nil { + return nil + } + out := new(ClusterConnectList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterConnectList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConnectSpec) DeepCopyInto(out *ClusterConnectSpec) { + *out = *in + in.ClusterTemplate.DeepCopyInto(&out.ClusterTemplate) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConnectSpec. +func (in *ClusterConnectSpec) DeepCopy() *ClusterConnectSpec { + if in == nil { + return nil + } + out := new(ClusterConnectSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConnectStatus) DeepCopyInto(out *ClusterConnectStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConnectStatus. +func (in *ClusterConnectStatus) DeepCopy() *ClusterConnectStatus { + if in == nil { + return nil + } + out := new(ClusterConnectStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterDomain) DeepCopyInto(out *ClusterDomain) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDomain. +func (in *ClusterDomain) DeepCopy() *ClusterDomain { + if in == nil { + return nil + } + out := new(ClusterDomain) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterDomain) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterDomainList) DeepCopyInto(out *ClusterDomainList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterDomain, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDomainList. +func (in *ClusterDomainList) DeepCopy() *ClusterDomainList { + if in == nil { + return nil + } + out := new(ClusterDomainList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterDomainList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterList) DeepCopyInto(out *ClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Cluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. +func (in *ClusterList) DeepCopy() *ClusterList { + if in == nil { + return nil + } + out := new(ClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMember) DeepCopyInto(out *ClusterMember) { + *out = *in + out.Info = in.Info + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMember. +func (in *ClusterMember) DeepCopy() *ClusterMember { + if in == nil { + return nil + } + out := new(ClusterMember) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMemberAccess) DeepCopyInto(out *ClusterMemberAccess) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]ClusterMember, len(*in)) + copy(*out, *in) + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]ClusterMember, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMemberAccess. +func (in *ClusterMemberAccess) DeepCopy() *ClusterMemberAccess { + if in == nil { + return nil + } + out := new(ClusterMemberAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterMemberAccess) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMemberAccessList) DeepCopyInto(out *ClusterMemberAccessList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterMemberAccess, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMemberAccessList. +func (in *ClusterMemberAccessList) DeepCopy() *ClusterMemberAccessList { + if in == nil { + return nil + } + out := new(ClusterMemberAccessList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterMemberAccessList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMembers) DeepCopyInto(out *ClusterMembers) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]ClusterMember, len(*in)) + copy(*out, *in) + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]ClusterMember, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMembers. +func (in *ClusterMembers) DeepCopy() *ClusterMembers { + if in == nil { + return nil + } + out := new(ClusterMembers) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterMembers) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMembersList) DeepCopyInto(out *ClusterMembersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterMembers, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMembersList. +func (in *ClusterMembersList) DeepCopy() *ClusterMembersList { + if in == nil { + return nil + } + out := new(ClusterMembersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterMembersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterReset) DeepCopyInto(out *ClusterReset) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterReset. +func (in *ClusterReset) DeepCopy() *ClusterReset { + if in == nil { + return nil + } + out := new(ClusterReset) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterReset) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterResetList) DeepCopyInto(out *ClusterResetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterReset, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResetList. +func (in *ClusterResetList) DeepCopy() *ClusterResetList { + if in == nil { + return nil + } + out := new(ClusterResetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterResetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplate) DeepCopyInto(out *ClusterRoleTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplate. +func (in *ClusterRoleTemplate) DeepCopy() *ClusterRoleTemplate { + if in == nil { + return nil + } + out := new(ClusterRoleTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterRoleTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplateList) DeepCopyInto(out *ClusterRoleTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterRoleTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateList. +func (in *ClusterRoleTemplateList) DeepCopy() *ClusterRoleTemplateList { + if in == nil { + return nil + } + out := new(ClusterRoleTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterRoleTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplateSpec) DeepCopyInto(out *ClusterRoleTemplateSpec) { + *out = *in + in.ClusterRoleTemplateSpec.DeepCopyInto(&out.ClusterRoleTemplateSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateSpec. +func (in *ClusterRoleTemplateSpec) DeepCopy() *ClusterRoleTemplateSpec { + if in == nil { + return nil + } + out := new(ClusterRoleTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplateStatus) DeepCopyInto(out *ClusterRoleTemplateStatus) { + *out = *in + out.ClusterRoleTemplateStatus = in.ClusterRoleTemplateStatus + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateStatus. +func (in *ClusterRoleTemplateStatus) DeepCopy() *ClusterRoleTemplateStatus { + if in == nil { + return nil + } + out := new(ClusterRoleTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { + *out = *in + in.ClusterSpec.DeepCopyInto(&out.ClusterSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. +func (in *ClusterSpec) DeepCopy() *ClusterSpec { + if in == nil { + return nil + } + out := new(ClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { + *out = *in + out.ClusterStatus = in.ClusterStatus + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. +func (in *ClusterStatus) DeepCopy() *ClusterStatus { + if in == nil { + return nil + } + out := new(ClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterVirtualClusterDefaults) DeepCopyInto(out *ClusterVirtualClusterDefaults) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.DefaultTemplate != nil { + in, out := &in.DefaultTemplate, &out.DefaultTemplate + *out = new(storagev1.VirtualClusterTemplate) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualClusterDefaults. +func (in *ClusterVirtualClusterDefaults) DeepCopy() *ClusterVirtualClusterDefaults { + if in == nil { + return nil + } + out := new(ClusterVirtualClusterDefaults) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterVirtualClusterDefaults) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterVirtualClusterDefaultsList) DeepCopyInto(out *ClusterVirtualClusterDefaultsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterVirtualClusterDefaults, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualClusterDefaultsList. +func (in *ClusterVirtualClusterDefaultsList) DeepCopy() *ClusterVirtualClusterDefaultsList { + if in == nil { + return nil + } + out := new(ClusterVirtualClusterDefaultsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterVirtualClusterDefaultsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Config) DeepCopyInto(out *Config) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config. +func (in *Config) DeepCopy() *Config { + if in == nil { + return nil + } + out := new(Config) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Config) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigList) DeepCopyInto(out *ConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Config, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigList. +func (in *ConfigList) DeepCopy() *ConfigList { + if in == nil { + return nil + } + out := new(ConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec) { + *out = *in + if in.Raw != nil { + in, out := &in.Raw, &out.Raw + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec. +func (in *ConfigSpec) DeepCopy() *ConfigSpec { + if in == nil { + return nil + } + out := new(ConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus) { + *out = *in + in.Authentication.DeepCopyInto(&out.Authentication) + if in.OIDC != nil { + in, out := &in.OIDC, &out.OIDC + *out = new(OIDC) + (*in).DeepCopyInto(*out) + } + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = new(Apps) + (*in).DeepCopyInto(*out) + } + if in.Audit != nil { + in, out := &in.Audit, &out.Audit + *out = new(Audit) + (*in).DeepCopyInto(*out) + } + if in.UISettings != nil { + in, out := &in.UISettings, &out.UISettings + *out = new(uiv1.UISettingsConfig) + (*in).DeepCopyInto(*out) + } + if in.VaultIntegration != nil { + in, out := &in.VaultIntegration, &out.VaultIntegration + *out = new(storagev1.VaultIntegrationSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigStatus. +func (in *ConfigStatus) DeepCopy() *ConfigStatus { + if in == nil { + return nil + } + out := new(ConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Connector) DeepCopyInto(out *Connector) { + *out = *in + if in.OIDC != nil { + in, out := &in.OIDC, &out.OIDC + *out = new(AuthenticationOIDC) + (*in).DeepCopyInto(*out) + } + if in.Github != nil { + in, out := &in.Github, &out.Github + *out = new(AuthenticationGithub) + (*in).DeepCopyInto(*out) + } + if in.Gitlab != nil { + in, out := &in.Gitlab, &out.Gitlab + *out = new(AuthenticationGitlab) + (*in).DeepCopyInto(*out) + } + if in.Google != nil { + in, out := &in.Google, &out.Google + *out = new(AuthenticationGoogle) + (*in).DeepCopyInto(*out) + } + if in.Microsoft != nil { + in, out := &in.Microsoft, &out.Microsoft + *out = new(AuthenticationMicrosoft) + (*in).DeepCopyInto(*out) + } + if in.SAML != nil { + in, out := &in.SAML, &out.SAML + *out = new(AuthenticationSAML) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Connector. +func (in *Connector) DeepCopy() *Connector { + if in == nil { + return nil + } + out := new(Connector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectorWithName) DeepCopyInto(out *ConnectorWithName) { + *out = *in + in.Connector.DeepCopyInto(&out.Connector) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectorWithName. +func (in *ConnectorWithName) DeepCopy() *ConnectorWithName { + if in == nil { + return nil + } + out := new(ConnectorWithName) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodDeleteOptions) DeepCopyInto(out *DevPodDeleteOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodDeleteOptions. +func (in *DevPodDeleteOptions) DeepCopy() *DevPodDeleteOptions { + if in == nil { + return nil + } + out := new(DevPodDeleteOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodDeleteOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodSshOptions) DeepCopyInto(out *DevPodSshOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodSshOptions. +func (in *DevPodSshOptions) DeepCopy() *DevPodSshOptions { + if in == nil { + return nil + } + out := new(DevPodSshOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodSshOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodStatusOptions) DeepCopyInto(out *DevPodStatusOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStatusOptions. +func (in *DevPodStatusOptions) DeepCopy() *DevPodStatusOptions { + if in == nil { + return nil + } + out := new(DevPodStatusOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodStatusOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodStopOptions) DeepCopyInto(out *DevPodStopOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStopOptions. +func (in *DevPodStopOptions) DeepCopy() *DevPodStopOptions { + if in == nil { + return nil + } + out := new(DevPodStopOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodStopOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodUpOptions) DeepCopyInto(out *DevPodUpOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodUpOptions. +func (in *DevPodUpOptions) DeepCopy() *DevPodUpOptions { + if in == nil { + return nil + } + out := new(DevPodUpOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodUpOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstance) DeepCopyInto(out *DevPodWorkspaceInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstance. +func (in *DevPodWorkspaceInstance) DeepCopy() *DevPodWorkspaceInstance { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceDelete) DeepCopyInto(out *DevPodWorkspaceInstanceDelete) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceDelete. +func (in *DevPodWorkspaceInstanceDelete) DeepCopy() *DevPodWorkspaceInstanceDelete { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceDelete) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceDelete) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceDeleteList) DeepCopyInto(out *DevPodWorkspaceInstanceDeleteList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceDelete, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceDeleteList. +func (in *DevPodWorkspaceInstanceDeleteList) DeepCopy() *DevPodWorkspaceInstanceDeleteList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceDeleteList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceDeleteList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceGetStatus) DeepCopyInto(out *DevPodWorkspaceInstanceGetStatus) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceGetStatus. +func (in *DevPodWorkspaceInstanceGetStatus) DeepCopy() *DevPodWorkspaceInstanceGetStatus { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceGetStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceGetStatus) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceGetStatusList) DeepCopyInto(out *DevPodWorkspaceInstanceGetStatusList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceGetStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceGetStatusList. +func (in *DevPodWorkspaceInstanceGetStatusList) DeepCopy() *DevPodWorkspaceInstanceGetStatusList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceGetStatusList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceGetStatusList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceList) DeepCopyInto(out *DevPodWorkspaceInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceList. +func (in *DevPodWorkspaceInstanceList) DeepCopy() *DevPodWorkspaceInstanceList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceSpec) DeepCopyInto(out *DevPodWorkspaceInstanceSpec) { + *out = *in + in.DevPodWorkspaceInstanceSpec.DeepCopyInto(&out.DevPodWorkspaceInstanceSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceSpec. +func (in *DevPodWorkspaceInstanceSpec) DeepCopy() *DevPodWorkspaceInstanceSpec { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceSsh) DeepCopyInto(out *DevPodWorkspaceInstanceSsh) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceSsh. +func (in *DevPodWorkspaceInstanceSsh) DeepCopy() *DevPodWorkspaceInstanceSsh { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceSsh) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceSsh) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceSshList) DeepCopyInto(out *DevPodWorkspaceInstanceSshList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceSsh, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceSshList. +func (in *DevPodWorkspaceInstanceSshList) DeepCopy() *DevPodWorkspaceInstanceSshList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceSshList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceSshList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceStatus) DeepCopyInto(out *DevPodWorkspaceInstanceStatus) { + *out = *in + in.DevPodWorkspaceInstanceStatus.DeepCopyInto(&out.DevPodWorkspaceInstanceStatus) + if in.SleepModeConfig != nil { + in, out := &in.SleepModeConfig, &out.SleepModeConfig + *out = new(clusterv1.SleepModeConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStatus. +func (in *DevPodWorkspaceInstanceStatus) DeepCopy() *DevPodWorkspaceInstanceStatus { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceStop) DeepCopyInto(out *DevPodWorkspaceInstanceStop) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStop. +func (in *DevPodWorkspaceInstanceStop) DeepCopy() *DevPodWorkspaceInstanceStop { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceStop) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceStop) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceStopList) DeepCopyInto(out *DevPodWorkspaceInstanceStopList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceStop, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStopList. +func (in *DevPodWorkspaceInstanceStopList) DeepCopy() *DevPodWorkspaceInstanceStopList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceStopList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceStopList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceUp) DeepCopyInto(out *DevPodWorkspaceInstanceUp) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceUp. +func (in *DevPodWorkspaceInstanceUp) DeepCopy() *DevPodWorkspaceInstanceUp { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceUp) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceUp) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceUpList) DeepCopyInto(out *DevPodWorkspaceInstanceUpList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceUp, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceUpList. +func (in *DevPodWorkspaceInstanceUpList) DeepCopy() *DevPodWorkspaceInstanceUpList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceUpList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceUpList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplate) DeepCopyInto(out *DevPodWorkspaceTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplate. +func (in *DevPodWorkspaceTemplate) DeepCopy() *DevPodWorkspaceTemplate { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateList) DeepCopyInto(out *DevPodWorkspaceTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateList. +func (in *DevPodWorkspaceTemplateList) DeepCopy() *DevPodWorkspaceTemplateList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateSpec) DeepCopyInto(out *DevPodWorkspaceTemplateSpec) { + *out = *in + in.DevPodWorkspaceTemplateSpec.DeepCopyInto(&out.DevPodWorkspaceTemplateSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateSpec. +func (in *DevPodWorkspaceTemplateSpec) DeepCopy() *DevPodWorkspaceTemplateSpec { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateStatus) DeepCopyInto(out *DevPodWorkspaceTemplateStatus) { + *out = *in + out.DevPodWorkspaceTemplateStatus = in.DevPodWorkspaceTemplateStatus + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateStatus. +func (in *DevPodWorkspaceTemplateStatus) DeepCopy() *DevPodWorkspaceTemplateStatus { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DirectClusterEndpointToken) DeepCopyInto(out *DirectClusterEndpointToken) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectClusterEndpointToken. +func (in *DirectClusterEndpointToken) DeepCopy() *DirectClusterEndpointToken { + if in == nil { + return nil + } + out := new(DirectClusterEndpointToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DirectClusterEndpointToken) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DirectClusterEndpointTokenList) DeepCopyInto(out *DirectClusterEndpointTokenList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DirectClusterEndpointToken, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectClusterEndpointTokenList. +func (in *DirectClusterEndpointTokenList) DeepCopy() *DirectClusterEndpointTokenList { + if in == nil { + return nil + } + out := new(DirectClusterEndpointTokenList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DirectClusterEndpointTokenList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DirectClusterEndpointTokenSpec) DeepCopyInto(out *DirectClusterEndpointTokenSpec) { + *out = *in + if in.Scope != nil { + in, out := &in.Scope, &out.Scope + *out = new(storagev1.AccessKeyScope) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectClusterEndpointTokenSpec. +func (in *DirectClusterEndpointTokenSpec) DeepCopy() *DirectClusterEndpointTokenSpec { + if in == nil { + return nil + } + out := new(DirectClusterEndpointTokenSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DirectClusterEndpointTokenStatus) DeepCopyInto(out *DirectClusterEndpointTokenStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectClusterEndpointTokenStatus. +func (in *DirectClusterEndpointTokenStatus) DeepCopy() *DirectClusterEndpointTokenStatus { + if in == nil { + return nil + } + out := new(DirectClusterEndpointTokenStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Event) DeepCopyInto(out *Event) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event. +func (in *Event) DeepCopy() *Event { + if in == nil { + return nil + } + out := new(Event) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Event) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventList) DeepCopyInto(out *EventList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Event, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList. +func (in *EventList) DeepCopy() *EventList { + if in == nil { + return nil + } + out := new(EventList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EventList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventSpec) DeepCopyInto(out *EventSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSpec. +func (in *EventSpec) DeepCopy() *EventSpec { + if in == nil { + return nil + } + out := new(EventSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventStatus) DeepCopyInto(out *EventStatus) { + *out = *in + in.Event.DeepCopyInto(&out.Event) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventStatus. +func (in *EventStatus) DeepCopy() *EventStatus { + if in == nil { + return nil + } + out := new(EventStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Feature) DeepCopyInto(out *Feature) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature. +func (in *Feature) DeepCopy() *Feature { + if in == nil { + return nil + } + out := new(Feature) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Feature) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureList) DeepCopyInto(out *FeatureList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Feature, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureList. +func (in *FeatureList) DeepCopy() *FeatureList { + if in == nil { + return nil + } + out := new(FeatureList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FeatureList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSpec. +func (in *FeatureSpec) DeepCopy() *FeatureSpec { + if in == nil { + return nil + } + out := new(FeatureSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureStatus) DeepCopyInto(out *FeatureStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureStatus. +func (in *FeatureStatus) DeepCopy() *FeatureStatus { + if in == nil { + return nil + } + out := new(FeatureStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupResources) DeepCopyInto(out *GroupResources) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResources. +func (in *GroupResources) DeepCopy() *GroupResources { + if in == nil { + return nil + } + out := new(GroupResources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressAuthToken) DeepCopyInto(out *IngressAuthToken) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressAuthToken. +func (in *IngressAuthToken) DeepCopy() *IngressAuthToken { + if in == nil { + return nil + } + out := new(IngressAuthToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressAuthToken) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressAuthTokenList) DeepCopyInto(out *IngressAuthTokenList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IngressAuthToken, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressAuthTokenList. +func (in *IngressAuthTokenList) DeepCopy() *IngressAuthTokenList { + if in == nil { + return nil + } + out := new(IngressAuthTokenList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressAuthTokenList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressAuthTokenSpec) DeepCopyInto(out *IngressAuthTokenSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressAuthTokenSpec. +func (in *IngressAuthTokenSpec) DeepCopy() *IngressAuthTokenSpec { + if in == nil { + return nil + } + out := new(IngressAuthTokenSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressAuthTokenStatus) DeepCopyInto(out *IngressAuthTokenStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressAuthTokenStatus. +func (in *IngressAuthTokenStatus) DeepCopy() *IngressAuthTokenStatus { + if in == nil { + return nil + } + out := new(IngressAuthTokenStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Kiosk) DeepCopyInto(out *Kiosk) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kiosk. +func (in *Kiosk) DeepCopy() *Kiosk { + if in == nil { + return nil + } + out := new(Kiosk) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Kiosk) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KioskList) DeepCopyInto(out *KioskList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Kiosk, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KioskList. +func (in *KioskList) DeepCopy() *KioskList { + if in == nil { + return nil + } + out := new(KioskList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KioskList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KioskSpec) DeepCopyInto(out *KioskSpec) { + *out = *in + in.JsPolicy.DeepCopyInto(&out.JsPolicy) + in.JsPolicyBundle.DeepCopyInto(&out.JsPolicyBundle) + in.JsPolicyViolations.DeepCopyInto(&out.JsPolicyViolations) + in.HelmRelease.DeepCopyInto(&out.HelmRelease) + in.SleepModeConfig.DeepCopyInto(&out.SleepModeConfig) + in.Space.DeepCopyInto(&out.Space) + in.VirtualCluster.DeepCopyInto(&out.VirtualCluster) + in.LocalClusterAccess.DeepCopyInto(&out.LocalClusterAccess) + in.ClusterQuota.DeepCopyInto(&out.ClusterQuota) + in.ChartInfo.DeepCopyInto(&out.ChartInfo) + in.StorageClusterAccess.DeepCopyInto(&out.StorageClusterAccess) + in.StorageClusterQuota.DeepCopyInto(&out.StorageClusterQuota) + in.StorageVirtualCluster.DeepCopyInto(&out.StorageVirtualCluster) + in.LocalUser.DeepCopyInto(&out.LocalUser) + in.LocalTeam.DeepCopyInto(&out.LocalTeam) + in.UISettings.DeepCopyInto(&out.UISettings) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KioskSpec. +func (in *KioskSpec) DeepCopy() *KioskSpec { + if in == nil { + return nil + } + out := new(KioskSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KioskStatus) DeepCopyInto(out *KioskStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KioskStatus. +func (in *KioskStatus) DeepCopy() *KioskStatus { + if in == nil { + return nil + } + out := new(KioskStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *License) DeepCopyInto(out *License) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new License. +func (in *License) DeepCopy() *License { + if in == nil { + return nil + } + out := new(License) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *License) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseList) DeepCopyInto(out *LicenseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]License, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseList. +func (in *LicenseList) DeepCopy() *LicenseList { + if in == nil { + return nil + } + out := new(LicenseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LicenseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseRequest) DeepCopyInto(out *LicenseRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseRequest. +func (in *LicenseRequest) DeepCopy() *LicenseRequest { + if in == nil { + return nil + } + out := new(LicenseRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LicenseRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseRequestList) DeepCopyInto(out *LicenseRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LicenseRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseRequestList. +func (in *LicenseRequestList) DeepCopy() *LicenseRequestList { + if in == nil { + return nil + } + out := new(LicenseRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LicenseRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseRequestSpec) DeepCopyInto(out *LicenseRequestSpec) { + *out = *in + out.Input = in.Input + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseRequestSpec. +func (in *LicenseRequestSpec) DeepCopy() *LicenseRequestSpec { + if in == nil { + return nil + } + out := new(LicenseRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseRequestStatus) DeepCopyInto(out *LicenseRequestStatus) { + *out = *in + out.Output = in.Output + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseRequestStatus. +func (in *LicenseRequestStatus) DeepCopy() *LicenseRequestStatus { + if in == nil { + return nil + } + out := new(LicenseRequestStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseSpec) DeepCopyInto(out *LicenseSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseSpec. +func (in *LicenseSpec) DeepCopy() *LicenseSpec { + if in == nil { + return nil + } + out := new(LicenseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseStatus) DeepCopyInto(out *LicenseStatus) { + *out = *in + if in.Buttons != nil { + in, out := &in.Buttons, &out.Buttons + *out = make(server.Buttons, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(server.Button) + **out = **in + } + } + } + if in.License != nil { + in, out := &in.License, &out.License + *out = new(server.License) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseStatus. +func (in *LicenseStatus) DeepCopy() *LicenseStatus { + if in == nil { + return nil + } + out := new(LicenseStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseToken) DeepCopyInto(out *LicenseToken) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseToken. +func (in *LicenseToken) DeepCopy() *LicenseToken { + if in == nil { + return nil + } + out := new(LicenseToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LicenseToken) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseTokenList) DeepCopyInto(out *LicenseTokenList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LicenseToken, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseTokenList. +func (in *LicenseTokenList) DeepCopy() *LicenseTokenList { + if in == nil { + return nil + } + out := new(LicenseTokenList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LicenseTokenList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseTokenSpec) DeepCopyInto(out *LicenseTokenSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseTokenSpec. +func (in *LicenseTokenSpec) DeepCopy() *LicenseTokenSpec { + if in == nil { + return nil + } + out := new(LicenseTokenSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseTokenStatus) DeepCopyInto(out *LicenseTokenStatus) { + *out = *in + if in.Token != nil { + in, out := &in.Token, &out.Token + *out = new(server.InstanceTokenAuth) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseTokenStatus. +func (in *LicenseTokenStatus) DeepCopy() *LicenseTokenStatus { + if in == nil { + return nil + } + out := new(LicenseTokenStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoftUpgrade) DeepCopyInto(out *LoftUpgrade) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoftUpgrade. +func (in *LoftUpgrade) DeepCopy() *LoftUpgrade { + if in == nil { + return nil + } + out := new(LoftUpgrade) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LoftUpgrade) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoftUpgradeList) DeepCopyInto(out *LoftUpgradeList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LoftUpgrade, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoftUpgradeList. +func (in *LoftUpgradeList) DeepCopy() *LoftUpgradeList { + if in == nil { + return nil + } + out := new(LoftUpgradeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LoftUpgradeList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoftUpgradeSpec) DeepCopyInto(out *LoftUpgradeSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoftUpgradeSpec. +func (in *LoftUpgradeSpec) DeepCopy() *LoftUpgradeSpec { + if in == nil { + return nil + } + out := new(LoftUpgradeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoftUpgradeStatus) DeepCopyInto(out *LoftUpgradeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoftUpgradeStatus. +func (in *LoftUpgradeStatus) DeepCopy() *LoftUpgradeStatus { + if in == nil { + return nil + } + out := new(LoftUpgradeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDC) DeepCopyInto(out *OIDC) { + *out = *in + if in.Clients != nil { + in, out := &in.Clients, &out.Clients + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDC. +func (in *OIDC) DeepCopy() *OIDC { + if in == nil { + return nil + } + out := new(OIDC) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + if in.RedirectURIs != nil { + in, out := &in.RedirectURIs, &out.RedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OwnedAccessKey) DeepCopyInto(out *OwnedAccessKey) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnedAccessKey. +func (in *OwnedAccessKey) DeepCopy() *OwnedAccessKey { + if in == nil { + return nil + } + out := new(OwnedAccessKey) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OwnedAccessKey) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OwnedAccessKeyList) DeepCopyInto(out *OwnedAccessKeyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OwnedAccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnedAccessKeyList. +func (in *OwnedAccessKeyList) DeepCopy() *OwnedAccessKeyList { + if in == nil { + return nil + } + out := new(OwnedAccessKeyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OwnedAccessKeyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OwnedAccessKeySpec) DeepCopyInto(out *OwnedAccessKeySpec) { + *out = *in + in.AccessKeySpec.DeepCopyInto(&out.AccessKeySpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnedAccessKeySpec. +func (in *OwnedAccessKeySpec) DeepCopy() *OwnedAccessKeySpec { + if in == nil { + return nil + } + out := new(OwnedAccessKeySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OwnedAccessKeyStatus) DeepCopyInto(out *OwnedAccessKeyStatus) { + *out = *in + in.AccessKeyStatus.DeepCopyInto(&out.AccessKeyStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnedAccessKeyStatus. +func (in *OwnedAccessKeyStatus) DeepCopy() *OwnedAccessKeyStatus { + if in == nil { + return nil + } + out := new(OwnedAccessKeyStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyViolation) DeepCopyInto(out *PolicyViolation) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyViolation. +func (in *PolicyViolation) DeepCopy() *PolicyViolation { + if in == nil { + return nil + } + out := new(PolicyViolation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PolicyViolation) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyViolationList) DeepCopyInto(out *PolicyViolationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PolicyViolation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyViolationList. +func (in *PolicyViolationList) DeepCopy() *PolicyViolationList { + if in == nil { + return nil + } + out := new(PolicyViolationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PolicyViolationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyViolationSpec) DeepCopyInto(out *PolicyViolationSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyViolationSpec. +func (in *PolicyViolationSpec) DeepCopy() *PolicyViolationSpec { + if in == nil { + return nil + } + out := new(PolicyViolationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyViolationStatus) DeepCopyInto(out *PolicyViolationStatus) { + *out = *in + if in.User != nil { + in, out := &in.User, &out.User + *out = new(clusterv1.EntityInfo) + **out = **in + } + in.Violation.DeepCopyInto(&out.Violation) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyViolationStatus. +func (in *PolicyViolationStatus) DeepCopy() *PolicyViolationStatus { + if in == nil { + return nil + } + out := new(PolicyViolationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PredefinedApp) DeepCopyInto(out *PredefinedApp) { + *out = *in + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PredefinedApp. +func (in *PredefinedApp) DeepCopy() *PredefinedApp { + if in == nil { + return nil + } + out := new(PredefinedApp) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Project) DeepCopyInto(out *Project) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. +func (in *Project) DeepCopy() *Project { + if in == nil { + return nil + } + out := new(Project) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Project) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectChartInfo) DeepCopyInto(out *ProjectChartInfo) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectChartInfo. +func (in *ProjectChartInfo) DeepCopy() *ProjectChartInfo { + if in == nil { + return nil + } + out := new(ProjectChartInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectChartInfo) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectChartInfoList) DeepCopyInto(out *ProjectChartInfoList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectChartInfo, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectChartInfoList. +func (in *ProjectChartInfoList) DeepCopy() *ProjectChartInfoList { + if in == nil { + return nil + } + out := new(ProjectChartInfoList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectChartInfoList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectChartInfoSpec) DeepCopyInto(out *ProjectChartInfoSpec) { + *out = *in + out.ChartInfoSpec = in.ChartInfoSpec + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectChartInfoSpec. +func (in *ProjectChartInfoSpec) DeepCopy() *ProjectChartInfoSpec { + if in == nil { + return nil + } + out := new(ProjectChartInfoSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectChartInfoStatus) DeepCopyInto(out *ProjectChartInfoStatus) { + *out = *in + in.ChartInfoStatus.DeepCopyInto(&out.ChartInfoStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectChartInfoStatus. +func (in *ProjectChartInfoStatus) DeepCopy() *ProjectChartInfoStatus { + if in == nil { + return nil + } + out := new(ProjectChartInfoStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectCharts) DeepCopyInto(out *ProjectCharts) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Charts != nil { + in, out := &in.Charts, &out.Charts + *out = make([]storagev1.HelmChart, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectCharts. +func (in *ProjectCharts) DeepCopy() *ProjectCharts { + if in == nil { + return nil + } + out := new(ProjectCharts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectCharts) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectChartsList) DeepCopyInto(out *ProjectChartsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectCharts, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectChartsList. +func (in *ProjectChartsList) DeepCopy() *ProjectChartsList { + if in == nil { + return nil + } + out := new(ProjectChartsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectChartsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectClusters) DeepCopyInto(out *ProjectClusters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]Cluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Runners != nil { + in, out := &in.Runners, &out.Runners + *out = make([]Runner, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectClusters. +func (in *ProjectClusters) DeepCopy() *ProjectClusters { + if in == nil { + return nil + } + out := new(ProjectClusters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectClusters) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectClustersList) DeepCopyInto(out *ProjectClustersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectClusters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectClustersList. +func (in *ProjectClustersList) DeepCopy() *ProjectClustersList { + if in == nil { + return nil + } + out := new(ProjectClustersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectClustersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportSpace) DeepCopyInto(out *ProjectImportSpace) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SourceSpace = in.SourceSpace + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportSpace. +func (in *ProjectImportSpace) DeepCopy() *ProjectImportSpace { + if in == nil { + return nil + } + out := new(ProjectImportSpace) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectImportSpace) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportSpaceList) DeepCopyInto(out *ProjectImportSpaceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectImportSpace, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportSpaceList. +func (in *ProjectImportSpaceList) DeepCopy() *ProjectImportSpaceList { + if in == nil { + return nil + } + out := new(ProjectImportSpaceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectImportSpaceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportSpaceSource) DeepCopyInto(out *ProjectImportSpaceSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportSpaceSource. +func (in *ProjectImportSpaceSource) DeepCopy() *ProjectImportSpaceSource { + if in == nil { + return nil + } + out := new(ProjectImportSpaceSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportVirtualCluster) DeepCopyInto(out *ProjectImportVirtualCluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SourceVirtualCluster = in.SourceVirtualCluster + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportVirtualCluster. +func (in *ProjectImportVirtualCluster) DeepCopy() *ProjectImportVirtualCluster { + if in == nil { + return nil + } + out := new(ProjectImportVirtualCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectImportVirtualCluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportVirtualClusterList) DeepCopyInto(out *ProjectImportVirtualClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectImportVirtualCluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportVirtualClusterList. +func (in *ProjectImportVirtualClusterList) DeepCopy() *ProjectImportVirtualClusterList { + if in == nil { + return nil + } + out := new(ProjectImportVirtualClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectImportVirtualClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportVirtualClusterSource) DeepCopyInto(out *ProjectImportVirtualClusterSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportVirtualClusterSource. +func (in *ProjectImportVirtualClusterSource) DeepCopy() *ProjectImportVirtualClusterSource { + if in == nil { + return nil + } + out := new(ProjectImportVirtualClusterSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectList) DeepCopyInto(out *ProjectList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. +func (in *ProjectList) DeepCopy() *ProjectList { + if in == nil { + return nil + } + out := new(ProjectList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMember) DeepCopyInto(out *ProjectMember) { + *out = *in + out.Info = in.Info + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMember. +func (in *ProjectMember) DeepCopy() *ProjectMember { + if in == nil { + return nil + } + out := new(ProjectMember) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMembers) DeepCopyInto(out *ProjectMembers) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]ProjectMember, len(*in)) + copy(*out, *in) + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]ProjectMember, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMembers. +func (in *ProjectMembers) DeepCopy() *ProjectMembers { + if in == nil { + return nil + } + out := new(ProjectMembers) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMembers) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMembersList) DeepCopyInto(out *ProjectMembersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectMembers, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMembersList. +func (in *ProjectMembersList) DeepCopy() *ProjectMembersList { + if in == nil { + return nil + } + out := new(ProjectMembersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMembersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateSpaceInstance) DeepCopyInto(out *ProjectMigrateSpaceInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SourceSpaceInstance = in.SourceSpaceInstance + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateSpaceInstance. +func (in *ProjectMigrateSpaceInstance) DeepCopy() *ProjectMigrateSpaceInstance { + if in == nil { + return nil + } + out := new(ProjectMigrateSpaceInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMigrateSpaceInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateSpaceInstanceList) DeepCopyInto(out *ProjectMigrateSpaceInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectMigrateSpaceInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateSpaceInstanceList. +func (in *ProjectMigrateSpaceInstanceList) DeepCopy() *ProjectMigrateSpaceInstanceList { + if in == nil { + return nil + } + out := new(ProjectMigrateSpaceInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMigrateSpaceInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateSpaceInstanceSource) DeepCopyInto(out *ProjectMigrateSpaceInstanceSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateSpaceInstanceSource. +func (in *ProjectMigrateSpaceInstanceSource) DeepCopy() *ProjectMigrateSpaceInstanceSource { + if in == nil { + return nil + } + out := new(ProjectMigrateSpaceInstanceSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateVirtualClusterInstance) DeepCopyInto(out *ProjectMigrateVirtualClusterInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SourceVirtualClusterInstance = in.SourceVirtualClusterInstance + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateVirtualClusterInstance. +func (in *ProjectMigrateVirtualClusterInstance) DeepCopy() *ProjectMigrateVirtualClusterInstance { + if in == nil { + return nil + } + out := new(ProjectMigrateVirtualClusterInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMigrateVirtualClusterInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopyInto(out *ProjectMigrateVirtualClusterInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectMigrateVirtualClusterInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateVirtualClusterInstanceList. +func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopy() *ProjectMigrateVirtualClusterInstanceList { + if in == nil { + return nil + } + out := new(ProjectMigrateVirtualClusterInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateVirtualClusterInstanceSource) DeepCopyInto(out *ProjectMigrateVirtualClusterInstanceSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateVirtualClusterInstanceSource. +func (in *ProjectMigrateVirtualClusterInstanceSource) DeepCopy() *ProjectMigrateVirtualClusterInstanceSource { + if in == nil { + return nil + } + out := new(ProjectMigrateVirtualClusterInstanceSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSecret) DeepCopyInto(out *ProjectSecret) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSecret. +func (in *ProjectSecret) DeepCopy() *ProjectSecret { + if in == nil { + return nil + } + out := new(ProjectSecret) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectSecret) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSecretList) DeepCopyInto(out *ProjectSecretList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectSecret, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSecretList. +func (in *ProjectSecretList) DeepCopy() *ProjectSecretList { + if in == nil { + return nil + } + out := new(ProjectSecretList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectSecretList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSecretSpec) DeepCopyInto(out *ProjectSecretSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(storagev1.UserOrTeam) + **out = **in + } + if in.Data != nil { + in, out := &in.Data, &out.Data + *out = make(map[string][]byte, len(*in)) + for key, val := range *in { + var outVal []byte + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]byte, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]storagev1.Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSecretSpec. +func (in *ProjectSecretSpec) DeepCopy() *ProjectSecretSpec { + if in == nil { + return nil + } + out := new(ProjectSecretSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSecretStatus) DeepCopyInto(out *ProjectSecretStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(loftstoragev1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSecretStatus. +func (in *ProjectSecretStatus) DeepCopy() *ProjectSecretStatus { + if in == nil { + return nil + } + out := new(ProjectSecretStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { + *out = *in + in.ProjectSpec.DeepCopyInto(&out.ProjectSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. +func (in *ProjectSpec) DeepCopy() *ProjectSpec { + if in == nil { + return nil + } + out := new(ProjectSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { + *out = *in + in.ProjectStatus.DeepCopyInto(&out.ProjectStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. +func (in *ProjectStatus) DeepCopy() *ProjectStatus { + if in == nil { + return nil + } + out := new(ProjectStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectTemplates) DeepCopyInto(out *ProjectTemplates) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.VirtualClusterTemplates != nil { + in, out := &in.VirtualClusterTemplates, &out.VirtualClusterTemplates + *out = make([]VirtualClusterTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SpaceTemplates != nil { + in, out := &in.SpaceTemplates, &out.SpaceTemplates + *out = make([]SpaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DevPodWorkspaceTemplates != nil { + in, out := &in.DevPodWorkspaceTemplates, &out.DevPodWorkspaceTemplates + *out = make([]DevPodWorkspaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectTemplates. +func (in *ProjectTemplates) DeepCopy() *ProjectTemplates { + if in == nil { + return nil + } + out := new(ProjectTemplates) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectTemplates) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectTemplatesList) DeepCopyInto(out *ProjectTemplatesList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectTemplates, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectTemplatesList. +func (in *ProjectTemplatesList) DeepCopy() *ProjectTemplatesList { + if in == nil { + return nil + } + out := new(ProjectTemplatesList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectTemplatesList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedirectToken) DeepCopyInto(out *RedirectToken) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectToken. +func (in *RedirectToken) DeepCopy() *RedirectToken { + if in == nil { + return nil + } + out := new(RedirectToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RedirectToken) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedirectTokenClaims) DeepCopyInto(out *RedirectTokenClaims) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectTokenClaims. +func (in *RedirectTokenClaims) DeepCopy() *RedirectTokenClaims { + if in == nil { + return nil + } + out := new(RedirectTokenClaims) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedirectTokenList) DeepCopyInto(out *RedirectTokenList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RedirectToken, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectTokenList. +func (in *RedirectTokenList) DeepCopy() *RedirectTokenList { + if in == nil { + return nil + } + out := new(RedirectTokenList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RedirectTokenList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedirectTokenSpec) DeepCopyInto(out *RedirectTokenSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectTokenSpec. +func (in *RedirectTokenSpec) DeepCopy() *RedirectTokenSpec { + if in == nil { + return nil + } + out := new(RedirectTokenSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedirectTokenStatus) DeepCopyInto(out *RedirectTokenStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectTokenStatus. +func (in *RedirectTokenStatus) DeepCopy() *RedirectTokenStatus { + if in == nil { + return nil + } + out := new(RedirectTokenStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResetAccessKey) DeepCopyInto(out *ResetAccessKey) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetAccessKey. +func (in *ResetAccessKey) DeepCopy() *ResetAccessKey { + if in == nil { + return nil + } + out := new(ResetAccessKey) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResetAccessKey) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResetAccessKeyList) DeepCopyInto(out *ResetAccessKeyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResetAccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetAccessKeyList. +func (in *ResetAccessKeyList) DeepCopy() *ResetAccessKeyList { + if in == nil { + return nil + } + out := new(ResetAccessKeyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResetAccessKeyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResetAccessKeySpec) DeepCopyInto(out *ResetAccessKeySpec) { + *out = *in + in.AccessKeySpec.DeepCopyInto(&out.AccessKeySpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetAccessKeySpec. +func (in *ResetAccessKeySpec) DeepCopy() *ResetAccessKeySpec { + if in == nil { + return nil + } + out := new(ResetAccessKeySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResetAccessKeyStatus) DeepCopyInto(out *ResetAccessKeyStatus) { + *out = *in + in.AccessKeyStatus.DeepCopyInto(&out.AccessKeyStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetAccessKeyStatus. +func (in *ResetAccessKeyStatus) DeepCopy() *ResetAccessKeyStatus { + if in == nil { + return nil + } + out := new(ResetAccessKeyStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Runner) DeepCopyInto(out *Runner) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Runner. +func (in *Runner) DeepCopy() *Runner { + if in == nil { + return nil + } + out := new(Runner) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Runner) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerAccessKey) DeepCopyInto(out *RunnerAccessKey) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerAccessKey. +func (in *RunnerAccessKey) DeepCopy() *RunnerAccessKey { + if in == nil { + return nil + } + out := new(RunnerAccessKey) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerAccessKey) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerAccessKeyList) DeepCopyInto(out *RunnerAccessKeyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RunnerAccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerAccessKeyList. +func (in *RunnerAccessKeyList) DeepCopy() *RunnerAccessKeyList { + if in == nil { + return nil + } + out := new(RunnerAccessKeyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerAccessKeyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerConfig) DeepCopyInto(out *RunnerConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.TokenCaCert != nil { + in, out := &in.TokenCaCert, &out.TokenCaCert + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerConfig. +func (in *RunnerConfig) DeepCopy() *RunnerConfig { + if in == nil { + return nil + } + out := new(RunnerConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerConfigList) DeepCopyInto(out *RunnerConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RunnerConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerConfigList. +func (in *RunnerConfigList) DeepCopy() *RunnerConfigList { + if in == nil { + return nil + } + out := new(RunnerConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerList) DeepCopyInto(out *RunnerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Runner, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerList. +func (in *RunnerList) DeepCopy() *RunnerList { + if in == nil { + return nil + } + out := new(RunnerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerSpec) DeepCopyInto(out *RunnerSpec) { + *out = *in + in.RunnerSpec.DeepCopyInto(&out.RunnerSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerSpec. +func (in *RunnerSpec) DeepCopy() *RunnerSpec { + if in == nil { + return nil + } + out := new(RunnerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerStatus) DeepCopyInto(out *RunnerStatus) { + *out = *in + in.RunnerStatus.DeepCopyInto(&out.RunnerStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerStatus. +func (in *RunnerStatus) DeepCopy() *RunnerStatus { + if in == nil { + return nil + } + out := new(RunnerStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Self) DeepCopyInto(out *Self) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Self. +func (in *Self) DeepCopy() *Self { + if in == nil { + return nil + } + out := new(Self) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Self) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfList) DeepCopyInto(out *SelfList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Self, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfList. +func (in *SelfList) DeepCopy() *SelfList { + if in == nil { + return nil + } + out := new(SelfList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SelfList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfSpec) DeepCopyInto(out *SelfSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSpec. +func (in *SelfSpec) DeepCopy() *SelfSpec { + if in == nil { + return nil + } + out := new(SelfSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfStatus) DeepCopyInto(out *SelfStatus) { + *out = *in + if in.User != nil { + in, out := &in.User, &out.User + *out = new(UserInfo) + (*in).DeepCopyInto(*out) + } + if in.Team != nil { + in, out := &in.Team, &out.Team + *out = new(clusterv1.EntityInfo) + **out = **in + } + if in.AccessKeyScope != nil { + in, out := &in.AccessKeyScope, &out.AccessKeyScope + *out = new(storagev1.AccessKeyScope) + (*in).DeepCopyInto(*out) + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfStatus. +func (in *SelfStatus) DeepCopy() *SelfStatus { + if in == nil { + return nil + } + out := new(SelfStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReview. +func (in *SelfSubjectAccessReview) DeepCopy() *SelfSubjectAccessReview { + if in == nil { + return nil + } + out := new(SelfSubjectAccessReview) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SelfSubjectAccessReview) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfSubjectAccessReviewList) DeepCopyInto(out *SelfSubjectAccessReviewList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SelfSubjectAccessReview, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReviewList. +func (in *SelfSubjectAccessReviewList) DeepCopy() *SelfSubjectAccessReviewList { + if in == nil { + return nil + } + out := new(SelfSubjectAccessReviewList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SelfSubjectAccessReviewList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfSubjectAccessReviewSpec) DeepCopyInto(out *SelfSubjectAccessReviewSpec) { + *out = *in + in.SelfSubjectAccessReviewSpec.DeepCopyInto(&out.SelfSubjectAccessReviewSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReviewSpec. +func (in *SelfSubjectAccessReviewSpec) DeepCopy() *SelfSubjectAccessReviewSpec { + if in == nil { + return nil + } + out := new(SelfSubjectAccessReviewSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfSubjectAccessReviewStatus) DeepCopyInto(out *SelfSubjectAccessReviewStatus) { + *out = *in + out.SubjectAccessReviewStatus = in.SubjectAccessReviewStatus + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReviewStatus. +func (in *SelfSubjectAccessReviewStatus) DeepCopy() *SelfSubjectAccessReviewStatus { + if in == nil { + return nil + } + out := new(SelfSubjectAccessReviewStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecret) DeepCopyInto(out *SharedSecret) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecret. +func (in *SharedSecret) DeepCopy() *SharedSecret { + if in == nil { + return nil + } + out := new(SharedSecret) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SharedSecret) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretList) DeepCopyInto(out *SharedSecretList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SharedSecret, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretList. +func (in *SharedSecretList) DeepCopy() *SharedSecretList { + if in == nil { + return nil + } + out := new(SharedSecretList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SharedSecretList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretSpec) DeepCopyInto(out *SharedSecretSpec) { + *out = *in + in.SharedSecretSpec.DeepCopyInto(&out.SharedSecretSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretSpec. +func (in *SharedSecretSpec) DeepCopy() *SharedSecretSpec { + if in == nil { + return nil + } + out := new(SharedSecretSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretStatus) DeepCopyInto(out *SharedSecretStatus) { + *out = *in + in.SharedSecretStatus.DeepCopyInto(&out.SharedSecretStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretStatus. +func (in *SharedSecretStatus) DeepCopy() *SharedSecretStatus { + if in == nil { + return nil + } + out := new(SharedSecretStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraint) DeepCopyInto(out *SpaceConstraint) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraint. +func (in *SpaceConstraint) DeepCopy() *SpaceConstraint { + if in == nil { + return nil + } + out := new(SpaceConstraint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceConstraint) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraintList) DeepCopyInto(out *SpaceConstraintList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SpaceConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraintList. +func (in *SpaceConstraintList) DeepCopy() *SpaceConstraintList { + if in == nil { + return nil + } + out := new(SpaceConstraintList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceConstraintList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraintSpec) DeepCopyInto(out *SpaceConstraintSpec) { + *out = *in + in.SpaceConstraintSpec.DeepCopyInto(&out.SpaceConstraintSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraintSpec. +func (in *SpaceConstraintSpec) DeepCopy() *SpaceConstraintSpec { + if in == nil { + return nil + } + out := new(SpaceConstraintSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraintStatus) DeepCopyInto(out *SpaceConstraintStatus) { + *out = *in + out.SpaceConstraintStatus = in.SpaceConstraintStatus + if in.ClusterRole != nil { + in, out := &in.ClusterRole, &out.ClusterRole + *out = new(clusterv1.EntityInfo) + **out = **in + } + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraintStatus. +func (in *SpaceConstraintStatus) DeepCopy() *SpaceConstraintStatus { + if in == nil { + return nil + } + out := new(SpaceConstraintStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstance) DeepCopyInto(out *SpaceInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstance. +func (in *SpaceInstance) DeepCopy() *SpaceInstance { + if in == nil { + return nil + } + out := new(SpaceInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstanceList) DeepCopyInto(out *SpaceInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SpaceInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstanceList. +func (in *SpaceInstanceList) DeepCopy() *SpaceInstanceList { + if in == nil { + return nil + } + out := new(SpaceInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstanceSpec) DeepCopyInto(out *SpaceInstanceSpec) { + *out = *in + in.SpaceInstanceSpec.DeepCopyInto(&out.SpaceInstanceSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstanceSpec. +func (in *SpaceInstanceSpec) DeepCopy() *SpaceInstanceSpec { + if in == nil { + return nil + } + out := new(SpaceInstanceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstanceStatus) DeepCopyInto(out *SpaceInstanceStatus) { + *out = *in + in.SpaceInstanceStatus.DeepCopyInto(&out.SpaceInstanceStatus) + if in.SleepModeConfig != nil { + in, out := &in.SleepModeConfig, &out.SleepModeConfig + *out = new(clusterv1.SleepModeConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstanceStatus. +func (in *SpaceInstanceStatus) DeepCopy() *SpaceInstanceStatus { + if in == nil { + return nil + } + out := new(SpaceInstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplate) DeepCopyInto(out *SpaceTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplate. +func (in *SpaceTemplate) DeepCopy() *SpaceTemplate { + if in == nil { + return nil + } + out := new(SpaceTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateList) DeepCopyInto(out *SpaceTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SpaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateList. +func (in *SpaceTemplateList) DeepCopy() *SpaceTemplateList { + if in == nil { + return nil + } + out := new(SpaceTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateSpec) DeepCopyInto(out *SpaceTemplateSpec) { + *out = *in + in.SpaceTemplateSpec.DeepCopyInto(&out.SpaceTemplateSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateSpec. +func (in *SpaceTemplateSpec) DeepCopy() *SpaceTemplateSpec { + if in == nil { + return nil + } + out := new(SpaceTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateStatus) DeepCopyInto(out *SpaceTemplateStatus) { + *out = *in + out.SpaceTemplateStatus = in.SpaceTemplateStatus + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateStatus. +func (in *SpaceTemplateStatus) DeepCopy() *SpaceTemplateStatus { + if in == nil { + return nil + } + out := new(SpaceTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReview. +func (in *SubjectAccessReview) DeepCopy() *SubjectAccessReview { + if in == nil { + return nil + } + out := new(SubjectAccessReview) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SubjectAccessReview) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubjectAccessReviewList) DeepCopyInto(out *SubjectAccessReviewList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SubjectAccessReview, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewList. +func (in *SubjectAccessReviewList) DeepCopy() *SubjectAccessReviewList { + if in == nil { + return nil + } + out := new(SubjectAccessReviewList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SubjectAccessReviewList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubjectAccessReviewSpec) DeepCopyInto(out *SubjectAccessReviewSpec) { + *out = *in + in.SubjectAccessReviewSpec.DeepCopyInto(&out.SubjectAccessReviewSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewSpec. +func (in *SubjectAccessReviewSpec) DeepCopy() *SubjectAccessReviewSpec { + if in == nil { + return nil + } + out := new(SubjectAccessReviewSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubjectAccessReviewStatus) DeepCopyInto(out *SubjectAccessReviewStatus) { + *out = *in + out.SubjectAccessReviewStatus = in.SubjectAccessReviewStatus + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewStatus. +func (in *SubjectAccessReviewStatus) DeepCopy() *SubjectAccessReviewStatus { + if in == nil { + return nil + } + out := new(SubjectAccessReviewStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Task) DeepCopyInto(out *Task) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task. +func (in *Task) DeepCopy() *Task { + if in == nil { + return nil + } + out := new(Task) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Task) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskList) DeepCopyInto(out *TaskList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Task, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskList. +func (in *TaskList) DeepCopy() *TaskList { + if in == nil { + return nil + } + out := new(TaskList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskLog) DeepCopyInto(out *TaskLog) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskLog. +func (in *TaskLog) DeepCopy() *TaskLog { + if in == nil { + return nil + } + out := new(TaskLog) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskLog) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskLogList) DeepCopyInto(out *TaskLogList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TaskLog, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskLogList. +func (in *TaskLogList) DeepCopy() *TaskLogList { + if in == nil { + return nil + } + out := new(TaskLogList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskLogList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskLogOptions) DeepCopyInto(out *TaskLogOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.SinceSeconds != nil { + in, out := &in.SinceSeconds, &out.SinceSeconds + *out = new(int64) + **out = **in + } + if in.SinceTime != nil { + in, out := &in.SinceTime, &out.SinceTime + *out = (*in).DeepCopy() + } + if in.TailLines != nil { + in, out := &in.TailLines, &out.TailLines + *out = new(int64) + **out = **in + } + if in.LimitBytes != nil { + in, out := &in.LimitBytes, &out.LimitBytes + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskLogOptions. +func (in *TaskLogOptions) DeepCopy() *TaskLogOptions { + if in == nil { + return nil + } + out := new(TaskLogOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskLogOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskSpec) DeepCopyInto(out *TaskSpec) { + *out = *in + in.TaskSpec.DeepCopyInto(&out.TaskSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec. +func (in *TaskSpec) DeepCopy() *TaskSpec { + if in == nil { + return nil + } + out := new(TaskSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskStatus) DeepCopyInto(out *TaskStatus) { + *out = *in + in.TaskStatus.DeepCopyInto(&out.TaskStatus) + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(clusterv1.UserOrTeam) + (*in).DeepCopyInto(*out) + } + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = new(clusterv1.EntityInfo) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskStatus. +func (in *TaskStatus) DeepCopy() *TaskStatus { + if in == nil { + return nil + } + out := new(TaskStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Team) DeepCopyInto(out *Team) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Team. +func (in *Team) DeepCopy() *Team { + if in == nil { + return nil + } + out := new(Team) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Team) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamAccessKeys) DeepCopyInto(out *TeamAccessKeys) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.AccessKeys != nil { + in, out := &in.AccessKeys, &out.AccessKeys + *out = make([]OwnedAccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamAccessKeys. +func (in *TeamAccessKeys) DeepCopy() *TeamAccessKeys { + if in == nil { + return nil + } + out := new(TeamAccessKeys) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamAccessKeys) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamAccessKeysList) DeepCopyInto(out *TeamAccessKeysList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TeamAccessKeys, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamAccessKeysList. +func (in *TeamAccessKeysList) DeepCopy() *TeamAccessKeysList { + if in == nil { + return nil + } + out := new(TeamAccessKeysList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamAccessKeysList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamClusters) DeepCopyInto(out *TeamClusters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]ClusterAccounts, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamClusters. +func (in *TeamClusters) DeepCopy() *TeamClusters { + if in == nil { + return nil + } + out := new(TeamClusters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamClusters) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamClustersList) DeepCopyInto(out *TeamClustersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TeamClusters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamClustersList. +func (in *TeamClustersList) DeepCopy() *TeamClustersList { + if in == nil { + return nil + } + out := new(TeamClustersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamClustersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamList) DeepCopyInto(out *TeamList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Team, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamList. +func (in *TeamList) DeepCopy() *TeamList { + if in == nil { + return nil + } + out := new(TeamList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamSpec) DeepCopyInto(out *TeamSpec) { + *out = *in + in.TeamSpec.DeepCopyInto(&out.TeamSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamSpec. +func (in *TeamSpec) DeepCopy() *TeamSpec { + if in == nil { + return nil + } + out := new(TeamSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamStatus) DeepCopyInto(out *TeamStatus) { + *out = *in + in.TeamStatus.DeepCopyInto(&out.TeamStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamStatus. +func (in *TeamStatus) DeepCopy() *TeamStatus { + if in == nil { + return nil + } + out := new(TeamStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *User) DeepCopyInto(out *User) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User. +func (in *User) DeepCopy() *User { + if in == nil { + return nil + } + out := new(User) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *User) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAccessKeys) DeepCopyInto(out *UserAccessKeys) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.AccessKeys != nil { + in, out := &in.AccessKeys, &out.AccessKeys + *out = make([]OwnedAccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAccessKeys. +func (in *UserAccessKeys) DeepCopy() *UserAccessKeys { + if in == nil { + return nil + } + out := new(UserAccessKeys) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserAccessKeys) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAccessKeysList) DeepCopyInto(out *UserAccessKeysList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserAccessKeys, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAccessKeysList. +func (in *UserAccessKeysList) DeepCopy() *UserAccessKeysList { + if in == nil { + return nil + } + out := new(UserAccessKeysList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserAccessKeysList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserClusters) DeepCopyInto(out *UserClusters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]ClusterAccounts, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserClusters. +func (in *UserClusters) DeepCopy() *UserClusters { + if in == nil { + return nil + } + out := new(UserClusters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserClusters) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserClustersList) DeepCopyInto(out *UserClustersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserClusters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserClustersList. +func (in *UserClustersList) DeepCopy() *UserClustersList { + if in == nil { + return nil + } + out := new(UserClustersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserClustersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserInfo) DeepCopyInto(out *UserInfo) { + *out = *in + out.EntityInfo = in.EntityInfo + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserInfo. +func (in *UserInfo) DeepCopy() *UserInfo { + if in == nil { + return nil + } + out := new(UserInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserList) DeepCopyInto(out *UserList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]User, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList. +func (in *UserList) DeepCopy() *UserList { + if in == nil { + return nil + } + out := new(UserList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserPermissions) DeepCopyInto(out *UserPermissions) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.ClusterRoles != nil { + in, out := &in.ClusterRoles, &out.ClusterRoles + *out = make([]UserPermissionsRole, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NamespaceRoles != nil { + in, out := &in.NamespaceRoles, &out.NamespaceRoles + *out = make([]UserPermissionsRole, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPermissions. +func (in *UserPermissions) DeepCopy() *UserPermissions { + if in == nil { + return nil + } + out := new(UserPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserPermissions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserPermissionsList) DeepCopyInto(out *UserPermissionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserPermissions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPermissionsList. +func (in *UserPermissionsList) DeepCopy() *UserPermissionsList { + if in == nil { + return nil + } + out := new(UserPermissionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserPermissionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserPermissionsRole) DeepCopyInto(out *UserPermissionsRole) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]rbacv1.PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPermissionsRole. +func (in *UserPermissionsRole) DeepCopy() *UserPermissionsRole { + if in == nil { + return nil + } + out := new(UserPermissionsRole) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserProfile) DeepCopyInto(out *UserProfile) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Icon != nil { + in, out := &in.Icon, &out.Icon + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserProfile. +func (in *UserProfile) DeepCopy() *UserProfile { + if in == nil { + return nil + } + out := new(UserProfile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserProfile) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserProfileList) DeepCopyInto(out *UserProfileList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserProfile, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserProfileList. +func (in *UserProfileList) DeepCopy() *UserProfileList { + if in == nil { + return nil + } + out := new(UserProfileList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserProfileList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserQuotasOptions) DeepCopyInto(out *UserQuotasOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserQuotasOptions. +func (in *UserQuotasOptions) DeepCopy() *UserQuotasOptions { + if in == nil { + return nil + } + out := new(UserQuotasOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserQuotasOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserSpacesOptions) DeepCopyInto(out *UserSpacesOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpacesOptions. +func (in *UserSpacesOptions) DeepCopy() *UserSpacesOptions { + if in == nil { + return nil + } + out := new(UserSpacesOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserSpacesOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserSpec) DeepCopyInto(out *UserSpec) { + *out = *in + in.UserSpec.DeepCopyInto(&out.UserSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpec. +func (in *UserSpec) DeepCopy() *UserSpec { + if in == nil { + return nil + } + out := new(UserSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserStatus) DeepCopyInto(out *UserStatus) { + *out = *in + in.UserStatus.DeepCopyInto(&out.UserStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserStatus. +func (in *UserStatus) DeepCopy() *UserStatus { + if in == nil { + return nil + } + out := new(UserStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserVirtualClustersOptions) DeepCopyInto(out *UserVirtualClustersOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserVirtualClustersOptions. +func (in *UserVirtualClustersOptions) DeepCopy() *UserVirtualClustersOptions { + if in == nil { + return nil + } + out := new(UserVirtualClustersOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserVirtualClustersOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstance) DeepCopyInto(out *VirtualClusterInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstance. +func (in *VirtualClusterInstance) DeepCopy() *VirtualClusterInstance { + if in == nil { + return nil + } + out := new(VirtualClusterInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceKubeConfig) DeepCopyInto(out *VirtualClusterInstanceKubeConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceKubeConfig. +func (in *VirtualClusterInstanceKubeConfig) DeepCopy() *VirtualClusterInstanceKubeConfig { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceKubeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceKubeConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceKubeConfigList) DeepCopyInto(out *VirtualClusterInstanceKubeConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterInstanceKubeConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceKubeConfigList. +func (in *VirtualClusterInstanceKubeConfigList) DeepCopy() *VirtualClusterInstanceKubeConfigList { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceKubeConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceKubeConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceKubeConfigSpec) DeepCopyInto(out *VirtualClusterInstanceKubeConfigSpec) { + *out = *in + if in.CertificateTTL != nil { + in, out := &in.CertificateTTL, &out.CertificateTTL + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceKubeConfigSpec. +func (in *VirtualClusterInstanceKubeConfigSpec) DeepCopy() *VirtualClusterInstanceKubeConfigSpec { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceKubeConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceKubeConfigStatus) DeepCopyInto(out *VirtualClusterInstanceKubeConfigStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceKubeConfigStatus. +func (in *VirtualClusterInstanceKubeConfigStatus) DeepCopy() *VirtualClusterInstanceKubeConfigStatus { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceKubeConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceList) DeepCopyInto(out *VirtualClusterInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceList. +func (in *VirtualClusterInstanceList) DeepCopy() *VirtualClusterInstanceList { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceLog) DeepCopyInto(out *VirtualClusterInstanceLog) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceLog. +func (in *VirtualClusterInstanceLog) DeepCopy() *VirtualClusterInstanceLog { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceLog) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceLog) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceLogList) DeepCopyInto(out *VirtualClusterInstanceLogList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterInstanceLog, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceLogList. +func (in *VirtualClusterInstanceLogList) DeepCopy() *VirtualClusterInstanceLogList { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceLogList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceLogList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceLogOptions) DeepCopyInto(out *VirtualClusterInstanceLogOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.SinceSeconds != nil { + in, out := &in.SinceSeconds, &out.SinceSeconds + *out = new(int64) + **out = **in + } + if in.SinceTime != nil { + in, out := &in.SinceTime, &out.SinceTime + *out = (*in).DeepCopy() + } + if in.TailLines != nil { + in, out := &in.TailLines, &out.TailLines + *out = new(int64) + **out = **in + } + if in.LimitBytes != nil { + in, out := &in.LimitBytes, &out.LimitBytes + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceLogOptions. +func (in *VirtualClusterInstanceLogOptions) DeepCopy() *VirtualClusterInstanceLogOptions { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceLogOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceLogOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceSpec) DeepCopyInto(out *VirtualClusterInstanceSpec) { + *out = *in + in.VirtualClusterInstanceSpec.DeepCopyInto(&out.VirtualClusterInstanceSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceSpec. +func (in *VirtualClusterInstanceSpec) DeepCopy() *VirtualClusterInstanceSpec { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceStatus) DeepCopyInto(out *VirtualClusterInstanceStatus) { + *out = *in + in.VirtualClusterInstanceStatus.DeepCopyInto(&out.VirtualClusterInstanceStatus) + if in.SleepModeConfig != nil { + in, out := &in.SleepModeConfig, &out.SleepModeConfig + *out = new(clusterv1.SleepModeConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceStatus. +func (in *VirtualClusterInstanceStatus) DeepCopy() *VirtualClusterInstanceStatus { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceWorkloadKubeConfig) DeepCopyInto(out *VirtualClusterInstanceWorkloadKubeConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceWorkloadKubeConfig. +func (in *VirtualClusterInstanceWorkloadKubeConfig) DeepCopy() *VirtualClusterInstanceWorkloadKubeConfig { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceWorkloadKubeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceWorkloadKubeConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceWorkloadKubeConfigList) DeepCopyInto(out *VirtualClusterInstanceWorkloadKubeConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterInstanceWorkloadKubeConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceWorkloadKubeConfigList. +func (in *VirtualClusterInstanceWorkloadKubeConfigList) DeepCopy() *VirtualClusterInstanceWorkloadKubeConfigList { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceWorkloadKubeConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceWorkloadKubeConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplate) DeepCopyInto(out *VirtualClusterTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplate. +func (in *VirtualClusterTemplate) DeepCopy() *VirtualClusterTemplate { + if in == nil { + return nil + } + out := new(VirtualClusterTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateList) DeepCopyInto(out *VirtualClusterTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateList. +func (in *VirtualClusterTemplateList) DeepCopy() *VirtualClusterTemplateList { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateSpec) DeepCopyInto(out *VirtualClusterTemplateSpec) { + *out = *in + in.VirtualClusterTemplateSpec.DeepCopyInto(&out.VirtualClusterTemplateSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateSpec. +func (in *VirtualClusterTemplateSpec) DeepCopy() *VirtualClusterTemplateSpec { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateStatus) DeepCopyInto(out *VirtualClusterTemplateStatus) { + *out = *in + out.VirtualClusterTemplateStatus = in.VirtualClusterTemplateStatus + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateStatus. +func (in *VirtualClusterTemplateStatus) DeepCopy() *VirtualClusterTemplateStatus { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.defaults.go new file mode 100644 index 000000000..3b62dcb25 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/v1/zz_generated.defaults.go @@ -0,0 +1,296 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&Kiosk{}, func(obj interface{}) { SetObjectDefaults_Kiosk(obj.(*Kiosk)) }) + scheme.AddTypeDefaultingFunc(&KioskList{}, func(obj interface{}) { SetObjectDefaults_KioskList(obj.(*KioskList)) }) + scheme.AddTypeDefaultingFunc(&ProjectClusters{}, func(obj interface{}) { SetObjectDefaults_ProjectClusters(obj.(*ProjectClusters)) }) + scheme.AddTypeDefaultingFunc(&ProjectClustersList{}, func(obj interface{}) { SetObjectDefaults_ProjectClustersList(obj.(*ProjectClustersList)) }) + scheme.AddTypeDefaultingFunc(&Runner{}, func(obj interface{}) { SetObjectDefaults_Runner(obj.(*Runner)) }) + scheme.AddTypeDefaultingFunc(&RunnerList{}, func(obj interface{}) { SetObjectDefaults_RunnerList(obj.(*RunnerList)) }) + return nil +} + +func SetObjectDefaults_Kiosk(in *Kiosk) { + if in.Spec.VirtualCluster.Status.SyncerPod != nil { + for i := range in.Spec.VirtualCluster.Status.SyncerPod.Spec.InitContainers { + a := &in.Spec.VirtualCluster.Status.SyncerPod.Spec.InitContainers[i] + for j := range a.Ports { + b := &a.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.LivenessProbe != nil { + if a.LivenessProbe.ProbeHandler.GRPC != nil { + if a.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.ReadinessProbe != nil { + if a.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.StartupProbe != nil { + if a.StartupProbe.ProbeHandler.GRPC != nil { + if a.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for i := range in.Spec.VirtualCluster.Status.SyncerPod.Spec.Containers { + a := &in.Spec.VirtualCluster.Status.SyncerPod.Spec.Containers[i] + for j := range a.Ports { + b := &a.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.LivenessProbe != nil { + if a.LivenessProbe.ProbeHandler.GRPC != nil { + if a.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.ReadinessProbe != nil { + if a.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.StartupProbe != nil { + if a.StartupProbe.ProbeHandler.GRPC != nil { + if a.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for i := range in.Spec.VirtualCluster.Status.SyncerPod.Spec.EphemeralContainers { + a := &in.Spec.VirtualCluster.Status.SyncerPod.Spec.EphemeralContainers[i] + for j := range a.EphemeralContainerCommon.Ports { + b := &a.EphemeralContainerCommon.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.EphemeralContainerCommon.LivenessProbe != nil { + if a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.EphemeralContainerCommon.ReadinessProbe != nil { + if a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.EphemeralContainerCommon.StartupProbe != nil { + if a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + } + if in.Spec.VirtualCluster.Status.ClusterPod != nil { + for i := range in.Spec.VirtualCluster.Status.ClusterPod.Spec.InitContainers { + a := &in.Spec.VirtualCluster.Status.ClusterPod.Spec.InitContainers[i] + for j := range a.Ports { + b := &a.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.LivenessProbe != nil { + if a.LivenessProbe.ProbeHandler.GRPC != nil { + if a.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.ReadinessProbe != nil { + if a.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.StartupProbe != nil { + if a.StartupProbe.ProbeHandler.GRPC != nil { + if a.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for i := range in.Spec.VirtualCluster.Status.ClusterPod.Spec.Containers { + a := &in.Spec.VirtualCluster.Status.ClusterPod.Spec.Containers[i] + for j := range a.Ports { + b := &a.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.LivenessProbe != nil { + if a.LivenessProbe.ProbeHandler.GRPC != nil { + if a.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.ReadinessProbe != nil { + if a.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.StartupProbe != nil { + if a.StartupProbe.ProbeHandler.GRPC != nil { + if a.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for i := range in.Spec.VirtualCluster.Status.ClusterPod.Spec.EphemeralContainers { + a := &in.Spec.VirtualCluster.Status.ClusterPod.Spec.EphemeralContainers[i] + for j := range a.EphemeralContainerCommon.Ports { + b := &a.EphemeralContainerCommon.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.EphemeralContainerCommon.LivenessProbe != nil { + if a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.EphemeralContainerCommon.ReadinessProbe != nil { + if a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.EphemeralContainerCommon.StartupProbe != nil { + if a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC != nil { + if a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + } +} + +func SetObjectDefaults_KioskList(in *KioskList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Kiosk(a) + } +} + +func SetObjectDefaults_ProjectClusters(in *ProjectClusters) { + for i := range in.Runners { + a := &in.Runners[i] + SetObjectDefaults_Runner(a) + } +} + +func SetObjectDefaults_ProjectClustersList(in *ProjectClustersList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ProjectClusters(a) + } +} + +func SetObjectDefaults_Runner(in *Runner) { + if in.Spec.RunnerSpec.ClusterRef != nil { + if in.Spec.RunnerSpec.ClusterRef.PodTemplate != nil { + for i := range in.Spec.RunnerSpec.ClusterRef.PodTemplate.Spec.InitContainers { + a := &in.Spec.RunnerSpec.ClusterRef.PodTemplate.Spec.InitContainers[i] + for j := range a.Ports { + b := &a.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.LivenessProbe != nil { + if a.LivenessProbe.ProbeHandler.GRPC != nil { + if a.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.ReadinessProbe != nil { + if a.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.StartupProbe != nil { + if a.StartupProbe.ProbeHandler.GRPC != nil { + if a.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + } + } +} + +func SetObjectDefaults_RunnerList(in *RunnerList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Runner(a) + } +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/zz_generated.api.register.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/zz_generated.api.register.go new file mode 100644 index 000000000..726f946a2 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/zz_generated.api.register.go @@ -0,0 +1,7278 @@ +// Code generated by generator. DO NOT EDIT. + +package management + +import ( + "context" + "fmt" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + auditv1 "github.com/loft-sh/api/v3/pkg/apis/audit/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + uiv1 "github.com/loft-sh/api/v3/pkg/apis/ui/v1" + "github.com/loft-sh/api/v3/pkg/managerfactory" + "github.com/loft-sh/apiserver/pkg/builders" + pkgserver "github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server" + policyv1beta1 "github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1" + authorizationv1 "k8s.io/api/authorization/v1" + rbacv1 "k8s.io/api/rbac/v1" + "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/registry/rest" +) + +type NewRESTFunc func(factory managerfactory.SharedManagerFactory) rest.Storage + +var ( + ManagementAgentAuditEventStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalAgentAuditEvent, + func() runtime.Object { return &AgentAuditEvent{} }, // Register versioned resource + func() runtime.Object { return &AgentAuditEventList{} }, // Register versioned resource list + NewAgentAuditEventsREST, + ) + NewAgentAuditEventsREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewAgentAuditEventsRESTFunc(Factory) + } + NewAgentAuditEventsRESTFunc NewRESTFunc + ManagementAnnouncementStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalAnnouncement, + func() runtime.Object { return &Announcement{} }, // Register versioned resource + func() runtime.Object { return &AnnouncementList{} }, // Register versioned resource list + NewAnnouncementREST, + ) + NewAnnouncementREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewAnnouncementRESTFunc(Factory) + } + NewAnnouncementRESTFunc NewRESTFunc + ManagementAppStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalApp, + func() runtime.Object { return &App{} }, // Register versioned resource + func() runtime.Object { return &AppList{} }, // Register versioned resource list + NewAppREST, + ) + NewAppREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewAppRESTFunc(Factory) + } + NewAppRESTFunc NewRESTFunc + ManagementClusterStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalCluster, + func() runtime.Object { return &Cluster{} }, // Register versioned resource + func() runtime.Object { return &ClusterList{} }, // Register versioned resource list + NewClusterREST, + ) + NewClusterREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterRESTFunc(Factory) + } + NewClusterRESTFunc NewRESTFunc + ManagementClusterAccessStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalClusterAccess, + func() runtime.Object { return &ClusterAccess{} }, // Register versioned resource + func() runtime.Object { return &ClusterAccessList{} }, // Register versioned resource list + NewClusterAccessREST, + ) + NewClusterAccessREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterAccessRESTFunc(Factory) + } + NewClusterAccessRESTFunc NewRESTFunc + ManagementClusterConnectStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalClusterConnect, + func() runtime.Object { return &ClusterConnect{} }, // Register versioned resource + func() runtime.Object { return &ClusterConnectList{} }, // Register versioned resource list + NewClusterConnectREST, + ) + NewClusterConnectREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterConnectRESTFunc(Factory) + } + NewClusterConnectRESTFunc NewRESTFunc + ManagementClusterRoleTemplateStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalClusterRoleTemplate, + func() runtime.Object { return &ClusterRoleTemplate{} }, // Register versioned resource + func() runtime.Object { return &ClusterRoleTemplateList{} }, // Register versioned resource list + NewClusterRoleTemplateREST, + ) + NewClusterRoleTemplateREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterRoleTemplateRESTFunc(Factory) + } + NewClusterRoleTemplateRESTFunc NewRESTFunc + ManagementConfigStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalConfig, + func() runtime.Object { return &Config{} }, // Register versioned resource + func() runtime.Object { return &ConfigList{} }, // Register versioned resource list + NewConfigREST, + ) + NewConfigREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewConfigRESTFunc(Factory) + } + NewConfigRESTFunc NewRESTFunc + ManagementDevPodWorkspaceInstanceStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalDevPodWorkspaceInstance, + func() runtime.Object { return &DevPodWorkspaceInstance{} }, // Register versioned resource + func() runtime.Object { return &DevPodWorkspaceInstanceList{} }, // Register versioned resource list + NewDevPodWorkspaceInstanceREST, + ) + NewDevPodWorkspaceInstanceREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDevPodWorkspaceInstanceRESTFunc(Factory) + } + NewDevPodWorkspaceInstanceRESTFunc NewRESTFunc + ManagementDevPodWorkspaceTemplateStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalDevPodWorkspaceTemplate, + func() runtime.Object { return &DevPodWorkspaceTemplate{} }, // Register versioned resource + func() runtime.Object { return &DevPodWorkspaceTemplateList{} }, // Register versioned resource list + NewDevPodWorkspaceTemplateREST, + ) + NewDevPodWorkspaceTemplateREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDevPodWorkspaceTemplateRESTFunc(Factory) + } + NewDevPodWorkspaceTemplateRESTFunc NewRESTFunc + ManagementDirectClusterEndpointTokenStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalDirectClusterEndpointToken, + func() runtime.Object { return &DirectClusterEndpointToken{} }, // Register versioned resource + func() runtime.Object { return &DirectClusterEndpointTokenList{} }, // Register versioned resource list + NewDirectClusterEndpointTokenREST, + ) + NewDirectClusterEndpointTokenREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDirectClusterEndpointTokenRESTFunc(Factory) + } + NewDirectClusterEndpointTokenRESTFunc NewRESTFunc + ManagementEventStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalEvent, + func() runtime.Object { return &Event{} }, // Register versioned resource + func() runtime.Object { return &EventList{} }, // Register versioned resource list + NewEventREST, + ) + NewEventREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewEventRESTFunc(Factory) + } + NewEventRESTFunc NewRESTFunc + ManagementFeatureStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalFeature, + func() runtime.Object { return &Feature{} }, // Register versioned resource + func() runtime.Object { return &FeatureList{} }, // Register versioned resource list + NewFeatureREST, + ) + NewFeatureREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewFeatureRESTFunc(Factory) + } + NewFeatureRESTFunc NewRESTFunc + ManagementIngressAuthTokenStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalIngressAuthToken, + func() runtime.Object { return &IngressAuthToken{} }, // Register versioned resource + func() runtime.Object { return &IngressAuthTokenList{} }, // Register versioned resource list + NewIngressAuthTokenREST, + ) + NewIngressAuthTokenREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewIngressAuthTokenRESTFunc(Factory) + } + NewIngressAuthTokenRESTFunc NewRESTFunc + ManagementKioskStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalKiosk, + func() runtime.Object { return &Kiosk{} }, // Register versioned resource + func() runtime.Object { return &KioskList{} }, // Register versioned resource list + NewKioskREST, + ) + NewKioskREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewKioskRESTFunc(Factory) + } + NewKioskRESTFunc NewRESTFunc + ManagementLicenseStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalLicense, + func() runtime.Object { return &License{} }, // Register versioned resource + func() runtime.Object { return &LicenseList{} }, // Register versioned resource list + NewLicenseREST, + ) + NewLicenseREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewLicenseRESTFunc(Factory) + } + NewLicenseRESTFunc NewRESTFunc + ManagementLicenseTokenStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalLicenseToken, + func() runtime.Object { return &LicenseToken{} }, // Register versioned resource + func() runtime.Object { return &LicenseTokenList{} }, // Register versioned resource list + NewLicenseTokenREST, + ) + NewLicenseTokenREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewLicenseTokenRESTFunc(Factory) + } + NewLicenseTokenRESTFunc NewRESTFunc + ManagementLoftUpgradeStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalLoftUpgrade, + func() runtime.Object { return &LoftUpgrade{} }, // Register versioned resource + func() runtime.Object { return &LoftUpgradeList{} }, // Register versioned resource list + NewLoftUpgradeREST, + ) + NewLoftUpgradeREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewLoftUpgradeRESTFunc(Factory) + } + NewLoftUpgradeRESTFunc NewRESTFunc + ManagementOwnedAccessKeyStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalOwnedAccessKey, + func() runtime.Object { return &OwnedAccessKey{} }, // Register versioned resource + func() runtime.Object { return &OwnedAccessKeyList{} }, // Register versioned resource list + NewOwnedAccessKeyREST, + ) + NewOwnedAccessKeyREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewOwnedAccessKeyRESTFunc(Factory) + } + NewOwnedAccessKeyRESTFunc NewRESTFunc + ManagementPolicyViolationStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalPolicyViolation, + func() runtime.Object { return &PolicyViolation{} }, // Register versioned resource + func() runtime.Object { return &PolicyViolationList{} }, // Register versioned resource list + NewPolicyViolationREST, + ) + NewPolicyViolationREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewPolicyViolationRESTFunc(Factory) + } + NewPolicyViolationRESTFunc NewRESTFunc + ManagementProjectStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalProject, + func() runtime.Object { return &Project{} }, // Register versioned resource + func() runtime.Object { return &ProjectList{} }, // Register versioned resource list + NewProjectREST, + ) + NewProjectREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectRESTFunc(Factory) + } + NewProjectRESTFunc NewRESTFunc + NewProjectStatusREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectStatusRESTFunc(Factory) + } + NewProjectStatusRESTFunc NewRESTFunc + ManagementProjectSecretStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalProjectSecret, + func() runtime.Object { return &ProjectSecret{} }, // Register versioned resource + func() runtime.Object { return &ProjectSecretList{} }, // Register versioned resource list + NewProjectSecretREST, + ) + NewProjectSecretREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectSecretRESTFunc(Factory) + } + NewProjectSecretRESTFunc NewRESTFunc + ManagementRedirectTokenStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalRedirectToken, + func() runtime.Object { return &RedirectToken{} }, // Register versioned resource + func() runtime.Object { return &RedirectTokenList{} }, // Register versioned resource list + NewRedirectTokenREST, + ) + NewRedirectTokenREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewRedirectTokenRESTFunc(Factory) + } + NewRedirectTokenRESTFunc NewRESTFunc + ManagementResetAccessKeyStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalResetAccessKey, + func() runtime.Object { return &ResetAccessKey{} }, // Register versioned resource + func() runtime.Object { return &ResetAccessKeyList{} }, // Register versioned resource list + NewResetAccessKeyREST, + ) + NewResetAccessKeyREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewResetAccessKeyRESTFunc(Factory) + } + NewResetAccessKeyRESTFunc NewRESTFunc + ManagementRunnerStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalRunner, + func() runtime.Object { return &Runner{} }, // Register versioned resource + func() runtime.Object { return &RunnerList{} }, // Register versioned resource list + NewRunnerREST, + ) + NewRunnerREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewRunnerRESTFunc(Factory) + } + NewRunnerRESTFunc NewRESTFunc + NewRunnerStatusREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewRunnerStatusRESTFunc(Factory) + } + NewRunnerStatusRESTFunc NewRESTFunc + ManagementSelfStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalSelf, + func() runtime.Object { return &Self{} }, // Register versioned resource + func() runtime.Object { return &SelfList{} }, // Register versioned resource list + NewSelfREST, + ) + NewSelfREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewSelfRESTFunc(Factory) + } + NewSelfRESTFunc NewRESTFunc + ManagementSelfSubjectAccessReviewStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalSelfSubjectAccessReview, + func() runtime.Object { return &SelfSubjectAccessReview{} }, // Register versioned resource + func() runtime.Object { return &SelfSubjectAccessReviewList{} }, // Register versioned resource list + NewSelfSubjectAccessReviewREST, + ) + NewSelfSubjectAccessReviewREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewSelfSubjectAccessReviewRESTFunc(Factory) + } + NewSelfSubjectAccessReviewRESTFunc NewRESTFunc + ManagementSharedSecretStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalSharedSecret, + func() runtime.Object { return &SharedSecret{} }, // Register versioned resource + func() runtime.Object { return &SharedSecretList{} }, // Register versioned resource list + NewSharedSecretREST, + ) + NewSharedSecretREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewSharedSecretRESTFunc(Factory) + } + NewSharedSecretRESTFunc NewRESTFunc + ManagementSpaceConstraintStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalSpaceConstraint, + func() runtime.Object { return &SpaceConstraint{} }, // Register versioned resource + func() runtime.Object { return &SpaceConstraintList{} }, // Register versioned resource list + NewSpaceConstraintREST, + ) + NewSpaceConstraintREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewSpaceConstraintRESTFunc(Factory) + } + NewSpaceConstraintRESTFunc NewRESTFunc + ManagementSpaceInstanceStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalSpaceInstance, + func() runtime.Object { return &SpaceInstance{} }, // Register versioned resource + func() runtime.Object { return &SpaceInstanceList{} }, // Register versioned resource list + NewSpaceInstanceREST, + ) + NewSpaceInstanceREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewSpaceInstanceRESTFunc(Factory) + } + NewSpaceInstanceRESTFunc NewRESTFunc + ManagementSpaceTemplateStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalSpaceTemplate, + func() runtime.Object { return &SpaceTemplate{} }, // Register versioned resource + func() runtime.Object { return &SpaceTemplateList{} }, // Register versioned resource list + NewSpaceTemplateREST, + ) + NewSpaceTemplateREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewSpaceTemplateRESTFunc(Factory) + } + NewSpaceTemplateRESTFunc NewRESTFunc + ManagementSubjectAccessReviewStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalSubjectAccessReview, + func() runtime.Object { return &SubjectAccessReview{} }, // Register versioned resource + func() runtime.Object { return &SubjectAccessReviewList{} }, // Register versioned resource list + NewSubjectAccessReviewREST, + ) + NewSubjectAccessReviewREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewSubjectAccessReviewRESTFunc(Factory) + } + NewSubjectAccessReviewRESTFunc NewRESTFunc + ManagementTaskStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalTask, + func() runtime.Object { return &Task{} }, // Register versioned resource + func() runtime.Object { return &TaskList{} }, // Register versioned resource list + NewTaskREST, + ) + NewTaskREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewTaskRESTFunc(Factory) + } + NewTaskRESTFunc NewRESTFunc + ManagementTeamStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalTeam, + func() runtime.Object { return &Team{} }, // Register versioned resource + func() runtime.Object { return &TeamList{} }, // Register versioned resource list + NewTeamREST, + ) + NewTeamREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewTeamRESTFunc(Factory) + } + NewTeamRESTFunc NewRESTFunc + ManagementUserStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalUser, + func() runtime.Object { return &User{} }, // Register versioned resource + func() runtime.Object { return &UserList{} }, // Register versioned resource list + NewUserREST, + ) + NewUserREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewUserRESTFunc(Factory) + } + NewUserRESTFunc NewRESTFunc + ManagementVirtualClusterInstanceStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalVirtualClusterInstance, + func() runtime.Object { return &VirtualClusterInstance{} }, // Register versioned resource + func() runtime.Object { return &VirtualClusterInstanceList{} }, // Register versioned resource list + NewVirtualClusterInstanceREST, + ) + NewVirtualClusterInstanceREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewVirtualClusterInstanceRESTFunc(Factory) + } + NewVirtualClusterInstanceRESTFunc NewRESTFunc + ManagementVirtualClusterTemplateStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalVirtualClusterTemplate, + func() runtime.Object { return &VirtualClusterTemplate{} }, // Register versioned resource + func() runtime.Object { return &VirtualClusterTemplateList{} }, // Register versioned resource list + NewVirtualClusterTemplateREST, + ) + NewVirtualClusterTemplateREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewVirtualClusterTemplateRESTFunc(Factory) + } + NewVirtualClusterTemplateRESTFunc NewRESTFunc + InternalAgentAuditEvent = builders.NewInternalResource( + "agentauditevents", + "AgentAuditEvent", + func() runtime.Object { return &AgentAuditEvent{} }, + func() runtime.Object { return &AgentAuditEventList{} }, + ) + InternalAgentAuditEventStatus = builders.NewInternalResourceStatus( + "agentauditevents", + "AgentAuditEventStatus", + func() runtime.Object { return &AgentAuditEvent{} }, + func() runtime.Object { return &AgentAuditEventList{} }, + ) + InternalAnnouncement = builders.NewInternalResource( + "announcements", + "Announcement", + func() runtime.Object { return &Announcement{} }, + func() runtime.Object { return &AnnouncementList{} }, + ) + InternalAnnouncementStatus = builders.NewInternalResourceStatus( + "announcements", + "AnnouncementStatus", + func() runtime.Object { return &Announcement{} }, + func() runtime.Object { return &AnnouncementList{} }, + ) + InternalApp = builders.NewInternalResource( + "apps", + "App", + func() runtime.Object { return &App{} }, + func() runtime.Object { return &AppList{} }, + ) + InternalAppStatus = builders.NewInternalResourceStatus( + "apps", + "AppStatus", + func() runtime.Object { return &App{} }, + func() runtime.Object { return &AppList{} }, + ) + InternalCluster = builders.NewInternalResource( + "clusters", + "Cluster", + func() runtime.Object { return &Cluster{} }, + func() runtime.Object { return &ClusterList{} }, + ) + InternalClusterStatus = builders.NewInternalResourceStatus( + "clusters", + "ClusterStatus", + func() runtime.Object { return &Cluster{} }, + func() runtime.Object { return &ClusterList{} }, + ) + InternalClusterAgentConfigREST = builders.NewInternalSubresource( + "clusters", "ClusterAgentConfig", "agentconfig", + func() runtime.Object { return &ClusterAgentConfig{} }, + ) + NewClusterAgentConfigREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterAgentConfigRESTFunc(Factory) + } + NewClusterAgentConfigRESTFunc NewRESTFunc + InternalClusterChartsREST = builders.NewInternalSubresource( + "clusters", "ClusterCharts", "charts", + func() runtime.Object { return &ClusterCharts{} }, + ) + NewClusterChartsREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterChartsRESTFunc(Factory) + } + NewClusterChartsRESTFunc NewRESTFunc + InternalClusterDomainREST = builders.NewInternalSubresource( + "clusters", "ClusterDomain", "domain", + func() runtime.Object { return &ClusterDomain{} }, + ) + NewClusterDomainREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterDomainRESTFunc(Factory) + } + NewClusterDomainRESTFunc NewRESTFunc + InternalClusterMemberAccessREST = builders.NewInternalSubresource( + "clusters", "ClusterMemberAccess", "memberaccess", + func() runtime.Object { return &ClusterMemberAccess{} }, + ) + NewClusterMemberAccessREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterMemberAccessRESTFunc(Factory) + } + NewClusterMemberAccessRESTFunc NewRESTFunc + InternalClusterMembersREST = builders.NewInternalSubresource( + "clusters", "ClusterMembers", "members", + func() runtime.Object { return &ClusterMembers{} }, + ) + NewClusterMembersREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterMembersRESTFunc(Factory) + } + NewClusterMembersRESTFunc NewRESTFunc + InternalClusterResetREST = builders.NewInternalSubresource( + "clusters", "ClusterReset", "reset", + func() runtime.Object { return &ClusterReset{} }, + ) + NewClusterResetREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterResetRESTFunc(Factory) + } + NewClusterResetRESTFunc NewRESTFunc + InternalClusterVirtualClusterDefaultsREST = builders.NewInternalSubresource( + "clusters", "ClusterVirtualClusterDefaults", "virtualclusterdefaults", + func() runtime.Object { return &ClusterVirtualClusterDefaults{} }, + ) + NewClusterVirtualClusterDefaultsREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterVirtualClusterDefaultsRESTFunc(Factory) + } + NewClusterVirtualClusterDefaultsRESTFunc NewRESTFunc + InternalClusterAccess = builders.NewInternalResource( + "clusteraccesses", + "ClusterAccess", + func() runtime.Object { return &ClusterAccess{} }, + func() runtime.Object { return &ClusterAccessList{} }, + ) + InternalClusterAccessStatus = builders.NewInternalResourceStatus( + "clusteraccesses", + "ClusterAccessStatus", + func() runtime.Object { return &ClusterAccess{} }, + func() runtime.Object { return &ClusterAccessList{} }, + ) + InternalClusterConnect = builders.NewInternalResource( + "clusterconnect", + "ClusterConnect", + func() runtime.Object { return &ClusterConnect{} }, + func() runtime.Object { return &ClusterConnectList{} }, + ) + InternalClusterConnectStatus = builders.NewInternalResourceStatus( + "clusterconnect", + "ClusterConnectStatus", + func() runtime.Object { return &ClusterConnect{} }, + func() runtime.Object { return &ClusterConnectList{} }, + ) + InternalClusterRoleTemplate = builders.NewInternalResource( + "clusterroletemplates", + "ClusterRoleTemplate", + func() runtime.Object { return &ClusterRoleTemplate{} }, + func() runtime.Object { return &ClusterRoleTemplateList{} }, + ) + InternalClusterRoleTemplateStatus = builders.NewInternalResourceStatus( + "clusterroletemplates", + "ClusterRoleTemplateStatus", + func() runtime.Object { return &ClusterRoleTemplate{} }, + func() runtime.Object { return &ClusterRoleTemplateList{} }, + ) + InternalConfig = builders.NewInternalResource( + "configs", + "Config", + func() runtime.Object { return &Config{} }, + func() runtime.Object { return &ConfigList{} }, + ) + InternalConfigStatus = builders.NewInternalResourceStatus( + "configs", + "ConfigStatus", + func() runtime.Object { return &Config{} }, + func() runtime.Object { return &ConfigList{} }, + ) + InternalDevPodWorkspaceInstance = builders.NewInternalResource( + "devpodworkspaceinstances", + "DevPodWorkspaceInstance", + func() runtime.Object { return &DevPodWorkspaceInstance{} }, + func() runtime.Object { return &DevPodWorkspaceInstanceList{} }, + ) + InternalDevPodWorkspaceInstanceStatus = builders.NewInternalResourceStatus( + "devpodworkspaceinstances", + "DevPodWorkspaceInstanceStatus", + func() runtime.Object { return &DevPodWorkspaceInstance{} }, + func() runtime.Object { return &DevPodWorkspaceInstanceList{} }, + ) + InternalDevPodWorkspaceInstanceDeleteREST = builders.NewInternalSubresource( + "devpodworkspaceinstances", "DevPodWorkspaceInstanceDelete", "delete", + func() runtime.Object { return &DevPodWorkspaceInstanceDelete{} }, + ) + NewDevPodWorkspaceInstanceDeleteREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDevPodWorkspaceInstanceDeleteRESTFunc(Factory) + } + NewDevPodWorkspaceInstanceDeleteRESTFunc NewRESTFunc + InternalDevPodWorkspaceInstanceGetStatusREST = builders.NewInternalSubresource( + "devpodworkspaceinstances", "DevPodWorkspaceInstanceGetStatus", "getstatus", + func() runtime.Object { return &DevPodWorkspaceInstanceGetStatus{} }, + ) + NewDevPodWorkspaceInstanceGetStatusREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDevPodWorkspaceInstanceGetStatusRESTFunc(Factory) + } + NewDevPodWorkspaceInstanceGetStatusRESTFunc NewRESTFunc + InternalDevPodWorkspaceInstanceSshREST = builders.NewInternalSubresource( + "devpodworkspaceinstances", "DevPodWorkspaceInstanceSsh", "ssh", + func() runtime.Object { return &DevPodWorkspaceInstanceSsh{} }, + ) + NewDevPodWorkspaceInstanceSshREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDevPodWorkspaceInstanceSshRESTFunc(Factory) + } + NewDevPodWorkspaceInstanceSshRESTFunc NewRESTFunc + InternalDevPodWorkspaceInstanceStopREST = builders.NewInternalSubresource( + "devpodworkspaceinstances", "DevPodWorkspaceInstanceStop", "stop", + func() runtime.Object { return &DevPodWorkspaceInstanceStop{} }, + ) + NewDevPodWorkspaceInstanceStopREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDevPodWorkspaceInstanceStopRESTFunc(Factory) + } + NewDevPodWorkspaceInstanceStopRESTFunc NewRESTFunc + InternalDevPodWorkspaceInstanceUpREST = builders.NewInternalSubresource( + "devpodworkspaceinstances", "DevPodWorkspaceInstanceUp", "up", + func() runtime.Object { return &DevPodWorkspaceInstanceUp{} }, + ) + NewDevPodWorkspaceInstanceUpREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDevPodWorkspaceInstanceUpRESTFunc(Factory) + } + NewDevPodWorkspaceInstanceUpRESTFunc NewRESTFunc + InternalDevPodWorkspaceTemplate = builders.NewInternalResource( + "devpodworkspacetemplates", + "DevPodWorkspaceTemplate", + func() runtime.Object { return &DevPodWorkspaceTemplate{} }, + func() runtime.Object { return &DevPodWorkspaceTemplateList{} }, + ) + InternalDevPodWorkspaceTemplateStatus = builders.NewInternalResourceStatus( + "devpodworkspacetemplates", + "DevPodWorkspaceTemplateStatus", + func() runtime.Object { return &DevPodWorkspaceTemplate{} }, + func() runtime.Object { return &DevPodWorkspaceTemplateList{} }, + ) + InternalDirectClusterEndpointToken = builders.NewInternalResource( + "directclusterendpointtokens", + "DirectClusterEndpointToken", + func() runtime.Object { return &DirectClusterEndpointToken{} }, + func() runtime.Object { return &DirectClusterEndpointTokenList{} }, + ) + InternalDirectClusterEndpointTokenStatus = builders.NewInternalResourceStatus( + "directclusterendpointtokens", + "DirectClusterEndpointTokenStatus", + func() runtime.Object { return &DirectClusterEndpointToken{} }, + func() runtime.Object { return &DirectClusterEndpointTokenList{} }, + ) + InternalEvent = builders.NewInternalResource( + "events", + "Event", + func() runtime.Object { return &Event{} }, + func() runtime.Object { return &EventList{} }, + ) + InternalEventStatus = builders.NewInternalResourceStatus( + "events", + "EventStatus", + func() runtime.Object { return &Event{} }, + func() runtime.Object { return &EventList{} }, + ) + InternalFeature = builders.NewInternalResource( + "features", + "Feature", + func() runtime.Object { return &Feature{} }, + func() runtime.Object { return &FeatureList{} }, + ) + InternalFeatureStatus = builders.NewInternalResourceStatus( + "features", + "FeatureStatus", + func() runtime.Object { return &Feature{} }, + func() runtime.Object { return &FeatureList{} }, + ) + InternalIngressAuthToken = builders.NewInternalResource( + "ingressauthtokens", + "IngressAuthToken", + func() runtime.Object { return &IngressAuthToken{} }, + func() runtime.Object { return &IngressAuthTokenList{} }, + ) + InternalIngressAuthTokenStatus = builders.NewInternalResourceStatus( + "ingressauthtokens", + "IngressAuthTokenStatus", + func() runtime.Object { return &IngressAuthToken{} }, + func() runtime.Object { return &IngressAuthTokenList{} }, + ) + InternalKiosk = builders.NewInternalResource( + "kiosk", + "Kiosk", + func() runtime.Object { return &Kiosk{} }, + func() runtime.Object { return &KioskList{} }, + ) + InternalKioskStatus = builders.NewInternalResourceStatus( + "kiosk", + "KioskStatus", + func() runtime.Object { return &Kiosk{} }, + func() runtime.Object { return &KioskList{} }, + ) + InternalLicense = builders.NewInternalResource( + "licenses", + "License", + func() runtime.Object { return &License{} }, + func() runtime.Object { return &LicenseList{} }, + ) + InternalLicenseStatus = builders.NewInternalResourceStatus( + "licenses", + "LicenseStatus", + func() runtime.Object { return &License{} }, + func() runtime.Object { return &LicenseList{} }, + ) + InternalLicenseRequestREST = builders.NewInternalSubresource( + "licenses", "LicenseRequest", "request", + func() runtime.Object { return &LicenseRequest{} }, + ) + NewLicenseRequestREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewLicenseRequestRESTFunc(Factory) + } + NewLicenseRequestRESTFunc NewRESTFunc + InternalLicenseToken = builders.NewInternalResource( + "licensetokens", + "LicenseToken", + func() runtime.Object { return &LicenseToken{} }, + func() runtime.Object { return &LicenseTokenList{} }, + ) + InternalLicenseTokenStatus = builders.NewInternalResourceStatus( + "licensetokens", + "LicenseTokenStatus", + func() runtime.Object { return &LicenseToken{} }, + func() runtime.Object { return &LicenseTokenList{} }, + ) + InternalLoftUpgrade = builders.NewInternalResource( + "loftupgrades", + "LoftUpgrade", + func() runtime.Object { return &LoftUpgrade{} }, + func() runtime.Object { return &LoftUpgradeList{} }, + ) + InternalLoftUpgradeStatus = builders.NewInternalResourceStatus( + "loftupgrades", + "LoftUpgradeStatus", + func() runtime.Object { return &LoftUpgrade{} }, + func() runtime.Object { return &LoftUpgradeList{} }, + ) + InternalOwnedAccessKey = builders.NewInternalResource( + "ownedaccesskeys", + "OwnedAccessKey", + func() runtime.Object { return &OwnedAccessKey{} }, + func() runtime.Object { return &OwnedAccessKeyList{} }, + ) + InternalOwnedAccessKeyStatus = builders.NewInternalResourceStatus( + "ownedaccesskeys", + "OwnedAccessKeyStatus", + func() runtime.Object { return &OwnedAccessKey{} }, + func() runtime.Object { return &OwnedAccessKeyList{} }, + ) + InternalPolicyViolation = builders.NewInternalResource( + "policyviolations", + "PolicyViolation", + func() runtime.Object { return &PolicyViolation{} }, + func() runtime.Object { return &PolicyViolationList{} }, + ) + InternalPolicyViolationStatus = builders.NewInternalResourceStatus( + "policyviolations", + "PolicyViolationStatus", + func() runtime.Object { return &PolicyViolation{} }, + func() runtime.Object { return &PolicyViolationList{} }, + ) + InternalProject = builders.NewInternalResource( + "projects", + "Project", + func() runtime.Object { return &Project{} }, + func() runtime.Object { return &ProjectList{} }, + ) + InternalProjectStatus = builders.NewInternalResourceStatus( + "projects", + "ProjectStatus", + func() runtime.Object { return &Project{} }, + func() runtime.Object { return &ProjectList{} }, + ) + InternalProjectChartInfoREST = builders.NewInternalSubresource( + "projects", "ProjectChartInfo", "chartinfo", + func() runtime.Object { return &ProjectChartInfo{} }, + ) + NewProjectChartInfoREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectChartInfoRESTFunc(Factory) + } + NewProjectChartInfoRESTFunc NewRESTFunc + InternalProjectChartsREST = builders.NewInternalSubresource( + "projects", "ProjectCharts", "charts", + func() runtime.Object { return &ProjectCharts{} }, + ) + NewProjectChartsREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectChartsRESTFunc(Factory) + } + NewProjectChartsRESTFunc NewRESTFunc + InternalProjectClustersREST = builders.NewInternalSubresource( + "projects", "ProjectClusters", "clusters", + func() runtime.Object { return &ProjectClusters{} }, + ) + NewProjectClustersREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectClustersRESTFunc(Factory) + } + NewProjectClustersRESTFunc NewRESTFunc + InternalProjectImportSpaceREST = builders.NewInternalSubresource( + "projects", "ProjectImportSpace", "importspace", + func() runtime.Object { return &ProjectImportSpace{} }, + ) + NewProjectImportSpaceREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectImportSpaceRESTFunc(Factory) + } + NewProjectImportSpaceRESTFunc NewRESTFunc + InternalProjectImportVirtualClusterREST = builders.NewInternalSubresource( + "projects", "ProjectImportVirtualCluster", "importvirtualcluster", + func() runtime.Object { return &ProjectImportVirtualCluster{} }, + ) + NewProjectImportVirtualClusterREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectImportVirtualClusterRESTFunc(Factory) + } + NewProjectImportVirtualClusterRESTFunc NewRESTFunc + InternalProjectMembersREST = builders.NewInternalSubresource( + "projects", "ProjectMembers", "members", + func() runtime.Object { return &ProjectMembers{} }, + ) + NewProjectMembersREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectMembersRESTFunc(Factory) + } + NewProjectMembersRESTFunc NewRESTFunc + InternalProjectMigrateSpaceInstanceREST = builders.NewInternalSubresource( + "projects", "ProjectMigrateSpaceInstance", "migratespaceinstance", + func() runtime.Object { return &ProjectMigrateSpaceInstance{} }, + ) + NewProjectMigrateSpaceInstanceREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectMigrateSpaceInstanceRESTFunc(Factory) + } + NewProjectMigrateSpaceInstanceRESTFunc NewRESTFunc + InternalProjectMigrateVirtualClusterInstanceREST = builders.NewInternalSubresource( + "projects", "ProjectMigrateVirtualClusterInstance", "migratevirtualclusterinstance", + func() runtime.Object { return &ProjectMigrateVirtualClusterInstance{} }, + ) + NewProjectMigrateVirtualClusterInstanceREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectMigrateVirtualClusterInstanceRESTFunc(Factory) + } + NewProjectMigrateVirtualClusterInstanceRESTFunc NewRESTFunc + InternalProjectTemplatesREST = builders.NewInternalSubresource( + "projects", "ProjectTemplates", "templates", + func() runtime.Object { return &ProjectTemplates{} }, + ) + NewProjectTemplatesREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectTemplatesRESTFunc(Factory) + } + NewProjectTemplatesRESTFunc NewRESTFunc + InternalProjectSecret = builders.NewInternalResource( + "projectsecrets", + "ProjectSecret", + func() runtime.Object { return &ProjectSecret{} }, + func() runtime.Object { return &ProjectSecretList{} }, + ) + InternalProjectSecretStatus = builders.NewInternalResourceStatus( + "projectsecrets", + "ProjectSecretStatus", + func() runtime.Object { return &ProjectSecret{} }, + func() runtime.Object { return &ProjectSecretList{} }, + ) + InternalRedirectToken = builders.NewInternalResource( + "redirecttokens", + "RedirectToken", + func() runtime.Object { return &RedirectToken{} }, + func() runtime.Object { return &RedirectTokenList{} }, + ) + InternalRedirectTokenStatus = builders.NewInternalResourceStatus( + "redirecttokens", + "RedirectTokenStatus", + func() runtime.Object { return &RedirectToken{} }, + func() runtime.Object { return &RedirectTokenList{} }, + ) + InternalResetAccessKey = builders.NewInternalResource( + "resetaccesskeys", + "ResetAccessKey", + func() runtime.Object { return &ResetAccessKey{} }, + func() runtime.Object { return &ResetAccessKeyList{} }, + ) + InternalResetAccessKeyStatus = builders.NewInternalResourceStatus( + "resetaccesskeys", + "ResetAccessKeyStatus", + func() runtime.Object { return &ResetAccessKey{} }, + func() runtime.Object { return &ResetAccessKeyList{} }, + ) + InternalRunner = builders.NewInternalResource( + "runners", + "Runner", + func() runtime.Object { return &Runner{} }, + func() runtime.Object { return &RunnerList{} }, + ) + InternalRunnerStatus = builders.NewInternalResourceStatus( + "runners", + "RunnerStatus", + func() runtime.Object { return &Runner{} }, + func() runtime.Object { return &RunnerList{} }, + ) + InternalRunnerAccessKeyREST = builders.NewInternalSubresource( + "runners", "RunnerAccessKey", "accesskey", + func() runtime.Object { return &RunnerAccessKey{} }, + ) + NewRunnerAccessKeyREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewRunnerAccessKeyRESTFunc(Factory) + } + NewRunnerAccessKeyRESTFunc NewRESTFunc + InternalRunnerConfigREST = builders.NewInternalSubresource( + "runners", "RunnerConfig", "config", + func() runtime.Object { return &RunnerConfig{} }, + ) + NewRunnerConfigREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewRunnerConfigRESTFunc(Factory) + } + NewRunnerConfigRESTFunc NewRESTFunc + InternalSelf = builders.NewInternalResource( + "selves", + "Self", + func() runtime.Object { return &Self{} }, + func() runtime.Object { return &SelfList{} }, + ) + InternalSelfStatus = builders.NewInternalResourceStatus( + "selves", + "SelfStatus", + func() runtime.Object { return &Self{} }, + func() runtime.Object { return &SelfList{} }, + ) + InternalSelfSubjectAccessReview = builders.NewInternalResource( + "selfsubjectaccessreviews", + "SelfSubjectAccessReview", + func() runtime.Object { return &SelfSubjectAccessReview{} }, + func() runtime.Object { return &SelfSubjectAccessReviewList{} }, + ) + InternalSelfSubjectAccessReviewStatus = builders.NewInternalResourceStatus( + "selfsubjectaccessreviews", + "SelfSubjectAccessReviewStatus", + func() runtime.Object { return &SelfSubjectAccessReview{} }, + func() runtime.Object { return &SelfSubjectAccessReviewList{} }, + ) + InternalSharedSecret = builders.NewInternalResource( + "sharedsecrets", + "SharedSecret", + func() runtime.Object { return &SharedSecret{} }, + func() runtime.Object { return &SharedSecretList{} }, + ) + InternalSharedSecretStatus = builders.NewInternalResourceStatus( + "sharedsecrets", + "SharedSecretStatus", + func() runtime.Object { return &SharedSecret{} }, + func() runtime.Object { return &SharedSecretList{} }, + ) + InternalSpaceConstraint = builders.NewInternalResource( + "spaceconstraints", + "SpaceConstraint", + func() runtime.Object { return &SpaceConstraint{} }, + func() runtime.Object { return &SpaceConstraintList{} }, + ) + InternalSpaceConstraintStatus = builders.NewInternalResourceStatus( + "spaceconstraints", + "SpaceConstraintStatus", + func() runtime.Object { return &SpaceConstraint{} }, + func() runtime.Object { return &SpaceConstraintList{} }, + ) + InternalSpaceInstance = builders.NewInternalResource( + "spaceinstances", + "SpaceInstance", + func() runtime.Object { return &SpaceInstance{} }, + func() runtime.Object { return &SpaceInstanceList{} }, + ) + InternalSpaceInstanceStatus = builders.NewInternalResourceStatus( + "spaceinstances", + "SpaceInstanceStatus", + func() runtime.Object { return &SpaceInstance{} }, + func() runtime.Object { return &SpaceInstanceList{} }, + ) + InternalSpaceTemplate = builders.NewInternalResource( + "spacetemplates", + "SpaceTemplate", + func() runtime.Object { return &SpaceTemplate{} }, + func() runtime.Object { return &SpaceTemplateList{} }, + ) + InternalSpaceTemplateStatus = builders.NewInternalResourceStatus( + "spacetemplates", + "SpaceTemplateStatus", + func() runtime.Object { return &SpaceTemplate{} }, + func() runtime.Object { return &SpaceTemplateList{} }, + ) + InternalSubjectAccessReview = builders.NewInternalResource( + "subjectaccessreviews", + "SubjectAccessReview", + func() runtime.Object { return &SubjectAccessReview{} }, + func() runtime.Object { return &SubjectAccessReviewList{} }, + ) + InternalSubjectAccessReviewStatus = builders.NewInternalResourceStatus( + "subjectaccessreviews", + "SubjectAccessReviewStatus", + func() runtime.Object { return &SubjectAccessReview{} }, + func() runtime.Object { return &SubjectAccessReviewList{} }, + ) + InternalTask = builders.NewInternalResource( + "tasks", + "Task", + func() runtime.Object { return &Task{} }, + func() runtime.Object { return &TaskList{} }, + ) + InternalTaskStatus = builders.NewInternalResourceStatus( + "tasks", + "TaskStatus", + func() runtime.Object { return &Task{} }, + func() runtime.Object { return &TaskList{} }, + ) + InternalTaskLogREST = builders.NewInternalSubresource( + "tasks", "TaskLog", "log", + func() runtime.Object { return &TaskLog{} }, + ) + NewTaskLogREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewTaskLogRESTFunc(Factory) + } + NewTaskLogRESTFunc NewRESTFunc + InternalTeam = builders.NewInternalResource( + "teams", + "Team", + func() runtime.Object { return &Team{} }, + func() runtime.Object { return &TeamList{} }, + ) + InternalTeamStatus = builders.NewInternalResourceStatus( + "teams", + "TeamStatus", + func() runtime.Object { return &Team{} }, + func() runtime.Object { return &TeamList{} }, + ) + InternalTeamAccessKeysREST = builders.NewInternalSubresource( + "teams", "TeamAccessKeys", "accesskeys", + func() runtime.Object { return &TeamAccessKeys{} }, + ) + NewTeamAccessKeysREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewTeamAccessKeysRESTFunc(Factory) + } + NewTeamAccessKeysRESTFunc NewRESTFunc + InternalTeamClustersREST = builders.NewInternalSubresource( + "teams", "TeamClusters", "clusters", + func() runtime.Object { return &TeamClusters{} }, + ) + NewTeamClustersREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewTeamClustersRESTFunc(Factory) + } + NewTeamClustersRESTFunc NewRESTFunc + InternalUser = builders.NewInternalResource( + "users", + "User", + func() runtime.Object { return &User{} }, + func() runtime.Object { return &UserList{} }, + ) + InternalUserStatus = builders.NewInternalResourceStatus( + "users", + "UserStatus", + func() runtime.Object { return &User{} }, + func() runtime.Object { return &UserList{} }, + ) + InternalUserAccessKeysREST = builders.NewInternalSubresource( + "users", "UserAccessKeys", "accesskeys", + func() runtime.Object { return &UserAccessKeys{} }, + ) + NewUserAccessKeysREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewUserAccessKeysRESTFunc(Factory) + } + NewUserAccessKeysRESTFunc NewRESTFunc + InternalUserClustersREST = builders.NewInternalSubresource( + "users", "UserClusters", "clusters", + func() runtime.Object { return &UserClusters{} }, + ) + NewUserClustersREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewUserClustersRESTFunc(Factory) + } + NewUserClustersRESTFunc NewRESTFunc + InternalUserPermissionsREST = builders.NewInternalSubresource( + "users", "UserPermissions", "permissions", + func() runtime.Object { return &UserPermissions{} }, + ) + NewUserPermissionsREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewUserPermissionsRESTFunc(Factory) + } + NewUserPermissionsRESTFunc NewRESTFunc + InternalUserProfileREST = builders.NewInternalSubresource( + "users", "UserProfile", "profile", + func() runtime.Object { return &UserProfile{} }, + ) + NewUserProfileREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewUserProfileRESTFunc(Factory) + } + NewUserProfileRESTFunc NewRESTFunc + InternalVirtualClusterInstance = builders.NewInternalResource( + "virtualclusterinstances", + "VirtualClusterInstance", + func() runtime.Object { return &VirtualClusterInstance{} }, + func() runtime.Object { return &VirtualClusterInstanceList{} }, + ) + InternalVirtualClusterInstanceStatus = builders.NewInternalResourceStatus( + "virtualclusterinstances", + "VirtualClusterInstanceStatus", + func() runtime.Object { return &VirtualClusterInstance{} }, + func() runtime.Object { return &VirtualClusterInstanceList{} }, + ) + InternalVirtualClusterInstanceKubeConfigREST = builders.NewInternalSubresource( + "virtualclusterinstances", "VirtualClusterInstanceKubeConfig", "kubeconfig", + func() runtime.Object { return &VirtualClusterInstanceKubeConfig{} }, + ) + NewVirtualClusterInstanceKubeConfigREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewVirtualClusterInstanceKubeConfigRESTFunc(Factory) + } + NewVirtualClusterInstanceKubeConfigRESTFunc NewRESTFunc + InternalVirtualClusterInstanceLogREST = builders.NewInternalSubresource( + "virtualclusterinstances", "VirtualClusterInstanceLog", "log", + func() runtime.Object { return &VirtualClusterInstanceLog{} }, + ) + NewVirtualClusterInstanceLogREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewVirtualClusterInstanceLogRESTFunc(Factory) + } + NewVirtualClusterInstanceLogRESTFunc NewRESTFunc + InternalVirtualClusterInstanceWorkloadKubeConfigREST = builders.NewInternalSubresource( + "virtualclusterinstances", "VirtualClusterInstanceWorkloadKubeConfig", "workloadkubeconfig", + func() runtime.Object { return &VirtualClusterInstanceWorkloadKubeConfig{} }, + ) + NewVirtualClusterInstanceWorkloadKubeConfigREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewVirtualClusterInstanceWorkloadKubeConfigRESTFunc(Factory) + } + NewVirtualClusterInstanceWorkloadKubeConfigRESTFunc NewRESTFunc + InternalVirtualClusterTemplate = builders.NewInternalResource( + "virtualclustertemplates", + "VirtualClusterTemplate", + func() runtime.Object { return &VirtualClusterTemplate{} }, + func() runtime.Object { return &VirtualClusterTemplateList{} }, + ) + InternalVirtualClusterTemplateStatus = builders.NewInternalResourceStatus( + "virtualclustertemplates", + "VirtualClusterTemplateStatus", + func() runtime.Object { return &VirtualClusterTemplate{} }, + func() runtime.Object { return &VirtualClusterTemplateList{} }, + ) + // Registered resources and subresources + ApiVersion = builders.NewApiGroup("management.loft.sh").WithKinds( + InternalAgentAuditEvent, + InternalAgentAuditEventStatus, + InternalAnnouncement, + InternalAnnouncementStatus, + InternalApp, + InternalAppStatus, + InternalCluster, + InternalClusterStatus, + InternalClusterAgentConfigREST, + InternalClusterChartsREST, + InternalClusterDomainREST, + InternalClusterMemberAccessREST, + InternalClusterMembersREST, + InternalClusterResetREST, + InternalClusterVirtualClusterDefaultsREST, + InternalClusterAccess, + InternalClusterAccessStatus, + InternalClusterConnect, + InternalClusterConnectStatus, + InternalClusterRoleTemplate, + InternalClusterRoleTemplateStatus, + InternalConfig, + InternalConfigStatus, + InternalDevPodWorkspaceInstance, + InternalDevPodWorkspaceInstanceStatus, + InternalDevPodWorkspaceInstanceDeleteREST, + InternalDevPodWorkspaceInstanceGetStatusREST, + InternalDevPodWorkspaceInstanceSshREST, + InternalDevPodWorkspaceInstanceStopREST, + InternalDevPodWorkspaceInstanceUpREST, + InternalDevPodWorkspaceTemplate, + InternalDevPodWorkspaceTemplateStatus, + InternalDirectClusterEndpointToken, + InternalDirectClusterEndpointTokenStatus, + InternalEvent, + InternalEventStatus, + InternalFeature, + InternalFeatureStatus, + InternalIngressAuthToken, + InternalIngressAuthTokenStatus, + InternalKiosk, + InternalKioskStatus, + InternalLicense, + InternalLicenseStatus, + InternalLicenseRequestREST, + InternalLicenseToken, + InternalLicenseTokenStatus, + InternalLoftUpgrade, + InternalLoftUpgradeStatus, + InternalOwnedAccessKey, + InternalOwnedAccessKeyStatus, + InternalPolicyViolation, + InternalPolicyViolationStatus, + InternalProject, + InternalProjectStatus, + InternalProjectChartInfoREST, + InternalProjectChartsREST, + InternalProjectClustersREST, + InternalProjectImportSpaceREST, + InternalProjectImportVirtualClusterREST, + InternalProjectMembersREST, + InternalProjectMigrateSpaceInstanceREST, + InternalProjectMigrateVirtualClusterInstanceREST, + InternalProjectTemplatesREST, + InternalProjectSecret, + InternalProjectSecretStatus, + InternalRedirectToken, + InternalRedirectTokenStatus, + InternalResetAccessKey, + InternalResetAccessKeyStatus, + InternalRunner, + InternalRunnerStatus, + InternalRunnerAccessKeyREST, + InternalRunnerConfigREST, + InternalSelf, + InternalSelfStatus, + InternalSelfSubjectAccessReview, + InternalSelfSubjectAccessReviewStatus, + InternalSharedSecret, + InternalSharedSecretStatus, + InternalSpaceConstraint, + InternalSpaceConstraintStatus, + InternalSpaceInstance, + InternalSpaceInstanceStatus, + InternalSpaceTemplate, + InternalSpaceTemplateStatus, + InternalSubjectAccessReview, + InternalSubjectAccessReviewStatus, + InternalTask, + InternalTaskStatus, + InternalTaskLogREST, + InternalTeam, + InternalTeamStatus, + InternalTeamAccessKeysREST, + InternalTeamClustersREST, + InternalUser, + InternalUserStatus, + InternalUserAccessKeysREST, + InternalUserClustersREST, + InternalUserPermissionsREST, + InternalUserProfileREST, + InternalVirtualClusterInstance, + InternalVirtualClusterInstanceStatus, + InternalVirtualClusterInstanceKubeConfigREST, + InternalVirtualClusterInstanceLogREST, + InternalVirtualClusterInstanceWorkloadKubeConfigREST, + InternalVirtualClusterTemplate, + InternalVirtualClusterTemplateStatus, + ) + + // Required by code generated by go2idl + AddToScheme = (&runtime.SchemeBuilder{ + ApiVersion.SchemeBuilder.AddToScheme, + RegisterDefaults, + }).AddToScheme + SchemeBuilder = ApiVersion.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + SchemeGroupVersion = ApiVersion.GroupVersion +) + +// Required by code generated by go2idl +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Required by code generated by go2idl +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +type AccessKeyType string +type Level string +type RequestTarget string +type Stage string + +type AgentAnalyticsSpec struct { + AnalyticsEndpoint string + InstanceTokenAuth *pkgserver.InstanceTokenAuth +} + +type AgentAuditConfig struct { + Enabled bool + DisableAgentSyncBack bool + Level int + Policy AuditPolicy + Path string + MaxAge int + MaxBackups int + MaxSize int + Compress bool +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type AgentAuditEvent struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec AgentAuditEventSpec + Status AgentAuditEventStatus +} + +type AgentAuditEventSpec struct { + Events []*auditv1.Event +} + +type AgentAuditEventStatus struct { +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Announcement struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec AnnouncementSpec + Status AnnouncementStatus +} + +type AnnouncementSpec struct { +} + +type AnnouncementStatus struct { + Announcement string + InstanceTokenAuth *pkgserver.InstanceTokenAuth +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type App struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec AppSpec + Status AppStatus +} + +type AppSpec struct { + storagev1.AppSpec +} + +type AppStatus struct { + storagev1.AppStatus +} + +type Apps struct { + NoDefault bool + Repositories []storagev1.HelmChartRepository + PredefinedApps []PredefinedApp +} + +type Audit struct { + Enabled bool + DisableAgentSyncBack bool + Level int + Policy AuditPolicy + DataStoreEndpoint string + DataStoreMaxAge *int + Path string + MaxAge int + MaxBackups int + MaxSize int + Compress bool +} + +type AuditPolicy struct { + Rules []AuditPolicyRule + OmitStages []auditv1.Stage +} + +type AuditPolicyRule struct { + Level auditv1.Level + Users []string + UserGroups []string + Verbs []string + Resources []GroupResources + Namespaces []string + NonResourceURLs []string + OmitStages []auditv1.Stage + RequestTargets []auditv1.RequestTarget + Clusters []string +} + +type Authentication struct { + Connector + Password *AuthenticationPassword + Connectors []ConnectorWithName + DisableTeamCreation bool + AccessKeyMaxTTLSeconds int64 + LoginAccessKeyTTLSeconds *int64 + CustomHttpHeaders map[string]string +} + +type AuthenticationClusterAccountTemplates struct { + ClusterAccountTemplates []storagev1.UserClusterAccountTemplate + GroupClusterAccountTemplates []AuthenticationGroupClusterAccountTemplate +} + +type AuthenticationGithub struct { + ClientID string + ClientSecret string + RedirectURI string + Orgs []AuthenticationGithubOrg + HostName string + RootCA string + AuthenticationClusterAccountTemplates +} + +type AuthenticationGithubOrg struct { + Name string + Teams []string +} + +type AuthenticationGitlab struct { + ClientID string + ClientSecret string + RedirectURI string + BaseURL string + Groups []string + AuthenticationClusterAccountTemplates +} + +type AuthenticationGoogle struct { + ClientID string + ClientSecret string + RedirectURI string + Scopes []string + HostedDomains []string + Groups []string + ServiceAccountFilePath string + AdminEmail string + AuthenticationClusterAccountTemplates +} + +type AuthenticationGroupClusterAccountTemplate struct { + Group string + ClusterAccountTemplates []storagev1.UserClusterAccountTemplate +} + +type AuthenticationMicrosoft struct { + ClientID string + ClientSecret string + RedirectURI string + Tenant string + Groups []string + OnlySecurityGroups bool + UseGroupsAsWhitelist bool + AuthenticationClusterAccountTemplates +} + +type AuthenticationOIDC struct { + IssuerURL string + ClientID string + ClientSecret string + RedirectURI string + PostLogoutRedirectURI string + CAFile string + InsecureCA bool + PreferredUsernameClaim string + LoftUsernameClaim string + UsernameClaim string + EmailClaim string + UsernamePrefix string + GroupsClaim string + Groups []string + Scopes []string + GetUserInfo bool + GroupsPrefix string + Type string + AuthenticationClusterAccountTemplates +} + +type AuthenticationPassword struct { + Disabled bool +} + +type AuthenticationSAML struct { + RedirectURI string + SSOURL string + CAData []byte + UsernameAttr string + EmailAttr string + GroupsAttr string + CA string + InsecureSkipSignatureValidation bool + EntityIssuer string + SSOIssuer string + GroupsDelim string + AllowedGroups []string + FilterGroups bool + NameIDPolicyFormat string +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Cluster struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ClusterSpec + Status ClusterStatus +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterAccess struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ClusterAccessSpec + Status ClusterAccessStatus +} + +type ClusterAccessSpec struct { + storagev1.ClusterAccessSpec +} + +type ClusterAccessStatus struct { + storagev1.ClusterAccessStatus + Clusters []*clusterv1.EntityInfo + Users []*clusterv1.UserOrTeam + Teams []*clusterv1.EntityInfo + SpaceConstraint *clusterv1.EntityInfo +} + +type ClusterAccounts struct { + Accounts []string + Cluster storagev1.Cluster +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterAgentConfig struct { + metav1.TypeMeta + metav1.ObjectMeta + Cluster string + Audit *AgentAuditConfig + DefaultImageRegistry string + TokenCaCert []byte + LoftHost string + AnalyticsSpec AgentAnalyticsSpec +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterCharts struct { + metav1.TypeMeta + metav1.ObjectMeta + Charts []storagev1.HelmChart + Busy bool +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterConnect struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ClusterConnectSpec + Status ClusterConnectStatus +} + +type ClusterConnectSpec struct { + Config string + AdminUser string + ClusterTemplate Cluster +} + +type ClusterConnectStatus struct { + Failed bool + Reason string + Message string +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterDomain struct { + metav1.TypeMeta + metav1.ObjectMeta + Target string + Domain string +} + +type ClusterMember struct { + Info clusterv1.EntityInfo +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterMemberAccess struct { + metav1.TypeMeta + metav1.ObjectMeta + Teams []ClusterMember + Users []ClusterMember +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterMembers struct { + metav1.TypeMeta + metav1.ObjectMeta + Teams []ClusterMember + Users []ClusterMember +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterReset struct { + metav1.TypeMeta + metav1.ObjectMeta + Agent bool + RBAC bool +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterRoleTemplate struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ClusterRoleTemplateSpec + Status ClusterRoleTemplateStatus +} + +type ClusterRoleTemplateSpec struct { + storagev1.ClusterRoleTemplateSpec +} + +type ClusterRoleTemplateStatus struct { + storagev1.ClusterRoleTemplateStatus + Clusters []*clusterv1.EntityInfo +} + +type ClusterSpec struct { + storagev1.ClusterSpec +} + +type ClusterStatus struct { + storagev1.ClusterStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterVirtualClusterDefaults struct { + metav1.TypeMeta + metav1.ObjectMeta + DefaultTemplate *storagev1.VirtualClusterTemplate + LatestVersion string + Values string + Warning string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Config struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ConfigSpec + Status ConfigStatus +} + +type ConfigSpec struct { + Raw []byte +} + +type ConfigStatus struct { + Authentication Authentication + OIDC *OIDC + Apps *Apps + Audit *Audit + LoftHost string + DevPodSubDomain string + UISettings *uiv1.UISettingsConfig + VaultIntegration *storagev1.VaultIntegrationSpec +} + +type Connector struct { + OIDC *AuthenticationOIDC + Github *AuthenticationGithub + Gitlab *AuthenticationGitlab + Google *AuthenticationGoogle + Microsoft *AuthenticationMicrosoft + SAML *AuthenticationSAML +} + +type ConnectorWithName struct { + ID string + DisplayName string + Connector +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstance struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec DevPodWorkspaceInstanceSpec + Status DevPodWorkspaceInstanceStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceDelete struct { + metav1.TypeMeta + metav1.ObjectMeta +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceGetStatus struct { + metav1.TypeMeta + metav1.ObjectMeta +} + +type DevPodWorkspaceInstanceSpec struct { + storagev1.DevPodWorkspaceInstanceSpec +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceSsh struct { + metav1.TypeMeta + metav1.ObjectMeta +} + +type DevPodWorkspaceInstanceStatus struct { + storagev1.DevPodWorkspaceInstanceStatus + SleepModeConfig *clusterv1.SleepModeConfig +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceStop struct { + metav1.TypeMeta + metav1.ObjectMeta +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceUp struct { + metav1.TypeMeta + metav1.ObjectMeta +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceTemplate struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec DevPodWorkspaceTemplateSpec + Status DevPodWorkspaceTemplateStatus +} + +type DevPodWorkspaceTemplateSpec struct { + storagev1.DevPodWorkspaceTemplateSpec +} + +type DevPodWorkspaceTemplateStatus struct { + storagev1.DevPodWorkspaceTemplateStatus +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DirectClusterEndpointToken struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec DirectClusterEndpointTokenSpec + Status DirectClusterEndpointTokenStatus +} + +type DirectClusterEndpointTokenSpec struct { + TTL int64 + Scope *storagev1.AccessKeyScope +} + +type DirectClusterEndpointTokenStatus struct { + Token string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Event struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec EventSpec + Status EventStatus +} + +type EventSpec struct { +} + +type EventStatus struct { + auditv1.Event +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Feature struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec FeatureSpec + Status FeatureStatus +} + +type FeatureSpec struct { +} + +type FeatureStatus struct { + Enabled bool +} + +type GroupResources struct { + Group string + Resources []string + ResourceNames []string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type IngressAuthToken struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec IngressAuthTokenSpec + Status IngressAuthTokenStatus +} + +type IngressAuthTokenSpec struct { + Host string + Signature string +} + +type IngressAuthTokenStatus struct { + Token string +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Kiosk struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec KioskSpec + Status KioskStatus +} + +type KioskSpec struct { + JsPolicy policyv1beta1.JsPolicy + JsPolicyBundle policyv1beta1.JsPolicyBundle + JsPolicyViolations policyv1beta1.JsPolicyViolations + HelmRelease clusterv1.HelmRelease + SleepModeConfig clusterv1.SleepModeConfig + Space clusterv1.Space + VirtualCluster clusterv1.VirtualCluster + LocalClusterAccess clusterv1.LocalClusterAccess + ClusterQuota clusterv1.ClusterQuota + ChartInfo clusterv1.ChartInfo + StorageClusterAccess agentstoragev1.LocalClusterAccess + StorageClusterQuota agentstoragev1.ClusterQuota + StorageVirtualCluster agentstoragev1.VirtualCluster + LocalUser agentstoragev1.LocalUser + LocalTeam agentstoragev1.LocalTeam + UISettings uiv1.UISettings +} + +type KioskStatus struct { +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type License struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec LicenseSpec + Status LicenseStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LicenseRequest struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec LicenseRequestSpec + Status LicenseRequestStatus +} + +type LicenseRequestSpec struct { + Route string + Input pkgserver.StandardRequestInputFrontEnd +} + +type LicenseRequestStatus struct { + OK bool + Output pkgserver.StandardRequestOutput +} + +type LicenseSpec struct { +} + +type LicenseStatus struct { + Buttons pkgserver.Buttons + License *pkgserver.License + InstanceID string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LicenseToken struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec LicenseTokenSpec + Status LicenseTokenStatus +} + +type LicenseTokenSpec struct { +} + +type LicenseTokenStatus struct { + Token *pkgserver.InstanceTokenAuth +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LoftUpgrade struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec LoftUpgradeSpec + Status LoftUpgradeStatus +} + +type LoftUpgradeSpec struct { + Namespace string + Release string + Version string +} + +type LoftUpgradeStatus struct { +} + +type OIDC struct { + Enabled bool + WildcardRedirect bool + Clients []OIDCClient +} + +type OIDCClient struct { + Name string + ClientID string + ClientSecret string + RedirectURIs []string +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type OwnedAccessKey struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec OwnedAccessKeySpec + Status OwnedAccessKeyStatus +} + +type OwnedAccessKeySpec struct { + storagev1.AccessKeySpec +} + +type OwnedAccessKeyStatus struct { + storagev1.AccessKeyStatus +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type PolicyViolation struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec PolicyViolationSpec + Status PolicyViolationStatus +} + +type PolicyViolationSpec struct { +} + +type PolicyViolationStatus struct { + Policy string + Cluster string + User *clusterv1.EntityInfo + Violation policyv1beta1.PolicyViolation +} + +type PredefinedApp struct { + Chart string + InitialVersion string + InitialValues string + Clusters []string + Title string + IconURL string + ReadmeURL string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Project struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ProjectSpec + Status ProjectStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectChartInfo struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ProjectChartInfoSpec + Status ProjectChartInfoStatus +} + +type ProjectChartInfoSpec struct { + clusterv1.ChartInfoSpec +} + +type ProjectChartInfoStatus struct { + clusterv1.ChartInfoStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectCharts struct { + metav1.TypeMeta + metav1.ObjectMeta + Charts []storagev1.HelmChart + Busy bool +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectClusters struct { + metav1.TypeMeta + metav1.ObjectMeta + Clusters []Cluster + Runners []Runner +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectImportSpace struct { + metav1.TypeMeta + metav1.ObjectMeta + SourceSpace ProjectImportSpaceSource +} + +type ProjectImportSpaceSource struct { + Name string + Cluster string + ImportName string +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectImportVirtualCluster struct { + metav1.TypeMeta + metav1.ObjectMeta + SourceVirtualCluster ProjectImportVirtualClusterSource +} + +type ProjectImportVirtualClusterSource struct { + Name string + Namespace string + Cluster string + ImportName string +} + +type ProjectMember struct { + Info clusterv1.EntityInfo +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectMembers struct { + metav1.TypeMeta + metav1.ObjectMeta + Teams []ProjectMember + Users []ProjectMember +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectMigrateSpaceInstance struct { + metav1.TypeMeta + metav1.ObjectMeta + SourceSpaceInstance ProjectMigrateSpaceInstanceSource +} + +type ProjectMigrateSpaceInstanceSource struct { + Name string + Namespace string +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectMigrateVirtualClusterInstance struct { + metav1.TypeMeta + metav1.ObjectMeta + SourceVirtualClusterInstance ProjectMigrateVirtualClusterInstanceSource +} + +type ProjectMigrateVirtualClusterInstanceSource struct { + Name string + Namespace string +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectSecret struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ProjectSecretSpec + Status ProjectSecretStatus +} + +type ProjectSecretSpec struct { + DisplayName string + Description string + Owner *storagev1.UserOrTeam + Data map[string][]byte + Access []storagev1.Access +} + +type ProjectSecretStatus struct { + Conditions agentstoragev1.Conditions +} + +type ProjectSpec struct { + storagev1.ProjectSpec +} + +type ProjectStatus struct { + storagev1.ProjectStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectTemplates struct { + metav1.TypeMeta + metav1.ObjectMeta + DefaultVirtualClusterTemplate string + VirtualClusterTemplates []VirtualClusterTemplate + DefaultSpaceTemplate string + SpaceTemplates []SpaceTemplate + DefaultDevPodWorkspaceTemplate string + DevPodWorkspaceTemplates []DevPodWorkspaceTemplate +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RedirectToken struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec RedirectTokenSpec + Status RedirectTokenStatus +} + +type RedirectTokenSpec struct { + Token string +} + +type RedirectTokenStatus struct { + RedirectURL string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ResetAccessKey struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec ResetAccessKeySpec + Status ResetAccessKeyStatus +} + +type ResetAccessKeySpec struct { + storagev1.AccessKeySpec +} + +type ResetAccessKeyStatus struct { + storagev1.AccessKeyStatus +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Runner struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec RunnerSpec + Status RunnerStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RunnerAccessKey struct { + metav1.TypeMeta + metav1.ObjectMeta + AccessKey string +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RunnerConfig struct { + metav1.TypeMeta + metav1.ObjectMeta + TokenCaCert []byte +} + +type RunnerSpec struct { + storagev1.RunnerSpec +} + +type RunnerStatus struct { + storagev1.RunnerStatus +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Self struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec SelfSpec + Status SelfStatus +} + +type SelfSpec struct { + AccessKey string +} + +type SelfStatus struct { + User *UserInfo + Team *clusterv1.EntityInfo + AccessKey string + AccessKeyScope *storagev1.AccessKeyScope + AccessKeyType storagev1.AccessKeyType + Subject string + UID string + Groups []string + IntercomHash string + InstanceID string +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SelfSubjectAccessReview struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec SelfSubjectAccessReviewSpec + Status SelfSubjectAccessReviewStatus +} + +type SelfSubjectAccessReviewSpec struct { + authorizationv1.SelfSubjectAccessReviewSpec +} + +type SelfSubjectAccessReviewStatus struct { + authorizationv1.SubjectAccessReviewStatus +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SharedSecret struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec SharedSecretSpec + Status SharedSecretStatus +} + +type SharedSecretSpec struct { + storagev1.SharedSecretSpec +} + +type SharedSecretStatus struct { + storagev1.SharedSecretStatus +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceConstraint struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec SpaceConstraintSpec + Status SpaceConstraintStatus +} + +type SpaceConstraintSpec struct { + storagev1.SpaceConstraintSpec +} + +type SpaceConstraintStatus struct { + storagev1.SpaceConstraintStatus + ClusterRole *clusterv1.EntityInfo + Clusters []*clusterv1.EntityInfo +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceInstance struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec SpaceInstanceSpec + Status SpaceInstanceStatus +} + +type SpaceInstanceSpec struct { + storagev1.SpaceInstanceSpec +} + +type SpaceInstanceStatus struct { + storagev1.SpaceInstanceStatus + SleepModeConfig *clusterv1.SleepModeConfig + CanUse bool + CanUpdate bool +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceTemplate struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec SpaceTemplateSpec + Status SpaceTemplateStatus +} + +type SpaceTemplateSpec struct { + storagev1.SpaceTemplateSpec +} + +type SpaceTemplateStatus struct { + storagev1.SpaceTemplateStatus + Apps []*clusterv1.EntityInfo +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SubjectAccessReview struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec SubjectAccessReviewSpec + Status SubjectAccessReviewStatus +} + +type SubjectAccessReviewSpec struct { + authorizationv1.SubjectAccessReviewSpec +} + +type SubjectAccessReviewStatus struct { + authorizationv1.SubjectAccessReviewStatus +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Task struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec TaskSpec + Status TaskStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TaskLog struct { + metav1.TypeMeta + metav1.ObjectMeta +} + +type TaskSpec struct { + storagev1.TaskSpec +} + +type TaskStatus struct { + storagev1.TaskStatus + Owner *clusterv1.UserOrTeam + Cluster *clusterv1.EntityInfo +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Team struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec TeamSpec + Status TeamStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamAccessKeys struct { + metav1.TypeMeta + metav1.ObjectMeta + AccessKeys []OwnedAccessKey +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamClusters struct { + metav1.TypeMeta + metav1.ObjectMeta + Clusters []ClusterAccounts +} + +type TeamSpec struct { + storagev1.TeamSpec +} + +type TeamStatus struct { + storagev1.TeamStatus +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type User struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec UserSpec + Status UserStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserAccessKeys struct { + metav1.TypeMeta + metav1.ObjectMeta + AccessKeys []OwnedAccessKey +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserClusters struct { + metav1.TypeMeta + metav1.ObjectMeta + Clusters []ClusterAccounts +} + +type UserInfo struct { + clusterv1.EntityInfo + Teams []*clusterv1.EntityInfo +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserPermissions struct { + metav1.TypeMeta + metav1.ObjectMeta + ClusterRoles []UserPermissionsRole + NamespaceRoles []UserPermissionsRole +} + +type UserPermissionsRole struct { + ClusterRole string + Role string + Namespace string + Rules []rbacv1.PolicyRule +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserProfile struct { + metav1.TypeMeta + metav1.ObjectMeta + DisplayName string + Username string + Password string + CurrentPassword string + Email string + Icon *string + Custom string +} + +type UserSpec struct { + storagev1.UserSpec +} + +type UserStatus struct { + storagev1.UserStatus +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstance struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec VirtualClusterInstanceSpec + Status VirtualClusterInstanceStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceKubeConfig struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec VirtualClusterInstanceKubeConfigSpec + Status VirtualClusterInstanceKubeConfigStatus +} + +type VirtualClusterInstanceKubeConfigSpec struct { + CertificateTTL *int32 +} + +type VirtualClusterInstanceKubeConfigStatus struct { + KubeConfig string +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceLog struct { + metav1.TypeMeta + metav1.ObjectMeta +} + +type VirtualClusterInstanceSpec struct { + storagev1.VirtualClusterInstanceSpec +} + +type VirtualClusterInstanceStatus struct { + storagev1.VirtualClusterInstanceStatus + SleepModeConfig *clusterv1.SleepModeConfig + CanUse bool + CanUpdate bool +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceWorkloadKubeConfig struct { + metav1.TypeMeta + metav1.ObjectMeta + KubeConfig string + Token string +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterTemplate struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec VirtualClusterTemplateSpec + Status VirtualClusterTemplateStatus +} + +type VirtualClusterTemplateSpec struct { + storagev1.VirtualClusterTemplateSpec +} + +type VirtualClusterTemplateStatus struct { + storagev1.VirtualClusterTemplateStatus + Apps []*clusterv1.EntityInfo +} + +// AgentAuditEvent Functions and Structs +// +// +k8s:deepcopy-gen=false +type AgentAuditEventStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type AgentAuditEventStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type AgentAuditEventList struct { + metav1.TypeMeta + metav1.ListMeta + Items []AgentAuditEvent +} + +func (AgentAuditEvent) NewStatus() interface{} { + return AgentAuditEventStatus{} +} + +func (pc *AgentAuditEvent) GetStatus() interface{} { + return pc.Status +} + +func (pc *AgentAuditEvent) SetStatus(s interface{}) { + pc.Status = s.(AgentAuditEventStatus) +} + +func (pc *AgentAuditEvent) GetSpec() interface{} { + return pc.Spec +} + +func (pc *AgentAuditEvent) SetSpec(s interface{}) { + pc.Spec = s.(AgentAuditEventSpec) +} + +func (pc *AgentAuditEvent) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *AgentAuditEvent) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc AgentAuditEvent) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store AgentAuditEvent. +// +k8s:deepcopy-gen=false +type AgentAuditEventRegistry interface { + ListAgentAuditEvents(ctx context.Context, options *internalversion.ListOptions) (*AgentAuditEventList, error) + GetAgentAuditEvent(ctx context.Context, id string, options *metav1.GetOptions) (*AgentAuditEvent, error) + CreateAgentAuditEvent(ctx context.Context, id *AgentAuditEvent) (*AgentAuditEvent, error) + UpdateAgentAuditEvent(ctx context.Context, id *AgentAuditEvent) (*AgentAuditEvent, error) + DeleteAgentAuditEvent(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewAgentAuditEventRegistry(sp builders.StandardStorageProvider) AgentAuditEventRegistry { + return &storageAgentAuditEvent{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageAgentAuditEvent struct { + builders.StandardStorageProvider +} + +func (s *storageAgentAuditEvent) ListAgentAuditEvents(ctx context.Context, options *internalversion.ListOptions) (*AgentAuditEventList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*AgentAuditEventList), err +} + +func (s *storageAgentAuditEvent) GetAgentAuditEvent(ctx context.Context, id string, options *metav1.GetOptions) (*AgentAuditEvent, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*AgentAuditEvent), nil +} + +func (s *storageAgentAuditEvent) CreateAgentAuditEvent(ctx context.Context, object *AgentAuditEvent) (*AgentAuditEvent, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*AgentAuditEvent), nil +} + +func (s *storageAgentAuditEvent) UpdateAgentAuditEvent(ctx context.Context, object *AgentAuditEvent) (*AgentAuditEvent, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*AgentAuditEvent), nil +} + +func (s *storageAgentAuditEvent) DeleteAgentAuditEvent(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Announcement Functions and Structs +// +// +k8s:deepcopy-gen=false +type AnnouncementStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type AnnouncementStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type AnnouncementList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Announcement +} + +func (Announcement) NewStatus() interface{} { + return AnnouncementStatus{} +} + +func (pc *Announcement) GetStatus() interface{} { + return pc.Status +} + +func (pc *Announcement) SetStatus(s interface{}) { + pc.Status = s.(AnnouncementStatus) +} + +func (pc *Announcement) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Announcement) SetSpec(s interface{}) { + pc.Spec = s.(AnnouncementSpec) +} + +func (pc *Announcement) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Announcement) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Announcement) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Announcement. +// +k8s:deepcopy-gen=false +type AnnouncementRegistry interface { + ListAnnouncements(ctx context.Context, options *internalversion.ListOptions) (*AnnouncementList, error) + GetAnnouncement(ctx context.Context, id string, options *metav1.GetOptions) (*Announcement, error) + CreateAnnouncement(ctx context.Context, id *Announcement) (*Announcement, error) + UpdateAnnouncement(ctx context.Context, id *Announcement) (*Announcement, error) + DeleteAnnouncement(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewAnnouncementRegistry(sp builders.StandardStorageProvider) AnnouncementRegistry { + return &storageAnnouncement{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageAnnouncement struct { + builders.StandardStorageProvider +} + +func (s *storageAnnouncement) ListAnnouncements(ctx context.Context, options *internalversion.ListOptions) (*AnnouncementList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*AnnouncementList), err +} + +func (s *storageAnnouncement) GetAnnouncement(ctx context.Context, id string, options *metav1.GetOptions) (*Announcement, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Announcement), nil +} + +func (s *storageAnnouncement) CreateAnnouncement(ctx context.Context, object *Announcement) (*Announcement, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Announcement), nil +} + +func (s *storageAnnouncement) UpdateAnnouncement(ctx context.Context, object *Announcement) (*Announcement, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Announcement), nil +} + +func (s *storageAnnouncement) DeleteAnnouncement(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// App Functions and Structs +// +// +k8s:deepcopy-gen=false +type AppStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type AppStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type AppList struct { + metav1.TypeMeta + metav1.ListMeta + Items []App +} + +func (App) NewStatus() interface{} { + return AppStatus{} +} + +func (pc *App) GetStatus() interface{} { + return pc.Status +} + +func (pc *App) SetStatus(s interface{}) { + pc.Status = s.(AppStatus) +} + +func (pc *App) GetSpec() interface{} { + return pc.Spec +} + +func (pc *App) SetSpec(s interface{}) { + pc.Spec = s.(AppSpec) +} + +func (pc *App) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *App) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc App) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store App. +// +k8s:deepcopy-gen=false +type AppRegistry interface { + ListApps(ctx context.Context, options *internalversion.ListOptions) (*AppList, error) + GetApp(ctx context.Context, id string, options *metav1.GetOptions) (*App, error) + CreateApp(ctx context.Context, id *App) (*App, error) + UpdateApp(ctx context.Context, id *App) (*App, error) + DeleteApp(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewAppRegistry(sp builders.StandardStorageProvider) AppRegistry { + return &storageApp{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageApp struct { + builders.StandardStorageProvider +} + +func (s *storageApp) ListApps(ctx context.Context, options *internalversion.ListOptions) (*AppList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*AppList), err +} + +func (s *storageApp) GetApp(ctx context.Context, id string, options *metav1.GetOptions) (*App, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*App), nil +} + +func (s *storageApp) CreateApp(ctx context.Context, object *App) (*App, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*App), nil +} + +func (s *storageApp) UpdateApp(ctx context.Context, object *App) (*App, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*App), nil +} + +func (s *storageApp) DeleteApp(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Cluster Functions and Structs +// +// +k8s:deepcopy-gen=false +type ClusterStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type ClusterStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Cluster +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterAgentConfigList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterAgentConfig +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterChartsList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterCharts +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterDomainList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterDomain +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterMemberAccessList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterMemberAccess +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterMembersList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterMembers +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterResetList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterReset +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterVirtualClusterDefaultsList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterVirtualClusterDefaults +} + +func (Cluster) NewStatus() interface{} { + return ClusterStatus{} +} + +func (pc *Cluster) GetStatus() interface{} { + return pc.Status +} + +func (pc *Cluster) SetStatus(s interface{}) { + pc.Status = s.(ClusterStatus) +} + +func (pc *Cluster) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Cluster) SetSpec(s interface{}) { + pc.Spec = s.(ClusterSpec) +} + +func (pc *Cluster) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Cluster) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Cluster) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Cluster. +// +k8s:deepcopy-gen=false +type ClusterRegistry interface { + ListClusters(ctx context.Context, options *internalversion.ListOptions) (*ClusterList, error) + GetCluster(ctx context.Context, id string, options *metav1.GetOptions) (*Cluster, error) + CreateCluster(ctx context.Context, id *Cluster) (*Cluster, error) + UpdateCluster(ctx context.Context, id *Cluster) (*Cluster, error) + DeleteCluster(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewClusterRegistry(sp builders.StandardStorageProvider) ClusterRegistry { + return &storageCluster{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageCluster struct { + builders.StandardStorageProvider +} + +func (s *storageCluster) ListClusters(ctx context.Context, options *internalversion.ListOptions) (*ClusterList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*ClusterList), err +} + +func (s *storageCluster) GetCluster(ctx context.Context, id string, options *metav1.GetOptions) (*Cluster, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Cluster), nil +} + +func (s *storageCluster) CreateCluster(ctx context.Context, object *Cluster) (*Cluster, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Cluster), nil +} + +func (s *storageCluster) UpdateCluster(ctx context.Context, object *Cluster) (*Cluster, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Cluster), nil +} + +func (s *storageCluster) DeleteCluster(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// ClusterAccess Functions and Structs +// +// +k8s:deepcopy-gen=false +type ClusterAccessStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type ClusterAccessStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterAccessList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterAccess +} + +func (ClusterAccess) NewStatus() interface{} { + return ClusterAccessStatus{} +} + +func (pc *ClusterAccess) GetStatus() interface{} { + return pc.Status +} + +func (pc *ClusterAccess) SetStatus(s interface{}) { + pc.Status = s.(ClusterAccessStatus) +} + +func (pc *ClusterAccess) GetSpec() interface{} { + return pc.Spec +} + +func (pc *ClusterAccess) SetSpec(s interface{}) { + pc.Spec = s.(ClusterAccessSpec) +} + +func (pc *ClusterAccess) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *ClusterAccess) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc ClusterAccess) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store ClusterAccess. +// +k8s:deepcopy-gen=false +type ClusterAccessRegistry interface { + ListClusterAccesss(ctx context.Context, options *internalversion.ListOptions) (*ClusterAccessList, error) + GetClusterAccess(ctx context.Context, id string, options *metav1.GetOptions) (*ClusterAccess, error) + CreateClusterAccess(ctx context.Context, id *ClusterAccess) (*ClusterAccess, error) + UpdateClusterAccess(ctx context.Context, id *ClusterAccess) (*ClusterAccess, error) + DeleteClusterAccess(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewClusterAccessRegistry(sp builders.StandardStorageProvider) ClusterAccessRegistry { + return &storageClusterAccess{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageClusterAccess struct { + builders.StandardStorageProvider +} + +func (s *storageClusterAccess) ListClusterAccesss(ctx context.Context, options *internalversion.ListOptions) (*ClusterAccessList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*ClusterAccessList), err +} + +func (s *storageClusterAccess) GetClusterAccess(ctx context.Context, id string, options *metav1.GetOptions) (*ClusterAccess, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*ClusterAccess), nil +} + +func (s *storageClusterAccess) CreateClusterAccess(ctx context.Context, object *ClusterAccess) (*ClusterAccess, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ClusterAccess), nil +} + +func (s *storageClusterAccess) UpdateClusterAccess(ctx context.Context, object *ClusterAccess) (*ClusterAccess, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ClusterAccess), nil +} + +func (s *storageClusterAccess) DeleteClusterAccess(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// ClusterConnect Functions and Structs +// +// +k8s:deepcopy-gen=false +type ClusterConnectStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type ClusterConnectStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterConnectList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterConnect +} + +func (ClusterConnect) NewStatus() interface{} { + return ClusterConnectStatus{} +} + +func (pc *ClusterConnect) GetStatus() interface{} { + return pc.Status +} + +func (pc *ClusterConnect) SetStatus(s interface{}) { + pc.Status = s.(ClusterConnectStatus) +} + +func (pc *ClusterConnect) GetSpec() interface{} { + return pc.Spec +} + +func (pc *ClusterConnect) SetSpec(s interface{}) { + pc.Spec = s.(ClusterConnectSpec) +} + +func (pc *ClusterConnect) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *ClusterConnect) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc ClusterConnect) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store ClusterConnect. +// +k8s:deepcopy-gen=false +type ClusterConnectRegistry interface { + ListClusterConnects(ctx context.Context, options *internalversion.ListOptions) (*ClusterConnectList, error) + GetClusterConnect(ctx context.Context, id string, options *metav1.GetOptions) (*ClusterConnect, error) + CreateClusterConnect(ctx context.Context, id *ClusterConnect) (*ClusterConnect, error) + UpdateClusterConnect(ctx context.Context, id *ClusterConnect) (*ClusterConnect, error) + DeleteClusterConnect(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewClusterConnectRegistry(sp builders.StandardStorageProvider) ClusterConnectRegistry { + return &storageClusterConnect{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageClusterConnect struct { + builders.StandardStorageProvider +} + +func (s *storageClusterConnect) ListClusterConnects(ctx context.Context, options *internalversion.ListOptions) (*ClusterConnectList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*ClusterConnectList), err +} + +func (s *storageClusterConnect) GetClusterConnect(ctx context.Context, id string, options *metav1.GetOptions) (*ClusterConnect, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*ClusterConnect), nil +} + +func (s *storageClusterConnect) CreateClusterConnect(ctx context.Context, object *ClusterConnect) (*ClusterConnect, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ClusterConnect), nil +} + +func (s *storageClusterConnect) UpdateClusterConnect(ctx context.Context, object *ClusterConnect) (*ClusterConnect, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ClusterConnect), nil +} + +func (s *storageClusterConnect) DeleteClusterConnect(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// ClusterRoleTemplate Functions and Structs +// +// +k8s:deepcopy-gen=false +type ClusterRoleTemplateStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type ClusterRoleTemplateStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterRoleTemplateList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterRoleTemplate +} + +func (ClusterRoleTemplate) NewStatus() interface{} { + return ClusterRoleTemplateStatus{} +} + +func (pc *ClusterRoleTemplate) GetStatus() interface{} { + return pc.Status +} + +func (pc *ClusterRoleTemplate) SetStatus(s interface{}) { + pc.Status = s.(ClusterRoleTemplateStatus) +} + +func (pc *ClusterRoleTemplate) GetSpec() interface{} { + return pc.Spec +} + +func (pc *ClusterRoleTemplate) SetSpec(s interface{}) { + pc.Spec = s.(ClusterRoleTemplateSpec) +} + +func (pc *ClusterRoleTemplate) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *ClusterRoleTemplate) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc ClusterRoleTemplate) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store ClusterRoleTemplate. +// +k8s:deepcopy-gen=false +type ClusterRoleTemplateRegistry interface { + ListClusterRoleTemplates(ctx context.Context, options *internalversion.ListOptions) (*ClusterRoleTemplateList, error) + GetClusterRoleTemplate(ctx context.Context, id string, options *metav1.GetOptions) (*ClusterRoleTemplate, error) + CreateClusterRoleTemplate(ctx context.Context, id *ClusterRoleTemplate) (*ClusterRoleTemplate, error) + UpdateClusterRoleTemplate(ctx context.Context, id *ClusterRoleTemplate) (*ClusterRoleTemplate, error) + DeleteClusterRoleTemplate(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewClusterRoleTemplateRegistry(sp builders.StandardStorageProvider) ClusterRoleTemplateRegistry { + return &storageClusterRoleTemplate{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageClusterRoleTemplate struct { + builders.StandardStorageProvider +} + +func (s *storageClusterRoleTemplate) ListClusterRoleTemplates(ctx context.Context, options *internalversion.ListOptions) (*ClusterRoleTemplateList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*ClusterRoleTemplateList), err +} + +func (s *storageClusterRoleTemplate) GetClusterRoleTemplate(ctx context.Context, id string, options *metav1.GetOptions) (*ClusterRoleTemplate, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*ClusterRoleTemplate), nil +} + +func (s *storageClusterRoleTemplate) CreateClusterRoleTemplate(ctx context.Context, object *ClusterRoleTemplate) (*ClusterRoleTemplate, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ClusterRoleTemplate), nil +} + +func (s *storageClusterRoleTemplate) UpdateClusterRoleTemplate(ctx context.Context, object *ClusterRoleTemplate) (*ClusterRoleTemplate, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ClusterRoleTemplate), nil +} + +func (s *storageClusterRoleTemplate) DeleteClusterRoleTemplate(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Config Functions and Structs +// +// +k8s:deepcopy-gen=false +type ConfigStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type ConfigStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ConfigList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Config +} + +func (Config) NewStatus() interface{} { + return ConfigStatus{} +} + +func (pc *Config) GetStatus() interface{} { + return pc.Status +} + +func (pc *Config) SetStatus(s interface{}) { + pc.Status = s.(ConfigStatus) +} + +func (pc *Config) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Config) SetSpec(s interface{}) { + pc.Spec = s.(ConfigSpec) +} + +func (pc *Config) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Config) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Config) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Config. +// +k8s:deepcopy-gen=false +type ConfigRegistry interface { + ListConfigs(ctx context.Context, options *internalversion.ListOptions) (*ConfigList, error) + GetConfig(ctx context.Context, id string, options *metav1.GetOptions) (*Config, error) + CreateConfig(ctx context.Context, id *Config) (*Config, error) + UpdateConfig(ctx context.Context, id *Config) (*Config, error) + DeleteConfig(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewConfigRegistry(sp builders.StandardStorageProvider) ConfigRegistry { + return &storageConfig{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageConfig struct { + builders.StandardStorageProvider +} + +func (s *storageConfig) ListConfigs(ctx context.Context, options *internalversion.ListOptions) (*ConfigList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*ConfigList), err +} + +func (s *storageConfig) GetConfig(ctx context.Context, id string, options *metav1.GetOptions) (*Config, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Config), nil +} + +func (s *storageConfig) CreateConfig(ctx context.Context, object *Config) (*Config, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Config), nil +} + +func (s *storageConfig) UpdateConfig(ctx context.Context, object *Config) (*Config, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Config), nil +} + +func (s *storageConfig) DeleteConfig(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// DevPodWorkspaceInstance Functions and Structs +// +// +k8s:deepcopy-gen=false +type DevPodWorkspaceInstanceStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type DevPodWorkspaceInstanceStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceList struct { + metav1.TypeMeta + metav1.ListMeta + Items []DevPodWorkspaceInstance +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceDeleteList struct { + metav1.TypeMeta + metav1.ListMeta + Items []DevPodWorkspaceInstanceDelete +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceGetStatusList struct { + metav1.TypeMeta + metav1.ListMeta + Items []DevPodWorkspaceInstanceGetStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceSshList struct { + metav1.TypeMeta + metav1.ListMeta + Items []DevPodWorkspaceInstanceSsh +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceStopList struct { + metav1.TypeMeta + metav1.ListMeta + Items []DevPodWorkspaceInstanceStop +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceUpList struct { + metav1.TypeMeta + metav1.ListMeta + Items []DevPodWorkspaceInstanceUp +} + +func (DevPodWorkspaceInstance) NewStatus() interface{} { + return DevPodWorkspaceInstanceStatus{} +} + +func (pc *DevPodWorkspaceInstance) GetStatus() interface{} { + return pc.Status +} + +func (pc *DevPodWorkspaceInstance) SetStatus(s interface{}) { + pc.Status = s.(DevPodWorkspaceInstanceStatus) +} + +func (pc *DevPodWorkspaceInstance) GetSpec() interface{} { + return pc.Spec +} + +func (pc *DevPodWorkspaceInstance) SetSpec(s interface{}) { + pc.Spec = s.(DevPodWorkspaceInstanceSpec) +} + +func (pc *DevPodWorkspaceInstance) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *DevPodWorkspaceInstance) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc DevPodWorkspaceInstance) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store DevPodWorkspaceInstance. +// +k8s:deepcopy-gen=false +type DevPodWorkspaceInstanceRegistry interface { + ListDevPodWorkspaceInstances(ctx context.Context, options *internalversion.ListOptions) (*DevPodWorkspaceInstanceList, error) + GetDevPodWorkspaceInstance(ctx context.Context, id string, options *metav1.GetOptions) (*DevPodWorkspaceInstance, error) + CreateDevPodWorkspaceInstance(ctx context.Context, id *DevPodWorkspaceInstance) (*DevPodWorkspaceInstance, error) + UpdateDevPodWorkspaceInstance(ctx context.Context, id *DevPodWorkspaceInstance) (*DevPodWorkspaceInstance, error) + DeleteDevPodWorkspaceInstance(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewDevPodWorkspaceInstanceRegistry(sp builders.StandardStorageProvider) DevPodWorkspaceInstanceRegistry { + return &storageDevPodWorkspaceInstance{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageDevPodWorkspaceInstance struct { + builders.StandardStorageProvider +} + +func (s *storageDevPodWorkspaceInstance) ListDevPodWorkspaceInstances(ctx context.Context, options *internalversion.ListOptions) (*DevPodWorkspaceInstanceList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*DevPodWorkspaceInstanceList), err +} + +func (s *storageDevPodWorkspaceInstance) GetDevPodWorkspaceInstance(ctx context.Context, id string, options *metav1.GetOptions) (*DevPodWorkspaceInstance, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*DevPodWorkspaceInstance), nil +} + +func (s *storageDevPodWorkspaceInstance) CreateDevPodWorkspaceInstance(ctx context.Context, object *DevPodWorkspaceInstance) (*DevPodWorkspaceInstance, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*DevPodWorkspaceInstance), nil +} + +func (s *storageDevPodWorkspaceInstance) UpdateDevPodWorkspaceInstance(ctx context.Context, object *DevPodWorkspaceInstance) (*DevPodWorkspaceInstance, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*DevPodWorkspaceInstance), nil +} + +func (s *storageDevPodWorkspaceInstance) DeleteDevPodWorkspaceInstance(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// DevPodWorkspaceTemplate Functions and Structs +// +// +k8s:deepcopy-gen=false +type DevPodWorkspaceTemplateStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type DevPodWorkspaceTemplateStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceTemplateList struct { + metav1.TypeMeta + metav1.ListMeta + Items []DevPodWorkspaceTemplate +} + +func (DevPodWorkspaceTemplate) NewStatus() interface{} { + return DevPodWorkspaceTemplateStatus{} +} + +func (pc *DevPodWorkspaceTemplate) GetStatus() interface{} { + return pc.Status +} + +func (pc *DevPodWorkspaceTemplate) SetStatus(s interface{}) { + pc.Status = s.(DevPodWorkspaceTemplateStatus) +} + +func (pc *DevPodWorkspaceTemplate) GetSpec() interface{} { + return pc.Spec +} + +func (pc *DevPodWorkspaceTemplate) SetSpec(s interface{}) { + pc.Spec = s.(DevPodWorkspaceTemplateSpec) +} + +func (pc *DevPodWorkspaceTemplate) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *DevPodWorkspaceTemplate) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc DevPodWorkspaceTemplate) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store DevPodWorkspaceTemplate. +// +k8s:deepcopy-gen=false +type DevPodWorkspaceTemplateRegistry interface { + ListDevPodWorkspaceTemplates(ctx context.Context, options *internalversion.ListOptions) (*DevPodWorkspaceTemplateList, error) + GetDevPodWorkspaceTemplate(ctx context.Context, id string, options *metav1.GetOptions) (*DevPodWorkspaceTemplate, error) + CreateDevPodWorkspaceTemplate(ctx context.Context, id *DevPodWorkspaceTemplate) (*DevPodWorkspaceTemplate, error) + UpdateDevPodWorkspaceTemplate(ctx context.Context, id *DevPodWorkspaceTemplate) (*DevPodWorkspaceTemplate, error) + DeleteDevPodWorkspaceTemplate(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewDevPodWorkspaceTemplateRegistry(sp builders.StandardStorageProvider) DevPodWorkspaceTemplateRegistry { + return &storageDevPodWorkspaceTemplate{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageDevPodWorkspaceTemplate struct { + builders.StandardStorageProvider +} + +func (s *storageDevPodWorkspaceTemplate) ListDevPodWorkspaceTemplates(ctx context.Context, options *internalversion.ListOptions) (*DevPodWorkspaceTemplateList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*DevPodWorkspaceTemplateList), err +} + +func (s *storageDevPodWorkspaceTemplate) GetDevPodWorkspaceTemplate(ctx context.Context, id string, options *metav1.GetOptions) (*DevPodWorkspaceTemplate, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*DevPodWorkspaceTemplate), nil +} + +func (s *storageDevPodWorkspaceTemplate) CreateDevPodWorkspaceTemplate(ctx context.Context, object *DevPodWorkspaceTemplate) (*DevPodWorkspaceTemplate, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*DevPodWorkspaceTemplate), nil +} + +func (s *storageDevPodWorkspaceTemplate) UpdateDevPodWorkspaceTemplate(ctx context.Context, object *DevPodWorkspaceTemplate) (*DevPodWorkspaceTemplate, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*DevPodWorkspaceTemplate), nil +} + +func (s *storageDevPodWorkspaceTemplate) DeleteDevPodWorkspaceTemplate(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// DirectClusterEndpointToken Functions and Structs +// +// +k8s:deepcopy-gen=false +type DirectClusterEndpointTokenStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type DirectClusterEndpointTokenStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DirectClusterEndpointTokenList struct { + metav1.TypeMeta + metav1.ListMeta + Items []DirectClusterEndpointToken +} + +func (DirectClusterEndpointToken) NewStatus() interface{} { + return DirectClusterEndpointTokenStatus{} +} + +func (pc *DirectClusterEndpointToken) GetStatus() interface{} { + return pc.Status +} + +func (pc *DirectClusterEndpointToken) SetStatus(s interface{}) { + pc.Status = s.(DirectClusterEndpointTokenStatus) +} + +func (pc *DirectClusterEndpointToken) GetSpec() interface{} { + return pc.Spec +} + +func (pc *DirectClusterEndpointToken) SetSpec(s interface{}) { + pc.Spec = s.(DirectClusterEndpointTokenSpec) +} + +func (pc *DirectClusterEndpointToken) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *DirectClusterEndpointToken) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc DirectClusterEndpointToken) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store DirectClusterEndpointToken. +// +k8s:deepcopy-gen=false +type DirectClusterEndpointTokenRegistry interface { + ListDirectClusterEndpointTokens(ctx context.Context, options *internalversion.ListOptions) (*DirectClusterEndpointTokenList, error) + GetDirectClusterEndpointToken(ctx context.Context, id string, options *metav1.GetOptions) (*DirectClusterEndpointToken, error) + CreateDirectClusterEndpointToken(ctx context.Context, id *DirectClusterEndpointToken) (*DirectClusterEndpointToken, error) + UpdateDirectClusterEndpointToken(ctx context.Context, id *DirectClusterEndpointToken) (*DirectClusterEndpointToken, error) + DeleteDirectClusterEndpointToken(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewDirectClusterEndpointTokenRegistry(sp builders.StandardStorageProvider) DirectClusterEndpointTokenRegistry { + return &storageDirectClusterEndpointToken{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageDirectClusterEndpointToken struct { + builders.StandardStorageProvider +} + +func (s *storageDirectClusterEndpointToken) ListDirectClusterEndpointTokens(ctx context.Context, options *internalversion.ListOptions) (*DirectClusterEndpointTokenList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*DirectClusterEndpointTokenList), err +} + +func (s *storageDirectClusterEndpointToken) GetDirectClusterEndpointToken(ctx context.Context, id string, options *metav1.GetOptions) (*DirectClusterEndpointToken, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*DirectClusterEndpointToken), nil +} + +func (s *storageDirectClusterEndpointToken) CreateDirectClusterEndpointToken(ctx context.Context, object *DirectClusterEndpointToken) (*DirectClusterEndpointToken, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*DirectClusterEndpointToken), nil +} + +func (s *storageDirectClusterEndpointToken) UpdateDirectClusterEndpointToken(ctx context.Context, object *DirectClusterEndpointToken) (*DirectClusterEndpointToken, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*DirectClusterEndpointToken), nil +} + +func (s *storageDirectClusterEndpointToken) DeleteDirectClusterEndpointToken(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Event Functions and Structs +// +// +k8s:deepcopy-gen=false +type EventStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type EventStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type EventList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Event +} + +func (Event) NewStatus() interface{} { + return EventStatus{} +} + +func (pc *Event) GetStatus() interface{} { + return pc.Status +} + +func (pc *Event) SetStatus(s interface{}) { + pc.Status = s.(EventStatus) +} + +func (pc *Event) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Event) SetSpec(s interface{}) { + pc.Spec = s.(EventSpec) +} + +func (pc *Event) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Event) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Event) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Event. +// +k8s:deepcopy-gen=false +type EventRegistry interface { + ListEvents(ctx context.Context, options *internalversion.ListOptions) (*EventList, error) + GetEvent(ctx context.Context, id string, options *metav1.GetOptions) (*Event, error) + CreateEvent(ctx context.Context, id *Event) (*Event, error) + UpdateEvent(ctx context.Context, id *Event) (*Event, error) + DeleteEvent(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewEventRegistry(sp builders.StandardStorageProvider) EventRegistry { + return &storageEvent{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageEvent struct { + builders.StandardStorageProvider +} + +func (s *storageEvent) ListEvents(ctx context.Context, options *internalversion.ListOptions) (*EventList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*EventList), err +} + +func (s *storageEvent) GetEvent(ctx context.Context, id string, options *metav1.GetOptions) (*Event, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Event), nil +} + +func (s *storageEvent) CreateEvent(ctx context.Context, object *Event) (*Event, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Event), nil +} + +func (s *storageEvent) UpdateEvent(ctx context.Context, object *Event) (*Event, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Event), nil +} + +func (s *storageEvent) DeleteEvent(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Feature Functions and Structs +// +// +k8s:deepcopy-gen=false +type FeatureStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type FeatureStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type FeatureList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Feature +} + +func (Feature) NewStatus() interface{} { + return FeatureStatus{} +} + +func (pc *Feature) GetStatus() interface{} { + return pc.Status +} + +func (pc *Feature) SetStatus(s interface{}) { + pc.Status = s.(FeatureStatus) +} + +func (pc *Feature) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Feature) SetSpec(s interface{}) { + pc.Spec = s.(FeatureSpec) +} + +func (pc *Feature) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Feature) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Feature) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Feature. +// +k8s:deepcopy-gen=false +type FeatureRegistry interface { + ListFeatures(ctx context.Context, options *internalversion.ListOptions) (*FeatureList, error) + GetFeature(ctx context.Context, id string, options *metav1.GetOptions) (*Feature, error) + CreateFeature(ctx context.Context, id *Feature) (*Feature, error) + UpdateFeature(ctx context.Context, id *Feature) (*Feature, error) + DeleteFeature(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewFeatureRegistry(sp builders.StandardStorageProvider) FeatureRegistry { + return &storageFeature{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageFeature struct { + builders.StandardStorageProvider +} + +func (s *storageFeature) ListFeatures(ctx context.Context, options *internalversion.ListOptions) (*FeatureList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*FeatureList), err +} + +func (s *storageFeature) GetFeature(ctx context.Context, id string, options *metav1.GetOptions) (*Feature, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Feature), nil +} + +func (s *storageFeature) CreateFeature(ctx context.Context, object *Feature) (*Feature, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Feature), nil +} + +func (s *storageFeature) UpdateFeature(ctx context.Context, object *Feature) (*Feature, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Feature), nil +} + +func (s *storageFeature) DeleteFeature(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// IngressAuthToken Functions and Structs +// +// +k8s:deepcopy-gen=false +type IngressAuthTokenStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type IngressAuthTokenStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type IngressAuthTokenList struct { + metav1.TypeMeta + metav1.ListMeta + Items []IngressAuthToken +} + +func (IngressAuthToken) NewStatus() interface{} { + return IngressAuthTokenStatus{} +} + +func (pc *IngressAuthToken) GetStatus() interface{} { + return pc.Status +} + +func (pc *IngressAuthToken) SetStatus(s interface{}) { + pc.Status = s.(IngressAuthTokenStatus) +} + +func (pc *IngressAuthToken) GetSpec() interface{} { + return pc.Spec +} + +func (pc *IngressAuthToken) SetSpec(s interface{}) { + pc.Spec = s.(IngressAuthTokenSpec) +} + +func (pc *IngressAuthToken) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *IngressAuthToken) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc IngressAuthToken) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store IngressAuthToken. +// +k8s:deepcopy-gen=false +type IngressAuthTokenRegistry interface { + ListIngressAuthTokens(ctx context.Context, options *internalversion.ListOptions) (*IngressAuthTokenList, error) + GetIngressAuthToken(ctx context.Context, id string, options *metav1.GetOptions) (*IngressAuthToken, error) + CreateIngressAuthToken(ctx context.Context, id *IngressAuthToken) (*IngressAuthToken, error) + UpdateIngressAuthToken(ctx context.Context, id *IngressAuthToken) (*IngressAuthToken, error) + DeleteIngressAuthToken(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewIngressAuthTokenRegistry(sp builders.StandardStorageProvider) IngressAuthTokenRegistry { + return &storageIngressAuthToken{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageIngressAuthToken struct { + builders.StandardStorageProvider +} + +func (s *storageIngressAuthToken) ListIngressAuthTokens(ctx context.Context, options *internalversion.ListOptions) (*IngressAuthTokenList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*IngressAuthTokenList), err +} + +func (s *storageIngressAuthToken) GetIngressAuthToken(ctx context.Context, id string, options *metav1.GetOptions) (*IngressAuthToken, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*IngressAuthToken), nil +} + +func (s *storageIngressAuthToken) CreateIngressAuthToken(ctx context.Context, object *IngressAuthToken) (*IngressAuthToken, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*IngressAuthToken), nil +} + +func (s *storageIngressAuthToken) UpdateIngressAuthToken(ctx context.Context, object *IngressAuthToken) (*IngressAuthToken, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*IngressAuthToken), nil +} + +func (s *storageIngressAuthToken) DeleteIngressAuthToken(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Kiosk Functions and Structs +// +// +k8s:deepcopy-gen=false +type KioskStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type KioskStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type KioskList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Kiosk +} + +func (Kiosk) NewStatus() interface{} { + return KioskStatus{} +} + +func (pc *Kiosk) GetStatus() interface{} { + return pc.Status +} + +func (pc *Kiosk) SetStatus(s interface{}) { + pc.Status = s.(KioskStatus) +} + +func (pc *Kiosk) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Kiosk) SetSpec(s interface{}) { + pc.Spec = s.(KioskSpec) +} + +func (pc *Kiosk) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Kiosk) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Kiosk) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Kiosk. +// +k8s:deepcopy-gen=false +type KioskRegistry interface { + ListKiosks(ctx context.Context, options *internalversion.ListOptions) (*KioskList, error) + GetKiosk(ctx context.Context, id string, options *metav1.GetOptions) (*Kiosk, error) + CreateKiosk(ctx context.Context, id *Kiosk) (*Kiosk, error) + UpdateKiosk(ctx context.Context, id *Kiosk) (*Kiosk, error) + DeleteKiosk(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewKioskRegistry(sp builders.StandardStorageProvider) KioskRegistry { + return &storageKiosk{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageKiosk struct { + builders.StandardStorageProvider +} + +func (s *storageKiosk) ListKiosks(ctx context.Context, options *internalversion.ListOptions) (*KioskList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*KioskList), err +} + +func (s *storageKiosk) GetKiosk(ctx context.Context, id string, options *metav1.GetOptions) (*Kiosk, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Kiosk), nil +} + +func (s *storageKiosk) CreateKiosk(ctx context.Context, object *Kiosk) (*Kiosk, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Kiosk), nil +} + +func (s *storageKiosk) UpdateKiosk(ctx context.Context, object *Kiosk) (*Kiosk, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Kiosk), nil +} + +func (s *storageKiosk) DeleteKiosk(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// License Functions and Structs +// +// +k8s:deepcopy-gen=false +type LicenseStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type LicenseStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LicenseList struct { + metav1.TypeMeta + metav1.ListMeta + Items []License +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LicenseRequestList struct { + metav1.TypeMeta + metav1.ListMeta + Items []LicenseRequest +} + +func (License) NewStatus() interface{} { + return LicenseStatus{} +} + +func (pc *License) GetStatus() interface{} { + return pc.Status +} + +func (pc *License) SetStatus(s interface{}) { + pc.Status = s.(LicenseStatus) +} + +func (pc *License) GetSpec() interface{} { + return pc.Spec +} + +func (pc *License) SetSpec(s interface{}) { + pc.Spec = s.(LicenseSpec) +} + +func (pc *License) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *License) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc License) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store License. +// +k8s:deepcopy-gen=false +type LicenseRegistry interface { + ListLicenses(ctx context.Context, options *internalversion.ListOptions) (*LicenseList, error) + GetLicense(ctx context.Context, id string, options *metav1.GetOptions) (*License, error) + CreateLicense(ctx context.Context, id *License) (*License, error) + UpdateLicense(ctx context.Context, id *License) (*License, error) + DeleteLicense(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewLicenseRegistry(sp builders.StandardStorageProvider) LicenseRegistry { + return &storageLicense{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageLicense struct { + builders.StandardStorageProvider +} + +func (s *storageLicense) ListLicenses(ctx context.Context, options *internalversion.ListOptions) (*LicenseList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*LicenseList), err +} + +func (s *storageLicense) GetLicense(ctx context.Context, id string, options *metav1.GetOptions) (*License, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*License), nil +} + +func (s *storageLicense) CreateLicense(ctx context.Context, object *License) (*License, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*License), nil +} + +func (s *storageLicense) UpdateLicense(ctx context.Context, object *License) (*License, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*License), nil +} + +func (s *storageLicense) DeleteLicense(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// LicenseToken Functions and Structs +// +// +k8s:deepcopy-gen=false +type LicenseTokenStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type LicenseTokenStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LicenseTokenList struct { + metav1.TypeMeta + metav1.ListMeta + Items []LicenseToken +} + +func (LicenseToken) NewStatus() interface{} { + return LicenseTokenStatus{} +} + +func (pc *LicenseToken) GetStatus() interface{} { + return pc.Status +} + +func (pc *LicenseToken) SetStatus(s interface{}) { + pc.Status = s.(LicenseTokenStatus) +} + +func (pc *LicenseToken) GetSpec() interface{} { + return pc.Spec +} + +func (pc *LicenseToken) SetSpec(s interface{}) { + pc.Spec = s.(LicenseTokenSpec) +} + +func (pc *LicenseToken) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *LicenseToken) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc LicenseToken) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store LicenseToken. +// +k8s:deepcopy-gen=false +type LicenseTokenRegistry interface { + ListLicenseTokens(ctx context.Context, options *internalversion.ListOptions) (*LicenseTokenList, error) + GetLicenseToken(ctx context.Context, id string, options *metav1.GetOptions) (*LicenseToken, error) + CreateLicenseToken(ctx context.Context, id *LicenseToken) (*LicenseToken, error) + UpdateLicenseToken(ctx context.Context, id *LicenseToken) (*LicenseToken, error) + DeleteLicenseToken(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewLicenseTokenRegistry(sp builders.StandardStorageProvider) LicenseTokenRegistry { + return &storageLicenseToken{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageLicenseToken struct { + builders.StandardStorageProvider +} + +func (s *storageLicenseToken) ListLicenseTokens(ctx context.Context, options *internalversion.ListOptions) (*LicenseTokenList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*LicenseTokenList), err +} + +func (s *storageLicenseToken) GetLicenseToken(ctx context.Context, id string, options *metav1.GetOptions) (*LicenseToken, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*LicenseToken), nil +} + +func (s *storageLicenseToken) CreateLicenseToken(ctx context.Context, object *LicenseToken) (*LicenseToken, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*LicenseToken), nil +} + +func (s *storageLicenseToken) UpdateLicenseToken(ctx context.Context, object *LicenseToken) (*LicenseToken, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*LicenseToken), nil +} + +func (s *storageLicenseToken) DeleteLicenseToken(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// LoftUpgrade Functions and Structs +// +// +k8s:deepcopy-gen=false +type LoftUpgradeStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type LoftUpgradeStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type LoftUpgradeList struct { + metav1.TypeMeta + metav1.ListMeta + Items []LoftUpgrade +} + +func (LoftUpgrade) NewStatus() interface{} { + return LoftUpgradeStatus{} +} + +func (pc *LoftUpgrade) GetStatus() interface{} { + return pc.Status +} + +func (pc *LoftUpgrade) SetStatus(s interface{}) { + pc.Status = s.(LoftUpgradeStatus) +} + +func (pc *LoftUpgrade) GetSpec() interface{} { + return pc.Spec +} + +func (pc *LoftUpgrade) SetSpec(s interface{}) { + pc.Spec = s.(LoftUpgradeSpec) +} + +func (pc *LoftUpgrade) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *LoftUpgrade) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc LoftUpgrade) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store LoftUpgrade. +// +k8s:deepcopy-gen=false +type LoftUpgradeRegistry interface { + ListLoftUpgrades(ctx context.Context, options *internalversion.ListOptions) (*LoftUpgradeList, error) + GetLoftUpgrade(ctx context.Context, id string, options *metav1.GetOptions) (*LoftUpgrade, error) + CreateLoftUpgrade(ctx context.Context, id *LoftUpgrade) (*LoftUpgrade, error) + UpdateLoftUpgrade(ctx context.Context, id *LoftUpgrade) (*LoftUpgrade, error) + DeleteLoftUpgrade(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewLoftUpgradeRegistry(sp builders.StandardStorageProvider) LoftUpgradeRegistry { + return &storageLoftUpgrade{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageLoftUpgrade struct { + builders.StandardStorageProvider +} + +func (s *storageLoftUpgrade) ListLoftUpgrades(ctx context.Context, options *internalversion.ListOptions) (*LoftUpgradeList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*LoftUpgradeList), err +} + +func (s *storageLoftUpgrade) GetLoftUpgrade(ctx context.Context, id string, options *metav1.GetOptions) (*LoftUpgrade, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*LoftUpgrade), nil +} + +func (s *storageLoftUpgrade) CreateLoftUpgrade(ctx context.Context, object *LoftUpgrade) (*LoftUpgrade, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*LoftUpgrade), nil +} + +func (s *storageLoftUpgrade) UpdateLoftUpgrade(ctx context.Context, object *LoftUpgrade) (*LoftUpgrade, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*LoftUpgrade), nil +} + +func (s *storageLoftUpgrade) DeleteLoftUpgrade(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// OwnedAccessKey Functions and Structs +// +// +k8s:deepcopy-gen=false +type OwnedAccessKeyStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type OwnedAccessKeyStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type OwnedAccessKeyList struct { + metav1.TypeMeta + metav1.ListMeta + Items []OwnedAccessKey +} + +func (OwnedAccessKey) NewStatus() interface{} { + return OwnedAccessKeyStatus{} +} + +func (pc *OwnedAccessKey) GetStatus() interface{} { + return pc.Status +} + +func (pc *OwnedAccessKey) SetStatus(s interface{}) { + pc.Status = s.(OwnedAccessKeyStatus) +} + +func (pc *OwnedAccessKey) GetSpec() interface{} { + return pc.Spec +} + +func (pc *OwnedAccessKey) SetSpec(s interface{}) { + pc.Spec = s.(OwnedAccessKeySpec) +} + +func (pc *OwnedAccessKey) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *OwnedAccessKey) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc OwnedAccessKey) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store OwnedAccessKey. +// +k8s:deepcopy-gen=false +type OwnedAccessKeyRegistry interface { + ListOwnedAccessKeys(ctx context.Context, options *internalversion.ListOptions) (*OwnedAccessKeyList, error) + GetOwnedAccessKey(ctx context.Context, id string, options *metav1.GetOptions) (*OwnedAccessKey, error) + CreateOwnedAccessKey(ctx context.Context, id *OwnedAccessKey) (*OwnedAccessKey, error) + UpdateOwnedAccessKey(ctx context.Context, id *OwnedAccessKey) (*OwnedAccessKey, error) + DeleteOwnedAccessKey(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewOwnedAccessKeyRegistry(sp builders.StandardStorageProvider) OwnedAccessKeyRegistry { + return &storageOwnedAccessKey{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageOwnedAccessKey struct { + builders.StandardStorageProvider +} + +func (s *storageOwnedAccessKey) ListOwnedAccessKeys(ctx context.Context, options *internalversion.ListOptions) (*OwnedAccessKeyList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*OwnedAccessKeyList), err +} + +func (s *storageOwnedAccessKey) GetOwnedAccessKey(ctx context.Context, id string, options *metav1.GetOptions) (*OwnedAccessKey, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*OwnedAccessKey), nil +} + +func (s *storageOwnedAccessKey) CreateOwnedAccessKey(ctx context.Context, object *OwnedAccessKey) (*OwnedAccessKey, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*OwnedAccessKey), nil +} + +func (s *storageOwnedAccessKey) UpdateOwnedAccessKey(ctx context.Context, object *OwnedAccessKey) (*OwnedAccessKey, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*OwnedAccessKey), nil +} + +func (s *storageOwnedAccessKey) DeleteOwnedAccessKey(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// PolicyViolation Functions and Structs +// +// +k8s:deepcopy-gen=false +type PolicyViolationStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type PolicyViolationStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type PolicyViolationList struct { + metav1.TypeMeta + metav1.ListMeta + Items []PolicyViolation +} + +func (PolicyViolation) NewStatus() interface{} { + return PolicyViolationStatus{} +} + +func (pc *PolicyViolation) GetStatus() interface{} { + return pc.Status +} + +func (pc *PolicyViolation) SetStatus(s interface{}) { + pc.Status = s.(PolicyViolationStatus) +} + +func (pc *PolicyViolation) GetSpec() interface{} { + return pc.Spec +} + +func (pc *PolicyViolation) SetSpec(s interface{}) { + pc.Spec = s.(PolicyViolationSpec) +} + +func (pc *PolicyViolation) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *PolicyViolation) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc PolicyViolation) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store PolicyViolation. +// +k8s:deepcopy-gen=false +type PolicyViolationRegistry interface { + ListPolicyViolations(ctx context.Context, options *internalversion.ListOptions) (*PolicyViolationList, error) + GetPolicyViolation(ctx context.Context, id string, options *metav1.GetOptions) (*PolicyViolation, error) + CreatePolicyViolation(ctx context.Context, id *PolicyViolation) (*PolicyViolation, error) + UpdatePolicyViolation(ctx context.Context, id *PolicyViolation) (*PolicyViolation, error) + DeletePolicyViolation(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewPolicyViolationRegistry(sp builders.StandardStorageProvider) PolicyViolationRegistry { + return &storagePolicyViolation{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storagePolicyViolation struct { + builders.StandardStorageProvider +} + +func (s *storagePolicyViolation) ListPolicyViolations(ctx context.Context, options *internalversion.ListOptions) (*PolicyViolationList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*PolicyViolationList), err +} + +func (s *storagePolicyViolation) GetPolicyViolation(ctx context.Context, id string, options *metav1.GetOptions) (*PolicyViolation, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*PolicyViolation), nil +} + +func (s *storagePolicyViolation) CreatePolicyViolation(ctx context.Context, object *PolicyViolation) (*PolicyViolation, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*PolicyViolation), nil +} + +func (s *storagePolicyViolation) UpdatePolicyViolation(ctx context.Context, object *PolicyViolation) (*PolicyViolation, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*PolicyViolation), nil +} + +func (s *storagePolicyViolation) DeletePolicyViolation(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Project Functions and Structs +// +// +k8s:deepcopy-gen=false +type ProjectStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type ProjectStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Project +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectChartInfoList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ProjectChartInfo +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectChartsList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ProjectCharts +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectClustersList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ProjectClusters +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectImportSpaceList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ProjectImportSpace +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectImportVirtualClusterList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ProjectImportVirtualCluster +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectMembersList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ProjectMembers +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectMigrateSpaceInstanceList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ProjectMigrateSpaceInstance +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectMigrateVirtualClusterInstanceList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ProjectMigrateVirtualClusterInstance +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectTemplatesList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ProjectTemplates +} + +func (Project) NewStatus() interface{} { + return ProjectStatus{} +} + +func (pc *Project) GetStatus() interface{} { + return pc.Status +} + +func (pc *Project) SetStatus(s interface{}) { + pc.Status = s.(ProjectStatus) +} + +func (pc *Project) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Project) SetSpec(s interface{}) { + pc.Spec = s.(ProjectSpec) +} + +func (pc *Project) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Project) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Project) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Project. +// +k8s:deepcopy-gen=false +type ProjectRegistry interface { + ListProjects(ctx context.Context, options *internalversion.ListOptions) (*ProjectList, error) + GetProject(ctx context.Context, id string, options *metav1.GetOptions) (*Project, error) + CreateProject(ctx context.Context, id *Project) (*Project, error) + UpdateProject(ctx context.Context, id *Project) (*Project, error) + DeleteProject(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewProjectRegistry(sp builders.StandardStorageProvider) ProjectRegistry { + return &storageProject{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageProject struct { + builders.StandardStorageProvider +} + +func (s *storageProject) ListProjects(ctx context.Context, options *internalversion.ListOptions) (*ProjectList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*ProjectList), err +} + +func (s *storageProject) GetProject(ctx context.Context, id string, options *metav1.GetOptions) (*Project, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Project), nil +} + +func (s *storageProject) CreateProject(ctx context.Context, object *Project) (*Project, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Project), nil +} + +func (s *storageProject) UpdateProject(ctx context.Context, object *Project) (*Project, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Project), nil +} + +func (s *storageProject) DeleteProject(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// ProjectSecret Functions and Structs +// +// +k8s:deepcopy-gen=false +type ProjectSecretStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type ProjectSecretStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectSecretList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ProjectSecret +} + +func (ProjectSecret) NewStatus() interface{} { + return ProjectSecretStatus{} +} + +func (pc *ProjectSecret) GetStatus() interface{} { + return pc.Status +} + +func (pc *ProjectSecret) SetStatus(s interface{}) { + pc.Status = s.(ProjectSecretStatus) +} + +func (pc *ProjectSecret) GetSpec() interface{} { + return pc.Spec +} + +func (pc *ProjectSecret) SetSpec(s interface{}) { + pc.Spec = s.(ProjectSecretSpec) +} + +func (pc *ProjectSecret) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *ProjectSecret) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc ProjectSecret) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store ProjectSecret. +// +k8s:deepcopy-gen=false +type ProjectSecretRegistry interface { + ListProjectSecrets(ctx context.Context, options *internalversion.ListOptions) (*ProjectSecretList, error) + GetProjectSecret(ctx context.Context, id string, options *metav1.GetOptions) (*ProjectSecret, error) + CreateProjectSecret(ctx context.Context, id *ProjectSecret) (*ProjectSecret, error) + UpdateProjectSecret(ctx context.Context, id *ProjectSecret) (*ProjectSecret, error) + DeleteProjectSecret(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewProjectSecretRegistry(sp builders.StandardStorageProvider) ProjectSecretRegistry { + return &storageProjectSecret{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageProjectSecret struct { + builders.StandardStorageProvider +} + +func (s *storageProjectSecret) ListProjectSecrets(ctx context.Context, options *internalversion.ListOptions) (*ProjectSecretList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*ProjectSecretList), err +} + +func (s *storageProjectSecret) GetProjectSecret(ctx context.Context, id string, options *metav1.GetOptions) (*ProjectSecret, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*ProjectSecret), nil +} + +func (s *storageProjectSecret) CreateProjectSecret(ctx context.Context, object *ProjectSecret) (*ProjectSecret, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ProjectSecret), nil +} + +func (s *storageProjectSecret) UpdateProjectSecret(ctx context.Context, object *ProjectSecret) (*ProjectSecret, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ProjectSecret), nil +} + +func (s *storageProjectSecret) DeleteProjectSecret(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// RedirectToken Functions and Structs +// +// +k8s:deepcopy-gen=false +type RedirectTokenStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type RedirectTokenStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RedirectTokenList struct { + metav1.TypeMeta + metav1.ListMeta + Items []RedirectToken +} + +func (RedirectToken) NewStatus() interface{} { + return RedirectTokenStatus{} +} + +func (pc *RedirectToken) GetStatus() interface{} { + return pc.Status +} + +func (pc *RedirectToken) SetStatus(s interface{}) { + pc.Status = s.(RedirectTokenStatus) +} + +func (pc *RedirectToken) GetSpec() interface{} { + return pc.Spec +} + +func (pc *RedirectToken) SetSpec(s interface{}) { + pc.Spec = s.(RedirectTokenSpec) +} + +func (pc *RedirectToken) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *RedirectToken) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc RedirectToken) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store RedirectToken. +// +k8s:deepcopy-gen=false +type RedirectTokenRegistry interface { + ListRedirectTokens(ctx context.Context, options *internalversion.ListOptions) (*RedirectTokenList, error) + GetRedirectToken(ctx context.Context, id string, options *metav1.GetOptions) (*RedirectToken, error) + CreateRedirectToken(ctx context.Context, id *RedirectToken) (*RedirectToken, error) + UpdateRedirectToken(ctx context.Context, id *RedirectToken) (*RedirectToken, error) + DeleteRedirectToken(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewRedirectTokenRegistry(sp builders.StandardStorageProvider) RedirectTokenRegistry { + return &storageRedirectToken{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageRedirectToken struct { + builders.StandardStorageProvider +} + +func (s *storageRedirectToken) ListRedirectTokens(ctx context.Context, options *internalversion.ListOptions) (*RedirectTokenList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*RedirectTokenList), err +} + +func (s *storageRedirectToken) GetRedirectToken(ctx context.Context, id string, options *metav1.GetOptions) (*RedirectToken, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*RedirectToken), nil +} + +func (s *storageRedirectToken) CreateRedirectToken(ctx context.Context, object *RedirectToken) (*RedirectToken, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*RedirectToken), nil +} + +func (s *storageRedirectToken) UpdateRedirectToken(ctx context.Context, object *RedirectToken) (*RedirectToken, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*RedirectToken), nil +} + +func (s *storageRedirectToken) DeleteRedirectToken(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// ResetAccessKey Functions and Structs +// +// +k8s:deepcopy-gen=false +type ResetAccessKeyStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type ResetAccessKeyStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ResetAccessKeyList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ResetAccessKey +} + +func (ResetAccessKey) NewStatus() interface{} { + return ResetAccessKeyStatus{} +} + +func (pc *ResetAccessKey) GetStatus() interface{} { + return pc.Status +} + +func (pc *ResetAccessKey) SetStatus(s interface{}) { + pc.Status = s.(ResetAccessKeyStatus) +} + +func (pc *ResetAccessKey) GetSpec() interface{} { + return pc.Spec +} + +func (pc *ResetAccessKey) SetSpec(s interface{}) { + pc.Spec = s.(ResetAccessKeySpec) +} + +func (pc *ResetAccessKey) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *ResetAccessKey) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc ResetAccessKey) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store ResetAccessKey. +// +k8s:deepcopy-gen=false +type ResetAccessKeyRegistry interface { + ListResetAccessKeys(ctx context.Context, options *internalversion.ListOptions) (*ResetAccessKeyList, error) + GetResetAccessKey(ctx context.Context, id string, options *metav1.GetOptions) (*ResetAccessKey, error) + CreateResetAccessKey(ctx context.Context, id *ResetAccessKey) (*ResetAccessKey, error) + UpdateResetAccessKey(ctx context.Context, id *ResetAccessKey) (*ResetAccessKey, error) + DeleteResetAccessKey(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewResetAccessKeyRegistry(sp builders.StandardStorageProvider) ResetAccessKeyRegistry { + return &storageResetAccessKey{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageResetAccessKey struct { + builders.StandardStorageProvider +} + +func (s *storageResetAccessKey) ListResetAccessKeys(ctx context.Context, options *internalversion.ListOptions) (*ResetAccessKeyList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*ResetAccessKeyList), err +} + +func (s *storageResetAccessKey) GetResetAccessKey(ctx context.Context, id string, options *metav1.GetOptions) (*ResetAccessKey, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*ResetAccessKey), nil +} + +func (s *storageResetAccessKey) CreateResetAccessKey(ctx context.Context, object *ResetAccessKey) (*ResetAccessKey, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ResetAccessKey), nil +} + +func (s *storageResetAccessKey) UpdateResetAccessKey(ctx context.Context, object *ResetAccessKey) (*ResetAccessKey, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*ResetAccessKey), nil +} + +func (s *storageResetAccessKey) DeleteResetAccessKey(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Runner Functions and Structs +// +// +k8s:deepcopy-gen=false +type RunnerStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type RunnerStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RunnerList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Runner +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RunnerAccessKeyList struct { + metav1.TypeMeta + metav1.ListMeta + Items []RunnerAccessKey +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type RunnerConfigList struct { + metav1.TypeMeta + metav1.ListMeta + Items []RunnerConfig +} + +func (Runner) NewStatus() interface{} { + return RunnerStatus{} +} + +func (pc *Runner) GetStatus() interface{} { + return pc.Status +} + +func (pc *Runner) SetStatus(s interface{}) { + pc.Status = s.(RunnerStatus) +} + +func (pc *Runner) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Runner) SetSpec(s interface{}) { + pc.Spec = s.(RunnerSpec) +} + +func (pc *Runner) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Runner) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Runner) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Runner. +// +k8s:deepcopy-gen=false +type RunnerRegistry interface { + ListRunners(ctx context.Context, options *internalversion.ListOptions) (*RunnerList, error) + GetRunner(ctx context.Context, id string, options *metav1.GetOptions) (*Runner, error) + CreateRunner(ctx context.Context, id *Runner) (*Runner, error) + UpdateRunner(ctx context.Context, id *Runner) (*Runner, error) + DeleteRunner(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewRunnerRegistry(sp builders.StandardStorageProvider) RunnerRegistry { + return &storageRunner{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageRunner struct { + builders.StandardStorageProvider +} + +func (s *storageRunner) ListRunners(ctx context.Context, options *internalversion.ListOptions) (*RunnerList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*RunnerList), err +} + +func (s *storageRunner) GetRunner(ctx context.Context, id string, options *metav1.GetOptions) (*Runner, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Runner), nil +} + +func (s *storageRunner) CreateRunner(ctx context.Context, object *Runner) (*Runner, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Runner), nil +} + +func (s *storageRunner) UpdateRunner(ctx context.Context, object *Runner) (*Runner, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Runner), nil +} + +func (s *storageRunner) DeleteRunner(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Self Functions and Structs +// +// +k8s:deepcopy-gen=false +type SelfStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type SelfStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SelfList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Self +} + +func (Self) NewStatus() interface{} { + return SelfStatus{} +} + +func (pc *Self) GetStatus() interface{} { + return pc.Status +} + +func (pc *Self) SetStatus(s interface{}) { + pc.Status = s.(SelfStatus) +} + +func (pc *Self) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Self) SetSpec(s interface{}) { + pc.Spec = s.(SelfSpec) +} + +func (pc *Self) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Self) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Self) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Self. +// +k8s:deepcopy-gen=false +type SelfRegistry interface { + ListSelfs(ctx context.Context, options *internalversion.ListOptions) (*SelfList, error) + GetSelf(ctx context.Context, id string, options *metav1.GetOptions) (*Self, error) + CreateSelf(ctx context.Context, id *Self) (*Self, error) + UpdateSelf(ctx context.Context, id *Self) (*Self, error) + DeleteSelf(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewSelfRegistry(sp builders.StandardStorageProvider) SelfRegistry { + return &storageSelf{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageSelf struct { + builders.StandardStorageProvider +} + +func (s *storageSelf) ListSelfs(ctx context.Context, options *internalversion.ListOptions) (*SelfList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*SelfList), err +} + +func (s *storageSelf) GetSelf(ctx context.Context, id string, options *metav1.GetOptions) (*Self, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Self), nil +} + +func (s *storageSelf) CreateSelf(ctx context.Context, object *Self) (*Self, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Self), nil +} + +func (s *storageSelf) UpdateSelf(ctx context.Context, object *Self) (*Self, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Self), nil +} + +func (s *storageSelf) DeleteSelf(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// SelfSubjectAccessReview Functions and Structs +// +// +k8s:deepcopy-gen=false +type SelfSubjectAccessReviewStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type SelfSubjectAccessReviewStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SelfSubjectAccessReviewList struct { + metav1.TypeMeta + metav1.ListMeta + Items []SelfSubjectAccessReview +} + +func (SelfSubjectAccessReview) NewStatus() interface{} { + return SelfSubjectAccessReviewStatus{} +} + +func (pc *SelfSubjectAccessReview) GetStatus() interface{} { + return pc.Status +} + +func (pc *SelfSubjectAccessReview) SetStatus(s interface{}) { + pc.Status = s.(SelfSubjectAccessReviewStatus) +} + +func (pc *SelfSubjectAccessReview) GetSpec() interface{} { + return pc.Spec +} + +func (pc *SelfSubjectAccessReview) SetSpec(s interface{}) { + pc.Spec = s.(SelfSubjectAccessReviewSpec) +} + +func (pc *SelfSubjectAccessReview) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *SelfSubjectAccessReview) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc SelfSubjectAccessReview) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store SelfSubjectAccessReview. +// +k8s:deepcopy-gen=false +type SelfSubjectAccessReviewRegistry interface { + ListSelfSubjectAccessReviews(ctx context.Context, options *internalversion.ListOptions) (*SelfSubjectAccessReviewList, error) + GetSelfSubjectAccessReview(ctx context.Context, id string, options *metav1.GetOptions) (*SelfSubjectAccessReview, error) + CreateSelfSubjectAccessReview(ctx context.Context, id *SelfSubjectAccessReview) (*SelfSubjectAccessReview, error) + UpdateSelfSubjectAccessReview(ctx context.Context, id *SelfSubjectAccessReview) (*SelfSubjectAccessReview, error) + DeleteSelfSubjectAccessReview(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewSelfSubjectAccessReviewRegistry(sp builders.StandardStorageProvider) SelfSubjectAccessReviewRegistry { + return &storageSelfSubjectAccessReview{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageSelfSubjectAccessReview struct { + builders.StandardStorageProvider +} + +func (s *storageSelfSubjectAccessReview) ListSelfSubjectAccessReviews(ctx context.Context, options *internalversion.ListOptions) (*SelfSubjectAccessReviewList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*SelfSubjectAccessReviewList), err +} + +func (s *storageSelfSubjectAccessReview) GetSelfSubjectAccessReview(ctx context.Context, id string, options *metav1.GetOptions) (*SelfSubjectAccessReview, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*SelfSubjectAccessReview), nil +} + +func (s *storageSelfSubjectAccessReview) CreateSelfSubjectAccessReview(ctx context.Context, object *SelfSubjectAccessReview) (*SelfSubjectAccessReview, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SelfSubjectAccessReview), nil +} + +func (s *storageSelfSubjectAccessReview) UpdateSelfSubjectAccessReview(ctx context.Context, object *SelfSubjectAccessReview) (*SelfSubjectAccessReview, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SelfSubjectAccessReview), nil +} + +func (s *storageSelfSubjectAccessReview) DeleteSelfSubjectAccessReview(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// SharedSecret Functions and Structs +// +// +k8s:deepcopy-gen=false +type SharedSecretStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type SharedSecretStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SharedSecretList struct { + metav1.TypeMeta + metav1.ListMeta + Items []SharedSecret +} + +func (SharedSecret) NewStatus() interface{} { + return SharedSecretStatus{} +} + +func (pc *SharedSecret) GetStatus() interface{} { + return pc.Status +} + +func (pc *SharedSecret) SetStatus(s interface{}) { + pc.Status = s.(SharedSecretStatus) +} + +func (pc *SharedSecret) GetSpec() interface{} { + return pc.Spec +} + +func (pc *SharedSecret) SetSpec(s interface{}) { + pc.Spec = s.(SharedSecretSpec) +} + +func (pc *SharedSecret) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *SharedSecret) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc SharedSecret) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store SharedSecret. +// +k8s:deepcopy-gen=false +type SharedSecretRegistry interface { + ListSharedSecrets(ctx context.Context, options *internalversion.ListOptions) (*SharedSecretList, error) + GetSharedSecret(ctx context.Context, id string, options *metav1.GetOptions) (*SharedSecret, error) + CreateSharedSecret(ctx context.Context, id *SharedSecret) (*SharedSecret, error) + UpdateSharedSecret(ctx context.Context, id *SharedSecret) (*SharedSecret, error) + DeleteSharedSecret(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewSharedSecretRegistry(sp builders.StandardStorageProvider) SharedSecretRegistry { + return &storageSharedSecret{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageSharedSecret struct { + builders.StandardStorageProvider +} + +func (s *storageSharedSecret) ListSharedSecrets(ctx context.Context, options *internalversion.ListOptions) (*SharedSecretList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*SharedSecretList), err +} + +func (s *storageSharedSecret) GetSharedSecret(ctx context.Context, id string, options *metav1.GetOptions) (*SharedSecret, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*SharedSecret), nil +} + +func (s *storageSharedSecret) CreateSharedSecret(ctx context.Context, object *SharedSecret) (*SharedSecret, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SharedSecret), nil +} + +func (s *storageSharedSecret) UpdateSharedSecret(ctx context.Context, object *SharedSecret) (*SharedSecret, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SharedSecret), nil +} + +func (s *storageSharedSecret) DeleteSharedSecret(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// SpaceConstraint Functions and Structs +// +// +k8s:deepcopy-gen=false +type SpaceConstraintStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type SpaceConstraintStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceConstraintList struct { + metav1.TypeMeta + metav1.ListMeta + Items []SpaceConstraint +} + +func (SpaceConstraint) NewStatus() interface{} { + return SpaceConstraintStatus{} +} + +func (pc *SpaceConstraint) GetStatus() interface{} { + return pc.Status +} + +func (pc *SpaceConstraint) SetStatus(s interface{}) { + pc.Status = s.(SpaceConstraintStatus) +} + +func (pc *SpaceConstraint) GetSpec() interface{} { + return pc.Spec +} + +func (pc *SpaceConstraint) SetSpec(s interface{}) { + pc.Spec = s.(SpaceConstraintSpec) +} + +func (pc *SpaceConstraint) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *SpaceConstraint) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc SpaceConstraint) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store SpaceConstraint. +// +k8s:deepcopy-gen=false +type SpaceConstraintRegistry interface { + ListSpaceConstraints(ctx context.Context, options *internalversion.ListOptions) (*SpaceConstraintList, error) + GetSpaceConstraint(ctx context.Context, id string, options *metav1.GetOptions) (*SpaceConstraint, error) + CreateSpaceConstraint(ctx context.Context, id *SpaceConstraint) (*SpaceConstraint, error) + UpdateSpaceConstraint(ctx context.Context, id *SpaceConstraint) (*SpaceConstraint, error) + DeleteSpaceConstraint(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewSpaceConstraintRegistry(sp builders.StandardStorageProvider) SpaceConstraintRegistry { + return &storageSpaceConstraint{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageSpaceConstraint struct { + builders.StandardStorageProvider +} + +func (s *storageSpaceConstraint) ListSpaceConstraints(ctx context.Context, options *internalversion.ListOptions) (*SpaceConstraintList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*SpaceConstraintList), err +} + +func (s *storageSpaceConstraint) GetSpaceConstraint(ctx context.Context, id string, options *metav1.GetOptions) (*SpaceConstraint, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*SpaceConstraint), nil +} + +func (s *storageSpaceConstraint) CreateSpaceConstraint(ctx context.Context, object *SpaceConstraint) (*SpaceConstraint, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SpaceConstraint), nil +} + +func (s *storageSpaceConstraint) UpdateSpaceConstraint(ctx context.Context, object *SpaceConstraint) (*SpaceConstraint, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SpaceConstraint), nil +} + +func (s *storageSpaceConstraint) DeleteSpaceConstraint(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// SpaceInstance Functions and Structs +// +// +k8s:deepcopy-gen=false +type SpaceInstanceStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type SpaceInstanceStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceInstanceList struct { + metav1.TypeMeta + metav1.ListMeta + Items []SpaceInstance +} + +func (SpaceInstance) NewStatus() interface{} { + return SpaceInstanceStatus{} +} + +func (pc *SpaceInstance) GetStatus() interface{} { + return pc.Status +} + +func (pc *SpaceInstance) SetStatus(s interface{}) { + pc.Status = s.(SpaceInstanceStatus) +} + +func (pc *SpaceInstance) GetSpec() interface{} { + return pc.Spec +} + +func (pc *SpaceInstance) SetSpec(s interface{}) { + pc.Spec = s.(SpaceInstanceSpec) +} + +func (pc *SpaceInstance) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *SpaceInstance) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc SpaceInstance) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store SpaceInstance. +// +k8s:deepcopy-gen=false +type SpaceInstanceRegistry interface { + ListSpaceInstances(ctx context.Context, options *internalversion.ListOptions) (*SpaceInstanceList, error) + GetSpaceInstance(ctx context.Context, id string, options *metav1.GetOptions) (*SpaceInstance, error) + CreateSpaceInstance(ctx context.Context, id *SpaceInstance) (*SpaceInstance, error) + UpdateSpaceInstance(ctx context.Context, id *SpaceInstance) (*SpaceInstance, error) + DeleteSpaceInstance(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewSpaceInstanceRegistry(sp builders.StandardStorageProvider) SpaceInstanceRegistry { + return &storageSpaceInstance{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageSpaceInstance struct { + builders.StandardStorageProvider +} + +func (s *storageSpaceInstance) ListSpaceInstances(ctx context.Context, options *internalversion.ListOptions) (*SpaceInstanceList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*SpaceInstanceList), err +} + +func (s *storageSpaceInstance) GetSpaceInstance(ctx context.Context, id string, options *metav1.GetOptions) (*SpaceInstance, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*SpaceInstance), nil +} + +func (s *storageSpaceInstance) CreateSpaceInstance(ctx context.Context, object *SpaceInstance) (*SpaceInstance, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SpaceInstance), nil +} + +func (s *storageSpaceInstance) UpdateSpaceInstance(ctx context.Context, object *SpaceInstance) (*SpaceInstance, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SpaceInstance), nil +} + +func (s *storageSpaceInstance) DeleteSpaceInstance(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// SpaceTemplate Functions and Structs +// +// +k8s:deepcopy-gen=false +type SpaceTemplateStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type SpaceTemplateStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SpaceTemplateList struct { + metav1.TypeMeta + metav1.ListMeta + Items []SpaceTemplate +} + +func (SpaceTemplate) NewStatus() interface{} { + return SpaceTemplateStatus{} +} + +func (pc *SpaceTemplate) GetStatus() interface{} { + return pc.Status +} + +func (pc *SpaceTemplate) SetStatus(s interface{}) { + pc.Status = s.(SpaceTemplateStatus) +} + +func (pc *SpaceTemplate) GetSpec() interface{} { + return pc.Spec +} + +func (pc *SpaceTemplate) SetSpec(s interface{}) { + pc.Spec = s.(SpaceTemplateSpec) +} + +func (pc *SpaceTemplate) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *SpaceTemplate) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc SpaceTemplate) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store SpaceTemplate. +// +k8s:deepcopy-gen=false +type SpaceTemplateRegistry interface { + ListSpaceTemplates(ctx context.Context, options *internalversion.ListOptions) (*SpaceTemplateList, error) + GetSpaceTemplate(ctx context.Context, id string, options *metav1.GetOptions) (*SpaceTemplate, error) + CreateSpaceTemplate(ctx context.Context, id *SpaceTemplate) (*SpaceTemplate, error) + UpdateSpaceTemplate(ctx context.Context, id *SpaceTemplate) (*SpaceTemplate, error) + DeleteSpaceTemplate(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewSpaceTemplateRegistry(sp builders.StandardStorageProvider) SpaceTemplateRegistry { + return &storageSpaceTemplate{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageSpaceTemplate struct { + builders.StandardStorageProvider +} + +func (s *storageSpaceTemplate) ListSpaceTemplates(ctx context.Context, options *internalversion.ListOptions) (*SpaceTemplateList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*SpaceTemplateList), err +} + +func (s *storageSpaceTemplate) GetSpaceTemplate(ctx context.Context, id string, options *metav1.GetOptions) (*SpaceTemplate, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*SpaceTemplate), nil +} + +func (s *storageSpaceTemplate) CreateSpaceTemplate(ctx context.Context, object *SpaceTemplate) (*SpaceTemplate, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SpaceTemplate), nil +} + +func (s *storageSpaceTemplate) UpdateSpaceTemplate(ctx context.Context, object *SpaceTemplate) (*SpaceTemplate, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SpaceTemplate), nil +} + +func (s *storageSpaceTemplate) DeleteSpaceTemplate(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// SubjectAccessReview Functions and Structs +// +// +k8s:deepcopy-gen=false +type SubjectAccessReviewStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type SubjectAccessReviewStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SubjectAccessReviewList struct { + metav1.TypeMeta + metav1.ListMeta + Items []SubjectAccessReview +} + +func (SubjectAccessReview) NewStatus() interface{} { + return SubjectAccessReviewStatus{} +} + +func (pc *SubjectAccessReview) GetStatus() interface{} { + return pc.Status +} + +func (pc *SubjectAccessReview) SetStatus(s interface{}) { + pc.Status = s.(SubjectAccessReviewStatus) +} + +func (pc *SubjectAccessReview) GetSpec() interface{} { + return pc.Spec +} + +func (pc *SubjectAccessReview) SetSpec(s interface{}) { + pc.Spec = s.(SubjectAccessReviewSpec) +} + +func (pc *SubjectAccessReview) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *SubjectAccessReview) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc SubjectAccessReview) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store SubjectAccessReview. +// +k8s:deepcopy-gen=false +type SubjectAccessReviewRegistry interface { + ListSubjectAccessReviews(ctx context.Context, options *internalversion.ListOptions) (*SubjectAccessReviewList, error) + GetSubjectAccessReview(ctx context.Context, id string, options *metav1.GetOptions) (*SubjectAccessReview, error) + CreateSubjectAccessReview(ctx context.Context, id *SubjectAccessReview) (*SubjectAccessReview, error) + UpdateSubjectAccessReview(ctx context.Context, id *SubjectAccessReview) (*SubjectAccessReview, error) + DeleteSubjectAccessReview(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewSubjectAccessReviewRegistry(sp builders.StandardStorageProvider) SubjectAccessReviewRegistry { + return &storageSubjectAccessReview{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageSubjectAccessReview struct { + builders.StandardStorageProvider +} + +func (s *storageSubjectAccessReview) ListSubjectAccessReviews(ctx context.Context, options *internalversion.ListOptions) (*SubjectAccessReviewList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*SubjectAccessReviewList), err +} + +func (s *storageSubjectAccessReview) GetSubjectAccessReview(ctx context.Context, id string, options *metav1.GetOptions) (*SubjectAccessReview, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*SubjectAccessReview), nil +} + +func (s *storageSubjectAccessReview) CreateSubjectAccessReview(ctx context.Context, object *SubjectAccessReview) (*SubjectAccessReview, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SubjectAccessReview), nil +} + +func (s *storageSubjectAccessReview) UpdateSubjectAccessReview(ctx context.Context, object *SubjectAccessReview) (*SubjectAccessReview, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*SubjectAccessReview), nil +} + +func (s *storageSubjectAccessReview) DeleteSubjectAccessReview(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Task Functions and Structs +// +// +k8s:deepcopy-gen=false +type TaskStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type TaskStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TaskList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Task +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TaskLogList struct { + metav1.TypeMeta + metav1.ListMeta + Items []TaskLog +} + +func (Task) NewStatus() interface{} { + return TaskStatus{} +} + +func (pc *Task) GetStatus() interface{} { + return pc.Status +} + +func (pc *Task) SetStatus(s interface{}) { + pc.Status = s.(TaskStatus) +} + +func (pc *Task) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Task) SetSpec(s interface{}) { + pc.Spec = s.(TaskSpec) +} + +func (pc *Task) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Task) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Task) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Task. +// +k8s:deepcopy-gen=false +type TaskRegistry interface { + ListTasks(ctx context.Context, options *internalversion.ListOptions) (*TaskList, error) + GetTask(ctx context.Context, id string, options *metav1.GetOptions) (*Task, error) + CreateTask(ctx context.Context, id *Task) (*Task, error) + UpdateTask(ctx context.Context, id *Task) (*Task, error) + DeleteTask(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewTaskRegistry(sp builders.StandardStorageProvider) TaskRegistry { + return &storageTask{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageTask struct { + builders.StandardStorageProvider +} + +func (s *storageTask) ListTasks(ctx context.Context, options *internalversion.ListOptions) (*TaskList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*TaskList), err +} + +func (s *storageTask) GetTask(ctx context.Context, id string, options *metav1.GetOptions) (*Task, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Task), nil +} + +func (s *storageTask) CreateTask(ctx context.Context, object *Task) (*Task, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Task), nil +} + +func (s *storageTask) UpdateTask(ctx context.Context, object *Task) (*Task, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Task), nil +} + +func (s *storageTask) DeleteTask(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// Team Functions and Structs +// +// +k8s:deepcopy-gen=false +type TeamStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type TeamStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamList struct { + metav1.TypeMeta + metav1.ListMeta + Items []Team +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamAccessKeysList struct { + metav1.TypeMeta + metav1.ListMeta + Items []TeamAccessKeys +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamClustersList struct { + metav1.TypeMeta + metav1.ListMeta + Items []TeamClusters +} + +func (Team) NewStatus() interface{} { + return TeamStatus{} +} + +func (pc *Team) GetStatus() interface{} { + return pc.Status +} + +func (pc *Team) SetStatus(s interface{}) { + pc.Status = s.(TeamStatus) +} + +func (pc *Team) GetSpec() interface{} { + return pc.Spec +} + +func (pc *Team) SetSpec(s interface{}) { + pc.Spec = s.(TeamSpec) +} + +func (pc *Team) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *Team) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc Team) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store Team. +// +k8s:deepcopy-gen=false +type TeamRegistry interface { + ListTeams(ctx context.Context, options *internalversion.ListOptions) (*TeamList, error) + GetTeam(ctx context.Context, id string, options *metav1.GetOptions) (*Team, error) + CreateTeam(ctx context.Context, id *Team) (*Team, error) + UpdateTeam(ctx context.Context, id *Team) (*Team, error) + DeleteTeam(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewTeamRegistry(sp builders.StandardStorageProvider) TeamRegistry { + return &storageTeam{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageTeam struct { + builders.StandardStorageProvider +} + +func (s *storageTeam) ListTeams(ctx context.Context, options *internalversion.ListOptions) (*TeamList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*TeamList), err +} + +func (s *storageTeam) GetTeam(ctx context.Context, id string, options *metav1.GetOptions) (*Team, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*Team), nil +} + +func (s *storageTeam) CreateTeam(ctx context.Context, object *Team) (*Team, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Team), nil +} + +func (s *storageTeam) UpdateTeam(ctx context.Context, object *Team) (*Team, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*Team), nil +} + +func (s *storageTeam) DeleteTeam(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// User Functions and Structs +// +// +k8s:deepcopy-gen=false +type UserStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type UserStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserList struct { + metav1.TypeMeta + metav1.ListMeta + Items []User +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserAccessKeysList struct { + metav1.TypeMeta + metav1.ListMeta + Items []UserAccessKeys +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserClustersList struct { + metav1.TypeMeta + metav1.ListMeta + Items []UserClusters +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserPermissionsList struct { + metav1.TypeMeta + metav1.ListMeta + Items []UserPermissions +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserProfileList struct { + metav1.TypeMeta + metav1.ListMeta + Items []UserProfile +} + +func (User) NewStatus() interface{} { + return UserStatus{} +} + +func (pc *User) GetStatus() interface{} { + return pc.Status +} + +func (pc *User) SetStatus(s interface{}) { + pc.Status = s.(UserStatus) +} + +func (pc *User) GetSpec() interface{} { + return pc.Spec +} + +func (pc *User) SetSpec(s interface{}) { + pc.Spec = s.(UserSpec) +} + +func (pc *User) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *User) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc User) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store User. +// +k8s:deepcopy-gen=false +type UserRegistry interface { + ListUsers(ctx context.Context, options *internalversion.ListOptions) (*UserList, error) + GetUser(ctx context.Context, id string, options *metav1.GetOptions) (*User, error) + CreateUser(ctx context.Context, id *User) (*User, error) + UpdateUser(ctx context.Context, id *User) (*User, error) + DeleteUser(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewUserRegistry(sp builders.StandardStorageProvider) UserRegistry { + return &storageUser{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageUser struct { + builders.StandardStorageProvider +} + +func (s *storageUser) ListUsers(ctx context.Context, options *internalversion.ListOptions) (*UserList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*UserList), err +} + +func (s *storageUser) GetUser(ctx context.Context, id string, options *metav1.GetOptions) (*User, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*User), nil +} + +func (s *storageUser) CreateUser(ctx context.Context, object *User) (*User, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*User), nil +} + +func (s *storageUser) UpdateUser(ctx context.Context, object *User) (*User, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*User), nil +} + +func (s *storageUser) DeleteUser(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// VirtualClusterInstance Functions and Structs +// +// +k8s:deepcopy-gen=false +type VirtualClusterInstanceStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type VirtualClusterInstanceStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceList struct { + metav1.TypeMeta + metav1.ListMeta + Items []VirtualClusterInstance +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceKubeConfigList struct { + metav1.TypeMeta + metav1.ListMeta + Items []VirtualClusterInstanceKubeConfig +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceLogList struct { + metav1.TypeMeta + metav1.ListMeta + Items []VirtualClusterInstanceLog +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterInstanceWorkloadKubeConfigList struct { + metav1.TypeMeta + metav1.ListMeta + Items []VirtualClusterInstanceWorkloadKubeConfig +} + +func (VirtualClusterInstance) NewStatus() interface{} { + return VirtualClusterInstanceStatus{} +} + +func (pc *VirtualClusterInstance) GetStatus() interface{} { + return pc.Status +} + +func (pc *VirtualClusterInstance) SetStatus(s interface{}) { + pc.Status = s.(VirtualClusterInstanceStatus) +} + +func (pc *VirtualClusterInstance) GetSpec() interface{} { + return pc.Spec +} + +func (pc *VirtualClusterInstance) SetSpec(s interface{}) { + pc.Spec = s.(VirtualClusterInstanceSpec) +} + +func (pc *VirtualClusterInstance) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *VirtualClusterInstance) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc VirtualClusterInstance) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store VirtualClusterInstance. +// +k8s:deepcopy-gen=false +type VirtualClusterInstanceRegistry interface { + ListVirtualClusterInstances(ctx context.Context, options *internalversion.ListOptions) (*VirtualClusterInstanceList, error) + GetVirtualClusterInstance(ctx context.Context, id string, options *metav1.GetOptions) (*VirtualClusterInstance, error) + CreateVirtualClusterInstance(ctx context.Context, id *VirtualClusterInstance) (*VirtualClusterInstance, error) + UpdateVirtualClusterInstance(ctx context.Context, id *VirtualClusterInstance) (*VirtualClusterInstance, error) + DeleteVirtualClusterInstance(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewVirtualClusterInstanceRegistry(sp builders.StandardStorageProvider) VirtualClusterInstanceRegistry { + return &storageVirtualClusterInstance{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageVirtualClusterInstance struct { + builders.StandardStorageProvider +} + +func (s *storageVirtualClusterInstance) ListVirtualClusterInstances(ctx context.Context, options *internalversion.ListOptions) (*VirtualClusterInstanceList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterInstanceList), err +} + +func (s *storageVirtualClusterInstance) GetVirtualClusterInstance(ctx context.Context, id string, options *metav1.GetOptions) (*VirtualClusterInstance, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterInstance), nil +} + +func (s *storageVirtualClusterInstance) CreateVirtualClusterInstance(ctx context.Context, object *VirtualClusterInstance) (*VirtualClusterInstance, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterInstance), nil +} + +func (s *storageVirtualClusterInstance) UpdateVirtualClusterInstance(ctx context.Context, object *VirtualClusterInstance) (*VirtualClusterInstance, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterInstance), nil +} + +func (s *storageVirtualClusterInstance) DeleteVirtualClusterInstance(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// VirtualClusterTemplate Functions and Structs +// +// +k8s:deepcopy-gen=false +type VirtualClusterTemplateStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type VirtualClusterTemplateStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterTemplateList struct { + metav1.TypeMeta + metav1.ListMeta + Items []VirtualClusterTemplate +} + +func (VirtualClusterTemplate) NewStatus() interface{} { + return VirtualClusterTemplateStatus{} +} + +func (pc *VirtualClusterTemplate) GetStatus() interface{} { + return pc.Status +} + +func (pc *VirtualClusterTemplate) SetStatus(s interface{}) { + pc.Status = s.(VirtualClusterTemplateStatus) +} + +func (pc *VirtualClusterTemplate) GetSpec() interface{} { + return pc.Spec +} + +func (pc *VirtualClusterTemplate) SetSpec(s interface{}) { + pc.Spec = s.(VirtualClusterTemplateSpec) +} + +func (pc *VirtualClusterTemplate) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *VirtualClusterTemplate) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc VirtualClusterTemplate) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store VirtualClusterTemplate. +// +k8s:deepcopy-gen=false +type VirtualClusterTemplateRegistry interface { + ListVirtualClusterTemplates(ctx context.Context, options *internalversion.ListOptions) (*VirtualClusterTemplateList, error) + GetVirtualClusterTemplate(ctx context.Context, id string, options *metav1.GetOptions) (*VirtualClusterTemplate, error) + CreateVirtualClusterTemplate(ctx context.Context, id *VirtualClusterTemplate) (*VirtualClusterTemplate, error) + UpdateVirtualClusterTemplate(ctx context.Context, id *VirtualClusterTemplate) (*VirtualClusterTemplate, error) + DeleteVirtualClusterTemplate(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewVirtualClusterTemplateRegistry(sp builders.StandardStorageProvider) VirtualClusterTemplateRegistry { + return &storageVirtualClusterTemplate{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageVirtualClusterTemplate struct { + builders.StandardStorageProvider +} + +func (s *storageVirtualClusterTemplate) ListVirtualClusterTemplates(ctx context.Context, options *internalversion.ListOptions) (*VirtualClusterTemplateList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterTemplateList), err +} + +func (s *storageVirtualClusterTemplate) GetVirtualClusterTemplate(ctx context.Context, id string, options *metav1.GetOptions) (*VirtualClusterTemplate, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterTemplate), nil +} + +func (s *storageVirtualClusterTemplate) CreateVirtualClusterTemplate(ctx context.Context, object *VirtualClusterTemplate) (*VirtualClusterTemplate, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterTemplate), nil +} + +func (s *storageVirtualClusterTemplate) UpdateVirtualClusterTemplate(ctx context.Context, object *VirtualClusterTemplate) (*VirtualClusterTemplate, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterTemplate), nil +} + +func (s *storageVirtualClusterTemplate) DeleteVirtualClusterTemplate(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/zz_generated.deepcopy.go new file mode 100644 index 000000000..b795bb92d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/zz_generated.deepcopy.go @@ -0,0 +1,7118 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package management + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + loftstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + v1 "github.com/loft-sh/api/v3/pkg/apis/audit/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + uiv1 "github.com/loft-sh/api/v3/pkg/apis/ui/v1" + server "github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server" + rbacv1 "k8s.io/api/rbac/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAnalyticsSpec) DeepCopyInto(out *AgentAnalyticsSpec) { + *out = *in + if in.InstanceTokenAuth != nil { + in, out := &in.InstanceTokenAuth, &out.InstanceTokenAuth + *out = new(server.InstanceTokenAuth) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAnalyticsSpec. +func (in *AgentAnalyticsSpec) DeepCopy() *AgentAnalyticsSpec { + if in == nil { + return nil + } + out := new(AgentAnalyticsSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAuditConfig) DeepCopyInto(out *AgentAuditConfig) { + *out = *in + in.Policy.DeepCopyInto(&out.Policy) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAuditConfig. +func (in *AgentAuditConfig) DeepCopy() *AgentAuditConfig { + if in == nil { + return nil + } + out := new(AgentAuditConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAuditEvent) DeepCopyInto(out *AgentAuditEvent) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAuditEvent. +func (in *AgentAuditEvent) DeepCopy() *AgentAuditEvent { + if in == nil { + return nil + } + out := new(AgentAuditEvent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AgentAuditEvent) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAuditEventList) DeepCopyInto(out *AgentAuditEventList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]AgentAuditEvent, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAuditEventList. +func (in *AgentAuditEventList) DeepCopy() *AgentAuditEventList { + if in == nil { + return nil + } + out := new(AgentAuditEventList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AgentAuditEventList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAuditEventSpec) DeepCopyInto(out *AgentAuditEventSpec) { + *out = *in + if in.Events != nil { + in, out := &in.Events, &out.Events + *out = make([]*v1.Event, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(v1.Event) + (*in).DeepCopyInto(*out) + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAuditEventSpec. +func (in *AgentAuditEventSpec) DeepCopy() *AgentAuditEventSpec { + if in == nil { + return nil + } + out := new(AgentAuditEventSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentAuditEventStatus) DeepCopyInto(out *AgentAuditEventStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentAuditEventStatus. +func (in *AgentAuditEventStatus) DeepCopy() *AgentAuditEventStatus { + if in == nil { + return nil + } + out := new(AgentAuditEventStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Announcement) DeepCopyInto(out *Announcement) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Announcement. +func (in *Announcement) DeepCopy() *Announcement { + if in == nil { + return nil + } + out := new(Announcement) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Announcement) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AnnouncementList) DeepCopyInto(out *AnnouncementList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Announcement, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnnouncementList. +func (in *AnnouncementList) DeepCopy() *AnnouncementList { + if in == nil { + return nil + } + out := new(AnnouncementList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AnnouncementList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AnnouncementSpec) DeepCopyInto(out *AnnouncementSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnnouncementSpec. +func (in *AnnouncementSpec) DeepCopy() *AnnouncementSpec { + if in == nil { + return nil + } + out := new(AnnouncementSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AnnouncementStatus) DeepCopyInto(out *AnnouncementStatus) { + *out = *in + if in.InstanceTokenAuth != nil { + in, out := &in.InstanceTokenAuth, &out.InstanceTokenAuth + *out = new(server.InstanceTokenAuth) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnnouncementStatus. +func (in *AnnouncementStatus) DeepCopy() *AnnouncementStatus { + if in == nil { + return nil + } + out := new(AnnouncementStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *App) DeepCopyInto(out *App) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new App. +func (in *App) DeepCopy() *App { + if in == nil { + return nil + } + out := new(App) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *App) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppList) DeepCopyInto(out *AppList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]App, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppList. +func (in *AppList) DeepCopy() *AppList { + if in == nil { + return nil + } + out := new(AppList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AppList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppSpec) DeepCopyInto(out *AppSpec) { + *out = *in + in.AppSpec.DeepCopyInto(&out.AppSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpec. +func (in *AppSpec) DeepCopy() *AppSpec { + if in == nil { + return nil + } + out := new(AppSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppStatus) DeepCopyInto(out *AppStatus) { + *out = *in + out.AppStatus = in.AppStatus + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus. +func (in *AppStatus) DeepCopy() *AppStatus { + if in == nil { + return nil + } + out := new(AppStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Apps) DeepCopyInto(out *Apps) { + *out = *in + if in.Repositories != nil { + in, out := &in.Repositories, &out.Repositories + *out = make([]storagev1.HelmChartRepository, len(*in)) + copy(*out, *in) + } + if in.PredefinedApps != nil { + in, out := &in.PredefinedApps, &out.PredefinedApps + *out = make([]PredefinedApp, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Apps. +func (in *Apps) DeepCopy() *Apps { + if in == nil { + return nil + } + out := new(Apps) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Audit) DeepCopyInto(out *Audit) { + *out = *in + in.Policy.DeepCopyInto(&out.Policy) + if in.DataStoreMaxAge != nil { + in, out := &in.DataStoreMaxAge, &out.DataStoreMaxAge + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Audit. +func (in *Audit) DeepCopy() *Audit { + if in == nil { + return nil + } + out := new(Audit) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuditPolicy) DeepCopyInto(out *AuditPolicy) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]AuditPolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.OmitStages != nil { + in, out := &in.OmitStages, &out.OmitStages + *out = make([]v1.Stage, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditPolicy. +func (in *AuditPolicy) DeepCopy() *AuditPolicy { + if in == nil { + return nil + } + out := new(AuditPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuditPolicyRule) DeepCopyInto(out *AuditPolicyRule) { + *out = *in + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.UserGroups != nil { + in, out := &in.UserGroups, &out.UserGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]GroupResources, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Namespaces != nil { + in, out := &in.Namespaces, &out.Namespaces + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NonResourceURLs != nil { + in, out := &in.NonResourceURLs, &out.NonResourceURLs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.OmitStages != nil { + in, out := &in.OmitStages, &out.OmitStages + *out = make([]v1.Stage, len(*in)) + copy(*out, *in) + } + if in.RequestTargets != nil { + in, out := &in.RequestTargets, &out.RequestTargets + *out = make([]v1.RequestTarget, len(*in)) + copy(*out, *in) + } + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditPolicyRule. +func (in *AuditPolicyRule) DeepCopy() *AuditPolicyRule { + if in == nil { + return nil + } + out := new(AuditPolicyRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Authentication) DeepCopyInto(out *Authentication) { + *out = *in + in.Connector.DeepCopyInto(&out.Connector) + if in.Password != nil { + in, out := &in.Password, &out.Password + *out = new(AuthenticationPassword) + **out = **in + } + if in.Connectors != nil { + in, out := &in.Connectors, &out.Connectors + *out = make([]ConnectorWithName, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.LoginAccessKeyTTLSeconds != nil { + in, out := &in.LoginAccessKeyTTLSeconds, &out.LoginAccessKeyTTLSeconds + *out = new(int64) + **out = **in + } + if in.CustomHttpHeaders != nil { + in, out := &in.CustomHttpHeaders, &out.CustomHttpHeaders + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authentication. +func (in *Authentication) DeepCopy() *Authentication { + if in == nil { + return nil + } + out := new(Authentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationClusterAccountTemplates) DeepCopyInto(out *AuthenticationClusterAccountTemplates) { + *out = *in + if in.ClusterAccountTemplates != nil { + in, out := &in.ClusterAccountTemplates, &out.ClusterAccountTemplates + *out = make([]storagev1.UserClusterAccountTemplate, len(*in)) + copy(*out, *in) + } + if in.GroupClusterAccountTemplates != nil { + in, out := &in.GroupClusterAccountTemplates, &out.GroupClusterAccountTemplates + *out = make([]AuthenticationGroupClusterAccountTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationClusterAccountTemplates. +func (in *AuthenticationClusterAccountTemplates) DeepCopy() *AuthenticationClusterAccountTemplates { + if in == nil { + return nil + } + out := new(AuthenticationClusterAccountTemplates) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationGithub) DeepCopyInto(out *AuthenticationGithub) { + *out = *in + if in.Orgs != nil { + in, out := &in.Orgs, &out.Orgs + *out = make([]AuthenticationGithubOrg, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.AuthenticationClusterAccountTemplates.DeepCopyInto(&out.AuthenticationClusterAccountTemplates) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationGithub. +func (in *AuthenticationGithub) DeepCopy() *AuthenticationGithub { + if in == nil { + return nil + } + out := new(AuthenticationGithub) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationGithubOrg) DeepCopyInto(out *AuthenticationGithubOrg) { + *out = *in + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationGithubOrg. +func (in *AuthenticationGithubOrg) DeepCopy() *AuthenticationGithubOrg { + if in == nil { + return nil + } + out := new(AuthenticationGithubOrg) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationGitlab) DeepCopyInto(out *AuthenticationGitlab) { + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.AuthenticationClusterAccountTemplates.DeepCopyInto(&out.AuthenticationClusterAccountTemplates) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationGitlab. +func (in *AuthenticationGitlab) DeepCopy() *AuthenticationGitlab { + if in == nil { + return nil + } + out := new(AuthenticationGitlab) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationGoogle) DeepCopyInto(out *AuthenticationGoogle) { + *out = *in + if in.Scopes != nil { + in, out := &in.Scopes, &out.Scopes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.HostedDomains != nil { + in, out := &in.HostedDomains, &out.HostedDomains + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.AuthenticationClusterAccountTemplates.DeepCopyInto(&out.AuthenticationClusterAccountTemplates) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationGoogle. +func (in *AuthenticationGoogle) DeepCopy() *AuthenticationGoogle { + if in == nil { + return nil + } + out := new(AuthenticationGoogle) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationGroupClusterAccountTemplate) DeepCopyInto(out *AuthenticationGroupClusterAccountTemplate) { + *out = *in + if in.ClusterAccountTemplates != nil { + in, out := &in.ClusterAccountTemplates, &out.ClusterAccountTemplates + *out = make([]storagev1.UserClusterAccountTemplate, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationGroupClusterAccountTemplate. +func (in *AuthenticationGroupClusterAccountTemplate) DeepCopy() *AuthenticationGroupClusterAccountTemplate { + if in == nil { + return nil + } + out := new(AuthenticationGroupClusterAccountTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationMicrosoft) DeepCopyInto(out *AuthenticationMicrosoft) { + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.AuthenticationClusterAccountTemplates.DeepCopyInto(&out.AuthenticationClusterAccountTemplates) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationMicrosoft. +func (in *AuthenticationMicrosoft) DeepCopy() *AuthenticationMicrosoft { + if in == nil { + return nil + } + out := new(AuthenticationMicrosoft) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationOIDC) DeepCopyInto(out *AuthenticationOIDC) { + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Scopes != nil { + in, out := &in.Scopes, &out.Scopes + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.AuthenticationClusterAccountTemplates.DeepCopyInto(&out.AuthenticationClusterAccountTemplates) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationOIDC. +func (in *AuthenticationOIDC) DeepCopy() *AuthenticationOIDC { + if in == nil { + return nil + } + out := new(AuthenticationOIDC) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationPassword) DeepCopyInto(out *AuthenticationPassword) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationPassword. +func (in *AuthenticationPassword) DeepCopy() *AuthenticationPassword { + if in == nil { + return nil + } + out := new(AuthenticationPassword) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationSAML) DeepCopyInto(out *AuthenticationSAML) { + *out = *in + if in.CAData != nil { + in, out := &in.CAData, &out.CAData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.AllowedGroups != nil { + in, out := &in.AllowedGroups, &out.AllowedGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationSAML. +func (in *AuthenticationSAML) DeepCopy() *AuthenticationSAML { + if in == nil { + return nil + } + out := new(AuthenticationSAML) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Cluster) DeepCopyInto(out *Cluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. +func (in *Cluster) DeepCopy() *Cluster { + if in == nil { + return nil + } + out := new(Cluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Cluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccess) DeepCopyInto(out *ClusterAccess) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccess. +func (in *ClusterAccess) DeepCopy() *ClusterAccess { + if in == nil { + return nil + } + out := new(ClusterAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterAccess) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessList) DeepCopyInto(out *ClusterAccessList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterAccess, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessList. +func (in *ClusterAccessList) DeepCopy() *ClusterAccessList { + if in == nil { + return nil + } + out := new(ClusterAccessList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterAccessList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessSpec) DeepCopyInto(out *ClusterAccessSpec) { + *out = *in + in.ClusterAccessSpec.DeepCopyInto(&out.ClusterAccessSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessSpec. +func (in *ClusterAccessSpec) DeepCopy() *ClusterAccessSpec { + if in == nil { + return nil + } + out := new(ClusterAccessSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessStatus) DeepCopyInto(out *ClusterAccessStatus) { + *out = *in + out.ClusterAccessStatus = in.ClusterAccessStatus + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]*clusterv1.UserOrTeam, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.UserOrTeam) + (*in).DeepCopyInto(*out) + } + } + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + if in.SpaceConstraint != nil { + in, out := &in.SpaceConstraint, &out.SpaceConstraint + *out = new(clusterv1.EntityInfo) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessStatus. +func (in *ClusterAccessStatus) DeepCopy() *ClusterAccessStatus { + if in == nil { + return nil + } + out := new(ClusterAccessStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccounts) DeepCopyInto(out *ClusterAccounts) { + *out = *in + if in.Accounts != nil { + in, out := &in.Accounts, &out.Accounts + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.Cluster.DeepCopyInto(&out.Cluster) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccounts. +func (in *ClusterAccounts) DeepCopy() *ClusterAccounts { + if in == nil { + return nil + } + out := new(ClusterAccounts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAgentConfig) DeepCopyInto(out *ClusterAgentConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Audit != nil { + in, out := &in.Audit, &out.Audit + *out = new(AgentAuditConfig) + (*in).DeepCopyInto(*out) + } + if in.TokenCaCert != nil { + in, out := &in.TokenCaCert, &out.TokenCaCert + *out = make([]byte, len(*in)) + copy(*out, *in) + } + in.AnalyticsSpec.DeepCopyInto(&out.AnalyticsSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAgentConfig. +func (in *ClusterAgentConfig) DeepCopy() *ClusterAgentConfig { + if in == nil { + return nil + } + out := new(ClusterAgentConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterAgentConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAgentConfigList) DeepCopyInto(out *ClusterAgentConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterAgentConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAgentConfigList. +func (in *ClusterAgentConfigList) DeepCopy() *ClusterAgentConfigList { + if in == nil { + return nil + } + out := new(ClusterAgentConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterAgentConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterCharts) DeepCopyInto(out *ClusterCharts) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Charts != nil { + in, out := &in.Charts, &out.Charts + *out = make([]storagev1.HelmChart, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCharts. +func (in *ClusterCharts) DeepCopy() *ClusterCharts { + if in == nil { + return nil + } + out := new(ClusterCharts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterCharts) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterChartsList) DeepCopyInto(out *ClusterChartsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterCharts, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterChartsList. +func (in *ClusterChartsList) DeepCopy() *ClusterChartsList { + if in == nil { + return nil + } + out := new(ClusterChartsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterChartsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConnect) DeepCopyInto(out *ClusterConnect) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConnect. +func (in *ClusterConnect) DeepCopy() *ClusterConnect { + if in == nil { + return nil + } + out := new(ClusterConnect) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterConnect) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConnectList) DeepCopyInto(out *ClusterConnectList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterConnect, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConnectList. +func (in *ClusterConnectList) DeepCopy() *ClusterConnectList { + if in == nil { + return nil + } + out := new(ClusterConnectList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterConnectList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConnectSpec) DeepCopyInto(out *ClusterConnectSpec) { + *out = *in + in.ClusterTemplate.DeepCopyInto(&out.ClusterTemplate) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConnectSpec. +func (in *ClusterConnectSpec) DeepCopy() *ClusterConnectSpec { + if in == nil { + return nil + } + out := new(ClusterConnectSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConnectStatus) DeepCopyInto(out *ClusterConnectStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConnectStatus. +func (in *ClusterConnectStatus) DeepCopy() *ClusterConnectStatus { + if in == nil { + return nil + } + out := new(ClusterConnectStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterDomain) DeepCopyInto(out *ClusterDomain) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDomain. +func (in *ClusterDomain) DeepCopy() *ClusterDomain { + if in == nil { + return nil + } + out := new(ClusterDomain) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterDomain) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterDomainList) DeepCopyInto(out *ClusterDomainList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterDomain, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDomainList. +func (in *ClusterDomainList) DeepCopy() *ClusterDomainList { + if in == nil { + return nil + } + out := new(ClusterDomainList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterDomainList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterList) DeepCopyInto(out *ClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Cluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. +func (in *ClusterList) DeepCopy() *ClusterList { + if in == nil { + return nil + } + out := new(ClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMember) DeepCopyInto(out *ClusterMember) { + *out = *in + out.Info = in.Info + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMember. +func (in *ClusterMember) DeepCopy() *ClusterMember { + if in == nil { + return nil + } + out := new(ClusterMember) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMemberAccess) DeepCopyInto(out *ClusterMemberAccess) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]ClusterMember, len(*in)) + copy(*out, *in) + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]ClusterMember, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMemberAccess. +func (in *ClusterMemberAccess) DeepCopy() *ClusterMemberAccess { + if in == nil { + return nil + } + out := new(ClusterMemberAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterMemberAccess) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMemberAccessList) DeepCopyInto(out *ClusterMemberAccessList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterMemberAccess, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMemberAccessList. +func (in *ClusterMemberAccessList) DeepCopy() *ClusterMemberAccessList { + if in == nil { + return nil + } + out := new(ClusterMemberAccessList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterMemberAccessList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMembers) DeepCopyInto(out *ClusterMembers) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]ClusterMember, len(*in)) + copy(*out, *in) + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]ClusterMember, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMembers. +func (in *ClusterMembers) DeepCopy() *ClusterMembers { + if in == nil { + return nil + } + out := new(ClusterMembers) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterMembers) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMembersList) DeepCopyInto(out *ClusterMembersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterMembers, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMembersList. +func (in *ClusterMembersList) DeepCopy() *ClusterMembersList { + if in == nil { + return nil + } + out := new(ClusterMembersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterMembersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterReset) DeepCopyInto(out *ClusterReset) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterReset. +func (in *ClusterReset) DeepCopy() *ClusterReset { + if in == nil { + return nil + } + out := new(ClusterReset) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterReset) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterResetList) DeepCopyInto(out *ClusterResetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterReset, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResetList. +func (in *ClusterResetList) DeepCopy() *ClusterResetList { + if in == nil { + return nil + } + out := new(ClusterResetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterResetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplate) DeepCopyInto(out *ClusterRoleTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplate. +func (in *ClusterRoleTemplate) DeepCopy() *ClusterRoleTemplate { + if in == nil { + return nil + } + out := new(ClusterRoleTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterRoleTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplateList) DeepCopyInto(out *ClusterRoleTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterRoleTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateList. +func (in *ClusterRoleTemplateList) DeepCopy() *ClusterRoleTemplateList { + if in == nil { + return nil + } + out := new(ClusterRoleTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterRoleTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplateSpec) DeepCopyInto(out *ClusterRoleTemplateSpec) { + *out = *in + in.ClusterRoleTemplateSpec.DeepCopyInto(&out.ClusterRoleTemplateSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateSpec. +func (in *ClusterRoleTemplateSpec) DeepCopy() *ClusterRoleTemplateSpec { + if in == nil { + return nil + } + out := new(ClusterRoleTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplateStatus) DeepCopyInto(out *ClusterRoleTemplateStatus) { + *out = *in + out.ClusterRoleTemplateStatus = in.ClusterRoleTemplateStatus + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateStatus. +func (in *ClusterRoleTemplateStatus) DeepCopy() *ClusterRoleTemplateStatus { + if in == nil { + return nil + } + out := new(ClusterRoleTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { + *out = *in + in.ClusterSpec.DeepCopyInto(&out.ClusterSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. +func (in *ClusterSpec) DeepCopy() *ClusterSpec { + if in == nil { + return nil + } + out := new(ClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { + *out = *in + out.ClusterStatus = in.ClusterStatus + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. +func (in *ClusterStatus) DeepCopy() *ClusterStatus { + if in == nil { + return nil + } + out := new(ClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterVirtualClusterDefaults) DeepCopyInto(out *ClusterVirtualClusterDefaults) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.DefaultTemplate != nil { + in, out := &in.DefaultTemplate, &out.DefaultTemplate + *out = new(storagev1.VirtualClusterTemplate) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualClusterDefaults. +func (in *ClusterVirtualClusterDefaults) DeepCopy() *ClusterVirtualClusterDefaults { + if in == nil { + return nil + } + out := new(ClusterVirtualClusterDefaults) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterVirtualClusterDefaults) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterVirtualClusterDefaultsList) DeepCopyInto(out *ClusterVirtualClusterDefaultsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterVirtualClusterDefaults, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualClusterDefaultsList. +func (in *ClusterVirtualClusterDefaultsList) DeepCopy() *ClusterVirtualClusterDefaultsList { + if in == nil { + return nil + } + out := new(ClusterVirtualClusterDefaultsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterVirtualClusterDefaultsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Config) DeepCopyInto(out *Config) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config. +func (in *Config) DeepCopy() *Config { + if in == nil { + return nil + } + out := new(Config) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Config) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigList) DeepCopyInto(out *ConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Config, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigList. +func (in *ConfigList) DeepCopy() *ConfigList { + if in == nil { + return nil + } + out := new(ConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec) { + *out = *in + if in.Raw != nil { + in, out := &in.Raw, &out.Raw + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec. +func (in *ConfigSpec) DeepCopy() *ConfigSpec { + if in == nil { + return nil + } + out := new(ConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus) { + *out = *in + in.Authentication.DeepCopyInto(&out.Authentication) + if in.OIDC != nil { + in, out := &in.OIDC, &out.OIDC + *out = new(OIDC) + (*in).DeepCopyInto(*out) + } + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = new(Apps) + (*in).DeepCopyInto(*out) + } + if in.Audit != nil { + in, out := &in.Audit, &out.Audit + *out = new(Audit) + (*in).DeepCopyInto(*out) + } + if in.UISettings != nil { + in, out := &in.UISettings, &out.UISettings + *out = new(uiv1.UISettingsConfig) + (*in).DeepCopyInto(*out) + } + if in.VaultIntegration != nil { + in, out := &in.VaultIntegration, &out.VaultIntegration + *out = new(storagev1.VaultIntegrationSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigStatus. +func (in *ConfigStatus) DeepCopy() *ConfigStatus { + if in == nil { + return nil + } + out := new(ConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Connector) DeepCopyInto(out *Connector) { + *out = *in + if in.OIDC != nil { + in, out := &in.OIDC, &out.OIDC + *out = new(AuthenticationOIDC) + (*in).DeepCopyInto(*out) + } + if in.Github != nil { + in, out := &in.Github, &out.Github + *out = new(AuthenticationGithub) + (*in).DeepCopyInto(*out) + } + if in.Gitlab != nil { + in, out := &in.Gitlab, &out.Gitlab + *out = new(AuthenticationGitlab) + (*in).DeepCopyInto(*out) + } + if in.Google != nil { + in, out := &in.Google, &out.Google + *out = new(AuthenticationGoogle) + (*in).DeepCopyInto(*out) + } + if in.Microsoft != nil { + in, out := &in.Microsoft, &out.Microsoft + *out = new(AuthenticationMicrosoft) + (*in).DeepCopyInto(*out) + } + if in.SAML != nil { + in, out := &in.SAML, &out.SAML + *out = new(AuthenticationSAML) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Connector. +func (in *Connector) DeepCopy() *Connector { + if in == nil { + return nil + } + out := new(Connector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectorWithName) DeepCopyInto(out *ConnectorWithName) { + *out = *in + in.Connector.DeepCopyInto(&out.Connector) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectorWithName. +func (in *ConnectorWithName) DeepCopy() *ConnectorWithName { + if in == nil { + return nil + } + out := new(ConnectorWithName) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodDeleteOptions) DeepCopyInto(out *DevPodDeleteOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodDeleteOptions. +func (in *DevPodDeleteOptions) DeepCopy() *DevPodDeleteOptions { + if in == nil { + return nil + } + out := new(DevPodDeleteOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodDeleteOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodSshOptions) DeepCopyInto(out *DevPodSshOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodSshOptions. +func (in *DevPodSshOptions) DeepCopy() *DevPodSshOptions { + if in == nil { + return nil + } + out := new(DevPodSshOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodSshOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodStatusOptions) DeepCopyInto(out *DevPodStatusOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStatusOptions. +func (in *DevPodStatusOptions) DeepCopy() *DevPodStatusOptions { + if in == nil { + return nil + } + out := new(DevPodStatusOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodStatusOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodStopOptions) DeepCopyInto(out *DevPodStopOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStopOptions. +func (in *DevPodStopOptions) DeepCopy() *DevPodStopOptions { + if in == nil { + return nil + } + out := new(DevPodStopOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodStopOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodUpOptions) DeepCopyInto(out *DevPodUpOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodUpOptions. +func (in *DevPodUpOptions) DeepCopy() *DevPodUpOptions { + if in == nil { + return nil + } + out := new(DevPodUpOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodUpOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstance) DeepCopyInto(out *DevPodWorkspaceInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstance. +func (in *DevPodWorkspaceInstance) DeepCopy() *DevPodWorkspaceInstance { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceDelete) DeepCopyInto(out *DevPodWorkspaceInstanceDelete) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceDelete. +func (in *DevPodWorkspaceInstanceDelete) DeepCopy() *DevPodWorkspaceInstanceDelete { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceDelete) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceDelete) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceDeleteList) DeepCopyInto(out *DevPodWorkspaceInstanceDeleteList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceDelete, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceDeleteList. +func (in *DevPodWorkspaceInstanceDeleteList) DeepCopy() *DevPodWorkspaceInstanceDeleteList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceDeleteList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceDeleteList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceGetStatus) DeepCopyInto(out *DevPodWorkspaceInstanceGetStatus) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceGetStatus. +func (in *DevPodWorkspaceInstanceGetStatus) DeepCopy() *DevPodWorkspaceInstanceGetStatus { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceGetStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceGetStatus) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceGetStatusList) DeepCopyInto(out *DevPodWorkspaceInstanceGetStatusList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceGetStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceGetStatusList. +func (in *DevPodWorkspaceInstanceGetStatusList) DeepCopy() *DevPodWorkspaceInstanceGetStatusList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceGetStatusList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceGetStatusList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceList) DeepCopyInto(out *DevPodWorkspaceInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceList. +func (in *DevPodWorkspaceInstanceList) DeepCopy() *DevPodWorkspaceInstanceList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceSpec) DeepCopyInto(out *DevPodWorkspaceInstanceSpec) { + *out = *in + in.DevPodWorkspaceInstanceSpec.DeepCopyInto(&out.DevPodWorkspaceInstanceSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceSpec. +func (in *DevPodWorkspaceInstanceSpec) DeepCopy() *DevPodWorkspaceInstanceSpec { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceSsh) DeepCopyInto(out *DevPodWorkspaceInstanceSsh) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceSsh. +func (in *DevPodWorkspaceInstanceSsh) DeepCopy() *DevPodWorkspaceInstanceSsh { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceSsh) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceSsh) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceSshList) DeepCopyInto(out *DevPodWorkspaceInstanceSshList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceSsh, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceSshList. +func (in *DevPodWorkspaceInstanceSshList) DeepCopy() *DevPodWorkspaceInstanceSshList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceSshList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceSshList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceStatus) DeepCopyInto(out *DevPodWorkspaceInstanceStatus) { + *out = *in + in.DevPodWorkspaceInstanceStatus.DeepCopyInto(&out.DevPodWorkspaceInstanceStatus) + if in.SleepModeConfig != nil { + in, out := &in.SleepModeConfig, &out.SleepModeConfig + *out = new(clusterv1.SleepModeConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStatus. +func (in *DevPodWorkspaceInstanceStatus) DeepCopy() *DevPodWorkspaceInstanceStatus { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceStop) DeepCopyInto(out *DevPodWorkspaceInstanceStop) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStop. +func (in *DevPodWorkspaceInstanceStop) DeepCopy() *DevPodWorkspaceInstanceStop { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceStop) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceStop) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceStopList) DeepCopyInto(out *DevPodWorkspaceInstanceStopList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceStop, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStopList. +func (in *DevPodWorkspaceInstanceStopList) DeepCopy() *DevPodWorkspaceInstanceStopList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceStopList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceStopList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceUp) DeepCopyInto(out *DevPodWorkspaceInstanceUp) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceUp. +func (in *DevPodWorkspaceInstanceUp) DeepCopy() *DevPodWorkspaceInstanceUp { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceUp) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceUp) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceUpList) DeepCopyInto(out *DevPodWorkspaceInstanceUpList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceUp, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceUpList. +func (in *DevPodWorkspaceInstanceUpList) DeepCopy() *DevPodWorkspaceInstanceUpList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceUpList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceUpList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplate) DeepCopyInto(out *DevPodWorkspaceTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplate. +func (in *DevPodWorkspaceTemplate) DeepCopy() *DevPodWorkspaceTemplate { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateList) DeepCopyInto(out *DevPodWorkspaceTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateList. +func (in *DevPodWorkspaceTemplateList) DeepCopy() *DevPodWorkspaceTemplateList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateSpec) DeepCopyInto(out *DevPodWorkspaceTemplateSpec) { + *out = *in + in.DevPodWorkspaceTemplateSpec.DeepCopyInto(&out.DevPodWorkspaceTemplateSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateSpec. +func (in *DevPodWorkspaceTemplateSpec) DeepCopy() *DevPodWorkspaceTemplateSpec { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateStatus) DeepCopyInto(out *DevPodWorkspaceTemplateStatus) { + *out = *in + out.DevPodWorkspaceTemplateStatus = in.DevPodWorkspaceTemplateStatus + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateStatus. +func (in *DevPodWorkspaceTemplateStatus) DeepCopy() *DevPodWorkspaceTemplateStatus { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DirectClusterEndpointToken) DeepCopyInto(out *DirectClusterEndpointToken) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectClusterEndpointToken. +func (in *DirectClusterEndpointToken) DeepCopy() *DirectClusterEndpointToken { + if in == nil { + return nil + } + out := new(DirectClusterEndpointToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DirectClusterEndpointToken) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DirectClusterEndpointTokenList) DeepCopyInto(out *DirectClusterEndpointTokenList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DirectClusterEndpointToken, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectClusterEndpointTokenList. +func (in *DirectClusterEndpointTokenList) DeepCopy() *DirectClusterEndpointTokenList { + if in == nil { + return nil + } + out := new(DirectClusterEndpointTokenList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DirectClusterEndpointTokenList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DirectClusterEndpointTokenSpec) DeepCopyInto(out *DirectClusterEndpointTokenSpec) { + *out = *in + if in.Scope != nil { + in, out := &in.Scope, &out.Scope + *out = new(storagev1.AccessKeyScope) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectClusterEndpointTokenSpec. +func (in *DirectClusterEndpointTokenSpec) DeepCopy() *DirectClusterEndpointTokenSpec { + if in == nil { + return nil + } + out := new(DirectClusterEndpointTokenSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DirectClusterEndpointTokenStatus) DeepCopyInto(out *DirectClusterEndpointTokenStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectClusterEndpointTokenStatus. +func (in *DirectClusterEndpointTokenStatus) DeepCopy() *DirectClusterEndpointTokenStatus { + if in == nil { + return nil + } + out := new(DirectClusterEndpointTokenStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Event) DeepCopyInto(out *Event) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event. +func (in *Event) DeepCopy() *Event { + if in == nil { + return nil + } + out := new(Event) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Event) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventList) DeepCopyInto(out *EventList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Event, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList. +func (in *EventList) DeepCopy() *EventList { + if in == nil { + return nil + } + out := new(EventList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EventList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventSpec) DeepCopyInto(out *EventSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSpec. +func (in *EventSpec) DeepCopy() *EventSpec { + if in == nil { + return nil + } + out := new(EventSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventStatus) DeepCopyInto(out *EventStatus) { + *out = *in + in.Event.DeepCopyInto(&out.Event) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventStatus. +func (in *EventStatus) DeepCopy() *EventStatus { + if in == nil { + return nil + } + out := new(EventStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Feature) DeepCopyInto(out *Feature) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature. +func (in *Feature) DeepCopy() *Feature { + if in == nil { + return nil + } + out := new(Feature) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Feature) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureList) DeepCopyInto(out *FeatureList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Feature, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureList. +func (in *FeatureList) DeepCopy() *FeatureList { + if in == nil { + return nil + } + out := new(FeatureList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FeatureList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSpec. +func (in *FeatureSpec) DeepCopy() *FeatureSpec { + if in == nil { + return nil + } + out := new(FeatureSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureStatus) DeepCopyInto(out *FeatureStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureStatus. +func (in *FeatureStatus) DeepCopy() *FeatureStatus { + if in == nil { + return nil + } + out := new(FeatureStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupResources) DeepCopyInto(out *GroupResources) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResources. +func (in *GroupResources) DeepCopy() *GroupResources { + if in == nil { + return nil + } + out := new(GroupResources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressAuthToken) DeepCopyInto(out *IngressAuthToken) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressAuthToken. +func (in *IngressAuthToken) DeepCopy() *IngressAuthToken { + if in == nil { + return nil + } + out := new(IngressAuthToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressAuthToken) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressAuthTokenList) DeepCopyInto(out *IngressAuthTokenList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IngressAuthToken, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressAuthTokenList. +func (in *IngressAuthTokenList) DeepCopy() *IngressAuthTokenList { + if in == nil { + return nil + } + out := new(IngressAuthTokenList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressAuthTokenList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressAuthTokenSpec) DeepCopyInto(out *IngressAuthTokenSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressAuthTokenSpec. +func (in *IngressAuthTokenSpec) DeepCopy() *IngressAuthTokenSpec { + if in == nil { + return nil + } + out := new(IngressAuthTokenSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressAuthTokenStatus) DeepCopyInto(out *IngressAuthTokenStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressAuthTokenStatus. +func (in *IngressAuthTokenStatus) DeepCopy() *IngressAuthTokenStatus { + if in == nil { + return nil + } + out := new(IngressAuthTokenStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Kiosk) DeepCopyInto(out *Kiosk) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kiosk. +func (in *Kiosk) DeepCopy() *Kiosk { + if in == nil { + return nil + } + out := new(Kiosk) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Kiosk) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KioskList) DeepCopyInto(out *KioskList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Kiosk, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KioskList. +func (in *KioskList) DeepCopy() *KioskList { + if in == nil { + return nil + } + out := new(KioskList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KioskList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KioskSpec) DeepCopyInto(out *KioskSpec) { + *out = *in + in.JsPolicy.DeepCopyInto(&out.JsPolicy) + in.JsPolicyBundle.DeepCopyInto(&out.JsPolicyBundle) + in.JsPolicyViolations.DeepCopyInto(&out.JsPolicyViolations) + in.HelmRelease.DeepCopyInto(&out.HelmRelease) + in.SleepModeConfig.DeepCopyInto(&out.SleepModeConfig) + in.Space.DeepCopyInto(&out.Space) + in.VirtualCluster.DeepCopyInto(&out.VirtualCluster) + in.LocalClusterAccess.DeepCopyInto(&out.LocalClusterAccess) + in.ClusterQuota.DeepCopyInto(&out.ClusterQuota) + in.ChartInfo.DeepCopyInto(&out.ChartInfo) + in.StorageClusterAccess.DeepCopyInto(&out.StorageClusterAccess) + in.StorageClusterQuota.DeepCopyInto(&out.StorageClusterQuota) + in.StorageVirtualCluster.DeepCopyInto(&out.StorageVirtualCluster) + in.LocalUser.DeepCopyInto(&out.LocalUser) + in.LocalTeam.DeepCopyInto(&out.LocalTeam) + in.UISettings.DeepCopyInto(&out.UISettings) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KioskSpec. +func (in *KioskSpec) DeepCopy() *KioskSpec { + if in == nil { + return nil + } + out := new(KioskSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KioskStatus) DeepCopyInto(out *KioskStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KioskStatus. +func (in *KioskStatus) DeepCopy() *KioskStatus { + if in == nil { + return nil + } + out := new(KioskStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *License) DeepCopyInto(out *License) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new License. +func (in *License) DeepCopy() *License { + if in == nil { + return nil + } + out := new(License) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *License) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseList) DeepCopyInto(out *LicenseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]License, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseList. +func (in *LicenseList) DeepCopy() *LicenseList { + if in == nil { + return nil + } + out := new(LicenseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LicenseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseRequest) DeepCopyInto(out *LicenseRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseRequest. +func (in *LicenseRequest) DeepCopy() *LicenseRequest { + if in == nil { + return nil + } + out := new(LicenseRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LicenseRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseRequestList) DeepCopyInto(out *LicenseRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LicenseRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseRequestList. +func (in *LicenseRequestList) DeepCopy() *LicenseRequestList { + if in == nil { + return nil + } + out := new(LicenseRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LicenseRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseRequestSpec) DeepCopyInto(out *LicenseRequestSpec) { + *out = *in + out.Input = in.Input + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseRequestSpec. +func (in *LicenseRequestSpec) DeepCopy() *LicenseRequestSpec { + if in == nil { + return nil + } + out := new(LicenseRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseRequestStatus) DeepCopyInto(out *LicenseRequestStatus) { + *out = *in + out.Output = in.Output + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseRequestStatus. +func (in *LicenseRequestStatus) DeepCopy() *LicenseRequestStatus { + if in == nil { + return nil + } + out := new(LicenseRequestStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseSpec) DeepCopyInto(out *LicenseSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseSpec. +func (in *LicenseSpec) DeepCopy() *LicenseSpec { + if in == nil { + return nil + } + out := new(LicenseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseStatus) DeepCopyInto(out *LicenseStatus) { + *out = *in + if in.Buttons != nil { + in, out := &in.Buttons, &out.Buttons + *out = make(server.Buttons, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(server.Button) + **out = **in + } + } + } + if in.License != nil { + in, out := &in.License, &out.License + *out = new(server.License) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseStatus. +func (in *LicenseStatus) DeepCopy() *LicenseStatus { + if in == nil { + return nil + } + out := new(LicenseStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseToken) DeepCopyInto(out *LicenseToken) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseToken. +func (in *LicenseToken) DeepCopy() *LicenseToken { + if in == nil { + return nil + } + out := new(LicenseToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LicenseToken) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseTokenList) DeepCopyInto(out *LicenseTokenList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LicenseToken, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseTokenList. +func (in *LicenseTokenList) DeepCopy() *LicenseTokenList { + if in == nil { + return nil + } + out := new(LicenseTokenList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LicenseTokenList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseTokenSpec) DeepCopyInto(out *LicenseTokenSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseTokenSpec. +func (in *LicenseTokenSpec) DeepCopy() *LicenseTokenSpec { + if in == nil { + return nil + } + out := new(LicenseTokenSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LicenseTokenStatus) DeepCopyInto(out *LicenseTokenStatus) { + *out = *in + if in.Token != nil { + in, out := &in.Token, &out.Token + *out = new(server.InstanceTokenAuth) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseTokenStatus. +func (in *LicenseTokenStatus) DeepCopy() *LicenseTokenStatus { + if in == nil { + return nil + } + out := new(LicenseTokenStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoftUpgrade) DeepCopyInto(out *LoftUpgrade) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoftUpgrade. +func (in *LoftUpgrade) DeepCopy() *LoftUpgrade { + if in == nil { + return nil + } + out := new(LoftUpgrade) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LoftUpgrade) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoftUpgradeList) DeepCopyInto(out *LoftUpgradeList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LoftUpgrade, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoftUpgradeList. +func (in *LoftUpgradeList) DeepCopy() *LoftUpgradeList { + if in == nil { + return nil + } + out := new(LoftUpgradeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LoftUpgradeList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoftUpgradeSpec) DeepCopyInto(out *LoftUpgradeSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoftUpgradeSpec. +func (in *LoftUpgradeSpec) DeepCopy() *LoftUpgradeSpec { + if in == nil { + return nil + } + out := new(LoftUpgradeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoftUpgradeStatus) DeepCopyInto(out *LoftUpgradeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoftUpgradeStatus. +func (in *LoftUpgradeStatus) DeepCopy() *LoftUpgradeStatus { + if in == nil { + return nil + } + out := new(LoftUpgradeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDC) DeepCopyInto(out *OIDC) { + *out = *in + if in.Clients != nil { + in, out := &in.Clients, &out.Clients + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDC. +func (in *OIDC) DeepCopy() *OIDC { + if in == nil { + return nil + } + out := new(OIDC) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + if in.RedirectURIs != nil { + in, out := &in.RedirectURIs, &out.RedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OwnedAccessKey) DeepCopyInto(out *OwnedAccessKey) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnedAccessKey. +func (in *OwnedAccessKey) DeepCopy() *OwnedAccessKey { + if in == nil { + return nil + } + out := new(OwnedAccessKey) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OwnedAccessKey) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OwnedAccessKeyList) DeepCopyInto(out *OwnedAccessKeyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OwnedAccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnedAccessKeyList. +func (in *OwnedAccessKeyList) DeepCopy() *OwnedAccessKeyList { + if in == nil { + return nil + } + out := new(OwnedAccessKeyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OwnedAccessKeyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OwnedAccessKeySpec) DeepCopyInto(out *OwnedAccessKeySpec) { + *out = *in + in.AccessKeySpec.DeepCopyInto(&out.AccessKeySpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnedAccessKeySpec. +func (in *OwnedAccessKeySpec) DeepCopy() *OwnedAccessKeySpec { + if in == nil { + return nil + } + out := new(OwnedAccessKeySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OwnedAccessKeyStatus) DeepCopyInto(out *OwnedAccessKeyStatus) { + *out = *in + in.AccessKeyStatus.DeepCopyInto(&out.AccessKeyStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnedAccessKeyStatus. +func (in *OwnedAccessKeyStatus) DeepCopy() *OwnedAccessKeyStatus { + if in == nil { + return nil + } + out := new(OwnedAccessKeyStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyViolation) DeepCopyInto(out *PolicyViolation) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyViolation. +func (in *PolicyViolation) DeepCopy() *PolicyViolation { + if in == nil { + return nil + } + out := new(PolicyViolation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PolicyViolation) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyViolationList) DeepCopyInto(out *PolicyViolationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PolicyViolation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyViolationList. +func (in *PolicyViolationList) DeepCopy() *PolicyViolationList { + if in == nil { + return nil + } + out := new(PolicyViolationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PolicyViolationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyViolationSpec) DeepCopyInto(out *PolicyViolationSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyViolationSpec. +func (in *PolicyViolationSpec) DeepCopy() *PolicyViolationSpec { + if in == nil { + return nil + } + out := new(PolicyViolationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyViolationStatus) DeepCopyInto(out *PolicyViolationStatus) { + *out = *in + if in.User != nil { + in, out := &in.User, &out.User + *out = new(clusterv1.EntityInfo) + **out = **in + } + in.Violation.DeepCopyInto(&out.Violation) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyViolationStatus. +func (in *PolicyViolationStatus) DeepCopy() *PolicyViolationStatus { + if in == nil { + return nil + } + out := new(PolicyViolationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PredefinedApp) DeepCopyInto(out *PredefinedApp) { + *out = *in + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PredefinedApp. +func (in *PredefinedApp) DeepCopy() *PredefinedApp { + if in == nil { + return nil + } + out := new(PredefinedApp) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Project) DeepCopyInto(out *Project) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. +func (in *Project) DeepCopy() *Project { + if in == nil { + return nil + } + out := new(Project) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Project) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectChartInfo) DeepCopyInto(out *ProjectChartInfo) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectChartInfo. +func (in *ProjectChartInfo) DeepCopy() *ProjectChartInfo { + if in == nil { + return nil + } + out := new(ProjectChartInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectChartInfo) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectChartInfoList) DeepCopyInto(out *ProjectChartInfoList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectChartInfo, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectChartInfoList. +func (in *ProjectChartInfoList) DeepCopy() *ProjectChartInfoList { + if in == nil { + return nil + } + out := new(ProjectChartInfoList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectChartInfoList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectChartInfoSpec) DeepCopyInto(out *ProjectChartInfoSpec) { + *out = *in + out.ChartInfoSpec = in.ChartInfoSpec + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectChartInfoSpec. +func (in *ProjectChartInfoSpec) DeepCopy() *ProjectChartInfoSpec { + if in == nil { + return nil + } + out := new(ProjectChartInfoSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectChartInfoStatus) DeepCopyInto(out *ProjectChartInfoStatus) { + *out = *in + in.ChartInfoStatus.DeepCopyInto(&out.ChartInfoStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectChartInfoStatus. +func (in *ProjectChartInfoStatus) DeepCopy() *ProjectChartInfoStatus { + if in == nil { + return nil + } + out := new(ProjectChartInfoStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectCharts) DeepCopyInto(out *ProjectCharts) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Charts != nil { + in, out := &in.Charts, &out.Charts + *out = make([]storagev1.HelmChart, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectCharts. +func (in *ProjectCharts) DeepCopy() *ProjectCharts { + if in == nil { + return nil + } + out := new(ProjectCharts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectCharts) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectChartsList) DeepCopyInto(out *ProjectChartsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectCharts, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectChartsList. +func (in *ProjectChartsList) DeepCopy() *ProjectChartsList { + if in == nil { + return nil + } + out := new(ProjectChartsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectChartsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectClusters) DeepCopyInto(out *ProjectClusters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]Cluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Runners != nil { + in, out := &in.Runners, &out.Runners + *out = make([]Runner, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectClusters. +func (in *ProjectClusters) DeepCopy() *ProjectClusters { + if in == nil { + return nil + } + out := new(ProjectClusters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectClusters) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectClustersList) DeepCopyInto(out *ProjectClustersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectClusters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectClustersList. +func (in *ProjectClustersList) DeepCopy() *ProjectClustersList { + if in == nil { + return nil + } + out := new(ProjectClustersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectClustersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportSpace) DeepCopyInto(out *ProjectImportSpace) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SourceSpace = in.SourceSpace + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportSpace. +func (in *ProjectImportSpace) DeepCopy() *ProjectImportSpace { + if in == nil { + return nil + } + out := new(ProjectImportSpace) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectImportSpace) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportSpaceList) DeepCopyInto(out *ProjectImportSpaceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectImportSpace, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportSpaceList. +func (in *ProjectImportSpaceList) DeepCopy() *ProjectImportSpaceList { + if in == nil { + return nil + } + out := new(ProjectImportSpaceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectImportSpaceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportSpaceSource) DeepCopyInto(out *ProjectImportSpaceSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportSpaceSource. +func (in *ProjectImportSpaceSource) DeepCopy() *ProjectImportSpaceSource { + if in == nil { + return nil + } + out := new(ProjectImportSpaceSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportVirtualCluster) DeepCopyInto(out *ProjectImportVirtualCluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SourceVirtualCluster = in.SourceVirtualCluster + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportVirtualCluster. +func (in *ProjectImportVirtualCluster) DeepCopy() *ProjectImportVirtualCluster { + if in == nil { + return nil + } + out := new(ProjectImportVirtualCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectImportVirtualCluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportVirtualClusterList) DeepCopyInto(out *ProjectImportVirtualClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectImportVirtualCluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportVirtualClusterList. +func (in *ProjectImportVirtualClusterList) DeepCopy() *ProjectImportVirtualClusterList { + if in == nil { + return nil + } + out := new(ProjectImportVirtualClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectImportVirtualClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImportVirtualClusterSource) DeepCopyInto(out *ProjectImportVirtualClusterSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImportVirtualClusterSource. +func (in *ProjectImportVirtualClusterSource) DeepCopy() *ProjectImportVirtualClusterSource { + if in == nil { + return nil + } + out := new(ProjectImportVirtualClusterSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectList) DeepCopyInto(out *ProjectList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. +func (in *ProjectList) DeepCopy() *ProjectList { + if in == nil { + return nil + } + out := new(ProjectList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMember) DeepCopyInto(out *ProjectMember) { + *out = *in + out.Info = in.Info + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMember. +func (in *ProjectMember) DeepCopy() *ProjectMember { + if in == nil { + return nil + } + out := new(ProjectMember) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMembers) DeepCopyInto(out *ProjectMembers) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]ProjectMember, len(*in)) + copy(*out, *in) + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]ProjectMember, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMembers. +func (in *ProjectMembers) DeepCopy() *ProjectMembers { + if in == nil { + return nil + } + out := new(ProjectMembers) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMembers) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMembersList) DeepCopyInto(out *ProjectMembersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectMembers, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMembersList. +func (in *ProjectMembersList) DeepCopy() *ProjectMembersList { + if in == nil { + return nil + } + out := new(ProjectMembersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMembersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateSpaceInstance) DeepCopyInto(out *ProjectMigrateSpaceInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SourceSpaceInstance = in.SourceSpaceInstance + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateSpaceInstance. +func (in *ProjectMigrateSpaceInstance) DeepCopy() *ProjectMigrateSpaceInstance { + if in == nil { + return nil + } + out := new(ProjectMigrateSpaceInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMigrateSpaceInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateSpaceInstanceList) DeepCopyInto(out *ProjectMigrateSpaceInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectMigrateSpaceInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateSpaceInstanceList. +func (in *ProjectMigrateSpaceInstanceList) DeepCopy() *ProjectMigrateSpaceInstanceList { + if in == nil { + return nil + } + out := new(ProjectMigrateSpaceInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMigrateSpaceInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateSpaceInstanceSource) DeepCopyInto(out *ProjectMigrateSpaceInstanceSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateSpaceInstanceSource. +func (in *ProjectMigrateSpaceInstanceSource) DeepCopy() *ProjectMigrateSpaceInstanceSource { + if in == nil { + return nil + } + out := new(ProjectMigrateSpaceInstanceSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateVirtualClusterInstance) DeepCopyInto(out *ProjectMigrateVirtualClusterInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SourceVirtualClusterInstance = in.SourceVirtualClusterInstance + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateVirtualClusterInstance. +func (in *ProjectMigrateVirtualClusterInstance) DeepCopy() *ProjectMigrateVirtualClusterInstance { + if in == nil { + return nil + } + out := new(ProjectMigrateVirtualClusterInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMigrateVirtualClusterInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopyInto(out *ProjectMigrateVirtualClusterInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectMigrateVirtualClusterInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateVirtualClusterInstanceList. +func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopy() *ProjectMigrateVirtualClusterInstanceList { + if in == nil { + return nil + } + out := new(ProjectMigrateVirtualClusterInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMigrateVirtualClusterInstanceSource) DeepCopyInto(out *ProjectMigrateVirtualClusterInstanceSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateVirtualClusterInstanceSource. +func (in *ProjectMigrateVirtualClusterInstanceSource) DeepCopy() *ProjectMigrateVirtualClusterInstanceSource { + if in == nil { + return nil + } + out := new(ProjectMigrateVirtualClusterInstanceSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSecret) DeepCopyInto(out *ProjectSecret) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSecret. +func (in *ProjectSecret) DeepCopy() *ProjectSecret { + if in == nil { + return nil + } + out := new(ProjectSecret) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectSecret) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSecretList) DeepCopyInto(out *ProjectSecretList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectSecret, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSecretList. +func (in *ProjectSecretList) DeepCopy() *ProjectSecretList { + if in == nil { + return nil + } + out := new(ProjectSecretList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectSecretList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSecretSpec) DeepCopyInto(out *ProjectSecretSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(storagev1.UserOrTeam) + **out = **in + } + if in.Data != nil { + in, out := &in.Data, &out.Data + *out = make(map[string][]byte, len(*in)) + for key, val := range *in { + var outVal []byte + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]byte, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]storagev1.Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSecretSpec. +func (in *ProjectSecretSpec) DeepCopy() *ProjectSecretSpec { + if in == nil { + return nil + } + out := new(ProjectSecretSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSecretStatus) DeepCopyInto(out *ProjectSecretStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(loftstoragev1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSecretStatus. +func (in *ProjectSecretStatus) DeepCopy() *ProjectSecretStatus { + if in == nil { + return nil + } + out := new(ProjectSecretStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { + *out = *in + in.ProjectSpec.DeepCopyInto(&out.ProjectSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. +func (in *ProjectSpec) DeepCopy() *ProjectSpec { + if in == nil { + return nil + } + out := new(ProjectSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { + *out = *in + in.ProjectStatus.DeepCopyInto(&out.ProjectStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. +func (in *ProjectStatus) DeepCopy() *ProjectStatus { + if in == nil { + return nil + } + out := new(ProjectStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectTemplates) DeepCopyInto(out *ProjectTemplates) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.VirtualClusterTemplates != nil { + in, out := &in.VirtualClusterTemplates, &out.VirtualClusterTemplates + *out = make([]VirtualClusterTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SpaceTemplates != nil { + in, out := &in.SpaceTemplates, &out.SpaceTemplates + *out = make([]SpaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DevPodWorkspaceTemplates != nil { + in, out := &in.DevPodWorkspaceTemplates, &out.DevPodWorkspaceTemplates + *out = make([]DevPodWorkspaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectTemplates. +func (in *ProjectTemplates) DeepCopy() *ProjectTemplates { + if in == nil { + return nil + } + out := new(ProjectTemplates) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectTemplates) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectTemplatesList) DeepCopyInto(out *ProjectTemplatesList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProjectTemplates, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectTemplatesList. +func (in *ProjectTemplatesList) DeepCopy() *ProjectTemplatesList { + if in == nil { + return nil + } + out := new(ProjectTemplatesList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectTemplatesList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedirectToken) DeepCopyInto(out *RedirectToken) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectToken. +func (in *RedirectToken) DeepCopy() *RedirectToken { + if in == nil { + return nil + } + out := new(RedirectToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RedirectToken) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedirectTokenList) DeepCopyInto(out *RedirectTokenList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RedirectToken, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectTokenList. +func (in *RedirectTokenList) DeepCopy() *RedirectTokenList { + if in == nil { + return nil + } + out := new(RedirectTokenList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RedirectTokenList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedirectTokenSpec) DeepCopyInto(out *RedirectTokenSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectTokenSpec. +func (in *RedirectTokenSpec) DeepCopy() *RedirectTokenSpec { + if in == nil { + return nil + } + out := new(RedirectTokenSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedirectTokenStatus) DeepCopyInto(out *RedirectTokenStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectTokenStatus. +func (in *RedirectTokenStatus) DeepCopy() *RedirectTokenStatus { + if in == nil { + return nil + } + out := new(RedirectTokenStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResetAccessKey) DeepCopyInto(out *ResetAccessKey) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetAccessKey. +func (in *ResetAccessKey) DeepCopy() *ResetAccessKey { + if in == nil { + return nil + } + out := new(ResetAccessKey) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResetAccessKey) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResetAccessKeyList) DeepCopyInto(out *ResetAccessKeyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResetAccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetAccessKeyList. +func (in *ResetAccessKeyList) DeepCopy() *ResetAccessKeyList { + if in == nil { + return nil + } + out := new(ResetAccessKeyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResetAccessKeyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResetAccessKeySpec) DeepCopyInto(out *ResetAccessKeySpec) { + *out = *in + in.AccessKeySpec.DeepCopyInto(&out.AccessKeySpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetAccessKeySpec. +func (in *ResetAccessKeySpec) DeepCopy() *ResetAccessKeySpec { + if in == nil { + return nil + } + out := new(ResetAccessKeySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResetAccessKeyStatus) DeepCopyInto(out *ResetAccessKeyStatus) { + *out = *in + in.AccessKeyStatus.DeepCopyInto(&out.AccessKeyStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetAccessKeyStatus. +func (in *ResetAccessKeyStatus) DeepCopy() *ResetAccessKeyStatus { + if in == nil { + return nil + } + out := new(ResetAccessKeyStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Runner) DeepCopyInto(out *Runner) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Runner. +func (in *Runner) DeepCopy() *Runner { + if in == nil { + return nil + } + out := new(Runner) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Runner) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerAccessKey) DeepCopyInto(out *RunnerAccessKey) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerAccessKey. +func (in *RunnerAccessKey) DeepCopy() *RunnerAccessKey { + if in == nil { + return nil + } + out := new(RunnerAccessKey) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerAccessKey) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerAccessKeyList) DeepCopyInto(out *RunnerAccessKeyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RunnerAccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerAccessKeyList. +func (in *RunnerAccessKeyList) DeepCopy() *RunnerAccessKeyList { + if in == nil { + return nil + } + out := new(RunnerAccessKeyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerAccessKeyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerConfig) DeepCopyInto(out *RunnerConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.TokenCaCert != nil { + in, out := &in.TokenCaCert, &out.TokenCaCert + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerConfig. +func (in *RunnerConfig) DeepCopy() *RunnerConfig { + if in == nil { + return nil + } + out := new(RunnerConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerConfigList) DeepCopyInto(out *RunnerConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RunnerConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerConfigList. +func (in *RunnerConfigList) DeepCopy() *RunnerConfigList { + if in == nil { + return nil + } + out := new(RunnerConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerList) DeepCopyInto(out *RunnerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Runner, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerList. +func (in *RunnerList) DeepCopy() *RunnerList { + if in == nil { + return nil + } + out := new(RunnerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerSpec) DeepCopyInto(out *RunnerSpec) { + *out = *in + in.RunnerSpec.DeepCopyInto(&out.RunnerSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerSpec. +func (in *RunnerSpec) DeepCopy() *RunnerSpec { + if in == nil { + return nil + } + out := new(RunnerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerStatus) DeepCopyInto(out *RunnerStatus) { + *out = *in + in.RunnerStatus.DeepCopyInto(&out.RunnerStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerStatus. +func (in *RunnerStatus) DeepCopy() *RunnerStatus { + if in == nil { + return nil + } + out := new(RunnerStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Self) DeepCopyInto(out *Self) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Self. +func (in *Self) DeepCopy() *Self { + if in == nil { + return nil + } + out := new(Self) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Self) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfList) DeepCopyInto(out *SelfList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Self, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfList. +func (in *SelfList) DeepCopy() *SelfList { + if in == nil { + return nil + } + out := new(SelfList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SelfList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfSpec) DeepCopyInto(out *SelfSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSpec. +func (in *SelfSpec) DeepCopy() *SelfSpec { + if in == nil { + return nil + } + out := new(SelfSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfStatus) DeepCopyInto(out *SelfStatus) { + *out = *in + if in.User != nil { + in, out := &in.User, &out.User + *out = new(UserInfo) + (*in).DeepCopyInto(*out) + } + if in.Team != nil { + in, out := &in.Team, &out.Team + *out = new(clusterv1.EntityInfo) + **out = **in + } + if in.AccessKeyScope != nil { + in, out := &in.AccessKeyScope, &out.AccessKeyScope + *out = new(storagev1.AccessKeyScope) + (*in).DeepCopyInto(*out) + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfStatus. +func (in *SelfStatus) DeepCopy() *SelfStatus { + if in == nil { + return nil + } + out := new(SelfStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReview. +func (in *SelfSubjectAccessReview) DeepCopy() *SelfSubjectAccessReview { + if in == nil { + return nil + } + out := new(SelfSubjectAccessReview) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SelfSubjectAccessReview) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfSubjectAccessReviewList) DeepCopyInto(out *SelfSubjectAccessReviewList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SelfSubjectAccessReview, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReviewList. +func (in *SelfSubjectAccessReviewList) DeepCopy() *SelfSubjectAccessReviewList { + if in == nil { + return nil + } + out := new(SelfSubjectAccessReviewList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SelfSubjectAccessReviewList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfSubjectAccessReviewSpec) DeepCopyInto(out *SelfSubjectAccessReviewSpec) { + *out = *in + in.SelfSubjectAccessReviewSpec.DeepCopyInto(&out.SelfSubjectAccessReviewSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReviewSpec. +func (in *SelfSubjectAccessReviewSpec) DeepCopy() *SelfSubjectAccessReviewSpec { + if in == nil { + return nil + } + out := new(SelfSubjectAccessReviewSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelfSubjectAccessReviewStatus) DeepCopyInto(out *SelfSubjectAccessReviewStatus) { + *out = *in + out.SubjectAccessReviewStatus = in.SubjectAccessReviewStatus + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReviewStatus. +func (in *SelfSubjectAccessReviewStatus) DeepCopy() *SelfSubjectAccessReviewStatus { + if in == nil { + return nil + } + out := new(SelfSubjectAccessReviewStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecret) DeepCopyInto(out *SharedSecret) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecret. +func (in *SharedSecret) DeepCopy() *SharedSecret { + if in == nil { + return nil + } + out := new(SharedSecret) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SharedSecret) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretList) DeepCopyInto(out *SharedSecretList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SharedSecret, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretList. +func (in *SharedSecretList) DeepCopy() *SharedSecretList { + if in == nil { + return nil + } + out := new(SharedSecretList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SharedSecretList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretSpec) DeepCopyInto(out *SharedSecretSpec) { + *out = *in + in.SharedSecretSpec.DeepCopyInto(&out.SharedSecretSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretSpec. +func (in *SharedSecretSpec) DeepCopy() *SharedSecretSpec { + if in == nil { + return nil + } + out := new(SharedSecretSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretStatus) DeepCopyInto(out *SharedSecretStatus) { + *out = *in + in.SharedSecretStatus.DeepCopyInto(&out.SharedSecretStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretStatus. +func (in *SharedSecretStatus) DeepCopy() *SharedSecretStatus { + if in == nil { + return nil + } + out := new(SharedSecretStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraint) DeepCopyInto(out *SpaceConstraint) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraint. +func (in *SpaceConstraint) DeepCopy() *SpaceConstraint { + if in == nil { + return nil + } + out := new(SpaceConstraint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceConstraint) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraintList) DeepCopyInto(out *SpaceConstraintList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SpaceConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraintList. +func (in *SpaceConstraintList) DeepCopy() *SpaceConstraintList { + if in == nil { + return nil + } + out := new(SpaceConstraintList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceConstraintList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraintSpec) DeepCopyInto(out *SpaceConstraintSpec) { + *out = *in + in.SpaceConstraintSpec.DeepCopyInto(&out.SpaceConstraintSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraintSpec. +func (in *SpaceConstraintSpec) DeepCopy() *SpaceConstraintSpec { + if in == nil { + return nil + } + out := new(SpaceConstraintSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraintStatus) DeepCopyInto(out *SpaceConstraintStatus) { + *out = *in + out.SpaceConstraintStatus = in.SpaceConstraintStatus + if in.ClusterRole != nil { + in, out := &in.ClusterRole, &out.ClusterRole + *out = new(clusterv1.EntityInfo) + **out = **in + } + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraintStatus. +func (in *SpaceConstraintStatus) DeepCopy() *SpaceConstraintStatus { + if in == nil { + return nil + } + out := new(SpaceConstraintStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstance) DeepCopyInto(out *SpaceInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstance. +func (in *SpaceInstance) DeepCopy() *SpaceInstance { + if in == nil { + return nil + } + out := new(SpaceInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstanceList) DeepCopyInto(out *SpaceInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SpaceInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstanceList. +func (in *SpaceInstanceList) DeepCopy() *SpaceInstanceList { + if in == nil { + return nil + } + out := new(SpaceInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstanceSpec) DeepCopyInto(out *SpaceInstanceSpec) { + *out = *in + in.SpaceInstanceSpec.DeepCopyInto(&out.SpaceInstanceSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstanceSpec. +func (in *SpaceInstanceSpec) DeepCopy() *SpaceInstanceSpec { + if in == nil { + return nil + } + out := new(SpaceInstanceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstanceStatus) DeepCopyInto(out *SpaceInstanceStatus) { + *out = *in + in.SpaceInstanceStatus.DeepCopyInto(&out.SpaceInstanceStatus) + if in.SleepModeConfig != nil { + in, out := &in.SleepModeConfig, &out.SleepModeConfig + *out = new(clusterv1.SleepModeConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstanceStatus. +func (in *SpaceInstanceStatus) DeepCopy() *SpaceInstanceStatus { + if in == nil { + return nil + } + out := new(SpaceInstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplate) DeepCopyInto(out *SpaceTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplate. +func (in *SpaceTemplate) DeepCopy() *SpaceTemplate { + if in == nil { + return nil + } + out := new(SpaceTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateList) DeepCopyInto(out *SpaceTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SpaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateList. +func (in *SpaceTemplateList) DeepCopy() *SpaceTemplateList { + if in == nil { + return nil + } + out := new(SpaceTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateSpec) DeepCopyInto(out *SpaceTemplateSpec) { + *out = *in + in.SpaceTemplateSpec.DeepCopyInto(&out.SpaceTemplateSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateSpec. +func (in *SpaceTemplateSpec) DeepCopy() *SpaceTemplateSpec { + if in == nil { + return nil + } + out := new(SpaceTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateStatus) DeepCopyInto(out *SpaceTemplateStatus) { + *out = *in + out.SpaceTemplateStatus = in.SpaceTemplateStatus + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateStatus. +func (in *SpaceTemplateStatus) DeepCopy() *SpaceTemplateStatus { + if in == nil { + return nil + } + out := new(SpaceTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReview. +func (in *SubjectAccessReview) DeepCopy() *SubjectAccessReview { + if in == nil { + return nil + } + out := new(SubjectAccessReview) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SubjectAccessReview) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubjectAccessReviewList) DeepCopyInto(out *SubjectAccessReviewList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SubjectAccessReview, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewList. +func (in *SubjectAccessReviewList) DeepCopy() *SubjectAccessReviewList { + if in == nil { + return nil + } + out := new(SubjectAccessReviewList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SubjectAccessReviewList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubjectAccessReviewSpec) DeepCopyInto(out *SubjectAccessReviewSpec) { + *out = *in + in.SubjectAccessReviewSpec.DeepCopyInto(&out.SubjectAccessReviewSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewSpec. +func (in *SubjectAccessReviewSpec) DeepCopy() *SubjectAccessReviewSpec { + if in == nil { + return nil + } + out := new(SubjectAccessReviewSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubjectAccessReviewStatus) DeepCopyInto(out *SubjectAccessReviewStatus) { + *out = *in + out.SubjectAccessReviewStatus = in.SubjectAccessReviewStatus + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewStatus. +func (in *SubjectAccessReviewStatus) DeepCopy() *SubjectAccessReviewStatus { + if in == nil { + return nil + } + out := new(SubjectAccessReviewStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Task) DeepCopyInto(out *Task) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task. +func (in *Task) DeepCopy() *Task { + if in == nil { + return nil + } + out := new(Task) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Task) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskList) DeepCopyInto(out *TaskList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Task, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskList. +func (in *TaskList) DeepCopy() *TaskList { + if in == nil { + return nil + } + out := new(TaskList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskLog) DeepCopyInto(out *TaskLog) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskLog. +func (in *TaskLog) DeepCopy() *TaskLog { + if in == nil { + return nil + } + out := new(TaskLog) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskLog) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskLogList) DeepCopyInto(out *TaskLogList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TaskLog, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskLogList. +func (in *TaskLogList) DeepCopy() *TaskLogList { + if in == nil { + return nil + } + out := new(TaskLogList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskLogList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskLogOptions) DeepCopyInto(out *TaskLogOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.SinceSeconds != nil { + in, out := &in.SinceSeconds, &out.SinceSeconds + *out = new(int64) + **out = **in + } + if in.SinceTime != nil { + in, out := &in.SinceTime, &out.SinceTime + *out = (*in).DeepCopy() + } + if in.TailLines != nil { + in, out := &in.TailLines, &out.TailLines + *out = new(int64) + **out = **in + } + if in.LimitBytes != nil { + in, out := &in.LimitBytes, &out.LimitBytes + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskLogOptions. +func (in *TaskLogOptions) DeepCopy() *TaskLogOptions { + if in == nil { + return nil + } + out := new(TaskLogOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskLogOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskSpec) DeepCopyInto(out *TaskSpec) { + *out = *in + in.TaskSpec.DeepCopyInto(&out.TaskSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec. +func (in *TaskSpec) DeepCopy() *TaskSpec { + if in == nil { + return nil + } + out := new(TaskSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskStatus) DeepCopyInto(out *TaskStatus) { + *out = *in + in.TaskStatus.DeepCopyInto(&out.TaskStatus) + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(clusterv1.UserOrTeam) + (*in).DeepCopyInto(*out) + } + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = new(clusterv1.EntityInfo) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskStatus. +func (in *TaskStatus) DeepCopy() *TaskStatus { + if in == nil { + return nil + } + out := new(TaskStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Team) DeepCopyInto(out *Team) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Team. +func (in *Team) DeepCopy() *Team { + if in == nil { + return nil + } + out := new(Team) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Team) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamAccessKeys) DeepCopyInto(out *TeamAccessKeys) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.AccessKeys != nil { + in, out := &in.AccessKeys, &out.AccessKeys + *out = make([]OwnedAccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamAccessKeys. +func (in *TeamAccessKeys) DeepCopy() *TeamAccessKeys { + if in == nil { + return nil + } + out := new(TeamAccessKeys) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamAccessKeys) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamAccessKeysList) DeepCopyInto(out *TeamAccessKeysList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TeamAccessKeys, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamAccessKeysList. +func (in *TeamAccessKeysList) DeepCopy() *TeamAccessKeysList { + if in == nil { + return nil + } + out := new(TeamAccessKeysList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamAccessKeysList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamClusters) DeepCopyInto(out *TeamClusters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]ClusterAccounts, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamClusters. +func (in *TeamClusters) DeepCopy() *TeamClusters { + if in == nil { + return nil + } + out := new(TeamClusters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamClusters) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamClustersList) DeepCopyInto(out *TeamClustersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TeamClusters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamClustersList. +func (in *TeamClustersList) DeepCopy() *TeamClustersList { + if in == nil { + return nil + } + out := new(TeamClustersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamClustersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamList) DeepCopyInto(out *TeamList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Team, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamList. +func (in *TeamList) DeepCopy() *TeamList { + if in == nil { + return nil + } + out := new(TeamList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamSpec) DeepCopyInto(out *TeamSpec) { + *out = *in + in.TeamSpec.DeepCopyInto(&out.TeamSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamSpec. +func (in *TeamSpec) DeepCopy() *TeamSpec { + if in == nil { + return nil + } + out := new(TeamSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamStatus) DeepCopyInto(out *TeamStatus) { + *out = *in + in.TeamStatus.DeepCopyInto(&out.TeamStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamStatus. +func (in *TeamStatus) DeepCopy() *TeamStatus { + if in == nil { + return nil + } + out := new(TeamStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *User) DeepCopyInto(out *User) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User. +func (in *User) DeepCopy() *User { + if in == nil { + return nil + } + out := new(User) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *User) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAccessKeys) DeepCopyInto(out *UserAccessKeys) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.AccessKeys != nil { + in, out := &in.AccessKeys, &out.AccessKeys + *out = make([]OwnedAccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAccessKeys. +func (in *UserAccessKeys) DeepCopy() *UserAccessKeys { + if in == nil { + return nil + } + out := new(UserAccessKeys) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserAccessKeys) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAccessKeysList) DeepCopyInto(out *UserAccessKeysList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserAccessKeys, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAccessKeysList. +func (in *UserAccessKeysList) DeepCopy() *UserAccessKeysList { + if in == nil { + return nil + } + out := new(UserAccessKeysList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserAccessKeysList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserClusters) DeepCopyInto(out *UserClusters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]ClusterAccounts, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserClusters. +func (in *UserClusters) DeepCopy() *UserClusters { + if in == nil { + return nil + } + out := new(UserClusters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserClusters) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserClustersList) DeepCopyInto(out *UserClustersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserClusters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserClustersList. +func (in *UserClustersList) DeepCopy() *UserClustersList { + if in == nil { + return nil + } + out := new(UserClustersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserClustersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserInfo) DeepCopyInto(out *UserInfo) { + *out = *in + out.EntityInfo = in.EntityInfo + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserInfo. +func (in *UserInfo) DeepCopy() *UserInfo { + if in == nil { + return nil + } + out := new(UserInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserList) DeepCopyInto(out *UserList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]User, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList. +func (in *UserList) DeepCopy() *UserList { + if in == nil { + return nil + } + out := new(UserList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserPermissions) DeepCopyInto(out *UserPermissions) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.ClusterRoles != nil { + in, out := &in.ClusterRoles, &out.ClusterRoles + *out = make([]UserPermissionsRole, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NamespaceRoles != nil { + in, out := &in.NamespaceRoles, &out.NamespaceRoles + *out = make([]UserPermissionsRole, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPermissions. +func (in *UserPermissions) DeepCopy() *UserPermissions { + if in == nil { + return nil + } + out := new(UserPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserPermissions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserPermissionsList) DeepCopyInto(out *UserPermissionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserPermissions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPermissionsList. +func (in *UserPermissionsList) DeepCopy() *UserPermissionsList { + if in == nil { + return nil + } + out := new(UserPermissionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserPermissionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserPermissionsRole) DeepCopyInto(out *UserPermissionsRole) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]rbacv1.PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPermissionsRole. +func (in *UserPermissionsRole) DeepCopy() *UserPermissionsRole { + if in == nil { + return nil + } + out := new(UserPermissionsRole) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserProfile) DeepCopyInto(out *UserProfile) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Icon != nil { + in, out := &in.Icon, &out.Icon + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserProfile. +func (in *UserProfile) DeepCopy() *UserProfile { + if in == nil { + return nil + } + out := new(UserProfile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserProfile) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserProfileList) DeepCopyInto(out *UserProfileList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserProfile, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserProfileList. +func (in *UserProfileList) DeepCopy() *UserProfileList { + if in == nil { + return nil + } + out := new(UserProfileList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserProfileList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserQuotasOptions) DeepCopyInto(out *UserQuotasOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserQuotasOptions. +func (in *UserQuotasOptions) DeepCopy() *UserQuotasOptions { + if in == nil { + return nil + } + out := new(UserQuotasOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserQuotasOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserSpacesOptions) DeepCopyInto(out *UserSpacesOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpacesOptions. +func (in *UserSpacesOptions) DeepCopy() *UserSpacesOptions { + if in == nil { + return nil + } + out := new(UserSpacesOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserSpacesOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserSpec) DeepCopyInto(out *UserSpec) { + *out = *in + in.UserSpec.DeepCopyInto(&out.UserSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpec. +func (in *UserSpec) DeepCopy() *UserSpec { + if in == nil { + return nil + } + out := new(UserSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserStatus) DeepCopyInto(out *UserStatus) { + *out = *in + in.UserStatus.DeepCopyInto(&out.UserStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserStatus. +func (in *UserStatus) DeepCopy() *UserStatus { + if in == nil { + return nil + } + out := new(UserStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserVirtualClustersOptions) DeepCopyInto(out *UserVirtualClustersOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserVirtualClustersOptions. +func (in *UserVirtualClustersOptions) DeepCopy() *UserVirtualClustersOptions { + if in == nil { + return nil + } + out := new(UserVirtualClustersOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserVirtualClustersOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstance) DeepCopyInto(out *VirtualClusterInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstance. +func (in *VirtualClusterInstance) DeepCopy() *VirtualClusterInstance { + if in == nil { + return nil + } + out := new(VirtualClusterInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceKubeConfig) DeepCopyInto(out *VirtualClusterInstanceKubeConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceKubeConfig. +func (in *VirtualClusterInstanceKubeConfig) DeepCopy() *VirtualClusterInstanceKubeConfig { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceKubeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceKubeConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceKubeConfigList) DeepCopyInto(out *VirtualClusterInstanceKubeConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterInstanceKubeConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceKubeConfigList. +func (in *VirtualClusterInstanceKubeConfigList) DeepCopy() *VirtualClusterInstanceKubeConfigList { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceKubeConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceKubeConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceKubeConfigSpec) DeepCopyInto(out *VirtualClusterInstanceKubeConfigSpec) { + *out = *in + if in.CertificateTTL != nil { + in, out := &in.CertificateTTL, &out.CertificateTTL + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceKubeConfigSpec. +func (in *VirtualClusterInstanceKubeConfigSpec) DeepCopy() *VirtualClusterInstanceKubeConfigSpec { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceKubeConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceKubeConfigStatus) DeepCopyInto(out *VirtualClusterInstanceKubeConfigStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceKubeConfigStatus. +func (in *VirtualClusterInstanceKubeConfigStatus) DeepCopy() *VirtualClusterInstanceKubeConfigStatus { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceKubeConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceList) DeepCopyInto(out *VirtualClusterInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceList. +func (in *VirtualClusterInstanceList) DeepCopy() *VirtualClusterInstanceList { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceLog) DeepCopyInto(out *VirtualClusterInstanceLog) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceLog. +func (in *VirtualClusterInstanceLog) DeepCopy() *VirtualClusterInstanceLog { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceLog) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceLog) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceLogList) DeepCopyInto(out *VirtualClusterInstanceLogList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterInstanceLog, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceLogList. +func (in *VirtualClusterInstanceLogList) DeepCopy() *VirtualClusterInstanceLogList { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceLogList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceLogList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceLogOptions) DeepCopyInto(out *VirtualClusterInstanceLogOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.SinceSeconds != nil { + in, out := &in.SinceSeconds, &out.SinceSeconds + *out = new(int64) + **out = **in + } + if in.SinceTime != nil { + in, out := &in.SinceTime, &out.SinceTime + *out = (*in).DeepCopy() + } + if in.TailLines != nil { + in, out := &in.TailLines, &out.TailLines + *out = new(int64) + **out = **in + } + if in.LimitBytes != nil { + in, out := &in.LimitBytes, &out.LimitBytes + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceLogOptions. +func (in *VirtualClusterInstanceLogOptions) DeepCopy() *VirtualClusterInstanceLogOptions { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceLogOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceLogOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceSpec) DeepCopyInto(out *VirtualClusterInstanceSpec) { + *out = *in + in.VirtualClusterInstanceSpec.DeepCopyInto(&out.VirtualClusterInstanceSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceSpec. +func (in *VirtualClusterInstanceSpec) DeepCopy() *VirtualClusterInstanceSpec { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceStatus) DeepCopyInto(out *VirtualClusterInstanceStatus) { + *out = *in + in.VirtualClusterInstanceStatus.DeepCopyInto(&out.VirtualClusterInstanceStatus) + if in.SleepModeConfig != nil { + in, out := &in.SleepModeConfig, &out.SleepModeConfig + *out = new(clusterv1.SleepModeConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceStatus. +func (in *VirtualClusterInstanceStatus) DeepCopy() *VirtualClusterInstanceStatus { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceWorkloadKubeConfig) DeepCopyInto(out *VirtualClusterInstanceWorkloadKubeConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceWorkloadKubeConfig. +func (in *VirtualClusterInstanceWorkloadKubeConfig) DeepCopy() *VirtualClusterInstanceWorkloadKubeConfig { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceWorkloadKubeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceWorkloadKubeConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceWorkloadKubeConfigList) DeepCopyInto(out *VirtualClusterInstanceWorkloadKubeConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterInstanceWorkloadKubeConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceWorkloadKubeConfigList. +func (in *VirtualClusterInstanceWorkloadKubeConfigList) DeepCopy() *VirtualClusterInstanceWorkloadKubeConfigList { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceWorkloadKubeConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceWorkloadKubeConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplate) DeepCopyInto(out *VirtualClusterTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplate. +func (in *VirtualClusterTemplate) DeepCopy() *VirtualClusterTemplate { + if in == nil { + return nil + } + out := new(VirtualClusterTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateList) DeepCopyInto(out *VirtualClusterTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateList. +func (in *VirtualClusterTemplateList) DeepCopy() *VirtualClusterTemplateList { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateSpec) DeepCopyInto(out *VirtualClusterTemplateSpec) { + *out = *in + in.VirtualClusterTemplateSpec.DeepCopyInto(&out.VirtualClusterTemplateSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateSpec. +func (in *VirtualClusterTemplateSpec) DeepCopy() *VirtualClusterTemplateSpec { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateStatus) DeepCopyInto(out *VirtualClusterTemplateStatus) { + *out = *in + out.VirtualClusterTemplateStatus = in.VirtualClusterTemplateStatus + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = make([]*clusterv1.EntityInfo, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(clusterv1.EntityInfo) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateStatus. +func (in *VirtualClusterTemplateStatus) DeepCopy() *VirtualClusterTemplateStatus { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/management/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/zz_generated.defaults.go new file mode 100644 index 000000000..6c7613da2 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/management/zz_generated.defaults.go @@ -0,0 +1,17 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package management + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/accesskey_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/accesskey_types.go new file mode 100644 index 000000000..75817ef3d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/accesskey_types.go @@ -0,0 +1,362 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AccessKey holds the session information +// +k8s:openapi-gen=true +type AccessKey struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec AccessKeySpec `json:"spec,omitempty"` + Status AccessKeyStatus `json:"status,omitempty"` +} + +type AccessKeySpec struct { + // The display name shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes an app + // +optional + Description string `json:"description,omitempty"` + + // The user this access key refers to + // +optional + User string `json:"user,omitempty"` + + // The team this access key refers to + // +optional + Team string `json:"team,omitempty"` + + // Subject is a generic subject that can be used + // instead of user or team + // +optional + Subject string `json:"subject,omitempty"` + + // Groups specifies extra groups to apply when using + // this access key + // +optional + Groups []string `json:"groups,omitempty"` + + // The actual access key that will be used as a bearer token + // +optional + Key string `json:"key,omitempty"` + + // If this field is true, the access key is still allowed to exist, + // however will not work to access the api + // +optional + Disabled bool `json:"disabled,omitempty"` + + // The time to life for this access key + // +optional + TTL int64 `json:"ttl,omitempty"` + + // If this is specified, the time to life for this access key will + // start after the lastActivity instead of creation timestamp + // +optional + TTLAfterLastActivity bool `json:"ttlAfterLastActivity,omitempty"` + + // Scope defines the scope of the access key. + // +optional + Scope *AccessKeyScope `json:"scope,omitempty"` + + // The type of an access key, which basically describes if the access + // key is user managed or managed by loft itself. + // +optional + Type AccessKeyType `json:"type,omitempty"` + + // If available, contains information about the sso login data for this + // access key + // +optional + Identity *AccessKeyIdentity `json:"identity,omitempty"` + + // The last time the identity was refreshed + // +optional + IdentityRefresh *metav1.Time `json:"identityRefresh,omitempty"` + + // If the token is a refresh token, contains information about it + // +optional + OIDCProvider *AccessKeyOIDCProvider `json:"oidcProvider,omitempty"` + + // DEPRECATED: do not use anymore + // Parent is used to share OIDC and external token information + // with multiple access keys. Since copying an OIDC refresh token + // would result in the other access keys becoming invalid after a refresh + // parent allows access keys to share that information. + // + // The use case for this is primarily user generated access keys, + // which will have the users current access key as parent if it contains + // an OIDC token. + // +optional + Parent string `json:"parent,omitempty"` + + // DEPRECATED: Use identity instead + // If available, contains information about the oidc login data for this + // access key + // +optional + OIDCLogin *AccessKeyOIDC `json:"oidcLogin,omitempty"` +} + +type AccessKeyScope struct { + // AllowLoftCLI allows certain read-only management requests to + // make sure loft cli works correctly with this specific access key. + // +optional + AllowLoftCLI bool `json:"allowLoftCli,omitempty"` + + // Projects specifies the projects the access key should have access to. + // +optional + Projects []AccessKeyScopeProject `json:"projects,omitempty"` + + // Spaces specifies the spaces the access key is allowed to access. + // +optional + Spaces []AccessKeyScopeSpace `json:"spaces,omitempty"` + + // VirtualClusters specifies the virtual clusters the access key is allowed to access. + // +optional + VirtualClusters []AccessKeyScopeVirtualCluster `json:"virtualClusters,omitempty"` + + // DEPRECATED: Use Projects, Spaces and VirtualClusters instead + // Rules specifies the rules that should apply to the access key. + // +optional + Rules []AccessKeyScopeRule `json:"rules,omitempty"` +} + +type AccessKeyScopeVirtualCluster struct { + // Project is the name of the project. + // +optional + Project string `json:"project,omitempty"` + + // VirtualCluster is the name of the virtual cluster to access. You can specify * to select all virtual clusters. + // +optional + VirtualCluster string `json:"virtualCluster,omitempty"` +} + +type AccessKeyScopeSpace struct { + // Project is the name of the project. + // +optional + Project string `json:"project,omitempty"` + + // Space is the name of the space. You can specify * to select all spaces. + // +optional + Space string `json:"space,omitempty"` +} + +type AccessKeyScopeProject struct { + // Project is the name of the project. You can specify * to select all projects. + // +optional + Project string `json:"project,omitempty"` +} + +// AccessKeyScopeRule describes a rule for the access key +type AccessKeyScopeRule struct { + // The verbs that match this rule. + // An empty list implies every verb. + // +optional + Verbs []string `json:"verbs,omitempty"` + + // Rules can apply to API resources (such as "pods" or "secrets"), + // non-resource URL paths (such as "/api"), or neither, but not both. + // If neither is specified, the rule is treated as a default for all URLs. + + // Resources that this rule matches. An empty list implies all kinds in all API groups. + // +optional + Resources []GroupResources `json:"resources,omitempty"` + + // Namespaces that this rule matches. + // The empty string "" matches non-namespaced resources. + // An empty list implies every namespace. + // +optional + Namespaces []string `json:"namespaces,omitempty"` + + // NonResourceURLs is a set of URL paths that should be checked. + // *s are allowed, but only as the full, final step in the path. + // Examples: + // "/metrics" - Log requests for apiserver metrics + // "/healthz*" - Log all health checks + // +optional + NonResourceURLs []string `json:"nonResourceURLs,omitempty"` + + // RequestTargets is a list of request targets that are allowed. + // An empty list implies every request. + // +optional + RequestTargets []RequestTarget `json:"requestTargets,omitempty"` + + // Cluster that this rule matches. Only applies to cluster requests. + // If this is set, no requests for non cluster requests are allowed. + // An empty cluster means no restrictions will apply. + // +optional + Cluster string `json:"cluster,omitempty"` + + // VirtualClusters that this rule matches. Only applies to virtual cluster requests. + // An empty list means no restrictions will apply. + // +optional + VirtualClusters []AccessKeyVirtualCluster `json:"virtualClusters,omitempty"` +} + +type AccessKeyVirtualCluster struct { + // Name of the virtual cluster. Empty means all virtual clusters. + // +optional + Name string `json:"name,omitempty"` + + // Namespace of the virtual cluster. Empty means all namespaces. + // +optional + Namespace string `json:"namespace,omitempty"` +} + +// RequestTarget defines the target of an incoming request +type RequestTarget string + +// Valid request targets +const ( + // RequestTargetManagement specifies a loft management api request + RequestTargetManagement RequestTarget = "Management" + // RequestTargetCluster specifies a connected kubernetes cluster request + RequestTargetCluster RequestTarget = "Cluster" + // RequestTargetVirtualCluster specifies a virtual kubernetes cluster request + RequestTargetVirtualCluster RequestTarget = "VirtualCluster" + // RequestTargetProjectSpace specifies a project space cluster request + RequestTargetProjectSpace RequestTarget = "ProjectSpace" + // RequestTargetProjectVirtualCluster specifies a project virtual kubernetes cluster request + RequestTargetProjectVirtualCluster RequestTarget = "ProjectVirtualCluster" +) + +// GroupResources represents resource kinds in an API group. +type GroupResources struct { + // Group is the name of the API group that contains the resources. + // The empty string represents the core API group. + // +optional + Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. + // +optional + Resources []string `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"` + // ResourceNames is a list of resource instance names that the policy matches. + // Using this field requires Resources to be specified. + // An empty list implies that every instance of the resource is matched. + // +optional + ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,3,rep,name=resourceNames"` +} + +type AccessKeyIdentity struct { + // The subject of the user + // +optional + UserID string `json:"userId,omitempty"` + + // The username + // +optional + Username string `json:"username,omitempty"` + + // The preferred username / display name + // +optional + PreferredUsername string `json:"preferredUsername,omitempty"` + + // The user email + // +optional + Email string `json:"email,omitempty"` + + // If the user email was verified + // +optional + EmailVerified bool `json:"emailVerified,omitempty"` + + // The groups from the identity provider + // +optional + Groups []string `json:"groups,omitempty"` + + // Connector is the name of the connector this access key was created from + // +optional + Connector string `json:"connector,omitempty"` + + // ConnectorData holds data used by the connector for subsequent requests after initial + // authentication, such as access tokens for upstream providers. + // + // This data is never shared with end users, OAuth clients, or through the API. + // +optional + ConnectorData []byte `json:"connectorData,omitempty"` +} + +type AccessKeyOIDCProvider struct { + // ClientId the token was generated for + // +optional + ClientId string `json:"clientId,omitempty"` + + // Nonce to use + // +optional + Nonce string `json:"nonce,omitempty"` + + // RedirectUri to use + // +optional + RedirectUri string `json:"redirectUri,omitempty"` + + // Scopes to use + // +optional + Scopes string `json:"scopes,omitempty"` +} + +type AccessKeyOIDC struct { + // The current id token that was created during login + // +optional + IDToken []byte `json:"idToken,omitempty"` + + // The current access token that was created during login + // +optional + AccessToken []byte `json:"accessToken,omitempty"` + + // The current refresh token that was created during login + // +optional + RefreshToken []byte `json:"refreshToken,omitempty"` + + // The last time the id token was refreshed + // +optional + LastRefresh *metav1.Time `json:"lastRefresh,omitempty"` +} + +// AccessKeyType describes the type of an access key +type AccessKeyType string + +// These are the valid access key types +const ( + AccessKeyTypeNone AccessKeyType = "" + AccessKeyTypeLogin AccessKeyType = "Login" + AccessKeyTypeUser AccessKeyType = "User" + AccessKeyTypeOther AccessKeyType = "Other" + AccessKeyTypeReset AccessKeyType = "Reset" + AccessKeyTypeOIDCRefreshToken AccessKeyType = "OIDCRefreshToken" +) + +// AccessKeyStatus holds the status of an access key +type AccessKeyStatus struct { + // The last time this access key was used to access the api + // +optional + LastActivity *metav1.Time `json:"lastActivity,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AccessKeyList contains a list of AccessKey +type AccessKeyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []AccessKey `json:"items"` +} + +func init() { + SchemeBuilder.Register(&AccessKey{}, &AccessKeyList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/app_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/app_types.go new file mode 100644 index 000000000..6727708cb --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/app_types.go @@ -0,0 +1,263 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// App holds the app information +// +k8s:openapi-gen=true +type App struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec AppSpec `json:"spec,omitempty"` + Status AppStatus `json:"status,omitempty"` +} + +func (a *App) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *App) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *App) GetAccess() []Access { + return a.Spec.Access +} + +func (a *App) SetAccess(access []Access) { + a.Spec.Access = access +} + +// AppSpec holds the specification +type AppSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes an app + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Clusters are the clusters this app can be installed in. + // +optional + Clusters []string `json:"clusters,omitempty"` + + // RecommendedApp specifies where this app should show up as recommended app + // +optional + RecommendedApp []RecommendedApp `json:"recommendedApp,omitempty"` + + // AppConfig is the app configuration + AppConfig `json:",inline"` + + // Versions are different app versions that can be referenced + // +optional + Versions []AppVersion `json:"versions,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` + + // ======================= + // DEPRECATED FIELDS BELOW + // ======================= + + // DEPRECATED: Use config instead + // manifest represents kubernetes resources that will be deployed into the target namespace + // +optional + Manifests string `json:"manifests,omitempty"` + + // DEPRECATED: Use config instead + // helm defines the configuration for a helm deployment + // +optional + Helm *HelmConfiguration `json:"helm,omitempty"` +} + +type AppVersion struct { + // AppConfig is the app configuration + AppConfig `json:",inline"` + + // Version is the version. Needs to be in X.X.X format. + // +optional + Version string `json:"version,omitempty"` +} + +type AppConfig struct { + // DefaultNamespace is the default namespace this app should installed + // in. + // +optional + DefaultNamespace string `json:"defaultNamespace,omitempty"` + + // Readme is a longer markdown string that describes the app. + // +optional + Readme string `json:"readme,omitempty"` + + // Icon holds an URL to the app icon + // +optional + Icon string `json:"icon,omitempty"` + + // Config is the helm config to use to deploy the helm release + // +optional + Config clusterv1.HelmReleaseConfig `json:"config,omitempty"` + + // Wait determines if Loft should wait during deploy for the app to become ready + // +optional + Wait bool `json:"wait,omitempty"` + + // Timeout is the time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s) + // +optional + Timeout string `json:"timeout,omitempty"` + + // Parameters define additional app parameters that will set helm values + // +optional + Parameters []AppParameter `json:"parameters,omitempty"` + + // ======================= + // DEPRECATED FIELDS BELOW + // ======================= + + // DEPRECATED: Use config.bash instead + // StreamContainer can be used to stream a containers logs instead of the helm output. + // +optional + // +internal + StreamContainer *StreamContainer `json:"streamContainer,omitempty"` +} + +type AppParameter struct { + // Variable is the path of the variable. Can be foo or foo.bar for nested objects. + // +optional + Variable string `json:"variable,omitempty"` + + // Label is the label to show for this parameter + // +optional + Label string `json:"label,omitempty"` + + // Description is the description to show for this parameter + // +optional + Description string `json:"description,omitempty"` + + // Type of the parameter. Can be one of: + // string, multiline, boolean, enum and password + // +optional + Type string `json:"type,omitempty"` + + // Options are the options if type is enum + // +optional + Options []string `json:"options,omitempty"` + + // Min is the minimum number if type is number + // +optional + Min *int `json:"min,omitempty"` + + // Max is the maximum number if type is number + // +optional + Max *int `json:"max,omitempty"` + + // Required specifies if this parameter is required + // +optional + Required bool `json:"required,omitempty"` + + // DefaultValue is the default value if none is specified + // +optional + DefaultValue string `json:"defaultValue,omitempty"` + + // Placeholder shown in the UI + // +optional + Placeholder string `json:"placeholder,omitempty"` + + // Invalidation regex that if matched will reject the input + // +optional + Invalidation string `json:"invalidation,omitempty"` + + // Validation regex that if matched will allow the input + // +optional + Validation string `json:"validation,omitempty"` + + // Section where this app should be displayed. Apps with the same section name will be grouped together + // +optional + Section string `json:"section,omitempty"` +} + +type UserOrTeam struct { + // User specifies a Loft user. + // +optional + User string `json:"user,omitempty"` + + // Team specifies a Loft team. + // +optional + Team string `json:"team,omitempty"` +} + +// HelmConfiguration holds the helm configuration +type HelmConfiguration struct { + // Name of the chart to deploy + Name string `json:"name"` + + // The additional helm values to use. Expected block string + // +optional + Values string `json:"values,omitempty"` + + // Version is the version of the chart to deploy + // +optional + Version string `json:"version,omitempty"` + + // The repo url to use + // +optional + RepoURL string `json:"repoUrl,omitempty"` + + // The username to use for the selected repository + // +optional + Username string `json:"username,omitempty"` + + // The password to use for the selected repository + // +optional + Password string `json:"password,omitempty"` + + // Determines if the remote location uses an insecure + // TLS certificate. + // +optional + Insecure bool `json:"insecure,omitempty"` +} + +// AppStatus holds the status +type AppStatus struct { +} + +// RecommendedApp describes where an app can be displayed as recommended app +type RecommendedApp string + +// Describe the status of a release +// NOTE: Make sure to update cmd/helm/status.go when adding or modifying any of these statuses. +const ( + // RecommendedAppCluster indicates that an app should be displayed as recommended app in the cluster view + RecommendedAppCluster RecommendedApp = "cluster" + // RecommendedAppSpace indicates that an app should be displayed as recommended app in the space view + RecommendedAppSpace RecommendedApp = "space" + // RecommendedAppVirtualCluster indicates that an app should be displayed as recommended app in the virtual cluster view + RecommendedAppVirtualCluster RecommendedApp = "virtualcluster" +) + +func (x RecommendedApp) String() string { return string(x) } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AppList contains a list of App +type AppList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []App `json:"items"` +} + +func init() { + SchemeBuilder.Register(&App{}, &AppList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/cluster_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/cluster_types.go new file mode 100644 index 000000000..ff33556dc --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/cluster_types.go @@ -0,0 +1,171 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Cluster holds the cluster information +// +k8s:openapi-gen=true +type Cluster struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterSpec `json:"spec,omitempty"` + Status ClusterStatus `json:"status,omitempty"` +} + +func (a *Cluster) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *Cluster) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *Cluster) GetAccess() []Access { + return a.Spec.Access +} + +func (a *Cluster) SetAccess(access []Access) { + a.Spec.Access = access +} + +// ClusterSpec holds the cluster specification +type ClusterSpec struct { + // If specified this name is displayed in the UI instead of the metadata name + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a cluster access object + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Holds a reference to a secret that holds the kube config to access this cluster + // +optional + Config SecretRef `json:"config,omitempty"` + + // Local specifies if it is the local cluster that should be connected, when this is specified, config is optional + // +optional + Local bool `json:"local,omitempty"` + + // The namespace where the cluster components will be installed in + // +optional + ManagementNamespace string `json:"managementNamespace,omitempty"` + + // If unusable is true, no spaces or virtual clusters can be scheduled on this cluster. + // +optional + Unusable bool `json:"unusable,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` +} + +type AllowedClusterAccountTemplate struct { + // Name is the name of a cluster account template + // +optional + Name string `json:"name,omitempty"` +} + +// ClusterStatus holds the user status +type ClusterStatus struct { + // +optional + Phase ClusterStatusPhase `json:"phase,omitempty"` + + // +optional + Reason string `json:"reason,omitempty"` + + // +optional + Message string `json:"message,omitempty"` +} + +// ClusterStatusPhase describes the phase of a cluster +type ClusterStatusPhase string + +// These are the valid admin account types +const ( + ClusterStatusPhaseInitializing ClusterStatusPhase = "" + ClusterStatusPhaseInitialized ClusterStatusPhase = "Initialized" + ClusterStatusPhaseFailed ClusterStatusPhase = "Failed" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterList contains a list of Cluster +type ClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Cluster `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Cluster{}, &ClusterList{}) +} + +type HelmChart struct { + // Metadata provides information about a chart + // +optional + Metadata clusterv1.Metadata `json:"metadata,omitempty"` + + // Versions holds all chart versions + // +optional + Versions []string `json:"versions,omitempty"` + + // Repository is the repository name of this chart + // +optional + Repository HelmChartRepository `json:"repository,omitempty"` +} + +type HelmChartRepository struct { + // Name is the name of the repository + // +optional + Name string `json:"name,omitempty"` + + // URL is the repository url + // +optional + URL string `json:"url,omitempty"` + + // Username of the repository + // +optional + Username string `json:"username,omitempty"` + + // Password of the repository + // +optional + Password string `json:"password,omitempty"` + + // Insecure specifies if the chart should be retrieved without TLS + // verification + // +optional + Insecure bool `json:"insecure,omitempty"` +} + +// Chart describes a chart +type Chart struct { + // Name is the chart name in the repository + Name string `json:"name,omitempty"` + + // Version is the chart version in the repository + // +optional + Version string `json:"version,omitempty"` + + // RepoURL is the repo url where the chart can be found + // +optional + RepoURL string `json:"repoURL,omitempty"` + + // The username that is required for this repository + // +optional + Username string `json:"username,omitempty"` + + // The password that is required for this repository + // +optional + Password string `json:"password,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/clusteraccess_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/clusteraccess_types.go new file mode 100644 index 000000000..c3b046e16 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/clusteraccess_types.go @@ -0,0 +1,90 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterAccess holds the global cluster access information +// +k8s:openapi-gen=true +type ClusterAccess struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterAccessSpec `json:"spec,omitempty"` + Status ClusterAccessStatus `json:"status,omitempty"` +} + +func (a *ClusterAccess) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *ClusterAccess) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *ClusterAccess) GetAccess() []Access { + return a.Spec.Access +} + +func (a *ClusterAccess) SetAccess(access []Access) { + a.Spec.Access = access +} + +type ClusterAccessSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a cluster access object + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Clusters are the clusters this template should be applied on. + // +optional + Clusters []string `json:"clusters,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` + + // LocalClusterAccessTemplate holds the cluster access template + // +omitempty + LocalClusterAccessTemplate LocalClusterAccessTemplate `json:"localClusterAccessTemplate,omitempty"` +} + +type LocalClusterAccessTemplate struct { + // Metadata is the metadata of the cluster access object + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + Metadata metav1.ObjectMeta `json:"metadata,omitempty"` + + // LocalClusterAccessSpec holds the spec of the cluster access in the cluster + // +optional + LocalClusterAccessSpec agentstoragev1.LocalClusterAccessSpec `json:"spec,omitempty"` +} + +// ClusterAccessStatus holds the status of a user access +type ClusterAccessStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterAccessList contains a list of ClusterAccess objects +type ClusterAccessList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterAccess `json:"items"` +} + +func init() { + SchemeBuilder.Register(&ClusterAccess{}, &ClusterAccessList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/clusterroletemplate_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/clusterroletemplate_types.go new file mode 100644 index 000000000..6d2b15d44 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/clusterroletemplate_types.go @@ -0,0 +1,131 @@ +package v1 + +import ( + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterRoleTemplate holds the global role template information +// +k8s:openapi-gen=true +type ClusterRoleTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterRoleTemplateSpec `json:"spec,omitempty"` + Status ClusterRoleTemplateStatus `json:"status,omitempty"` +} + +func (a *ClusterRoleTemplate) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *ClusterRoleTemplate) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *ClusterRoleTemplate) GetAccess() []Access { + return a.Spec.Access +} + +func (a *ClusterRoleTemplate) SetAccess(access []Access) { + a.Spec.Access = access +} + +type ClusterRoleTemplateSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a cluster role template object + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Clusters are the clusters this template should be applied on. + // +optional + Clusters []string `json:"clusters,omitempty"` + + // Management defines if this cluster role should be created in the management instance. + // +optional + Management bool `json:"management,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` + + // ClusterRoleTemplate holds the cluster role template + // +optional + ClusterRoleTemplate ClusterRoleTemplateTemplate `json:"clusterRoleTemplate,omitempty"` + + // DEPRECATED: Use ClusterRoleTemplate instead + // LocalClusterRoleTemplate holds the cluster role template + // +omitempty + LocalClusterRoleTemplate *LocalClusterRoleTemplate `json:"localClusterRoleTemplate,omitempty"` +} + +type LocalClusterRoleTemplate struct { + // Metadata is the metadata of the cluster role template object + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + Metadata metav1.ObjectMeta `json:"metadata,omitempty"` + + // LocalClusterRoleTemplateSpec holds the spec of the cluster role template in the cluster + // +optional + LocalClusterRoleTemplateSpec LocalClusterRoleTemplateSpec `json:"spec,omitempty"` +} + +type LocalClusterRoleTemplateSpec struct { + // DisplayName is the name that should be shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description is the description of this object in + // human-readable text. + // +optional + Description string `json:"description,omitempty"` + + // ClusterRoleTemplate holds the cluster role template + // +optional + ClusterRoleTemplate ClusterRoleTemplateTemplate `json:"clusterRoleTemplate,omitempty"` +} + +type ClusterRoleTemplateTemplate struct { + // Standard object's metadata. + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Rules holds all the PolicyRules for this ClusterRole + // +optional + Rules []rbacv1.PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` + + // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. + // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be + // stomped by the controller. + // +optional + AggregationRule *rbacv1.AggregationRule `json:"aggregationRule,omitempty" protobuf:"bytes,3,opt,name=aggregationRule"` +} + +// ClusterRoleTemplateStatus holds the status of a user access +type ClusterRoleTemplateStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterRoleTemplateList contains a list of ClusterRoleTemplate objects +type ClusterRoleTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterRoleTemplate `json:"items"` +} + +func init() { + SchemeBuilder.Register(&ClusterRoleTemplate{}, &ClusterRoleTemplateList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/devpodworkspaceinstance_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/devpodworkspaceinstance_types.go new file mode 100644 index 000000000..a27eef569 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/devpodworkspaceinstance_types.go @@ -0,0 +1,217 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var ( + DevPodWorkspaceConditions = []agentstoragev1.ConditionType{ + InstanceScheduled, + InstanceTemplateResolved, + } + + // DevPodWorkspaceIDLabel holds the actual workspace id of the devpod workspace + DevPodWorkspaceIDLabel = "loft.sh/workspace-id" + + // DevPodWorkspaceUIDLabel holds the actual workspace uid of the devpod workspace + DevPodWorkspaceUIDLabel = "loft.sh/workspace-uid" + + // DevPodWorkspacePictureAnnotation holds the workspace picture url of the devpod workspace + DevPodWorkspacePictureAnnotation = "loft.sh/workspace-picture" + + // DevPodWorkspaceSourceAnnotation holds the workspace source of the devpod workspace + DevPodWorkspaceSourceAnnotation = "loft.sh/workspace-source" +) + +var ( + DevPodFlagsUp = "DEVPOD_FLAGS_UP" + DevPodFlagsDelete = "DEVPOD_FLAGS_DELETE" + DevPodFlagsStatus = "DEVPOD_FLAGS_STATUS" + DevPodFlagsSsh = "DEVPOD_FLAGS_SSH" + DevPodFlagsStop = "DEVPOD_FLAGS_STOP" +) + +// +genclient +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevPodWorkspaceInstance +// +k8s:openapi-gen=true +type DevPodWorkspaceInstance struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DevPodWorkspaceInstanceSpec `json:"spec,omitempty"` + Status DevPodWorkspaceInstanceStatus `json:"status,omitempty"` +} + +func (a *DevPodWorkspaceInstance) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *DevPodWorkspaceInstance) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *DevPodWorkspaceInstance) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *DevPodWorkspaceInstance) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *DevPodWorkspaceInstance) GetAccess() []Access { + return a.Spec.Access +} + +func (a *DevPodWorkspaceInstance) SetAccess(access []Access) { + a.Spec.Access = access +} + +type DevPodWorkspaceInstanceSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a DevPod machine instance + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // TemplateRef holds the DevPod machine template reference + // +optional + TemplateRef *TemplateRef `json:"templateRef,omitempty"` + + // Template is the inline template to use for DevPod machine creation. This is mutually + // exclusive with templateRef. + // +optional + Template *DevPodWorkspaceTemplateDefinition `json:"template,omitempty"` + + // RunnerRef is the reference to the connected runner holding + // this workspace + // +optional + RunnerRef RunnerRef `json:"runnerRef,omitempty"` + + // Parameters are values to pass to the template + // +optional + Parameters string `json:"parameters,omitempty"` + + // Access to the DevPod machine instance object itself + // +optional + Access []Access `json:"access,omitempty"` +} + +type RunnerRef struct { + // Runner is the connected runner the workspace will be created in + // +optional + Runner string `json:"runner,omitempty"` +} + +type DevPodWorkspaceInstanceStatus struct { + // LastWorkspaceStatus is the last workspace status reported by the runner. + // +optional + LastWorkspaceStatus WorkspaceStatus `json:"lastWorkspaceStatus,omitempty"` + + // Phase describes the current phase the DevPod machine instance is in + // +optional + Phase InstancePhase `json:"phase,omitempty"` + + // Reason describes the reason in machine-readable form why the cluster is in the current + // phase + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes the reason in human-readable form why the DevPod machine is in the current + // phase + // +optional + Message string `json:"message,omitempty"` + + // Conditions holds several conditions the DevPod machine might be in + // +optional + Conditions agentstoragev1.Conditions `json:"conditions,omitempty"` + + // Instance is the template rendered with all the parameters + // +optional + Instance *DevPodWorkspaceTemplateDefinition `json:"instance,omitempty"` + + // IgnoreReconciliation ignores reconciliation for this object + // +optional + IgnoreReconciliation bool `json:"ignoreReconciliation,omitempty"` +} + +type WorkspaceStatusResult struct { + ID string `json:"id,omitempty"` + Context string `json:"context,omitempty"` + Provider string `json:"provider,omitempty"` + State string `json:"state,omitempty"` +} + +var AllowedWorkspaceStatus = []WorkspaceStatus{ + WorkspaceStatusNotFound, + WorkspaceStatusStopped, + WorkspaceStatusBusy, + WorkspaceStatusRunning, +} + +type WorkspaceStatus string + +var ( + WorkspaceStatusNotFound WorkspaceStatus = "NotFound" + WorkspaceStatusStopped WorkspaceStatus = "Stopped" + WorkspaceStatusBusy WorkspaceStatus = "Busy" + WorkspaceStatusRunning WorkspaceStatus = "Running" +) + +type DevPodCommandStopOptions struct{} + +type DevPodCommandDeleteOptions struct { + IgnoreNotFound bool `json:"ignoreNotFound,omitempty"` + Force bool `json:"force,omitempty"` + GracePeriod string `json:"gracePeriod,omitempty"` +} + +type DevPodCommandStatusOptions struct { + ContainerStatus bool `json:"containerStatus,omitempty"` +} + +type DevPodCommandUpOptions struct { + // up options + ID string `json:"id,omitempty"` + Source string `json:"source,omitempty"` + IDE string `json:"ide,omitempty"` + IDEOptions []string `json:"ideOptions,omitempty"` + PrebuildRepositories []string `json:"prebuildRepositories,omitempty"` + DevContainerPath string `json:"devContainerPath,omitempty"` + WorkspaceEnv []string `json:"workspaceEnv,omitempty"` + Recreate bool `json:"recreate,omitempty"` + Proxy bool `json:"proxy,omitempty"` + DisableDaemon bool `json:"disableDaemon,omitempty"` + DaemonInterval string `json:"daemonInterval,omitempty"` + + // build options + Repository string `json:"repository,omitempty"` + SkipPush bool `json:"skipPush,omitempty"` + Platform []string `json:"platform,omitempty"` + + // TESTING + ForceBuild bool `json:"forceBuild,omitempty"` + ForceInternalBuildKit bool `json:"forceInternalBuildKit,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevPodWorkspaceInstanceList contains a list of DevPodWorkspaceInstance objects +type DevPodWorkspaceInstanceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstance `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DevPodWorkspaceInstance{}, &DevPodWorkspaceInstanceList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/devpodworkspacetemplate_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/devpodworkspacetemplate_types.go new file mode 100644 index 000000000..3379d0df2 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/devpodworkspacetemplate_types.go @@ -0,0 +1,174 @@ +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevPodWorkspaceTemplate holds the DevPodWorkspaceTemplate information +// +k8s:openapi-gen=true +type DevPodWorkspaceTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DevPodWorkspaceTemplateSpec `json:"spec,omitempty"` + Status DevPodWorkspaceTemplateStatus `json:"status,omitempty"` +} + +func (a *DevPodWorkspaceTemplate) GetVersions() []VersionAccessor { + var retVersions []VersionAccessor + for _, v := range a.Spec.Versions { + b := v + retVersions = append(retVersions, &b) + } + + return retVersions +} + +func (a *DevPodWorkspaceTemplateVersion) GetVersion() string { + return a.Version +} + +func (a *DevPodWorkspaceTemplate) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *DevPodWorkspaceTemplate) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *DevPodWorkspaceTemplate) GetAccess() []Access { + return a.Spec.Access +} + +func (a *DevPodWorkspaceTemplate) SetAccess(access []Access) { + a.Spec.Access = access +} + +// DevPodWorkspaceTemplateSpec holds the specification +type DevPodWorkspaceTemplateSpec struct { + // DisplayName is the name that is shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes the virtual cluster template + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Parameters define additional app parameters that will set provider values + // +optional + Parameters []AppParameter `json:"parameters,omitempty"` + + // Template holds the DevPod workspace template + Template DevPodWorkspaceTemplateDefinition `json:"template,omitempty"` + + // Versions are different versions of the template that can be referenced as well + // +optional + Versions []DevPodWorkspaceTemplateVersion `json:"versions,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` +} + +type DevPodWorkspaceTemplateDefinition struct { + // Provider holds the DevPod provider configuration + Provider DevPodWorkspaceProvider `json:"provider"` + + // SpaceTemplate is the space that should get created for this DevPod. If this is specified, the + // Kubernetes provider will be selected automatically. + // +optional + SpaceTemplate *TemplateRef `json:"spaceTemplate,omitempty"` + + // VirtualClusterTemplate is the virtual cluster that should get created for this DevPod. If this is specified, the + // Kubernetes provider will be selected automatically. + // +optional + VirtualClusterTemplate *TemplateRef `json:"virtualClusterTemplate,omitempty"` + + // WorkspaceEnv are environment variables that should be available within the created workspace. + // +optional + WorkspaceEnv map[string]DevPodProviderOption `json:"workspaceEnv,omitempty"` +} + +type DevPodWorkspaceProvider struct { + // Name is the name of the provider. This can also be an url. + Name string `json:"name"` + + // Options are the provider option values + // +optional + Options map[string]DevPodProviderOption `json:"options,omitempty"` + + // Env are environment options to set when using the provider. + // +optional + Env map[string]DevPodProviderOption `json:"env,omitempty"` +} + +type DevPodProviderOption struct { + // Value of this option. + // +optional + Value string `json:"value,omitempty"` + + // ValueFrom specifies a secret where this value should be taken from. + // +optional + ValueFrom *DevPodProviderOptionFrom `json:"valueFrom,omitempty"` +} + +type DevPodProviderOptionFrom struct { + // ProjectSecretRef is the project secret to use for this value. + // +optional + ProjectSecretRef *corev1.SecretKeySelector `json:"projectSecretRef,omitempty"` + + // SharedSecretRef is the shared secret to use for this value. + // +optional + SharedSecretRef *corev1.SecretKeySelector `json:"sharedSecretRef,omitempty"` +} + +type DevPodProviderSource struct { + // Github source for the provider + Github string `json:"github,omitempty"` + + // File source for the provider + File string `json:"file,omitempty"` + + // URL where the provider was downloaded from + URL string `json:"url,omitempty"` +} + +type DevPodWorkspaceTemplateVersion struct { + // Template holds the DevPod template + // +optional + Template DevPodWorkspaceTemplateDefinition `json:"template,omitempty"` + + // Parameters define additional app parameters that will set provider values + // +optional + Parameters []AppParameter `json:"parameters,omitempty"` + + // Version is the version. Needs to be in X.X.X format. + // +optional + Version string `json:"version,omitempty"` +} + +// DevPodWorkspaceTemplateStatus holds the status +type DevPodWorkspaceTemplateStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevPodWorkspaceTemplateList contains a list of DevPodWorkspaceTemplate +type DevPodWorkspaceTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceTemplate `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DevPodWorkspaceTemplate{}, &DevPodWorkspaceTemplateList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/doc.go new file mode 100644 index 000000000..b91a9d2fd --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/doc.go @@ -0,0 +1,13 @@ +// Api versions allow the api contract for a resource to be changed while keeping +// backward compatibility by support multiple concurrent versions +// of the same resource + +//go:generate go run ../../../../vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i . -h ../../../../boilerplate.go.txt +//go:generate go run ../../../../vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go -O zz_generated.defaults -i . -h ../../../../boilerplate.go.txt +//go:generate go run ../../../../vendor/k8s.io/code-generator/cmd/conversion-gen/main.go -O zz_generated.conversion -i . -h ../../../../boilerplate.go.txt + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:defaulter-gen=TypeMeta +// +groupName=storage.loft.sh +package v1 // import "github.com/loft-sh/api/v3/apis/storage/v1" diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/groupversion_info.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/groupversion_info.go new file mode 100644 index 000000000..927e69511 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/groupversion_info.go @@ -0,0 +1,39 @@ +// Package v1alpha1 contains API Schema definitions for the config v1alpha1 API group +// +kubebuilder:object:generate=true +// +groupName=storage.loft.sh +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "storage.loft.sh", Version: "v1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme + + // SchemeGroupVersion is a shim that expect this to be present in the api package + SchemeGroupVersion = GroupVersion +) + +type AccessAccessor interface { + GetAccess() []Access + SetAccess(access []Access) + + GetOwner() *UserOrTeam + SetOwner(userOrTeam *UserOrTeam) +} + +type VersionsAccessor interface { + GetVersions() []VersionAccessor +} + +type VersionAccessor interface { + GetVersion() string +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/project_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/project_types.go new file mode 100644 index 000000000..a04b157a1 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/project_types.go @@ -0,0 +1,439 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + ArgoIntegrationSynced agentstoragev1.ConditionType = "ArgoIntegrationSynced" + + ArgoLastAppliedHashAnnotation = "loft.sh/argo-integration-last-applied-hash" + ArgoPreviousClusterAnnotation = "loft.sh/argo-integration-previous-cluster" + ArgoPreviousNamespaceAnnotation = "loft.sh/argo-integration-previous-namespace" + ArgoPreviousVirtualClusterInstanceAnnotation = "loft.sh/argo-integration-previous-virtualclusterinstance" +) + +const ( + ConditionTypeVaultIntegration agentstoragev1.ConditionType = "VaultIntegration" + + ConditionReasonVaultIntegrationError = "VaultIntegrationError" + + VaultLastAppliedHashAnnotation = "loft.sh/vault-integration-last-applied-hash" + VaultPreviousClusterAnnotation = "loft.sh/vault-integration-previous-cluster" + VaultPreviousNamespaceAnnotation = "loft.sh/vault-integration-previous-namespace" + VaultPreviousVirtualClusterInstanceAnnotation = "loft.sh/vault-integration-previous-virtualclusterinstance" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Project +// +k8s:openapi-gen=true +type Project struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ProjectSpec `json:"spec,omitempty"` + Status ProjectStatus `json:"status,omitempty"` +} + +func (a *Project) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *Project) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *Project) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *Project) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *Project) GetAccess() []Access { + return a.Spec.Access +} + +func (a *Project) SetAccess(access []Access) { + a.Spec.Access = access +} + +type ProjectSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes an app + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Quotas define the quotas inside the project + // +optional + Quotas Quotas `json:"quotas,omitempty"` + + // AllowedClusters are target clusters that are allowed to target with + // environments. + // +optional + AllowedClusters []AllowedCluster `json:"allowedClusters,omitempty"` + + // AllowedRunners are target runners that are allowed to target with + // DevPod environments. + // +optional + AllowedRunners []AllowedRunner `json:"allowedRunners,omitempty"` + + // AllowedTemplates are the templates that are allowed to use in this + // project. + // +optional + AllowedTemplates []AllowedTemplate `json:"allowedTemplates,omitempty"` + + // Members are the users and teams that are part of this project + // +optional + Members []Member `json:"members,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` + + // NamespacePattern specifies template patterns to use for creating each space or virtual cluster's namespace + // +optional + NamespacePattern *NamespacePattern `json:"namespacePattern,omitempty"` + + // ArgoIntegration holds information about ArgoCD Integration + // +optional + ArgoIntegration *ArgoIntegrationSpec `json:"argoCD,omitempty"` + + // VaultIntegration holds information about Vault Integration + // +optional + VaultIntegration *VaultIntegrationSpec `json:"vault,omitempty"` +} + +type NamespacePattern struct { + // Space holds the namespace pattern to use for space instances + // +optional + Space string `json:"space,omitempty"` + + // VirtualCluster holds the namespace pattern to use for virtual cluster instances + // +optional + VirtualCluster string `json:"virtualCluster,omitempty"` +} + +type Quotas struct { + // Project holds the quotas for the whole project + // +optional + Project map[string]string `json:"project,omitempty"` + + // User holds the quotas per user / team + User map[string]string `json:"user,omitempty"` +} + +var ( + SpaceTemplateKind = "SpaceTemplate" + VirtualClusterTemplateKind = "VirtualClusterTemplate" + DevPodWorkspaceTemplateKind = "DevPodWorkspaceTemplate" +) + +type AllowedTemplate struct { + // Kind of the template that is allowed. Currently only supports DevPodWorkspaceTemplate, VirtualClusterTemplate & SpaceTemplate + // +optional + Kind string `json:"kind,omitempty"` + + // Group of the template that is allowed. Currently only supports storage.loft.sh + // +optional + Group string `json:"group,omitempty"` + + // Name of the template + // +optional + Name string `json:"name,omitempty"` + + // IsDefault specifies if the template should be used as a default + // +optional + IsDefault bool `json:"isDefault,omitempty"` +} + +type Member struct { + // Kind is the kind of the member. Currently either User or Team + // +optional + Kind string `json:"kind,omitempty"` + + // Group of the member. Currently only supports storage.loft.sh + // +optional + Group string `json:"group,omitempty"` + + // Name of the member + // +optional + Name string `json:"name,omitempty"` + + // ClusterRole is the assigned role for the above member + ClusterRole string `json:"clusterRole,omitempty"` +} + +type AllowedRunner struct { + // Name is the name of the runner that is allowed to create an environment in. + // +optional + Name string `json:"name,omitempty"` +} + +type AllowedCluster struct { + // Name is the name of the cluster that is allowed to create an environment in. + // +optional + Name string `json:"name,omitempty"` +} + +type ProjectStatus struct { + // Quotas holds the quota status + // +optional + Quotas *QuotaStatus `json:"quotas,omitempty"` + + // Conditions holds several conditions the project might be in + // +optional + Conditions agentstoragev1.Conditions `json:"conditions,omitempty"` +} + +type QuotaStatus struct { + // Project is the quota status for the whole project + // +optional + Project *QuotaStatusProject `json:"project,omitempty"` + + // User is the quota status for each user / team. An example status + // could look like this: + // status: + // quotas: + // user: + // limit: + // pods: "10" + // spaces: "5" + // users: + // admin: + // used: + // spaces: "3" # <- calculated in our apiserver + // pods: "8" # <- the sum calculated from clusters + // clusters: + // cluster-1: # <- populated by agent from cluster-1 + // users: + // admin: + // pods: "3" + // cluster-2: + // users: + // admin: + // pods: "5" + // +optional + User *QuotaStatusUser `json:"user,omitempty"` +} + +type QuotaStatusUser struct { + // Limit is the amount limited per user / team + // +optional + Limit map[string]string `json:"limit,omitempty"` + + // Used is the used amount per user / team + // +optional + Used QuotaStatusUserUsed `json:"used,omitempty"` + + // Clusters holds the used amount per cluster. Maps cluster name to used resources + // +optional + Clusters map[string]QuotaStatusUserUsed `json:"clusters,omitempty"` +} + +type QuotaStatusUserUsed struct { + // Users is a mapping of users to used resources + // +optional + Users map[string]map[string]string `json:"users,omitempty"` + + // Teams is a mapping of teams to used resources + // +optional + Teams map[string]map[string]string `json:"teams,omitempty"` +} + +type QuotaStatusProject struct { + // Limit is the amount limited, copied from spec.quotas.project + // +optional + Limit map[string]string `json:"limit,omitempty"` + + // Used is the amount currently used across all clusters + // +optional + Used map[string]string `json:"used,omitempty"` + + // Clusters holds the used amount per cluster. Maps cluster name to used resources + // +optional + Clusters map[string]QuotaStatusProjectCluster `json:"clusters,omitempty"` +} + +type QuotaStatusProjectCluster struct { + // Used is the amount currently used. Maps resource name, such as pods, to their + // used amount. + // +optional + Used map[string]string `json:"used,omitempty"` +} + +type ArgoIntegrationSpec struct { + // Enabled indicates if the ArgoCD Integration is enabled for the project -- this knob only + // enables the syncing of virtualclusters, but does not enable SSO integration or project + // creation (see subsequent spec sections!). + // +optional + Enabled bool `json:"enabled,omitempty"` + // Cluster defines the name of the cluster that ArgoCD is deployed into -- if not provided this + // will default to 'loft-cluster'. + // +optional + Cluster string `json:"cluster,omitempty"` + // VirtualClusterInstance defines the name of *virtual cluster* (instance) that ArgoCD is + // deployed into. If provided, Cluster will be ignored and Loft will assume that ArgoCD is + // running in the specified virtual cluster. + // +optional + VirtualClusterInstance string `json:"virtualClusterInstance,omitempty"` + // Namespace defines the namespace in which ArgoCD is running in the cluster. + // +optional + Namespace string `json:"namespace,omitempty"` + // SSO defines single-sign-on related values for the ArgoCD Integration. Enabling SSO will allow + // users to authenticate to ArgoCD via Loft. + // +optional + SSO *ArgoSSOSpec `json:"sso,omitempty"` + // Project defines project related values for the ArgoCD Integration. Enabling Project + // integration will cause Loft to generate and manage an ArgoCD appProject that corresponds to + // the Loft Project. + // +optional + Project *ArgoProjectSpec `json:"project,omitempty"` +} + +type ArgoSSOSpec struct { + // Enabled indicates if the ArgoCD SSO Integration is enabled for this project. Enabling this + // will cause Loft to configure SSO authentication via Loft in ArgoCD. If Projects are *not* + // enabled, all users associated with this Project will be assigned either the 'read-only' + // (default) role, *or* the roles set under the AssignedRoles field. + // +optional + Enabled bool `json:"enabled,omitempty"` + // Host defines the ArgoCD host address that will be used for OIDC authentication between loft + // and ArgoCD. If not specified OIDC integration will be skipped, but vclusters/spaces will + // still be synced to ArgoCD. + // +optional + Host string `json:"host,omitempty"` + // AssignedRoles is a list of roles to assign for users who authenticate via Loft -- by default + // this will be the `read-only` role. If any roles are provided this will override the default + // setting. + // +optional + AssignedRoles []string `json:"assignedRoles,omitempty"` +} + +type ArgoProjectSpec struct { + // Enabled indicates if the ArgoCD Project Integration is enabled for this project. Enabling + // this will cause Loft to create an appProject in ArgoCD that is associated with the Loft + // Project. When Project integration is enabled Loft will override the default assigned role + // set in the SSO integration spec. + // +optional + Enabled bool `json:"enabled,omitempty"` + // Metadata defines additional metadata to attach to the loft created project in ArgoCD. + // +optional + Metadata ArgoProjectSpecMetadata `json:"metadata,omitempty"` + // SourceRepos is a list of source repositories to attach/allow on the project, if not specified + // will be "*" indicating all source repositories. + // +optional + SourceRepos []string `json:"sourceRepos,omitempty"` + // Roles is a list of roles that should be attached to the ArgoCD project. If roles are provided + // no loft default roles will be set. If no roles are provided *and* SSO is enabled, loft will + // configure sane default values. + // +optional + Roles []ArgoProjectRole `json:"roles,omitempty"` +} + +type ArgoProjectSpecMetadata struct { + // ExtraAnnotations are optional annotations that can be attached to the project in ArgoCD. + // +optional + ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"` + // ExtraLabels are optional labels that can be attached to the project in ArgoCD. + // +optional + ExtraLabels map[string]string `json:"extraLabels,omitempty"` + // Description to add to the ArgoCD project. + // +optional + Description string `json:"description,omitempty"` +} + +type ArgoProjectRole struct { + // Name of the ArgoCD role to attach to the project. + Name string `json:"name,omitempty"` + // Description to add to the ArgoCD project. + // +optional + Description string `json:"description,omitempty"` + // Rules ist a list of policy rules to attach to the role. + Rules []ArgoProjectPolicyRule `json:"rules,omitempty"` + // Groups is a list of OIDC group names to bind to the role. + Groups []string `json:"groups,omitempty"` +} + +type ArgoProjectPolicyRule struct { + // Action is one of "*", "get", "create", "update", "delete", "sync", or "override". + // +optional + Action string `json:"action,omitempty"` + // Application is the ArgoCD project/repository to apply the rule to. + // +optional + Application string `json:"application,omitempty"` + // Allow applies the "allow" permission to the rule, if allow is not set, the permission will + // always be set to "deny". + // +optional + Allow bool `json:"permission,omitempty"` +} + +type VaultIntegrationSpec struct { + // Enabled indicates if the Vault Integration is enabled for the project -- this knob only + // enables the syncing of secrets to or from Vault, but does not setup Kubernetes authentication + // methods or Kubernetes secrets engines for vclusters. + // +optional + Enabled bool `json:"enabled,omitempty"` + + // Address defines the address of the Vault instance to use for this project. + // Will default to the `VAULT_ADDR` environment variable if not provided. + // +optional + Address string `json:"address,omitempty"` + + // SkipTLSVerify defines if TLS verification should be skipped when connecting to Vault. + // +optional + SkipTLSVerify bool `json:"skipTLSVerify,omitempty"` + + // Namespace defines the namespace to use when storing secrets in Vault. + // +optional + Namespace string `json:"namespace,omitempty"` + + // Auth defines the authentication method to use for this project. + // +optional + Auth *VaultAuthSpec `json:"auth,omitempty"` + + // SyncInterval defines the interval at which to sync secrets from Vault. + // Defaults to `1m.` + // See https://pkg.go.dev/time#ParseDuration for supported formats. + // +optional + SyncInterval string `json:"syncInterval,omitempty"` +} + +type VaultAuthSpec struct { + // Token defines the token to use for authentication. + // +optional + Token *string `json:"token,omitempty"` + + // TokenSecretRef defines the Kubernetes secret to use for token authentication. + // Will be used if `token` is not provided. + // + // Secret data should contain the `token` key. + // +optional + TokenSecretRef *corev1.SecretKeySelector `json:"tokenSecretRef,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ProjectList contains a list of Project objects +type ProjectList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Project `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Project{}, &ProjectList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/runner_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/runner_types.go new file mode 100644 index 000000000..3b48bf2f0 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/runner_types.go @@ -0,0 +1,229 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var ( + RunnerConditions = []agentstoragev1.ConditionType{ + RunnerDeployed, + } +) + +const ( + RunnerDeployed agentstoragev1.ConditionType = "Deployed" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Runner holds the runner information +// +k8s:openapi-gen=true +type Runner struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec RunnerSpec `json:"spec,omitempty"` + Status RunnerStatus `json:"status,omitempty"` +} + +func (a *Runner) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *Runner) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *Runner) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *Runner) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *Runner) GetAccess() []Access { + return a.Spec.Access +} + +func (a *Runner) SetAccess(access []Access) { + a.Spec.Access = access +} + +type RunnerSpec struct { + // The display name shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a cluster access object + // +optional + Description string `json:"description,omitempty"` + + // If ClusterRef is defined, Loft will schedule the runner on the given + // cluster. + // +optional + ClusterRef *RunnerClusterRef `json:"clusterRef,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // If unusable is true, no DevPod workspaces can be scheduled on this runner. + // +optional + Unusable bool `json:"unusable,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` +} + +type RunnerClusterRef struct { + // Cluster is the connected cluster the space will be created in + // +optional + Cluster string `json:"cluster,omitempty"` + + // Namespace is the namespace inside the connected cluster holding the space + // +optional + Namespace string `json:"namespace,omitempty"` + + // PersistentVolumeClaimTemplate holds additional options for the persistent volume claim + // +optional + PersistentVolumeClaimTemplate *RunnerPersistentVolumeClaimTemplate `json:"persistentVolumeClaimTemplate,omitempty"` + + // PodTemplate holds additional options for the runner pod + // +optional + PodTemplate *RunnerPodTemplate `json:"podTemplate,omitempty"` +} + +type RunnerPodTemplate struct { + // Metadata holds the template metadata + // +optional + Metadata TemplateMetadata `json:"metadata,omitempty"` + + // Spec holds the template spec + // +optional + Spec RunnerPodTemplateSpec `json:"spec,omitempty"` +} + +type RunnerPodTemplateSpec struct { + // Runner pod image to use other than default + // +optional + Image string `json:"image,omitempty"` + + // Resources requirements + // +optional + Resources corev1.ResourceRequirements `json:"resource,omitempty"` + + // List of sources to populate environment variables in the container. + // The keys defined within a source must be a C_IDENTIFIER. All invalid keys + // will be reported as an event when the container is starting. When a key exists in multiple + // sources, the value associated with the last source will take precedence. + // Values defined by an Env with a duplicate key will take precedence. + // Cannot be updated. + // +optional + EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"` + + // List of environment variables to set in the container. + // Cannot be updated. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + + // Set the NodeSelector for the Runner Pod + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + + // Set the Affinity for the Runner Pod + // +optional + Affinity *corev1.Affinity `json:"affinity,omitempty"` + + // Set the Tolerations for the Runner Pod + // +optional + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` + + // Set Volume Mounts for the Runner Pod + // +optional + VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` + + // Set Volumes for the Runner Pod + // +optional + Volumes []corev1.Volume `json:"volumes,omitempty"` + + // Set up Init Containers for the Runner + // +optional + InitContainers []corev1.Container `json:"initContainers,omitempty"` + + // Set host aliases for the Runner Pod + // +optional + HostAliases []corev1.HostAlias `json:"hostAliases,omitempty"` +} + +type RunnerPersistentVolumeClaimTemplate struct { + // Metadata holds the template metadata + // +optional + Metadata TemplateMetadata `json:"metadata,omitempty"` + + // Spec holds the template spec + // +optional + Spec RunnerPersistentVolumeClaimTemplateSpec `json:"spec,omitempty"` +} + +type RunnerPersistentVolumeClaimTemplateSpec struct { + // accessModes contains the desired access modes the volume should have. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + // +optional + AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` + + // storageClassName is the name of the StorageClass required by the claim. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + // +optional + StorageClassName *string `json:"storageClassName,omitempty"` + + // storageSize is the size of the storage to reserve for the pvc + // +optional + StorageSize string `json:"storageSize,omitempty"` +} + +type RunnerStatus struct { + // Phase describes the current phase the space instance is in + // +optional + Phase RunnerStatusPhase `json:"phase,omitempty"` + + // Reason describes the reason in machine-readable form + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes the reason in human-readable form + // +optional + Message string `json:"message,omitempty"` + + // Conditions holds several conditions the virtual cluster might be in + // +optional + Conditions agentstoragev1.Conditions `json:"conditions,omitempty"` +} + +// RunnerStatusPhase describes the phase of a cluster +type RunnerStatusPhase string + +// These are the valid admin account types +const ( + RunnerStatusPhaseInitializing RunnerStatusPhase = "" + RunnerStatusPhaseInitialized RunnerStatusPhase = "Initialized" + RunnerStatusPhaseFailed RunnerStatusPhase = "Failed" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// RunnerList contains a list of Runner +type RunnerList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Runner `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Runner{}, &RunnerList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/sharedsecret_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/sharedsecret_types.go new file mode 100644 index 000000000..3e6d40a24 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/sharedsecret_types.go @@ -0,0 +1,114 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SharedSecret holds the secret information +// +k8s:openapi-gen=true +type SharedSecret struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SharedSecretSpec `json:"spec,omitempty"` + Status SharedSecretStatus `json:"status,omitempty"` +} + +// GetConditions implements conditions.Setter +func (a *SharedSecret) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +// SetConditions implements conditions.Setter +func (a *SharedSecret) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *SharedSecret) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *SharedSecret) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *SharedSecret) GetAccess() []Access { + return a.Spec.Access +} + +func (a *SharedSecret) SetAccess(access []Access) { + a.Spec.Access = access +} + +// SharedSecretSpec holds the specification +type SharedSecretSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a shared secret + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Data contains the secret data. Each key must consist of alphanumeric + // characters, '-', '_' or '.'. The serialized form of the secret data is a + // base64 encoded string, representing the arbitrary (possibly non-string) + // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 + // +optional + Data map[string][]byte `json:"data,omitempty"` + + // Access holds the access rights for users and teams which will be transformed + // to Roles and RoleBindings + // +optional + Access []Access `json:"access,omitempty"` +} + +// Access describes the access to a secret +type Access struct { + // Name is an optional name that is used for this access rule + // +optional + Name string `json:"name,omitempty"` + + // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + Verbs []string `json:"verbs"` + + // Subresources defines the sub resources that are allowed by this access rule + // +optional + Subresources []string `json:"subresources,omitempty"` + + // Users specifies which users should be able to access this secret with the aforementioned verbs + // +optional + Users []string `json:"users,omitempty"` + + // Teams specifies which teams should be able to access this secret with the aforementioned verbs + // +optional + Teams []string `json:"teams,omitempty"` +} + +// SharedSecretStatus holds the status +type SharedSecretStatus struct { + // Conditions holds several conditions the project might be in + // +optional + Conditions agentstoragev1.Conditions `json:"conditions,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SharedSecretList contains a list of SharedSecret +type SharedSecretList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SharedSecret `json:"items"` +} + +func init() { + SchemeBuilder.Register(&SharedSecret{}, &SharedSecretList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/spaceconstraint_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/spaceconstraint_types.go new file mode 100644 index 000000000..029a83ace --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/spaceconstraint_types.go @@ -0,0 +1,126 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SpaceConstraint holds the global space constraint information +// +k8s:openapi-gen=true +type SpaceConstraint struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SpaceConstraintSpec `json:"spec,omitempty"` + Status SpaceConstraintStatus `json:"status,omitempty"` +} + +func (a *SpaceConstraint) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *SpaceConstraint) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *SpaceConstraint) GetAccess() []Access { + return a.Spec.Access +} + +func (a *SpaceConstraint) SetAccess(access []Access) { + a.Spec.Access = access +} + +type SpaceConstraintSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a space constraint object + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Clusters are the clusters this template should be applied on. + // +optional + Clusters []string `json:"clusters,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` + + // LocalSpaceConstraintTemplate holds the space constraint template + // +omitempty + LocalSpaceConstraintTemplate LocalSpaceConstraintTemplate `json:"localSpaceConstraintTemplate,omitempty"` +} + +type LocalSpaceConstraintTemplate struct { + // Metadata is the metadata of the space constraint object + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + Metadata metav1.ObjectMeta `json:"metadata,omitempty"` + + // LocalSpaceConstraintSpec holds the spec of the space constraint in the cluster + // +optional + LocalSpaceConstraintSpec LocalSpaceConstraintSpec `json:"spec,omitempty"` +} + +type LocalSpaceConstraintSpec struct { + // DisplayName is the name that should be shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description is the description of this object in + // human-readable text. + // +optional + Description string `json:"description,omitempty"` + + // SpaceTemplate holds the space configuration + // +optional + SpaceTemplate ConstraintSpaceTemplate `json:"spaceTemplate,omitempty"` + + // Sync specifies if spaces that were created through this space constraint + // object should get synced with this object. + // +optional + Sync bool `json:"sync,omitempty"` +} + +// ConstraintSpaceTemplate defines properties how many spaces can be owned by the account and how they should be created +type ConstraintSpaceTemplate struct { + // The enforced metadata of the space to create. Currently, only annotations and labels are supported + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // This defines the cluster role that will be used for the rolebinding when + // creating a new space for the selected subjects + // +optional + ClusterRole *string `json:"clusterRole,omitempty"` + + // Objects are Kubernetes style yamls that should get deployed into the space + // +optional + Objects string `json:"objects,omitempty"` +} + +// SpaceConstraintStatus holds the status of a user access +type SpaceConstraintStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SpaceConstraintList contains a list of SpaceConstraint objects +type SpaceConstraintList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SpaceConstraint `json:"items"` +} + +func init() { + SchemeBuilder.Register(&SpaceConstraint{}, &SpaceConstraintList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/spaceinstance_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/spaceinstance_types.go new file mode 100644 index 000000000..1d80842ff --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/spaceinstance_types.go @@ -0,0 +1,225 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var ( + SpaceConditions = []agentstoragev1.ConditionType{ + InstanceScheduled, + InstanceTemplateResolved, + InstanceSpaceSynced, + InstanceSpaceReady, + } +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SpaceInstance +// +k8s:openapi-gen=true +type SpaceInstance struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SpaceInstanceSpec `json:"spec,omitempty"` + Status SpaceInstanceStatus `json:"status,omitempty"` +} + +func (a *SpaceInstance) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *SpaceInstance) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *SpaceInstance) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *SpaceInstance) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *SpaceInstance) GetAccess() []Access { + return a.Spec.Access +} + +func (a *SpaceInstance) SetAccess(access []Access) { + a.Spec.Access = access +} + +type SpaceInstanceSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a space instance + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // TemplateRef holds the space template reference + // +optional + TemplateRef *TemplateRef `json:"templateRef,omitempty"` + + // Template is the inline template to use for space creation. This is mutually + // exclusive with templateRef. + // +optional + Template *SpaceTemplateDefinition `json:"template,omitempty"` + + // ClusterRef is the reference to the connected cluster holding + // this space + // +optional + ClusterRef ClusterRef `json:"clusterRef,omitempty"` + + // Parameters are values to pass to the template + // +optional + Parameters string `json:"parameters,omitempty"` + + // ExtraAccessRules defines extra rules which users and teams should have which access to the virtual + // cluster. + // +optional + ExtraAccessRules []agentstoragev1.InstanceAccessRule `json:"extraAccessRules,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` +} + +type ClusterRef struct { + // Cluster is the connected cluster the space will be created in + // +optional + Cluster string `json:"cluster,omitempty"` + + // Namespace is the namespace inside the connected cluster holding the space + // +optional + Namespace string `json:"namespace,omitempty"` +} + +type VirtualClusterClusterRef struct { + ClusterRef `json:",inline"` + + // VirtualCluster is the name of the virtual cluster inside the namespace + // +optional + VirtualCluster string `json:"virtualCluster,omitempty"` +} + +type TemplateRef struct { + // Name holds the name of the template to reference. + // +optional + Name string `json:"name,omitempty"` + + // Version holds the template version to use. Version is expected to + // be in semantic versioning format. Alternatively, you can also exchange + // major, minor or patch with an 'x' to tell Loft to automatically select + // the latest major, minor or patch version. + // +optional + Version string `json:"version,omitempty"` + + // SyncOnce tells the controller to sync the instance once with the template. + // This is useful if you want to sync an instance after a template was changed. + // To automatically sync an instance with a template, use 'x.x.x' as version + // instead. + // +optional + SyncOnce bool `json:"syncOnce,omitempty"` +} + +type SpaceInstanceStatus struct { + // Phase describes the current phase the space instance is in + // +optional + Phase InstancePhase `json:"phase,omitempty"` + + // Reason describes the reason in machine-readable form + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes the reason in human-readable form + // +optional + Message string `json:"message,omitempty"` + + // Conditions holds several conditions the virtual cluster might be in + // +optional + Conditions agentstoragev1.Conditions `json:"conditions,omitempty"` + + // SpaceObjects are the objects that were applied within the virtual cluster space + // +optional + SpaceObjects *agentstoragev1.ObjectsStatus `json:"spaceObjects,omitempty"` + + // Space is the template rendered with all the parameters + // +optional + Space *SpaceTemplateDefinition `json:"space,omitempty"` + + // IgnoreReconciliation tells the controller to ignore reconciliation for this instance -- this + // is primarily used when migrating virtual cluster instances from project to project; this + // prevents a situation where there are two virtual cluster instances representing the same + // virtual cluster which could cause issues with concurrent reconciliations of the same object. + // Once the virtual cluster instance has been cloned and placed into the new project, this + // (the "old") virtual cluster instance can safely be deleted. + IgnoreReconciliation bool `json:"ignoreReconciliation,omitempty"` +} + +type InstanceDeployedAppStatus struct { + // Name of the app that should get deployed + // +optional + Name string `json:"name,omitempty"` + + // Namespace specifies in which target namespace the app should + // get deployed in. Only used for virtual cluster apps. + // +optional + Namespace string `json:"namespace,omitempty"` + + // ReleaseName of the target app + // +optional + ReleaseName string `json:"releaseName,omitempty"` + + // Version of the app that should get deployed + // +optional + Version string `json:"version,omitempty"` + + // Phase describes the current phase the app deployment is in + // +optional + Phase InstanceDeployedAppPhase `json:"phase,omitempty"` + + // Reason describes the reason in machine-readable form + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes the reason in human-readable form + // +optional + Message string `json:"message,omitempty"` +} + +type InstanceDeployedAppPhase string + +var ( + InstanceDeployedAppDeployed = "Deployed" + InstanceDeployedAppFailed = "Failed" +) + +type InstancePhase string + +var ( + InstanceReady InstancePhase = "Ready" + InstanceSleeping InstancePhase = "Sleeping" + InstanceFailed InstancePhase = "Failed" + InstancePending InstancePhase = "Pending" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SpaceInstanceList contains a list of SpaceInstance objects +type SpaceInstanceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SpaceInstance `json:"items"` +} + +func init() { + SchemeBuilder.Register(&SpaceInstance{}, &SpaceInstanceList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/spacetemplate_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/spacetemplate_types.go new file mode 100644 index 000000000..48f24848b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/spacetemplate_types.go @@ -0,0 +1,147 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SpaceTemplate holds the space template information +// +k8s:openapi-gen=true +type SpaceTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec SpaceTemplateSpec `json:"spec,omitempty"` + Status SpaceTemplateStatus `json:"status,omitempty"` +} + +func (a *SpaceTemplate) GetVersions() []VersionAccessor { + var retVersions []VersionAccessor + for _, v := range a.Spec.Versions { + b := v + retVersions = append(retVersions, &b) + } + + return retVersions +} + +func (a *SpaceTemplateVersion) GetVersion() string { + return a.Version +} + +func (a *SpaceTemplate) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *SpaceTemplate) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *SpaceTemplate) GetAccess() []Access { + return a.Spec.Access +} + +func (a *SpaceTemplate) SetAccess(access []Access) { + a.Spec.Access = access +} + +// SpaceTemplateSpec holds the specification +type SpaceTemplateSpec struct { + // DisplayName is the name that is shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes the space template + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Template holds the space template + // +optional + Template SpaceTemplateDefinition `json:"template,omitempty"` + + // Parameters define additional app parameters that will set helm values + // +optional + Parameters []AppParameter `json:"parameters,omitempty"` + + // Versions are different space template versions that can be referenced as well + // +optional + Versions []SpaceTemplateVersion `json:"versions,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` +} + +type SpaceTemplateVersion struct { + // Template holds the space template + // +optional + Template SpaceTemplateDefinition `json:"template,omitempty"` + + // Parameters define additional app parameters that will set helm values + // +optional + Parameters []AppParameter `json:"parameters,omitempty"` + + // Version is the version. Needs to be in X.X.X format. + // +optional + Version string `json:"version,omitempty"` +} + +type SpaceTemplateDefinition struct { + // The space metadata + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + TemplateMetadata `json:"metadata,omitempty"` + + // InstanceTemplate holds the space instance template + // +optional + InstanceTemplate SpaceInstanceTemplateDefinition `json:"instanceTemplate,omitempty"` + + // Objects are Kubernetes style yamls that should get deployed into the virtual cluster + // +optional + Objects string `json:"objects,omitempty"` + + // Charts are helm charts that should get deployed + // +optional + Charts []agentstoragev1.TemplateHelmChart `json:"charts,omitempty"` + + // Apps specifies the apps that should get deployed by this template + // +optional + Apps []agentstoragev1.AppReference `json:"apps,omitempty"` + + // The space access + // +optional + Access *agentstoragev1.InstanceAccess `json:"access,omitempty"` +} + +// SpaceInstanceTemplateDefinition holds the space instance template +type SpaceInstanceTemplateDefinition struct { + // The space instance metadata + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + TemplateMetadata `json:"metadata,omitempty"` +} + +// SpaceTemplateStatus holds the status +type SpaceTemplateStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SpaceTemplateList contains a list of SpaceTemplate +type SpaceTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SpaceTemplate `json:"items"` +} + +func init() { + SchemeBuilder.Register(&SpaceTemplate{}, &SpaceTemplateList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/task_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/task_types.go new file mode 100644 index 000000000..d424d986d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/task_types.go @@ -0,0 +1,305 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +k8s:openapi-gen=true +type Task struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TaskSpec `json:"spec,omitempty"` + Status TaskStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (a *Task) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (a *Task) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *Task) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *Task) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *Task) GetAccess() []Access { + return a.Spec.Access +} + +func (a *Task) SetAccess(access []Access) { + a.Spec.Access = access +} + +type TaskSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` + + // Scope defines the scope of the access key. + // +optional + Scope *AccessKeyScope `json:"scope,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Target where this task should get executed + // +optional + Target Target `json:"target,omitempty"` + + // Task defines the task to execute + // +optional + Task TaskDefinition `json:"task,omitempty"` +} + +type TaskDefinition struct { + // AppTask is an app task + // +optional + AppTask *AppTask `json:"appTask,omitempty"` + + // HelmTask executes a helm command + // +optional + HelmTask *HelmTask `json:"helm,omitempty"` + + // SpaceCreationTask creates a new space + // +optional + SpaceCreationTask *SpaceCreationTask `json:"spaceCreation,omitempty"` + + // VirtualClusterCreationTask creates a new virtual cluster + // +optional + VirtualClusterCreationTask *VirtualClusterCreationTask `json:"virtualClusterCreation,omitempty"` +} + +type VirtualClusterCreationTask struct { + // The virtual cluster metadata + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + Metadata metav1.ObjectMeta `json:"metadata,omitempty"` + + // The virtual cluster access + // +optional + Access *agentstoragev1.InstanceAccess `json:"access,omitempty"` + + // The helm release configuration for the virtual cluster. + // +optional + HelmRelease agentstoragev1.VirtualClusterHelmRelease `json:"helmRelease,omitempty"` + + // Objects is the optional objects configuration for the virtual cluster + // +optional + Objects string `json:"objects,omitempty"` + + // Wait defines if the task should wait until the virtual cluster is ready + // +optional + Wait bool `json:"wait,omitempty"` + + // Apps specifies the apps that should get deployed by this template + // +optional + Apps []agentstoragev1.AppReference `json:"apps,omitempty"` + + // SpaceCreationTask creates a new space if defined for the virtual cluster + // +optional + SpaceCreationTask *SpaceCreationTask `json:"spaceCreation,omitempty"` +} + +type SpaceCreationTask struct { + // Metadata of the space + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + Metadata metav1.ObjectMeta `json:"metadata,omitempty"` + + // Objects are objects to put into the space + // +optional + Objects string `json:"objects,omitempty"` + + // Owner defines the space owner + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Apps specifies the apps that should get deployed by this template + // +optional + Apps []agentstoragev1.AppReference `json:"apps,omitempty"` +} + +type AppTask struct { + // Type is the task type. Defaults to Upgrade + // +optional + Type HelmTaskType `json:"type,omitempty"` + + // RollbackRevision is the revision to rollback to + // +optional + RollbackRevision string `json:"rollbackRevision,omitempty"` + + // AppReference is the reference to the app to deploy + // +optional + AppReference agentstoragev1.AppReference `json:"appReference,omitempty"` +} + +type HelmTask struct { + // Release holds the release information + // +optional + Release HelmTaskRelease `json:"release,omitempty"` + + // Type is the task type. Defaults to Upgrade + // +optional + Type HelmTaskType `json:"type,omitempty"` + + // RollbackRevision is the revision to rollback to + // +optional + RollbackRevision string `json:"rollbackRevision,omitempty"` +} + +type HelmTaskRelease struct { + // Name is the name of the release + Name string `json:"name,omitempty"` + + // Namespace of the release, if empty will use the target namespace + // +optional + Namespace string `json:"namespace,omitempty"` + + // Config is the helm config to use to deploy the release + // +optional + Config clusterv1.HelmReleaseConfig `json:"config,omitempty"` + + // ======================= + // DEPRECATED FIELDS BELOW + // ======================= + + // Labels are additional labels for the helm release. + // +optional + Labels map[string]string `json:"labels,omitempty"` +} + +type StreamContainer struct { + // Label selector for pods. The newest matching pod will be used to stream logs from + // +optional + Selector metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"` + + // Container is the container name to use + // +optional + Container string `json:"container,omitempty"` +} + +type TaskStatus struct { + // Started determines if the task was started + // +optional + Started bool `json:"started,omitempty"` + + // Conditions holds several conditions the virtual cluster might be in + // +optional + Conditions agentstoragev1.Conditions `json:"conditions,omitempty"` + + // PodPhase describes the phase this task is in + // +optional + PodPhase corev1.PodPhase `json:"podPhase,omitempty"` + + // ObservedGeneration is the latest generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // DEPRECATED: This is not set anymore after migrating to runners + // ContainerState describes the container state of the task + // +optional + ContainerState *corev1.ContainerStatus `json:"containerState,omitempty"` +} + +// Common ConditionTypes used by Cluster API objects. +const ( + // TaskStartedCondition defines the task started condition type that summarizes the operational state of the virtual cluster API object. + TaskStartedCondition agentstoragev1.ConditionType = "TaskStarted" +) + +// HelmTaskType describes the type of a task +type HelmTaskType string + +// These are the valid admin account types +const ( + HelmTaskTypeInstall HelmTaskType = "Install" + HelmTaskTypeUpgrade HelmTaskType = "Upgrade" + HelmTaskTypeDelete HelmTaskType = "Delete" + HelmTaskTypeRollback HelmTaskType = "Rollback" +) + +type Target struct { + // SpaceInstance defines a space instance as target + // +optional + SpaceInstance *TargetInstance `json:"spaceInstance,omitempty"` + + // VirtualClusterInstance defines a virtual cluster instance as target + // +optional + VirtualClusterInstance *TargetInstance `json:"virtualClusterInstance,omitempty"` + + // Cluster defines a connected cluster as target + // +optional + Cluster *TargetCluster `json:"cluster,omitempty"` + + // VirtualCluster defines a virtual cluster as target + // +optional + VirtualCluster *TargetVirtualCluster `json:"virtualCluster,omitempty"` +} + +type TargetInstance struct { + // Name is the name of the instance + // +optional + Name string `json:"name,omitempty"` + + // Project where the instance is in + // +optional + Project string `json:"project,omitempty"` +} + +type TargetCluster struct { + // Cluster is the cluster where the task should get executed + // +optional + Cluster string `json:"cluster,omitempty"` + + // Namespace is the namespace where the task should get executed + // +optional + Namespace string `json:"namespace,omitempty"` +} + +type TargetVirtualCluster struct { + // Cluster is the cluster where the virtual cluster lies + // +optional + Cluster string `json:"cluster,omitempty"` + + // Namespace is the namespace where the virtual cluster is located + // +optional + Namespace string `json:"namespace,omitempty"` + + // Name of the virtual cluster + // +optional + Name string `json:"name,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TaskList contains a list of Task +type TaskList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Task `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Task{}, &TaskList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/team_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/team_types.go new file mode 100644 index 000000000..639fa11d0 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/team_types.go @@ -0,0 +1,103 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// User holds the user information +// +k8s:openapi-gen=true +type Team struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TeamSpec `json:"spec,omitempty"` + Status TeamStatus `json:"status,omitempty"` +} + +func (a *Team) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *Team) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *Team) GetAccess() []Access { + return a.Spec.Access +} + +func (a *Team) SetAccess(access []Access) { + a.Spec.Access = access +} + +type TeamSpec struct { + // The display name shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a cluster access object + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // The username of the team that will be used for identification and docker registry namespace + // +optional + Username string `json:"username,omitempty"` + + // The loft users that belong to a team + // +optional + Users []string `json:"users,omitempty"` + + // The groups defined in a token that belong to a team + // +optional + Groups []string `json:"groups,omitempty"` + + // ImagePullSecrets holds secret references to image pull + // secrets the team has access to. + // +optional + ImagePullSecrets []*KindSecretRef `json:"imagePullSecrets,omitempty"` + + // ClusterAccountTemplates that should be applied for the user + // +optional + ClusterAccountTemplates []UserClusterAccountTemplate `json:"clusterAccountTemplates,omitempty"` + + // ClusterRoles define the cluster roles that the users should have assigned in the cluster. + // +optional + ClusterRoles []agentstoragev1.ClusterRoleRef `json:"clusterRoles,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` +} + +type TeamStatus struct { + // Clusters holds information about which clusters the user has accounts in + // +optional + Clusters []AccountClusterStatus `json:"clusters,omitempty"` + + // ClusterAccountTemplates holds information about which cluster account templates were applied + // DEPRECATED: Use status.clusters instead + // +optional + ClusterAccountTemplates []UserClusterAccountTemplateStatus `json:"clusterAccountTemplates,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TeamList contains a list of Team +type TeamList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Team `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Team{}, &TeamList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/user_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/user_types.go new file mode 100644 index 000000000..e956dc585 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/user_types.go @@ -0,0 +1,314 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// User holds the user information +// +k8s:openapi-gen=true +type User struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec UserSpec `json:"spec,omitempty"` + Status UserStatus `json:"status,omitempty"` +} + +func (a *User) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *User) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *User) GetAccess() []Access { + return a.Spec.Access +} + +func (a *User) SetAccess(access []Access) { + a.Spec.Access = access +} + +type UserSpec struct { + // The display name shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a cluster access object + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // The username that is used to login + Username string `json:"username,omitempty"` + + // The URL to an icon that should be shown for the user + // +optional + Icon string `json:"icon,omitempty"` + + // The users email address + // +optional + Email string `json:"email,omitempty"` + + // The user subject as presented by the token + Subject string `json:"subject,omitempty"` + + // The groups the user has access to + // +optional + Groups []string `json:"groups,omitempty"` + + // SSOGroups is used to remember groups that were + // added from sso. + // +optional + SSOGroups []string `json:"ssoGroups,omitempty"` + + // A reference to the user password + // +optional + PasswordRef *SecretRef `json:"passwordRef,omitempty"` + + // Deprecated: Use the Access Key CRD instead + // A reference to the users access keys + // +optional + AccessKeysRef *SecretRef `json:"accessKeysRef,omitempty"` + + // A reference to the users access keys + // +optional + CodesRef *SecretRef `json:"codesRef,omitempty"` + + // ImagePullSecrets holds secret references to image pull + // secrets the user has access to. + // +optional + ImagePullSecrets []*KindSecretRef `json:"imagePullSecrets,omitempty"` + + // ClusterAccountTemplates that should be applied for the user + // +optional + ClusterAccountTemplates []UserClusterAccountTemplate `json:"clusterAccountTemplates,omitempty"` + + // TokenGeneration can be used to invalidate all user tokens + // +optional + TokenGeneration int64 `json:"tokenGeneration,omitempty"` + + // If disabled is true, an user will not be able to login anymore. All other user resources + // are unaffected and other users can still interact with this user + // +optional + Disabled bool `json:"disabled,omitempty"` + + // ClusterRoles define the cluster roles that the users should have assigned in the cluster. + // +optional + ClusterRoles []agentstoragev1.ClusterRoleRef `json:"clusterRoles,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` +} + +type UserClusterAccountTemplate struct { + // Name of the cluster account template to apply + // +optional + Name string `json:"name,omitempty"` + + // Sync defines if Loft should sync changes to the cluster account template + // to the cluster accounts and create new accounts if new clusters match the templates. + // +optional + Sync bool `json:"sync,omitempty"` + + // AccountName is the name of the account that should + // be created. Defaults to the user or team kubernetes name. + // +optional + AccountName string `json:"accountName,omitempty"` +} + +// UserStatus holds the status of an user +type UserStatus struct { + // Clusters holds information about which clusters the user has accounts in + // +optional + Clusters []AccountClusterStatus `json:"clusters,omitempty"` + + // ClusterAccountTemplates holds information about which cluster account templates were applied + // DEPRECATED: Use status.clusters instead + // +optional + ClusterAccountTemplates []UserClusterAccountTemplateStatus `json:"clusterAccountTemplates,omitempty"` + + // Teams the user is currently part of + // +optional + Teams []string `json:"teams,omitempty"` +} + +// AccountClusterStatus holds the status of an account in a cluster +type AccountClusterStatus struct { + // Status holds the status of the account in the target cluster + // +optional + Status AccountClusterStatusPhase `json:"phase,omitempty"` + + // Reason describes why loft couldn't sync the account with a machine readable identifier + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes why loft couldn't sync the account in human language + // +optional + Message string `json:"message,omitempty"` + + // Cluster is the cluster name of the user in the cluster + // +optional + Cluster string `json:"cluster,omitempty"` + + // AccountsClusterTemplate status is the status of the account cluster template that was used + // to create the cluster account + // +optional + AccountsClusterTemplate []AccountClusterTemplateStatus `json:"accountsClusterTemplateStatus,omitempty"` + + // Accounts is the account name of the user in the cluster + // +optional + Accounts []string `json:"accounts,omitempty"` +} + +type AccountClusterTemplateStatus struct { + // Name is the name of the cluster account template + // +optional + Name string `json:"name,omitempty"` + + // Account is the name of the account in the cluster + // +optional + Account string `json:"account,omitempty"` + + // AccountTemplateHash is the hash of the account template that was applied + // +optional + AccountTemplateHash string `json:"accountTemplateHash,omitempty"` + + // OwnsHash is the hash of the owns part of the cluster account template that was + // applied + // +optional + OwnsHash string `json:"ownsHash,omitempty"` + + // Last time the condition transitioned from one status to another. + // +optional + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + + // Status holds the status of the account in the target cluster + // +optional + Status ClusterAccountTemplateStatusPhase `json:"phase,omitempty"` + + // Reason describes why loft couldn't sync the account with a machine readable identifier + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes why loft couldn't sync the account in human language + // +optional + Message string `json:"message,omitempty"` +} + +// ClusterAccountTemplateStatusPhase describes the phase of a cluster +type ClusterAccountTemplateStatusPhase string + +// These are the valid admin account types +const ( + ClusterAccountTemplateStatusPhaseSynced ClusterAccountTemplateStatusPhase = "Synced" + ClusterAccountTemplateStatusPhaseFailed ClusterAccountTemplateStatusPhase = "Failed" + ClusterAccountTemplateStatusPhaseFailedAccount ClusterAccountTemplateStatusPhase = "FailedAccount" + ClusterAccountTemplateStatusPhaseFailedObjects ClusterAccountTemplateStatusPhase = "FailedObjects" +) + +// AccountClusterStatusPhase describes the phase of a cluster +type AccountClusterStatusPhase string + +// These are the valid admin account types +const ( + AccountClusterStatusPhaseSynced AccountClusterStatusPhase = "Synced" + AccountClusterStatusPhaseFailed AccountClusterStatusPhase = "Failed" +) + +// KindSecretRef is the reference to a secret containing the user password +type KindSecretRef struct { + // APIGroup is the api group of the secret + APIGroup string `json:"apiGroup,omitempty"` + // Kind is the kind of the secret + Kind string `json:"kind,omitempty"` + // +optional + SecretName string `json:"secretName,omitempty"` + // +optional + SecretNamespace string `json:"secretNamespace,omitempty"` + // +optional + Key string `json:"key,omitempty"` +} + +// SecretRef is the reference to a secret containing the user password +type SecretRef struct { + // +optional + SecretName string `json:"secretName,omitempty"` + // +optional + SecretNamespace string `json:"secretNamespace,omitempty"` + // +optional + Key string `json:"key,omitempty"` +} + +type UserClusterAccountTemplateStatus struct { + // Name of the cluster account template that was applied + // +optional + Name string `json:"name,omitempty"` + + // Clusters holds the cluster on which this template was applied + // +optional + Clusters []ClusterAccountTemplateClusterStatus `json:"clusters,omitempty"` + + // Status holds the status of the account in the target cluster + // +optional + Status ClusterAccountTemplateStatusPhase `json:"phase,omitempty"` + + // Reason describes why loft couldn't sync the account with a machine readable identifier + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes why loft couldn't sync the account in human language + // +optional + Message string `json:"message,omitempty"` +} + +type ClusterAccountTemplateClusterStatus struct { + // Name of the cluster where the cluster account template was applied + // +optional + Name string `json:"name,omitempty"` + + // Status holds the status of the account in the target cluster + // +optional + Status ClusterAccountTemplateClusterStatusPhase `json:"phase,omitempty"` + + // Reason describes why loft couldn't sync the account with a machine readable identifier + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes why loft couldn't sync the account in human language + // +optional + Message string `json:"message,omitempty"` +} + +// ClusterAccountTemplateClusterStatusPhase describes the phase of a cluster account template +type ClusterAccountTemplateClusterStatusPhase string + +// These are the valid account template cluster status +const ( + ClusterAccountTemplateClusterStatusPhaseCreated ClusterAccountTemplateClusterStatusPhase = "Created" + ClusterAccountTemplateClusterStatusPhaseSkipped ClusterAccountTemplateClusterStatusPhase = "Skipped" + ClusterAccountTemplateClusterStatusPhaseFailed ClusterAccountTemplateClusterStatusPhase = "Failed" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// UserList contains a list of User +type UserList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []User `json:"items"` +} + +func init() { + SchemeBuilder.Register(&User{}, &UserList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/virtualclusterinstance_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/virtualclusterinstance_types.go new file mode 100644 index 000000000..4291d606e --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/virtualclusterinstance_types.go @@ -0,0 +1,177 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + InstanceScheduled agentstoragev1.ConditionType = "Scheduled" + InstanceTemplateSynced agentstoragev1.ConditionType = "TemplateSynced" + InstanceTemplateResolved agentstoragev1.ConditionType = "TemplateResolved" + InstanceSpaceSynced agentstoragev1.ConditionType = "SpaceSynced" + InstanceSpaceReady agentstoragev1.ConditionType = "SpaceReady" + InstanceVirtualClusterSynced agentstoragev1.ConditionType = "VirtualClusterSynced" + InstanceVirtualClusterReady agentstoragev1.ConditionType = "VirtualClusterReady" + InstanceProjectsSecretsSynced agentstoragev1.ConditionType = "ProjectSecretsSynced" + + // Workload VirtualCluster conditions + + InstanceWorkloadSpaceSynced agentstoragev1.ConditionType = "WorkloadSpaceSynced" + InstanceWorkloadSpaceReady agentstoragev1.ConditionType = "WorkloadSpaceReady" + InstanceWorkloadVirtualClusterSynced agentstoragev1.ConditionType = "WorkloadVirtualClusterSynced" + InstanceWorkloadVirtualClusterTokenSynced agentstoragev1.ConditionType = "WorkloadVirtualClusterTokenSynced" + InstanceWorkloadVirtualClusterReady agentstoragev1.ConditionType = "WorkloadVirtualClusterReady" +) + +var ( + VirtualClusterConditions = []agentstoragev1.ConditionType{ + InstanceScheduled, + InstanceTemplateResolved, + InstanceSpaceSynced, + InstanceSpaceReady, + InstanceVirtualClusterSynced, + InstanceVirtualClusterReady, + } +) + +// +genclient +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterInstance +// +k8s:openapi-gen=true +type VirtualClusterInstance struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualClusterInstanceSpec `json:"spec,omitempty"` + Status VirtualClusterInstanceStatus `json:"status,omitempty"` +} + +func (a *VirtualClusterInstance) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *VirtualClusterInstance) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + +func (a *VirtualClusterInstance) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *VirtualClusterInstance) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *VirtualClusterInstance) GetAccess() []Access { + return a.Spec.Access +} + +func (a *VirtualClusterInstance) SetAccess(access []Access) { + a.Spec.Access = access +} + +type VirtualClusterInstanceSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes a virtual cluster instance + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // TemplateRef holds the virtual cluster template reference + // +optional + TemplateRef *TemplateRef `json:"templateRef,omitempty"` + + // Template is the inline template to use for virtual cluster creation. This is mutually + // exclusive with templateRef. + // +optional + Template *VirtualClusterTemplateDefinition `json:"template,omitempty"` + + // ClusterRef is the reference to the connected cluster holding + // this virtual cluster + // +optional + ClusterRef VirtualClusterClusterRef `json:"clusterRef,omitempty"` + + // WorkloadClusterRef is the reference to the connected cluster holding + // this virtual cluster's workloads. + // +optional + WorkloadClusterRef *VirtualClusterClusterRef `json:"workloadClusterRef,omitempty"` + + // Parameters are values to pass to the template + // +optional + Parameters string `json:"parameters,omitempty"` + + // ExtraAccessRules defines extra rules which users and teams should have which access to the virtual + // cluster. + // +optional + ExtraAccessRules []agentstoragev1.InstanceAccessRule `json:"extraAccessRules,omitempty"` + + // Access to the virtual cluster object itself + // +optional + Access []Access `json:"access,omitempty"` +} + +type VirtualClusterInstanceStatus struct { + // Phase describes the current phase the virtual cluster instance is in + // +optional + Phase InstancePhase `json:"phase,omitempty"` + + // Reason describes the reason in machine-readable form why the cluster is in the current + // phase + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes the reason in human-readable form why the cluster is in the current + // phase + // +optional + Message string `json:"message,omitempty"` + + // Conditions holds several conditions the virtual cluster might be in + // +optional + Conditions agentstoragev1.Conditions `json:"conditions,omitempty"` + + // VirtualClusterObjects are the objects that were applied within the virtual cluster itself + // +optional + VirtualClusterObjects *agentstoragev1.ObjectsStatus `json:"virtualClusterObjects,omitempty"` + + // SpaceObjects are the objects that were applied within the virtual cluster space + // +optional + SpaceObjects *agentstoragev1.ObjectsStatus `json:"spaceObjects,omitempty"` + + // WorkloadSpaceObjects are the objects that were applied within the virtual cluster workload space + // +optional + WorkloadSpaceObjects *agentstoragev1.ObjectsStatus `json:"workloadSpaceObjects,omitempty"` + + // VirtualCluster is the template rendered with all the parameters + // +optional + VirtualCluster *VirtualClusterTemplateDefinition `json:"virtualCluster,omitempty"` + + // IgnoreReconciliation tells the controller to ignore reconciliation for this instance -- this + // is primarily used when migrating virtual cluster instances from project to project; this + // prevents a situation where there are two virtual cluster instances representing the same + // virtual cluster which could cause issues with concurrent reconciliations of the same object. + // Once the virtual cluster instance has been cloned and placed into the new project, this + // (the "old") virtual cluster instance can safely be deleted. + IgnoreReconciliation bool `json:"ignoreReconciliation,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterInstanceList contains a list of VirtualClusterInstance objects +type VirtualClusterInstanceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterInstance `json:"items"` +} + +func init() { + SchemeBuilder.Register(&VirtualClusterInstance{}, &VirtualClusterInstanceList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/virtualclustertemplate_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/virtualclustertemplate_types.go new file mode 100644 index 000000000..0ea134e98 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/virtualclustertemplate_types.go @@ -0,0 +1,202 @@ +package v1 + +import ( + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterTemplate holds the virtualClusterTemplate information +// +k8s:openapi-gen=true +type VirtualClusterTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualClusterTemplateSpec `json:"spec,omitempty"` + Status VirtualClusterTemplateStatus `json:"status,omitempty"` +} + +func (a *VirtualClusterTemplate) GetVersions() []VersionAccessor { + var retVersions []VersionAccessor + for _, v := range a.Spec.Versions { + b := v + retVersions = append(retVersions, &b) + } + + return retVersions +} + +func (a *VirtualClusterTemplateVersion) GetVersion() string { + return a.Version +} + +func (a *VirtualClusterTemplate) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *VirtualClusterTemplate) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *VirtualClusterTemplate) GetAccess() []Access { + return a.Spec.Access +} + +func (a *VirtualClusterTemplate) SetAccess(access []Access) { + a.Spec.Access = access +} + +// VirtualClusterTemplateSpec holds the specification +type VirtualClusterTemplateSpec struct { + // DisplayName is the name that is shown in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes the virtual cluster template + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Template holds the virtual cluster template + // +optional + Template VirtualClusterTemplateDefinition `json:"template,omitempty"` + + // Parameters define additional app parameters that will set helm values + // +optional + Parameters []AppParameter `json:"parameters,omitempty"` + + // Versions are different versions of the template that can be referenced as well + // +optional + Versions []VirtualClusterTemplateVersion `json:"versions,omitempty"` + + // Access holds the access rights for users and teams + // +optional + Access []Access `json:"access,omitempty"` + + // ======================= + // DEPRECATED FIELDS BELOW + // ======================= + + // DEPRECATED: SpaceTemplate to use to create the virtual cluster space if it does not exist + // +optional + SpaceTemplateRef *VirtualClusterTemplateSpaceTemplateRef `json:"spaceTemplateRef,omitempty"` +} + +type VirtualClusterTemplateVersion struct { + // Template holds the space template + // +optional + Template VirtualClusterTemplateDefinition `json:"template,omitempty"` + + // Parameters define additional app parameters that will set helm values + // +optional + Parameters []AppParameter `json:"parameters,omitempty"` + + // Version is the version. Needs to be in X.X.X format. + // +optional + Version string `json:"version,omitempty"` +} + +type VirtualClusterTemplateSpaceTemplateRef struct { + // Name of the space template + // +optional + Name string `json:"name,omitempty"` +} + +type VirtualClusterTemplateDefinition struct { + // The virtual cluster metadata + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + TemplateMetadata `json:"metadata,omitempty"` + + // InstanceTemplate holds the virtual cluster instance template + // +optional + InstanceTemplate VirtualClusterInstanceTemplateDefinition `json:"instanceTemplate,omitempty"` + + // VirtualClusterCommonSpec defines virtual cluster spec that is common between the virtual + // cluster templates, and virtual cluster + agentstoragev1.VirtualClusterCommonSpec `json:",inline"` + + // SpaceTemplate holds the space template + // +optional + SpaceTemplate VirtualClusterSpaceTemplateDefinition `json:"spaceTemplate,omitempty"` + + // WorkloadVirtualClusterTemplateDefinition holds the workload cluster specific deployment options. Needs to be non-nil + // in order to deploy the virtual cluster in workload cluster mode. + // +optional + WorkloadVirtualClusterTemplateDefinition *WorkloadVirtualClusterTemplateDefinition `json:"workloadVirtualClusterTemplate,omitempty"` +} + +type WorkloadVirtualClusterTemplateDefinition struct { + // The virtual cluster metadata + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + TemplateMetadata `json:"metadata,omitempty"` + + // HelmRelease is the helm release configuration for the virtual cluster. + // +optional + HelmRelease *agentstoragev1.VirtualClusterHelmRelease `json:"helmRelease,omitempty"` + + // SpaceTemplate holds the space template + // +optional + SpaceTemplate VirtualClusterSpaceTemplateDefinition `json:"spaceTemplate,omitempty"` +} + +type VirtualClusterSpaceTemplateDefinition struct { + // The space metadata + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + TemplateMetadata `json:"metadata,omitempty"` + + // Objects are Kubernetes style yamls that should get deployed into the virtual cluster namespace + // +optional + Objects string `json:"objects,omitempty"` + + // Charts are helm charts that should get deployed + // +optional + Charts []agentstoragev1.TemplateHelmChart `json:"charts,omitempty"` + + // Apps specifies the apps that should get deployed by this template + // +optional + Apps []agentstoragev1.AppReference `json:"apps,omitempty"` +} + +// VirtualClusterInstanceTemplateDefinition holds the virtual cluster instance template +type VirtualClusterInstanceTemplateDefinition struct { + // The virtual cluster instance metadata + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + TemplateMetadata `json:"metadata,omitempty"` +} + +type TemplateMetadata struct { + // Labels are labels on the object + // +optional + Labels map[string]string `json:"labels,omitempty"` + + // Annotations are annotations on the object + // +optional + Annotations map[string]string `json:"annotations,omitempty"` +} + +// VirtualClusterTemplateStatus holds the status +type VirtualClusterTemplateStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterTemplateList contains a list of VirtualClusterTemplate +type VirtualClusterTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterTemplate `json:"items"` +} + +func init() { + SchemeBuilder.Register(&VirtualClusterTemplate{}, &VirtualClusterTemplateList{}) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..039f55249 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/zz_generated.deepcopy.go @@ -0,0 +1,4542 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + storagev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + corev1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Access) DeepCopyInto(out *Access) { + *out = *in + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Subresources != nil { + in, out := &in.Subresources, &out.Subresources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Access. +func (in *Access) DeepCopy() *Access { + if in == nil { + return nil + } + out := new(Access) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKey) DeepCopyInto(out *AccessKey) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKey. +func (in *AccessKey) DeepCopy() *AccessKey { + if in == nil { + return nil + } + out := new(AccessKey) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AccessKey) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyIdentity) DeepCopyInto(out *AccessKeyIdentity) { + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ConnectorData != nil { + in, out := &in.ConnectorData, &out.ConnectorData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyIdentity. +func (in *AccessKeyIdentity) DeepCopy() *AccessKeyIdentity { + if in == nil { + return nil + } + out := new(AccessKeyIdentity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyList) DeepCopyInto(out *AccessKeyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]AccessKey, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyList. +func (in *AccessKeyList) DeepCopy() *AccessKeyList { + if in == nil { + return nil + } + out := new(AccessKeyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AccessKeyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyOIDC) DeepCopyInto(out *AccessKeyOIDC) { + *out = *in + if in.IDToken != nil { + in, out := &in.IDToken, &out.IDToken + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.AccessToken != nil { + in, out := &in.AccessToken, &out.AccessToken + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.RefreshToken != nil { + in, out := &in.RefreshToken, &out.RefreshToken + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.LastRefresh != nil { + in, out := &in.LastRefresh, &out.LastRefresh + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyOIDC. +func (in *AccessKeyOIDC) DeepCopy() *AccessKeyOIDC { + if in == nil { + return nil + } + out := new(AccessKeyOIDC) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyOIDCProvider) DeepCopyInto(out *AccessKeyOIDCProvider) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyOIDCProvider. +func (in *AccessKeyOIDCProvider) DeepCopy() *AccessKeyOIDCProvider { + if in == nil { + return nil + } + out := new(AccessKeyOIDCProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyScope) DeepCopyInto(out *AccessKeyScope) { + *out = *in + if in.Projects != nil { + in, out := &in.Projects, &out.Projects + *out = make([]AccessKeyScopeProject, len(*in)) + copy(*out, *in) + } + if in.Spaces != nil { + in, out := &in.Spaces, &out.Spaces + *out = make([]AccessKeyScopeSpace, len(*in)) + copy(*out, *in) + } + if in.VirtualClusters != nil { + in, out := &in.VirtualClusters, &out.VirtualClusters + *out = make([]AccessKeyScopeVirtualCluster, len(*in)) + copy(*out, *in) + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]AccessKeyScopeRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyScope. +func (in *AccessKeyScope) DeepCopy() *AccessKeyScope { + if in == nil { + return nil + } + out := new(AccessKeyScope) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyScopeProject) DeepCopyInto(out *AccessKeyScopeProject) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyScopeProject. +func (in *AccessKeyScopeProject) DeepCopy() *AccessKeyScopeProject { + if in == nil { + return nil + } + out := new(AccessKeyScopeProject) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyScopeRule) DeepCopyInto(out *AccessKeyScopeRule) { + *out = *in + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]GroupResources, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Namespaces != nil { + in, out := &in.Namespaces, &out.Namespaces + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NonResourceURLs != nil { + in, out := &in.NonResourceURLs, &out.NonResourceURLs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.RequestTargets != nil { + in, out := &in.RequestTargets, &out.RequestTargets + *out = make([]RequestTarget, len(*in)) + copy(*out, *in) + } + if in.VirtualClusters != nil { + in, out := &in.VirtualClusters, &out.VirtualClusters + *out = make([]AccessKeyVirtualCluster, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyScopeRule. +func (in *AccessKeyScopeRule) DeepCopy() *AccessKeyScopeRule { + if in == nil { + return nil + } + out := new(AccessKeyScopeRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyScopeSpace) DeepCopyInto(out *AccessKeyScopeSpace) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyScopeSpace. +func (in *AccessKeyScopeSpace) DeepCopy() *AccessKeyScopeSpace { + if in == nil { + return nil + } + out := new(AccessKeyScopeSpace) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyScopeVirtualCluster) DeepCopyInto(out *AccessKeyScopeVirtualCluster) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyScopeVirtualCluster. +func (in *AccessKeyScopeVirtualCluster) DeepCopy() *AccessKeyScopeVirtualCluster { + if in == nil { + return nil + } + out := new(AccessKeyScopeVirtualCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeySpec) DeepCopyInto(out *AccessKeySpec) { + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Scope != nil { + in, out := &in.Scope, &out.Scope + *out = new(AccessKeyScope) + (*in).DeepCopyInto(*out) + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(AccessKeyIdentity) + (*in).DeepCopyInto(*out) + } + if in.IdentityRefresh != nil { + in, out := &in.IdentityRefresh, &out.IdentityRefresh + *out = (*in).DeepCopy() + } + if in.OIDCProvider != nil { + in, out := &in.OIDCProvider, &out.OIDCProvider + *out = new(AccessKeyOIDCProvider) + **out = **in + } + if in.OIDCLogin != nil { + in, out := &in.OIDCLogin, &out.OIDCLogin + *out = new(AccessKeyOIDC) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeySpec. +func (in *AccessKeySpec) DeepCopy() *AccessKeySpec { + if in == nil { + return nil + } + out := new(AccessKeySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyStatus) DeepCopyInto(out *AccessKeyStatus) { + *out = *in + if in.LastActivity != nil { + in, out := &in.LastActivity, &out.LastActivity + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyStatus. +func (in *AccessKeyStatus) DeepCopy() *AccessKeyStatus { + if in == nil { + return nil + } + out := new(AccessKeyStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccessKeyVirtualCluster) DeepCopyInto(out *AccessKeyVirtualCluster) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessKeyVirtualCluster. +func (in *AccessKeyVirtualCluster) DeepCopy() *AccessKeyVirtualCluster { + if in == nil { + return nil + } + out := new(AccessKeyVirtualCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccountClusterStatus) DeepCopyInto(out *AccountClusterStatus) { + *out = *in + if in.AccountsClusterTemplate != nil { + in, out := &in.AccountsClusterTemplate, &out.AccountsClusterTemplate + *out = make([]AccountClusterTemplateStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Accounts != nil { + in, out := &in.Accounts, &out.Accounts + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountClusterStatus. +func (in *AccountClusterStatus) DeepCopy() *AccountClusterStatus { + if in == nil { + return nil + } + out := new(AccountClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccountClusterTemplateStatus) DeepCopyInto(out *AccountClusterTemplateStatus) { + *out = *in + if in.LastTransitionTime != nil { + in, out := &in.LastTransitionTime, &out.LastTransitionTime + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountClusterTemplateStatus. +func (in *AccountClusterTemplateStatus) DeepCopy() *AccountClusterTemplateStatus { + if in == nil { + return nil + } + out := new(AccountClusterTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllowedCluster) DeepCopyInto(out *AllowedCluster) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedCluster. +func (in *AllowedCluster) DeepCopy() *AllowedCluster { + if in == nil { + return nil + } + out := new(AllowedCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllowedClusterAccountTemplate) DeepCopyInto(out *AllowedClusterAccountTemplate) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedClusterAccountTemplate. +func (in *AllowedClusterAccountTemplate) DeepCopy() *AllowedClusterAccountTemplate { + if in == nil { + return nil + } + out := new(AllowedClusterAccountTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllowedRunner) DeepCopyInto(out *AllowedRunner) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedRunner. +func (in *AllowedRunner) DeepCopy() *AllowedRunner { + if in == nil { + return nil + } + out := new(AllowedRunner) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllowedTemplate) DeepCopyInto(out *AllowedTemplate) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedTemplate. +func (in *AllowedTemplate) DeepCopy() *AllowedTemplate { + if in == nil { + return nil + } + out := new(AllowedTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *App) DeepCopyInto(out *App) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new App. +func (in *App) DeepCopy() *App { + if in == nil { + return nil + } + out := new(App) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *App) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppConfig) DeepCopyInto(out *AppConfig) { + *out = *in + in.Config.DeepCopyInto(&out.Config) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make([]AppParameter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.StreamContainer != nil { + in, out := &in.StreamContainer, &out.StreamContainer + *out = new(StreamContainer) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppConfig. +func (in *AppConfig) DeepCopy() *AppConfig { + if in == nil { + return nil + } + out := new(AppConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppList) DeepCopyInto(out *AppList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]App, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppList. +func (in *AppList) DeepCopy() *AppList { + if in == nil { + return nil + } + out := new(AppList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AppList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppParameter) DeepCopyInto(out *AppParameter) { + *out = *in + if in.Options != nil { + in, out := &in.Options, &out.Options + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Min != nil { + in, out := &in.Min, &out.Min + *out = new(int) + **out = **in + } + if in.Max != nil { + in, out := &in.Max, &out.Max + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppParameter. +func (in *AppParameter) DeepCopy() *AppParameter { + if in == nil { + return nil + } + out := new(AppParameter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppSpec) DeepCopyInto(out *AppSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.RecommendedApp != nil { + in, out := &in.RecommendedApp, &out.RecommendedApp + *out = make([]RecommendedApp, len(*in)) + copy(*out, *in) + } + in.AppConfig.DeepCopyInto(&out.AppConfig) + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]AppVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Helm != nil { + in, out := &in.Helm, &out.Helm + *out = new(HelmConfiguration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpec. +func (in *AppSpec) DeepCopy() *AppSpec { + if in == nil { + return nil + } + out := new(AppSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppStatus) DeepCopyInto(out *AppStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus. +func (in *AppStatus) DeepCopy() *AppStatus { + if in == nil { + return nil + } + out := new(AppStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppTask) DeepCopyInto(out *AppTask) { + *out = *in + out.AppReference = in.AppReference + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppTask. +func (in *AppTask) DeepCopy() *AppTask { + if in == nil { + return nil + } + out := new(AppTask) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppVersion) DeepCopyInto(out *AppVersion) { + *out = *in + in.AppConfig.DeepCopyInto(&out.AppConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppVersion. +func (in *AppVersion) DeepCopy() *AppVersion { + if in == nil { + return nil + } + out := new(AppVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArgoIntegrationSpec) DeepCopyInto(out *ArgoIntegrationSpec) { + *out = *in + if in.SSO != nil { + in, out := &in.SSO, &out.SSO + *out = new(ArgoSSOSpec) + (*in).DeepCopyInto(*out) + } + if in.Project != nil { + in, out := &in.Project, &out.Project + *out = new(ArgoProjectSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoIntegrationSpec. +func (in *ArgoIntegrationSpec) DeepCopy() *ArgoIntegrationSpec { + if in == nil { + return nil + } + out := new(ArgoIntegrationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArgoProjectPolicyRule) DeepCopyInto(out *ArgoProjectPolicyRule) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoProjectPolicyRule. +func (in *ArgoProjectPolicyRule) DeepCopy() *ArgoProjectPolicyRule { + if in == nil { + return nil + } + out := new(ArgoProjectPolicyRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArgoProjectRole) DeepCopyInto(out *ArgoProjectRole) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]ArgoProjectPolicyRule, len(*in)) + copy(*out, *in) + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoProjectRole. +func (in *ArgoProjectRole) DeepCopy() *ArgoProjectRole { + if in == nil { + return nil + } + out := new(ArgoProjectRole) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArgoProjectSpec) DeepCopyInto(out *ArgoProjectSpec) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + if in.SourceRepos != nil { + in, out := &in.SourceRepos, &out.SourceRepos + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Roles != nil { + in, out := &in.Roles, &out.Roles + *out = make([]ArgoProjectRole, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoProjectSpec. +func (in *ArgoProjectSpec) DeepCopy() *ArgoProjectSpec { + if in == nil { + return nil + } + out := new(ArgoProjectSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArgoProjectSpecMetadata) DeepCopyInto(out *ArgoProjectSpecMetadata) { + *out = *in + if in.ExtraAnnotations != nil { + in, out := &in.ExtraAnnotations, &out.ExtraAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ExtraLabels != nil { + in, out := &in.ExtraLabels, &out.ExtraLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoProjectSpecMetadata. +func (in *ArgoProjectSpecMetadata) DeepCopy() *ArgoProjectSpecMetadata { + if in == nil { + return nil + } + out := new(ArgoProjectSpecMetadata) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArgoSSOSpec) DeepCopyInto(out *ArgoSSOSpec) { + *out = *in + if in.AssignedRoles != nil { + in, out := &in.AssignedRoles, &out.AssignedRoles + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoSSOSpec. +func (in *ArgoSSOSpec) DeepCopy() *ArgoSSOSpec { + if in == nil { + return nil + } + out := new(ArgoSSOSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Chart) DeepCopyInto(out *Chart) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Chart. +func (in *Chart) DeepCopy() *Chart { + if in == nil { + return nil + } + out := new(Chart) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Cluster) DeepCopyInto(out *Cluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. +func (in *Cluster) DeepCopy() *Cluster { + if in == nil { + return nil + } + out := new(Cluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Cluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccess) DeepCopyInto(out *ClusterAccess) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccess. +func (in *ClusterAccess) DeepCopy() *ClusterAccess { + if in == nil { + return nil + } + out := new(ClusterAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterAccess) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessList) DeepCopyInto(out *ClusterAccessList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterAccess, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessList. +func (in *ClusterAccessList) DeepCopy() *ClusterAccessList { + if in == nil { + return nil + } + out := new(ClusterAccessList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterAccessList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessSpec) DeepCopyInto(out *ClusterAccessSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.LocalClusterAccessTemplate.DeepCopyInto(&out.LocalClusterAccessTemplate) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessSpec. +func (in *ClusterAccessSpec) DeepCopy() *ClusterAccessSpec { + if in == nil { + return nil + } + out := new(ClusterAccessSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessStatus) DeepCopyInto(out *ClusterAccessStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessStatus. +func (in *ClusterAccessStatus) DeepCopy() *ClusterAccessStatus { + if in == nil { + return nil + } + out := new(ClusterAccessStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccountTemplateClusterStatus) DeepCopyInto(out *ClusterAccountTemplateClusterStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccountTemplateClusterStatus. +func (in *ClusterAccountTemplateClusterStatus) DeepCopy() *ClusterAccountTemplateClusterStatus { + if in == nil { + return nil + } + out := new(ClusterAccountTemplateClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterList) DeepCopyInto(out *ClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Cluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. +func (in *ClusterList) DeepCopy() *ClusterList { + if in == nil { + return nil + } + out := new(ClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRef) DeepCopyInto(out *ClusterRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRef. +func (in *ClusterRef) DeepCopy() *ClusterRef { + if in == nil { + return nil + } + out := new(ClusterRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplate) DeepCopyInto(out *ClusterRoleTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplate. +func (in *ClusterRoleTemplate) DeepCopy() *ClusterRoleTemplate { + if in == nil { + return nil + } + out := new(ClusterRoleTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterRoleTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplateList) DeepCopyInto(out *ClusterRoleTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterRoleTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateList. +func (in *ClusterRoleTemplateList) DeepCopy() *ClusterRoleTemplateList { + if in == nil { + return nil + } + out := new(ClusterRoleTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterRoleTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplateSpec) DeepCopyInto(out *ClusterRoleTemplateSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.ClusterRoleTemplate.DeepCopyInto(&out.ClusterRoleTemplate) + if in.LocalClusterRoleTemplate != nil { + in, out := &in.LocalClusterRoleTemplate, &out.LocalClusterRoleTemplate + *out = new(LocalClusterRoleTemplate) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateSpec. +func (in *ClusterRoleTemplateSpec) DeepCopy() *ClusterRoleTemplateSpec { + if in == nil { + return nil + } + out := new(ClusterRoleTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplateStatus) DeepCopyInto(out *ClusterRoleTemplateStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateStatus. +func (in *ClusterRoleTemplateStatus) DeepCopy() *ClusterRoleTemplateStatus { + if in == nil { + return nil + } + out := new(ClusterRoleTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleTemplateTemplate) DeepCopyInto(out *ClusterRoleTemplateTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]rbacv1.PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AggregationRule != nil { + in, out := &in.AggregationRule, &out.AggregationRule + *out = new(rbacv1.AggregationRule) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateTemplate. +func (in *ClusterRoleTemplateTemplate) DeepCopy() *ClusterRoleTemplateTemplate { + if in == nil { + return nil + } + out := new(ClusterRoleTemplateTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + out.Config = in.Config + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. +func (in *ClusterSpec) DeepCopy() *ClusterSpec { + if in == nil { + return nil + } + out := new(ClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. +func (in *ClusterStatus) DeepCopy() *ClusterStatus { + if in == nil { + return nil + } + out := new(ClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConstraintSpaceTemplate) DeepCopyInto(out *ConstraintSpaceTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.ClusterRole != nil { + in, out := &in.ClusterRole, &out.ClusterRole + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConstraintSpaceTemplate. +func (in *ConstraintSpaceTemplate) DeepCopy() *ConstraintSpaceTemplate { + if in == nil { + return nil + } + out := new(ConstraintSpaceTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodCommandDeleteOptions) DeepCopyInto(out *DevPodCommandDeleteOptions) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodCommandDeleteOptions. +func (in *DevPodCommandDeleteOptions) DeepCopy() *DevPodCommandDeleteOptions { + if in == nil { + return nil + } + out := new(DevPodCommandDeleteOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodCommandStatusOptions) DeepCopyInto(out *DevPodCommandStatusOptions) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodCommandStatusOptions. +func (in *DevPodCommandStatusOptions) DeepCopy() *DevPodCommandStatusOptions { + if in == nil { + return nil + } + out := new(DevPodCommandStatusOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodCommandStopOptions) DeepCopyInto(out *DevPodCommandStopOptions) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodCommandStopOptions. +func (in *DevPodCommandStopOptions) DeepCopy() *DevPodCommandStopOptions { + if in == nil { + return nil + } + out := new(DevPodCommandStopOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodCommandUpOptions) DeepCopyInto(out *DevPodCommandUpOptions) { + *out = *in + if in.IDEOptions != nil { + in, out := &in.IDEOptions, &out.IDEOptions + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PrebuildRepositories != nil { + in, out := &in.PrebuildRepositories, &out.PrebuildRepositories + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.WorkspaceEnv != nil { + in, out := &in.WorkspaceEnv, &out.WorkspaceEnv + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Platform != nil { + in, out := &in.Platform, &out.Platform + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodCommandUpOptions. +func (in *DevPodCommandUpOptions) DeepCopy() *DevPodCommandUpOptions { + if in == nil { + return nil + } + out := new(DevPodCommandUpOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodProviderOption) DeepCopyInto(out *DevPodProviderOption) { + *out = *in + if in.ValueFrom != nil { + in, out := &in.ValueFrom, &out.ValueFrom + *out = new(DevPodProviderOptionFrom) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodProviderOption. +func (in *DevPodProviderOption) DeepCopy() *DevPodProviderOption { + if in == nil { + return nil + } + out := new(DevPodProviderOption) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodProviderOptionFrom) DeepCopyInto(out *DevPodProviderOptionFrom) { + *out = *in + if in.ProjectSecretRef != nil { + in, out := &in.ProjectSecretRef, &out.ProjectSecretRef + *out = new(corev1.SecretKeySelector) + (*in).DeepCopyInto(*out) + } + if in.SharedSecretRef != nil { + in, out := &in.SharedSecretRef, &out.SharedSecretRef + *out = new(corev1.SecretKeySelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodProviderOptionFrom. +func (in *DevPodProviderOptionFrom) DeepCopy() *DevPodProviderOptionFrom { + if in == nil { + return nil + } + out := new(DevPodProviderOptionFrom) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodProviderSource) DeepCopyInto(out *DevPodProviderSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodProviderSource. +func (in *DevPodProviderSource) DeepCopy() *DevPodProviderSource { + if in == nil { + return nil + } + out := new(DevPodProviderSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstance) DeepCopyInto(out *DevPodWorkspaceInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstance. +func (in *DevPodWorkspaceInstance) DeepCopy() *DevPodWorkspaceInstance { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceList) DeepCopyInto(out *DevPodWorkspaceInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceList. +func (in *DevPodWorkspaceInstanceList) DeepCopy() *DevPodWorkspaceInstanceList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceSpec) DeepCopyInto(out *DevPodWorkspaceInstanceSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.TemplateRef != nil { + in, out := &in.TemplateRef, &out.TemplateRef + *out = new(TemplateRef) + **out = **in + } + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(DevPodWorkspaceTemplateDefinition) + (*in).DeepCopyInto(*out) + } + out.RunnerRef = in.RunnerRef + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceSpec. +func (in *DevPodWorkspaceInstanceSpec) DeepCopy() *DevPodWorkspaceInstanceSpec { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceStatus) DeepCopyInto(out *DevPodWorkspaceInstanceStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(storagev1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Instance != nil { + in, out := &in.Instance, &out.Instance + *out = new(DevPodWorkspaceTemplateDefinition) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStatus. +func (in *DevPodWorkspaceInstanceStatus) DeepCopy() *DevPodWorkspaceInstanceStatus { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceProvider) DeepCopyInto(out *DevPodWorkspaceProvider) { + *out = *in + if in.Options != nil { + in, out := &in.Options, &out.Options + *out = make(map[string]DevPodProviderOption, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make(map[string]DevPodProviderOption, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceProvider. +func (in *DevPodWorkspaceProvider) DeepCopy() *DevPodWorkspaceProvider { + if in == nil { + return nil + } + out := new(DevPodWorkspaceProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplate) DeepCopyInto(out *DevPodWorkspaceTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplate. +func (in *DevPodWorkspaceTemplate) DeepCopy() *DevPodWorkspaceTemplate { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateDefinition) DeepCopyInto(out *DevPodWorkspaceTemplateDefinition) { + *out = *in + in.Provider.DeepCopyInto(&out.Provider) + if in.SpaceTemplate != nil { + in, out := &in.SpaceTemplate, &out.SpaceTemplate + *out = new(TemplateRef) + **out = **in + } + if in.VirtualClusterTemplate != nil { + in, out := &in.VirtualClusterTemplate, &out.VirtualClusterTemplate + *out = new(TemplateRef) + **out = **in + } + if in.WorkspaceEnv != nil { + in, out := &in.WorkspaceEnv, &out.WorkspaceEnv + *out = make(map[string]DevPodProviderOption, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateDefinition. +func (in *DevPodWorkspaceTemplateDefinition) DeepCopy() *DevPodWorkspaceTemplateDefinition { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateList) DeepCopyInto(out *DevPodWorkspaceTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateList. +func (in *DevPodWorkspaceTemplateList) DeepCopy() *DevPodWorkspaceTemplateList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateSpec) DeepCopyInto(out *DevPodWorkspaceTemplateSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make([]AppParameter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Template.DeepCopyInto(&out.Template) + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]DevPodWorkspaceTemplateVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateSpec. +func (in *DevPodWorkspaceTemplateSpec) DeepCopy() *DevPodWorkspaceTemplateSpec { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateStatus) DeepCopyInto(out *DevPodWorkspaceTemplateStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateStatus. +func (in *DevPodWorkspaceTemplateStatus) DeepCopy() *DevPodWorkspaceTemplateStatus { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceTemplateVersion) DeepCopyInto(out *DevPodWorkspaceTemplateVersion) { + *out = *in + in.Template.DeepCopyInto(&out.Template) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make([]AppParameter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceTemplateVersion. +func (in *DevPodWorkspaceTemplateVersion) DeepCopy() *DevPodWorkspaceTemplateVersion { + if in == nil { + return nil + } + out := new(DevPodWorkspaceTemplateVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupResources) DeepCopyInto(out *GroupResources) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResources. +func (in *GroupResources) DeepCopy() *GroupResources { + if in == nil { + return nil + } + out := new(GroupResources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmChart) DeepCopyInto(out *HelmChart) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]string, len(*in)) + copy(*out, *in) + } + out.Repository = in.Repository + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChart. +func (in *HelmChart) DeepCopy() *HelmChart { + if in == nil { + return nil + } + out := new(HelmChart) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmChartRepository) DeepCopyInto(out *HelmChartRepository) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartRepository. +func (in *HelmChartRepository) DeepCopy() *HelmChartRepository { + if in == nil { + return nil + } + out := new(HelmChartRepository) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmConfiguration) DeepCopyInto(out *HelmConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmConfiguration. +func (in *HelmConfiguration) DeepCopy() *HelmConfiguration { + if in == nil { + return nil + } + out := new(HelmConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmTask) DeepCopyInto(out *HelmTask) { + *out = *in + in.Release.DeepCopyInto(&out.Release) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmTask. +func (in *HelmTask) DeepCopy() *HelmTask { + if in == nil { + return nil + } + out := new(HelmTask) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmTaskRelease) DeepCopyInto(out *HelmTaskRelease) { + *out = *in + in.Config.DeepCopyInto(&out.Config) + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmTaskRelease. +func (in *HelmTaskRelease) DeepCopy() *HelmTaskRelease { + if in == nil { + return nil + } + out := new(HelmTaskRelease) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstanceDeployedAppStatus) DeepCopyInto(out *InstanceDeployedAppStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceDeployedAppStatus. +func (in *InstanceDeployedAppStatus) DeepCopy() *InstanceDeployedAppStatus { + if in == nil { + return nil + } + out := new(InstanceDeployedAppStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KindSecretRef) DeepCopyInto(out *KindSecretRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KindSecretRef. +func (in *KindSecretRef) DeepCopy() *KindSecretRef { + if in == nil { + return nil + } + out := new(KindSecretRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterAccessTemplate) DeepCopyInto(out *LocalClusterAccessTemplate) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + in.LocalClusterAccessSpec.DeepCopyInto(&out.LocalClusterAccessSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAccessTemplate. +func (in *LocalClusterAccessTemplate) DeepCopy() *LocalClusterAccessTemplate { + if in == nil { + return nil + } + out := new(LocalClusterAccessTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterRoleTemplate) DeepCopyInto(out *LocalClusterRoleTemplate) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + in.LocalClusterRoleTemplateSpec.DeepCopyInto(&out.LocalClusterRoleTemplateSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterRoleTemplate. +func (in *LocalClusterRoleTemplate) DeepCopy() *LocalClusterRoleTemplate { + if in == nil { + return nil + } + out := new(LocalClusterRoleTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalClusterRoleTemplateSpec) DeepCopyInto(out *LocalClusterRoleTemplateSpec) { + *out = *in + in.ClusterRoleTemplate.DeepCopyInto(&out.ClusterRoleTemplate) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterRoleTemplateSpec. +func (in *LocalClusterRoleTemplateSpec) DeepCopy() *LocalClusterRoleTemplateSpec { + if in == nil { + return nil + } + out := new(LocalClusterRoleTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalSpaceConstraintSpec) DeepCopyInto(out *LocalSpaceConstraintSpec) { + *out = *in + in.SpaceTemplate.DeepCopyInto(&out.SpaceTemplate) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSpaceConstraintSpec. +func (in *LocalSpaceConstraintSpec) DeepCopy() *LocalSpaceConstraintSpec { + if in == nil { + return nil + } + out := new(LocalSpaceConstraintSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalSpaceConstraintTemplate) DeepCopyInto(out *LocalSpaceConstraintTemplate) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + in.LocalSpaceConstraintSpec.DeepCopyInto(&out.LocalSpaceConstraintSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSpaceConstraintTemplate. +func (in *LocalSpaceConstraintTemplate) DeepCopy() *LocalSpaceConstraintTemplate { + if in == nil { + return nil + } + out := new(LocalSpaceConstraintTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Member) DeepCopyInto(out *Member) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Member. +func (in *Member) DeepCopy() *Member { + if in == nil { + return nil + } + out := new(Member) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacePattern) DeepCopyInto(out *NamespacePattern) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacePattern. +func (in *NamespacePattern) DeepCopy() *NamespacePattern { + if in == nil { + return nil + } + out := new(NamespacePattern) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Project) DeepCopyInto(out *Project) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. +func (in *Project) DeepCopy() *Project { + if in == nil { + return nil + } + out := new(Project) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Project) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectList) DeepCopyInto(out *ProjectList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. +func (in *ProjectList) DeepCopy() *ProjectList { + if in == nil { + return nil + } + out := new(ProjectList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + in.Quotas.DeepCopyInto(&out.Quotas) + if in.AllowedClusters != nil { + in, out := &in.AllowedClusters, &out.AllowedClusters + *out = make([]AllowedCluster, len(*in)) + copy(*out, *in) + } + if in.AllowedRunners != nil { + in, out := &in.AllowedRunners, &out.AllowedRunners + *out = make([]AllowedRunner, len(*in)) + copy(*out, *in) + } + if in.AllowedTemplates != nil { + in, out := &in.AllowedTemplates, &out.AllowedTemplates + *out = make([]AllowedTemplate, len(*in)) + copy(*out, *in) + } + if in.Members != nil { + in, out := &in.Members, &out.Members + *out = make([]Member, len(*in)) + copy(*out, *in) + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NamespacePattern != nil { + in, out := &in.NamespacePattern, &out.NamespacePattern + *out = new(NamespacePattern) + **out = **in + } + if in.ArgoIntegration != nil { + in, out := &in.ArgoIntegration, &out.ArgoIntegration + *out = new(ArgoIntegrationSpec) + (*in).DeepCopyInto(*out) + } + if in.VaultIntegration != nil { + in, out := &in.VaultIntegration, &out.VaultIntegration + *out = new(VaultIntegrationSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. +func (in *ProjectSpec) DeepCopy() *ProjectSpec { + if in == nil { + return nil + } + out := new(ProjectSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { + *out = *in + if in.Quotas != nil { + in, out := &in.Quotas, &out.Quotas + *out = new(QuotaStatus) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(storagev1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. +func (in *ProjectStatus) DeepCopy() *ProjectStatus { + if in == nil { + return nil + } + out := new(ProjectStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *QuotaStatus) DeepCopyInto(out *QuotaStatus) { + *out = *in + if in.Project != nil { + in, out := &in.Project, &out.Project + *out = new(QuotaStatusProject) + (*in).DeepCopyInto(*out) + } + if in.User != nil { + in, out := &in.User, &out.User + *out = new(QuotaStatusUser) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaStatus. +func (in *QuotaStatus) DeepCopy() *QuotaStatus { + if in == nil { + return nil + } + out := new(QuotaStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *QuotaStatusProject) DeepCopyInto(out *QuotaStatusProject) { + *out = *in + if in.Limit != nil { + in, out := &in.Limit, &out.Limit + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Used != nil { + in, out := &in.Used, &out.Used + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make(map[string]QuotaStatusProjectCluster, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaStatusProject. +func (in *QuotaStatusProject) DeepCopy() *QuotaStatusProject { + if in == nil { + return nil + } + out := new(QuotaStatusProject) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *QuotaStatusProjectCluster) DeepCopyInto(out *QuotaStatusProjectCluster) { + *out = *in + if in.Used != nil { + in, out := &in.Used, &out.Used + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaStatusProjectCluster. +func (in *QuotaStatusProjectCluster) DeepCopy() *QuotaStatusProjectCluster { + if in == nil { + return nil + } + out := new(QuotaStatusProjectCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *QuotaStatusUser) DeepCopyInto(out *QuotaStatusUser) { + *out = *in + if in.Limit != nil { + in, out := &in.Limit, &out.Limit + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + in.Used.DeepCopyInto(&out.Used) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make(map[string]QuotaStatusUserUsed, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaStatusUser. +func (in *QuotaStatusUser) DeepCopy() *QuotaStatusUser { + if in == nil { + return nil + } + out := new(QuotaStatusUser) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *QuotaStatusUserUsed) DeepCopyInto(out *QuotaStatusUserUsed) { + *out = *in + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make(map[string]map[string]string, len(*in)) + for key, val := range *in { + var outVal map[string]string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + (*out)[key] = outVal + } + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make(map[string]map[string]string, len(*in)) + for key, val := range *in { + var outVal map[string]string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + (*out)[key] = outVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaStatusUserUsed. +func (in *QuotaStatusUserUsed) DeepCopy() *QuotaStatusUserUsed { + if in == nil { + return nil + } + out := new(QuotaStatusUserUsed) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Quotas) DeepCopyInto(out *Quotas) { + *out = *in + if in.Project != nil { + in, out := &in.Project, &out.Project + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.User != nil { + in, out := &in.User, &out.User + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Quotas. +func (in *Quotas) DeepCopy() *Quotas { + if in == nil { + return nil + } + out := new(Quotas) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Runner) DeepCopyInto(out *Runner) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Runner. +func (in *Runner) DeepCopy() *Runner { + if in == nil { + return nil + } + out := new(Runner) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Runner) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerClusterRef) DeepCopyInto(out *RunnerClusterRef) { + *out = *in + if in.PersistentVolumeClaimTemplate != nil { + in, out := &in.PersistentVolumeClaimTemplate, &out.PersistentVolumeClaimTemplate + *out = new(RunnerPersistentVolumeClaimTemplate) + (*in).DeepCopyInto(*out) + } + if in.PodTemplate != nil { + in, out := &in.PodTemplate, &out.PodTemplate + *out = new(RunnerPodTemplate) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerClusterRef. +func (in *RunnerClusterRef) DeepCopy() *RunnerClusterRef { + if in == nil { + return nil + } + out := new(RunnerClusterRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerList) DeepCopyInto(out *RunnerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Runner, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerList. +func (in *RunnerList) DeepCopy() *RunnerList { + if in == nil { + return nil + } + out := new(RunnerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RunnerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerPersistentVolumeClaimTemplate) DeepCopyInto(out *RunnerPersistentVolumeClaimTemplate) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerPersistentVolumeClaimTemplate. +func (in *RunnerPersistentVolumeClaimTemplate) DeepCopy() *RunnerPersistentVolumeClaimTemplate { + if in == nil { + return nil + } + out := new(RunnerPersistentVolumeClaimTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerPersistentVolumeClaimTemplateSpec) DeepCopyInto(out *RunnerPersistentVolumeClaimTemplateSpec) { + *out = *in + if in.AccessModes != nil { + in, out := &in.AccessModes, &out.AccessModes + *out = make([]corev1.PersistentVolumeAccessMode, len(*in)) + copy(*out, *in) + } + if in.StorageClassName != nil { + in, out := &in.StorageClassName, &out.StorageClassName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerPersistentVolumeClaimTemplateSpec. +func (in *RunnerPersistentVolumeClaimTemplateSpec) DeepCopy() *RunnerPersistentVolumeClaimTemplateSpec { + if in == nil { + return nil + } + out := new(RunnerPersistentVolumeClaimTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerPodTemplate) DeepCopyInto(out *RunnerPodTemplate) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerPodTemplate. +func (in *RunnerPodTemplate) DeepCopy() *RunnerPodTemplate { + if in == nil { + return nil + } + out := new(RunnerPodTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerPodTemplateSpec) DeepCopyInto(out *RunnerPodTemplateSpec) { + *out = *in + in.Resources.DeepCopyInto(&out.Resources) + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]corev1.EnvFromSource, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]corev1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(corev1.Affinity) + (*in).DeepCopyInto(*out) + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]corev1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]corev1.VolumeMount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]corev1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.InitContainers != nil { + in, out := &in.InitContainers, &out.InitContainers + *out = make([]corev1.Container, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.HostAliases != nil { + in, out := &in.HostAliases, &out.HostAliases + *out = make([]corev1.HostAlias, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerPodTemplateSpec. +func (in *RunnerPodTemplateSpec) DeepCopy() *RunnerPodTemplateSpec { + if in == nil { + return nil + } + out := new(RunnerPodTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerRef) DeepCopyInto(out *RunnerRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerRef. +func (in *RunnerRef) DeepCopy() *RunnerRef { + if in == nil { + return nil + } + out := new(RunnerRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerSpec) DeepCopyInto(out *RunnerSpec) { + *out = *in + if in.ClusterRef != nil { + in, out := &in.ClusterRef, &out.ClusterRef + *out = new(RunnerClusterRef) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerSpec. +func (in *RunnerSpec) DeepCopy() *RunnerSpec { + if in == nil { + return nil + } + out := new(RunnerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerStatus) DeepCopyInto(out *RunnerStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(storagev1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerStatus. +func (in *RunnerStatus) DeepCopy() *RunnerStatus { + if in == nil { + return nil + } + out := new(RunnerStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretRef) DeepCopyInto(out *SecretRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef. +func (in *SecretRef) DeepCopy() *SecretRef { + if in == nil { + return nil + } + out := new(SecretRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecret) DeepCopyInto(out *SharedSecret) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecret. +func (in *SharedSecret) DeepCopy() *SharedSecret { + if in == nil { + return nil + } + out := new(SharedSecret) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SharedSecret) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretList) DeepCopyInto(out *SharedSecretList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SharedSecret, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretList. +func (in *SharedSecretList) DeepCopy() *SharedSecretList { + if in == nil { + return nil + } + out := new(SharedSecretList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SharedSecretList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretSpec) DeepCopyInto(out *SharedSecretSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.Data != nil { + in, out := &in.Data, &out.Data + *out = make(map[string][]byte, len(*in)) + for key, val := range *in { + var outVal []byte + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]byte, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretSpec. +func (in *SharedSecretSpec) DeepCopy() *SharedSecretSpec { + if in == nil { + return nil + } + out := new(SharedSecretSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretStatus) DeepCopyInto(out *SharedSecretStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(storagev1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretStatus. +func (in *SharedSecretStatus) DeepCopy() *SharedSecretStatus { + if in == nil { + return nil + } + out := new(SharedSecretStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraint) DeepCopyInto(out *SpaceConstraint) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraint. +func (in *SpaceConstraint) DeepCopy() *SpaceConstraint { + if in == nil { + return nil + } + out := new(SpaceConstraint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceConstraint) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraintList) DeepCopyInto(out *SpaceConstraintList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SpaceConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraintList. +func (in *SpaceConstraintList) DeepCopy() *SpaceConstraintList { + if in == nil { + return nil + } + out := new(SpaceConstraintList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceConstraintList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraintSpec) DeepCopyInto(out *SpaceConstraintSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.LocalSpaceConstraintTemplate.DeepCopyInto(&out.LocalSpaceConstraintTemplate) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraintSpec. +func (in *SpaceConstraintSpec) DeepCopy() *SpaceConstraintSpec { + if in == nil { + return nil + } + out := new(SpaceConstraintSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceConstraintStatus) DeepCopyInto(out *SpaceConstraintStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceConstraintStatus. +func (in *SpaceConstraintStatus) DeepCopy() *SpaceConstraintStatus { + if in == nil { + return nil + } + out := new(SpaceConstraintStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceCreationTask) DeepCopyInto(out *SpaceCreationTask) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = make([]storagev1.AppReference, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceCreationTask. +func (in *SpaceCreationTask) DeepCopy() *SpaceCreationTask { + if in == nil { + return nil + } + out := new(SpaceCreationTask) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstance) DeepCopyInto(out *SpaceInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstance. +func (in *SpaceInstance) DeepCopy() *SpaceInstance { + if in == nil { + return nil + } + out := new(SpaceInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstanceList) DeepCopyInto(out *SpaceInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SpaceInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstanceList. +func (in *SpaceInstanceList) DeepCopy() *SpaceInstanceList { + if in == nil { + return nil + } + out := new(SpaceInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstanceSpec) DeepCopyInto(out *SpaceInstanceSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.TemplateRef != nil { + in, out := &in.TemplateRef, &out.TemplateRef + *out = new(TemplateRef) + **out = **in + } + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(SpaceTemplateDefinition) + (*in).DeepCopyInto(*out) + } + out.ClusterRef = in.ClusterRef + if in.ExtraAccessRules != nil { + in, out := &in.ExtraAccessRules, &out.ExtraAccessRules + *out = make([]storagev1.InstanceAccessRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstanceSpec. +func (in *SpaceInstanceSpec) DeepCopy() *SpaceInstanceSpec { + if in == nil { + return nil + } + out := new(SpaceInstanceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstanceStatus) DeepCopyInto(out *SpaceInstanceStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(storagev1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SpaceObjects != nil { + in, out := &in.SpaceObjects, &out.SpaceObjects + *out = new(storagev1.ObjectsStatus) + (*in).DeepCopyInto(*out) + } + if in.Space != nil { + in, out := &in.Space, &out.Space + *out = new(SpaceTemplateDefinition) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstanceStatus. +func (in *SpaceInstanceStatus) DeepCopy() *SpaceInstanceStatus { + if in == nil { + return nil + } + out := new(SpaceInstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceInstanceTemplateDefinition) DeepCopyInto(out *SpaceInstanceTemplateDefinition) { + *out = *in + in.TemplateMetadata.DeepCopyInto(&out.TemplateMetadata) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceInstanceTemplateDefinition. +func (in *SpaceInstanceTemplateDefinition) DeepCopy() *SpaceInstanceTemplateDefinition { + if in == nil { + return nil + } + out := new(SpaceInstanceTemplateDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplate) DeepCopyInto(out *SpaceTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplate. +func (in *SpaceTemplate) DeepCopy() *SpaceTemplate { + if in == nil { + return nil + } + out := new(SpaceTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateDefinition) DeepCopyInto(out *SpaceTemplateDefinition) { + *out = *in + in.TemplateMetadata.DeepCopyInto(&out.TemplateMetadata) + in.InstanceTemplate.DeepCopyInto(&out.InstanceTemplate) + if in.Charts != nil { + in, out := &in.Charts, &out.Charts + *out = make([]storagev1.TemplateHelmChart, len(*in)) + copy(*out, *in) + } + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = make([]storagev1.AppReference, len(*in)) + copy(*out, *in) + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = new(storagev1.InstanceAccess) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateDefinition. +func (in *SpaceTemplateDefinition) DeepCopy() *SpaceTemplateDefinition { + if in == nil { + return nil + } + out := new(SpaceTemplateDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateList) DeepCopyInto(out *SpaceTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SpaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateList. +func (in *SpaceTemplateList) DeepCopy() *SpaceTemplateList { + if in == nil { + return nil + } + out := new(SpaceTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SpaceTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateSpec) DeepCopyInto(out *SpaceTemplateSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + in.Template.DeepCopyInto(&out.Template) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make([]AppParameter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]SpaceTemplateVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateSpec. +func (in *SpaceTemplateSpec) DeepCopy() *SpaceTemplateSpec { + if in == nil { + return nil + } + out := new(SpaceTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateStatus) DeepCopyInto(out *SpaceTemplateStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateStatus. +func (in *SpaceTemplateStatus) DeepCopy() *SpaceTemplateStatus { + if in == nil { + return nil + } + out := new(SpaceTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceTemplateVersion) DeepCopyInto(out *SpaceTemplateVersion) { + *out = *in + in.Template.DeepCopyInto(&out.Template) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make([]AppParameter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceTemplateVersion. +func (in *SpaceTemplateVersion) DeepCopy() *SpaceTemplateVersion { + if in == nil { + return nil + } + out := new(SpaceTemplateVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StreamContainer) DeepCopyInto(out *StreamContainer) { + *out = *in + in.Selector.DeepCopyInto(&out.Selector) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StreamContainer. +func (in *StreamContainer) DeepCopy() *StreamContainer { + if in == nil { + return nil + } + out := new(StreamContainer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Target) DeepCopyInto(out *Target) { + *out = *in + if in.SpaceInstance != nil { + in, out := &in.SpaceInstance, &out.SpaceInstance + *out = new(TargetInstance) + **out = **in + } + if in.VirtualClusterInstance != nil { + in, out := &in.VirtualClusterInstance, &out.VirtualClusterInstance + *out = new(TargetInstance) + **out = **in + } + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = new(TargetCluster) + **out = **in + } + if in.VirtualCluster != nil { + in, out := &in.VirtualCluster, &out.VirtualCluster + *out = new(TargetVirtualCluster) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target. +func (in *Target) DeepCopy() *Target { + if in == nil { + return nil + } + out := new(Target) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetCluster) DeepCopyInto(out *TargetCluster) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetCluster. +func (in *TargetCluster) DeepCopy() *TargetCluster { + if in == nil { + return nil + } + out := new(TargetCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetInstance) DeepCopyInto(out *TargetInstance) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetInstance. +func (in *TargetInstance) DeepCopy() *TargetInstance { + if in == nil { + return nil + } + out := new(TargetInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetVirtualCluster) DeepCopyInto(out *TargetVirtualCluster) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetVirtualCluster. +func (in *TargetVirtualCluster) DeepCopy() *TargetVirtualCluster { + if in == nil { + return nil + } + out := new(TargetVirtualCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Task) DeepCopyInto(out *Task) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task. +func (in *Task) DeepCopy() *Task { + if in == nil { + return nil + } + out := new(Task) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Task) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskDefinition) DeepCopyInto(out *TaskDefinition) { + *out = *in + if in.AppTask != nil { + in, out := &in.AppTask, &out.AppTask + *out = new(AppTask) + **out = **in + } + if in.HelmTask != nil { + in, out := &in.HelmTask, &out.HelmTask + *out = new(HelmTask) + (*in).DeepCopyInto(*out) + } + if in.SpaceCreationTask != nil { + in, out := &in.SpaceCreationTask, &out.SpaceCreationTask + *out = new(SpaceCreationTask) + (*in).DeepCopyInto(*out) + } + if in.VirtualClusterCreationTask != nil { + in, out := &in.VirtualClusterCreationTask, &out.VirtualClusterCreationTask + *out = new(VirtualClusterCreationTask) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskDefinition. +func (in *TaskDefinition) DeepCopy() *TaskDefinition { + if in == nil { + return nil + } + out := new(TaskDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskList) DeepCopyInto(out *TaskList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Task, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskList. +func (in *TaskList) DeepCopy() *TaskList { + if in == nil { + return nil + } + out := new(TaskList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskSpec) DeepCopyInto(out *TaskSpec) { + *out = *in + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Scope != nil { + in, out := &in.Scope, &out.Scope + *out = new(AccessKeyScope) + (*in).DeepCopyInto(*out) + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + in.Target.DeepCopyInto(&out.Target) + in.Task.DeepCopyInto(&out.Task) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec. +func (in *TaskSpec) DeepCopy() *TaskSpec { + if in == nil { + return nil + } + out := new(TaskSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskStatus) DeepCopyInto(out *TaskStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(storagev1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ContainerState != nil { + in, out := &in.ContainerState, &out.ContainerState + *out = new(corev1.ContainerStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskStatus. +func (in *TaskStatus) DeepCopy() *TaskStatus { + if in == nil { + return nil + } + out := new(TaskStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Team) DeepCopyInto(out *Team) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Team. +func (in *Team) DeepCopy() *Team { + if in == nil { + return nil + } + out := new(Team) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Team) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamList) DeepCopyInto(out *TeamList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Team, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamList. +func (in *TeamList) DeepCopy() *TeamList { + if in == nil { + return nil + } + out := new(TeamList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamSpec) DeepCopyInto(out *TeamSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ImagePullSecrets != nil { + in, out := &in.ImagePullSecrets, &out.ImagePullSecrets + *out = make([]*KindSecretRef, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(KindSecretRef) + **out = **in + } + } + } + if in.ClusterAccountTemplates != nil { + in, out := &in.ClusterAccountTemplates, &out.ClusterAccountTemplates + *out = make([]UserClusterAccountTemplate, len(*in)) + copy(*out, *in) + } + if in.ClusterRoles != nil { + in, out := &in.ClusterRoles, &out.ClusterRoles + *out = make([]storagev1.ClusterRoleRef, len(*in)) + copy(*out, *in) + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamSpec. +func (in *TeamSpec) DeepCopy() *TeamSpec { + if in == nil { + return nil + } + out := new(TeamSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamStatus) DeepCopyInto(out *TeamStatus) { + *out = *in + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]AccountClusterStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ClusterAccountTemplates != nil { + in, out := &in.ClusterAccountTemplates, &out.ClusterAccountTemplates + *out = make([]UserClusterAccountTemplateStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamStatus. +func (in *TeamStatus) DeepCopy() *TeamStatus { + if in == nil { + return nil + } + out := new(TeamStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateMetadata) DeepCopyInto(out *TemplateMetadata) { + *out = *in + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateMetadata. +func (in *TemplateMetadata) DeepCopy() *TemplateMetadata { + if in == nil { + return nil + } + out := new(TemplateMetadata) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateRef) DeepCopyInto(out *TemplateRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateRef. +func (in *TemplateRef) DeepCopy() *TemplateRef { + if in == nil { + return nil + } + out := new(TemplateRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *User) DeepCopyInto(out *User) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User. +func (in *User) DeepCopy() *User { + if in == nil { + return nil + } + out := new(User) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *User) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserClusterAccountTemplate) DeepCopyInto(out *UserClusterAccountTemplate) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserClusterAccountTemplate. +func (in *UserClusterAccountTemplate) DeepCopy() *UserClusterAccountTemplate { + if in == nil { + return nil + } + out := new(UserClusterAccountTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserClusterAccountTemplateStatus) DeepCopyInto(out *UserClusterAccountTemplateStatus) { + *out = *in + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]ClusterAccountTemplateClusterStatus, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserClusterAccountTemplateStatus. +func (in *UserClusterAccountTemplateStatus) DeepCopy() *UserClusterAccountTemplateStatus { + if in == nil { + return nil + } + out := new(UserClusterAccountTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserList) DeepCopyInto(out *UserList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]User, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList. +func (in *UserList) DeepCopy() *UserList { + if in == nil { + return nil + } + out := new(UserList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserOrTeam) DeepCopyInto(out *UserOrTeam) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserOrTeam. +func (in *UserOrTeam) DeepCopy() *UserOrTeam { + if in == nil { + return nil + } + out := new(UserOrTeam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserSpec) DeepCopyInto(out *UserSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.SSOGroups != nil { + in, out := &in.SSOGroups, &out.SSOGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PasswordRef != nil { + in, out := &in.PasswordRef, &out.PasswordRef + *out = new(SecretRef) + **out = **in + } + if in.AccessKeysRef != nil { + in, out := &in.AccessKeysRef, &out.AccessKeysRef + *out = new(SecretRef) + **out = **in + } + if in.CodesRef != nil { + in, out := &in.CodesRef, &out.CodesRef + *out = new(SecretRef) + **out = **in + } + if in.ImagePullSecrets != nil { + in, out := &in.ImagePullSecrets, &out.ImagePullSecrets + *out = make([]*KindSecretRef, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(KindSecretRef) + **out = **in + } + } + } + if in.ClusterAccountTemplates != nil { + in, out := &in.ClusterAccountTemplates, &out.ClusterAccountTemplates + *out = make([]UserClusterAccountTemplate, len(*in)) + copy(*out, *in) + } + if in.ClusterRoles != nil { + in, out := &in.ClusterRoles, &out.ClusterRoles + *out = make([]storagev1.ClusterRoleRef, len(*in)) + copy(*out, *in) + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpec. +func (in *UserSpec) DeepCopy() *UserSpec { + if in == nil { + return nil + } + out := new(UserSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserStatus) DeepCopyInto(out *UserStatus) { + *out = *in + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]AccountClusterStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ClusterAccountTemplates != nil { + in, out := &in.ClusterAccountTemplates, &out.ClusterAccountTemplates + *out = make([]UserClusterAccountTemplateStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserStatus. +func (in *UserStatus) DeepCopy() *UserStatus { + if in == nil { + return nil + } + out := new(UserStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VaultAuthSpec) DeepCopyInto(out *VaultAuthSpec) { + *out = *in + if in.Token != nil { + in, out := &in.Token, &out.Token + *out = new(string) + **out = **in + } + if in.TokenSecretRef != nil { + in, out := &in.TokenSecretRef, &out.TokenSecretRef + *out = new(corev1.SecretKeySelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuthSpec. +func (in *VaultAuthSpec) DeepCopy() *VaultAuthSpec { + if in == nil { + return nil + } + out := new(VaultAuthSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VaultIntegrationSpec) DeepCopyInto(out *VaultIntegrationSpec) { + *out = *in + if in.Auth != nil { + in, out := &in.Auth, &out.Auth + *out = new(VaultAuthSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultIntegrationSpec. +func (in *VaultIntegrationSpec) DeepCopy() *VaultIntegrationSpec { + if in == nil { + return nil + } + out := new(VaultIntegrationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterClusterRef) DeepCopyInto(out *VirtualClusterClusterRef) { + *out = *in + out.ClusterRef = in.ClusterRef + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterClusterRef. +func (in *VirtualClusterClusterRef) DeepCopy() *VirtualClusterClusterRef { + if in == nil { + return nil + } + out := new(VirtualClusterClusterRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterCreationTask) DeepCopyInto(out *VirtualClusterCreationTask) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = new(storagev1.InstanceAccess) + (*in).DeepCopyInto(*out) + } + out.HelmRelease = in.HelmRelease + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = make([]storagev1.AppReference, len(*in)) + copy(*out, *in) + } + if in.SpaceCreationTask != nil { + in, out := &in.SpaceCreationTask, &out.SpaceCreationTask + *out = new(SpaceCreationTask) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterCreationTask. +func (in *VirtualClusterCreationTask) DeepCopy() *VirtualClusterCreationTask { + if in == nil { + return nil + } + out := new(VirtualClusterCreationTask) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstance) DeepCopyInto(out *VirtualClusterInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstance. +func (in *VirtualClusterInstance) DeepCopy() *VirtualClusterInstance { + if in == nil { + return nil + } + out := new(VirtualClusterInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceList) DeepCopyInto(out *VirtualClusterInstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceList. +func (in *VirtualClusterInstanceList) DeepCopy() *VirtualClusterInstanceList { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterInstanceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceSpec) DeepCopyInto(out *VirtualClusterInstanceSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + if in.TemplateRef != nil { + in, out := &in.TemplateRef, &out.TemplateRef + *out = new(TemplateRef) + **out = **in + } + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(VirtualClusterTemplateDefinition) + (*in).DeepCopyInto(*out) + } + out.ClusterRef = in.ClusterRef + if in.WorkloadClusterRef != nil { + in, out := &in.WorkloadClusterRef, &out.WorkloadClusterRef + *out = new(VirtualClusterClusterRef) + **out = **in + } + if in.ExtraAccessRules != nil { + in, out := &in.ExtraAccessRules, &out.ExtraAccessRules + *out = make([]storagev1.InstanceAccessRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceSpec. +func (in *VirtualClusterInstanceSpec) DeepCopy() *VirtualClusterInstanceSpec { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceStatus) DeepCopyInto(out *VirtualClusterInstanceStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(storagev1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualClusterObjects != nil { + in, out := &in.VirtualClusterObjects, &out.VirtualClusterObjects + *out = new(storagev1.ObjectsStatus) + (*in).DeepCopyInto(*out) + } + if in.SpaceObjects != nil { + in, out := &in.SpaceObjects, &out.SpaceObjects + *out = new(storagev1.ObjectsStatus) + (*in).DeepCopyInto(*out) + } + if in.WorkloadSpaceObjects != nil { + in, out := &in.WorkloadSpaceObjects, &out.WorkloadSpaceObjects + *out = new(storagev1.ObjectsStatus) + (*in).DeepCopyInto(*out) + } + if in.VirtualCluster != nil { + in, out := &in.VirtualCluster, &out.VirtualCluster + *out = new(VirtualClusterTemplateDefinition) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceStatus. +func (in *VirtualClusterInstanceStatus) DeepCopy() *VirtualClusterInstanceStatus { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterInstanceTemplateDefinition) DeepCopyInto(out *VirtualClusterInstanceTemplateDefinition) { + *out = *in + in.TemplateMetadata.DeepCopyInto(&out.TemplateMetadata) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterInstanceTemplateDefinition. +func (in *VirtualClusterInstanceTemplateDefinition) DeepCopy() *VirtualClusterInstanceTemplateDefinition { + if in == nil { + return nil + } + out := new(VirtualClusterInstanceTemplateDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSpaceTemplateDefinition) DeepCopyInto(out *VirtualClusterSpaceTemplateDefinition) { + *out = *in + in.TemplateMetadata.DeepCopyInto(&out.TemplateMetadata) + if in.Charts != nil { + in, out := &in.Charts, &out.Charts + *out = make([]storagev1.TemplateHelmChart, len(*in)) + copy(*out, *in) + } + if in.Apps != nil { + in, out := &in.Apps, &out.Apps + *out = make([]storagev1.AppReference, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterSpaceTemplateDefinition. +func (in *VirtualClusterSpaceTemplateDefinition) DeepCopy() *VirtualClusterSpaceTemplateDefinition { + if in == nil { + return nil + } + out := new(VirtualClusterSpaceTemplateDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplate) DeepCopyInto(out *VirtualClusterTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplate. +func (in *VirtualClusterTemplate) DeepCopy() *VirtualClusterTemplate { + if in == nil { + return nil + } + out := new(VirtualClusterTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateDefinition) DeepCopyInto(out *VirtualClusterTemplateDefinition) { + *out = *in + in.TemplateMetadata.DeepCopyInto(&out.TemplateMetadata) + in.InstanceTemplate.DeepCopyInto(&out.InstanceTemplate) + in.VirtualClusterCommonSpec.DeepCopyInto(&out.VirtualClusterCommonSpec) + in.SpaceTemplate.DeepCopyInto(&out.SpaceTemplate) + if in.WorkloadVirtualClusterTemplateDefinition != nil { + in, out := &in.WorkloadVirtualClusterTemplateDefinition, &out.WorkloadVirtualClusterTemplateDefinition + *out = new(WorkloadVirtualClusterTemplateDefinition) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateDefinition. +func (in *VirtualClusterTemplateDefinition) DeepCopy() *VirtualClusterTemplateDefinition { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateList) DeepCopyInto(out *VirtualClusterTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateList. +func (in *VirtualClusterTemplateList) DeepCopy() *VirtualClusterTemplateList { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateSpaceTemplateRef) DeepCopyInto(out *VirtualClusterTemplateSpaceTemplateRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateSpaceTemplateRef. +func (in *VirtualClusterTemplateSpaceTemplateRef) DeepCopy() *VirtualClusterTemplateSpaceTemplateRef { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateSpaceTemplateRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateSpec) DeepCopyInto(out *VirtualClusterTemplateSpec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(UserOrTeam) + **out = **in + } + in.Template.DeepCopyInto(&out.Template) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make([]AppParameter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]VirtualClusterTemplateVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Access != nil { + in, out := &in.Access, &out.Access + *out = make([]Access, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SpaceTemplateRef != nil { + in, out := &in.SpaceTemplateRef, &out.SpaceTemplateRef + *out = new(VirtualClusterTemplateSpaceTemplateRef) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateSpec. +func (in *VirtualClusterTemplateSpec) DeepCopy() *VirtualClusterTemplateSpec { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateStatus) DeepCopyInto(out *VirtualClusterTemplateStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateStatus. +func (in *VirtualClusterTemplateStatus) DeepCopy() *VirtualClusterTemplateStatus { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterTemplateVersion) DeepCopyInto(out *VirtualClusterTemplateVersion) { + *out = *in + in.Template.DeepCopyInto(&out.Template) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make([]AppParameter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterTemplateVersion. +func (in *VirtualClusterTemplateVersion) DeepCopy() *VirtualClusterTemplateVersion { + if in == nil { + return nil + } + out := new(VirtualClusterTemplateVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkloadVirtualClusterTemplateDefinition) DeepCopyInto(out *WorkloadVirtualClusterTemplateDefinition) { + *out = *in + in.TemplateMetadata.DeepCopyInto(&out.TemplateMetadata) + if in.HelmRelease != nil { + in, out := &in.HelmRelease, &out.HelmRelease + *out = new(storagev1.VirtualClusterHelmRelease) + **out = **in + } + in.SpaceTemplate.DeepCopyInto(&out.SpaceTemplate) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadVirtualClusterTemplateDefinition. +func (in *WorkloadVirtualClusterTemplateDefinition) DeepCopy() *WorkloadVirtualClusterTemplateDefinition { + if in == nil { + return nil + } + out := new(WorkloadVirtualClusterTemplateDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkspaceStatusResult) DeepCopyInto(out *WorkspaceStatusResult) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceStatusResult. +func (in *WorkspaceStatusResult) DeepCopy() *WorkspaceStatusResult { + if in == nil { + return nil + } + out := new(WorkspaceStatusResult) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/zz_generated.defaults.go new file mode 100644 index 000000000..ff69702e1 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/storage/v1/zz_generated.defaults.go @@ -0,0 +1,66 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&Runner{}, func(obj interface{}) { SetObjectDefaults_Runner(obj.(*Runner)) }) + scheme.AddTypeDefaultingFunc(&RunnerList{}, func(obj interface{}) { SetObjectDefaults_RunnerList(obj.(*RunnerList)) }) + return nil +} + +func SetObjectDefaults_Runner(in *Runner) { + if in.Spec.ClusterRef != nil { + if in.Spec.ClusterRef.PodTemplate != nil { + for i := range in.Spec.ClusterRef.PodTemplate.Spec.InitContainers { + a := &in.Spec.ClusterRef.PodTemplate.Spec.InitContainers[i] + for j := range a.Ports { + b := &a.Ports[j] + if b.Protocol == "" { + b.Protocol = "TCP" + } + } + if a.LivenessProbe != nil { + if a.LivenessProbe.ProbeHandler.GRPC != nil { + if a.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.ReadinessProbe != nil { + if a.ReadinessProbe.ProbeHandler.GRPC != nil { + if a.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if a.StartupProbe != nil { + if a.StartupProbe.ProbeHandler.GRPC != nil { + if a.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + a.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + } + } +} + +func SetObjectDefaults_RunnerList(in *RunnerList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Runner(a) + } +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/doc.go new file mode 100644 index 000000000..ec87c499b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/doc.go @@ -0,0 +1,9 @@ +// Api versions allow the api contract for a resource to be changed while keeping +// backward compatibility by support multiple concurrent versions +// of the same resource + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:defaulter-gen=TypeMeta +// +groupName=ui.loft.sh +package v1 // import "github.com/loft-sh/api/v3/pkg/apis/ui/v1" diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/ui_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/ui_types.go new file mode 100644 index 000000000..4ab738b59 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/ui_types.go @@ -0,0 +1,85 @@ +package v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +const ( + ProductNameLoft = "Loft" + ProductNameVClusterPro = "vCluster.Pro" + ProductNameDevPodPro = "DevPod.Pro" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// UISettings holds the loft ui configuration settings +// +k8s:openapi-gen=true +type UISettings struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec UISettingsSpec `json:"spec,omitempty"` + Status UISettingsStatus `json:"status,omitempty"` +} + +// UISettingsSpec holds the specification +type UISettingsSpec struct { + UISettingsConfig `json:",inline"` + + // Name is the name of the product + // +optional + ProductName string `json:"productName,omitempty"` +} + +type UISettingsConfig struct { + // LoftVersion holds the current loft version + // +optional + LoftVersion string `json:"loftVersion,omitempty"` + // LogoURL is url pointing to the logo to use in the Loft UI. This path must be accessible for clients accessing + // the Loft UI! + // +optional + LogoURL string `json:"logoURL,omitempty"` + // LogoWithWordmarkURL is url pointing to the logo, including the wordmark, to use in the Loft UI. This path must be accessible for clients accessing + // the Loft UI! + // +optional + LogoWithWordmarkURL string `json:"logoWithWordmarkURL,omitempty"` + // LegalTemplate is a text (html) string containing the legal template to prompt to users when authenticating to + // Loft + // +optional + LegalTemplate string `json:"legalTemplate,omitempty"` + // PrimaryColor is the color value (ex: "#12345") to use as the primary color + // +optional + PrimaryColor string `json:"primaryColor,omitempty"` + // SidebarColor is the color value (ex: "#12345") to use for the sidebar + // +optional + SidebarColor string `json:"sidebarColor,omitempty"` + // AccentColor is the color value (ex: "#12345") to use for the accent + // +optional + AccentColor string `json:"accentColor,omitempty"` + // CustomCSS holds URLs with custom css files that should be included when loading the UI + // +optional + CustomCSS []string `json:"customCss,omitempty"` + // CustomJavaScript holds URLs with custom js files that should be included when loading the UI + // +optional + CustomJavaScript []string `json:"customJavaScript,omitempty"` + // NavBarButtons holds extra nav bar buttons + // +optional + NavBarButtons []NavBarButton `json:"navBarButtons,omitempty"` +} + +type NavBarButton struct { + // Position holds the position of the button, can be one of: + // TopStart, TopEnd, BottomStart, BottomEnd. Defaults to BottomEnd + // +optional + Position string `json:"position,omitempty"` + // Text holds text for the button + // +optional + Text string `json:"text,omitempty"` + // Link holds the link of the navbar button + // +optional + Link string `json:"link,omitempty"` + // Icon holds the url of the icon to display + // +optional + Icon string `json:"icon,omitempty"` +} + +// UISettingsStatus holds the status +type UISettingsStatus struct{} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..0674acd77 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/zz_generated.deepcopy.go @@ -0,0 +1,118 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NavBarButton) DeepCopyInto(out *NavBarButton) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NavBarButton. +func (in *NavBarButton) DeepCopy() *NavBarButton { + if in == nil { + return nil + } + out := new(NavBarButton) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UISettings) DeepCopyInto(out *UISettings) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UISettings. +func (in *UISettings) DeepCopy() *UISettings { + if in == nil { + return nil + } + out := new(UISettings) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UISettings) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UISettingsConfig) DeepCopyInto(out *UISettingsConfig) { + *out = *in + if in.CustomCSS != nil { + in, out := &in.CustomCSS, &out.CustomCSS + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.CustomJavaScript != nil { + in, out := &in.CustomJavaScript, &out.CustomJavaScript + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NavBarButtons != nil { + in, out := &in.NavBarButtons, &out.NavBarButtons + *out = make([]NavBarButton, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UISettingsConfig. +func (in *UISettingsConfig) DeepCopy() *UISettingsConfig { + if in == nil { + return nil + } + out := new(UISettingsConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UISettingsSpec) DeepCopyInto(out *UISettingsSpec) { + *out = *in + in.UISettingsConfig.DeepCopyInto(&out.UISettingsConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UISettingsSpec. +func (in *UISettingsSpec) DeepCopy() *UISettingsSpec { + if in == nil { + return nil + } + out := new(UISettingsSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UISettingsStatus) DeepCopyInto(out *UISettingsStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UISettingsStatus. +func (in *UISettingsStatus) DeepCopy() *UISettingsStatus { + if in == nil { + return nil + } + out := new(UISettingsStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/zz_generated.defaults.go new file mode 100644 index 000000000..88694caac --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/ui/v1/zz_generated.defaults.go @@ -0,0 +1,17 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/doc.go new file mode 100644 index 000000000..ba94f7a4b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/doc.go @@ -0,0 +1,5 @@ +// +k8s:deepcopy-gen=package,register +// +groupName=virtualcluster.loft.sh + +// Package api is the internal version of the API. +package virtualcluster diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/inject.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/inject.go new file mode 100644 index 000000000..fa012665b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/inject.go @@ -0,0 +1,7 @@ +package virtualcluster + +import ( + "github.com/loft-sh/api/v3/pkg/managerfactory" +) + +var Factory managerfactory.SharedManagerFactory diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/doc.go new file mode 100644 index 000000000..3452cdf62 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/doc.go @@ -0,0 +1,10 @@ +// Api versions allow the api contract for a resource to be changed while keeping +// backward compatibility by support multiple concurrent versions +// of the same resource + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/loft-sh/api/v3/pkg/apis/virtualcluster +// +k8s:defaulter-gen=TypeMeta +// +groupName=virtualcluster.loft.sh +package v1 // import "github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1" diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/helmrelease_types.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/helmrelease_types.go new file mode 100644 index 000000000..300ac7ce9 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/helmrelease_types.go @@ -0,0 +1,27 @@ +package v1 + +import ( + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +k8s:openapi-gen=true +// +resource:path=helmreleases,rest=HelmReleaseREST +type HelmRelease struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec HelmReleaseSpec `json:"spec,omitempty"` + Status HelmReleaseStatus `json:"status,omitempty"` +} + +type HelmReleaseSpec struct { + clusterv1.HelmReleaseSpec `json:",inline"` +} + +type HelmReleaseStatus struct { + clusterv1.HelmReleaseStatus `json:",inline"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.api.register.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.api.register.go new file mode 100644 index 000000000..ab66619a0 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.api.register.go @@ -0,0 +1,62 @@ +// Code generated by generator. DO NOT EDIT. + +package v1 + +import ( + "github.com/loft-sh/api/v3/pkg/apis/virtualcluster" + "github.com/loft-sh/apiserver/pkg/builders" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func addKnownTypes(scheme *runtime.Scheme) error { + // TODO this will get cleaned up with the scheme types are fixed + scheme.AddKnownTypes(SchemeGroupVersion, + &HelmRelease{}, + &HelmReleaseList{}, + ) + return nil +} + +var ( + ApiVersion = builders.NewApiVersion("virtualcluster.loft.sh", "v1").WithResources( + virtualcluster.VirtualclusterHelmReleaseStorage, + ) + + // Required by code generated by go2idl + AddToScheme = (&runtime.SchemeBuilder{ + ApiVersion.SchemeBuilder.AddToScheme, + RegisterDefaults, + RegisterConversions, + addKnownTypes, + func(scheme *runtime.Scheme) error { + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil + }, + }).AddToScheme + + SchemeBuilder = ApiVersion.SchemeBuilder + localSchemeBuilder = SchemeBuilder + SchemeGroupVersion = ApiVersion.GroupVersion +) + +// Required by code generated by go2idl +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Required by code generated by go2idl +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type HelmReleaseList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []HelmRelease `json:"items"` +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.conversion.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.conversion.go new file mode 100644 index 000000000..db7a32576 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.conversion.go @@ -0,0 +1,158 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1 + +import ( + unsafe "unsafe" + + virtualcluster "github.com/loft-sh/api/v3/pkg/apis/virtualcluster" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*HelmRelease)(nil), (*virtualcluster.HelmRelease)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HelmRelease_To_virtualcluster_HelmRelease(a.(*HelmRelease), b.(*virtualcluster.HelmRelease), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*virtualcluster.HelmRelease)(nil), (*HelmRelease)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_virtualcluster_HelmRelease_To_v1_HelmRelease(a.(*virtualcluster.HelmRelease), b.(*HelmRelease), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HelmReleaseList)(nil), (*virtualcluster.HelmReleaseList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HelmReleaseList_To_virtualcluster_HelmReleaseList(a.(*HelmReleaseList), b.(*virtualcluster.HelmReleaseList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*virtualcluster.HelmReleaseList)(nil), (*HelmReleaseList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_virtualcluster_HelmReleaseList_To_v1_HelmReleaseList(a.(*virtualcluster.HelmReleaseList), b.(*HelmReleaseList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HelmReleaseSpec)(nil), (*virtualcluster.HelmReleaseSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HelmReleaseSpec_To_virtualcluster_HelmReleaseSpec(a.(*HelmReleaseSpec), b.(*virtualcluster.HelmReleaseSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*virtualcluster.HelmReleaseSpec)(nil), (*HelmReleaseSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_virtualcluster_HelmReleaseSpec_To_v1_HelmReleaseSpec(a.(*virtualcluster.HelmReleaseSpec), b.(*HelmReleaseSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HelmReleaseStatus)(nil), (*virtualcluster.HelmReleaseStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HelmReleaseStatus_To_virtualcluster_HelmReleaseStatus(a.(*HelmReleaseStatus), b.(*virtualcluster.HelmReleaseStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*virtualcluster.HelmReleaseStatus)(nil), (*HelmReleaseStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_virtualcluster_HelmReleaseStatus_To_v1_HelmReleaseStatus(a.(*virtualcluster.HelmReleaseStatus), b.(*HelmReleaseStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1_HelmRelease_To_virtualcluster_HelmRelease(in *HelmRelease, out *virtualcluster.HelmRelease, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_HelmReleaseSpec_To_virtualcluster_HelmReleaseSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_HelmReleaseStatus_To_virtualcluster_HelmReleaseStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_HelmRelease_To_virtualcluster_HelmRelease is an autogenerated conversion function. +func Convert_v1_HelmRelease_To_virtualcluster_HelmRelease(in *HelmRelease, out *virtualcluster.HelmRelease, s conversion.Scope) error { + return autoConvert_v1_HelmRelease_To_virtualcluster_HelmRelease(in, out, s) +} + +func autoConvert_virtualcluster_HelmRelease_To_v1_HelmRelease(in *virtualcluster.HelmRelease, out *HelmRelease, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_virtualcluster_HelmReleaseSpec_To_v1_HelmReleaseSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_virtualcluster_HelmReleaseStatus_To_v1_HelmReleaseStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_virtualcluster_HelmRelease_To_v1_HelmRelease is an autogenerated conversion function. +func Convert_virtualcluster_HelmRelease_To_v1_HelmRelease(in *virtualcluster.HelmRelease, out *HelmRelease, s conversion.Scope) error { + return autoConvert_virtualcluster_HelmRelease_To_v1_HelmRelease(in, out, s) +} + +func autoConvert_v1_HelmReleaseList_To_virtualcluster_HelmReleaseList(in *HelmReleaseList, out *virtualcluster.HelmReleaseList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]virtualcluster.HelmRelease)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_HelmReleaseList_To_virtualcluster_HelmReleaseList is an autogenerated conversion function. +func Convert_v1_HelmReleaseList_To_virtualcluster_HelmReleaseList(in *HelmReleaseList, out *virtualcluster.HelmReleaseList, s conversion.Scope) error { + return autoConvert_v1_HelmReleaseList_To_virtualcluster_HelmReleaseList(in, out, s) +} + +func autoConvert_virtualcluster_HelmReleaseList_To_v1_HelmReleaseList(in *virtualcluster.HelmReleaseList, out *HelmReleaseList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]HelmRelease)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_virtualcluster_HelmReleaseList_To_v1_HelmReleaseList is an autogenerated conversion function. +func Convert_virtualcluster_HelmReleaseList_To_v1_HelmReleaseList(in *virtualcluster.HelmReleaseList, out *HelmReleaseList, s conversion.Scope) error { + return autoConvert_virtualcluster_HelmReleaseList_To_v1_HelmReleaseList(in, out, s) +} + +func autoConvert_v1_HelmReleaseSpec_To_virtualcluster_HelmReleaseSpec(in *HelmReleaseSpec, out *virtualcluster.HelmReleaseSpec, s conversion.Scope) error { + out.HelmReleaseSpec = in.HelmReleaseSpec + return nil +} + +// Convert_v1_HelmReleaseSpec_To_virtualcluster_HelmReleaseSpec is an autogenerated conversion function. +func Convert_v1_HelmReleaseSpec_To_virtualcluster_HelmReleaseSpec(in *HelmReleaseSpec, out *virtualcluster.HelmReleaseSpec, s conversion.Scope) error { + return autoConvert_v1_HelmReleaseSpec_To_virtualcluster_HelmReleaseSpec(in, out, s) +} + +func autoConvert_virtualcluster_HelmReleaseSpec_To_v1_HelmReleaseSpec(in *virtualcluster.HelmReleaseSpec, out *HelmReleaseSpec, s conversion.Scope) error { + out.HelmReleaseSpec = in.HelmReleaseSpec + return nil +} + +// Convert_virtualcluster_HelmReleaseSpec_To_v1_HelmReleaseSpec is an autogenerated conversion function. +func Convert_virtualcluster_HelmReleaseSpec_To_v1_HelmReleaseSpec(in *virtualcluster.HelmReleaseSpec, out *HelmReleaseSpec, s conversion.Scope) error { + return autoConvert_virtualcluster_HelmReleaseSpec_To_v1_HelmReleaseSpec(in, out, s) +} + +func autoConvert_v1_HelmReleaseStatus_To_virtualcluster_HelmReleaseStatus(in *HelmReleaseStatus, out *virtualcluster.HelmReleaseStatus, s conversion.Scope) error { + out.HelmReleaseStatus = in.HelmReleaseStatus + return nil +} + +// Convert_v1_HelmReleaseStatus_To_virtualcluster_HelmReleaseStatus is an autogenerated conversion function. +func Convert_v1_HelmReleaseStatus_To_virtualcluster_HelmReleaseStatus(in *HelmReleaseStatus, out *virtualcluster.HelmReleaseStatus, s conversion.Scope) error { + return autoConvert_v1_HelmReleaseStatus_To_virtualcluster_HelmReleaseStatus(in, out, s) +} + +func autoConvert_virtualcluster_HelmReleaseStatus_To_v1_HelmReleaseStatus(in *virtualcluster.HelmReleaseStatus, out *HelmReleaseStatus, s conversion.Scope) error { + out.HelmReleaseStatus = in.HelmReleaseStatus + return nil +} + +// Convert_virtualcluster_HelmReleaseStatus_To_v1_HelmReleaseStatus is an autogenerated conversion function. +func Convert_virtualcluster_HelmReleaseStatus_To_v1_HelmReleaseStatus(in *virtualcluster.HelmReleaseStatus, out *HelmReleaseStatus, s conversion.Scope) error { + return autoConvert_virtualcluster_HelmReleaseStatus_To_v1_HelmReleaseStatus(in, out, s) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..815db385b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.deepcopy.go @@ -0,0 +1,105 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmRelease) DeepCopyInto(out *HelmRelease) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease. +func (in *HelmRelease) DeepCopy() *HelmRelease { + if in == nil { + return nil + } + out := new(HelmRelease) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmRelease) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseList) DeepCopyInto(out *HelmReleaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HelmRelease, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseList. +func (in *HelmReleaseList) DeepCopy() *HelmReleaseList { + if in == nil { + return nil + } + out := new(HelmReleaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmReleaseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) { + *out = *in + in.HelmReleaseSpec.DeepCopyInto(&out.HelmReleaseSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseSpec. +func (in *HelmReleaseSpec) DeepCopy() *HelmReleaseSpec { + if in == nil { + return nil + } + out := new(HelmReleaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) { + *out = *in + in.HelmReleaseStatus.DeepCopyInto(&out.HelmReleaseStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseStatus. +func (in *HelmReleaseStatus) DeepCopy() *HelmReleaseStatus { + if in == nil { + return nil + } + out := new(HelmReleaseStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.defaults.go new file mode 100644 index 000000000..88694caac --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1/zz_generated.defaults.go @@ -0,0 +1,17 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/zz_generated.api.register.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/zz_generated.api.register.go new file mode 100644 index 000000000..6ceea9105 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/zz_generated.api.register.go @@ -0,0 +1,209 @@ +// Code generated by generator. DO NOT EDIT. + +package virtualcluster + +import ( + "context" + "fmt" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + "github.com/loft-sh/api/v3/pkg/managerfactory" + "github.com/loft-sh/apiserver/pkg/builders" + "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/registry/rest" +) + +type NewRESTFunc func(factory managerfactory.SharedManagerFactory) rest.Storage + +var ( + VirtualclusterHelmReleaseStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalHelmRelease, + func() runtime.Object { return &HelmRelease{} }, // Register versioned resource + func() runtime.Object { return &HelmReleaseList{} }, // Register versioned resource list + NewHelmReleaseREST, + ) + NewHelmReleaseREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewHelmReleaseRESTFunc(Factory) + } + NewHelmReleaseRESTFunc NewRESTFunc + InternalHelmRelease = builders.NewInternalResource( + "helmreleases", + "HelmRelease", + func() runtime.Object { return &HelmRelease{} }, + func() runtime.Object { return &HelmReleaseList{} }, + ) + InternalHelmReleaseStatus = builders.NewInternalResourceStatus( + "helmreleases", + "HelmReleaseStatus", + func() runtime.Object { return &HelmRelease{} }, + func() runtime.Object { return &HelmReleaseList{} }, + ) + // Registered resources and subresources + ApiVersion = builders.NewApiGroup("virtualcluster.loft.sh").WithKinds( + InternalHelmRelease, + InternalHelmReleaseStatus, + ) + + // Required by code generated by go2idl + AddToScheme = (&runtime.SchemeBuilder{ + ApiVersion.SchemeBuilder.AddToScheme, + RegisterDefaults, + }).AddToScheme + SchemeBuilder = ApiVersion.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + SchemeGroupVersion = ApiVersion.GroupVersion +) + +// Required by code generated by go2idl +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Required by code generated by go2idl +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type HelmRelease struct { + metav1.TypeMeta + metav1.ObjectMeta + Spec HelmReleaseSpec + Status HelmReleaseStatus +} + +type HelmReleaseSpec struct { + clusterv1.HelmReleaseSpec +} + +type HelmReleaseStatus struct { + clusterv1.HelmReleaseStatus +} + +// HelmRelease Functions and Structs +// +// +k8s:deepcopy-gen=false +type HelmReleaseStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type HelmReleaseStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type HelmReleaseList struct { + metav1.TypeMeta + metav1.ListMeta + Items []HelmRelease +} + +func (HelmRelease) NewStatus() interface{} { + return HelmReleaseStatus{} +} + +func (pc *HelmRelease) GetStatus() interface{} { + return pc.Status +} + +func (pc *HelmRelease) SetStatus(s interface{}) { + pc.Status = s.(HelmReleaseStatus) +} + +func (pc *HelmRelease) GetSpec() interface{} { + return pc.Spec +} + +func (pc *HelmRelease) SetSpec(s interface{}) { + pc.Spec = s.(HelmReleaseSpec) +} + +func (pc *HelmRelease) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *HelmRelease) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc HelmRelease) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store HelmRelease. +// +k8s:deepcopy-gen=false +type HelmReleaseRegistry interface { + ListHelmReleases(ctx context.Context, options *internalversion.ListOptions) (*HelmReleaseList, error) + GetHelmRelease(ctx context.Context, id string, options *metav1.GetOptions) (*HelmRelease, error) + CreateHelmRelease(ctx context.Context, id *HelmRelease) (*HelmRelease, error) + UpdateHelmRelease(ctx context.Context, id *HelmRelease) (*HelmRelease, error) + DeleteHelmRelease(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewHelmReleaseRegistry(sp builders.StandardStorageProvider) HelmReleaseRegistry { + return &storageHelmRelease{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageHelmRelease struct { + builders.StandardStorageProvider +} + +func (s *storageHelmRelease) ListHelmReleases(ctx context.Context, options *internalversion.ListOptions) (*HelmReleaseList, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*HelmReleaseList), err +} + +func (s *storageHelmRelease) GetHelmRelease(ctx context.Context, id string, options *metav1.GetOptions) (*HelmRelease, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*HelmRelease), nil +} + +func (s *storageHelmRelease) CreateHelmRelease(ctx context.Context, object *HelmRelease) (*HelmRelease, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*HelmRelease), nil +} + +func (s *storageHelmRelease) UpdateHelmRelease(ctx context.Context, object *HelmRelease) (*HelmRelease, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil, false, &metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return obj.(*HelmRelease), nil +} + +func (s *storageHelmRelease) DeleteHelmRelease(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/zz_generated.deepcopy.go new file mode 100644 index 000000000..fa13d4681 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/zz_generated.deepcopy.go @@ -0,0 +1,105 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package virtualcluster + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmRelease) DeepCopyInto(out *HelmRelease) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease. +func (in *HelmRelease) DeepCopy() *HelmRelease { + if in == nil { + return nil + } + out := new(HelmRelease) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmRelease) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseList) DeepCopyInto(out *HelmReleaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HelmRelease, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseList. +func (in *HelmReleaseList) DeepCopy() *HelmReleaseList { + if in == nil { + return nil + } + out := new(HelmReleaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmReleaseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) { + *out = *in + in.HelmReleaseSpec.DeepCopyInto(&out.HelmReleaseSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseSpec. +func (in *HelmReleaseSpec) DeepCopy() *HelmReleaseSpec { + if in == nil { + return nil + } + out := new(HelmReleaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) { + *out = *in + in.HelmReleaseStatus.DeepCopyInto(&out.HelmReleaseStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseStatus. +func (in *HelmReleaseStatus) DeepCopy() *HelmReleaseStatus { + if in == nil { + return nil + } + out := new(HelmReleaseStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/zz_generated.defaults.go new file mode 100644 index 000000000..ddcfe7dfd --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/apis/virtualcluster/zz_generated.defaults.go @@ -0,0 +1,17 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package virtualcluster + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/clientset.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/clientset.go new file mode 100644 index 000000000..aa3d39d7d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/clientset.go @@ -0,0 +1,130 @@ +// Code generated by client-gen. DO NOT EDIT. + +package clientset + +import ( + "fmt" + "net/http" + + managementv1 "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1" + virtualclusterv1 "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + ManagementV1() managementv1.ManagementV1Interface + StorageV1() storagev1.StorageV1Interface + VirtualclusterV1() virtualclusterv1.VirtualclusterV1Interface +} + +// Clientset contains the clients for groups. +type Clientset struct { + *discovery.DiscoveryClient + managementV1 *managementv1.ManagementV1Client + storageV1 *storagev1.StorageV1Client + virtualclusterV1 *virtualclusterv1.VirtualclusterV1Client +} + +// ManagementV1 retrieves the ManagementV1Client +func (c *Clientset) ManagementV1() managementv1.ManagementV1Interface { + return c.managementV1 +} + +// StorageV1 retrieves the StorageV1Client +func (c *Clientset) StorageV1() storagev1.StorageV1Interface { + return c.storageV1 +} + +// VirtualclusterV1 retrieves the VirtualclusterV1Client +func (c *Clientset) VirtualclusterV1() virtualclusterv1.VirtualclusterV1Interface { + return c.virtualclusterV1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + + var cs Clientset + var err error + cs.managementV1, err = managementv1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + cs.storageV1, err = storagev1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + cs.virtualclusterV1, err = virtualclusterv1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.managementV1 = managementv1.New(c) + cs.storageV1 = storagev1.New(c) + cs.virtualclusterV1 = virtualclusterv1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme/doc.go new file mode 100644 index 000000000..14db57a58 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme/register.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme/register.go new file mode 100644 index 000000000..6a432f50d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme/register.go @@ -0,0 +1,44 @@ +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + virtualclusterv1 "github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + managementv1.AddToScheme, + storagev1.AddToScheme, + virtualclusterv1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/agentauditevent.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/agentauditevent.go new file mode 100644 index 000000000..e262cba5d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/agentauditevent.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// AgentAuditEventsGetter has a method to return a AgentAuditEventInterface. +// A group's client should implement this interface. +type AgentAuditEventsGetter interface { + AgentAuditEvents() AgentAuditEventInterface +} + +// AgentAuditEventInterface has methods to work with AgentAuditEvent resources. +type AgentAuditEventInterface interface { + Create(ctx context.Context, agentAuditEvent *v1.AgentAuditEvent, opts metav1.CreateOptions) (*v1.AgentAuditEvent, error) + Update(ctx context.Context, agentAuditEvent *v1.AgentAuditEvent, opts metav1.UpdateOptions) (*v1.AgentAuditEvent, error) + UpdateStatus(ctx context.Context, agentAuditEvent *v1.AgentAuditEvent, opts metav1.UpdateOptions) (*v1.AgentAuditEvent, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.AgentAuditEvent, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.AgentAuditEventList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.AgentAuditEvent, err error) + AgentAuditEventExpansion +} + +// agentAuditEvents implements AgentAuditEventInterface +type agentAuditEvents struct { + client rest.Interface +} + +// newAgentAuditEvents returns a AgentAuditEvents +func newAgentAuditEvents(c *ManagementV1Client) *agentAuditEvents { + return &agentAuditEvents{ + client: c.RESTClient(), + } +} + +// Get takes name of the agentAuditEvent, and returns the corresponding agentAuditEvent object, and an error if there is any. +func (c *agentAuditEvents) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.AgentAuditEvent, err error) { + result = &v1.AgentAuditEvent{} + err = c.client.Get(). + Resource("agentauditevents"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of AgentAuditEvents that match those selectors. +func (c *agentAuditEvents) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AgentAuditEventList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.AgentAuditEventList{} + err = c.client.Get(). + Resource("agentauditevents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested agentAuditEvents. +func (c *agentAuditEvents) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("agentauditevents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a agentAuditEvent and creates it. Returns the server's representation of the agentAuditEvent, and an error, if there is any. +func (c *agentAuditEvents) Create(ctx context.Context, agentAuditEvent *v1.AgentAuditEvent, opts metav1.CreateOptions) (result *v1.AgentAuditEvent, err error) { + result = &v1.AgentAuditEvent{} + err = c.client.Post(). + Resource("agentauditevents"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(agentAuditEvent). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a agentAuditEvent and updates it. Returns the server's representation of the agentAuditEvent, and an error, if there is any. +func (c *agentAuditEvents) Update(ctx context.Context, agentAuditEvent *v1.AgentAuditEvent, opts metav1.UpdateOptions) (result *v1.AgentAuditEvent, err error) { + result = &v1.AgentAuditEvent{} + err = c.client.Put(). + Resource("agentauditevents"). + Name(agentAuditEvent.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(agentAuditEvent). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *agentAuditEvents) UpdateStatus(ctx context.Context, agentAuditEvent *v1.AgentAuditEvent, opts metav1.UpdateOptions) (result *v1.AgentAuditEvent, err error) { + result = &v1.AgentAuditEvent{} + err = c.client.Put(). + Resource("agentauditevents"). + Name(agentAuditEvent.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(agentAuditEvent). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the agentAuditEvent and deletes it. Returns an error if one occurs. +func (c *agentAuditEvents) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("agentauditevents"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *agentAuditEvents) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("agentauditevents"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched agentAuditEvent. +func (c *agentAuditEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.AgentAuditEvent, err error) { + result = &v1.AgentAuditEvent{} + err = c.client.Patch(pt). + Resource("agentauditevents"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/announcement.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/announcement.go new file mode 100644 index 000000000..a42dfff24 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/announcement.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// AnnouncementsGetter has a method to return a AnnouncementInterface. +// A group's client should implement this interface. +type AnnouncementsGetter interface { + Announcements() AnnouncementInterface +} + +// AnnouncementInterface has methods to work with Announcement resources. +type AnnouncementInterface interface { + Create(ctx context.Context, announcement *v1.Announcement, opts metav1.CreateOptions) (*v1.Announcement, error) + Update(ctx context.Context, announcement *v1.Announcement, opts metav1.UpdateOptions) (*v1.Announcement, error) + UpdateStatus(ctx context.Context, announcement *v1.Announcement, opts metav1.UpdateOptions) (*v1.Announcement, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Announcement, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.AnnouncementList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Announcement, err error) + AnnouncementExpansion +} + +// announcements implements AnnouncementInterface +type announcements struct { + client rest.Interface +} + +// newAnnouncements returns a Announcements +func newAnnouncements(c *ManagementV1Client) *announcements { + return &announcements{ + client: c.RESTClient(), + } +} + +// Get takes name of the announcement, and returns the corresponding announcement object, and an error if there is any. +func (c *announcements) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Announcement, err error) { + result = &v1.Announcement{} + err = c.client.Get(). + Resource("announcements"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Announcements that match those selectors. +func (c *announcements) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AnnouncementList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.AnnouncementList{} + err = c.client.Get(). + Resource("announcements"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested announcements. +func (c *announcements) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("announcements"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a announcement and creates it. Returns the server's representation of the announcement, and an error, if there is any. +func (c *announcements) Create(ctx context.Context, announcement *v1.Announcement, opts metav1.CreateOptions) (result *v1.Announcement, err error) { + result = &v1.Announcement{} + err = c.client.Post(). + Resource("announcements"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(announcement). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a announcement and updates it. Returns the server's representation of the announcement, and an error, if there is any. +func (c *announcements) Update(ctx context.Context, announcement *v1.Announcement, opts metav1.UpdateOptions) (result *v1.Announcement, err error) { + result = &v1.Announcement{} + err = c.client.Put(). + Resource("announcements"). + Name(announcement.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(announcement). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *announcements) UpdateStatus(ctx context.Context, announcement *v1.Announcement, opts metav1.UpdateOptions) (result *v1.Announcement, err error) { + result = &v1.Announcement{} + err = c.client.Put(). + Resource("announcements"). + Name(announcement.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(announcement). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the announcement and deletes it. Returns an error if one occurs. +func (c *announcements) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("announcements"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *announcements) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("announcements"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched announcement. +func (c *announcements) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Announcement, err error) { + result = &v1.Announcement{} + err = c.client.Patch(pt). + Resource("announcements"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/app.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/app.go new file mode 100644 index 000000000..d88444616 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/app.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// AppsGetter has a method to return a AppInterface. +// A group's client should implement this interface. +type AppsGetter interface { + Apps() AppInterface +} + +// AppInterface has methods to work with App resources. +type AppInterface interface { + Create(ctx context.Context, app *v1.App, opts metav1.CreateOptions) (*v1.App, error) + Update(ctx context.Context, app *v1.App, opts metav1.UpdateOptions) (*v1.App, error) + UpdateStatus(ctx context.Context, app *v1.App, opts metav1.UpdateOptions) (*v1.App, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.App, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.AppList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.App, err error) + AppExpansion +} + +// apps implements AppInterface +type apps struct { + client rest.Interface +} + +// newApps returns a Apps +func newApps(c *ManagementV1Client) *apps { + return &apps{ + client: c.RESTClient(), + } +} + +// Get takes name of the app, and returns the corresponding app object, and an error if there is any. +func (c *apps) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.App, err error) { + result = &v1.App{} + err = c.client.Get(). + Resource("apps"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Apps that match those selectors. +func (c *apps) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AppList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.AppList{} + err = c.client.Get(). + Resource("apps"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested apps. +func (c *apps) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("apps"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a app and creates it. Returns the server's representation of the app, and an error, if there is any. +func (c *apps) Create(ctx context.Context, app *v1.App, opts metav1.CreateOptions) (result *v1.App, err error) { + result = &v1.App{} + err = c.client.Post(). + Resource("apps"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(app). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a app and updates it. Returns the server's representation of the app, and an error, if there is any. +func (c *apps) Update(ctx context.Context, app *v1.App, opts metav1.UpdateOptions) (result *v1.App, err error) { + result = &v1.App{} + err = c.client.Put(). + Resource("apps"). + Name(app.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(app). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *apps) UpdateStatus(ctx context.Context, app *v1.App, opts metav1.UpdateOptions) (result *v1.App, err error) { + result = &v1.App{} + err = c.client.Put(). + Resource("apps"). + Name(app.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(app). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the app and deletes it. Returns an error if one occurs. +func (c *apps) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("apps"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *apps) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("apps"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched app. +func (c *apps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.App, err error) { + result = &v1.App{} + err = c.client.Patch(pt). + Resource("apps"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/cluster.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/cluster.go new file mode 100644 index 000000000..4fc11e4c8 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/cluster.go @@ -0,0 +1,225 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ClustersGetter has a method to return a ClusterInterface. +// A group's client should implement this interface. +type ClustersGetter interface { + Clusters() ClusterInterface +} + +// ClusterInterface has methods to work with Cluster resources. +type ClusterInterface interface { + Create(ctx context.Context, cluster *v1.Cluster, opts metav1.CreateOptions) (*v1.Cluster, error) + Update(ctx context.Context, cluster *v1.Cluster, opts metav1.UpdateOptions) (*v1.Cluster, error) + UpdateStatus(ctx context.Context, cluster *v1.Cluster, opts metav1.UpdateOptions) (*v1.Cluster, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Cluster, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Cluster, err error) + ListAccess(ctx context.Context, clusterName string, options metav1.GetOptions) (*v1.ClusterMemberAccess, error) + ListMembers(ctx context.Context, clusterName string, options metav1.GetOptions) (*v1.ClusterMembers, error) + ListVirtualClusterDefaults(ctx context.Context, clusterName string, options metav1.GetOptions) (*v1.ClusterVirtualClusterDefaults, error) + GetAgentConfig(ctx context.Context, clusterName string, options metav1.GetOptions) (*v1.ClusterAgentConfig, error) + + ClusterExpansion +} + +// clusters implements ClusterInterface +type clusters struct { + client rest.Interface +} + +// newClusters returns a Clusters +func newClusters(c *ManagementV1Client) *clusters { + return &clusters{ + client: c.RESTClient(), + } +} + +// Get takes name of the cluster, and returns the corresponding cluster object, and an error if there is any. +func (c *clusters) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Cluster, err error) { + result = &v1.Cluster{} + err = c.client.Get(). + Resource("clusters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Clusters that match those selectors. +func (c *clusters) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ClusterList{} + err = c.client.Get(). + Resource("clusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusters. +func (c *clusters) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("clusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cluster and creates it. Returns the server's representation of the cluster, and an error, if there is any. +func (c *clusters) Create(ctx context.Context, cluster *v1.Cluster, opts metav1.CreateOptions) (result *v1.Cluster, err error) { + result = &v1.Cluster{} + err = c.client.Post(). + Resource("clusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cluster). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cluster and updates it. Returns the server's representation of the cluster, and an error, if there is any. +func (c *clusters) Update(ctx context.Context, cluster *v1.Cluster, opts metav1.UpdateOptions) (result *v1.Cluster, err error) { + result = &v1.Cluster{} + err = c.client.Put(). + Resource("clusters"). + Name(cluster.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cluster). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *clusters) UpdateStatus(ctx context.Context, cluster *v1.Cluster, opts metav1.UpdateOptions) (result *v1.Cluster, err error) { + result = &v1.Cluster{} + err = c.client.Put(). + Resource("clusters"). + Name(cluster.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cluster). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cluster and deletes it. Returns an error if one occurs. +func (c *clusters) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusters"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusters) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("clusters"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cluster. +func (c *clusters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Cluster, err error) { + result = &v1.Cluster{} + err = c.client.Patch(pt). + Resource("clusters"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ListAccess takes name of the cluster, and returns the corresponding v1.ClusterMemberAccess object, and an error if there is any. +func (c *clusters) ListAccess(ctx context.Context, clusterName string, options metav1.GetOptions) (result *v1.ClusterMemberAccess, err error) { + result = &v1.ClusterMemberAccess{} + err = c.client.Get(). + Resource("clusters"). + Name(clusterName). + SubResource("memberaccess"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// ListMembers takes name of the cluster, and returns the corresponding v1.ClusterMembers object, and an error if there is any. +func (c *clusters) ListMembers(ctx context.Context, clusterName string, options metav1.GetOptions) (result *v1.ClusterMembers, err error) { + result = &v1.ClusterMembers{} + err = c.client.Get(). + Resource("clusters"). + Name(clusterName). + SubResource("members"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// ListVirtualClusterDefaults takes name of the cluster, and returns the corresponding v1.ClusterVirtualClusterDefaults object, and an error if there is any. +func (c *clusters) ListVirtualClusterDefaults(ctx context.Context, clusterName string, options metav1.GetOptions) (result *v1.ClusterVirtualClusterDefaults, err error) { + result = &v1.ClusterVirtualClusterDefaults{} + err = c.client.Get(). + Resource("clusters"). + Name(clusterName). + SubResource("virtualclusterdefaults"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// GetAgentConfig takes name of the cluster, and returns the corresponding v1.ClusterAgentConfig object, and an error if there is any. +func (c *clusters) GetAgentConfig(ctx context.Context, clusterName string, options metav1.GetOptions) (result *v1.ClusterAgentConfig, err error) { + result = &v1.ClusterAgentConfig{} + err = c.client.Get(). + Resource("clusters"). + Name(clusterName). + SubResource("agentconfig"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/clusteraccess.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/clusteraccess.go new file mode 100644 index 000000000..40dbafd6b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/clusteraccess.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ClusterAccessesGetter has a method to return a ClusterAccessInterface. +// A group's client should implement this interface. +type ClusterAccessesGetter interface { + ClusterAccesses() ClusterAccessInterface +} + +// ClusterAccessInterface has methods to work with ClusterAccess resources. +type ClusterAccessInterface interface { + Create(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.CreateOptions) (*v1.ClusterAccess, error) + Update(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.UpdateOptions) (*v1.ClusterAccess, error) + UpdateStatus(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.UpdateOptions) (*v1.ClusterAccess, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterAccess, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterAccessList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterAccess, err error) + ClusterAccessExpansion +} + +// clusterAccesses implements ClusterAccessInterface +type clusterAccesses struct { + client rest.Interface +} + +// newClusterAccesses returns a ClusterAccesses +func newClusterAccesses(c *ManagementV1Client) *clusterAccesses { + return &clusterAccesses{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterAccess, and returns the corresponding clusterAccess object, and an error if there is any. +func (c *clusterAccesses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterAccess, err error) { + result = &v1.ClusterAccess{} + err = c.client.Get(). + Resource("clusteraccesses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterAccesses that match those selectors. +func (c *clusterAccesses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterAccessList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ClusterAccessList{} + err = c.client.Get(). + Resource("clusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterAccesses. +func (c *clusterAccesses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("clusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a clusterAccess and creates it. Returns the server's representation of the clusterAccess, and an error, if there is any. +func (c *clusterAccesses) Create(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.CreateOptions) (result *v1.ClusterAccess, err error) { + result = &v1.ClusterAccess{} + err = c.client.Post(). + Resource("clusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterAccess). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a clusterAccess and updates it. Returns the server's representation of the clusterAccess, and an error, if there is any. +func (c *clusterAccesses) Update(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.UpdateOptions) (result *v1.ClusterAccess, err error) { + result = &v1.ClusterAccess{} + err = c.client.Put(). + Resource("clusteraccesses"). + Name(clusterAccess.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterAccess). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *clusterAccesses) UpdateStatus(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.UpdateOptions) (result *v1.ClusterAccess, err error) { + result = &v1.ClusterAccess{} + err = c.client.Put(). + Resource("clusteraccesses"). + Name(clusterAccess.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterAccess). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the clusterAccess and deletes it. Returns an error if one occurs. +func (c *clusterAccesses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusteraccesses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterAccesses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("clusteraccesses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched clusterAccess. +func (c *clusterAccesses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterAccess, err error) { + result = &v1.ClusterAccess{} + err = c.client.Patch(pt). + Resource("clusteraccesses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/clusterconnect.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/clusterconnect.go new file mode 100644 index 000000000..fd6188a77 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/clusterconnect.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ClusterConnectsGetter has a method to return a ClusterConnectInterface. +// A group's client should implement this interface. +type ClusterConnectsGetter interface { + ClusterConnects() ClusterConnectInterface +} + +// ClusterConnectInterface has methods to work with ClusterConnect resources. +type ClusterConnectInterface interface { + Create(ctx context.Context, clusterConnect *v1.ClusterConnect, opts metav1.CreateOptions) (*v1.ClusterConnect, error) + Update(ctx context.Context, clusterConnect *v1.ClusterConnect, opts metav1.UpdateOptions) (*v1.ClusterConnect, error) + UpdateStatus(ctx context.Context, clusterConnect *v1.ClusterConnect, opts metav1.UpdateOptions) (*v1.ClusterConnect, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterConnect, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterConnectList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterConnect, err error) + ClusterConnectExpansion +} + +// clusterConnects implements ClusterConnectInterface +type clusterConnects struct { + client rest.Interface +} + +// newClusterConnects returns a ClusterConnects +func newClusterConnects(c *ManagementV1Client) *clusterConnects { + return &clusterConnects{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterConnect, and returns the corresponding clusterConnect object, and an error if there is any. +func (c *clusterConnects) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterConnect, err error) { + result = &v1.ClusterConnect{} + err = c.client.Get(). + Resource("clusterconnect"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterConnects that match those selectors. +func (c *clusterConnects) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterConnectList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ClusterConnectList{} + err = c.client.Get(). + Resource("clusterconnect"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterConnects. +func (c *clusterConnects) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("clusterconnect"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a clusterConnect and creates it. Returns the server's representation of the clusterConnect, and an error, if there is any. +func (c *clusterConnects) Create(ctx context.Context, clusterConnect *v1.ClusterConnect, opts metav1.CreateOptions) (result *v1.ClusterConnect, err error) { + result = &v1.ClusterConnect{} + err = c.client.Post(). + Resource("clusterconnect"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterConnect). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a clusterConnect and updates it. Returns the server's representation of the clusterConnect, and an error, if there is any. +func (c *clusterConnects) Update(ctx context.Context, clusterConnect *v1.ClusterConnect, opts metav1.UpdateOptions) (result *v1.ClusterConnect, err error) { + result = &v1.ClusterConnect{} + err = c.client.Put(). + Resource("clusterconnect"). + Name(clusterConnect.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterConnect). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *clusterConnects) UpdateStatus(ctx context.Context, clusterConnect *v1.ClusterConnect, opts metav1.UpdateOptions) (result *v1.ClusterConnect, err error) { + result = &v1.ClusterConnect{} + err = c.client.Put(). + Resource("clusterconnect"). + Name(clusterConnect.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterConnect). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the clusterConnect and deletes it. Returns an error if one occurs. +func (c *clusterConnects) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterconnect"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterConnects) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("clusterconnect"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched clusterConnect. +func (c *clusterConnects) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterConnect, err error) { + result = &v1.ClusterConnect{} + err = c.client.Patch(pt). + Resource("clusterconnect"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/clusterroletemplate.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/clusterroletemplate.go new file mode 100644 index 000000000..d32899aed --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/clusterroletemplate.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ClusterRoleTemplatesGetter has a method to return a ClusterRoleTemplateInterface. +// A group's client should implement this interface. +type ClusterRoleTemplatesGetter interface { + ClusterRoleTemplates() ClusterRoleTemplateInterface +} + +// ClusterRoleTemplateInterface has methods to work with ClusterRoleTemplate resources. +type ClusterRoleTemplateInterface interface { + Create(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.CreateOptions) (*v1.ClusterRoleTemplate, error) + Update(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.UpdateOptions) (*v1.ClusterRoleTemplate, error) + UpdateStatus(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.UpdateOptions) (*v1.ClusterRoleTemplate, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterRoleTemplate, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterRoleTemplateList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleTemplate, err error) + ClusterRoleTemplateExpansion +} + +// clusterRoleTemplates implements ClusterRoleTemplateInterface +type clusterRoleTemplates struct { + client rest.Interface +} + +// newClusterRoleTemplates returns a ClusterRoleTemplates +func newClusterRoleTemplates(c *ManagementV1Client) *clusterRoleTemplates { + return &clusterRoleTemplates{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterRoleTemplate, and returns the corresponding clusterRoleTemplate object, and an error if there is any. +func (c *clusterRoleTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterRoleTemplate, err error) { + result = &v1.ClusterRoleTemplate{} + err = c.client.Get(). + Resource("clusterroletemplates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterRoleTemplates that match those selectors. +func (c *clusterRoleTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterRoleTemplateList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ClusterRoleTemplateList{} + err = c.client.Get(). + Resource("clusterroletemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterRoleTemplates. +func (c *clusterRoleTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("clusterroletemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a clusterRoleTemplate and creates it. Returns the server's representation of the clusterRoleTemplate, and an error, if there is any. +func (c *clusterRoleTemplates) Create(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.CreateOptions) (result *v1.ClusterRoleTemplate, err error) { + result = &v1.ClusterRoleTemplate{} + err = c.client.Post(). + Resource("clusterroletemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterRoleTemplate). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a clusterRoleTemplate and updates it. Returns the server's representation of the clusterRoleTemplate, and an error, if there is any. +func (c *clusterRoleTemplates) Update(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.UpdateOptions) (result *v1.ClusterRoleTemplate, err error) { + result = &v1.ClusterRoleTemplate{} + err = c.client.Put(). + Resource("clusterroletemplates"). + Name(clusterRoleTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterRoleTemplate). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *clusterRoleTemplates) UpdateStatus(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.UpdateOptions) (result *v1.ClusterRoleTemplate, err error) { + result = &v1.ClusterRoleTemplate{} + err = c.client.Put(). + Resource("clusterroletemplates"). + Name(clusterRoleTemplate.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterRoleTemplate). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the clusterRoleTemplate and deletes it. Returns an error if one occurs. +func (c *clusterRoleTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterroletemplates"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterRoleTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("clusterroletemplates"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched clusterRoleTemplate. +func (c *clusterRoleTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleTemplate, err error) { + result = &v1.ClusterRoleTemplate{} + err = c.client.Patch(pt). + Resource("clusterroletemplates"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/config.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/config.go new file mode 100644 index 000000000..9ab5a13e4 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/config.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ConfigsGetter has a method to return a ConfigInterface. +// A group's client should implement this interface. +type ConfigsGetter interface { + Configs() ConfigInterface +} + +// ConfigInterface has methods to work with Config resources. +type ConfigInterface interface { + Create(ctx context.Context, config *v1.Config, opts metav1.CreateOptions) (*v1.Config, error) + Update(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (*v1.Config, error) + UpdateStatus(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (*v1.Config, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Config, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Config, err error) + ConfigExpansion +} + +// configs implements ConfigInterface +type configs struct { + client rest.Interface +} + +// newConfigs returns a Configs +func newConfigs(c *ManagementV1Client) *configs { + return &configs{ + client: c.RESTClient(), + } +} + +// Get takes name of the config, and returns the corresponding config object, and an error if there is any. +func (c *configs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Config, err error) { + result = &v1.Config{} + err = c.client.Get(). + Resource("configs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Configs that match those selectors. +func (c *configs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ConfigList{} + err = c.client.Get(). + Resource("configs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested configs. +func (c *configs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("configs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a config and creates it. Returns the server's representation of the config, and an error, if there is any. +func (c *configs) Create(ctx context.Context, config *v1.Config, opts metav1.CreateOptions) (result *v1.Config, err error) { + result = &v1.Config{} + err = c.client.Post(). + Resource("configs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(config). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a config and updates it. Returns the server's representation of the config, and an error, if there is any. +func (c *configs) Update(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (result *v1.Config, err error) { + result = &v1.Config{} + err = c.client.Put(). + Resource("configs"). + Name(config.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(config). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *configs) UpdateStatus(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (result *v1.Config, err error) { + result = &v1.Config{} + err = c.client.Put(). + Resource("configs"). + Name(config.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(config). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the config and deletes it. Returns an error if one occurs. +func (c *configs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("configs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *configs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("configs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched config. +func (c *configs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Config, err error) { + result = &v1.Config{} + err = c.client.Patch(pt). + Resource("configs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/devpodworkspaceinstance.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/devpodworkspaceinstance.go new file mode 100644 index 000000000..17051e01b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/devpodworkspaceinstance.go @@ -0,0 +1,162 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// DevPodWorkspaceInstancesGetter has a method to return a DevPodWorkspaceInstanceInterface. +// A group's client should implement this interface. +type DevPodWorkspaceInstancesGetter interface { + DevPodWorkspaceInstances(namespace string) DevPodWorkspaceInstanceInterface +} + +// DevPodWorkspaceInstanceInterface has methods to work with DevPodWorkspaceInstance resources. +type DevPodWorkspaceInstanceInterface interface { + Create(ctx context.Context, devPodWorkspaceInstance *v1.DevPodWorkspaceInstance, opts metav1.CreateOptions) (*v1.DevPodWorkspaceInstance, error) + Update(ctx context.Context, devPodWorkspaceInstance *v1.DevPodWorkspaceInstance, opts metav1.UpdateOptions) (*v1.DevPodWorkspaceInstance, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DevPodWorkspaceInstance, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.DevPodWorkspaceInstanceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DevPodWorkspaceInstance, err error) + DevPodWorkspaceInstanceExpansion +} + +// devPodWorkspaceInstances implements DevPodWorkspaceInstanceInterface +type devPodWorkspaceInstances struct { + client rest.Interface + ns string +} + +// newDevPodWorkspaceInstances returns a DevPodWorkspaceInstances +func newDevPodWorkspaceInstances(c *ManagementV1Client, namespace string) *devPodWorkspaceInstances { + return &devPodWorkspaceInstances{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the devPodWorkspaceInstance, and returns the corresponding devPodWorkspaceInstance object, and an error if there is any. +func (c *devPodWorkspaceInstances) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DevPodWorkspaceInstance, err error) { + result = &v1.DevPodWorkspaceInstance{} + err = c.client.Get(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DevPodWorkspaceInstances that match those selectors. +func (c *devPodWorkspaceInstances) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DevPodWorkspaceInstanceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.DevPodWorkspaceInstanceList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested devPodWorkspaceInstances. +func (c *devPodWorkspaceInstances) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a devPodWorkspaceInstance and creates it. Returns the server's representation of the devPodWorkspaceInstance, and an error, if there is any. +func (c *devPodWorkspaceInstances) Create(ctx context.Context, devPodWorkspaceInstance *v1.DevPodWorkspaceInstance, opts metav1.CreateOptions) (result *v1.DevPodWorkspaceInstance, err error) { + result = &v1.DevPodWorkspaceInstance{} + err = c.client.Post(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(devPodWorkspaceInstance). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a devPodWorkspaceInstance and updates it. Returns the server's representation of the devPodWorkspaceInstance, and an error, if there is any. +func (c *devPodWorkspaceInstances) Update(ctx context.Context, devPodWorkspaceInstance *v1.DevPodWorkspaceInstance, opts metav1.UpdateOptions) (result *v1.DevPodWorkspaceInstance, err error) { + result = &v1.DevPodWorkspaceInstance{} + err = c.client.Put(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + Name(devPodWorkspaceInstance.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(devPodWorkspaceInstance). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the devPodWorkspaceInstance and deletes it. Returns an error if one occurs. +func (c *devPodWorkspaceInstances) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *devPodWorkspaceInstances) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched devPodWorkspaceInstance. +func (c *devPodWorkspaceInstances) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DevPodWorkspaceInstance, err error) { + result = &v1.DevPodWorkspaceInstance{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/devpodworkspacetemplate.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/devpodworkspacetemplate.go new file mode 100644 index 000000000..6ef393531 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/devpodworkspacetemplate.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// DevPodWorkspaceTemplatesGetter has a method to return a DevPodWorkspaceTemplateInterface. +// A group's client should implement this interface. +type DevPodWorkspaceTemplatesGetter interface { + DevPodWorkspaceTemplates() DevPodWorkspaceTemplateInterface +} + +// DevPodWorkspaceTemplateInterface has methods to work with DevPodWorkspaceTemplate resources. +type DevPodWorkspaceTemplateInterface interface { + Create(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.CreateOptions) (*v1.DevPodWorkspaceTemplate, error) + Update(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.UpdateOptions) (*v1.DevPodWorkspaceTemplate, error) + UpdateStatus(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.UpdateOptions) (*v1.DevPodWorkspaceTemplate, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DevPodWorkspaceTemplate, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.DevPodWorkspaceTemplateList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DevPodWorkspaceTemplate, err error) + DevPodWorkspaceTemplateExpansion +} + +// devPodWorkspaceTemplates implements DevPodWorkspaceTemplateInterface +type devPodWorkspaceTemplates struct { + client rest.Interface +} + +// newDevPodWorkspaceTemplates returns a DevPodWorkspaceTemplates +func newDevPodWorkspaceTemplates(c *ManagementV1Client) *devPodWorkspaceTemplates { + return &devPodWorkspaceTemplates{ + client: c.RESTClient(), + } +} + +// Get takes name of the devPodWorkspaceTemplate, and returns the corresponding devPodWorkspaceTemplate object, and an error if there is any. +func (c *devPodWorkspaceTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DevPodWorkspaceTemplate, err error) { + result = &v1.DevPodWorkspaceTemplate{} + err = c.client.Get(). + Resource("devpodworkspacetemplates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DevPodWorkspaceTemplates that match those selectors. +func (c *devPodWorkspaceTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DevPodWorkspaceTemplateList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.DevPodWorkspaceTemplateList{} + err = c.client.Get(). + Resource("devpodworkspacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested devPodWorkspaceTemplates. +func (c *devPodWorkspaceTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("devpodworkspacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a devPodWorkspaceTemplate and creates it. Returns the server's representation of the devPodWorkspaceTemplate, and an error, if there is any. +func (c *devPodWorkspaceTemplates) Create(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.CreateOptions) (result *v1.DevPodWorkspaceTemplate, err error) { + result = &v1.DevPodWorkspaceTemplate{} + err = c.client.Post(). + Resource("devpodworkspacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(devPodWorkspaceTemplate). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a devPodWorkspaceTemplate and updates it. Returns the server's representation of the devPodWorkspaceTemplate, and an error, if there is any. +func (c *devPodWorkspaceTemplates) Update(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.UpdateOptions) (result *v1.DevPodWorkspaceTemplate, err error) { + result = &v1.DevPodWorkspaceTemplate{} + err = c.client.Put(). + Resource("devpodworkspacetemplates"). + Name(devPodWorkspaceTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(devPodWorkspaceTemplate). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *devPodWorkspaceTemplates) UpdateStatus(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.UpdateOptions) (result *v1.DevPodWorkspaceTemplate, err error) { + result = &v1.DevPodWorkspaceTemplate{} + err = c.client.Put(). + Resource("devpodworkspacetemplates"). + Name(devPodWorkspaceTemplate.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(devPodWorkspaceTemplate). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the devPodWorkspaceTemplate and deletes it. Returns an error if one occurs. +func (c *devPodWorkspaceTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("devpodworkspacetemplates"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *devPodWorkspaceTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("devpodworkspacetemplates"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched devPodWorkspaceTemplate. +func (c *devPodWorkspaceTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DevPodWorkspaceTemplate, err error) { + result = &v1.DevPodWorkspaceTemplate{} + err = c.client.Patch(pt). + Resource("devpodworkspacetemplates"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/directclusterendpointtoken.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/directclusterendpointtoken.go new file mode 100644 index 000000000..829e24b86 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/directclusterendpointtoken.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// DirectClusterEndpointTokensGetter has a method to return a DirectClusterEndpointTokenInterface. +// A group's client should implement this interface. +type DirectClusterEndpointTokensGetter interface { + DirectClusterEndpointTokens() DirectClusterEndpointTokenInterface +} + +// DirectClusterEndpointTokenInterface has methods to work with DirectClusterEndpointToken resources. +type DirectClusterEndpointTokenInterface interface { + Create(ctx context.Context, directClusterEndpointToken *v1.DirectClusterEndpointToken, opts metav1.CreateOptions) (*v1.DirectClusterEndpointToken, error) + Update(ctx context.Context, directClusterEndpointToken *v1.DirectClusterEndpointToken, opts metav1.UpdateOptions) (*v1.DirectClusterEndpointToken, error) + UpdateStatus(ctx context.Context, directClusterEndpointToken *v1.DirectClusterEndpointToken, opts metav1.UpdateOptions) (*v1.DirectClusterEndpointToken, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DirectClusterEndpointToken, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.DirectClusterEndpointTokenList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DirectClusterEndpointToken, err error) + DirectClusterEndpointTokenExpansion +} + +// directClusterEndpointTokens implements DirectClusterEndpointTokenInterface +type directClusterEndpointTokens struct { + client rest.Interface +} + +// newDirectClusterEndpointTokens returns a DirectClusterEndpointTokens +func newDirectClusterEndpointTokens(c *ManagementV1Client) *directClusterEndpointTokens { + return &directClusterEndpointTokens{ + client: c.RESTClient(), + } +} + +// Get takes name of the directClusterEndpointToken, and returns the corresponding directClusterEndpointToken object, and an error if there is any. +func (c *directClusterEndpointTokens) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DirectClusterEndpointToken, err error) { + result = &v1.DirectClusterEndpointToken{} + err = c.client.Get(). + Resource("directclusterendpointtokens"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DirectClusterEndpointTokens that match those selectors. +func (c *directClusterEndpointTokens) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DirectClusterEndpointTokenList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.DirectClusterEndpointTokenList{} + err = c.client.Get(). + Resource("directclusterendpointtokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested directClusterEndpointTokens. +func (c *directClusterEndpointTokens) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("directclusterendpointtokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a directClusterEndpointToken and creates it. Returns the server's representation of the directClusterEndpointToken, and an error, if there is any. +func (c *directClusterEndpointTokens) Create(ctx context.Context, directClusterEndpointToken *v1.DirectClusterEndpointToken, opts metav1.CreateOptions) (result *v1.DirectClusterEndpointToken, err error) { + result = &v1.DirectClusterEndpointToken{} + err = c.client.Post(). + Resource("directclusterendpointtokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(directClusterEndpointToken). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a directClusterEndpointToken and updates it. Returns the server's representation of the directClusterEndpointToken, and an error, if there is any. +func (c *directClusterEndpointTokens) Update(ctx context.Context, directClusterEndpointToken *v1.DirectClusterEndpointToken, opts metav1.UpdateOptions) (result *v1.DirectClusterEndpointToken, err error) { + result = &v1.DirectClusterEndpointToken{} + err = c.client.Put(). + Resource("directclusterendpointtokens"). + Name(directClusterEndpointToken.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(directClusterEndpointToken). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *directClusterEndpointTokens) UpdateStatus(ctx context.Context, directClusterEndpointToken *v1.DirectClusterEndpointToken, opts metav1.UpdateOptions) (result *v1.DirectClusterEndpointToken, err error) { + result = &v1.DirectClusterEndpointToken{} + err = c.client.Put(). + Resource("directclusterendpointtokens"). + Name(directClusterEndpointToken.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(directClusterEndpointToken). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the directClusterEndpointToken and deletes it. Returns an error if one occurs. +func (c *directClusterEndpointTokens) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("directclusterendpointtokens"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *directClusterEndpointTokens) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("directclusterendpointtokens"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched directClusterEndpointToken. +func (c *directClusterEndpointTokens) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DirectClusterEndpointToken, err error) { + result = &v1.DirectClusterEndpointToken{} + err = c.client.Patch(pt). + Resource("directclusterendpointtokens"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/doc.go new file mode 100644 index 000000000..225e6b2be --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/event.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/event.go new file mode 100644 index 000000000..32e36ec43 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/event.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// EventsGetter has a method to return a EventInterface. +// A group's client should implement this interface. +type EventsGetter interface { + Events() EventInterface +} + +// EventInterface has methods to work with Event resources. +type EventInterface interface { + Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (*v1.Event, error) + Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (*v1.Event, error) + UpdateStatus(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (*v1.Event, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Event, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.EventList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) + EventExpansion +} + +// events implements EventInterface +type events struct { + client rest.Interface +} + +// newEvents returns a Events +func newEvents(c *ManagementV1Client) *events { + return &events{ + client: c.RESTClient(), + } +} + +// Get takes name of the event, and returns the corresponding event object, and an error if there is any. +func (c *events) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Event, err error) { + result = &v1.Event{} + err = c.client.Get(). + Resource("events"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Events that match those selectors. +func (c *events) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EventList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.EventList{} + err = c.client.Get(). + Resource("events"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested events. +func (c *events) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("events"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. +func (c *events) Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (result *v1.Event, err error) { + result = &v1.Event{} + err = c.client.Post(). + Resource("events"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(event). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. +func (c *events) Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (result *v1.Event, err error) { + result = &v1.Event{} + err = c.client.Put(). + Resource("events"). + Name(event.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(event). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *events) UpdateStatus(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (result *v1.Event, err error) { + result = &v1.Event{} + err = c.client.Put(). + Resource("events"). + Name(event.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(event). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the event and deletes it. Returns an error if one occurs. +func (c *events) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("events"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *events) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("events"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched event. +func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) { + result = &v1.Event{} + err = c.client.Patch(pt). + Resource("events"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/feature.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/feature.go new file mode 100644 index 000000000..aa78c4373 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/feature.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// FeaturesGetter has a method to return a FeatureInterface. +// A group's client should implement this interface. +type FeaturesGetter interface { + Features() FeatureInterface +} + +// FeatureInterface has methods to work with Feature resources. +type FeatureInterface interface { + Create(ctx context.Context, feature *v1.Feature, opts metav1.CreateOptions) (*v1.Feature, error) + Update(ctx context.Context, feature *v1.Feature, opts metav1.UpdateOptions) (*v1.Feature, error) + UpdateStatus(ctx context.Context, feature *v1.Feature, opts metav1.UpdateOptions) (*v1.Feature, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Feature, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.FeatureList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Feature, err error) + FeatureExpansion +} + +// features implements FeatureInterface +type features struct { + client rest.Interface +} + +// newFeatures returns a Features +func newFeatures(c *ManagementV1Client) *features { + return &features{ + client: c.RESTClient(), + } +} + +// Get takes name of the feature, and returns the corresponding feature object, and an error if there is any. +func (c *features) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Feature, err error) { + result = &v1.Feature{} + err = c.client.Get(). + Resource("features"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Features that match those selectors. +func (c *features) List(ctx context.Context, opts metav1.ListOptions) (result *v1.FeatureList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.FeatureList{} + err = c.client.Get(). + Resource("features"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested features. +func (c *features) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("features"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a feature and creates it. Returns the server's representation of the feature, and an error, if there is any. +func (c *features) Create(ctx context.Context, feature *v1.Feature, opts metav1.CreateOptions) (result *v1.Feature, err error) { + result = &v1.Feature{} + err = c.client.Post(). + Resource("features"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(feature). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a feature and updates it. Returns the server's representation of the feature, and an error, if there is any. +func (c *features) Update(ctx context.Context, feature *v1.Feature, opts metav1.UpdateOptions) (result *v1.Feature, err error) { + result = &v1.Feature{} + err = c.client.Put(). + Resource("features"). + Name(feature.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(feature). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *features) UpdateStatus(ctx context.Context, feature *v1.Feature, opts metav1.UpdateOptions) (result *v1.Feature, err error) { + result = &v1.Feature{} + err = c.client.Put(). + Resource("features"). + Name(feature.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(feature). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the feature and deletes it. Returns an error if one occurs. +func (c *features) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("features"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *features) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("features"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched feature. +func (c *features) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Feature, err error) { + result = &v1.Feature{} + err = c.client.Patch(pt). + Resource("features"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/generated_expansion.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/generated_expansion.go new file mode 100644 index 000000000..b81af5d2e --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/generated_expansion.go @@ -0,0 +1,75 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type AgentAuditEventExpansion interface{} + +type AnnouncementExpansion interface{} + +type AppExpansion interface{} + +type ClusterExpansion interface{} + +type ClusterAccessExpansion interface{} + +type ClusterConnectExpansion interface{} + +type ClusterRoleTemplateExpansion interface{} + +type ConfigExpansion interface{} + +type DevPodWorkspaceInstanceExpansion interface{} + +type DevPodWorkspaceTemplateExpansion interface{} + +type DirectClusterEndpointTokenExpansion interface{} + +type EventExpansion interface{} + +type FeatureExpansion interface{} + +type IngressAuthTokenExpansion interface{} + +type LicenseExpansion interface{} + +type LicenseTokenExpansion interface{} + +type LoftUpgradeExpansion interface{} + +type OwnedAccessKeyExpansion interface{} + +type PolicyViolationExpansion interface{} + +type ProjectExpansion interface{} + +type ProjectSecretExpansion interface{} + +type RedirectTokenExpansion interface{} + +type ResetAccessKeyExpansion interface{} + +type RunnerExpansion interface{} + +type SelfExpansion interface{} + +type SelfSubjectAccessReviewExpansion interface{} + +type SharedSecretExpansion interface{} + +type SpaceConstraintExpansion interface{} + +type SpaceInstanceExpansion interface{} + +type SpaceTemplateExpansion interface{} + +type SubjectAccessReviewExpansion interface{} + +type TaskExpansion interface{} + +type TeamExpansion interface{} + +type UserExpansion interface{} + +type VirtualClusterInstanceExpansion interface{} + +type VirtualClusterTemplateExpansion interface{} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/ingressauthtoken.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/ingressauthtoken.go new file mode 100644 index 000000000..28a46e6a6 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/ingressauthtoken.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// IngressAuthTokensGetter has a method to return a IngressAuthTokenInterface. +// A group's client should implement this interface. +type IngressAuthTokensGetter interface { + IngressAuthTokens() IngressAuthTokenInterface +} + +// IngressAuthTokenInterface has methods to work with IngressAuthToken resources. +type IngressAuthTokenInterface interface { + Create(ctx context.Context, ingressAuthToken *v1.IngressAuthToken, opts metav1.CreateOptions) (*v1.IngressAuthToken, error) + Update(ctx context.Context, ingressAuthToken *v1.IngressAuthToken, opts metav1.UpdateOptions) (*v1.IngressAuthToken, error) + UpdateStatus(ctx context.Context, ingressAuthToken *v1.IngressAuthToken, opts metav1.UpdateOptions) (*v1.IngressAuthToken, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.IngressAuthToken, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.IngressAuthTokenList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressAuthToken, err error) + IngressAuthTokenExpansion +} + +// ingressAuthTokens implements IngressAuthTokenInterface +type ingressAuthTokens struct { + client rest.Interface +} + +// newIngressAuthTokens returns a IngressAuthTokens +func newIngressAuthTokens(c *ManagementV1Client) *ingressAuthTokens { + return &ingressAuthTokens{ + client: c.RESTClient(), + } +} + +// Get takes name of the ingressAuthToken, and returns the corresponding ingressAuthToken object, and an error if there is any. +func (c *ingressAuthTokens) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IngressAuthToken, err error) { + result = &v1.IngressAuthToken{} + err = c.client.Get(). + Resource("ingressauthtokens"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of IngressAuthTokens that match those selectors. +func (c *ingressAuthTokens) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressAuthTokenList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.IngressAuthTokenList{} + err = c.client.Get(). + Resource("ingressauthtokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested ingressAuthTokens. +func (c *ingressAuthTokens) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("ingressauthtokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a ingressAuthToken and creates it. Returns the server's representation of the ingressAuthToken, and an error, if there is any. +func (c *ingressAuthTokens) Create(ctx context.Context, ingressAuthToken *v1.IngressAuthToken, opts metav1.CreateOptions) (result *v1.IngressAuthToken, err error) { + result = &v1.IngressAuthToken{} + err = c.client.Post(). + Resource("ingressauthtokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ingressAuthToken). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a ingressAuthToken and updates it. Returns the server's representation of the ingressAuthToken, and an error, if there is any. +func (c *ingressAuthTokens) Update(ctx context.Context, ingressAuthToken *v1.IngressAuthToken, opts metav1.UpdateOptions) (result *v1.IngressAuthToken, err error) { + result = &v1.IngressAuthToken{} + err = c.client.Put(). + Resource("ingressauthtokens"). + Name(ingressAuthToken.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ingressAuthToken). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *ingressAuthTokens) UpdateStatus(ctx context.Context, ingressAuthToken *v1.IngressAuthToken, opts metav1.UpdateOptions) (result *v1.IngressAuthToken, err error) { + result = &v1.IngressAuthToken{} + err = c.client.Put(). + Resource("ingressauthtokens"). + Name(ingressAuthToken.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ingressAuthToken). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the ingressAuthToken and deletes it. Returns an error if one occurs. +func (c *ingressAuthTokens) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("ingressauthtokens"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *ingressAuthTokens) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("ingressauthtokens"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched ingressAuthToken. +func (c *ingressAuthTokens) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressAuthToken, err error) { + result = &v1.IngressAuthToken{} + err = c.client.Patch(pt). + Resource("ingressauthtokens"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/license.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/license.go new file mode 100644 index 000000000..328994964 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/license.go @@ -0,0 +1,184 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// LicensesGetter has a method to return a LicenseInterface. +// A group's client should implement this interface. +type LicensesGetter interface { + Licenses() LicenseInterface +} + +// LicenseInterface has methods to work with License resources. +type LicenseInterface interface { + Create(ctx context.Context, license *v1.License, opts metav1.CreateOptions) (*v1.License, error) + Update(ctx context.Context, license *v1.License, opts metav1.UpdateOptions) (*v1.License, error) + UpdateStatus(ctx context.Context, license *v1.License, opts metav1.UpdateOptions) (*v1.License, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.License, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.LicenseList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.License, err error) + LicenseRequest(ctx context.Context, licenseName string, licenseRequest *v1.LicenseRequest, opts metav1.CreateOptions) (*v1.LicenseRequest, error) + + LicenseExpansion +} + +// licenses implements LicenseInterface +type licenses struct { + client rest.Interface +} + +// newLicenses returns a Licenses +func newLicenses(c *ManagementV1Client) *licenses { + return &licenses{ + client: c.RESTClient(), + } +} + +// Get takes name of the license, and returns the corresponding license object, and an error if there is any. +func (c *licenses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.License, err error) { + result = &v1.License{} + err = c.client.Get(). + Resource("licenses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Licenses that match those selectors. +func (c *licenses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LicenseList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.LicenseList{} + err = c.client.Get(). + Resource("licenses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested licenses. +func (c *licenses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("licenses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a license and creates it. Returns the server's representation of the license, and an error, if there is any. +func (c *licenses) Create(ctx context.Context, license *v1.License, opts metav1.CreateOptions) (result *v1.License, err error) { + result = &v1.License{} + err = c.client.Post(). + Resource("licenses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(license). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a license and updates it. Returns the server's representation of the license, and an error, if there is any. +func (c *licenses) Update(ctx context.Context, license *v1.License, opts metav1.UpdateOptions) (result *v1.License, err error) { + result = &v1.License{} + err = c.client.Put(). + Resource("licenses"). + Name(license.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(license). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *licenses) UpdateStatus(ctx context.Context, license *v1.License, opts metav1.UpdateOptions) (result *v1.License, err error) { + result = &v1.License{} + err = c.client.Put(). + Resource("licenses"). + Name(license.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(license). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the license and deletes it. Returns an error if one occurs. +func (c *licenses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("licenses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *licenses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("licenses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched license. +func (c *licenses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.License, err error) { + result = &v1.License{} + err = c.client.Patch(pt). + Resource("licenses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// LicenseRequest takes the representation of a licenseRequest and creates it. Returns the server's representation of the licenseRequest, and an error, if there is any. +func (c *licenses) LicenseRequest(ctx context.Context, licenseName string, licenseRequest *v1.LicenseRequest, opts metav1.CreateOptions) (result *v1.LicenseRequest, err error) { + result = &v1.LicenseRequest{} + err = c.client.Post(). + Resource("licenses"). + Name(licenseName). + SubResource("request"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(licenseRequest). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/licensetoken.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/licensetoken.go new file mode 100644 index 000000000..2edb21a16 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/licensetoken.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// LicenseTokensGetter has a method to return a LicenseTokenInterface. +// A group's client should implement this interface. +type LicenseTokensGetter interface { + LicenseTokens() LicenseTokenInterface +} + +// LicenseTokenInterface has methods to work with LicenseToken resources. +type LicenseTokenInterface interface { + Create(ctx context.Context, licenseToken *v1.LicenseToken, opts metav1.CreateOptions) (*v1.LicenseToken, error) + Update(ctx context.Context, licenseToken *v1.LicenseToken, opts metav1.UpdateOptions) (*v1.LicenseToken, error) + UpdateStatus(ctx context.Context, licenseToken *v1.LicenseToken, opts metav1.UpdateOptions) (*v1.LicenseToken, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.LicenseToken, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.LicenseTokenList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LicenseToken, err error) + LicenseTokenExpansion +} + +// licenseTokens implements LicenseTokenInterface +type licenseTokens struct { + client rest.Interface +} + +// newLicenseTokens returns a LicenseTokens +func newLicenseTokens(c *ManagementV1Client) *licenseTokens { + return &licenseTokens{ + client: c.RESTClient(), + } +} + +// Get takes name of the licenseToken, and returns the corresponding licenseToken object, and an error if there is any. +func (c *licenseTokens) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.LicenseToken, err error) { + result = &v1.LicenseToken{} + err = c.client.Get(). + Resource("licensetokens"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of LicenseTokens that match those selectors. +func (c *licenseTokens) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LicenseTokenList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.LicenseTokenList{} + err = c.client.Get(). + Resource("licensetokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested licenseTokens. +func (c *licenseTokens) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("licensetokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a licenseToken and creates it. Returns the server's representation of the licenseToken, and an error, if there is any. +func (c *licenseTokens) Create(ctx context.Context, licenseToken *v1.LicenseToken, opts metav1.CreateOptions) (result *v1.LicenseToken, err error) { + result = &v1.LicenseToken{} + err = c.client.Post(). + Resource("licensetokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(licenseToken). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a licenseToken and updates it. Returns the server's representation of the licenseToken, and an error, if there is any. +func (c *licenseTokens) Update(ctx context.Context, licenseToken *v1.LicenseToken, opts metav1.UpdateOptions) (result *v1.LicenseToken, err error) { + result = &v1.LicenseToken{} + err = c.client.Put(). + Resource("licensetokens"). + Name(licenseToken.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(licenseToken). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *licenseTokens) UpdateStatus(ctx context.Context, licenseToken *v1.LicenseToken, opts metav1.UpdateOptions) (result *v1.LicenseToken, err error) { + result = &v1.LicenseToken{} + err = c.client.Put(). + Resource("licensetokens"). + Name(licenseToken.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(licenseToken). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the licenseToken and deletes it. Returns an error if one occurs. +func (c *licenseTokens) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("licensetokens"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *licenseTokens) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("licensetokens"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched licenseToken. +func (c *licenseTokens) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LicenseToken, err error) { + result = &v1.LicenseToken{} + err = c.client.Patch(pt). + Resource("licensetokens"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/loftupgrade.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/loftupgrade.go new file mode 100644 index 000000000..1fa8f3b08 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/loftupgrade.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// LoftUpgradesGetter has a method to return a LoftUpgradeInterface. +// A group's client should implement this interface. +type LoftUpgradesGetter interface { + LoftUpgrades() LoftUpgradeInterface +} + +// LoftUpgradeInterface has methods to work with LoftUpgrade resources. +type LoftUpgradeInterface interface { + Create(ctx context.Context, loftUpgrade *v1.LoftUpgrade, opts metav1.CreateOptions) (*v1.LoftUpgrade, error) + Update(ctx context.Context, loftUpgrade *v1.LoftUpgrade, opts metav1.UpdateOptions) (*v1.LoftUpgrade, error) + UpdateStatus(ctx context.Context, loftUpgrade *v1.LoftUpgrade, opts metav1.UpdateOptions) (*v1.LoftUpgrade, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.LoftUpgrade, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.LoftUpgradeList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LoftUpgrade, err error) + LoftUpgradeExpansion +} + +// loftUpgrades implements LoftUpgradeInterface +type loftUpgrades struct { + client rest.Interface +} + +// newLoftUpgrades returns a LoftUpgrades +func newLoftUpgrades(c *ManagementV1Client) *loftUpgrades { + return &loftUpgrades{ + client: c.RESTClient(), + } +} + +// Get takes name of the loftUpgrade, and returns the corresponding loftUpgrade object, and an error if there is any. +func (c *loftUpgrades) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.LoftUpgrade, err error) { + result = &v1.LoftUpgrade{} + err = c.client.Get(). + Resource("loftupgrades"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of LoftUpgrades that match those selectors. +func (c *loftUpgrades) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LoftUpgradeList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.LoftUpgradeList{} + err = c.client.Get(). + Resource("loftupgrades"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested loftUpgrades. +func (c *loftUpgrades) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("loftupgrades"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a loftUpgrade and creates it. Returns the server's representation of the loftUpgrade, and an error, if there is any. +func (c *loftUpgrades) Create(ctx context.Context, loftUpgrade *v1.LoftUpgrade, opts metav1.CreateOptions) (result *v1.LoftUpgrade, err error) { + result = &v1.LoftUpgrade{} + err = c.client.Post(). + Resource("loftupgrades"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(loftUpgrade). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a loftUpgrade and updates it. Returns the server's representation of the loftUpgrade, and an error, if there is any. +func (c *loftUpgrades) Update(ctx context.Context, loftUpgrade *v1.LoftUpgrade, opts metav1.UpdateOptions) (result *v1.LoftUpgrade, err error) { + result = &v1.LoftUpgrade{} + err = c.client.Put(). + Resource("loftupgrades"). + Name(loftUpgrade.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(loftUpgrade). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *loftUpgrades) UpdateStatus(ctx context.Context, loftUpgrade *v1.LoftUpgrade, opts metav1.UpdateOptions) (result *v1.LoftUpgrade, err error) { + result = &v1.LoftUpgrade{} + err = c.client.Put(). + Resource("loftupgrades"). + Name(loftUpgrade.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(loftUpgrade). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the loftUpgrade and deletes it. Returns an error if one occurs. +func (c *loftUpgrades) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("loftupgrades"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *loftUpgrades) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("loftupgrades"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched loftUpgrade. +func (c *loftUpgrades) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LoftUpgrade, err error) { + result = &v1.LoftUpgrade{} + err = c.client.Patch(pt). + Resource("loftupgrades"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/management_client.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/management_client.go new file mode 100644 index 000000000..45e86bcd7 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/management_client.go @@ -0,0 +1,266 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "net/http" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + rest "k8s.io/client-go/rest" +) + +type ManagementV1Interface interface { + RESTClient() rest.Interface + AgentAuditEventsGetter + AnnouncementsGetter + AppsGetter + ClustersGetter + ClusterAccessesGetter + ClusterConnectsGetter + ClusterRoleTemplatesGetter + ConfigsGetter + DevPodWorkspaceInstancesGetter + DevPodWorkspaceTemplatesGetter + DirectClusterEndpointTokensGetter + EventsGetter + FeaturesGetter + IngressAuthTokensGetter + LicensesGetter + LicenseTokensGetter + LoftUpgradesGetter + OwnedAccessKeysGetter + PolicyViolationsGetter + ProjectsGetter + ProjectSecretsGetter + RedirectTokensGetter + ResetAccessKeysGetter + RunnersGetter + SelvesGetter + SelfSubjectAccessReviewsGetter + SharedSecretsGetter + SpaceConstraintsGetter + SpaceInstancesGetter + SpaceTemplatesGetter + SubjectAccessReviewsGetter + TasksGetter + TeamsGetter + UsersGetter + VirtualClusterInstancesGetter + VirtualClusterTemplatesGetter +} + +// ManagementV1Client is used to interact with features provided by the management.loft.sh group. +type ManagementV1Client struct { + restClient rest.Interface +} + +func (c *ManagementV1Client) AgentAuditEvents() AgentAuditEventInterface { + return newAgentAuditEvents(c) +} + +func (c *ManagementV1Client) Announcements() AnnouncementInterface { + return newAnnouncements(c) +} + +func (c *ManagementV1Client) Apps() AppInterface { + return newApps(c) +} + +func (c *ManagementV1Client) Clusters() ClusterInterface { + return newClusters(c) +} + +func (c *ManagementV1Client) ClusterAccesses() ClusterAccessInterface { + return newClusterAccesses(c) +} + +func (c *ManagementV1Client) ClusterConnects() ClusterConnectInterface { + return newClusterConnects(c) +} + +func (c *ManagementV1Client) ClusterRoleTemplates() ClusterRoleTemplateInterface { + return newClusterRoleTemplates(c) +} + +func (c *ManagementV1Client) Configs() ConfigInterface { + return newConfigs(c) +} + +func (c *ManagementV1Client) DevPodWorkspaceInstances(namespace string) DevPodWorkspaceInstanceInterface { + return newDevPodWorkspaceInstances(c, namespace) +} + +func (c *ManagementV1Client) DevPodWorkspaceTemplates() DevPodWorkspaceTemplateInterface { + return newDevPodWorkspaceTemplates(c) +} + +func (c *ManagementV1Client) DirectClusterEndpointTokens() DirectClusterEndpointTokenInterface { + return newDirectClusterEndpointTokens(c) +} + +func (c *ManagementV1Client) Events() EventInterface { + return newEvents(c) +} + +func (c *ManagementV1Client) Features() FeatureInterface { + return newFeatures(c) +} + +func (c *ManagementV1Client) IngressAuthTokens() IngressAuthTokenInterface { + return newIngressAuthTokens(c) +} + +func (c *ManagementV1Client) Licenses() LicenseInterface { + return newLicenses(c) +} + +func (c *ManagementV1Client) LicenseTokens() LicenseTokenInterface { + return newLicenseTokens(c) +} + +func (c *ManagementV1Client) LoftUpgrades() LoftUpgradeInterface { + return newLoftUpgrades(c) +} + +func (c *ManagementV1Client) OwnedAccessKeys() OwnedAccessKeyInterface { + return newOwnedAccessKeys(c) +} + +func (c *ManagementV1Client) PolicyViolations() PolicyViolationInterface { + return newPolicyViolations(c) +} + +func (c *ManagementV1Client) Projects() ProjectInterface { + return newProjects(c) +} + +func (c *ManagementV1Client) ProjectSecrets(namespace string) ProjectSecretInterface { + return newProjectSecrets(c, namespace) +} + +func (c *ManagementV1Client) RedirectTokens() RedirectTokenInterface { + return newRedirectTokens(c) +} + +func (c *ManagementV1Client) ResetAccessKeys() ResetAccessKeyInterface { + return newResetAccessKeys(c) +} + +func (c *ManagementV1Client) Runners() RunnerInterface { + return newRunners(c) +} + +func (c *ManagementV1Client) Selves() SelfInterface { + return newSelves(c) +} + +func (c *ManagementV1Client) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface { + return newSelfSubjectAccessReviews(c) +} + +func (c *ManagementV1Client) SharedSecrets(namespace string) SharedSecretInterface { + return newSharedSecrets(c, namespace) +} + +func (c *ManagementV1Client) SpaceConstraints() SpaceConstraintInterface { + return newSpaceConstraints(c) +} + +func (c *ManagementV1Client) SpaceInstances(namespace string) SpaceInstanceInterface { + return newSpaceInstances(c, namespace) +} + +func (c *ManagementV1Client) SpaceTemplates() SpaceTemplateInterface { + return newSpaceTemplates(c) +} + +func (c *ManagementV1Client) SubjectAccessReviews() SubjectAccessReviewInterface { + return newSubjectAccessReviews(c) +} + +func (c *ManagementV1Client) Tasks() TaskInterface { + return newTasks(c) +} + +func (c *ManagementV1Client) Teams() TeamInterface { + return newTeams(c) +} + +func (c *ManagementV1Client) Users() UserInterface { + return newUsers(c) +} + +func (c *ManagementV1Client) VirtualClusterInstances(namespace string) VirtualClusterInstanceInterface { + return newVirtualClusterInstances(c, namespace) +} + +func (c *ManagementV1Client) VirtualClusterTemplates() VirtualClusterTemplateInterface { + return newVirtualClusterTemplates(c) +} + +// NewForConfig creates a new ManagementV1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*ManagementV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new ManagementV1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ManagementV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &ManagementV1Client{client}, nil +} + +// NewForConfigOrDie creates a new ManagementV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ManagementV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ManagementV1Client for the given RESTClient. +func New(c rest.Interface) *ManagementV1Client { + return &ManagementV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *ManagementV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/ownedaccesskey.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/ownedaccesskey.go new file mode 100644 index 000000000..69e0d9ed8 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/ownedaccesskey.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// OwnedAccessKeysGetter has a method to return a OwnedAccessKeyInterface. +// A group's client should implement this interface. +type OwnedAccessKeysGetter interface { + OwnedAccessKeys() OwnedAccessKeyInterface +} + +// OwnedAccessKeyInterface has methods to work with OwnedAccessKey resources. +type OwnedAccessKeyInterface interface { + Create(ctx context.Context, ownedAccessKey *v1.OwnedAccessKey, opts metav1.CreateOptions) (*v1.OwnedAccessKey, error) + Update(ctx context.Context, ownedAccessKey *v1.OwnedAccessKey, opts metav1.UpdateOptions) (*v1.OwnedAccessKey, error) + UpdateStatus(ctx context.Context, ownedAccessKey *v1.OwnedAccessKey, opts metav1.UpdateOptions) (*v1.OwnedAccessKey, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OwnedAccessKey, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.OwnedAccessKeyList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OwnedAccessKey, err error) + OwnedAccessKeyExpansion +} + +// ownedAccessKeys implements OwnedAccessKeyInterface +type ownedAccessKeys struct { + client rest.Interface +} + +// newOwnedAccessKeys returns a OwnedAccessKeys +func newOwnedAccessKeys(c *ManagementV1Client) *ownedAccessKeys { + return &ownedAccessKeys{ + client: c.RESTClient(), + } +} + +// Get takes name of the ownedAccessKey, and returns the corresponding ownedAccessKey object, and an error if there is any. +func (c *ownedAccessKeys) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OwnedAccessKey, err error) { + result = &v1.OwnedAccessKey{} + err = c.client.Get(). + Resource("ownedaccesskeys"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of OwnedAccessKeys that match those selectors. +func (c *ownedAccessKeys) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OwnedAccessKeyList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.OwnedAccessKeyList{} + err = c.client.Get(). + Resource("ownedaccesskeys"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested ownedAccessKeys. +func (c *ownedAccessKeys) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("ownedaccesskeys"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a ownedAccessKey and creates it. Returns the server's representation of the ownedAccessKey, and an error, if there is any. +func (c *ownedAccessKeys) Create(ctx context.Context, ownedAccessKey *v1.OwnedAccessKey, opts metav1.CreateOptions) (result *v1.OwnedAccessKey, err error) { + result = &v1.OwnedAccessKey{} + err = c.client.Post(). + Resource("ownedaccesskeys"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ownedAccessKey). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a ownedAccessKey and updates it. Returns the server's representation of the ownedAccessKey, and an error, if there is any. +func (c *ownedAccessKeys) Update(ctx context.Context, ownedAccessKey *v1.OwnedAccessKey, opts metav1.UpdateOptions) (result *v1.OwnedAccessKey, err error) { + result = &v1.OwnedAccessKey{} + err = c.client.Put(). + Resource("ownedaccesskeys"). + Name(ownedAccessKey.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ownedAccessKey). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *ownedAccessKeys) UpdateStatus(ctx context.Context, ownedAccessKey *v1.OwnedAccessKey, opts metav1.UpdateOptions) (result *v1.OwnedAccessKey, err error) { + result = &v1.OwnedAccessKey{} + err = c.client.Put(). + Resource("ownedaccesskeys"). + Name(ownedAccessKey.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ownedAccessKey). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the ownedAccessKey and deletes it. Returns an error if one occurs. +func (c *ownedAccessKeys) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("ownedaccesskeys"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *ownedAccessKeys) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("ownedaccesskeys"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched ownedAccessKey. +func (c *ownedAccessKeys) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OwnedAccessKey, err error) { + result = &v1.OwnedAccessKey{} + err = c.client.Patch(pt). + Resource("ownedaccesskeys"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/policyviolation.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/policyviolation.go new file mode 100644 index 000000000..acea4dd00 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/policyviolation.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// PolicyViolationsGetter has a method to return a PolicyViolationInterface. +// A group's client should implement this interface. +type PolicyViolationsGetter interface { + PolicyViolations() PolicyViolationInterface +} + +// PolicyViolationInterface has methods to work with PolicyViolation resources. +type PolicyViolationInterface interface { + Create(ctx context.Context, policyViolation *v1.PolicyViolation, opts metav1.CreateOptions) (*v1.PolicyViolation, error) + Update(ctx context.Context, policyViolation *v1.PolicyViolation, opts metav1.UpdateOptions) (*v1.PolicyViolation, error) + UpdateStatus(ctx context.Context, policyViolation *v1.PolicyViolation, opts metav1.UpdateOptions) (*v1.PolicyViolation, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PolicyViolation, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.PolicyViolationList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PolicyViolation, err error) + PolicyViolationExpansion +} + +// policyViolations implements PolicyViolationInterface +type policyViolations struct { + client rest.Interface +} + +// newPolicyViolations returns a PolicyViolations +func newPolicyViolations(c *ManagementV1Client) *policyViolations { + return &policyViolations{ + client: c.RESTClient(), + } +} + +// Get takes name of the policyViolation, and returns the corresponding policyViolation object, and an error if there is any. +func (c *policyViolations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PolicyViolation, err error) { + result = &v1.PolicyViolation{} + err = c.client.Get(). + Resource("policyviolations"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of PolicyViolations that match those selectors. +func (c *policyViolations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PolicyViolationList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.PolicyViolationList{} + err = c.client.Get(). + Resource("policyviolations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested policyViolations. +func (c *policyViolations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("policyviolations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a policyViolation and creates it. Returns the server's representation of the policyViolation, and an error, if there is any. +func (c *policyViolations) Create(ctx context.Context, policyViolation *v1.PolicyViolation, opts metav1.CreateOptions) (result *v1.PolicyViolation, err error) { + result = &v1.PolicyViolation{} + err = c.client.Post(). + Resource("policyviolations"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(policyViolation). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a policyViolation and updates it. Returns the server's representation of the policyViolation, and an error, if there is any. +func (c *policyViolations) Update(ctx context.Context, policyViolation *v1.PolicyViolation, opts metav1.UpdateOptions) (result *v1.PolicyViolation, err error) { + result = &v1.PolicyViolation{} + err = c.client.Put(). + Resource("policyviolations"). + Name(policyViolation.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(policyViolation). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *policyViolations) UpdateStatus(ctx context.Context, policyViolation *v1.PolicyViolation, opts metav1.UpdateOptions) (result *v1.PolicyViolation, err error) { + result = &v1.PolicyViolation{} + err = c.client.Put(). + Resource("policyviolations"). + Name(policyViolation.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(policyViolation). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the policyViolation and deletes it. Returns an error if one occurs. +func (c *policyViolations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("policyviolations"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *policyViolations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("policyviolations"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched policyViolation. +func (c *policyViolations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PolicyViolation, err error) { + result = &v1.PolicyViolation{} + err = c.client.Patch(pt). + Resource("policyviolations"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/project.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/project.go new file mode 100644 index 000000000..d8afb340e --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/project.go @@ -0,0 +1,271 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ProjectsGetter has a method to return a ProjectInterface. +// A group's client should implement this interface. +type ProjectsGetter interface { + Projects() ProjectInterface +} + +// ProjectInterface has methods to work with Project resources. +type ProjectInterface interface { + Create(ctx context.Context, project *v1.Project, opts metav1.CreateOptions) (*v1.Project, error) + Update(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (*v1.Project, error) + UpdateStatus(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (*v1.Project, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Project, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ProjectList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Project, err error) + ListMembers(ctx context.Context, projectName string, options metav1.GetOptions) (*v1.ProjectMembers, error) + ListTemplates(ctx context.Context, projectName string, options metav1.GetOptions) (*v1.ProjectTemplates, error) + ListClusters(ctx context.Context, projectName string, options metav1.GetOptions) (*v1.ProjectClusters, error) + ImportVirtualCluster(ctx context.Context, projectName string, projectImportVirtualCluster *v1.ProjectImportVirtualCluster, opts metav1.CreateOptions) (*v1.ProjectImportVirtualCluster, error) + MigrateVirtualClusterInstance(ctx context.Context, projectName string, projectMigrateVirtualClusterInstance *v1.ProjectMigrateVirtualClusterInstance, opts metav1.CreateOptions) (*v1.ProjectMigrateVirtualClusterInstance, error) + ImportSpace(ctx context.Context, projectName string, projectImportSpace *v1.ProjectImportSpace, opts metav1.CreateOptions) (*v1.ProjectImportSpace, error) + MigrateSpaceInstance(ctx context.Context, projectName string, projectMigrateSpaceInstance *v1.ProjectMigrateSpaceInstance, opts metav1.CreateOptions) (*v1.ProjectMigrateSpaceInstance, error) + + ProjectExpansion +} + +// projects implements ProjectInterface +type projects struct { + client rest.Interface +} + +// newProjects returns a Projects +func newProjects(c *ManagementV1Client) *projects { + return &projects{ + client: c.RESTClient(), + } +} + +// Get takes name of the project, and returns the corresponding project object, and an error if there is any. +func (c *projects) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Get(). + Resource("projects"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Projects that match those selectors. +func (c *projects) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ProjectList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ProjectList{} + err = c.client.Get(). + Resource("projects"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested projects. +func (c *projects) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("projects"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a project and creates it. Returns the server's representation of the project, and an error, if there is any. +func (c *projects) Create(ctx context.Context, project *v1.Project, opts metav1.CreateOptions) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Post(). + Resource("projects"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(project). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a project and updates it. Returns the server's representation of the project, and an error, if there is any. +func (c *projects) Update(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Put(). + Resource("projects"). + Name(project.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(project). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *projects) UpdateStatus(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Put(). + Resource("projects"). + Name(project.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(project). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the project and deletes it. Returns an error if one occurs. +func (c *projects) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("projects"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *projects) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("projects"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched project. +func (c *projects) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Patch(pt). + Resource("projects"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ListMembers takes name of the project, and returns the corresponding v1.ProjectMembers object, and an error if there is any. +func (c *projects) ListMembers(ctx context.Context, projectName string, options metav1.GetOptions) (result *v1.ProjectMembers, err error) { + result = &v1.ProjectMembers{} + err = c.client.Get(). + Resource("projects"). + Name(projectName). + SubResource("members"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// ListTemplates takes name of the project, and returns the corresponding v1.ProjectTemplates object, and an error if there is any. +func (c *projects) ListTemplates(ctx context.Context, projectName string, options metav1.GetOptions) (result *v1.ProjectTemplates, err error) { + result = &v1.ProjectTemplates{} + err = c.client.Get(). + Resource("projects"). + Name(projectName). + SubResource("templates"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// ListClusters takes name of the project, and returns the corresponding v1.ProjectClusters object, and an error if there is any. +func (c *projects) ListClusters(ctx context.Context, projectName string, options metav1.GetOptions) (result *v1.ProjectClusters, err error) { + result = &v1.ProjectClusters{} + err = c.client.Get(). + Resource("projects"). + Name(projectName). + SubResource("clusters"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// ImportVirtualCluster takes the representation of a projectImportVirtualCluster and creates it. Returns the server's representation of the projectImportVirtualCluster, and an error, if there is any. +func (c *projects) ImportVirtualCluster(ctx context.Context, projectName string, projectImportVirtualCluster *v1.ProjectImportVirtualCluster, opts metav1.CreateOptions) (result *v1.ProjectImportVirtualCluster, err error) { + result = &v1.ProjectImportVirtualCluster{} + err = c.client.Post(). + Resource("projects"). + Name(projectName). + SubResource("importvirtualcluster"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(projectImportVirtualCluster). + Do(ctx). + Into(result) + return +} + +// MigrateVirtualClusterInstance takes the representation of a projectMigrateVirtualClusterInstance and creates it. Returns the server's representation of the projectMigrateVirtualClusterInstance, and an error, if there is any. +func (c *projects) MigrateVirtualClusterInstance(ctx context.Context, projectName string, projectMigrateVirtualClusterInstance *v1.ProjectMigrateVirtualClusterInstance, opts metav1.CreateOptions) (result *v1.ProjectMigrateVirtualClusterInstance, err error) { + result = &v1.ProjectMigrateVirtualClusterInstance{} + err = c.client.Post(). + Resource("projects"). + Name(projectName). + SubResource("migratevirtualclusterinstance"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(projectMigrateVirtualClusterInstance). + Do(ctx). + Into(result) + return +} + +// ImportSpace takes the representation of a projectImportSpace and creates it. Returns the server's representation of the projectImportSpace, and an error, if there is any. +func (c *projects) ImportSpace(ctx context.Context, projectName string, projectImportSpace *v1.ProjectImportSpace, opts metav1.CreateOptions) (result *v1.ProjectImportSpace, err error) { + result = &v1.ProjectImportSpace{} + err = c.client.Post(). + Resource("projects"). + Name(projectName). + SubResource("importspace"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(projectImportSpace). + Do(ctx). + Into(result) + return +} + +// MigrateSpaceInstance takes the representation of a projectMigrateSpaceInstance and creates it. Returns the server's representation of the projectMigrateSpaceInstance, and an error, if there is any. +func (c *projects) MigrateSpaceInstance(ctx context.Context, projectName string, projectMigrateSpaceInstance *v1.ProjectMigrateSpaceInstance, opts metav1.CreateOptions) (result *v1.ProjectMigrateSpaceInstance, err error) { + result = &v1.ProjectMigrateSpaceInstance{} + err = c.client.Post(). + Resource("projects"). + Name(projectName). + SubResource("migratespaceinstance"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(projectMigrateSpaceInstance). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/projectsecret.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/projectsecret.go new file mode 100644 index 000000000..9f076eda7 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/projectsecret.go @@ -0,0 +1,162 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ProjectSecretsGetter has a method to return a ProjectSecretInterface. +// A group's client should implement this interface. +type ProjectSecretsGetter interface { + ProjectSecrets(namespace string) ProjectSecretInterface +} + +// ProjectSecretInterface has methods to work with ProjectSecret resources. +type ProjectSecretInterface interface { + Create(ctx context.Context, projectSecret *v1.ProjectSecret, opts metav1.CreateOptions) (*v1.ProjectSecret, error) + Update(ctx context.Context, projectSecret *v1.ProjectSecret, opts metav1.UpdateOptions) (*v1.ProjectSecret, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ProjectSecret, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ProjectSecretList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ProjectSecret, err error) + ProjectSecretExpansion +} + +// projectSecrets implements ProjectSecretInterface +type projectSecrets struct { + client rest.Interface + ns string +} + +// newProjectSecrets returns a ProjectSecrets +func newProjectSecrets(c *ManagementV1Client, namespace string) *projectSecrets { + return &projectSecrets{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the projectSecret, and returns the corresponding projectSecret object, and an error if there is any. +func (c *projectSecrets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ProjectSecret, err error) { + result = &v1.ProjectSecret{} + err = c.client.Get(). + Namespace(c.ns). + Resource("projectsecrets"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ProjectSecrets that match those selectors. +func (c *projectSecrets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ProjectSecretList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ProjectSecretList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("projectsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested projectSecrets. +func (c *projectSecrets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("projectsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a projectSecret and creates it. Returns the server's representation of the projectSecret, and an error, if there is any. +func (c *projectSecrets) Create(ctx context.Context, projectSecret *v1.ProjectSecret, opts metav1.CreateOptions) (result *v1.ProjectSecret, err error) { + result = &v1.ProjectSecret{} + err = c.client.Post(). + Namespace(c.ns). + Resource("projectsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(projectSecret). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a projectSecret and updates it. Returns the server's representation of the projectSecret, and an error, if there is any. +func (c *projectSecrets) Update(ctx context.Context, projectSecret *v1.ProjectSecret, opts metav1.UpdateOptions) (result *v1.ProjectSecret, err error) { + result = &v1.ProjectSecret{} + err = c.client.Put(). + Namespace(c.ns). + Resource("projectsecrets"). + Name(projectSecret.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(projectSecret). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the projectSecret and deletes it. Returns an error if one occurs. +func (c *projectSecrets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("projectsecrets"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *projectSecrets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("projectsecrets"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched projectSecret. +func (c *projectSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ProjectSecret, err error) { + result = &v1.ProjectSecret{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("projectsecrets"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/redirecttoken.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/redirecttoken.go new file mode 100644 index 000000000..c5c1af9bb --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/redirecttoken.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// RedirectTokensGetter has a method to return a RedirectTokenInterface. +// A group's client should implement this interface. +type RedirectTokensGetter interface { + RedirectTokens() RedirectTokenInterface +} + +// RedirectTokenInterface has methods to work with RedirectToken resources. +type RedirectTokenInterface interface { + Create(ctx context.Context, redirectToken *v1.RedirectToken, opts metav1.CreateOptions) (*v1.RedirectToken, error) + Update(ctx context.Context, redirectToken *v1.RedirectToken, opts metav1.UpdateOptions) (*v1.RedirectToken, error) + UpdateStatus(ctx context.Context, redirectToken *v1.RedirectToken, opts metav1.UpdateOptions) (*v1.RedirectToken, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.RedirectToken, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.RedirectTokenList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RedirectToken, err error) + RedirectTokenExpansion +} + +// redirectTokens implements RedirectTokenInterface +type redirectTokens struct { + client rest.Interface +} + +// newRedirectTokens returns a RedirectTokens +func newRedirectTokens(c *ManagementV1Client) *redirectTokens { + return &redirectTokens{ + client: c.RESTClient(), + } +} + +// Get takes name of the redirectToken, and returns the corresponding redirectToken object, and an error if there is any. +func (c *redirectTokens) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.RedirectToken, err error) { + result = &v1.RedirectToken{} + err = c.client.Get(). + Resource("redirecttokens"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of RedirectTokens that match those selectors. +func (c *redirectTokens) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RedirectTokenList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.RedirectTokenList{} + err = c.client.Get(). + Resource("redirecttokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested redirectTokens. +func (c *redirectTokens) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("redirecttokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a redirectToken and creates it. Returns the server's representation of the redirectToken, and an error, if there is any. +func (c *redirectTokens) Create(ctx context.Context, redirectToken *v1.RedirectToken, opts metav1.CreateOptions) (result *v1.RedirectToken, err error) { + result = &v1.RedirectToken{} + err = c.client.Post(). + Resource("redirecttokens"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(redirectToken). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a redirectToken and updates it. Returns the server's representation of the redirectToken, and an error, if there is any. +func (c *redirectTokens) Update(ctx context.Context, redirectToken *v1.RedirectToken, opts metav1.UpdateOptions) (result *v1.RedirectToken, err error) { + result = &v1.RedirectToken{} + err = c.client.Put(). + Resource("redirecttokens"). + Name(redirectToken.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(redirectToken). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *redirectTokens) UpdateStatus(ctx context.Context, redirectToken *v1.RedirectToken, opts metav1.UpdateOptions) (result *v1.RedirectToken, err error) { + result = &v1.RedirectToken{} + err = c.client.Put(). + Resource("redirecttokens"). + Name(redirectToken.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(redirectToken). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the redirectToken and deletes it. Returns an error if one occurs. +func (c *redirectTokens) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("redirecttokens"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *redirectTokens) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("redirecttokens"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched redirectToken. +func (c *redirectTokens) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RedirectToken, err error) { + result = &v1.RedirectToken{} + err = c.client.Patch(pt). + Resource("redirecttokens"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/resetaccesskey.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/resetaccesskey.go new file mode 100644 index 000000000..b0c87a78c --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/resetaccesskey.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ResetAccessKeysGetter has a method to return a ResetAccessKeyInterface. +// A group's client should implement this interface. +type ResetAccessKeysGetter interface { + ResetAccessKeys() ResetAccessKeyInterface +} + +// ResetAccessKeyInterface has methods to work with ResetAccessKey resources. +type ResetAccessKeyInterface interface { + Create(ctx context.Context, resetAccessKey *v1.ResetAccessKey, opts metav1.CreateOptions) (*v1.ResetAccessKey, error) + Update(ctx context.Context, resetAccessKey *v1.ResetAccessKey, opts metav1.UpdateOptions) (*v1.ResetAccessKey, error) + UpdateStatus(ctx context.Context, resetAccessKey *v1.ResetAccessKey, opts metav1.UpdateOptions) (*v1.ResetAccessKey, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ResetAccessKey, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ResetAccessKeyList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ResetAccessKey, err error) + ResetAccessKeyExpansion +} + +// resetAccessKeys implements ResetAccessKeyInterface +type resetAccessKeys struct { + client rest.Interface +} + +// newResetAccessKeys returns a ResetAccessKeys +func newResetAccessKeys(c *ManagementV1Client) *resetAccessKeys { + return &resetAccessKeys{ + client: c.RESTClient(), + } +} + +// Get takes name of the resetAccessKey, and returns the corresponding resetAccessKey object, and an error if there is any. +func (c *resetAccessKeys) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ResetAccessKey, err error) { + result = &v1.ResetAccessKey{} + err = c.client.Get(). + Resource("resetaccesskeys"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ResetAccessKeys that match those selectors. +func (c *resetAccessKeys) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ResetAccessKeyList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ResetAccessKeyList{} + err = c.client.Get(). + Resource("resetaccesskeys"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested resetAccessKeys. +func (c *resetAccessKeys) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("resetaccesskeys"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a resetAccessKey and creates it. Returns the server's representation of the resetAccessKey, and an error, if there is any. +func (c *resetAccessKeys) Create(ctx context.Context, resetAccessKey *v1.ResetAccessKey, opts metav1.CreateOptions) (result *v1.ResetAccessKey, err error) { + result = &v1.ResetAccessKey{} + err = c.client.Post(). + Resource("resetaccesskeys"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resetAccessKey). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a resetAccessKey and updates it. Returns the server's representation of the resetAccessKey, and an error, if there is any. +func (c *resetAccessKeys) Update(ctx context.Context, resetAccessKey *v1.ResetAccessKey, opts metav1.UpdateOptions) (result *v1.ResetAccessKey, err error) { + result = &v1.ResetAccessKey{} + err = c.client.Put(). + Resource("resetaccesskeys"). + Name(resetAccessKey.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resetAccessKey). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *resetAccessKeys) UpdateStatus(ctx context.Context, resetAccessKey *v1.ResetAccessKey, opts metav1.UpdateOptions) (result *v1.ResetAccessKey, err error) { + result = &v1.ResetAccessKey{} + err = c.client.Put(). + Resource("resetaccesskeys"). + Name(resetAccessKey.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resetAccessKey). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the resetAccessKey and deletes it. Returns an error if one occurs. +func (c *resetAccessKeys) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("resetaccesskeys"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *resetAccessKeys) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("resetaccesskeys"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched resetAccessKey. +func (c *resetAccessKeys) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ResetAccessKey, err error) { + result = &v1.ResetAccessKey{} + err = c.client.Patch(pt). + Resource("resetaccesskeys"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/runner.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/runner.go new file mode 100644 index 000000000..62fce7820 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/runner.go @@ -0,0 +1,197 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// RunnersGetter has a method to return a RunnerInterface. +// A group's client should implement this interface. +type RunnersGetter interface { + Runners() RunnerInterface +} + +// RunnerInterface has methods to work with Runner resources. +type RunnerInterface interface { + Create(ctx context.Context, runner *v1.Runner, opts metav1.CreateOptions) (*v1.Runner, error) + Update(ctx context.Context, runner *v1.Runner, opts metav1.UpdateOptions) (*v1.Runner, error) + UpdateStatus(ctx context.Context, runner *v1.Runner, opts metav1.UpdateOptions) (*v1.Runner, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Runner, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.RunnerList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Runner, err error) + GetConfig(ctx context.Context, runnerName string, options metav1.GetOptions) (*v1.RunnerConfig, error) + GetAccessKey(ctx context.Context, runnerName string, options metav1.GetOptions) (*v1.RunnerAccessKey, error) + + RunnerExpansion +} + +// runners implements RunnerInterface +type runners struct { + client rest.Interface +} + +// newRunners returns a Runners +func newRunners(c *ManagementV1Client) *runners { + return &runners{ + client: c.RESTClient(), + } +} + +// Get takes name of the runner, and returns the corresponding runner object, and an error if there is any. +func (c *runners) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Runner, err error) { + result = &v1.Runner{} + err = c.client.Get(). + Resource("runners"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Runners that match those selectors. +func (c *runners) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RunnerList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.RunnerList{} + err = c.client.Get(). + Resource("runners"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested runners. +func (c *runners) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("runners"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a runner and creates it. Returns the server's representation of the runner, and an error, if there is any. +func (c *runners) Create(ctx context.Context, runner *v1.Runner, opts metav1.CreateOptions) (result *v1.Runner, err error) { + result = &v1.Runner{} + err = c.client.Post(). + Resource("runners"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(runner). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a runner and updates it. Returns the server's representation of the runner, and an error, if there is any. +func (c *runners) Update(ctx context.Context, runner *v1.Runner, opts metav1.UpdateOptions) (result *v1.Runner, err error) { + result = &v1.Runner{} + err = c.client.Put(). + Resource("runners"). + Name(runner.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(runner). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *runners) UpdateStatus(ctx context.Context, runner *v1.Runner, opts metav1.UpdateOptions) (result *v1.Runner, err error) { + result = &v1.Runner{} + err = c.client.Put(). + Resource("runners"). + Name(runner.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(runner). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the runner and deletes it. Returns an error if one occurs. +func (c *runners) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("runners"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *runners) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("runners"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched runner. +func (c *runners) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Runner, err error) { + result = &v1.Runner{} + err = c.client.Patch(pt). + Resource("runners"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// GetConfig takes name of the runner, and returns the corresponding v1.RunnerConfig object, and an error if there is any. +func (c *runners) GetConfig(ctx context.Context, runnerName string, options metav1.GetOptions) (result *v1.RunnerConfig, err error) { + result = &v1.RunnerConfig{} + err = c.client.Get(). + Resource("runners"). + Name(runnerName). + SubResource("config"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// GetAccessKey takes name of the runner, and returns the corresponding v1.RunnerAccessKey object, and an error if there is any. +func (c *runners) GetAccessKey(ctx context.Context, runnerName string, options metav1.GetOptions) (result *v1.RunnerAccessKey, err error) { + result = &v1.RunnerAccessKey{} + err = c.client.Get(). + Resource("runners"). + Name(runnerName). + SubResource("accesskey"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/self.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/self.go new file mode 100644 index 000000000..6cd97bc9b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/self.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SelvesGetter has a method to return a SelfInterface. +// A group's client should implement this interface. +type SelvesGetter interface { + Selves() SelfInterface +} + +// SelfInterface has methods to work with Self resources. +type SelfInterface interface { + Create(ctx context.Context, self *v1.Self, opts metav1.CreateOptions) (*v1.Self, error) + Update(ctx context.Context, self *v1.Self, opts metav1.UpdateOptions) (*v1.Self, error) + UpdateStatus(ctx context.Context, self *v1.Self, opts metav1.UpdateOptions) (*v1.Self, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Self, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SelfList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Self, err error) + SelfExpansion +} + +// selves implements SelfInterface +type selves struct { + client rest.Interface +} + +// newSelves returns a Selves +func newSelves(c *ManagementV1Client) *selves { + return &selves{ + client: c.RESTClient(), + } +} + +// Get takes name of the self, and returns the corresponding self object, and an error if there is any. +func (c *selves) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Self, err error) { + result = &v1.Self{} + err = c.client.Get(). + Resource("selves"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Selves that match those selectors. +func (c *selves) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SelfList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SelfList{} + err = c.client.Get(). + Resource("selves"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested selves. +func (c *selves) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("selves"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a self and creates it. Returns the server's representation of the self, and an error, if there is any. +func (c *selves) Create(ctx context.Context, self *v1.Self, opts metav1.CreateOptions) (result *v1.Self, err error) { + result = &v1.Self{} + err = c.client.Post(). + Resource("selves"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(self). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a self and updates it. Returns the server's representation of the self, and an error, if there is any. +func (c *selves) Update(ctx context.Context, self *v1.Self, opts metav1.UpdateOptions) (result *v1.Self, err error) { + result = &v1.Self{} + err = c.client.Put(). + Resource("selves"). + Name(self.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(self). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *selves) UpdateStatus(ctx context.Context, self *v1.Self, opts metav1.UpdateOptions) (result *v1.Self, err error) { + result = &v1.Self{} + err = c.client.Put(). + Resource("selves"). + Name(self.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(self). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the self and deletes it. Returns an error if one occurs. +func (c *selves) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("selves"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *selves) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("selves"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched self. +func (c *selves) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Self, err error) { + result = &v1.Self{} + err = c.client.Patch(pt). + Resource("selves"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/selfsubjectaccessreview.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/selfsubjectaccessreview.go new file mode 100644 index 000000000..558daddcf --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/selfsubjectaccessreview.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface. +// A group's client should implement this interface. +type SelfSubjectAccessReviewsGetter interface { + SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface +} + +// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources. +type SelfSubjectAccessReviewInterface interface { + Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (*v1.SelfSubjectAccessReview, error) + Update(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.UpdateOptions) (*v1.SelfSubjectAccessReview, error) + UpdateStatus(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.UpdateOptions) (*v1.SelfSubjectAccessReview, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SelfSubjectAccessReview, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SelfSubjectAccessReviewList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SelfSubjectAccessReview, err error) + SelfSubjectAccessReviewExpansion +} + +// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface +type selfSubjectAccessReviews struct { + client rest.Interface +} + +// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews +func newSelfSubjectAccessReviews(c *ManagementV1Client) *selfSubjectAccessReviews { + return &selfSubjectAccessReviews{ + client: c.RESTClient(), + } +} + +// Get takes name of the selfSubjectAccessReview, and returns the corresponding selfSubjectAccessReview object, and an error if there is any. +func (c *selfSubjectAccessReviews) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SelfSubjectAccessReview, err error) { + result = &v1.SelfSubjectAccessReview{} + err = c.client.Get(). + Resource("selfsubjectaccessreviews"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SelfSubjectAccessReviews that match those selectors. +func (c *selfSubjectAccessReviews) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SelfSubjectAccessReviewList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SelfSubjectAccessReviewList{} + err = c.client.Get(). + Resource("selfsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested selfSubjectAccessReviews. +func (c *selfSubjectAccessReviews) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("selfsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. +func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SelfSubjectAccessReview, err error) { + result = &v1.SelfSubjectAccessReview{} + err = c.client.Post(). + Resource("selfsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(selfSubjectAccessReview). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a selfSubjectAccessReview and updates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. +func (c *selfSubjectAccessReviews) Update(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.UpdateOptions) (result *v1.SelfSubjectAccessReview, err error) { + result = &v1.SelfSubjectAccessReview{} + err = c.client.Put(). + Resource("selfsubjectaccessreviews"). + Name(selfSubjectAccessReview.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(selfSubjectAccessReview). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *selfSubjectAccessReviews) UpdateStatus(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.UpdateOptions) (result *v1.SelfSubjectAccessReview, err error) { + result = &v1.SelfSubjectAccessReview{} + err = c.client.Put(). + Resource("selfsubjectaccessreviews"). + Name(selfSubjectAccessReview.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(selfSubjectAccessReview). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the selfSubjectAccessReview and deletes it. Returns an error if one occurs. +func (c *selfSubjectAccessReviews) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("selfsubjectaccessreviews"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *selfSubjectAccessReviews) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("selfsubjectaccessreviews"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched selfSubjectAccessReview. +func (c *selfSubjectAccessReviews) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SelfSubjectAccessReview, err error) { + result = &v1.SelfSubjectAccessReview{} + err = c.client.Patch(pt). + Resource("selfsubjectaccessreviews"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/sharedsecret.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/sharedsecret.go new file mode 100644 index 000000000..d5b1cf3aa --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/sharedsecret.go @@ -0,0 +1,179 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SharedSecretsGetter has a method to return a SharedSecretInterface. +// A group's client should implement this interface. +type SharedSecretsGetter interface { + SharedSecrets(namespace string) SharedSecretInterface +} + +// SharedSecretInterface has methods to work with SharedSecret resources. +type SharedSecretInterface interface { + Create(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.CreateOptions) (*v1.SharedSecret, error) + Update(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.UpdateOptions) (*v1.SharedSecret, error) + UpdateStatus(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.UpdateOptions) (*v1.SharedSecret, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SharedSecret, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SharedSecretList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SharedSecret, err error) + SharedSecretExpansion +} + +// sharedSecrets implements SharedSecretInterface +type sharedSecrets struct { + client rest.Interface + ns string +} + +// newSharedSecrets returns a SharedSecrets +func newSharedSecrets(c *ManagementV1Client, namespace string) *sharedSecrets { + return &sharedSecrets{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the sharedSecret, and returns the corresponding sharedSecret object, and an error if there is any. +func (c *sharedSecrets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SharedSecret, err error) { + result = &v1.SharedSecret{} + err = c.client.Get(). + Namespace(c.ns). + Resource("sharedsecrets"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SharedSecrets that match those selectors. +func (c *sharedSecrets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SharedSecretList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SharedSecretList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("sharedsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested sharedSecrets. +func (c *sharedSecrets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("sharedsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a sharedSecret and creates it. Returns the server's representation of the sharedSecret, and an error, if there is any. +func (c *sharedSecrets) Create(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.CreateOptions) (result *v1.SharedSecret, err error) { + result = &v1.SharedSecret{} + err = c.client.Post(). + Namespace(c.ns). + Resource("sharedsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedSecret). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a sharedSecret and updates it. Returns the server's representation of the sharedSecret, and an error, if there is any. +func (c *sharedSecrets) Update(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.UpdateOptions) (result *v1.SharedSecret, err error) { + result = &v1.SharedSecret{} + err = c.client.Put(). + Namespace(c.ns). + Resource("sharedsecrets"). + Name(sharedSecret.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedSecret). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *sharedSecrets) UpdateStatus(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.UpdateOptions) (result *v1.SharedSecret, err error) { + result = &v1.SharedSecret{} + err = c.client.Put(). + Namespace(c.ns). + Resource("sharedsecrets"). + Name(sharedSecret.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedSecret). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the sharedSecret and deletes it. Returns an error if one occurs. +func (c *sharedSecrets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("sharedsecrets"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *sharedSecrets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("sharedsecrets"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched sharedSecret. +func (c *sharedSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SharedSecret, err error) { + result = &v1.SharedSecret{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("sharedsecrets"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/spaceconstraint.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/spaceconstraint.go new file mode 100644 index 000000000..55183757a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/spaceconstraint.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SpaceConstraintsGetter has a method to return a SpaceConstraintInterface. +// A group's client should implement this interface. +type SpaceConstraintsGetter interface { + SpaceConstraints() SpaceConstraintInterface +} + +// SpaceConstraintInterface has methods to work with SpaceConstraint resources. +type SpaceConstraintInterface interface { + Create(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.CreateOptions) (*v1.SpaceConstraint, error) + Update(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.UpdateOptions) (*v1.SpaceConstraint, error) + UpdateStatus(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.UpdateOptions) (*v1.SpaceConstraint, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SpaceConstraint, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SpaceConstraintList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceConstraint, err error) + SpaceConstraintExpansion +} + +// spaceConstraints implements SpaceConstraintInterface +type spaceConstraints struct { + client rest.Interface +} + +// newSpaceConstraints returns a SpaceConstraints +func newSpaceConstraints(c *ManagementV1Client) *spaceConstraints { + return &spaceConstraints{ + client: c.RESTClient(), + } +} + +// Get takes name of the spaceConstraint, and returns the corresponding spaceConstraint object, and an error if there is any. +func (c *spaceConstraints) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SpaceConstraint, err error) { + result = &v1.SpaceConstraint{} + err = c.client.Get(). + Resource("spaceconstraints"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SpaceConstraints that match those selectors. +func (c *spaceConstraints) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SpaceConstraintList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SpaceConstraintList{} + err = c.client.Get(). + Resource("spaceconstraints"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested spaceConstraints. +func (c *spaceConstraints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("spaceconstraints"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a spaceConstraint and creates it. Returns the server's representation of the spaceConstraint, and an error, if there is any. +func (c *spaceConstraints) Create(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.CreateOptions) (result *v1.SpaceConstraint, err error) { + result = &v1.SpaceConstraint{} + err = c.client.Post(). + Resource("spaceconstraints"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceConstraint). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a spaceConstraint and updates it. Returns the server's representation of the spaceConstraint, and an error, if there is any. +func (c *spaceConstraints) Update(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.UpdateOptions) (result *v1.SpaceConstraint, err error) { + result = &v1.SpaceConstraint{} + err = c.client.Put(). + Resource("spaceconstraints"). + Name(spaceConstraint.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceConstraint). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *spaceConstraints) UpdateStatus(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.UpdateOptions) (result *v1.SpaceConstraint, err error) { + result = &v1.SpaceConstraint{} + err = c.client.Put(). + Resource("spaceconstraints"). + Name(spaceConstraint.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceConstraint). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the spaceConstraint and deletes it. Returns an error if one occurs. +func (c *spaceConstraints) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("spaceconstraints"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *spaceConstraints) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("spaceconstraints"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched spaceConstraint. +func (c *spaceConstraints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceConstraint, err error) { + result = &v1.SpaceConstraint{} + err = c.client.Patch(pt). + Resource("spaceconstraints"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/spaceinstance.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/spaceinstance.go new file mode 100644 index 000000000..65aff08d1 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/spaceinstance.go @@ -0,0 +1,162 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SpaceInstancesGetter has a method to return a SpaceInstanceInterface. +// A group's client should implement this interface. +type SpaceInstancesGetter interface { + SpaceInstances(namespace string) SpaceInstanceInterface +} + +// SpaceInstanceInterface has methods to work with SpaceInstance resources. +type SpaceInstanceInterface interface { + Create(ctx context.Context, spaceInstance *v1.SpaceInstance, opts metav1.CreateOptions) (*v1.SpaceInstance, error) + Update(ctx context.Context, spaceInstance *v1.SpaceInstance, opts metav1.UpdateOptions) (*v1.SpaceInstance, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SpaceInstance, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SpaceInstanceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceInstance, err error) + SpaceInstanceExpansion +} + +// spaceInstances implements SpaceInstanceInterface +type spaceInstances struct { + client rest.Interface + ns string +} + +// newSpaceInstances returns a SpaceInstances +func newSpaceInstances(c *ManagementV1Client, namespace string) *spaceInstances { + return &spaceInstances{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the spaceInstance, and returns the corresponding spaceInstance object, and an error if there is any. +func (c *spaceInstances) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SpaceInstance, err error) { + result = &v1.SpaceInstance{} + err = c.client.Get(). + Namespace(c.ns). + Resource("spaceinstances"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SpaceInstances that match those selectors. +func (c *spaceInstances) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SpaceInstanceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SpaceInstanceList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("spaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested spaceInstances. +func (c *spaceInstances) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("spaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a spaceInstance and creates it. Returns the server's representation of the spaceInstance, and an error, if there is any. +func (c *spaceInstances) Create(ctx context.Context, spaceInstance *v1.SpaceInstance, opts metav1.CreateOptions) (result *v1.SpaceInstance, err error) { + result = &v1.SpaceInstance{} + err = c.client.Post(). + Namespace(c.ns). + Resource("spaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceInstance). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a spaceInstance and updates it. Returns the server's representation of the spaceInstance, and an error, if there is any. +func (c *spaceInstances) Update(ctx context.Context, spaceInstance *v1.SpaceInstance, opts metav1.UpdateOptions) (result *v1.SpaceInstance, err error) { + result = &v1.SpaceInstance{} + err = c.client.Put(). + Namespace(c.ns). + Resource("spaceinstances"). + Name(spaceInstance.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceInstance). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the spaceInstance and deletes it. Returns an error if one occurs. +func (c *spaceInstances) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("spaceinstances"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *spaceInstances) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("spaceinstances"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched spaceInstance. +func (c *spaceInstances) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceInstance, err error) { + result = &v1.SpaceInstance{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("spaceinstances"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/spacetemplate.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/spacetemplate.go new file mode 100644 index 000000000..75bbe2f32 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/spacetemplate.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SpaceTemplatesGetter has a method to return a SpaceTemplateInterface. +// A group's client should implement this interface. +type SpaceTemplatesGetter interface { + SpaceTemplates() SpaceTemplateInterface +} + +// SpaceTemplateInterface has methods to work with SpaceTemplate resources. +type SpaceTemplateInterface interface { + Create(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.CreateOptions) (*v1.SpaceTemplate, error) + Update(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.UpdateOptions) (*v1.SpaceTemplate, error) + UpdateStatus(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.UpdateOptions) (*v1.SpaceTemplate, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SpaceTemplate, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SpaceTemplateList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceTemplate, err error) + SpaceTemplateExpansion +} + +// spaceTemplates implements SpaceTemplateInterface +type spaceTemplates struct { + client rest.Interface +} + +// newSpaceTemplates returns a SpaceTemplates +func newSpaceTemplates(c *ManagementV1Client) *spaceTemplates { + return &spaceTemplates{ + client: c.RESTClient(), + } +} + +// Get takes name of the spaceTemplate, and returns the corresponding spaceTemplate object, and an error if there is any. +func (c *spaceTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SpaceTemplate, err error) { + result = &v1.SpaceTemplate{} + err = c.client.Get(). + Resource("spacetemplates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SpaceTemplates that match those selectors. +func (c *spaceTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SpaceTemplateList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SpaceTemplateList{} + err = c.client.Get(). + Resource("spacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested spaceTemplates. +func (c *spaceTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("spacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a spaceTemplate and creates it. Returns the server's representation of the spaceTemplate, and an error, if there is any. +func (c *spaceTemplates) Create(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.CreateOptions) (result *v1.SpaceTemplate, err error) { + result = &v1.SpaceTemplate{} + err = c.client.Post(). + Resource("spacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceTemplate). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a spaceTemplate and updates it. Returns the server's representation of the spaceTemplate, and an error, if there is any. +func (c *spaceTemplates) Update(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.UpdateOptions) (result *v1.SpaceTemplate, err error) { + result = &v1.SpaceTemplate{} + err = c.client.Put(). + Resource("spacetemplates"). + Name(spaceTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceTemplate). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *spaceTemplates) UpdateStatus(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.UpdateOptions) (result *v1.SpaceTemplate, err error) { + result = &v1.SpaceTemplate{} + err = c.client.Put(). + Resource("spacetemplates"). + Name(spaceTemplate.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceTemplate). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the spaceTemplate and deletes it. Returns an error if one occurs. +func (c *spaceTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("spacetemplates"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *spaceTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("spacetemplates"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched spaceTemplate. +func (c *spaceTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceTemplate, err error) { + result = &v1.SpaceTemplate{} + err = c.client.Patch(pt). + Resource("spacetemplates"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/subjectaccessreview.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/subjectaccessreview.go new file mode 100644 index 000000000..d47e87378 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/subjectaccessreview.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface. +// A group's client should implement this interface. +type SubjectAccessReviewsGetter interface { + SubjectAccessReviews() SubjectAccessReviewInterface +} + +// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources. +type SubjectAccessReviewInterface interface { + Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (*v1.SubjectAccessReview, error) + Update(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.UpdateOptions) (*v1.SubjectAccessReview, error) + UpdateStatus(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.UpdateOptions) (*v1.SubjectAccessReview, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SubjectAccessReview, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SubjectAccessReviewList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SubjectAccessReview, err error) + SubjectAccessReviewExpansion +} + +// subjectAccessReviews implements SubjectAccessReviewInterface +type subjectAccessReviews struct { + client rest.Interface +} + +// newSubjectAccessReviews returns a SubjectAccessReviews +func newSubjectAccessReviews(c *ManagementV1Client) *subjectAccessReviews { + return &subjectAccessReviews{ + client: c.RESTClient(), + } +} + +// Get takes name of the subjectAccessReview, and returns the corresponding subjectAccessReview object, and an error if there is any. +func (c *subjectAccessReviews) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SubjectAccessReview, err error) { + result = &v1.SubjectAccessReview{} + err = c.client.Get(). + Resource("subjectaccessreviews"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SubjectAccessReviews that match those selectors. +func (c *subjectAccessReviews) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SubjectAccessReviewList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SubjectAccessReviewList{} + err = c.client.Get(). + Resource("subjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested subjectAccessReviews. +func (c *subjectAccessReviews) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("subjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. +func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReview, err error) { + result = &v1.SubjectAccessReview{} + err = c.client.Post(). + Resource("subjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(subjectAccessReview). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a subjectAccessReview and updates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. +func (c *subjectAccessReviews) Update(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.UpdateOptions) (result *v1.SubjectAccessReview, err error) { + result = &v1.SubjectAccessReview{} + err = c.client.Put(). + Resource("subjectaccessreviews"). + Name(subjectAccessReview.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(subjectAccessReview). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *subjectAccessReviews) UpdateStatus(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.UpdateOptions) (result *v1.SubjectAccessReview, err error) { + result = &v1.SubjectAccessReview{} + err = c.client.Put(). + Resource("subjectaccessreviews"). + Name(subjectAccessReview.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(subjectAccessReview). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the subjectAccessReview and deletes it. Returns an error if one occurs. +func (c *subjectAccessReviews) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("subjectaccessreviews"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *subjectAccessReviews) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("subjectaccessreviews"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched subjectAccessReview. +func (c *subjectAccessReviews) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SubjectAccessReview, err error) { + result = &v1.SubjectAccessReview{} + err = c.client.Patch(pt). + Resource("subjectaccessreviews"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/task.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/task.go new file mode 100644 index 000000000..e1050406f --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/task.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// TasksGetter has a method to return a TaskInterface. +// A group's client should implement this interface. +type TasksGetter interface { + Tasks() TaskInterface +} + +// TaskInterface has methods to work with Task resources. +type TaskInterface interface { + Create(ctx context.Context, task *v1.Task, opts metav1.CreateOptions) (*v1.Task, error) + Update(ctx context.Context, task *v1.Task, opts metav1.UpdateOptions) (*v1.Task, error) + UpdateStatus(ctx context.Context, task *v1.Task, opts metav1.UpdateOptions) (*v1.Task, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Task, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.TaskList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Task, err error) + TaskExpansion +} + +// tasks implements TaskInterface +type tasks struct { + client rest.Interface +} + +// newTasks returns a Tasks +func newTasks(c *ManagementV1Client) *tasks { + return &tasks{ + client: c.RESTClient(), + } +} + +// Get takes name of the task, and returns the corresponding task object, and an error if there is any. +func (c *tasks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Task, err error) { + result = &v1.Task{} + err = c.client.Get(). + Resource("tasks"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Tasks that match those selectors. +func (c *tasks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TaskList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.TaskList{} + err = c.client.Get(). + Resource("tasks"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested tasks. +func (c *tasks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("tasks"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a task and creates it. Returns the server's representation of the task, and an error, if there is any. +func (c *tasks) Create(ctx context.Context, task *v1.Task, opts metav1.CreateOptions) (result *v1.Task, err error) { + result = &v1.Task{} + err = c.client.Post(). + Resource("tasks"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(task). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a task and updates it. Returns the server's representation of the task, and an error, if there is any. +func (c *tasks) Update(ctx context.Context, task *v1.Task, opts metav1.UpdateOptions) (result *v1.Task, err error) { + result = &v1.Task{} + err = c.client.Put(). + Resource("tasks"). + Name(task.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(task). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *tasks) UpdateStatus(ctx context.Context, task *v1.Task, opts metav1.UpdateOptions) (result *v1.Task, err error) { + result = &v1.Task{} + err = c.client.Put(). + Resource("tasks"). + Name(task.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(task). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the task and deletes it. Returns an error if one occurs. +func (c *tasks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("tasks"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *tasks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("tasks"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched task. +func (c *tasks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Task, err error) { + result = &v1.Task{} + err = c.client.Patch(pt). + Resource("tasks"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/team.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/team.go new file mode 100644 index 000000000..02511efe1 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/team.go @@ -0,0 +1,197 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// TeamsGetter has a method to return a TeamInterface. +// A group's client should implement this interface. +type TeamsGetter interface { + Teams() TeamInterface +} + +// TeamInterface has methods to work with Team resources. +type TeamInterface interface { + Create(ctx context.Context, team *v1.Team, opts metav1.CreateOptions) (*v1.Team, error) + Update(ctx context.Context, team *v1.Team, opts metav1.UpdateOptions) (*v1.Team, error) + UpdateStatus(ctx context.Context, team *v1.Team, opts metav1.UpdateOptions) (*v1.Team, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Team, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.TeamList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Team, err error) + ListClusters(ctx context.Context, teamName string, options metav1.GetOptions) (*v1.TeamClusters, error) + ListAccessKeys(ctx context.Context, teamName string, options metav1.GetOptions) (*v1.TeamAccessKeys, error) + + TeamExpansion +} + +// teams implements TeamInterface +type teams struct { + client rest.Interface +} + +// newTeams returns a Teams +func newTeams(c *ManagementV1Client) *teams { + return &teams{ + client: c.RESTClient(), + } +} + +// Get takes name of the team, and returns the corresponding team object, and an error if there is any. +func (c *teams) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Team, err error) { + result = &v1.Team{} + err = c.client.Get(). + Resource("teams"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Teams that match those selectors. +func (c *teams) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TeamList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.TeamList{} + err = c.client.Get(). + Resource("teams"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested teams. +func (c *teams) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("teams"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a team and creates it. Returns the server's representation of the team, and an error, if there is any. +func (c *teams) Create(ctx context.Context, team *v1.Team, opts metav1.CreateOptions) (result *v1.Team, err error) { + result = &v1.Team{} + err = c.client.Post(). + Resource("teams"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(team). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a team and updates it. Returns the server's representation of the team, and an error, if there is any. +func (c *teams) Update(ctx context.Context, team *v1.Team, opts metav1.UpdateOptions) (result *v1.Team, err error) { + result = &v1.Team{} + err = c.client.Put(). + Resource("teams"). + Name(team.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(team). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *teams) UpdateStatus(ctx context.Context, team *v1.Team, opts metav1.UpdateOptions) (result *v1.Team, err error) { + result = &v1.Team{} + err = c.client.Put(). + Resource("teams"). + Name(team.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(team). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the team and deletes it. Returns an error if one occurs. +func (c *teams) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("teams"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *teams) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("teams"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched team. +func (c *teams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Team, err error) { + result = &v1.Team{} + err = c.client.Patch(pt). + Resource("teams"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ListClusters takes name of the team, and returns the corresponding v1.TeamClusters object, and an error if there is any. +func (c *teams) ListClusters(ctx context.Context, teamName string, options metav1.GetOptions) (result *v1.TeamClusters, err error) { + result = &v1.TeamClusters{} + err = c.client.Get(). + Resource("teams"). + Name(teamName). + SubResource("clusters"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// ListAccessKeys takes name of the team, and returns the corresponding v1.TeamAccessKeys object, and an error if there is any. +func (c *teams) ListAccessKeys(ctx context.Context, teamName string, options metav1.GetOptions) (result *v1.TeamAccessKeys, err error) { + result = &v1.TeamAccessKeys{} + err = c.client.Get(). + Resource("teams"). + Name(teamName). + SubResource("accesskeys"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/user.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/user.go new file mode 100644 index 000000000..638b7e22a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/user.go @@ -0,0 +1,211 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// UsersGetter has a method to return a UserInterface. +// A group's client should implement this interface. +type UsersGetter interface { + Users() UserInterface +} + +// UserInterface has methods to work with User resources. +type UserInterface interface { + Create(ctx context.Context, user *v1.User, opts metav1.CreateOptions) (*v1.User, error) + Update(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) (*v1.User, error) + UpdateStatus(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) (*v1.User, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.User, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.UserList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.User, err error) + GetProfile(ctx context.Context, userName string, options metav1.GetOptions) (*v1.UserProfile, error) + ListClusters(ctx context.Context, userName string, options metav1.GetOptions) (*v1.UserClusters, error) + ListAccessKeys(ctx context.Context, userName string, options metav1.GetOptions) (*v1.UserAccessKeys, error) + + UserExpansion +} + +// users implements UserInterface +type users struct { + client rest.Interface +} + +// newUsers returns a Users +func newUsers(c *ManagementV1Client) *users { + return &users{ + client: c.RESTClient(), + } +} + +// Get takes name of the user, and returns the corresponding user object, and an error if there is any. +func (c *users) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.User, err error) { + result = &v1.User{} + err = c.client.Get(). + Resource("users"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Users that match those selectors. +func (c *users) List(ctx context.Context, opts metav1.ListOptions) (result *v1.UserList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.UserList{} + err = c.client.Get(). + Resource("users"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested users. +func (c *users) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("users"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a user and creates it. Returns the server's representation of the user, and an error, if there is any. +func (c *users) Create(ctx context.Context, user *v1.User, opts metav1.CreateOptions) (result *v1.User, err error) { + result = &v1.User{} + err = c.client.Post(). + Resource("users"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(user). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a user and updates it. Returns the server's representation of the user, and an error, if there is any. +func (c *users) Update(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) (result *v1.User, err error) { + result = &v1.User{} + err = c.client.Put(). + Resource("users"). + Name(user.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(user). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *users) UpdateStatus(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) (result *v1.User, err error) { + result = &v1.User{} + err = c.client.Put(). + Resource("users"). + Name(user.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(user). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the user and deletes it. Returns an error if one occurs. +func (c *users) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("users"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *users) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("users"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched user. +func (c *users) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.User, err error) { + result = &v1.User{} + err = c.client.Patch(pt). + Resource("users"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// GetProfile takes name of the user, and returns the corresponding v1.UserProfile object, and an error if there is any. +func (c *users) GetProfile(ctx context.Context, userName string, options metav1.GetOptions) (result *v1.UserProfile, err error) { + result = &v1.UserProfile{} + err = c.client.Get(). + Resource("users"). + Name(userName). + SubResource("profile"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// ListClusters takes name of the user, and returns the corresponding v1.UserClusters object, and an error if there is any. +func (c *users) ListClusters(ctx context.Context, userName string, options metav1.GetOptions) (result *v1.UserClusters, err error) { + result = &v1.UserClusters{} + err = c.client.Get(). + Resource("users"). + Name(userName). + SubResource("clusters"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// ListAccessKeys takes name of the user, and returns the corresponding v1.UserAccessKeys object, and an error if there is any. +func (c *users) ListAccessKeys(ctx context.Context, userName string, options metav1.GetOptions) (result *v1.UserAccessKeys, err error) { + result = &v1.UserAccessKeys{} + err = c.client.Get(). + Resource("users"). + Name(userName). + SubResource("accesskeys"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/virtualclusterinstance.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/virtualclusterinstance.go new file mode 100644 index 000000000..74c3feec6 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/virtualclusterinstance.go @@ -0,0 +1,210 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VirtualClusterInstancesGetter has a method to return a VirtualClusterInstanceInterface. +// A group's client should implement this interface. +type VirtualClusterInstancesGetter interface { + VirtualClusterInstances(namespace string) VirtualClusterInstanceInterface +} + +// VirtualClusterInstanceInterface has methods to work with VirtualClusterInstance resources. +type VirtualClusterInstanceInterface interface { + Create(ctx context.Context, virtualClusterInstance *v1.VirtualClusterInstance, opts metav1.CreateOptions) (*v1.VirtualClusterInstance, error) + Update(ctx context.Context, virtualClusterInstance *v1.VirtualClusterInstance, opts metav1.UpdateOptions) (*v1.VirtualClusterInstance, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualClusterInstance, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualClusterInstanceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualClusterInstance, err error) + GetKubeConfig(ctx context.Context, virtualClusterInstanceName string, virtualClusterInstanceKubeConfig *v1.VirtualClusterInstanceKubeConfig, opts metav1.CreateOptions) (*v1.VirtualClusterInstanceKubeConfig, error) + CreateWorkloadKubeConfig(ctx context.Context, virtualClusterInstanceName string, virtualClusterInstanceWorkloadKubeConfig *v1.VirtualClusterInstanceWorkloadKubeConfig, opts metav1.CreateOptions) (*v1.VirtualClusterInstanceWorkloadKubeConfig, error) + GetWorkloadKubeConfig(ctx context.Context, virtualClusterInstanceName string, options metav1.GetOptions) (*v1.VirtualClusterInstanceWorkloadKubeConfig, error) + + VirtualClusterInstanceExpansion +} + +// virtualClusterInstances implements VirtualClusterInstanceInterface +type virtualClusterInstances struct { + client rest.Interface + ns string +} + +// newVirtualClusterInstances returns a VirtualClusterInstances +func newVirtualClusterInstances(c *ManagementV1Client, namespace string) *virtualClusterInstances { + return &virtualClusterInstances{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the virtualClusterInstance, and returns the corresponding virtualClusterInstance object, and an error if there is any. +func (c *virtualClusterInstances) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualClusterInstance, err error) { + result = &v1.VirtualClusterInstance{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualClusterInstances that match those selectors. +func (c *virtualClusterInstances) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualClusterInstanceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.VirtualClusterInstanceList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualClusterInstances. +func (c *virtualClusterInstances) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualClusterInstance and creates it. Returns the server's representation of the virtualClusterInstance, and an error, if there is any. +func (c *virtualClusterInstances) Create(ctx context.Context, virtualClusterInstance *v1.VirtualClusterInstance, opts metav1.CreateOptions) (result *v1.VirtualClusterInstance, err error) { + result = &v1.VirtualClusterInstance{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterInstance). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualClusterInstance and updates it. Returns the server's representation of the virtualClusterInstance, and an error, if there is any. +func (c *virtualClusterInstances) Update(ctx context.Context, virtualClusterInstance *v1.VirtualClusterInstance, opts metav1.UpdateOptions) (result *v1.VirtualClusterInstance, err error) { + result = &v1.VirtualClusterInstance{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(virtualClusterInstance.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterInstance). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualClusterInstance and deletes it. Returns an error if one occurs. +func (c *virtualClusterInstances) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualClusterInstances) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualClusterInstance. +func (c *virtualClusterInstances) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualClusterInstance, err error) { + result = &v1.VirtualClusterInstance{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// GetKubeConfig takes the representation of a virtualClusterInstanceKubeConfig and creates it. Returns the server's representation of the virtualClusterInstanceKubeConfig, and an error, if there is any. +func (c *virtualClusterInstances) GetKubeConfig(ctx context.Context, virtualClusterInstanceName string, virtualClusterInstanceKubeConfig *v1.VirtualClusterInstanceKubeConfig, opts metav1.CreateOptions) (result *v1.VirtualClusterInstanceKubeConfig, err error) { + result = &v1.VirtualClusterInstanceKubeConfig{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(virtualClusterInstanceName). + SubResource("kubeconfig"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterInstanceKubeConfig). + Do(ctx). + Into(result) + return +} + +// CreateWorkloadKubeConfig takes the representation of a virtualClusterInstanceWorkloadKubeConfig and creates it. Returns the server's representation of the virtualClusterInstanceWorkloadKubeConfig, and an error, if there is any. +func (c *virtualClusterInstances) CreateWorkloadKubeConfig(ctx context.Context, virtualClusterInstanceName string, virtualClusterInstanceWorkloadKubeConfig *v1.VirtualClusterInstanceWorkloadKubeConfig, opts metav1.CreateOptions) (result *v1.VirtualClusterInstanceWorkloadKubeConfig, err error) { + result = &v1.VirtualClusterInstanceWorkloadKubeConfig{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(virtualClusterInstanceName). + SubResource("workloadkubeconfig"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterInstanceWorkloadKubeConfig). + Do(ctx). + Into(result) + return +} + +// GetWorkloadKubeConfig takes name of the virtualClusterInstance, and returns the corresponding v1.VirtualClusterInstanceWorkloadKubeConfig object, and an error if there is any. +func (c *virtualClusterInstances) GetWorkloadKubeConfig(ctx context.Context, virtualClusterInstanceName string, options metav1.GetOptions) (result *v1.VirtualClusterInstanceWorkloadKubeConfig, err error) { + result = &v1.VirtualClusterInstanceWorkloadKubeConfig{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(virtualClusterInstanceName). + SubResource("workloadkubeconfig"). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/virtualclustertemplate.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/virtualclustertemplate.go new file mode 100644 index 000000000..14a00d5ac --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1/virtualclustertemplate.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VirtualClusterTemplatesGetter has a method to return a VirtualClusterTemplateInterface. +// A group's client should implement this interface. +type VirtualClusterTemplatesGetter interface { + VirtualClusterTemplates() VirtualClusterTemplateInterface +} + +// VirtualClusterTemplateInterface has methods to work with VirtualClusterTemplate resources. +type VirtualClusterTemplateInterface interface { + Create(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.CreateOptions) (*v1.VirtualClusterTemplate, error) + Update(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.UpdateOptions) (*v1.VirtualClusterTemplate, error) + UpdateStatus(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.UpdateOptions) (*v1.VirtualClusterTemplate, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualClusterTemplate, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualClusterTemplateList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualClusterTemplate, err error) + VirtualClusterTemplateExpansion +} + +// virtualClusterTemplates implements VirtualClusterTemplateInterface +type virtualClusterTemplates struct { + client rest.Interface +} + +// newVirtualClusterTemplates returns a VirtualClusterTemplates +func newVirtualClusterTemplates(c *ManagementV1Client) *virtualClusterTemplates { + return &virtualClusterTemplates{ + client: c.RESTClient(), + } +} + +// Get takes name of the virtualClusterTemplate, and returns the corresponding virtualClusterTemplate object, and an error if there is any. +func (c *virtualClusterTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualClusterTemplate, err error) { + result = &v1.VirtualClusterTemplate{} + err = c.client.Get(). + Resource("virtualclustertemplates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualClusterTemplates that match those selectors. +func (c *virtualClusterTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualClusterTemplateList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.VirtualClusterTemplateList{} + err = c.client.Get(). + Resource("virtualclustertemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualClusterTemplates. +func (c *virtualClusterTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("virtualclustertemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualClusterTemplate and creates it. Returns the server's representation of the virtualClusterTemplate, and an error, if there is any. +func (c *virtualClusterTemplates) Create(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.CreateOptions) (result *v1.VirtualClusterTemplate, err error) { + result = &v1.VirtualClusterTemplate{} + err = c.client.Post(). + Resource("virtualclustertemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterTemplate). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualClusterTemplate and updates it. Returns the server's representation of the virtualClusterTemplate, and an error, if there is any. +func (c *virtualClusterTemplates) Update(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.UpdateOptions) (result *v1.VirtualClusterTemplate, err error) { + result = &v1.VirtualClusterTemplate{} + err = c.client.Put(). + Resource("virtualclustertemplates"). + Name(virtualClusterTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterTemplate). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *virtualClusterTemplates) UpdateStatus(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.UpdateOptions) (result *v1.VirtualClusterTemplate, err error) { + result = &v1.VirtualClusterTemplate{} + err = c.client.Put(). + Resource("virtualclustertemplates"). + Name(virtualClusterTemplate.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterTemplate). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualClusterTemplate and deletes it. Returns an error if one occurs. +func (c *virtualClusterTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("virtualclustertemplates"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualClusterTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("virtualclustertemplates"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualClusterTemplate. +func (c *virtualClusterTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualClusterTemplate, err error) { + result = &v1.VirtualClusterTemplate{} + err = c.client.Patch(pt). + Resource("virtualclustertemplates"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/accesskey.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/accesskey.go new file mode 100644 index 000000000..72bc0825d --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/accesskey.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// AccessKeysGetter has a method to return a AccessKeyInterface. +// A group's client should implement this interface. +type AccessKeysGetter interface { + AccessKeys() AccessKeyInterface +} + +// AccessKeyInterface has methods to work with AccessKey resources. +type AccessKeyInterface interface { + Create(ctx context.Context, accessKey *v1.AccessKey, opts metav1.CreateOptions) (*v1.AccessKey, error) + Update(ctx context.Context, accessKey *v1.AccessKey, opts metav1.UpdateOptions) (*v1.AccessKey, error) + UpdateStatus(ctx context.Context, accessKey *v1.AccessKey, opts metav1.UpdateOptions) (*v1.AccessKey, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.AccessKey, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.AccessKeyList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.AccessKey, err error) + AccessKeyExpansion +} + +// accessKeys implements AccessKeyInterface +type accessKeys struct { + client rest.Interface +} + +// newAccessKeys returns a AccessKeys +func newAccessKeys(c *StorageV1Client) *accessKeys { + return &accessKeys{ + client: c.RESTClient(), + } +} + +// Get takes name of the accessKey, and returns the corresponding accessKey object, and an error if there is any. +func (c *accessKeys) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.AccessKey, err error) { + result = &v1.AccessKey{} + err = c.client.Get(). + Resource("accesskeys"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of AccessKeys that match those selectors. +func (c *accessKeys) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AccessKeyList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.AccessKeyList{} + err = c.client.Get(). + Resource("accesskeys"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested accessKeys. +func (c *accessKeys) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("accesskeys"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a accessKey and creates it. Returns the server's representation of the accessKey, and an error, if there is any. +func (c *accessKeys) Create(ctx context.Context, accessKey *v1.AccessKey, opts metav1.CreateOptions) (result *v1.AccessKey, err error) { + result = &v1.AccessKey{} + err = c.client.Post(). + Resource("accesskeys"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(accessKey). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a accessKey and updates it. Returns the server's representation of the accessKey, and an error, if there is any. +func (c *accessKeys) Update(ctx context.Context, accessKey *v1.AccessKey, opts metav1.UpdateOptions) (result *v1.AccessKey, err error) { + result = &v1.AccessKey{} + err = c.client.Put(). + Resource("accesskeys"). + Name(accessKey.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(accessKey). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *accessKeys) UpdateStatus(ctx context.Context, accessKey *v1.AccessKey, opts metav1.UpdateOptions) (result *v1.AccessKey, err error) { + result = &v1.AccessKey{} + err = c.client.Put(). + Resource("accesskeys"). + Name(accessKey.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(accessKey). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the accessKey and deletes it. Returns an error if one occurs. +func (c *accessKeys) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("accesskeys"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *accessKeys) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("accesskeys"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched accessKey. +func (c *accessKeys) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.AccessKey, err error) { + result = &v1.AccessKey{} + err = c.client.Patch(pt). + Resource("accesskeys"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/app.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/app.go new file mode 100644 index 000000000..a9e0a9db9 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/app.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// AppsGetter has a method to return a AppInterface. +// A group's client should implement this interface. +type AppsGetter interface { + Apps() AppInterface +} + +// AppInterface has methods to work with App resources. +type AppInterface interface { + Create(ctx context.Context, app *v1.App, opts metav1.CreateOptions) (*v1.App, error) + Update(ctx context.Context, app *v1.App, opts metav1.UpdateOptions) (*v1.App, error) + UpdateStatus(ctx context.Context, app *v1.App, opts metav1.UpdateOptions) (*v1.App, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.App, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.AppList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.App, err error) + AppExpansion +} + +// apps implements AppInterface +type apps struct { + client rest.Interface +} + +// newApps returns a Apps +func newApps(c *StorageV1Client) *apps { + return &apps{ + client: c.RESTClient(), + } +} + +// Get takes name of the app, and returns the corresponding app object, and an error if there is any. +func (c *apps) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.App, err error) { + result = &v1.App{} + err = c.client.Get(). + Resource("apps"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Apps that match those selectors. +func (c *apps) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AppList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.AppList{} + err = c.client.Get(). + Resource("apps"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested apps. +func (c *apps) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("apps"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a app and creates it. Returns the server's representation of the app, and an error, if there is any. +func (c *apps) Create(ctx context.Context, app *v1.App, opts metav1.CreateOptions) (result *v1.App, err error) { + result = &v1.App{} + err = c.client.Post(). + Resource("apps"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(app). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a app and updates it. Returns the server's representation of the app, and an error, if there is any. +func (c *apps) Update(ctx context.Context, app *v1.App, opts metav1.UpdateOptions) (result *v1.App, err error) { + result = &v1.App{} + err = c.client.Put(). + Resource("apps"). + Name(app.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(app). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *apps) UpdateStatus(ctx context.Context, app *v1.App, opts metav1.UpdateOptions) (result *v1.App, err error) { + result = &v1.App{} + err = c.client.Put(). + Resource("apps"). + Name(app.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(app). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the app and deletes it. Returns an error if one occurs. +func (c *apps) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("apps"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *apps) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("apps"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched app. +func (c *apps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.App, err error) { + result = &v1.App{} + err = c.client.Patch(pt). + Resource("apps"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/cluster.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/cluster.go new file mode 100644 index 000000000..3fcec5e85 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/cluster.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ClustersGetter has a method to return a ClusterInterface. +// A group's client should implement this interface. +type ClustersGetter interface { + Clusters() ClusterInterface +} + +// ClusterInterface has methods to work with Cluster resources. +type ClusterInterface interface { + Create(ctx context.Context, cluster *v1.Cluster, opts metav1.CreateOptions) (*v1.Cluster, error) + Update(ctx context.Context, cluster *v1.Cluster, opts metav1.UpdateOptions) (*v1.Cluster, error) + UpdateStatus(ctx context.Context, cluster *v1.Cluster, opts metav1.UpdateOptions) (*v1.Cluster, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Cluster, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Cluster, err error) + ClusterExpansion +} + +// clusters implements ClusterInterface +type clusters struct { + client rest.Interface +} + +// newClusters returns a Clusters +func newClusters(c *StorageV1Client) *clusters { + return &clusters{ + client: c.RESTClient(), + } +} + +// Get takes name of the cluster, and returns the corresponding cluster object, and an error if there is any. +func (c *clusters) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Cluster, err error) { + result = &v1.Cluster{} + err = c.client.Get(). + Resource("clusters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Clusters that match those selectors. +func (c *clusters) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ClusterList{} + err = c.client.Get(). + Resource("clusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusters. +func (c *clusters) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("clusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cluster and creates it. Returns the server's representation of the cluster, and an error, if there is any. +func (c *clusters) Create(ctx context.Context, cluster *v1.Cluster, opts metav1.CreateOptions) (result *v1.Cluster, err error) { + result = &v1.Cluster{} + err = c.client.Post(). + Resource("clusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cluster). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cluster and updates it. Returns the server's representation of the cluster, and an error, if there is any. +func (c *clusters) Update(ctx context.Context, cluster *v1.Cluster, opts metav1.UpdateOptions) (result *v1.Cluster, err error) { + result = &v1.Cluster{} + err = c.client.Put(). + Resource("clusters"). + Name(cluster.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cluster). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *clusters) UpdateStatus(ctx context.Context, cluster *v1.Cluster, opts metav1.UpdateOptions) (result *v1.Cluster, err error) { + result = &v1.Cluster{} + err = c.client.Put(). + Resource("clusters"). + Name(cluster.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cluster). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cluster and deletes it. Returns an error if one occurs. +func (c *clusters) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusters"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusters) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("clusters"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cluster. +func (c *clusters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Cluster, err error) { + result = &v1.Cluster{} + err = c.client.Patch(pt). + Resource("clusters"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/clusteraccess.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/clusteraccess.go new file mode 100644 index 000000000..269b0a653 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/clusteraccess.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ClusterAccessesGetter has a method to return a ClusterAccessInterface. +// A group's client should implement this interface. +type ClusterAccessesGetter interface { + ClusterAccesses() ClusterAccessInterface +} + +// ClusterAccessInterface has methods to work with ClusterAccess resources. +type ClusterAccessInterface interface { + Create(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.CreateOptions) (*v1.ClusterAccess, error) + Update(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.UpdateOptions) (*v1.ClusterAccess, error) + UpdateStatus(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.UpdateOptions) (*v1.ClusterAccess, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterAccess, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterAccessList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterAccess, err error) + ClusterAccessExpansion +} + +// clusterAccesses implements ClusterAccessInterface +type clusterAccesses struct { + client rest.Interface +} + +// newClusterAccesses returns a ClusterAccesses +func newClusterAccesses(c *StorageV1Client) *clusterAccesses { + return &clusterAccesses{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterAccess, and returns the corresponding clusterAccess object, and an error if there is any. +func (c *clusterAccesses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterAccess, err error) { + result = &v1.ClusterAccess{} + err = c.client.Get(). + Resource("clusteraccesses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterAccesses that match those selectors. +func (c *clusterAccesses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterAccessList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ClusterAccessList{} + err = c.client.Get(). + Resource("clusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterAccesses. +func (c *clusterAccesses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("clusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a clusterAccess and creates it. Returns the server's representation of the clusterAccess, and an error, if there is any. +func (c *clusterAccesses) Create(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.CreateOptions) (result *v1.ClusterAccess, err error) { + result = &v1.ClusterAccess{} + err = c.client.Post(). + Resource("clusteraccesses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterAccess). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a clusterAccess and updates it. Returns the server's representation of the clusterAccess, and an error, if there is any. +func (c *clusterAccesses) Update(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.UpdateOptions) (result *v1.ClusterAccess, err error) { + result = &v1.ClusterAccess{} + err = c.client.Put(). + Resource("clusteraccesses"). + Name(clusterAccess.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterAccess). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *clusterAccesses) UpdateStatus(ctx context.Context, clusterAccess *v1.ClusterAccess, opts metav1.UpdateOptions) (result *v1.ClusterAccess, err error) { + result = &v1.ClusterAccess{} + err = c.client.Put(). + Resource("clusteraccesses"). + Name(clusterAccess.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterAccess). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the clusterAccess and deletes it. Returns an error if one occurs. +func (c *clusterAccesses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusteraccesses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterAccesses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("clusteraccesses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched clusterAccess. +func (c *clusterAccesses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterAccess, err error) { + result = &v1.ClusterAccess{} + err = c.client.Patch(pt). + Resource("clusteraccesses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/clusterroletemplate.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/clusterroletemplate.go new file mode 100644 index 000000000..0aad0c12b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/clusterroletemplate.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ClusterRoleTemplatesGetter has a method to return a ClusterRoleTemplateInterface. +// A group's client should implement this interface. +type ClusterRoleTemplatesGetter interface { + ClusterRoleTemplates() ClusterRoleTemplateInterface +} + +// ClusterRoleTemplateInterface has methods to work with ClusterRoleTemplate resources. +type ClusterRoleTemplateInterface interface { + Create(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.CreateOptions) (*v1.ClusterRoleTemplate, error) + Update(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.UpdateOptions) (*v1.ClusterRoleTemplate, error) + UpdateStatus(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.UpdateOptions) (*v1.ClusterRoleTemplate, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterRoleTemplate, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterRoleTemplateList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleTemplate, err error) + ClusterRoleTemplateExpansion +} + +// clusterRoleTemplates implements ClusterRoleTemplateInterface +type clusterRoleTemplates struct { + client rest.Interface +} + +// newClusterRoleTemplates returns a ClusterRoleTemplates +func newClusterRoleTemplates(c *StorageV1Client) *clusterRoleTemplates { + return &clusterRoleTemplates{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterRoleTemplate, and returns the corresponding clusterRoleTemplate object, and an error if there is any. +func (c *clusterRoleTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterRoleTemplate, err error) { + result = &v1.ClusterRoleTemplate{} + err = c.client.Get(). + Resource("clusterroletemplates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterRoleTemplates that match those selectors. +func (c *clusterRoleTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterRoleTemplateList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ClusterRoleTemplateList{} + err = c.client.Get(). + Resource("clusterroletemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterRoleTemplates. +func (c *clusterRoleTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("clusterroletemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a clusterRoleTemplate and creates it. Returns the server's representation of the clusterRoleTemplate, and an error, if there is any. +func (c *clusterRoleTemplates) Create(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.CreateOptions) (result *v1.ClusterRoleTemplate, err error) { + result = &v1.ClusterRoleTemplate{} + err = c.client.Post(). + Resource("clusterroletemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterRoleTemplate). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a clusterRoleTemplate and updates it. Returns the server's representation of the clusterRoleTemplate, and an error, if there is any. +func (c *clusterRoleTemplates) Update(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.UpdateOptions) (result *v1.ClusterRoleTemplate, err error) { + result = &v1.ClusterRoleTemplate{} + err = c.client.Put(). + Resource("clusterroletemplates"). + Name(clusterRoleTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterRoleTemplate). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *clusterRoleTemplates) UpdateStatus(ctx context.Context, clusterRoleTemplate *v1.ClusterRoleTemplate, opts metav1.UpdateOptions) (result *v1.ClusterRoleTemplate, err error) { + result = &v1.ClusterRoleTemplate{} + err = c.client.Put(). + Resource("clusterroletemplates"). + Name(clusterRoleTemplate.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterRoleTemplate). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the clusterRoleTemplate and deletes it. Returns an error if one occurs. +func (c *clusterRoleTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterroletemplates"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterRoleTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("clusterroletemplates"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched clusterRoleTemplate. +func (c *clusterRoleTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleTemplate, err error) { + result = &v1.ClusterRoleTemplate{} + err = c.client.Patch(pt). + Resource("clusterroletemplates"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/devpodworkspaceinstance.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/devpodworkspaceinstance.go new file mode 100644 index 000000000..8199da73a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/devpodworkspaceinstance.go @@ -0,0 +1,162 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// DevPodWorkspaceInstancesGetter has a method to return a DevPodWorkspaceInstanceInterface. +// A group's client should implement this interface. +type DevPodWorkspaceInstancesGetter interface { + DevPodWorkspaceInstances(namespace string) DevPodWorkspaceInstanceInterface +} + +// DevPodWorkspaceInstanceInterface has methods to work with DevPodWorkspaceInstance resources. +type DevPodWorkspaceInstanceInterface interface { + Create(ctx context.Context, devPodWorkspaceInstance *v1.DevPodWorkspaceInstance, opts metav1.CreateOptions) (*v1.DevPodWorkspaceInstance, error) + Update(ctx context.Context, devPodWorkspaceInstance *v1.DevPodWorkspaceInstance, opts metav1.UpdateOptions) (*v1.DevPodWorkspaceInstance, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DevPodWorkspaceInstance, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.DevPodWorkspaceInstanceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DevPodWorkspaceInstance, err error) + DevPodWorkspaceInstanceExpansion +} + +// devPodWorkspaceInstances implements DevPodWorkspaceInstanceInterface +type devPodWorkspaceInstances struct { + client rest.Interface + ns string +} + +// newDevPodWorkspaceInstances returns a DevPodWorkspaceInstances +func newDevPodWorkspaceInstances(c *StorageV1Client, namespace string) *devPodWorkspaceInstances { + return &devPodWorkspaceInstances{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the devPodWorkspaceInstance, and returns the corresponding devPodWorkspaceInstance object, and an error if there is any. +func (c *devPodWorkspaceInstances) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DevPodWorkspaceInstance, err error) { + result = &v1.DevPodWorkspaceInstance{} + err = c.client.Get(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DevPodWorkspaceInstances that match those selectors. +func (c *devPodWorkspaceInstances) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DevPodWorkspaceInstanceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.DevPodWorkspaceInstanceList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested devPodWorkspaceInstances. +func (c *devPodWorkspaceInstances) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a devPodWorkspaceInstance and creates it. Returns the server's representation of the devPodWorkspaceInstance, and an error, if there is any. +func (c *devPodWorkspaceInstances) Create(ctx context.Context, devPodWorkspaceInstance *v1.DevPodWorkspaceInstance, opts metav1.CreateOptions) (result *v1.DevPodWorkspaceInstance, err error) { + result = &v1.DevPodWorkspaceInstance{} + err = c.client.Post(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(devPodWorkspaceInstance). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a devPodWorkspaceInstance and updates it. Returns the server's representation of the devPodWorkspaceInstance, and an error, if there is any. +func (c *devPodWorkspaceInstances) Update(ctx context.Context, devPodWorkspaceInstance *v1.DevPodWorkspaceInstance, opts metav1.UpdateOptions) (result *v1.DevPodWorkspaceInstance, err error) { + result = &v1.DevPodWorkspaceInstance{} + err = c.client.Put(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + Name(devPodWorkspaceInstance.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(devPodWorkspaceInstance). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the devPodWorkspaceInstance and deletes it. Returns an error if one occurs. +func (c *devPodWorkspaceInstances) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *devPodWorkspaceInstances) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched devPodWorkspaceInstance. +func (c *devPodWorkspaceInstances) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DevPodWorkspaceInstance, err error) { + result = &v1.DevPodWorkspaceInstance{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("devpodworkspaceinstances"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/devpodworkspacetemplate.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/devpodworkspacetemplate.go new file mode 100644 index 000000000..53b17b99c --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/devpodworkspacetemplate.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// DevPodWorkspaceTemplatesGetter has a method to return a DevPodWorkspaceTemplateInterface. +// A group's client should implement this interface. +type DevPodWorkspaceTemplatesGetter interface { + DevPodWorkspaceTemplates() DevPodWorkspaceTemplateInterface +} + +// DevPodWorkspaceTemplateInterface has methods to work with DevPodWorkspaceTemplate resources. +type DevPodWorkspaceTemplateInterface interface { + Create(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.CreateOptions) (*v1.DevPodWorkspaceTemplate, error) + Update(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.UpdateOptions) (*v1.DevPodWorkspaceTemplate, error) + UpdateStatus(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.UpdateOptions) (*v1.DevPodWorkspaceTemplate, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DevPodWorkspaceTemplate, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.DevPodWorkspaceTemplateList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DevPodWorkspaceTemplate, err error) + DevPodWorkspaceTemplateExpansion +} + +// devPodWorkspaceTemplates implements DevPodWorkspaceTemplateInterface +type devPodWorkspaceTemplates struct { + client rest.Interface +} + +// newDevPodWorkspaceTemplates returns a DevPodWorkspaceTemplates +func newDevPodWorkspaceTemplates(c *StorageV1Client) *devPodWorkspaceTemplates { + return &devPodWorkspaceTemplates{ + client: c.RESTClient(), + } +} + +// Get takes name of the devPodWorkspaceTemplate, and returns the corresponding devPodWorkspaceTemplate object, and an error if there is any. +func (c *devPodWorkspaceTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DevPodWorkspaceTemplate, err error) { + result = &v1.DevPodWorkspaceTemplate{} + err = c.client.Get(). + Resource("devpodworkspacetemplates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DevPodWorkspaceTemplates that match those selectors. +func (c *devPodWorkspaceTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DevPodWorkspaceTemplateList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.DevPodWorkspaceTemplateList{} + err = c.client.Get(). + Resource("devpodworkspacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested devPodWorkspaceTemplates. +func (c *devPodWorkspaceTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("devpodworkspacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a devPodWorkspaceTemplate and creates it. Returns the server's representation of the devPodWorkspaceTemplate, and an error, if there is any. +func (c *devPodWorkspaceTemplates) Create(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.CreateOptions) (result *v1.DevPodWorkspaceTemplate, err error) { + result = &v1.DevPodWorkspaceTemplate{} + err = c.client.Post(). + Resource("devpodworkspacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(devPodWorkspaceTemplate). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a devPodWorkspaceTemplate and updates it. Returns the server's representation of the devPodWorkspaceTemplate, and an error, if there is any. +func (c *devPodWorkspaceTemplates) Update(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.UpdateOptions) (result *v1.DevPodWorkspaceTemplate, err error) { + result = &v1.DevPodWorkspaceTemplate{} + err = c.client.Put(). + Resource("devpodworkspacetemplates"). + Name(devPodWorkspaceTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(devPodWorkspaceTemplate). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *devPodWorkspaceTemplates) UpdateStatus(ctx context.Context, devPodWorkspaceTemplate *v1.DevPodWorkspaceTemplate, opts metav1.UpdateOptions) (result *v1.DevPodWorkspaceTemplate, err error) { + result = &v1.DevPodWorkspaceTemplate{} + err = c.client.Put(). + Resource("devpodworkspacetemplates"). + Name(devPodWorkspaceTemplate.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(devPodWorkspaceTemplate). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the devPodWorkspaceTemplate and deletes it. Returns an error if one occurs. +func (c *devPodWorkspaceTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("devpodworkspacetemplates"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *devPodWorkspaceTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("devpodworkspacetemplates"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched devPodWorkspaceTemplate. +func (c *devPodWorkspaceTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DevPodWorkspaceTemplate, err error) { + result = &v1.DevPodWorkspaceTemplate{} + err = c.client.Patch(pt). + Resource("devpodworkspacetemplates"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/doc.go new file mode 100644 index 000000000..225e6b2be --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/generated_expansion.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/generated_expansion.go new file mode 100644 index 000000000..1a0520cbc --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/generated_expansion.go @@ -0,0 +1,39 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type AccessKeyExpansion interface{} + +type AppExpansion interface{} + +type ClusterExpansion interface{} + +type ClusterAccessExpansion interface{} + +type ClusterRoleTemplateExpansion interface{} + +type DevPodWorkspaceInstanceExpansion interface{} + +type DevPodWorkspaceTemplateExpansion interface{} + +type ProjectExpansion interface{} + +type RunnerExpansion interface{} + +type SharedSecretExpansion interface{} + +type SpaceConstraintExpansion interface{} + +type SpaceInstanceExpansion interface{} + +type SpaceTemplateExpansion interface{} + +type TaskExpansion interface{} + +type TeamExpansion interface{} + +type UserExpansion interface{} + +type VirtualClusterInstanceExpansion interface{} + +type VirtualClusterTemplateExpansion interface{} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/project.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/project.go new file mode 100644 index 000000000..a8429f0d7 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/project.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ProjectsGetter has a method to return a ProjectInterface. +// A group's client should implement this interface. +type ProjectsGetter interface { + Projects() ProjectInterface +} + +// ProjectInterface has methods to work with Project resources. +type ProjectInterface interface { + Create(ctx context.Context, project *v1.Project, opts metav1.CreateOptions) (*v1.Project, error) + Update(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (*v1.Project, error) + UpdateStatus(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (*v1.Project, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Project, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ProjectList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Project, err error) + ProjectExpansion +} + +// projects implements ProjectInterface +type projects struct { + client rest.Interface +} + +// newProjects returns a Projects +func newProjects(c *StorageV1Client) *projects { + return &projects{ + client: c.RESTClient(), + } +} + +// Get takes name of the project, and returns the corresponding project object, and an error if there is any. +func (c *projects) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Get(). + Resource("projects"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Projects that match those selectors. +func (c *projects) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ProjectList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ProjectList{} + err = c.client.Get(). + Resource("projects"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested projects. +func (c *projects) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("projects"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a project and creates it. Returns the server's representation of the project, and an error, if there is any. +func (c *projects) Create(ctx context.Context, project *v1.Project, opts metav1.CreateOptions) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Post(). + Resource("projects"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(project). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a project and updates it. Returns the server's representation of the project, and an error, if there is any. +func (c *projects) Update(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Put(). + Resource("projects"). + Name(project.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(project). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *projects) UpdateStatus(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Put(). + Resource("projects"). + Name(project.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(project). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the project and deletes it. Returns an error if one occurs. +func (c *projects) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("projects"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *projects) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("projects"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched project. +func (c *projects) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Patch(pt). + Resource("projects"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/runner.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/runner.go new file mode 100644 index 000000000..2efa7699a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/runner.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// RunnersGetter has a method to return a RunnerInterface. +// A group's client should implement this interface. +type RunnersGetter interface { + Runners() RunnerInterface +} + +// RunnerInterface has methods to work with Runner resources. +type RunnerInterface interface { + Create(ctx context.Context, runner *v1.Runner, opts metav1.CreateOptions) (*v1.Runner, error) + Update(ctx context.Context, runner *v1.Runner, opts metav1.UpdateOptions) (*v1.Runner, error) + UpdateStatus(ctx context.Context, runner *v1.Runner, opts metav1.UpdateOptions) (*v1.Runner, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Runner, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.RunnerList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Runner, err error) + RunnerExpansion +} + +// runners implements RunnerInterface +type runners struct { + client rest.Interface +} + +// newRunners returns a Runners +func newRunners(c *StorageV1Client) *runners { + return &runners{ + client: c.RESTClient(), + } +} + +// Get takes name of the runner, and returns the corresponding runner object, and an error if there is any. +func (c *runners) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Runner, err error) { + result = &v1.Runner{} + err = c.client.Get(). + Resource("runners"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Runners that match those selectors. +func (c *runners) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RunnerList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.RunnerList{} + err = c.client.Get(). + Resource("runners"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested runners. +func (c *runners) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("runners"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a runner and creates it. Returns the server's representation of the runner, and an error, if there is any. +func (c *runners) Create(ctx context.Context, runner *v1.Runner, opts metav1.CreateOptions) (result *v1.Runner, err error) { + result = &v1.Runner{} + err = c.client.Post(). + Resource("runners"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(runner). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a runner and updates it. Returns the server's representation of the runner, and an error, if there is any. +func (c *runners) Update(ctx context.Context, runner *v1.Runner, opts metav1.UpdateOptions) (result *v1.Runner, err error) { + result = &v1.Runner{} + err = c.client.Put(). + Resource("runners"). + Name(runner.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(runner). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *runners) UpdateStatus(ctx context.Context, runner *v1.Runner, opts metav1.UpdateOptions) (result *v1.Runner, err error) { + result = &v1.Runner{} + err = c.client.Put(). + Resource("runners"). + Name(runner.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(runner). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the runner and deletes it. Returns an error if one occurs. +func (c *runners) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("runners"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *runners) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("runners"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched runner. +func (c *runners) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Runner, err error) { + result = &v1.Runner{} + err = c.client.Patch(pt). + Resource("runners"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/sharedsecret.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/sharedsecret.go new file mode 100644 index 000000000..7c7840cdd --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/sharedsecret.go @@ -0,0 +1,179 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SharedSecretsGetter has a method to return a SharedSecretInterface. +// A group's client should implement this interface. +type SharedSecretsGetter interface { + SharedSecrets(namespace string) SharedSecretInterface +} + +// SharedSecretInterface has methods to work with SharedSecret resources. +type SharedSecretInterface interface { + Create(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.CreateOptions) (*v1.SharedSecret, error) + Update(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.UpdateOptions) (*v1.SharedSecret, error) + UpdateStatus(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.UpdateOptions) (*v1.SharedSecret, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SharedSecret, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SharedSecretList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SharedSecret, err error) + SharedSecretExpansion +} + +// sharedSecrets implements SharedSecretInterface +type sharedSecrets struct { + client rest.Interface + ns string +} + +// newSharedSecrets returns a SharedSecrets +func newSharedSecrets(c *StorageV1Client, namespace string) *sharedSecrets { + return &sharedSecrets{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the sharedSecret, and returns the corresponding sharedSecret object, and an error if there is any. +func (c *sharedSecrets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SharedSecret, err error) { + result = &v1.SharedSecret{} + err = c.client.Get(). + Namespace(c.ns). + Resource("sharedsecrets"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SharedSecrets that match those selectors. +func (c *sharedSecrets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SharedSecretList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SharedSecretList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("sharedsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested sharedSecrets. +func (c *sharedSecrets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("sharedsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a sharedSecret and creates it. Returns the server's representation of the sharedSecret, and an error, if there is any. +func (c *sharedSecrets) Create(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.CreateOptions) (result *v1.SharedSecret, err error) { + result = &v1.SharedSecret{} + err = c.client.Post(). + Namespace(c.ns). + Resource("sharedsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedSecret). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a sharedSecret and updates it. Returns the server's representation of the sharedSecret, and an error, if there is any. +func (c *sharedSecrets) Update(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.UpdateOptions) (result *v1.SharedSecret, err error) { + result = &v1.SharedSecret{} + err = c.client.Put(). + Namespace(c.ns). + Resource("sharedsecrets"). + Name(sharedSecret.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedSecret). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *sharedSecrets) UpdateStatus(ctx context.Context, sharedSecret *v1.SharedSecret, opts metav1.UpdateOptions) (result *v1.SharedSecret, err error) { + result = &v1.SharedSecret{} + err = c.client.Put(). + Namespace(c.ns). + Resource("sharedsecrets"). + Name(sharedSecret.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedSecret). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the sharedSecret and deletes it. Returns an error if one occurs. +func (c *sharedSecrets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("sharedsecrets"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *sharedSecrets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("sharedsecrets"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched sharedSecret. +func (c *sharedSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SharedSecret, err error) { + result = &v1.SharedSecret{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("sharedsecrets"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/spaceconstraint.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/spaceconstraint.go new file mode 100644 index 000000000..ac4a721e7 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/spaceconstraint.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SpaceConstraintsGetter has a method to return a SpaceConstraintInterface. +// A group's client should implement this interface. +type SpaceConstraintsGetter interface { + SpaceConstraints() SpaceConstraintInterface +} + +// SpaceConstraintInterface has methods to work with SpaceConstraint resources. +type SpaceConstraintInterface interface { + Create(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.CreateOptions) (*v1.SpaceConstraint, error) + Update(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.UpdateOptions) (*v1.SpaceConstraint, error) + UpdateStatus(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.UpdateOptions) (*v1.SpaceConstraint, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SpaceConstraint, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SpaceConstraintList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceConstraint, err error) + SpaceConstraintExpansion +} + +// spaceConstraints implements SpaceConstraintInterface +type spaceConstraints struct { + client rest.Interface +} + +// newSpaceConstraints returns a SpaceConstraints +func newSpaceConstraints(c *StorageV1Client) *spaceConstraints { + return &spaceConstraints{ + client: c.RESTClient(), + } +} + +// Get takes name of the spaceConstraint, and returns the corresponding spaceConstraint object, and an error if there is any. +func (c *spaceConstraints) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SpaceConstraint, err error) { + result = &v1.SpaceConstraint{} + err = c.client.Get(). + Resource("spaceconstraints"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SpaceConstraints that match those selectors. +func (c *spaceConstraints) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SpaceConstraintList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SpaceConstraintList{} + err = c.client.Get(). + Resource("spaceconstraints"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested spaceConstraints. +func (c *spaceConstraints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("spaceconstraints"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a spaceConstraint and creates it. Returns the server's representation of the spaceConstraint, and an error, if there is any. +func (c *spaceConstraints) Create(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.CreateOptions) (result *v1.SpaceConstraint, err error) { + result = &v1.SpaceConstraint{} + err = c.client.Post(). + Resource("spaceconstraints"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceConstraint). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a spaceConstraint and updates it. Returns the server's representation of the spaceConstraint, and an error, if there is any. +func (c *spaceConstraints) Update(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.UpdateOptions) (result *v1.SpaceConstraint, err error) { + result = &v1.SpaceConstraint{} + err = c.client.Put(). + Resource("spaceconstraints"). + Name(spaceConstraint.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceConstraint). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *spaceConstraints) UpdateStatus(ctx context.Context, spaceConstraint *v1.SpaceConstraint, opts metav1.UpdateOptions) (result *v1.SpaceConstraint, err error) { + result = &v1.SpaceConstraint{} + err = c.client.Put(). + Resource("spaceconstraints"). + Name(spaceConstraint.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceConstraint). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the spaceConstraint and deletes it. Returns an error if one occurs. +func (c *spaceConstraints) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("spaceconstraints"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *spaceConstraints) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("spaceconstraints"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched spaceConstraint. +func (c *spaceConstraints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceConstraint, err error) { + result = &v1.SpaceConstraint{} + err = c.client.Patch(pt). + Resource("spaceconstraints"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/spaceinstance.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/spaceinstance.go new file mode 100644 index 000000000..c9b57da96 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/spaceinstance.go @@ -0,0 +1,179 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SpaceInstancesGetter has a method to return a SpaceInstanceInterface. +// A group's client should implement this interface. +type SpaceInstancesGetter interface { + SpaceInstances(namespace string) SpaceInstanceInterface +} + +// SpaceInstanceInterface has methods to work with SpaceInstance resources. +type SpaceInstanceInterface interface { + Create(ctx context.Context, spaceInstance *v1.SpaceInstance, opts metav1.CreateOptions) (*v1.SpaceInstance, error) + Update(ctx context.Context, spaceInstance *v1.SpaceInstance, opts metav1.UpdateOptions) (*v1.SpaceInstance, error) + UpdateStatus(ctx context.Context, spaceInstance *v1.SpaceInstance, opts metav1.UpdateOptions) (*v1.SpaceInstance, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SpaceInstance, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SpaceInstanceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceInstance, err error) + SpaceInstanceExpansion +} + +// spaceInstances implements SpaceInstanceInterface +type spaceInstances struct { + client rest.Interface + ns string +} + +// newSpaceInstances returns a SpaceInstances +func newSpaceInstances(c *StorageV1Client, namespace string) *spaceInstances { + return &spaceInstances{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the spaceInstance, and returns the corresponding spaceInstance object, and an error if there is any. +func (c *spaceInstances) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SpaceInstance, err error) { + result = &v1.SpaceInstance{} + err = c.client.Get(). + Namespace(c.ns). + Resource("spaceinstances"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SpaceInstances that match those selectors. +func (c *spaceInstances) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SpaceInstanceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SpaceInstanceList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("spaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested spaceInstances. +func (c *spaceInstances) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("spaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a spaceInstance and creates it. Returns the server's representation of the spaceInstance, and an error, if there is any. +func (c *spaceInstances) Create(ctx context.Context, spaceInstance *v1.SpaceInstance, opts metav1.CreateOptions) (result *v1.SpaceInstance, err error) { + result = &v1.SpaceInstance{} + err = c.client.Post(). + Namespace(c.ns). + Resource("spaceinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceInstance). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a spaceInstance and updates it. Returns the server's representation of the spaceInstance, and an error, if there is any. +func (c *spaceInstances) Update(ctx context.Context, spaceInstance *v1.SpaceInstance, opts metav1.UpdateOptions) (result *v1.SpaceInstance, err error) { + result = &v1.SpaceInstance{} + err = c.client.Put(). + Namespace(c.ns). + Resource("spaceinstances"). + Name(spaceInstance.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceInstance). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *spaceInstances) UpdateStatus(ctx context.Context, spaceInstance *v1.SpaceInstance, opts metav1.UpdateOptions) (result *v1.SpaceInstance, err error) { + result = &v1.SpaceInstance{} + err = c.client.Put(). + Namespace(c.ns). + Resource("spaceinstances"). + Name(spaceInstance.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceInstance). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the spaceInstance and deletes it. Returns an error if one occurs. +func (c *spaceInstances) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("spaceinstances"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *spaceInstances) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("spaceinstances"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched spaceInstance. +func (c *spaceInstances) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceInstance, err error) { + result = &v1.SpaceInstance{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("spaceinstances"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/spacetemplate.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/spacetemplate.go new file mode 100644 index 000000000..7f51c2eb7 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/spacetemplate.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SpaceTemplatesGetter has a method to return a SpaceTemplateInterface. +// A group's client should implement this interface. +type SpaceTemplatesGetter interface { + SpaceTemplates() SpaceTemplateInterface +} + +// SpaceTemplateInterface has methods to work with SpaceTemplate resources. +type SpaceTemplateInterface interface { + Create(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.CreateOptions) (*v1.SpaceTemplate, error) + Update(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.UpdateOptions) (*v1.SpaceTemplate, error) + UpdateStatus(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.UpdateOptions) (*v1.SpaceTemplate, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SpaceTemplate, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SpaceTemplateList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceTemplate, err error) + SpaceTemplateExpansion +} + +// spaceTemplates implements SpaceTemplateInterface +type spaceTemplates struct { + client rest.Interface +} + +// newSpaceTemplates returns a SpaceTemplates +func newSpaceTemplates(c *StorageV1Client) *spaceTemplates { + return &spaceTemplates{ + client: c.RESTClient(), + } +} + +// Get takes name of the spaceTemplate, and returns the corresponding spaceTemplate object, and an error if there is any. +func (c *spaceTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SpaceTemplate, err error) { + result = &v1.SpaceTemplate{} + err = c.client.Get(). + Resource("spacetemplates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SpaceTemplates that match those selectors. +func (c *spaceTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SpaceTemplateList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.SpaceTemplateList{} + err = c.client.Get(). + Resource("spacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested spaceTemplates. +func (c *spaceTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("spacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a spaceTemplate and creates it. Returns the server's representation of the spaceTemplate, and an error, if there is any. +func (c *spaceTemplates) Create(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.CreateOptions) (result *v1.SpaceTemplate, err error) { + result = &v1.SpaceTemplate{} + err = c.client.Post(). + Resource("spacetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceTemplate). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a spaceTemplate and updates it. Returns the server's representation of the spaceTemplate, and an error, if there is any. +func (c *spaceTemplates) Update(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.UpdateOptions) (result *v1.SpaceTemplate, err error) { + result = &v1.SpaceTemplate{} + err = c.client.Put(). + Resource("spacetemplates"). + Name(spaceTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceTemplate). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *spaceTemplates) UpdateStatus(ctx context.Context, spaceTemplate *v1.SpaceTemplate, opts metav1.UpdateOptions) (result *v1.SpaceTemplate, err error) { + result = &v1.SpaceTemplate{} + err = c.client.Put(). + Resource("spacetemplates"). + Name(spaceTemplate.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(spaceTemplate). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the spaceTemplate and deletes it. Returns an error if one occurs. +func (c *spaceTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("spacetemplates"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *spaceTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("spacetemplates"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched spaceTemplate. +func (c *spaceTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SpaceTemplate, err error) { + result = &v1.SpaceTemplate{} + err = c.client.Patch(pt). + Resource("spacetemplates"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/storage_client.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/storage_client.go new file mode 100644 index 000000000..9314e2ffe --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/storage_client.go @@ -0,0 +1,176 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "net/http" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + rest "k8s.io/client-go/rest" +) + +type StorageV1Interface interface { + RESTClient() rest.Interface + AccessKeysGetter + AppsGetter + ClustersGetter + ClusterAccessesGetter + ClusterRoleTemplatesGetter + DevPodWorkspaceInstancesGetter + DevPodWorkspaceTemplatesGetter + ProjectsGetter + RunnersGetter + SharedSecretsGetter + SpaceConstraintsGetter + SpaceInstancesGetter + SpaceTemplatesGetter + TasksGetter + TeamsGetter + UsersGetter + VirtualClusterInstancesGetter + VirtualClusterTemplatesGetter +} + +// StorageV1Client is used to interact with features provided by the storage.loft.sh group. +type StorageV1Client struct { + restClient rest.Interface +} + +func (c *StorageV1Client) AccessKeys() AccessKeyInterface { + return newAccessKeys(c) +} + +func (c *StorageV1Client) Apps() AppInterface { + return newApps(c) +} + +func (c *StorageV1Client) Clusters() ClusterInterface { + return newClusters(c) +} + +func (c *StorageV1Client) ClusterAccesses() ClusterAccessInterface { + return newClusterAccesses(c) +} + +func (c *StorageV1Client) ClusterRoleTemplates() ClusterRoleTemplateInterface { + return newClusterRoleTemplates(c) +} + +func (c *StorageV1Client) DevPodWorkspaceInstances(namespace string) DevPodWorkspaceInstanceInterface { + return newDevPodWorkspaceInstances(c, namespace) +} + +func (c *StorageV1Client) DevPodWorkspaceTemplates() DevPodWorkspaceTemplateInterface { + return newDevPodWorkspaceTemplates(c) +} + +func (c *StorageV1Client) Projects() ProjectInterface { + return newProjects(c) +} + +func (c *StorageV1Client) Runners() RunnerInterface { + return newRunners(c) +} + +func (c *StorageV1Client) SharedSecrets(namespace string) SharedSecretInterface { + return newSharedSecrets(c, namespace) +} + +func (c *StorageV1Client) SpaceConstraints() SpaceConstraintInterface { + return newSpaceConstraints(c) +} + +func (c *StorageV1Client) SpaceInstances(namespace string) SpaceInstanceInterface { + return newSpaceInstances(c, namespace) +} + +func (c *StorageV1Client) SpaceTemplates() SpaceTemplateInterface { + return newSpaceTemplates(c) +} + +func (c *StorageV1Client) Tasks() TaskInterface { + return newTasks(c) +} + +func (c *StorageV1Client) Teams() TeamInterface { + return newTeams(c) +} + +func (c *StorageV1Client) Users() UserInterface { + return newUsers(c) +} + +func (c *StorageV1Client) VirtualClusterInstances(namespace string) VirtualClusterInstanceInterface { + return newVirtualClusterInstances(c, namespace) +} + +func (c *StorageV1Client) VirtualClusterTemplates() VirtualClusterTemplateInterface { + return newVirtualClusterTemplates(c) +} + +// NewForConfig creates a new StorageV1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*StorageV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new StorageV1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*StorageV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &StorageV1Client{client}, nil +} + +// NewForConfigOrDie creates a new StorageV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *StorageV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new StorageV1Client for the given RESTClient. +func New(c rest.Interface) *StorageV1Client { + return &StorageV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *StorageV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/task.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/task.go new file mode 100644 index 000000000..b16ee782a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/task.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// TasksGetter has a method to return a TaskInterface. +// A group's client should implement this interface. +type TasksGetter interface { + Tasks() TaskInterface +} + +// TaskInterface has methods to work with Task resources. +type TaskInterface interface { + Create(ctx context.Context, task *v1.Task, opts metav1.CreateOptions) (*v1.Task, error) + Update(ctx context.Context, task *v1.Task, opts metav1.UpdateOptions) (*v1.Task, error) + UpdateStatus(ctx context.Context, task *v1.Task, opts metav1.UpdateOptions) (*v1.Task, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Task, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.TaskList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Task, err error) + TaskExpansion +} + +// tasks implements TaskInterface +type tasks struct { + client rest.Interface +} + +// newTasks returns a Tasks +func newTasks(c *StorageV1Client) *tasks { + return &tasks{ + client: c.RESTClient(), + } +} + +// Get takes name of the task, and returns the corresponding task object, and an error if there is any. +func (c *tasks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Task, err error) { + result = &v1.Task{} + err = c.client.Get(). + Resource("tasks"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Tasks that match those selectors. +func (c *tasks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TaskList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.TaskList{} + err = c.client.Get(). + Resource("tasks"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested tasks. +func (c *tasks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("tasks"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a task and creates it. Returns the server's representation of the task, and an error, if there is any. +func (c *tasks) Create(ctx context.Context, task *v1.Task, opts metav1.CreateOptions) (result *v1.Task, err error) { + result = &v1.Task{} + err = c.client.Post(). + Resource("tasks"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(task). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a task and updates it. Returns the server's representation of the task, and an error, if there is any. +func (c *tasks) Update(ctx context.Context, task *v1.Task, opts metav1.UpdateOptions) (result *v1.Task, err error) { + result = &v1.Task{} + err = c.client.Put(). + Resource("tasks"). + Name(task.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(task). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *tasks) UpdateStatus(ctx context.Context, task *v1.Task, opts metav1.UpdateOptions) (result *v1.Task, err error) { + result = &v1.Task{} + err = c.client.Put(). + Resource("tasks"). + Name(task.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(task). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the task and deletes it. Returns an error if one occurs. +func (c *tasks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("tasks"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *tasks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("tasks"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched task. +func (c *tasks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Task, err error) { + result = &v1.Task{} + err = c.client.Patch(pt). + Resource("tasks"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/team.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/team.go new file mode 100644 index 000000000..b4aeddc4f --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/team.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// TeamsGetter has a method to return a TeamInterface. +// A group's client should implement this interface. +type TeamsGetter interface { + Teams() TeamInterface +} + +// TeamInterface has methods to work with Team resources. +type TeamInterface interface { + Create(ctx context.Context, team *v1.Team, opts metav1.CreateOptions) (*v1.Team, error) + Update(ctx context.Context, team *v1.Team, opts metav1.UpdateOptions) (*v1.Team, error) + UpdateStatus(ctx context.Context, team *v1.Team, opts metav1.UpdateOptions) (*v1.Team, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Team, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.TeamList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Team, err error) + TeamExpansion +} + +// teams implements TeamInterface +type teams struct { + client rest.Interface +} + +// newTeams returns a Teams +func newTeams(c *StorageV1Client) *teams { + return &teams{ + client: c.RESTClient(), + } +} + +// Get takes name of the team, and returns the corresponding team object, and an error if there is any. +func (c *teams) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Team, err error) { + result = &v1.Team{} + err = c.client.Get(). + Resource("teams"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Teams that match those selectors. +func (c *teams) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TeamList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.TeamList{} + err = c.client.Get(). + Resource("teams"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested teams. +func (c *teams) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("teams"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a team and creates it. Returns the server's representation of the team, and an error, if there is any. +func (c *teams) Create(ctx context.Context, team *v1.Team, opts metav1.CreateOptions) (result *v1.Team, err error) { + result = &v1.Team{} + err = c.client.Post(). + Resource("teams"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(team). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a team and updates it. Returns the server's representation of the team, and an error, if there is any. +func (c *teams) Update(ctx context.Context, team *v1.Team, opts metav1.UpdateOptions) (result *v1.Team, err error) { + result = &v1.Team{} + err = c.client.Put(). + Resource("teams"). + Name(team.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(team). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *teams) UpdateStatus(ctx context.Context, team *v1.Team, opts metav1.UpdateOptions) (result *v1.Team, err error) { + result = &v1.Team{} + err = c.client.Put(). + Resource("teams"). + Name(team.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(team). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the team and deletes it. Returns an error if one occurs. +func (c *teams) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("teams"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *teams) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("teams"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched team. +func (c *teams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Team, err error) { + result = &v1.Team{} + err = c.client.Patch(pt). + Resource("teams"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/user.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/user.go new file mode 100644 index 000000000..9d4eb5edc --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/user.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// UsersGetter has a method to return a UserInterface. +// A group's client should implement this interface. +type UsersGetter interface { + Users() UserInterface +} + +// UserInterface has methods to work with User resources. +type UserInterface interface { + Create(ctx context.Context, user *v1.User, opts metav1.CreateOptions) (*v1.User, error) + Update(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) (*v1.User, error) + UpdateStatus(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) (*v1.User, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.User, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.UserList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.User, err error) + UserExpansion +} + +// users implements UserInterface +type users struct { + client rest.Interface +} + +// newUsers returns a Users +func newUsers(c *StorageV1Client) *users { + return &users{ + client: c.RESTClient(), + } +} + +// Get takes name of the user, and returns the corresponding user object, and an error if there is any. +func (c *users) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.User, err error) { + result = &v1.User{} + err = c.client.Get(). + Resource("users"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Users that match those selectors. +func (c *users) List(ctx context.Context, opts metav1.ListOptions) (result *v1.UserList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.UserList{} + err = c.client.Get(). + Resource("users"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested users. +func (c *users) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("users"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a user and creates it. Returns the server's representation of the user, and an error, if there is any. +func (c *users) Create(ctx context.Context, user *v1.User, opts metav1.CreateOptions) (result *v1.User, err error) { + result = &v1.User{} + err = c.client.Post(). + Resource("users"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(user). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a user and updates it. Returns the server's representation of the user, and an error, if there is any. +func (c *users) Update(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) (result *v1.User, err error) { + result = &v1.User{} + err = c.client.Put(). + Resource("users"). + Name(user.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(user). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *users) UpdateStatus(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) (result *v1.User, err error) { + result = &v1.User{} + err = c.client.Put(). + Resource("users"). + Name(user.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(user). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the user and deletes it. Returns an error if one occurs. +func (c *users) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("users"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *users) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("users"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched user. +func (c *users) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.User, err error) { + result = &v1.User{} + err = c.client.Patch(pt). + Resource("users"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/virtualclusterinstance.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/virtualclusterinstance.go new file mode 100644 index 000000000..57a8a2c78 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/virtualclusterinstance.go @@ -0,0 +1,162 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VirtualClusterInstancesGetter has a method to return a VirtualClusterInstanceInterface. +// A group's client should implement this interface. +type VirtualClusterInstancesGetter interface { + VirtualClusterInstances(namespace string) VirtualClusterInstanceInterface +} + +// VirtualClusterInstanceInterface has methods to work with VirtualClusterInstance resources. +type VirtualClusterInstanceInterface interface { + Create(ctx context.Context, virtualClusterInstance *v1.VirtualClusterInstance, opts metav1.CreateOptions) (*v1.VirtualClusterInstance, error) + Update(ctx context.Context, virtualClusterInstance *v1.VirtualClusterInstance, opts metav1.UpdateOptions) (*v1.VirtualClusterInstance, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualClusterInstance, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualClusterInstanceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualClusterInstance, err error) + VirtualClusterInstanceExpansion +} + +// virtualClusterInstances implements VirtualClusterInstanceInterface +type virtualClusterInstances struct { + client rest.Interface + ns string +} + +// newVirtualClusterInstances returns a VirtualClusterInstances +func newVirtualClusterInstances(c *StorageV1Client, namespace string) *virtualClusterInstances { + return &virtualClusterInstances{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the virtualClusterInstance, and returns the corresponding virtualClusterInstance object, and an error if there is any. +func (c *virtualClusterInstances) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualClusterInstance, err error) { + result = &v1.VirtualClusterInstance{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualClusterInstances that match those selectors. +func (c *virtualClusterInstances) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualClusterInstanceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.VirtualClusterInstanceList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualClusterInstances. +func (c *virtualClusterInstances) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualClusterInstance and creates it. Returns the server's representation of the virtualClusterInstance, and an error, if there is any. +func (c *virtualClusterInstances) Create(ctx context.Context, virtualClusterInstance *v1.VirtualClusterInstance, opts metav1.CreateOptions) (result *v1.VirtualClusterInstance, err error) { + result = &v1.VirtualClusterInstance{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterInstance). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualClusterInstance and updates it. Returns the server's representation of the virtualClusterInstance, and an error, if there is any. +func (c *virtualClusterInstances) Update(ctx context.Context, virtualClusterInstance *v1.VirtualClusterInstance, opts metav1.UpdateOptions) (result *v1.VirtualClusterInstance, err error) { + result = &v1.VirtualClusterInstance{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(virtualClusterInstance.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterInstance). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualClusterInstance and deletes it. Returns an error if one occurs. +func (c *virtualClusterInstances) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualClusterInstances) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualclusterinstances"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualClusterInstance. +func (c *virtualClusterInstances) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualClusterInstance, err error) { + result = &v1.VirtualClusterInstance{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("virtualclusterinstances"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/virtualclustertemplate.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/virtualclustertemplate.go new file mode 100644 index 000000000..8a620cfe8 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1/virtualclustertemplate.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VirtualClusterTemplatesGetter has a method to return a VirtualClusterTemplateInterface. +// A group's client should implement this interface. +type VirtualClusterTemplatesGetter interface { + VirtualClusterTemplates() VirtualClusterTemplateInterface +} + +// VirtualClusterTemplateInterface has methods to work with VirtualClusterTemplate resources. +type VirtualClusterTemplateInterface interface { + Create(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.CreateOptions) (*v1.VirtualClusterTemplate, error) + Update(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.UpdateOptions) (*v1.VirtualClusterTemplate, error) + UpdateStatus(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.UpdateOptions) (*v1.VirtualClusterTemplate, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualClusterTemplate, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualClusterTemplateList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualClusterTemplate, err error) + VirtualClusterTemplateExpansion +} + +// virtualClusterTemplates implements VirtualClusterTemplateInterface +type virtualClusterTemplates struct { + client rest.Interface +} + +// newVirtualClusterTemplates returns a VirtualClusterTemplates +func newVirtualClusterTemplates(c *StorageV1Client) *virtualClusterTemplates { + return &virtualClusterTemplates{ + client: c.RESTClient(), + } +} + +// Get takes name of the virtualClusterTemplate, and returns the corresponding virtualClusterTemplate object, and an error if there is any. +func (c *virtualClusterTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualClusterTemplate, err error) { + result = &v1.VirtualClusterTemplate{} + err = c.client.Get(). + Resource("virtualclustertemplates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualClusterTemplates that match those selectors. +func (c *virtualClusterTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualClusterTemplateList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.VirtualClusterTemplateList{} + err = c.client.Get(). + Resource("virtualclustertemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualClusterTemplates. +func (c *virtualClusterTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("virtualclustertemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualClusterTemplate and creates it. Returns the server's representation of the virtualClusterTemplate, and an error, if there is any. +func (c *virtualClusterTemplates) Create(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.CreateOptions) (result *v1.VirtualClusterTemplate, err error) { + result = &v1.VirtualClusterTemplate{} + err = c.client.Post(). + Resource("virtualclustertemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterTemplate). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualClusterTemplate and updates it. Returns the server's representation of the virtualClusterTemplate, and an error, if there is any. +func (c *virtualClusterTemplates) Update(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.UpdateOptions) (result *v1.VirtualClusterTemplate, err error) { + result = &v1.VirtualClusterTemplate{} + err = c.client.Put(). + Resource("virtualclustertemplates"). + Name(virtualClusterTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterTemplate). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *virtualClusterTemplates) UpdateStatus(ctx context.Context, virtualClusterTemplate *v1.VirtualClusterTemplate, opts metav1.UpdateOptions) (result *v1.VirtualClusterTemplate, err error) { + result = &v1.VirtualClusterTemplate{} + err = c.client.Put(). + Resource("virtualclustertemplates"). + Name(virtualClusterTemplate.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualClusterTemplate). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualClusterTemplate and deletes it. Returns an error if one occurs. +func (c *virtualClusterTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("virtualclustertemplates"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualClusterTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("virtualclustertemplates"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualClusterTemplate. +func (c *virtualClusterTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualClusterTemplate, err error) { + result = &v1.VirtualClusterTemplate{} + err = c.client.Patch(pt). + Resource("virtualclustertemplates"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/doc.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/doc.go new file mode 100644 index 000000000..225e6b2be --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/generated_expansion.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/generated_expansion.go new file mode 100644 index 000000000..961881fe0 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/generated_expansion.go @@ -0,0 +1,5 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type HelmReleaseExpansion interface{} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/helmrelease.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/helmrelease.go new file mode 100644 index 000000000..f68b70375 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/helmrelease.go @@ -0,0 +1,179 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1" + scheme "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// HelmReleasesGetter has a method to return a HelmReleaseInterface. +// A group's client should implement this interface. +type HelmReleasesGetter interface { + HelmReleases(namespace string) HelmReleaseInterface +} + +// HelmReleaseInterface has methods to work with HelmRelease resources. +type HelmReleaseInterface interface { + Create(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.CreateOptions) (*v1.HelmRelease, error) + Update(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.UpdateOptions) (*v1.HelmRelease, error) + UpdateStatus(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.UpdateOptions) (*v1.HelmRelease, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HelmRelease, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.HelmReleaseList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HelmRelease, err error) + HelmReleaseExpansion +} + +// helmReleases implements HelmReleaseInterface +type helmReleases struct { + client rest.Interface + ns string +} + +// newHelmReleases returns a HelmReleases +func newHelmReleases(c *VirtualclusterV1Client, namespace string) *helmReleases { + return &helmReleases{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the helmRelease, and returns the corresponding helmRelease object, and an error if there is any. +func (c *helmReleases) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HelmRelease, err error) { + result = &v1.HelmRelease{} + err = c.client.Get(). + Namespace(c.ns). + Resource("helmreleases"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of HelmReleases that match those selectors. +func (c *helmReleases) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HelmReleaseList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.HelmReleaseList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("helmreleases"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested helmReleases. +func (c *helmReleases) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("helmreleases"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a helmRelease and creates it. Returns the server's representation of the helmRelease, and an error, if there is any. +func (c *helmReleases) Create(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.CreateOptions) (result *v1.HelmRelease, err error) { + result = &v1.HelmRelease{} + err = c.client.Post(). + Namespace(c.ns). + Resource("helmreleases"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(helmRelease). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a helmRelease and updates it. Returns the server's representation of the helmRelease, and an error, if there is any. +func (c *helmReleases) Update(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.UpdateOptions) (result *v1.HelmRelease, err error) { + result = &v1.HelmRelease{} + err = c.client.Put(). + Namespace(c.ns). + Resource("helmreleases"). + Name(helmRelease.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(helmRelease). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *helmReleases) UpdateStatus(ctx context.Context, helmRelease *v1.HelmRelease, opts metav1.UpdateOptions) (result *v1.HelmRelease, err error) { + result = &v1.HelmRelease{} + err = c.client.Put(). + Namespace(c.ns). + Resource("helmreleases"). + Name(helmRelease.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(helmRelease). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the helmRelease and deletes it. Returns an error if one occurs. +func (c *helmReleases) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("helmreleases"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *helmReleases) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("helmreleases"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched helmRelease. +func (c *helmReleases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HelmRelease, err error) { + result = &v1.HelmRelease{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("helmreleases"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/virtualcluster_client.go b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/virtualcluster_client.go new file mode 100644 index 000000000..ca0ec72ae --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1/virtualcluster_client.go @@ -0,0 +1,91 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "net/http" + + v1 "github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1" + "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme" + rest "k8s.io/client-go/rest" +) + +type VirtualclusterV1Interface interface { + RESTClient() rest.Interface + HelmReleasesGetter +} + +// VirtualclusterV1Client is used to interact with features provided by the virtualcluster.loft.sh group. +type VirtualclusterV1Client struct { + restClient rest.Interface +} + +func (c *VirtualclusterV1Client) HelmReleases(namespace string) HelmReleaseInterface { + return newHelmReleases(c, namespace) +} + +// NewForConfig creates a new VirtualclusterV1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*VirtualclusterV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new VirtualclusterV1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*VirtualclusterV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &VirtualclusterV1Client{client}, nil +} + +// NewForConfigOrDie creates a new VirtualclusterV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *VirtualclusterV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new VirtualclusterV1Client for the given RESTClient. +func New(c rest.Interface) *VirtualclusterV1Client { + return &VirtualclusterV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *VirtualclusterV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/managerfactory/types.go b/vendor/github.com/loft-sh/api/v3/pkg/managerfactory/types.go new file mode 100644 index 000000000..f4dc0be30 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/managerfactory/types.go @@ -0,0 +1,27 @@ +package managerfactory + +import ( + "context" + + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// SharedManagerFactory is the interface for retrieving managers +type SharedManagerFactory interface { + Cluster(cluster string) ClusterClientAccess + Management() ManagementClientAccess +} + +// ClusterClientAccess holds the functions for cluster access +type ClusterClientAccess interface { + Config(ctx context.Context) (*rest.Config, error) + UncachedClient(ctx context.Context) (client.Client, error) +} + +// ManagementClientAccess holds the functions for management access +type ManagementClientAccess interface { + Config() *rest.Config + UncachedClient() client.Client + CachedClient() client.Client +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/product/product.go b/vendor/github.com/loft-sh/api/v3/pkg/product/product.go new file mode 100644 index 000000000..df47cc853 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/product/product.go @@ -0,0 +1,51 @@ +package product + +import ( + "fmt" + "os" + "sync" + + "k8s.io/klog/v2" +) + +// Product is the global variable that +var product ProductType = Loft +var once sync.Once + +func Product() ProductType { + once.Do(loadProductVar) + + return product +} + +func IsProduct(products ...ProductType) bool { + once.Do(loadProductVar) + + for _, p := range products { + if product == p { + return true + } + } + return false +} + +type ProductType string + +const ( + Loft ProductType = "loft" + DevPodPro ProductType = "devpod-pro" + VClusterPro ProductType = "vcluster-pro" +) + +func loadProductVar() { + productEnv := os.Getenv("PRODUCT") + if productEnv == string(DevPodPro) { + product = DevPodPro + } else if productEnv == string(VClusterPro) { + product = VClusterPro + } else if productEnv == string(Loft) { + product = Loft + } else if productEnv != "" { + klog.TODO().Error(fmt.Errorf("unrecognized product %s", productEnv), "error parsing product", "product", productEnv) + } +} diff --git a/vendor/github.com/loft-sh/api/v3/pkg/product/replace.go b/vendor/github.com/loft-sh/api/v3/pkg/product/replace.go new file mode 100644 index 000000000..d6260e82b --- /dev/null +++ b/vendor/github.com/loft-sh/api/v3/pkg/product/replace.go @@ -0,0 +1,98 @@ +package product + +import ( + "fmt" + "strings" +) + +// Replace replaces the product name in the given usage string +// based on the current product.Product(). +// +// It replaces "loft" with the specific product name: +// - "devpod pro" for product.DevPodPro +// - "vcluster pro" for product.VClusterPro +// - No replacement for product.Loft +// +// This handles case insensitive replaces like "loft" -> "devpod pro". +// +// It also handles case sensitive replaces: +// - "Loft" -> "DevPod.Pro" for product.DevPodPro +// - "Loft" -> "vCluster.Pro" for product.VClusterPro +// +// This allows customizing command usage text for different products. +// +// Parameters: +// - content: The string to update +// +// Returns: +// - The updated string with product name replaced if needed. +func Replace(content string) string { + switch Product() { + case DevPodPro: + content = strings.Replace(content, "loft.com", "devpod.pro", -1) + content = strings.Replace(content, "loft.host", "lfthost", -1) + + content = strings.Replace(content, "loft", "devpod pro", -1) + content = strings.Replace(content, "Loft", "DevPod.Pro", -1) + + content = strings.Replace(content, "lfthost", "loft.host", -1) + case VClusterPro: + content = strings.Replace(content, "loft.com", "vcluster.pro", -1) + content = strings.Replace(content, "loft.host", "lfthost", -1) + + content = strings.Replace(content, "loft", "vcluster pro", -1) + content = strings.Replace(content, "Loft", "vCluster.Pro", -1) + + content = strings.Replace(content, "lfthost", "loft.host", -1) + case Loft: + } + + return content +} + +// ReplaceWithHeader replaces the "loft" product name in the given +// usage string with the specific product name based on product.Product(). +// It also adds a header with padding around the product name and usage. +// +// The product name replacements are: +// +// - "devpod pro" for product.DevPodPro +// - "vcluster pro" for product.VClusterPro +// - No replacement for product.Loft +// +// This handles case insensitive replaces like "loft" -> "devpod pro". +// +// It also handles case sensitive replaces: +// - "Loft" -> "DevPod.Pro" for product.DevPodPro +// - "Loft" -> "vCluster.Pro" for product.VClusterPro +// +// Parameters: +// - use: The usage string +// - content: The content string to run product name replacement on +// +// Returns: +// - The content string with product name replaced and header added +func ReplaceWithHeader(use, content string) string { + maxChar := 56 + + productName := "loft" + + switch Product() { + case DevPodPro: + productName = "devpod pro" + case VClusterPro: + productName = "vcluster pro" + case Loft: + } + + paddingSize := (maxChar - 2 - len(productName) - len(use)) / 2 + + separator := strings.Repeat("#", paddingSize*2+len(productName)+len(use)+2+1) + padding := strings.Repeat("#", paddingSize) + + return fmt.Sprintf(`%s +%s %s %s %s +%s +%s +`, separator, padding, productName, use, padding, separator, Replace(content)) +} diff --git a/vendor/github.com/loft-sh/apiserver/pkg/builders/api_group_builder.go b/vendor/github.com/loft-sh/apiserver/pkg/builders/api_group_builder.go new file mode 100644 index 000000000..313814454 --- /dev/null +++ b/vendor/github.com/loft-sh/apiserver/pkg/builders/api_group_builder.go @@ -0,0 +1,111 @@ +/* +Copyright 2017 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package builders + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/registry/rest" + genericapiserver "k8s.io/apiserver/pkg/server" +) + +type APIGroupBuilder struct { + UnVersioned *UnVersionedApiBuilder + Versions []*VersionedApiBuilder + Name string + ImportPrefix string + RootScopedKinds []string +} + +func NewApiGroupBuilder(name, prefix string) *APIGroupBuilder { + g := &APIGroupBuilder{ + Name: name, + ImportPrefix: prefix, + } + return g +} + +func (g *APIGroupBuilder) WithUnVersionedApi(unversioned *UnVersionedApiBuilder) *APIGroupBuilder { + g.UnVersioned = unversioned + return g +} + +func (g *APIGroupBuilder) WithVersionedApis(versions ...*VersionedApiBuilder) *APIGroupBuilder { + g.Versions = append(g.Versions, versions...) + return g +} + +func (g *APIGroupBuilder) WithRootScopedKinds(kinds ...string) *APIGroupBuilder { + g.RootScopedKinds = append(g.RootScopedKinds, kinds...) + return g +} + +// GetVersionPreferenceOrder returns the preferred ordering of versions for this api group +func (g *APIGroupBuilder) GetVersionPreferenceOrder() []string { + order := []string{} + for _, v := range g.Versions { + order = append(order, v.GroupVersion.Version) + } + return order +} + +func (g *APIGroupBuilder) GetLegacyCodec() []schema.GroupVersion { + versions := []schema.GroupVersion{} + for _, v := range g.Versions { + versions = append(versions, v.GroupVersion) + } + return versions +} + +func (g *APIGroupBuilder) registerEndpoints( + optionsGetter generic.RESTOptionsGetter, + registry map[string]map[string]rest.Storage) { + + // Register the endpoints for each version + for _, v := range g.Versions { + v.registerEndpoints(optionsGetter, registry) + } +} + +func (g *APIGroupBuilder) registerVersionPriorities(scheme *runtime.Scheme) error { + gvs := make([]schema.GroupVersion, len(g.Versions)) + for i, versionBuilder := range g.Versions { + gvs[i] = versionBuilder.GroupVersion + } + return scheme.SetVersionPriority(gvs...) +} + +// Build returns a new NewDefaultAPIGroupInfo to install into a GenericApiServer +func (g *APIGroupBuilder) Build(optionsGetter generic.RESTOptionsGetter) *genericapiserver.APIGroupInfo { + + // Build a new group + i := genericapiserver.NewDefaultAPIGroupInfo( + g.Name, + Scheme, + ParameterCodec, + Codecs) + + g.registerEndpoints(optionsGetter, i.VersionedResourcesStorageMap) + return &i +} + +func (g *APIGroupBuilder) AddToScheme(scheme *runtime.Scheme) error { + localSchemeBuilder := runtime.NewSchemeBuilder(g.registerVersionPriorities) + for _, versionBuilder := range g.Versions { + localSchemeBuilder.Register(versionBuilder.SchemeBuilder.AddToScheme) + } + localSchemeBuilder.Register(g.UnVersioned.SchemeBuilder.AddToScheme) + return localSchemeBuilder.AddToScheme(scheme) +} diff --git a/vendor/github.com/loft-sh/apiserver/pkg/builders/api_unversioned_resource_builder.go b/vendor/github.com/loft-sh/apiserver/pkg/builders/api_unversioned_resource_builder.go new file mode 100644 index 000000000..1c39ade64 --- /dev/null +++ b/vendor/github.com/loft-sh/apiserver/pkg/builders/api_unversioned_resource_builder.go @@ -0,0 +1,177 @@ +/* +Copyright 2017 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package builders + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +// NewInternalResource creates a new strategy for a resource +// name - name of the resource - e.g. "deployments" +// new - function for creating new empty UNVERSIONED instances - e.g. func() runtime.Object { return &Deployment{} } +// newList - function for creating an empty list of UNVERSIONED instances - e.g. func() runtime.Object { return &DeploymentList{} } +func NewInternalResource(name, kind string, new, newList func() runtime.Object) UnversionedResourceBuilder { + return NewBuilder(name, kind, "", new, newList, true) +} + +// NewInternalResourceWithShortcuts creates a new strategy for a resource with shortnames and categories +// name - name of the resource - e.g. "deployments" +// new - function for creating new empty UNVERSIONED instances - e.g. func() runtime.Object { return &Deployment{} } +// newList - function for creating an empty list of UNVERSIONED instances - e.g. func() runtime.Object { return &DeploymentList{} } +// shortnames - shortnames of the resource - e.g. "deploy" +// categories - categories of the resource - e.g. "aggregation" +func NewInternalResourceWithShortcuts(name, kind string, new, newList func() runtime.Object, shortnames, categories []string) UnversionedResourceBuilder { + return NewBuilderWithShortcuts(name, kind, "", new, newList, true, shortnames, categories) +} + +// NewInternalResourceStatus returns a new strategy for the status subresource of an object +// name - name of the resource - e.g. "deployments" +// new - function for creating new empty UNVERSIONED instances - e.g. func() runtime.Object { return &Deployment{} } +// newList - function for creating an empty list of UNVERSIONED instances - e.g. func() runtime.Object { return &DeploymentList{} } +func NewInternalResourceStatus(name, kind string, new, newList func() runtime.Object) UnversionedResourceBuilder { + return NewBuilder( + name, + kind, + "status", + new, newList, + true) +} + +// NewInternalSubresource returns a new strategy for a subresource +// name - name of the resource - e.g. "deployments" +// path - path to the subresource - e.g. "scale" +// new - function for creating new empty UNVERSIONED instances - e.g. func() runtime.Object { return &Deployment{} } +func NewInternalSubresource(name, kind, path string, new func() runtime.Object) UnversionedResourceBuilder { + return NewBuilder( + name, + kind, + path, + new, + nil, // Don't provide a list function + false, // Don't create a full storage rest interface, just use the provide methods + ) +} + +func NewBuilder( + name, kind, path string, + new, newList func() runtime.Object, + useRegistryStore bool) UnversionedResourceBuilder { + + return &UnversionedResourceBuilderImpl{ + Path: path, + Name: name, + Kind: kind, + NewFunc: new, + NewListFunc: newList, + UseRegistryStore: useRegistryStore, + } +} + +func NewBuilderWithShortcuts( + name, kind, path string, + new, newList func() runtime.Object, + useRegistryStore bool, + shortnames, categories []string) UnversionedResourceBuilder { + + return &UnversionedResourceBuilderImpl{ + Path: path, + Name: name, + Kind: kind, + NewFunc: new, + NewListFunc: newList, + UseRegistryStore: useRegistryStore, + ShortNames: shortnames, + Categories: categories, + } +} + +type WithList interface { + NewList() runtime.Object +} + +type UnversionedResourceBuilder interface { + WithList + WithShortNames + WithCategories + New() runtime.Object + + GetPath() string + GetName() string + GetKind() string + ShouldUseRegistryStore() bool +} + +type UnversionedResourceBuilderImpl struct { + Path string + Name string + Kind string + NewFunc func() runtime.Object + NewListFunc func() runtime.Object + UseRegistryStore bool + + ShortNames []string + Categories []string +} + +func (b *UnversionedResourceBuilderImpl) GetPath() string { + return b.Path +} + +func (b *UnversionedResourceBuilderImpl) GetName() string { + return b.Name +} + +func (b *UnversionedResourceBuilderImpl) GetKind() string { + return b.Kind +} + +func (b *UnversionedResourceBuilderImpl) ShouldUseRegistryStore() bool { + return b.UseRegistryStore +} + +func (b *UnversionedResourceBuilderImpl) New() runtime.Object { + if b.NewFunc == nil { + return nil + } + return b.NewFunc() +} + +func (b *UnversionedResourceBuilderImpl) NewList() runtime.Object { + if b.NewListFunc == nil { + return nil + } + return b.NewListFunc() +} + +var _ WithShortNames = &UnversionedResourceBuilderImpl{} + +func (b *UnversionedResourceBuilderImpl) GetShortNames() []string { + return b.ShortNames +} + +var _ WithCategories = &UnversionedResourceBuilderImpl{} + +func (b *UnversionedResourceBuilderImpl) GetCategories() []string { + return b.Categories +} + +type WithShortNames interface { + //AddShortName(shortName string) + GetShortNames() []string +} + +type WithCategories interface { + //AddCategory(category string) + GetCategories() []string +} diff --git a/vendor/github.com/loft-sh/apiserver/pkg/builders/api_version_builder.go b/vendor/github.com/loft-sh/apiserver/pkg/builders/api_version_builder.go new file mode 100644 index 000000000..8ac1ebcac --- /dev/null +++ b/vendor/github.com/loft-sh/apiserver/pkg/builders/api_version_builder.go @@ -0,0 +1,111 @@ +/* +Copyright 2017 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package builders + +import ( + "reflect" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/registry/rest" +) + +type VersionedApiBuilder struct { + Kinds []*versionedResourceBuilder + GroupVersion schema.GroupVersion + SchemeBuilder runtime.SchemeBuilder + + // Deprecated: Only for compiliation backward-compatibility w/ 1.12+ version generators + // removing in the future + SchemaBuilder runtime.SchemeBuilder +} + +func NewApiVersion(group, version string) *VersionedApiBuilder { + b := &VersionedApiBuilder{ + GroupVersion: schema.GroupVersion{group, version}, + } + return b +} + +// WithResources adds new resource types and subresources to the API versions +// resourceBuilders is a list of *versionedResourceBuilder +func (s *VersionedApiBuilder) WithResources(resourceBuilders ...*versionedResourceBuilder) *VersionedApiBuilder { + s.Kinds = append(s.Kinds, resourceBuilders...) + return s +} + +// registerEndpoints registers the REST endpoints for all resources in this API group version +// group is the group to register the resources under +// optionsGetter is the RESTOptionsGetter provided by a server.Config +// registry is the server.APIGroupInfo VersionedResourcesStorageMap used to register REST endpoints +func (s *VersionedApiBuilder) registerEndpoints( + optionsGetter generic.RESTOptionsGetter, + registry map[string]map[string]rest.Storage) { + + // Register the endpoints for each kind + for _, k := range s.Kinds { + if _, found := registry[s.GroupVersion.Version]; !found { + // Initialize the version if missing + registry[s.GroupVersion.Version] = map[string]rest.Storage{} + } + // Register each of the endpoints in this version + k.registerEndpoints(s.GroupVersion.Group, optionsGetter, registry[s.GroupVersion.Version]) + } +} + +type UnVersionedApiBuilder struct { + Kinds []UnversionedResourceBuilder + GroupVersion schema.GroupVersion + SchemeBuilder runtime.SchemeBuilder +} + +func NewApiGroup(group string) *UnVersionedApiBuilder { + b := &UnVersionedApiBuilder{ + GroupVersion: schema.GroupVersion{group, runtime.APIVersionInternal}, + } + //b.SchemaBuilder = runtime.NewSchemeBuilder(b.registerTypes) + return b +} + +func (s *UnVersionedApiBuilder) WithKinds(kinds ...UnversionedResourceBuilder) *UnVersionedApiBuilder { + s.Kinds = append(s.Kinds, kinds...) + return s +} + +func (s *UnVersionedApiBuilder) registerTypes(scheme *runtime.Scheme) error { + // Make sure we only each type once + typesToRegister := map[reflect.Type]runtime.Object{} + for _, k := range s.Kinds { + // RegisterTypes type + if t := k.New(); t != nil { + // Register the unversioned type + typesToRegister[reflect.TypeOf(t)] = t + } + + // RegisterTypes list type if it exists + if i, ok := k.(WithList); ok && i.NewList() != nil { + // Register the unversioned type + l := i.NewList() + typesToRegister[reflect.TypeOf(l)] = l + } + } + for _, t := range typesToRegister { + scheme.AddKnownTypes(s.GroupVersion, t) + } + + //fmt.Printf("Registering for group %v\n", s.GroupVersion) + //metav1.AddToGroupVersion(scheme, s.GroupVersion) + return nil +} diff --git a/vendor/github.com/loft-sh/apiserver/pkg/builders/api_versioned_resource_builder.go b/vendor/github.com/loft-sh/apiserver/pkg/builders/api_versioned_resource_builder.go new file mode 100644 index 000000000..36098baba --- /dev/null +++ b/vendor/github.com/loft-sh/apiserver/pkg/builders/api_versioned_resource_builder.go @@ -0,0 +1,191 @@ +/* +Copyright 2017 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package builders + +import ( + "context" + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/apiserver/pkg/registry/rest" +) + +type NewRESTFunc func(getter generic.RESTOptionsGetter) rest.Storage + +// +// Versioned Kind Builder builds a versioned resource using unversioned strategy +// + +// NewApiResource returns a new versionedResourceBuilder for registering endpoints for +// resources that are persisted to storage. +// strategy - unversionedBuilder from calling NewUnversionedXXX() +// new - function for creating new empty VERSIONED instances - e.g. func() runtime.Object { return &Deployment{} } +// newList - function for creating an empty list of VERSIONED instances - e.g. func() runtime.Object { return &DeploymentList{} } +// storeBuilder - builder for creating the store +func NewApiResource( + unversionedBuilder UnversionedResourceBuilder, + new, newList func() runtime.Object, + storeBuilder StorageBuilder) *versionedResourceBuilder { + + return &versionedResourceBuilder{ + unversionedBuilder, new, newList, storeBuilder, nil, nil, + } +} + +// NewApiResourceWithStorage returns a new versionedResourceBuilder for registering endpoints that +// does not require standard storage (e.g. subresources reuses the storage for the parent resource). +// strategy - unversionedBuilder from calling NewUnversionedXXX() +// new - function for creating new empty VERSIONED instances - e.g. func() runtime.Object { return &Deployment{} } +// storage - storage for manipulating the resource +func NewApiResourceWithStorage( + unversionedBuilder UnversionedResourceBuilder, + new, newList func() runtime.Object, + RESTFunc NewRESTFunc) *versionedResourceBuilder { + v := &versionedResourceBuilder{ + unversionedBuilder, new, newList, nil, RESTFunc, nil, + } + if new == nil { + panic(fmt.Errorf("Cannot call NewApiResourceWithStorage with nil new function.")) + } + if RESTFunc == nil { + panic(fmt.Errorf("Cannot call NewApiResourceWithStorage with nil RESTFunc function.")) + } + return v +} + +type versionedResourceBuilder struct { + Unversioned UnversionedResourceBuilder + + // NewFunc returns an empty unversioned instance of a resource + NewFunc func() runtime.Object + + // NewListFunc returns and empty unversioned instance of a resource List + NewListFunc func() runtime.Object + + // StorageBuilder is used to modify the default storage, mutually exclusive with RESTFunc + StorageBuilder StorageBuilder + + // RESTFunc returns a rest.Storage implementation, mutually exclusive with StorageBuilder + RESTFunc NewRESTFunc + + Storage rest.StandardStorage +} + +func (b *versionedResourceBuilder) New() runtime.Object { + if b.NewFunc == nil { + return nil + } + return b.NewFunc() +} + +func (b *versionedResourceBuilder) NewList() runtime.Object { + if b.NewListFunc == nil { + return nil + } + return b.NewListFunc() +} + +type StorageWrapper struct { + registry.Store +} + +func (s StorageWrapper) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) { + return s.Store.Create(ctx, obj, createValidation, options) +} + +func (b *versionedResourceBuilder) Build( + group string, + optionsGetter generic.RESTOptionsGetter) rest.StandardStorage { + + // Set a default strategy + store := &StorageWrapper{ + registry.Store{ + NewFunc: b.Unversioned.New, // Use the unversioned type + NewListFunc: b.Unversioned.NewList, // Use the unversioned type + DefaultQualifiedResource: b.getGroupResource(group), + }, + } + b.Storage = store + + // the store-with-shortcuts will only be used if there're valid shortnames + storeWithShortcuts := &StorageWrapperWithShortcuts{ + StorageWrapper: store, + } + + wantsShortcuts := len(b.Unversioned.GetShortNames()) > 0 + if wantsShortcuts { + // plants shortnames and an opt-out category into the storage + storeWithShortcuts.shortNames = b.Unversioned.GetShortNames() + storeWithShortcuts.categories = b.Unversioned.GetCategories() + } + + // Use default, requires + options := &generic.StoreOptions{RESTOptions: optionsGetter} + + if b.StorageBuilder != nil { + // Allow overriding the storage defaults + b.StorageBuilder.Build(b.StorageBuilder, storeWithShortcuts.StorageWrapper, options) + } + + if err := storeWithShortcuts.CompleteWithOptions(options); err != nil { + panic(err) // TODO: Propagate error up + } + if wantsShortcuts { + b.Storage = storeWithShortcuts + } + return b.Storage +} + +func (b *versionedResourceBuilder) GetStandardStorage() rest.StandardStorage { + return b.Storage +} + +// getGroupResource returns the GroupResource for this Resource and the provided Group +// group is the group the resource belongs to +func (b *versionedResourceBuilder) getGroupResource(group string) schema.GroupResource { + return schema.GroupResource{group, b.Unversioned.GetName()} + +} + +// registerEndpoints registers the REST endpoints for this resource in the registry +// group is the group to register the resource under +// optionsGetter is the RESTOptionsGetter provided by a server.Config +// registry is the server.APIGroupInfo VersionedResourcesStorageMap used to register REST endpoints +func (b *versionedResourceBuilder) registerEndpoints( + group string, + optionsGetter generic.RESTOptionsGetter, + registry map[string]rest.Storage) { + + // Register the endpoint + path := b.Unversioned.GetPath() + if len(path) > 0 { + // Subresources appear after the resource + path = b.Unversioned.GetName() + "/" + path + } else { + path = b.Unversioned.GetName() + } + + if b.RESTFunc != nil { + // Use the REST implementation directly. + registry[path] = b.RESTFunc(optionsGetter) + } else { + // Create a new REST implementation wired to storage. + registry[path] = b. + Build(group, optionsGetter) + } +} diff --git a/vendor/github.com/loft-sh/apiserver/pkg/builders/default_storage_strategy.go b/vendor/github.com/loft-sh/apiserver/pkg/builders/default_storage_strategy.go new file mode 100644 index 000000000..bfea6f6ec --- /dev/null +++ b/vendor/github.com/loft-sh/apiserver/pkg/builders/default_storage_strategy.go @@ -0,0 +1,170 @@ +/* +Copyright 2017 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package builders + +import ( + "context" + "fmt" + "reflect" + + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/storage" + "k8s.io/apiserver/pkg/storage/names" +) + +var _ rest.RESTCreateStrategy = &DefaultStorageStrategy{} +var _ rest.RESTDeleteStrategy = &DefaultStorageStrategy{} +var _ rest.RESTUpdateStrategy = &DefaultStorageStrategy{} + +var StorageStrategySingleton = DefaultStorageStrategy{ + Scheme, + names.SimpleNameGenerator, +} + +type DefaultStorageStrategy struct { + runtime.ObjectTyper + names.NameGenerator +} + +func (DefaultStorageStrategy) ObjectNameFunc(obj runtime.Object) (string, error) { + switch obj := obj.(type) { + default: + return "", fmt.Errorf( + "Cannot get name for object type %T. Must implement HasObjectMeta or define "+ + "its own ObjectNameFunc in its storage strategy.", obj) + case HasObjectMeta: + // Get the name from the metadata + return obj.GetObjectMeta().Name, nil + } +} + +// Build sets the strategy for the store +func (DefaultStorageStrategy) Build(builder StorageBuilder, store *StorageWrapper, options *generic.StoreOptions) { + store.PredicateFunc = builder.BasicMatch + store.ObjectNameFunc = builder.ObjectNameFunc + store.CreateStrategy = builder + store.UpdateStrategy = builder + store.DeleteStrategy = builder + + options.AttrFunc = builder.GetAttrs + options.TriggerFunc = builder.GetTriggerFuncs() +} + +func (DefaultStorageStrategy) NamespaceScoped() bool { return true } + +func (DefaultStorageStrategy) AllowCreateOnUpdate() bool { return true } + +func (DefaultStorageStrategy) AllowUnconditionalUpdate() bool { return true } + +func (DefaultStorageStrategy) Canonicalize(obj runtime.Object) {} + +func (DefaultStorageStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { + switch t := obj.(type) { + default: + case HasObjectMetaSpecStatus: + // Clear the status if the resource has a Status + t.GetObjectMeta().Generation = 1 + t.SetStatus(t.NewStatus()) + } +} + +func (DefaultStorageStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { + // Don't update the status if the resource has a Status + switch n := obj.(type) { + default: + case HasObjectMetaSpecStatus: + o := old.(HasObjectMetaSpecStatus) + n.SetStatus(o.GetStatus()) + + // Spec and annotation updates bump the generation. + if !reflect.DeepEqual(n.GetSpec(), o.GetSpec()) || + !reflect.DeepEqual(n.GetObjectMeta().Annotations, o.GetObjectMeta().Annotations) { + n.GetObjectMeta().Generation = o.GetObjectMeta().Generation + 1 + } + } +} + +func (DefaultStorageStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { + return field.ErrorList{} +} + +func (DefaultStorageStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + return field.ErrorList{} +} + +func (b DefaultStorageStrategy) GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { + switch t := obj.(type) { + case HasObjectMeta: + apiserver := obj.(HasObjectMeta) + return labels.Set(apiserver.GetObjectMeta().Labels), + b.GetSelectableFields(apiserver), + nil + default: + return nil, nil, fmt.Errorf( + "Cannot get attributes for object type %v which does not implement HasObjectMeta.", t) + } +} + +func (b DefaultStorageStrategy) GetTriggerFuncs() storage.IndexerFuncs { + return nil +} + +// GetSelectableFields returns a field set that represents the object. +func (DefaultStorageStrategy) GetSelectableFields(obj HasObjectMeta) fields.Set { + return generic.ObjectMetaFieldsSet(obj.GetObjectMeta(), true) +} + +// MatchResource is the filter used by the generic etcd backend to watch events +// from etcd to clients of the apiserver only interested in specific labels/fields. +func (b DefaultStorageStrategy) BasicMatch(label labels.Selector, field fields.Selector) storage.SelectionPredicate { + return storage.SelectionPredicate{ + Label: label, + Field: field, + GetAttrs: b.GetAttrs, + } +} + +func (*DefaultStorageStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { + return nil +} + +func (*DefaultStorageStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { + return nil +} + +// +// Status Strategies +// + +var StatusStorageStrategySingleton = DefaultStatusStorageStrategy{StorageStrategySingleton} + +type DefaultStatusStorageStrategy struct { + DefaultStorageStrategy +} + +func (DefaultStatusStorageStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { + switch n := obj.(type) { + default: + case HasObjectMetaSpecStatus: + // Only update the Status + o := old.(HasObjectMetaSpecStatus) + n.SetSpec(o.GetSpec()) + n.GetObjectMeta().Labels = o.GetObjectMeta().Labels + } +} diff --git a/vendor/github.com/loft-sh/apiserver/pkg/builders/resource_interfaces.go b/vendor/github.com/loft-sh/apiserver/pkg/builders/resource_interfaces.go new file mode 100644 index 000000000..14baddcd5 --- /dev/null +++ b/vendor/github.com/loft-sh/apiserver/pkg/builders/resource_interfaces.go @@ -0,0 +1,84 @@ +/* +Copyright 2017 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package builders + +import ( + "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/storage" + "k8s.io/apiserver/pkg/storage/names" +) + +type HasObjectMetaSpecStatus interface { + HasObjectMeta + HasSpec + HasStatus +} + +type HasStatus interface { + NewStatus() interface{} + GetStatus() interface{} + SetStatus(status interface{}) +} + +type HasSpec interface { + GetSpec() interface{} + SetSpec(spec interface{}) +} + +type HasObjectMeta interface { + GetObjectMeta() *metav1.ObjectMeta +} + +type StorageBuilder interface { + Build(builder StorageBuilder, store *StorageWrapper, options *generic.StoreOptions) + + names.NameGenerator + runtime.ObjectTyper + + ObjectNameFunc(obj runtime.Object) (string, error) + NamespaceScoped() bool + AllowCreateOnUpdate() bool + AllowUnconditionalUpdate() bool + Canonicalize(obj runtime.Object) + PrepareForCreate(ctx context.Context, obj runtime.Object) + PrepareForUpdate(ctx context.Context, obj, old runtime.Object) + Validate(ctx context.Context, obj runtime.Object) field.ErrorList + ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList + GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) + GetTriggerFuncs() storage.IndexerFuncs + GetSelectableFields(obj HasObjectMeta) fields.Set + BasicMatch(label labels.Selector, field fields.Selector) storage.SelectionPredicate + WarningsOnCreate(ctx context.Context, obj runtime.Object) []string + WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string +} + +// Deprecated +type SchemeFns interface { + DefaultingFunction(obj interface{}) + GetConversionFunctions() []interface{} + Register(scheme *runtime.Scheme) error + FieldSelectorConversion(label, value string) (string, string, error) +} + +type StandardStorageProvider interface { + GetStandardStorage() rest.StandardStorage +} diff --git a/vendor/github.com/loft-sh/apiserver/pkg/builders/scheme.go b/vendor/github.com/loft-sh/apiserver/pkg/builders/scheme.go new file mode 100644 index 000000000..5ef33e056 --- /dev/null +++ b/vendor/github.com/loft-sh/apiserver/pkg/builders/scheme.go @@ -0,0 +1,42 @@ +/* +Copyright 2017 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package builders + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" +) + +// Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered. +var Scheme = runtime.NewScheme() + +// Codecs provides access to encoding and decoding for the scheme +var Codecs = serializer.NewCodecFactory(Scheme) + +// ParameterScheme is a scheme dedicated for registering parameters +var ParameterScheme = runtime.NewScheme() + +// ParameterCodec is a codec for decoding parameters +var ParameterCodec = runtime.NewParameterCodec(ParameterScheme) + +func init() { + ParameterScheme.AddUnversionedTypes(metav1.SchemeGroupVersion, + &metav1.ListOptions{}, + &metav1.GetOptions{}, + &metav1.DeleteOptions{}, + &metav1.CreateOptions{}, + &metav1.UpdateOptions{}, + ) +} diff --git a/vendor/github.com/loft-sh/apiserver/pkg/builders/shortcut_storage_wrapper.go b/vendor/github.com/loft-sh/apiserver/pkg/builders/shortcut_storage_wrapper.go new file mode 100644 index 000000000..924df2b7a --- /dev/null +++ b/vendor/github.com/loft-sh/apiserver/pkg/builders/shortcut_storage_wrapper.go @@ -0,0 +1,35 @@ +/* +Copyright 2019 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package builders + +import "k8s.io/apiserver/pkg/registry/rest" + +var _ rest.ShortNamesProvider = &StorageWrapperWithShortcuts{} +var _ rest.CategoriesProvider = &StorageWrapperWithShortcuts{} + +type StorageWrapperWithShortcuts struct { + *StorageWrapper + shortNames []string + categories []string +} + +func (b *StorageWrapperWithShortcuts) ShortNames() []string { + // TODO(yue9944882): prevent shortname conflict or the client-side rest-mapping will crush + return b.shortNames +} + +func (b *StorageWrapperWithShortcuts) Categories() []string { + // all the aggregated resource are considered in the "aggregation" category + return b.categories +} diff --git a/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/auth.go b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/auth.go new file mode 100644 index 000000000..0c898f60d --- /dev/null +++ b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/auth.go @@ -0,0 +1,12 @@ +package server + +// +genclient +// +genclient:nonNamespaced + +// +k8s:openapi-gen=true +type InstanceTokenAuth struct { + // Token is the jwt token identifying the loft instance. + Token string `json:"token" validate:"required"` + // Certificate is the signing certificate for the token. + Certificate string `json:"certificate" validate:"required" form:"certificate"` +} diff --git a/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/buttons.go b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/buttons.go new file mode 100644 index 000000000..50c4dd620 --- /dev/null +++ b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/buttons.go @@ -0,0 +1,35 @@ +package server + +// +genclient +// +genclient:nonNamespaced + +// Button is an object that represents a button in the Loft UI that links to some external service +// for handling operations for licensing for example. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=true +type Button struct { + // URL is the link at the other end of the button. + URL string `json:"URL"` + // DisplayText is the text to display on the button. If display text is unset the button will + // never be shown in the loft UI. + // +optional + DisplayText string `json:"displayText,omitempty"` + // PayloadType indicates the payload type to set in the request. Typically, this will be + // "standard" -- meaning the standard payload that includes the instance token auth and a + // return url, however in the future we may add additional types. An unset value is assumed to + // be "standard". + // +optional + PayloadType string `json:"payloadType,omitempty"` + // Direct indicates if the Loft front end should directly hit this endpoint. If false, it means + // that the Loft front end will be hitting the license server first to generate a one time token + // for the operation; this also means that there will be a redirect URL in the response to the + // request for this and that link should be followed by the front end. + // +optional + Direct bool `json:"direct,omitempty"` +} + +// Buttons is an object containing Button objects. These Button objects are rendered by the Loft UI +// to allow for extending Loft to include links to external services such as license updates. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=true +type Buttons []*Button diff --git a/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/dns.go b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/dns.go new file mode 100644 index 000000000..56e45c618 --- /dev/null +++ b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/dns.go @@ -0,0 +1,10 @@ +package server + +type ClaimSubdomainOptions struct { + *InstanceTokenAuth + Subdomain string `form:"subdomain" json:"subdomain,omitempty" binding:"required"` + ReplacedSubdomain string `form:"replacedSubdomain" json:"replacedSubdomain,omitempty" binding:"required"` + DNSTarget string `form:"dnsTarget" json:"dnsTarget,omitempty" binding:"required"` +} + +type ClaimSubdomainResult struct{} diff --git a/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/instance.go b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/instance.go new file mode 100644 index 000000000..31a90d583 --- /dev/null +++ b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/instance.go @@ -0,0 +1,109 @@ +package server + +// +genclient +// +genclient:nonNamespaced + +// InstanceCreateInput is the required input data for "instance create" operations, that is, the +// primary endpoint that Loft instances will hit to register to the license server as well as get +// information about the instance's current license. +type InstanceCreateInput struct { + *InstanceTokenAuth + + LoftVersion string `form:"version" json:"version" validate:"required"` + KubeVersion string `form:"kubeVersion" json:"kubeVersion" validate:"required"` + + KubeSystemNamespaceUID string `form:"kubeSystemNamespaceUID" json:"kubeSystemNamespace" validate:"required"` + + // AllocatedResources is a mapping of all resources (that we track, i.e. vcluster instances) + // deployed on the Loft instance. The Loft instance passes this information along when it + // performs it's checkins with the license server. + AllocatedResources *map[string]ResourceQuantity `form:"quantities" json:"quantities,omitempty"` + + // Config is the current configuration of the Loft instance checking in. + Config string `form:"config" json:"config,omitempty"` +} + +// InstanceCreateOutput is the struct holding all information returned from "instance create" +// requests. +type InstanceCreateOutput struct { + CurrentTime int64 `json:"currentTime"` + // License is the license data for the requested Loft instance. + License *License `json:"license,omitempty"` +} + +// License is a struct representing the license data sent to a Loft instance after checking in with +// the license server. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=true +type License struct { + // Buttons is a slice of license server endpoints (buttons) that the Loft instance may need to + // hit. Each Button contains the display text and link for the front end to work with. + Buttons Buttons `json:"buttons,omitempty"` + // IsOffline indicates if the license is an offline license or not. + // +optional + IsOffline bool `json:"isOffline,omitempty"` + // Announcements is a map string/string such that we can easily add any additional data without + // needing to change types. For now, we will use the keys "name" and "content". + // +optional + Announcements map[string]string `json:"announcement,omitempty"` + // BlockRequests is a slice of Request objects that the Loft instance should block from being + // created due to license usage overrun. + // +optional + BlockRequests *[]Request `json:"blockRequests,omitempty"` + // Limits is the number of resources allowed by the current license. + // +optional + Limits []ResourceQuantity `json:"limits,omitempty"` + // Features is a map of enabled features. + // +optional + Features map[string]bool `json:"features,omitempty"` + // Analytics indicates the analytics endpoints and which requests should be sent to the + // analytics server. + // +optional + Analytics *Analytics `json:"analytics,omitempty"` +} + +// Analytics is a struct that represents the analytics server and the requests that should be sent +// to it. This information is sent to Loft instances when they check in with the license server. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=true +type Analytics struct { + // Endpoint is the endpoint for the analytics server. + Endpoint string `json:"endpoint,omitempty"` + // Requests is a slice of requested resources to return analytics for. + // +optional + Requests []Request `json:"requests,omitempty"` +} + +// Request represents a request analytics information for an apigroup/resource and a list of verb actions for that +// resource. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=true +type Request struct { + // Verbs is the list of verbs for the request. + // +optional + Verbs []string `json:"verbs,omitempty"` + // Group is the api group. + // +optional + Group string `json:"group,omitempty"` + // Resource is the resource name for the request. + // +optional + Resource string `json:"resource,omitempty"` +} + +// ResourceQuantity represents an api resource and a quantity counter for that resource type (used for limits for example). +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=true +type ResourceQuantity struct { + // Group is the api group. + // +optional + Group string `json:"group,omitempty"` + // Version is the api version. + // +optional + Version string `json:"version,omitempty"` + // Kind is the resource kind. + // +optional + Kind string `json:"kind,omitempty"` + // Quantity is the quantity for hte limit (for example). + // +optional + Quantity int64 `json:"quantity,omitempty"` +} diff --git a/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/payloads.go b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/payloads.go new file mode 100644 index 000000000..77771f8f0 --- /dev/null +++ b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/payloads.go @@ -0,0 +1,40 @@ +package server + +// +genclient +// +genclient:nonNamespaced + +// StandardRequestInputFrontEnd is the standard input request payload for the front end -- this is +// the same (it is embedded) in the StandardRequestInput just without the token auth as the Loft +// backend will handle adding that for communication to the admin server. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=true +type StandardRequestInputFrontEnd struct { + // ReturnURL is the url that operations should ultimately return to after their operation is + // complete. For example, once the license activate process is done, the Loft portal should + // redirect to this URL. + // +optional + ReturnURL string `json:"returnURL,omitempty"` +} + +// StandardRequestInput is a standard payload object used between the Loft front end and the Loft +// admin server. It accepts auth information and a URL that is used by the admin server when +// crafting the redirect link that is returned from "start" type operations (ex. trial activate +// start that creates a one-time token and returns a url to go to for the front end). +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=true +type StandardRequestInput struct { + *InstanceTokenAuth + StandardRequestInputFrontEnd +} + +// StandardRequestOutput is a standard payload object returned by the Loft admin server, it +// contains a RedirectURL that encodes a one-time token (if applicable) and a return URL (if +// applicable) that the front end can then follow to continue the license operation. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=true +type StandardRequestOutput struct { + // RedirectURL is the URL to redirect to for continuing the license operation (typically stripe + // or the loft portal). + // +optional + RedirectURL string `json:"redirectURL,omitempty"` +} diff --git a/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/zz_generated.deepcopy.go new file mode 100644 index 000000000..1f0e8531b --- /dev/null +++ b/vendor/github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server/zz_generated.deepcopy.go @@ -0,0 +1,224 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package server + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Analytics) DeepCopyInto(out *Analytics) { + *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]Request, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Analytics. +func (in *Analytics) DeepCopy() *Analytics { + if in == nil { + return nil + } + out := new(Analytics) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Button) DeepCopyInto(out *Button) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Button. +func (in *Button) DeepCopy() *Button { + if in == nil { + return nil + } + out := new(Button) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in Buttons) DeepCopyInto(out *Buttons) { + { + in := &in + *out = make(Buttons, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Button) + **out = **in + } + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Buttons. +func (in Buttons) DeepCopy() Buttons { + if in == nil { + return nil + } + out := new(Buttons) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *License) DeepCopyInto(out *License) { + *out = *in + if in.Buttons != nil { + in, out := &in.Buttons, &out.Buttons + *out = make(Buttons, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Button) + **out = **in + } + } + } + if in.Announcements != nil { + in, out := &in.Announcements, &out.Announcements + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.BlockRequests != nil { + in, out := &in.BlockRequests, &out.BlockRequests + *out = new([]Request) + if **in != nil { + in, out := *in, *out + *out = make([]Request, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + } + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + *out = make([]ResourceQuantity, len(*in)) + copy(*out, *in) + } + if in.Features != nil { + in, out := &in.Features, &out.Features + *out = make(map[string]bool, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Analytics != nil { + in, out := &in.Analytics, &out.Analytics + *out = new(Analytics) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new License. +func (in *License) DeepCopy() *License { + if in == nil { + return nil + } + out := new(License) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Request) DeepCopyInto(out *Request) { + *out = *in + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Request. +func (in *Request) DeepCopy() *Request { + if in == nil { + return nil + } + out := new(Request) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceQuantity) DeepCopyInto(out *ResourceQuantity) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuantity. +func (in *ResourceQuantity) DeepCopy() *ResourceQuantity { + if in == nil { + return nil + } + out := new(ResourceQuantity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StandardRequestInput) DeepCopyInto(out *StandardRequestInput) { + *out = *in + if in.InstanceTokenAuth != nil { + in, out := &in.InstanceTokenAuth, &out.InstanceTokenAuth + *out = new(InstanceTokenAuth) + **out = **in + } + out.StandardRequestInputFrontEnd = in.StandardRequestInputFrontEnd + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandardRequestInput. +func (in *StandardRequestInput) DeepCopy() *StandardRequestInput { + if in == nil { + return nil + } + out := new(StandardRequestInput) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StandardRequestInputFrontEnd) DeepCopyInto(out *StandardRequestInputFrontEnd) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandardRequestInputFrontEnd. +func (in *StandardRequestInputFrontEnd) DeepCopy() *StandardRequestInputFrontEnd { + if in == nil { + return nil + } + out := new(StandardRequestInputFrontEnd) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StandardRequestOutput) DeepCopyInto(out *StandardRequestOutput) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandardRequestOutput. +func (in *StandardRequestOutput) DeepCopy() *StandardRequestOutput { + if in == nil { + return nil + } + out := new(StandardRequestOutput) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/doc.go b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/doc.go new file mode 100644 index 000000000..4f20d1921 --- /dev/null +++ b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/doc.go @@ -0,0 +1,13 @@ +// Api versions allow the api contract for a resource to be changed while keeping +// backward compatibility by support multiple concurrent versions +// of the same resource + +//go:generate go run ../../../../vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i . -h ../../../../boilerplate.go.txt +//go:generate go run ../../../../vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go -O zz_generated.defaults -i . -h ../../../../boilerplate.go.txt +//go:generate go run ../../../../vendor/k8s.io/code-generator/cmd/conversion-gen/main.go -O zz_generated.conversion -i . -h ../../../../boilerplate.go.txt + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:defaulter-gen=TypeMeta +// +groupName=policy.jspolicy.com +package v1beta1 // import "github.com/loft-sh/jspolicy/apis/policy/v1beta1" diff --git a/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/groupversion_info.go b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/groupversion_info.go new file mode 100644 index 000000000..0d521beed --- /dev/null +++ b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/groupversion_info.go @@ -0,0 +1,23 @@ +// Package v1beta1 contains API Schema definitions for the config v1beta1 API group +// +kubebuilder:object:generate=true +// +groupName=policy.jspolicy.com +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "policy.jspolicy.com", Version: "v1beta1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme + + // SchemeGroupVersion is a shim that expect this to be present in the api package + SchemeGroupVersion = GroupVersion +) diff --git a/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/jspolicy_types.go b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/jspolicy_types.go new file mode 100644 index 000000000..6ba5734ab --- /dev/null +++ b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/jspolicy_types.go @@ -0,0 +1,261 @@ +package v1beta1 + +import ( + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// JsPolicy holds the webhook configuration +// +k8s:openapi-gen=true +// +kubebuilder:subresource:status +type JsPolicy struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec JsPolicySpec `json:"spec,omitempty"` + Status JsPolicyStatus `json:"status,omitempty"` +} + +type JsPolicySpec struct { + // Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * + // for all of those operations and any future admission operations that are added. + // If '*' is present, the length of the slice must be one. + // Required. + Operations []admissionregistrationv1.OperationType `json:"operations,omitempty" protobuf:"bytes,1,rep,name=operations,casttype=OperationType"` + + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' means pods. + // 'pods/log' means the log subresource of pods. + // '*' means all resources, but not subresources. + // 'pods/*' means all subresources of pods. + // '*/scale' means all scale subresources. + // '*/*' means all resources and their subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // Depending on the enclosing object, subresources might not be allowed. + // Required. + Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"` + + // APIGroups is the API groups the resources belong to. '*' is all groups. + // If '*' is present, the length of the slice must be one. + // +optional + APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,1,rep,name=apiGroups"` + + // APIVersions is the API versions the resources belong to. '*' is all versions. + // If '*' is present, the length of the slice must be one. + // +optional + APIVersions []string `json:"apiVersions,omitempty" protobuf:"bytes,2,rep,name=apiVersions"` + + // scope specifies the scope of this rule. + // Valid values are "Cluster", "Namespaced", and "*" + // "Cluster" means that only cluster-scoped resources will match this rule. + // Namespace API objects are cluster-scoped. + // "Namespaced" means that only namespaced resources will match this rule. + // "*" means that there are no scope restrictions. + // Subresources match the scope of their parent resource. + // Default is "*". + // + // +optional + Scope *admissionregistrationv1.ScopeType `json:"scope,omitempty" protobuf:"bytes,4,rep,name=scope"` + + // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - + // allowed values are Ignore or Fail. Defaults to Fail. + // +optional + FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"` + + // matchPolicy defines how the "rules" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + // + // Defaults to "Equivalent" + // +optional + MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty" protobuf:"bytes,9,opt,name=matchPolicy,casttype=MatchPolicyType"` + + // NamespaceSelector decides whether to run the webhook on an object based + // on whether the namespace for that object matches the selector. If the + // object itself is a namespace, the matching is performed on + // object.metadata.labels. If the object is another cluster scoped resource, + // it never skips the webhook. + // + // For example, to run the webhook on any objects whose namespace is not + // associated with "runlevel" of "0" or "1"; you will set the selector as + // follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "runlevel", + // "operator": "NotIn", + // "values": [ + // "0", + // "1" + // ] + // } + // ] + // } + // + // If instead you want to only run the webhook on any objects whose + // namespace is associated with the "environment" of "prod" or "staging"; + // you will set the selector as follows: + // "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "environment", + // "operator": "In", + // "values": [ + // "prod", + // "staging" + // ] + // } + // ] + // } + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + // for more examples of label selectors. + // + // Default to the empty LabelSelector, which matches everything. + // +optional + NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,5,opt,name=namespaceSelector"` + + // ObjectSelector decides whether to run the webhook based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the webhook, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + // +optional + ObjectSelector *metav1.LabelSelector `json:"objectSelector,omitempty" protobuf:"bytes,10,opt,name=objectSelector"` + + // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, + // the webhook call will be ignored or the API call will fail based on the + // failure policy. + // The timeout value must be between 1 and 30 seconds. + // Default to 10 seconds. + // +optional + TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,7,opt,name=timeoutSeconds"` + + // Violation policy describes how violations should be handled. You can either specify deny (which is the default), + // warn or dry. + // +optional + ViolationPolicy *ViolationPolicyType `json:"violationPolicy,omitempty"` + + // AuditPolicy defines if violations should be logged to the webhook status or not. By default, violations + // will be logged to the CRD status. + // +optional + AuditPolicy *AuditPolicyType `json:"auditPolicy,omitempty"` + + // AuditLogSize defines how many violations should be logged in the status. Defaults to 10 + // +optional + AuditLogSize *int32 `json:"auditLogSize,omitempty"` + + // Type defines what kind of policy the object represents. Valid values are Validating, Mutating and + // Controller. Defaults to Validating. + // +optional + Type PolicyType `json:"type,omitempty"` + + // Dependencies is a map of npm modules this webhook should be bundled with + // +optional + Dependencies map[string]string `json:"dependencies,omitempty"` + + // JavaScript is the payload of the webhook that will be executed. If this is not defined, + // jsPolicy expects the user to create a JsPolicyBundle for this policy. + // +optional + JavaScript string `json:"javascript,omitempty"` +} + +type JsPolicyStatus struct { + // Phase describes how the syncing status of the webhook is + // +optional + Phase WebhookPhase `json:"phase,omitempty"` + + // Reason holds the error in machine readable language if the webhook is in a failed state + // +optional + Reason string `json:"reason,omitempty"` + + // Message describes the error in human readable language if the webhook is in a failed state + // +optional + Message string `json:"message,omitempty"` + + // BundleHash is used to determine if we have to re-bundle the javascript + // +optional + BundleHash string `json:"bundleHash,omitempty"` +} + +// PolicyType is the type of a JsPolicy +type PolicyType string + +const ( + // PolicyTypeValidating indicates that the JsPolicy should be a Validating webhook + PolicyTypeValidating PolicyType = "Validating" + // PolicyTypeMutating indicates that the JsPolicy should be a Mutating webhook + PolicyTypeMutating PolicyType = "Mutating" + // PolicyTypeController indicates that the JsPolicy should be a Kubernetes controller + PolicyTypeController PolicyType = "Controller" +) + +// ViolationPolicyType specify how to handle violations +type ViolationPolicyType string + +const ( + // ViolationPolicyPolicyDeny indicates that the webhook should deny the request + // if it violates the specified javascript rule. + ViolationPolicyPolicyDeny ViolationPolicyType = "Deny" + // ViolationPolicyPolicyWarn indicates that the webhook should warn the user that + // the request violates the specified javascript rule. + ViolationPolicyPolicyWarn ViolationPolicyType = "Warn" + // ViolationPolicyPolicyDry indicates that the webhook should record the violation + // but not deny or warn the user about it. + ViolationPolicyPolicyDry ViolationPolicyType = "Dry" + // ViolationPolicyPolicyController indicates that the violation was written by + // a controller policy that did not do any action. + ViolationPolicyPolicyController ViolationPolicyType = "Controller" +) + +type AuditPolicyType string + +const ( + AuditPolicyLog AuditPolicyType = "Log" + AuditPolicySkip AuditPolicyType = "Skip" +) + +type WebhookPhase string + +const ( + WebhookPhaseSynced WebhookPhase = "Synced" + WebhookPhaseFailed WebhookPhase = "Failed" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// JsPolicyList contains a list of JsPolicy +type JsPolicyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []JsPolicy `json:"items"` +} + +func init() { + SchemeBuilder.Register(&JsPolicy{}, &JsPolicyList{}) +} diff --git a/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/jspolicybundle_types.go b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/jspolicybundle_types.go new file mode 100644 index 000000000..0240df6a9 --- /dev/null +++ b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/jspolicybundle_types.go @@ -0,0 +1,42 @@ +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// JsPolicyBundle holds the bundled payload +// +k8s:openapi-gen=true +// +kubebuilder:subresource:status +type JsPolicyBundle struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec JsPolicyBundleSpec `json:"spec,omitempty"` + Status JsPolicyBundleStatus `json:"status,omitempty"` +} + +type JsPolicyBundleSpec struct { + // Bundle holds the bundled payload (including dependencies and minified javascript code) + // +optional + Bundle []byte `json:"bundle,omitempty"` +} + +type JsPolicyBundleStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// JsPolicyBundleList contains a list of JsPolicyBundle +type JsPolicyBundleList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []JsPolicyBundle `json:"items"` +} + +func init() { + SchemeBuilder.Register(&JsPolicyBundle{}, &JsPolicyBundleList{}) +} diff --git a/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/jspolicyviolations_types.go b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/jspolicyviolations_types.go new file mode 100644 index 000000000..b877e8081 --- /dev/null +++ b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/jspolicyviolations_types.go @@ -0,0 +1,104 @@ +package v1beta1 + +import ( + admissionv1 "k8s.io/api/admission/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// JsPolicyViolations holds the webhook configuration +// +k8s:openapi-gen=true +// +kubebuilder:subresource:status +type JsPolicyViolations struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec JsPolicyViolationsSpec `json:"spec,omitempty"` + Status JsPolicyViolationsStatus `json:"status,omitempty"` +} + +type JsPolicyViolationsSpec struct { +} + +type JsPolicyViolationsStatus struct { + // Violations is an array of violations that were recorded by the webhook + // +optional + Violations []PolicyViolation `json:"violations,omitempty"` +} + +type PolicyViolation struct { + // Action holds the the action type the webhook reacted with + // +optional + Action string `json:"action,omitempty"` + + // Code is the error code that was returned to the client + // +optional + Code int32 `json:"code,omitempty"` + + // Reason is the error reason that was returned to the client + // +optional + Reason string `json:"reason,omitempty"` + + // Message holds the message that was sent to the client + // +optional + Message string `json:"message,omitempty"` + + // The request this violation is about + // +optional + RequestInfo *RequestInfo `json:"requestInfo,omitempty"` + + // The user that sent the request + // +optional + UserInfo *UserInfo `json:"userInfo,omitempty"` + + // The timestamp when this violation has occurred + // +optional + Timestamp metav1.Time `json:"timestamp,omitempty"` +} + +type RequestInfo struct { + // Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and + // rely on the server to generate the name. If that is the case, this field will contain an empty string. + // +optional + Name string `json:"name,omitempty"` + // Namespace is the namespace associated with the request (if any). + // +optional + Namespace string `json:"namespace,omitempty"` + // Kind is the type of object being submitted (for example, Pod or Deployment) + // +optional + Kind string `json:"kind,omitempty"` + // Kind is the type of object being submitted (for example, Pod or Deployment) + // +optional + APIVersion string `json:"apiVersion,omitempty"` + // Operation is the operation being performed. This may be different than the operation + // requested. e.g. a patch can result in either a CREATE or UPDATE Operation. + // +optional + Operation admissionv1.Operation `json:"operation,omitempty"` +} + +type UserInfo struct { + // The name that uniquely identifies this user among all active users. + // +optional + Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"` + // A unique value that identifies this user across time. If this user is + // deleted and another user by the same name is added, they will have + // different UIDs. + // +optional + UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// JsPolicyViolationsList contains a list of JsPolicyViolations +type JsPolicyViolationsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []JsPolicyViolations `json:"items"` +} + +func init() { + SchemeBuilder.Register(&JsPolicyViolations{}, &JsPolicyViolationsList{}) +} diff --git a/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..1d8d51f92 --- /dev/null +++ b/vendor/github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,449 @@ +// +build !ignore_autogenerated + +/* +Copyright 2021 Loft Labs Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicy) DeepCopyInto(out *JsPolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicy. +func (in *JsPolicy) DeepCopy() *JsPolicy { + if in == nil { + return nil + } + out := new(JsPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *JsPolicy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicyBundle) DeepCopyInto(out *JsPolicyBundle) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyBundle. +func (in *JsPolicyBundle) DeepCopy() *JsPolicyBundle { + if in == nil { + return nil + } + out := new(JsPolicyBundle) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *JsPolicyBundle) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicyBundleList) DeepCopyInto(out *JsPolicyBundleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]JsPolicyBundle, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyBundleList. +func (in *JsPolicyBundleList) DeepCopy() *JsPolicyBundleList { + if in == nil { + return nil + } + out := new(JsPolicyBundleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *JsPolicyBundleList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicyBundleSpec) DeepCopyInto(out *JsPolicyBundleSpec) { + *out = *in + if in.Bundle != nil { + in, out := &in.Bundle, &out.Bundle + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyBundleSpec. +func (in *JsPolicyBundleSpec) DeepCopy() *JsPolicyBundleSpec { + if in == nil { + return nil + } + out := new(JsPolicyBundleSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicyBundleStatus) DeepCopyInto(out *JsPolicyBundleStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyBundleStatus. +func (in *JsPolicyBundleStatus) DeepCopy() *JsPolicyBundleStatus { + if in == nil { + return nil + } + out := new(JsPolicyBundleStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicyList) DeepCopyInto(out *JsPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]JsPolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyList. +func (in *JsPolicyList) DeepCopy() *JsPolicyList { + if in == nil { + return nil + } + out := new(JsPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *JsPolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicySpec) DeepCopyInto(out *JsPolicySpec) { + *out = *in + if in.Operations != nil { + in, out := &in.Operations, &out.Operations + *out = make([]v1.OperationType, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.APIGroups != nil { + in, out := &in.APIGroups, &out.APIGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.APIVersions != nil { + in, out := &in.APIVersions, &out.APIVersions + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Scope != nil { + in, out := &in.Scope, &out.Scope + *out = new(v1.ScopeType) + **out = **in + } + if in.FailurePolicy != nil { + in, out := &in.FailurePolicy, &out.FailurePolicy + *out = new(v1.FailurePolicyType) + **out = **in + } + if in.MatchPolicy != nil { + in, out := &in.MatchPolicy, &out.MatchPolicy + *out = new(v1.MatchPolicyType) + **out = **in + } + if in.NamespaceSelector != nil { + in, out := &in.NamespaceSelector, &out.NamespaceSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.ObjectSelector != nil { + in, out := &in.ObjectSelector, &out.ObjectSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.TimeoutSeconds != nil { + in, out := &in.TimeoutSeconds, &out.TimeoutSeconds + *out = new(int32) + **out = **in + } + if in.ViolationPolicy != nil { + in, out := &in.ViolationPolicy, &out.ViolationPolicy + *out = new(ViolationPolicyType) + **out = **in + } + if in.AuditPolicy != nil { + in, out := &in.AuditPolicy, &out.AuditPolicy + *out = new(AuditPolicyType) + **out = **in + } + if in.AuditLogSize != nil { + in, out := &in.AuditLogSize, &out.AuditLogSize + *out = new(int32) + **out = **in + } + if in.Dependencies != nil { + in, out := &in.Dependencies, &out.Dependencies + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicySpec. +func (in *JsPolicySpec) DeepCopy() *JsPolicySpec { + if in == nil { + return nil + } + out := new(JsPolicySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicyStatus) DeepCopyInto(out *JsPolicyStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyStatus. +func (in *JsPolicyStatus) DeepCopy() *JsPolicyStatus { + if in == nil { + return nil + } + out := new(JsPolicyStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicyViolations) DeepCopyInto(out *JsPolicyViolations) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyViolations. +func (in *JsPolicyViolations) DeepCopy() *JsPolicyViolations { + if in == nil { + return nil + } + out := new(JsPolicyViolations) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *JsPolicyViolations) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicyViolationsList) DeepCopyInto(out *JsPolicyViolationsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]JsPolicyViolations, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyViolationsList. +func (in *JsPolicyViolationsList) DeepCopy() *JsPolicyViolationsList { + if in == nil { + return nil + } + out := new(JsPolicyViolationsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *JsPolicyViolationsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicyViolationsSpec) DeepCopyInto(out *JsPolicyViolationsSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyViolationsSpec. +func (in *JsPolicyViolationsSpec) DeepCopy() *JsPolicyViolationsSpec { + if in == nil { + return nil + } + out := new(JsPolicyViolationsSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsPolicyViolationsStatus) DeepCopyInto(out *JsPolicyViolationsStatus) { + *out = *in + if in.Violations != nil { + in, out := &in.Violations, &out.Violations + *out = make([]PolicyViolation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyViolationsStatus. +func (in *JsPolicyViolationsStatus) DeepCopy() *JsPolicyViolationsStatus { + if in == nil { + return nil + } + out := new(JsPolicyViolationsStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyViolation) DeepCopyInto(out *PolicyViolation) { + *out = *in + if in.RequestInfo != nil { + in, out := &in.RequestInfo, &out.RequestInfo + *out = new(RequestInfo) + **out = **in + } + if in.UserInfo != nil { + in, out := &in.UserInfo, &out.UserInfo + *out = new(UserInfo) + **out = **in + } + in.Timestamp.DeepCopyInto(&out.Timestamp) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyViolation. +func (in *PolicyViolation) DeepCopy() *PolicyViolation { + if in == nil { + return nil + } + out := new(PolicyViolation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequestInfo) DeepCopyInto(out *RequestInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestInfo. +func (in *RequestInfo) DeepCopy() *RequestInfo { + if in == nil { + return nil + } + out := new(RequestInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserInfo) DeepCopyInto(out *UserInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserInfo. +func (in *UserInfo) DeepCopy() *UserInfo { + if in == nil { + return nil + } + out := new(UserInfo) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/backup.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/backup.go new file mode 100644 index 000000000..d31a53e3b --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/backup.go @@ -0,0 +1,782 @@ +package cmd + +import ( + "context" + "fmt" + "os" + "strings" + + "github.com/ghodss/yaml" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + loftclient "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/log" + "github.com/loft-sh/log/survey" + "github.com/pkg/errors" + "github.com/spf13/cobra" + corev1 "k8s.io/api/core/v1" + kerrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/kubernetes" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" +) + +var ( + scheme = runtime.NewScheme() + + _ = clientgoscheme.AddToScheme(scheme) + _ = storagev1.AddToScheme(scheme) +) + +// BackupCmd holds the cmd flags +type BackupCmd struct { + *flags.GlobalFlags + + Namespace string + Skip []string + Filename string + + Log log.Logger +} + +// NewBackupCmd creates a new command +func NewBackupCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &BackupCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("backup", ` +Backup creates a backup for the Loft management plane + +Example: +loft backup +######################################################## + `) + + c := &cobra.Command{ + Use: "backup", + Short: product.Replace("Create a loft management plane backup"), + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd, args) + }, + } + + c.Flags().StringSliceVar(&cmd.Skip, "skip", []string{}, "What resources the backup should skip. Valid options are: users, teams, accesskeys, sharedsecrets, clusters and clusteraccounttemplates") + c.Flags().StringVar(&cmd.Namespace, "namespace", "loft", product.Replace("The namespace to loft was installed into")) + c.Flags().StringVar(&cmd.Filename, "filename", "backup.yaml", "The filename to write the backup to") + return c +} + +// Run executes the functionality +func (cmd *BackupCmd) Run(cobraCmd *cobra.Command, args []string) error { + // first load the kube config + kubeClientConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(clientcmd.NewDefaultClientConfigLoadingRules(), &clientcmd.ConfigOverrides{}) + + // load the raw config + kubeConfig, err := kubeClientConfig.ClientConfig() + if err != nil { + return fmt.Errorf("there is an error loading your current kube config (%w), please make sure you have access to a kubernetes cluster and the command `kubectl get namespaces` is working", err) + } + + kubeClient, err := kubernetes.NewForConfig(kubeConfig) + if err != nil { + return fmt.Errorf("there is an error loading your current kube config (%w), please make sure you have access to a kubernetes cluster and the command `kubectl get namespaces` is working", err) + } + + isInstalled, err := clihelper.IsLoftAlreadyInstalled(cobraCmd.Context(), kubeClient, cmd.Namespace) + if err != nil { + return err + } else if !isInstalled { + answer, err := cmd.Log.Question(&survey.QuestionOptions{ + Question: product.Replace("Seems like Loft was not installed into namespace %s, do you want to continue?"), + DefaultValue: "Yes", + Options: []string{"Yes", "No"}, + }) + if err != nil || answer != "Yes" { + return err + } + } + + ctx := cobraCmd.Context() + + objects := []runtime.Object{} + if !contains(cmd.Skip, "clusterroletemplates") { + cmd.Log.Info("Backing up clusterroletemplates...") + objs, err := backupClusterRoles(ctx, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup clusterroletemplates")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "clusteraccesses") { + cmd.Log.Info("Backing up clusteraccesses...") + users, err := backupClusterAccess(ctx, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup clusteraccesses")) + } else { + objects = append(objects, users...) + } + } + if !contains(cmd.Skip, "spaceconstraints") { + cmd.Log.Info("Backing up spaceconstraints...") + objs, err := backupSpaceConstraints(ctx, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup spaceconstraints")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "users") { + cmd.Log.Info("Backing up users...") + objs, err := backupUsers(ctx, kubeClient, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup users")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "teams") { + cmd.Log.Info("Backing up teams...") + objs, err := backupTeams(ctx, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup teams")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "sharedsecrets") { + cmd.Log.Info("Backing up shared secrets...") + objs, err := backupSharedSecrets(ctx, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup shared secrets")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "accesskeys") { + cmd.Log.Info("Backing up access keys...") + objs, err := backupAccessKeys(ctx, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup access keys")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "apps") { + cmd.Log.Info("Backing up apps...") + objs, err := backupApps(ctx, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup apps")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "spacetemplates") { + cmd.Log.Info("Backing up space templates...") + objs, err := backupSpaceTemplates(ctx, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup space templates")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "virtualclustertemplates") { + cmd.Log.Info("Backing up virtual cluster templates...") + objs, err := backupVirtualClusterTemplate(ctx, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup virtual cluster templates")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "clusters") { + cmd.Log.Info("Backing up clusters...") + objs, err := backupClusters(ctx, kubeClient, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup clusters")) + } else { + objects = append(objects, objs...) + } + } + projects := []string{} + if !contains(cmd.Skip, "projects") { + cmd.Log.Info("Backing up projects...") + objs, projectNames, err := backupProjects(ctx, kubeConfig) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup projects")) + } else { + objects = append(objects, objs...) + } + + projects = projectNames + } + if len(projects) > 0 { + if !contains(cmd.Skip, "virtualclusterinstances") { + cmd.Log.Info("Backing up virtualcluster instances...") + objs, err := backupVirtualClusterInstances(ctx, kubeConfig, projects) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup virtualcluster instances")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "spaceinstances") { + cmd.Log.Info("Backing up space instances...") + objs, err := backupSpaceInstances(ctx, kubeConfig, projects) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup space instances")) + } else { + objects = append(objects, objs...) + } + } + if !contains(cmd.Skip, "projectsecrets") { + cmd.Log.Info("Backing up project secrets...") + objs, err := backupProjectSecrets(ctx, kubeClient, projects) + if err != nil { + cmd.Log.Warn(errors.Wrap(err, "backup project secrets")) + } else { + objects = append(objects, objs...) + } + } + } + + // create a file + retString := []string{} + for _, o := range objects { + out, err := yaml.Marshal(o) + if err != nil { + return errors.Wrap(err, "marshal object") + } + + retString = append(retString, string(out)) + } + + cmd.Log.Infof("Writing backup to %s...", cmd.Filename) + err = os.WriteFile(cmd.Filename, []byte(strings.Join(retString, "\n---\n")), 0644) + if err != nil { + return err + } + + cmd.Log.Donef("Wrote backup to %s", cmd.Filename) + return nil +} + +func backupProjects(ctx context.Context, rest *rest.Config) ([]runtime.Object, []string, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, nil, err + } + + projectList, err := loftClient.StorageV1().Projects().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, nil, err + } + + retList := []runtime.Object{} + + projectNames := []string{} + for _, project := range projectList.Items { + u := project + + err := resetMetadata(&u) + if err != nil { + return nil, nil, err + } + + retList = append(retList, &u) + projectNames = append(projectNames, u.Name) + } + + return retList, projectNames, nil +} + +func backupVirtualClusterInstances(ctx context.Context, rest *rest.Config, projects []string) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, projectName := range projects { + virtualClusterInstanceList, err := loftClient.StorageV1().VirtualClusterInstances(naming.ProjectNamespace(projectName)).List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + for _, o := range virtualClusterInstanceList.Items { + u := o + u.Status = storagev1.VirtualClusterInstanceStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + } + + return retList, nil +} + +func backupSpaceInstances(ctx context.Context, rest *rest.Config, projects []string) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, projectName := range projects { + spaceInstanceList, err := loftClient.StorageV1().SpaceInstances(naming.ProjectNamespace(projectName)).List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + for _, o := range spaceInstanceList.Items { + u := o + u.Status = storagev1.SpaceInstanceStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + } + + return retList, nil +} + +func backupProjectSecrets(ctx context.Context, kubeClient kubernetes.Interface, projects []string) ([]runtime.Object, error) { + retList := []runtime.Object{} + for _, projectName := range projects { + secretList, err := kubeClient.CoreV1().Secrets(naming.ProjectNamespace(projectName)).List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + for _, secret := range secretList.Items { + u := secret + + if !isProjectSecret(u) { + continue + } + + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + } + + return retList, nil +} + +func backupClusters(ctx context.Context, kubeClient kubernetes.Interface, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + clusterList, err := loftClient.StorageV1().Clusters().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, o := range clusterList.Items { + u := o + u.Status = storagev1.ClusterStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + + // find user secrets + if u.Spec.Config.SecretName != "" { + secret, err := getSecret(ctx, kubeClient, u.Spec.Config.SecretNamespace, u.Spec.Config.SecretName) + if err != nil { + return nil, errors.Wrap(err, "get cluster secret") + } else if secret != nil { + retList = append(retList, secret) + } + } + } + + return retList, nil +} + +func backupClusterRoles(ctx context.Context, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + objs, err := loftClient.StorageV1().ClusterRoleTemplates().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, o := range objs.Items { + u := o + u.Status = storagev1.ClusterRoleTemplateStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + + return retList, nil +} + +func backupSpaceConstraints(ctx context.Context, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + objs, err := loftClient.StorageV1().SpaceConstraints().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, o := range objs.Items { + u := o + u.Status = storagev1.SpaceConstraintStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + + return retList, nil +} + +func backupClusterAccess(ctx context.Context, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + objs, err := loftClient.StorageV1().ClusterAccesses().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, o := range objs.Items { + u := o + u.Status = storagev1.ClusterAccessStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + + return retList, nil +} + +func backupVirtualClusterTemplate(ctx context.Context, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + apps, err := loftClient.StorageV1().VirtualClusterTemplates().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, o := range apps.Items { + u := o + u.Status = storagev1.VirtualClusterTemplateStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + + return retList, nil +} + +func backupSpaceTemplates(ctx context.Context, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + apps, err := loftClient.StorageV1().SpaceTemplates().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, o := range apps.Items { + u := o + u.Status = storagev1.SpaceTemplateStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + + return retList, nil +} + +func backupApps(ctx context.Context, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + apps, err := loftClient.StorageV1().Apps().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, o := range apps.Items { + u := o + u.Status = storagev1.AppStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + + return retList, nil +} + +func backupAccessKeys(ctx context.Context, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + accessKeyList, err := loftClient.StorageV1().AccessKeys().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, o := range accessKeyList.Items { + u := o + u.Status = storagev1.AccessKeyStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + + return retList, nil +} + +func backupSharedSecrets(ctx context.Context, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + sharedSecretList, err := loftClient.StorageV1().SharedSecrets("").List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, sharedSecret := range sharedSecretList.Items { + u := sharedSecret + u.Status = storagev1.SharedSecretStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + + return retList, nil +} + +func backupTeams(ctx context.Context, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + teamList, err := loftClient.StorageV1().Teams().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, team := range teamList.Items { + u := team + u.Status = storagev1.TeamStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + } + + return retList, nil +} + +func backupUsers(ctx context.Context, kubeClient kubernetes.Interface, rest *rest.Config) ([]runtime.Object, error) { + loftClient, err := loftclient.NewForConfig(rest) + if err != nil { + return nil, err + } + + userList, err := loftClient.StorageV1().Users().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retList := []runtime.Object{} + for _, user := range userList.Items { + u := user + u.Status = storagev1.UserStatus{} + err := resetMetadata(&u) + if err != nil { + return nil, err + } + + retList = append(retList, &u) + + // find user secrets + if u.Spec.PasswordRef != nil { + secret, err := getSecret(ctx, kubeClient, u.Spec.PasswordRef.SecretNamespace, u.Spec.PasswordRef.SecretName) + if err != nil { + return nil, errors.Wrap(err, "get user secret") + } else if secret != nil { + retList = append(retList, secret) + } + } + if u.Spec.CodesRef != nil { + secret, err := getSecret(ctx, kubeClient, u.Spec.CodesRef.SecretNamespace, u.Spec.CodesRef.SecretName) + if err != nil { + return nil, errors.Wrap(err, "get user secret") + } else if secret != nil { + retList = append(retList, secret) + } + } + } + + return retList, nil +} + +func getSecret(ctx context.Context, kubeClient kubernetes.Interface, namespace, name string) (*corev1.Secret, error) { + if namespace == "" || name == "" { + return nil, nil + } + + secret, err := kubeClient.CoreV1().Secrets(namespace).Get(ctx, name, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return nil, err + } else if secret != nil { + err = resetMetadata(secret) + if err != nil { + return nil, errors.Wrap(err, "reset metadata secret") + } + + return secret, nil + } + + return nil, nil +} + +func resetMetadata(obj runtime.Object) error { + accessor, err := meta.Accessor(obj) + if err != nil { + return err + } + + accessor.SetGenerateName("") + accessor.SetSelfLink("") + accessor.SetCreationTimestamp(metav1.Time{}) + accessor.SetFinalizers(nil) + accessor.SetGeneration(0) + accessor.SetManagedFields(nil) + accessor.SetOwnerReferences(nil) + accessor.SetResourceVersion("") + accessor.SetUID("") + accessor.SetDeletionTimestamp(nil) + + gvk, err := GVKFrom(obj) + if err != nil { + return err + } + + typeAccessor, err := meta.TypeAccessor(obj) + if err != nil { + return err + } + + typeAccessor.SetKind(gvk.Kind) + typeAccessor.SetAPIVersion(gvk.GroupVersion().String()) + return nil +} + +func contains(arr []string, s string) bool { + for _, t := range arr { + if t == s { + return true + } + } + return false +} + +func isProjectSecret(secret corev1.Secret) bool { + for k, v := range secret.Labels { + if k == "loft.sh/project-secret" && v == "true" { + return true + } + } + + return false +} + +func GVKFrom(obj runtime.Object) (schema.GroupVersionKind, error) { + gvks, _, err := scheme.ObjectKinds(obj) + if err != nil { + return schema.GroupVersionKind{}, err + } else if len(gvks) != 1 { + return schema.GroupVersionKind{}, fmt.Errorf("unexpected number of object kinds: %d", len(gvks)) + } + + return gvks[0], nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/completion.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/completion.go new file mode 100644 index 000000000..fe9b060bc --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/completion.go @@ -0,0 +1,86 @@ +package cmd + +import ( + "bytes" + "os" + "text/template" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +// CompletionCmd holds the cmd flags +type CompletionCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +func NewCompletionCmd(command *cobra.Command, globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &CompletionCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("completion", ` + +To load completions: +Bash: +$ source <({{.Use}} completion bash) +# To load completions for each session, execute once: +Linux: + $ {{.Use}} completion bash > /etc/bash_completion.d/{{.Use}} +MacOS: + $ {{.Use}} completion bash > /usr/local/etc/bash_completion.d/{{.Use}} +Zsh: +# If shell completion is not already enabled in your environment you will need +# to enable it. You can execute the following once: +$ echo "autoload -U compinit; compinit" >> ~/.zshrc +# To load completions for each session, execute once: +$ {{.Use}} completion zsh > "${fpath[1]}/_{{.Use}}" +# You will need to start a new shell for this setup to take effect. +Fish: +$ {{.Use}} completion fish | source +# To load completions for each session, execute once: +$ {{.Use}} completion fish > ~/.config/fish/completions/{{.Use}}.fish + `) + tmpl, err := template.New("completion").Parse(description) + if err != nil { + panic(err) + } + var tpl bytes.Buffer + err = tmpl.Execute(&tpl, command) + if err != nil { + panic(err) + } + completionDescription := tpl.String() + + // completionCmd represents the completion command + var completionCmd = &cobra.Command{ + Use: "completion [bash|zsh|fish|powershell]", + Short: "Generate shell completion scripts", + Long: completionDescription, + DisableFlagsInUseLine: true, + ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, + Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd, args) + }, + } + return completionCmd +} + +func (cmd *CompletionCmd) Run(cobraCmd *cobra.Command, args []string) error { + switch args[0] { + case "bash": + return cobraCmd.Root().GenBashCompletion(os.Stdout) + case "zsh": + return cobraCmd.Root().GenZshCompletion(os.Stdout) + case "fish": + return cobraCmd.Root().GenFishCompletion(os.Stdout, true) + case "powershell": + return cobraCmd.Root().GenPowerShellCompletion(os.Stdout) + } + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/connect/cluster.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/connect/cluster.go new file mode 100644 index 000000000..eb402693d --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/connect/cluster.go @@ -0,0 +1,219 @@ +package connect + +import ( + "bytes" + "context" + "time" + + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/config" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/log" + "github.com/pkg/errors" + kerrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/util/wait" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/generate" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" +) + +type ClusterCmd struct { + *flags.GlobalFlags + + Namespace string + ServiceAccount string + DisplayName string + Wait bool + + Log log.Logger +} + +// NewClusterCmd creates a new command +func NewClusterCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &ClusterCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("connect cluster", ` +Connect a cluster to the Loft instance. + +Example: +loft connect cluster my-cluster +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################ devspace connect cluster ############## +######################################################## +Connect a cluster to the Loft instance. + +Example: +devspace connect cluster my-cluster +######################################################## + ` + } + c := &cobra.Command{ + Use: "cluster", + Short: product.Replace("connect current cluster to Loft"), + Long: description, + Args: cobra.ExactArgs(1), + RunE: func(cobraCmd *cobra.Command, args []string) error { + loader := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(clientcmd.NewDefaultClientConfigLoadingRules(), &clientcmd.ConfigOverrides{}) + c, err := loader.ClientConfig() + if err != nil { + return err + } + + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.Run(cobraCmd.Context(), c, args) + }, + } + + c.Flags().StringVar(&cmd.Namespace, "namespace", "loft", "The namespace to generate the service account in. The namespace will be created if it does not exist") + c.Flags().StringVar(&cmd.ServiceAccount, "service-account", "loft-admin", "The service account name to create") + c.Flags().StringVar(&cmd.DisplayName, "display-name", "", "The display name to show in the UI for this cluster") + c.Flags().BoolVar(&cmd.Wait, "wait", false, "If true, will wait until the cluster is initialized") + + return c +} + +func (cmd *ClusterCmd) Run(ctx context.Context, c *rest.Config, args []string) error { + // Get clusterName from command argument + var clusterName string = args[0] + + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + err = client.VerifyVersion(baseClient) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // get user details + user, team, err := getUserOrTeam(ctx, managementClient) + if err != nil { + return err + } + + // get cluster config + clusterConfig, err := getClusterKubeConfig(ctx, c, cmd.Namespace, cmd.ServiceAccount) + if err != nil { + return err + } + + // connect cluster + _, err = managementClient.Loft().ManagementV1().ClusterConnects().Create(ctx, &managementv1.ClusterConnect{ + ObjectMeta: metav1.ObjectMeta{ + Name: clusterName, + }, + Spec: managementv1.ClusterConnectSpec{ + Config: clusterConfig.String(), + AdminUser: user, + ClusterTemplate: managementv1.Cluster{ + Spec: managementv1.ClusterSpec{ + ClusterSpec: storagev1.ClusterSpec{ + DisplayName: cmd.DisplayName, + Owner: &storagev1.UserOrTeam{ + User: user, + Team: team, + }, + Access: getAccess(user, team), + }, + }, + }, + }, + }, metav1.CreateOptions{}) + if err != nil { + return err + } + + if cmd.Wait { + cmd.Log.Info("Waiting for the cluster to be initialized...") + waitErr := wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), false, func(ctx context.Context) (done bool, err error) { + clusterInstance, err := managementClient.Loft().ManagementV1().Clusters().Get(ctx, clusterName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return false, err + } + + return clusterInstance.Status.Phase == storagev1.ClusterStatusPhaseInitialized, nil + }) + if waitErr != nil { + return errors.Wrap(waitErr, "get cluster") + } + } + + cmd.Log.Donef("Successfully connected cluster %s to Loft", clusterName) + + return nil +} + +func getUserOrTeam(ctx context.Context, managementClient kube.Interface) (string, string, error) { + var user, team string + + userName, teamName, err := helper.GetCurrentUser(ctx, managementClient) + if err != nil { + return "", "", err + } + + if userName != nil { + user = userName.Name + } else { + team = teamName.Name + } + + return user, team, nil +} + +func getAccess(user, team string) []storagev1.Access { + access := []storagev1.Access{ + { + Verbs: []string{"*"}, + Subresources: []string{"*"}, + }, + } + + if team != "" { + access[0].Teams = []string{team} + } else { + access[0].Users = []string{user} + } + + return access +} + +func getClusterKubeConfig(ctx context.Context, c *rest.Config, namespace, serviceAccount string) (bytes.Buffer, error) { + var clusterConfig bytes.Buffer + + token, err := generate.GetAuthToken(ctx, c, namespace, serviceAccount) + if err != nil { + return bytes.Buffer{}, errors.Wrap(err, "get auth token") + } + + err = kubeconfig.WriteTokenKubeConfig(c, string(token), &clusterConfig) + if err != nil { + return bytes.Buffer{}, errors.Wrap(err, "write token kubeconfig") + } + + return clusterConfig, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/connect/connect.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/connect/connect.go new file mode 100644 index 000000000..52b97e9d8 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/connect/connect.go @@ -0,0 +1,29 @@ +package connect + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewConnectCmd creates a new command +func NewConnectCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + description := product.ReplaceWithHeader("connect", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################### devspace connect ################## +####################################################### + ` + } + connectCmd := &cobra.Command{ + Use: "connect", + Short: product.Replace("Connects a cluster to Loft"), + Long: description, + Args: cobra.NoArgs, + } + + connectCmd.AddCommand(NewClusterCmd(globalFlags)) + return connectCmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/create.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/create.go new file mode 100644 index 000000000..2082c5633 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/create.go @@ -0,0 +1,30 @@ +package create + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewCreateCmd creates a new cobra command +func NewCreateCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + description := product.ReplaceWithHeader("create", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +##################### loft create ##################### +####################################################### + ` + } + c := &cobra.Command{ + Use: "create", + Short: product.Replace("Creates loft resources"), + Long: description, + Args: cobra.NoArgs, + } + c.AddCommand(NewSpaceCmd(globalFlags, defaults)) + c.AddCommand(NewVirtualClusterCmd(globalFlags, defaults)) + return c +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/custom_links.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/custom_links.go new file mode 100644 index 000000000..0b6a4df52 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/custom_links.go @@ -0,0 +1,52 @@ +package create + +import ( + "strings" + + "github.com/loft-sh/log" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + // LoftCustomLinksAnnotation is applied to enumerates associated links to external websites + LoftCustomLinksAnnotation = "loft.sh/custom-links" + + // LoftCustomLinksDelimiter is the separator for the values of the custom links annotation + LoftCustomLinksDelimiter = "\n" +) + +const linksHelpText = `Labeled Links to annotate the object with. +These links will be visible from the UI. When used with update, existing links will be replaced. +E.g. --link 'Prod=http://exampleprod.com,Dev=http://exampledev.com'` + +// SetCustomLinksAnnotation sets the list of links for the UI to display next to the project member({space/virtualcluster}instance) +// it handles unspecified links (empty) during create and update +func SetCustomLinksAnnotation(obj metav1.Object, links []string) bool { + var changed bool + if obj == nil { + log.GetInstance().Error("SetCustomLinksAnnotation called on nil object") + return false + } + annotations := obj.GetAnnotations() + if annotations == nil { + annotations = map[string]string{} + } + if len(links) > 0 { + var trimmedLinks string + for i, link := range links { + trimmedLink := strings.TrimSpace(link) + if trimmedLink != "" { + if i != 0 { + trimmedLink = LoftCustomLinksDelimiter + trimmedLink + } + trimmedLinks += trimmedLink + } + } + if trimmedLinks != "" { + changed = true + annotations[LoftCustomLinksAnnotation] = trimmedLinks + } + } + obj.SetAnnotations(annotations) + return changed +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/space.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/space.go new file mode 100644 index 000000000..35b5f2950 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/space.go @@ -0,0 +1,647 @@ +package create + +import ( + "context" + "fmt" + "os" + "strconv" + "time" + + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + "github.com/loft-sh/loftctl/v3/pkg/config" + "github.com/loft-sh/loftctl/v3/pkg/space" + "github.com/loft-sh/loftctl/v3/pkg/util" + "k8s.io/apimachinery/pkg/util/wait" + client2 "sigs.k8s.io/controller-runtime/pkg/client" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/loftctl/v3/pkg/constants" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/parameters" + "github.com/loft-sh/loftctl/v3/pkg/task" + "github.com/loft-sh/loftctl/v3/pkg/version" + kerrors "k8s.io/apimachinery/pkg/api/errors" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/pkg/errors" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// SpaceCmd holds the cmd flags +type SpaceCmd struct { + *flags.GlobalFlags + + SleepAfter int64 + DeleteAfter int64 + Cluster string + Project string + CreateContext bool + SwitchContext bool + DisableDirectClusterEndpoint bool + Template string + Version string + Set []string + ParametersFile string + SkipWait bool + + UseExisting bool + Recreate bool + Update bool + + DisplayName string + Description string + Links []string + + User string + Team string + + Log log.Logger +} + +// NewSpaceCmd creates a new command +func NewSpaceCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &SpaceCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + description := product.ReplaceWithHeader("create space", ` +Creates a new space for the given project, if +it does not yet exist. + +Example: +loft create space myspace +loft create space myspace --project myproject +loft create space myspace --project myproject --team myteam +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################ devspace create space ################# +######################################################## +Creates a new space for the given project, if +it does not yet exist. + +Example: +devspace create space myspace +devspace create space myspace --project myproject +devspace create space myspace --project myproject --team myteam +######################################################## + ` + } + c := &cobra.Command{ + Use: "space" + util.SpaceNameOnlyUseLine, + Short: "Creates a new space in the given cluster", + Long: description, + Args: util.SpaceNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVar(&cmd.DisplayName, "display-name", "", "The display name to show in the UI for this space") + c.Flags().StringVar(&cmd.Description, "description", "", "The description to show in the UI for this space") + c.Flags().StringSliceVar(&cmd.Links, "link", []string{}, linksHelpText) + c.Flags().StringVar(&cmd.Cluster, "cluster", "", "The cluster to use") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().StringVar(&cmd.User, "user", "", "The user to create the space for") + c.Flags().StringVar(&cmd.Team, "team", "", "The team to create the space for") + c.Flags().Int64Var(&cmd.SleepAfter, "sleep-after", 0, "DEPRECATED: If set to non zero, will tell the space to sleep after specified seconds of inactivity") + c.Flags().Int64Var(&cmd.DeleteAfter, "delete-after", 0, "DEPRECATED: If set to non zero, will tell loft to delete the space after specified seconds of inactivity") + c.Flags().BoolVar(&cmd.CreateContext, "create-context", true, product.Replace("If loft should create a kube context for the space")) + c.Flags().BoolVar(&cmd.SwitchContext, "switch-context", true, product.Replace("If loft should switch the current context to the new context")) + c.Flags().BoolVar(&cmd.SkipWait, "skip-wait", false, "If true, will not wait until the space is running") + c.Flags().BoolVar(&cmd.Recreate, "recreate", false, product.Replace("If enabled and there already exists a space with this name, Loft will delete it first")) + c.Flags().BoolVar(&cmd.Update, "update", false, "If enabled and a space already exists, will update the template, version and parameters") + c.Flags().BoolVar(&cmd.UseExisting, "use", false, product.Replace("If loft should use the space if its already there")) + c.Flags().StringVar(&cmd.Template, "template", "", "The space template to use") + c.Flags().StringVar(&cmd.Version, "version", "", "The template version to use") + c.Flags().StringSliceVar(&cmd.Set, "set", []string{}, "Allows specific template parameters to be set. E.g. --set myParameter=myValue") + c.Flags().StringVar(&cmd.ParametersFile, "parameters", "", "The file where the parameter values for the apps are specified") + c.Flags().BoolVar(&cmd.DisableDirectClusterEndpoint, "disable-direct-cluster-endpoint", false, "When enabled does not use an available direct cluster endpoint to connect to the space") + return c +} + +// Run executes the command +func (cmd *SpaceCmd) Run(ctx context.Context, args []string) error { + spaceName := args[0] + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + err = client.VerifyVersion(baseClient) + if err != nil { + return err + } + + // determine cluster name + cmd.Cluster, cmd.Project, err = helper.SelectProjectOrCluster(baseClient, cmd.Cluster, cmd.Project, cmd.Log) + if err != nil { + return err + } + + // create legacy space? + if cmd.Project == "" { + // create legacy space + return cmd.legacyCreateSpace(ctx, baseClient, spaceName) + } + + // create space + return cmd.createSpace(ctx, baseClient, spaceName) +} + +func (cmd *SpaceCmd) createSpace(ctx context.Context, baseClient client.Client, spaceName string) error { + spaceNamespace := naming.ProjectNamespace(cmd.Project) + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // get current user / team + if cmd.User == "" && cmd.Team == "" { + userName, teamName, err := helper.GetCurrentUser(ctx, managementClient) + if err != nil { + return err + } + if userName != nil { + cmd.User = userName.Name + } else { + cmd.Team = teamName.Name + } + } + + // delete the existing cluster if needed + if cmd.Recreate { + _, err := managementClient.Loft().ManagementV1().SpaceInstances(spaceNamespace).Get(ctx, spaceName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return fmt.Errorf("couldn't retrieve space instance: %w", err) + } else if err == nil { + // delete the space + err = managementClient.Loft().ManagementV1().SpaceInstances(spaceNamespace).Delete(ctx, spaceName, metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return fmt.Errorf("couldn't delete space instance: %w", err) + } + } + } + + var spaceInstance *managementv1.SpaceInstance + // make sure we wait until space is deleted + spaceInstance, err = managementClient.Loft().ManagementV1().SpaceInstances(spaceNamespace).Get(ctx, spaceName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return fmt.Errorf("couldn't retrieve space instance: %w", err) + } else if err == nil && spaceInstance.DeletionTimestamp != nil { + cmd.Log.Infof("Waiting until space is deleted...") + + // wait until the space instance is deleted + waitErr := wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), false, func(ctx context.Context) (done bool, err error) { + spaceInstance, err = managementClient.Loft().ManagementV1().SpaceInstances(spaceNamespace).Get(ctx, spaceName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return false, err + } else if err == nil && spaceInstance.DeletionTimestamp != nil { + return false, nil + } + + return true, nil + }) + if waitErr != nil { + return errors.Wrap(err, "get space instance") + } + + spaceInstance = nil + } else if kerrors.IsNotFound(err) { + spaceInstance = nil + } + + // if the space already exists and flag is not set, we terminate + if !cmd.Update && !cmd.UseExisting && spaceInstance != nil { + return fmt.Errorf("space %s already exists in project %s", spaceName, cmd.Project) + } + + // create space if necessary + if spaceInstance == nil { + // resolve template + spaceTemplate, resolvedParameters, err := cmd.resolveTemplate(baseClient) + if err != nil { + return err + } + + // create space instance + zone, offset := time.Now().Zone() + spaceInstance = &managementv1.SpaceInstance{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: naming.ProjectNamespace(cmd.Project), + Name: spaceName, + Annotations: map[string]string{ + clusterv1.SleepModeTimezoneAnnotation: zone + "#" + strconv.Itoa(offset), + }, + }, + Spec: managementv1.SpaceInstanceSpec{ + SpaceInstanceSpec: storagev1.SpaceInstanceSpec{ + DisplayName: cmd.DisplayName, + Description: cmd.Description, + Owner: &storagev1.UserOrTeam{ + User: cmd.User, + Team: cmd.Team, + }, + TemplateRef: &storagev1.TemplateRef{ + Name: spaceTemplate.Name, + Version: cmd.Version, + }, + ClusterRef: storagev1.ClusterRef{ + Cluster: cmd.Cluster, + }, + Parameters: resolvedParameters, + }, + }, + } + SetCustomLinksAnnotation(spaceInstance, cmd.Links) + // create space + cmd.Log.Infof("Creating space %s in project %s with template %s...", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Project, "white+b"), ansi.Color(spaceTemplate.Name, "white+b")) + spaceInstance, err = managementClient.Loft().ManagementV1().SpaceInstances(spaceInstance.Namespace).Create(ctx, spaceInstance, metav1.CreateOptions{}) + if err != nil { + return errors.Wrap(err, "create space") + } + } else if cmd.Update { + // resolve template + spaceTemplate, resolvedParameters, err := cmd.resolveTemplate(baseClient) + if err != nil { + return err + } + + // update space instance + if spaceInstance.Spec.TemplateRef == nil { + return fmt.Errorf("space instance doesn't use a template, cannot update space") + } + + oldSpace := spaceInstance.DeepCopy() + + templateRefChanged := spaceInstance.Spec.TemplateRef.Name != spaceTemplate.Name + paramsChanged := spaceInstance.Spec.Parameters != resolvedParameters + versionChanged := (cmd.Version != "" && spaceInstance.Spec.TemplateRef.Version != cmd.Version) + linksChanged := SetCustomLinksAnnotation(spaceInstance, cmd.Links) + + // check if update is needed + if templateRefChanged || paramsChanged || versionChanged || linksChanged { + spaceInstance.Spec.TemplateRef.Name = spaceTemplate.Name + spaceInstance.Spec.TemplateRef.Version = cmd.Version + spaceInstance.Spec.Parameters = resolvedParameters + + patch := client2.MergeFrom(oldSpace) + patchData, err := patch.Data(spaceInstance) + if err != nil { + return errors.Wrap(err, "calculate update patch") + } + cmd.Log.Infof("Updating space %s in project %s with patch \n%s\n...", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Project, "white+b"), string(patchData)) + spaceInstance, err = managementClient.Loft().ManagementV1().SpaceInstances(spaceInstance.Namespace).Patch(ctx, spaceInstance.Name, patch.Type(), patchData, metav1.PatchOptions{}) + if err != nil { + return errors.Wrap(err, "patch space") + } + } else { + cmd.Log.Infof("Skip updating space...") + } + } + + // wait until space is ready + spaceInstance, err = space.WaitForSpaceInstance(ctx, managementClient, spaceInstance.Namespace, spaceInstance.Name, !cmd.SkipWait, cmd.Log) + if err != nil { + return err + } + cmd.Log.Donef("Successfully created the space %s in project %s", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Project, "white+b")) + + // should we create a kube context for the space + if cmd.CreateContext { + // create kube context options + contextOptions, err := use.CreateSpaceInstanceOptions(ctx, baseClient, cmd.Config, cmd.Project, spaceInstance, cmd.DisableDirectClusterEndpoint, cmd.SwitchContext, cmd.Log) + if err != nil { + return err + } + + // update kube config + err = kubeconfig.UpdateKubeConfig(contextOptions) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully updated kube context to use space %s in project %s", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Project, "white+b")) + } + + return nil +} + +func (cmd *SpaceCmd) resolveTemplate(baseClient client.Client) (*managementv1.SpaceTemplate, string, error) { + // determine space template to use + spaceTemplate, err := helper.SelectSpaceTemplate(baseClient, cmd.Project, cmd.Template, cmd.Log) + if err != nil { + return nil, "", err + } + + // get parameters + var templateParameters []storagev1.AppParameter + if len(spaceTemplate.Spec.Versions) > 0 { + if cmd.Version == "" { + latestVersion := version.GetLatestVersion(spaceTemplate) + if latestVersion == nil { + return nil, "", fmt.Errorf("couldn't find any version in template") + } + + templateParameters = latestVersion.(*storagev1.SpaceTemplateVersion).Parameters + } else { + _, latestMatched, err := version.GetLatestMatchedVersion(spaceTemplate, cmd.Version) + if err != nil { + return nil, "", err + } else if latestMatched == nil { + return nil, "", fmt.Errorf("couldn't find any matching version to %s", cmd.Version) + } + + templateParameters = latestMatched.(*storagev1.SpaceTemplateVersion).Parameters + } + } else { + templateParameters = spaceTemplate.Spec.Parameters + } + + // resolve space template parameters + resolvedParameters, err := parameters.ResolveTemplateParameters(cmd.Set, templateParameters, cmd.ParametersFile) + if err != nil { + return nil, "", err + } + + return spaceTemplate, resolvedParameters, nil +} + +func (cmd *SpaceCmd) legacyCreateSpace(ctx context.Context, baseClient client.Client, spaceName string) error { + var err error + if cmd.SkipWait { + cmd.Log.Warnf("--skip-wait is not supported for legacy space creation, please specify a project instead") + } + + // determine cluster name + if cmd.Cluster == "" { + cmd.Cluster, err = helper.SelectCluster(baseClient, cmd.Log) + if err != nil { + return err + } + } + + // determine user or team name + if cmd.User == "" && cmd.Team == "" { + user, team, err := helper.SelectUserOrTeam(baseClient, cmd.Cluster, cmd.Log) + if err != nil { + return err + } else if user != nil { + cmd.User = user.Name + } else if team != nil { + cmd.Team = team.Name + } + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // get current user / team + userName, teamName, err := helper.GetCurrentUser(ctx, managementClient) + if err != nil { + return err + } + + // create a cluster client + clusterClient, err := baseClient.Cluster(cmd.Cluster) + if err != nil { + return err + } + + // check if the cluster exists + cluster, err := managementClient.Loft().ManagementV1().Clusters().Get(ctx, cmd.Cluster, metav1.GetOptions{}) + if err != nil { + if kerrors.IsForbidden(err) { + return fmt.Errorf("cluster '%s' does not exist, or you don't have permission to use it", cmd.Cluster) + } + + return err + } + + spaceNotFound := true + if cmd.UseExisting { + _, err := clusterClient.Agent().ClusterV1().Spaces().Get(ctx, spaceName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } + + spaceNotFound = kerrors.IsNotFound(err) + } + + if spaceNotFound { + // get default space template + spaceTemplate, err := resolveSpaceTemplate(ctx, managementClient, cluster, cmd.Template) + if err != nil { + return errors.Wrap(err, "resolve space template") + } else if spaceTemplate != nil { + cmd.Log.Infof("Using space template %s to create space %s", clihelper.GetDisplayName(spaceTemplate.Name, spaceTemplate.Spec.DisplayName), spaceName) + } + + // create space object + space := &clusterv1.Space{ + ObjectMeta: metav1.ObjectMeta{ + Name: spaceName, + Annotations: map[string]string{}, + }, + } + if cmd.User != "" { + space.Spec.User = cmd.User + } else if cmd.Team != "" { + space.Spec.Team = cmd.Team + } + if spaceTemplate != nil { + space.Annotations = spaceTemplate.Spec.Template.Annotations + space.Labels = spaceTemplate.Spec.Template.Labels + if space.Annotations == nil { + space.Annotations = map[string]string{} + } + space.Annotations["loft.sh/space-template"] = spaceTemplate.Name + if spaceTemplate.Spec.Template.Objects != "" { + space.Spec.Objects = spaceTemplate.Spec.Template.Objects + } + } + if cmd.SleepAfter > 0 { + space.Annotations[clusterv1.SleepModeSleepAfterAnnotation] = strconv.FormatInt(cmd.SleepAfter, 10) + } + if cmd.DeleteAfter > 0 { + space.Annotations[clusterv1.SleepModeDeleteAfterAnnotation] = strconv.FormatInt(cmd.DeleteAfter, 10) + } + if cmd.DisplayName != "" { + space.Annotations["loft.sh/display-name"] = cmd.DisplayName + } + if cmd.Description != "" { + space.Annotations["loft.sh/description"] = cmd.Description + } + SetCustomLinksAnnotation(space, cmd.Links) + + zone, offset := time.Now().Zone() + space.Annotations[clusterv1.SleepModeTimezoneAnnotation] = zone + "#" + strconv.Itoa(offset) + + if spaceTemplate != nil && len(spaceTemplate.Spec.Template.Apps) > 0 { + createTask := &managementv1.Task{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "create-space-", + }, + Spec: managementv1.TaskSpec{ + TaskSpec: storagev1.TaskSpec{ + DisplayName: "Create Space " + spaceName, + Target: storagev1.Target{ + Cluster: &storagev1.TargetCluster{ + Cluster: cmd.Cluster, + }, + }, + Task: storagev1.TaskDefinition{ + SpaceCreationTask: &storagev1.SpaceCreationTask{ + Metadata: metav1.ObjectMeta{ + Name: space.Name, + Labels: space.Labels, + Annotations: space.Annotations, + }, + Owner: &storagev1.UserOrTeam{ + User: space.Spec.User, + Team: space.Spec.Team, + }, + }, + }, + }, + }, + } + if userName != nil { + createTask.Spec.Access = []storagev1.Access{ + { + Verbs: []string{"*"}, + Subresources: []string{"*"}, + Users: []string{userName.Name}, + }, + } + } else if teamName != nil { + createTask.Spec.Access = []storagev1.Access{ + { + Verbs: []string{"*"}, + Subresources: []string{"*"}, + Teams: []string{teamName.Name}, + }, + } + } + + apps, err := resolveApps(ctx, managementClient, spaceTemplate.Spec.Template.Apps) + if err != nil { + return errors.Wrap(err, "resolve space template apps") + } + + appsWithParameters, err := parameters.ResolveAppParameters(apps, cmd.ParametersFile, cmd.Log) + if err != nil { + return err + } + + for _, appWithParameter := range appsWithParameters { + createTask.Spec.Task.SpaceCreationTask.Apps = append(createTask.Spec.Task.SpaceCreationTask.Apps, agentstoragev1.AppReference{ + Name: appWithParameter.App.Name, + Parameters: appWithParameter.Parameters, + }) + } + + // create the task and stream + err = task.StreamTask(ctx, managementClient, createTask, os.Stdout, cmd.Log) + if err != nil { + return err + } + } else { + // create the space + _, err = clusterClient.Agent().ClusterV1().Spaces().Create(ctx, space, metav1.CreateOptions{}) + if err != nil { + return errors.Wrap(err, "create space") + } + } + + cmd.Log.Donef("Successfully created the space %s in cluster %s", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Cluster, "white+b")) + } + + // should we create a kube context for the space + if cmd.CreateContext || cmd.UseExisting { + // create kube context options + contextOptions, err := use.CreateClusterContextOptions(baseClient, cmd.Config, cluster, spaceName, cmd.DisableDirectClusterEndpoint, cmd.SwitchContext, cmd.Log) + if err != nil { + return err + } + + // update kube config + err = kubeconfig.UpdateKubeConfig(contextOptions) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully updated kube context to use space %s in cluster %s", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Cluster, "white+b")) + } + + return nil +} + +func resolveSpaceTemplate(ctx context.Context, client kube.Interface, cluster *managementv1.Cluster, template string) (*managementv1.SpaceTemplate, error) { + if template == "" && cluster.Annotations != nil && cluster.Annotations[constants.LoftDefaultSpaceTemplate] != "" { + template = cluster.Annotations[constants.LoftDefaultSpaceTemplate] + } + + if template != "" { + spaceTemplate, err := client.Loft().ManagementV1().SpaceTemplates().Get(ctx, template, metav1.GetOptions{}) + if err != nil { + return nil, err + } + + return spaceTemplate, nil + } + + return nil, nil +} + +func resolveApps(ctx context.Context, client kube.Interface, apps []agentstoragev1.AppReference) ([]parameters.NamespacedApp, error) { + appsList, err := client.Loft().ManagementV1().Apps().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retApps := []parameters.NamespacedApp{} + for _, a := range apps { + found := false + for _, ma := range appsList.Items { + if a.Name == "" { + continue + } + if ma.Name == a.Name { + app := ma + retApps = append(retApps, parameters.NamespacedApp{ + App: &app, + }) + found = true + break + } + } + if !found { + return nil, fmt.Errorf("couldn't find app %s. The app either doesn't exist or you have no access to use it", a) + } + } + + return retApps, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/vcluster.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/vcluster.go new file mode 100644 index 000000000..d58ba888f --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create/vcluster.go @@ -0,0 +1,745 @@ +package create + +import ( + "context" + "fmt" + "io" + "os" + "strconv" + "strings" + "time" + + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + "github.com/loft-sh/loftctl/v3/pkg/config" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/loftctl/v3/pkg/vcluster" + "k8s.io/apimachinery/pkg/util/wait" + client2 "sigs.k8s.io/controller-runtime/pkg/client" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/loftctl/v3/pkg/constants" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/loftctl/v3/pkg/parameters" + "github.com/loft-sh/loftctl/v3/pkg/random" + "github.com/loft-sh/loftctl/v3/pkg/task" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/loftctl/v3/pkg/version" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/pkg/errors" + "github.com/spf13/cobra" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// VirtualClusterCmd holds the cmd flags +type VirtualClusterCmd struct { + *flags.GlobalFlags + + SleepAfter int64 + DeleteAfter int64 + Image string + Cluster string + Space string + Template string + Project string + CreateContext bool + SwitchContext bool + Print bool + SkipWait bool + + UseExisting bool + Recreate bool + Update bool + + Set []string + ParametersFile string + Version string + + DisplayName string + Description string + Links []string + + User string + Team string + + DisableDirectClusterEndpoint bool + AccessPointCertificateTTL int32 + + Out io.Writer + Log log.Logger +} + +// NewVirtualClusterCmd creates a new command +func NewVirtualClusterCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &VirtualClusterCmd{ + GlobalFlags: globalFlags, + Out: os.Stdout, + Log: log.GetInstance(), + } + description := product.ReplaceWithHeader("create vcluster", ` +Creates a new virtual cluster in a given space and +cluster. If no space or cluster is specified the user +will be asked. + +Example: +loft create vcluster test +loft create vcluster test --project myproject +####################################################### + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +############## devspace create vcluster ############### +####################################################### +Creates a new virtual cluster in a given space and +cluster. If no space or cluster is specified the user +will be asked. + +Example: +devspace create vcluster test +devspace create vcluster test --project myproject +####################################################### + ` + } + c := &cobra.Command{ + Use: "vcluster" + util.VClusterNameOnlyUseLine, + Short: "Creates a new virtual cluster in the given parent cluster", + Long: description, + Args: util.VClusterNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVar(&cmd.DisplayName, "display-name", "", "The display name to show in the UI for this virtual cluster") + c.Flags().StringVar(&cmd.Description, "description", "", "The description to show in the UI for this virtual cluster") + c.Flags().StringSliceVar(&cmd.Links, "link", []string{}, linksHelpText) + c.Flags().StringVar(&cmd.Cluster, "cluster", "", "The cluster to create the virtual cluster in") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().StringVar(&cmd.Space, "space", "", "The space to create the virtual cluster in") + c.Flags().StringVar(&cmd.User, "user", "", "The user to create the space for") + c.Flags().StringVar(&cmd.Team, "team", "", "The team to create the space for") + c.Flags().BoolVar(&cmd.Print, "print", false, "If enabled, prints the context to the console") + c.Flags().Int64Var(&cmd.SleepAfter, "sleep-after", 0, "DEPRECATED: If set to non zero, will tell the space to sleep after specified seconds of inactivity") + c.Flags().Int64Var(&cmd.DeleteAfter, "delete-after", 0, "DEPRECATED: If set to non zero, will tell loft to delete the space after specified seconds of inactivity") + c.Flags().BoolVar(&cmd.CreateContext, "create-context", true, product.Replace("If loft should create a kube context for the space")) + c.Flags().BoolVar(&cmd.SwitchContext, "switch-context", true, product.Replace("If loft should switch the current context to the new context")) + c.Flags().BoolVar(&cmd.SkipWait, "skip-wait", false, "If true, will not wait until the virtual cluster is running") + c.Flags().BoolVar(&cmd.Recreate, "recreate", false, "If enabled and there already exists a virtual cluster with this name, Loft will delete it first") + c.Flags().BoolVar(&cmd.Update, "update", false, "If enabled and a virtual cluster already exists, will update the template, version and parameters") + c.Flags().BoolVar(&cmd.UseExisting, "use", false, product.Replace("If loft should use the virtual cluster if its already there")) + c.Flags().StringVar(&cmd.Template, "template", "", "The virtual cluster template to use to create the virtual cluster") + c.Flags().StringVar(&cmd.Version, "version", "", "The template version to use") + c.Flags().StringSliceVar(&cmd.Set, "set", []string{}, "Allows specific template parameters to be set. E.g. --set myParameter=myValue") + c.Flags().StringVar(&cmd.ParametersFile, "parameters", "", "The file where the parameter values for the apps are specified") + c.Flags().BoolVar(&cmd.DisableDirectClusterEndpoint, "disable-direct-cluster-endpoint", false, "When enabled does not use an available direct cluster endpoint to connect to the vcluster") + c.Flags().Int32Var(&cmd.AccessPointCertificateTTL, "ttl", 86_400, "Sets certificate TTL when using virtual cluster via access point") + return c +} + +// Run executes the command +func (cmd *VirtualClusterCmd) Run(ctx context.Context, args []string) error { + virtualClusterName := args[0] + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + err = client.VerifyVersion(baseClient) + if err != nil { + return err + } + + // determine cluster name + cmd.Cluster, cmd.Project, err = helper.SelectProjectOrCluster(baseClient, cmd.Cluster, cmd.Project, cmd.Log) + if err != nil { + return err + } + + // create legacy virtual cluster? + if cmd.Project == "" { + // create legacy virtual cluster + return cmd.legacyCreateVirtualCluster(baseClient, virtualClusterName) + } + + // create project virtual cluster + return cmd.createVirtualCluster(ctx, baseClient, virtualClusterName) +} + +func (cmd *VirtualClusterCmd) createVirtualCluster(ctx context.Context, baseClient client.Client, virtualClusterName string) error { + virtualClusterNamespace := naming.ProjectNamespace(cmd.Project) + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // get current user / team + if cmd.User == "" && cmd.Team == "" { + userName, teamName, err := helper.GetCurrentUser(ctx, managementClient) + if err != nil { + return err + } + if userName != nil { + cmd.User = userName.Name + } else { + cmd.Team = teamName.Name + } + } + + // delete the existing cluster if needed + if cmd.Recreate { + _, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(virtualClusterNamespace).Get(ctx, virtualClusterName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return fmt.Errorf("couldn't retrieve virtual cluster instance: %w", err) + } else if err == nil { + // delete the virtual cluster + err = managementClient.Loft().ManagementV1().VirtualClusterInstances(virtualClusterNamespace).Delete(ctx, virtualClusterName, metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return fmt.Errorf("couldn't delete virtual cluster instance: %w", err) + } + } + } + + var virtualClusterInstance *managementv1.VirtualClusterInstance + + // make sure there is not existing virtual cluster + virtualClusterInstance, err = managementClient.Loft().ManagementV1().VirtualClusterInstances(virtualClusterNamespace).Get(ctx, virtualClusterName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return fmt.Errorf("couldn't retrieve virtual cluster instance: %w", err) + } else if err == nil && !virtualClusterInstance.DeletionTimestamp.IsZero() { + cmd.Log.Infof("Waiting until virtual cluster is deleted...") + + // wait until the virtual cluster instance is deleted + waitErr := wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), false, func(ctx context.Context) (done bool, err error) { + virtualClusterInstance, err = managementClient.Loft().ManagementV1().VirtualClusterInstances(virtualClusterNamespace).Get(ctx, virtualClusterName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return false, err + } else if err == nil && virtualClusterInstance.DeletionTimestamp != nil { + return false, nil + } + + return true, nil + }) + if waitErr != nil { + return errors.Wrap(err, "get virtual cluster instance") + } + + virtualClusterInstance = nil + } else if kerrors.IsNotFound(err) { + virtualClusterInstance = nil + } + + // if the virtual cluster already exists and flag is not set, we terminate + if !cmd.Update && !cmd.UseExisting && virtualClusterInstance != nil { + return fmt.Errorf("virtual cluster %s already exists in project %s", virtualClusterName, cmd.Project) + } + + // create virtual cluster if necessary + if virtualClusterInstance == nil { + // resolve template + virtualClusterTemplate, resolvedParameters, err := cmd.resolveTemplate(baseClient) + if err != nil { + return err + } + + // create virtual cluster instance + zone, offset := time.Now().Zone() + virtualClusterInstance = &managementv1.VirtualClusterInstance{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: naming.ProjectNamespace(cmd.Project), + Name: virtualClusterName, + Annotations: map[string]string{ + clusterv1.SleepModeTimezoneAnnotation: zone + "#" + strconv.Itoa(offset), + }, + }, + Spec: managementv1.VirtualClusterInstanceSpec{ + VirtualClusterInstanceSpec: storagev1.VirtualClusterInstanceSpec{ + DisplayName: cmd.DisplayName, + Description: cmd.Description, + Owner: &storagev1.UserOrTeam{ + User: cmd.User, + Team: cmd.Team, + }, + TemplateRef: &storagev1.TemplateRef{ + Name: virtualClusterTemplate.Name, + Version: cmd.Version, + }, + ClusterRef: storagev1.VirtualClusterClusterRef{ + ClusterRef: storagev1.ClusterRef{Cluster: cmd.Cluster}, + }, + Parameters: resolvedParameters, + }, + }, + } + SetCustomLinksAnnotation(virtualClusterInstance, cmd.Links) + // create virtualclusterinstance + cmd.Log.Infof("Creating virtual cluster %s in project %s with template %s...", ansi.Color(virtualClusterName, "white+b"), ansi.Color(cmd.Project, "white+b"), ansi.Color(virtualClusterTemplate.Name, "white+b")) + virtualClusterInstance, err = managementClient.Loft().ManagementV1().VirtualClusterInstances(virtualClusterInstance.Namespace).Create(ctx, virtualClusterInstance, metav1.CreateOptions{}) + if err != nil { + return errors.Wrap(err, "create virtual cluster") + } + } else if cmd.Update { + // resolve template + virtualClusterTemplate, resolvedParameters, err := cmd.resolveTemplate(baseClient) + if err != nil { + return err + } + + // update virtual cluster instance + if virtualClusterInstance.Spec.TemplateRef == nil { + return fmt.Errorf("virtual cluster instance doesn't use a template, cannot update virtual cluster") + } + + oldVirtualCluster := virtualClusterInstance.DeepCopy() + templateRefChanged := virtualClusterInstance.Spec.TemplateRef.Name != virtualClusterTemplate.Name + paramsChanged := virtualClusterInstance.Spec.Parameters != resolvedParameters + versionChanged := (cmd.Version != "" && virtualClusterInstance.Spec.TemplateRef.Version != cmd.Version) + linksChanged := SetCustomLinksAnnotation(virtualClusterInstance, cmd.Links) + + // check if update is needed + if templateRefChanged || paramsChanged || versionChanged || linksChanged { + virtualClusterInstance.Spec.TemplateRef.Name = virtualClusterTemplate.Name + virtualClusterInstance.Spec.TemplateRef.Version = cmd.Version + virtualClusterInstance.Spec.Parameters = resolvedParameters + + patch := client2.MergeFrom(oldVirtualCluster) + patchData, err := patch.Data(virtualClusterInstance) + if err != nil { + return errors.Wrap(err, "calculate update patch") + } + cmd.Log.Infof("Updating virtual cluster %s in project %s...", ansi.Color(virtualClusterName, "white+b"), ansi.Color(cmd.Project, "white+b")) + virtualClusterInstance, err = managementClient.Loft().ManagementV1().VirtualClusterInstances(virtualClusterInstance.Namespace).Patch(ctx, virtualClusterInstance.Name, patch.Type(), patchData, metav1.PatchOptions{}) + if err != nil { + return errors.Wrap(err, "patch virtual cluster") + } + } else { + cmd.Log.Infof("Skip updating virtual cluster...") + } + } + + // wait until virtual cluster is ready + virtualClusterInstance, err = vcluster.WaitForVirtualClusterInstance(ctx, managementClient, virtualClusterInstance.Namespace, virtualClusterInstance.Name, !cmd.SkipWait, cmd.Log) + if err != nil { + return err + } + cmd.Log.Donef("Successfully created the virtual cluster %s in project %s", ansi.Color(virtualClusterName, "white+b"), ansi.Color(cmd.Project, "white+b")) + + // should we create a kube context for the space + if cmd.CreateContext { + // create kube context options + contextOptions, err := use.CreateVirtualClusterInstanceOptions(ctx, baseClient, cmd.Config, cmd.Project, virtualClusterInstance, cmd.DisableDirectClusterEndpoint, cmd.SwitchContext, cmd.Log) + if err != nil { + return err + } + + // update kube config + err = kubeconfig.UpdateKubeConfig(contextOptions) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully updated kube context to use virtual cluster %s in project %s", ansi.Color(virtualClusterName, "white+b"), ansi.Color(cmd.Project, "white+b")) + } + + return nil +} + +func (cmd *VirtualClusterCmd) resolveTemplate(baseClient client.Client) (*managementv1.VirtualClusterTemplate, string, error) { + // determine space template to use + virtualClusterTemplate, err := helper.SelectVirtualClusterTemplate(baseClient, cmd.Project, cmd.Template, cmd.Log) + if err != nil { + return nil, "", err + } + + // get parameters + var templateParameters []storagev1.AppParameter + if len(virtualClusterTemplate.Spec.Versions) > 0 { + if cmd.Version == "" { + latestVersion := version.GetLatestVersion(virtualClusterTemplate) + if latestVersion == nil { + return nil, "", fmt.Errorf("couldn't find any version in template") + } + + templateParameters = latestVersion.(*storagev1.VirtualClusterTemplateVersion).Parameters + } else { + _, latestMatched, err := version.GetLatestMatchedVersion(virtualClusterTemplate, cmd.Version) + if err != nil { + return nil, "", err + } else if latestMatched == nil { + return nil, "", fmt.Errorf("couldn't find any matching version to %s", cmd.Version) + } + + templateParameters = latestMatched.(*storagev1.VirtualClusterTemplateVersion).Parameters + } + } else { + templateParameters = virtualClusterTemplate.Spec.Parameters + } + + // resolve space template parameters + resolvedParameters, err := parameters.ResolveTemplateParameters(cmd.Set, templateParameters, cmd.ParametersFile) + if err != nil { + return nil, "", err + } + + return virtualClusterTemplate, resolvedParameters, nil +} + +func (cmd *VirtualClusterCmd) legacyCreateVirtualCluster(baseClient client.Client, virtualClusterName string) error { + if cmd.UseExisting { + cmd.Log.Warnf("--use is not supported for legacy virtual cluster creation, please specify a project instead") + } + if cmd.SkipWait { + cmd.Log.Warnf("--skip-wait is not supported for legacy virtual cluster creation, please specify a project instead") + } + + ctx := context.Background() + + // determine space name + if cmd.Space == "" { + cmd.Space = "vcluster-" + virtualClusterName + "-" + random.RandomString(5) + } + + // create a cluster client + clusterClient, err := baseClient.Cluster(cmd.Cluster) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // get current user / team + userName, teamName, err := helper.GetCurrentUser(ctx, managementClient) + if err != nil { + return err + } + + var ( + vClusterChartName string + vClusterValues string + vClusterVersion string + vClusterTemplate *storagev1.VirtualClusterTemplateSpec + vClusterTemplateName string + vClusterTemplateDisplayName string + ) + if cmd.Template == "" { + defaults, err := managementClient.Loft().ManagementV1().Clusters().ListVirtualClusterDefaults(ctx, cmd.Cluster, metav1.GetOptions{}) + if err != nil { + return err + } + if defaults.Warning != "" { + warningLines := strings.Split(defaults.Warning, "\n") + for _, w := range warningLines { + cmd.Log.Warn(w) + } + } + + vClusterValues = defaults.Values + vClusterVersion = defaults.LatestVersion + if defaults.DefaultTemplate != nil { + vClusterTemplate = &defaults.DefaultTemplate.Spec + vClusterTemplateName = defaults.DefaultTemplate.Name + vClusterTemplateDisplayName = clihelper.GetDisplayName(defaults.DefaultTemplate.Name, defaults.DefaultTemplate.Spec.DisplayName) + } + } else { + virtualClusterTemplate, err := managementClient.Loft().ManagementV1().VirtualClusterTemplates().Get(ctx, cmd.Template, metav1.GetOptions{}) + if err != nil { + return err + } + vClusterChartName = virtualClusterTemplate.Spec.Template.HelmRelease.Chart.Name + vClusterValues = virtualClusterTemplate.Spec.Template.HelmRelease.Values + vClusterVersion = virtualClusterTemplate.Spec.Template.HelmRelease.Chart.Version + vClusterTemplate = &virtualClusterTemplate.Spec.VirtualClusterTemplateSpec + vClusterTemplateName = virtualClusterTemplate.Name + vClusterTemplateDisplayName = clihelper.GetDisplayName(virtualClusterTemplate.Name, virtualClusterTemplate.Spec.DisplayName) + } + + // create the task + createTask := &managementv1.Task{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "create-vcluster-", + }, + Spec: managementv1.TaskSpec{ + TaskSpec: storagev1.TaskSpec{ + DisplayName: "Create Virtual Cluster " + virtualClusterName, + Target: storagev1.Target{ + Cluster: &storagev1.TargetCluster{ + Cluster: cmd.Cluster, + }, + }, + Task: storagev1.TaskDefinition{ + VirtualClusterCreationTask: &storagev1.VirtualClusterCreationTask{ + Metadata: metav1.ObjectMeta{ + Name: virtualClusterName, + Namespace: cmd.Space, + }, + HelmRelease: agentstoragev1.VirtualClusterHelmRelease{ + Chart: agentstoragev1.VirtualClusterHelmChart{ + Name: vClusterChartName, + Version: vClusterVersion, + }, + Values: vClusterValues, + }, + Wait: true, + Apps: nil, + SpaceCreationTask: nil, + }, + }, + }, + }, + } + if userName != nil { + createTask.Spec.Access = []storagev1.Access{ + { + Verbs: []string{"*"}, + Subresources: []string{"*"}, + Users: []string{userName.Name}, + }, + } + } else if teamName != nil { + createTask.Spec.Access = []storagev1.Access{ + { + Verbs: []string{"*"}, + Subresources: []string{"*"}, + Teams: []string{teamName.Name}, + }, + } + } + + // check if the cluster exists + cluster, err := managementClient.Loft().ManagementV1().Clusters().Get(ctx, cmd.Cluster, metav1.GetOptions{}) + if err != nil { + if kerrors.IsForbidden(err) { + return fmt.Errorf("cluster '%s' does not exist, or you don't have permission to use it", cmd.Cluster) + } + + return err + } + + // create space if it does not exist + err = cmd.createSpace(ctx, baseClient, clusterClient, managementClient, vClusterTemplate, cluster, createTask) + if err != nil { + return errors.Wrap(err, "create space") + } + + // create the object + if vClusterTemplate != nil { + cmd.Log.Infof("Using virtual cluster template %s", vClusterTemplateDisplayName) + createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Annotations = vClusterTemplate.Template.Annotations + createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Labels = vClusterTemplate.Template.Labels + if createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Annotations == nil { + createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Annotations = map[string]string{} + } + createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Annotations["loft.sh/virtual-cluster-template"] = vClusterTemplateName + createTask.Spec.Task.VirtualClusterCreationTask.Access = vClusterTemplate.Template.Access + } + + if cmd.DisplayName != "" { + if createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Annotations == nil { + createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Annotations = map[string]string{} + } + createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Annotations["loft.sh/display-name"] = cmd.DisplayName + } + if cmd.Description != "" { + if createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Annotations == nil { + createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Annotations = map[string]string{} + } + createTask.Spec.Task.VirtualClusterCreationTask.Metadata.Annotations["loft.sh/description"] = cmd.Description + } + + // resolve apps + if vClusterTemplate != nil && len(vClusterTemplate.Template.Apps) > 0 { + vClusterApps, err := resolveVClusterApps(ctx, managementClient, vClusterTemplate.Template.Apps) + if err != nil { + return errors.Wrap(err, "resolve virtual cluster template apps") + } + + appsWithParameters, err := parameters.ResolveAppParameters(vClusterApps, cmd.ParametersFile, cmd.Log) + if err != nil { + return err + } + + for _, appWithParameter := range appsWithParameters { + createTask.Spec.Task.VirtualClusterCreationTask.Apps = append(createTask.Spec.Task.VirtualClusterCreationTask.Apps, agentstoragev1.AppReference{ + Name: appWithParameter.App.Name, + Namespace: appWithParameter.Namespace, + Parameters: appWithParameter.Parameters, + }) + } + } + + // create the task and stream + err = task.StreamTask(ctx, managementClient, createTask, os.Stdout, cmd.Log) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully created the virtual cluster %s in cluster %s and space %s", ansi.Color(virtualClusterName, "white+b"), ansi.Color(cmd.Cluster, "white+b"), ansi.Color(cmd.Space, "white+b")) + + // should we create a kube context for the virtual context + if cmd.CreateContext || cmd.Print { + // create kube context options + contextOptions, err := use.CreateVClusterContextOptions(baseClient, cmd.Config, cluster, cmd.Space, virtualClusterName, cmd.DisableDirectClusterEndpoint, cmd.SwitchContext, cmd.Log) + if err != nil { + return err + } + + // check if we should print the config + if cmd.Print { + err = kubeconfig.PrintKubeConfigTo(contextOptions, cmd.Out) + if err != nil { + return err + } + } + + // check if we should update the config + if cmd.CreateContext { + // update kube config + err = kubeconfig.UpdateKubeConfig(contextOptions) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully updated kube context to use virtual cluster %s in space %s and cluster %s", ansi.Color(virtualClusterName, "white+b"), ansi.Color(cmd.Space, "white+b"), ansi.Color(cmd.Cluster, "white+b")) + } + } + + return nil +} + +func (cmd *VirtualClusterCmd) createSpace(ctx context.Context, baseClient client.Client, clusterClient kube.Interface, managementClient kube.Interface, vClusterTemplate *storagev1.VirtualClusterTemplateSpec, cluster *managementv1.Cluster, task *managementv1.Task) error { + _, err := clusterClient.Agent().ClusterV1().Spaces().Get(ctx, cmd.Space, metav1.GetOptions{}) + if err != nil { + if !kerrors.IsNotFound(err) { + return err + } + + // determine user or team name + if cmd.User == "" && cmd.Team == "" { + user, team, err := helper.SelectUserOrTeam(baseClient, cmd.Cluster, cmd.Log) + if err != nil { + return err + } else if user != nil { + cmd.User = user.Name + } else if team != nil { + cmd.Team = team.Name + } + } + + // resolve space template + template := "" + if vClusterTemplate != nil && vClusterTemplate.SpaceTemplateRef != nil { + template = vClusterTemplate.SpaceTemplateRef.Name + } + + // get space template + spaceTemplate, err := resolveSpaceTemplate(ctx, managementClient, cluster, template) + if err != nil { + return errors.Wrap(err, "resolve space template") + } else if spaceTemplate != nil { + cmd.Log.Infof("Using space template %s to create space %s", clihelper.GetDisplayName(spaceTemplate.Name, spaceTemplate.Spec.DisplayName), cmd.Space) + } + + // add to task + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask = &storagev1.SpaceCreationTask{ + Metadata: metav1.ObjectMeta{ + Name: cmd.Space, + Annotations: map[string]string{}, + }, + Owner: &storagev1.UserOrTeam{ + User: cmd.User, + Team: cmd.Team, + }, + Apps: nil, + } + if spaceTemplate != nil { + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Annotations = spaceTemplate.Spec.Template.Annotations + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Labels = spaceTemplate.Spec.Template.Labels + if task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Annotations == nil { + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Annotations = map[string]string{} + } + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Annotations["loft.sh/space-template"] = spaceTemplate.Name + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Objects = spaceTemplate.Spec.Template.Objects + } + if cmd.SleepAfter > 0 { + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Annotations[clusterv1.SleepModeSleepAfterAnnotation] = strconv.FormatInt(cmd.SleepAfter, 10) + } + if cmd.DeleteAfter > 0 { + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Annotations[clusterv1.SleepModeDeleteAfterAnnotation] = strconv.FormatInt(cmd.DeleteAfter, 10) + } + zone, offset := time.Now().Zone() + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Annotations[clusterv1.SleepModeTimezoneAnnotation] = zone + "#" + strconv.Itoa(offset) + if task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Annotations["loft.sh/description"] == "" { + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Annotations["loft.sh/description"] = "Space for Virtual Cluster [" + task.Spec.Task.VirtualClusterCreationTask.Metadata.Name + "](/vclusters#search=" + task.Spec.Task.VirtualClusterCreationTask.Metadata.Name + ")" + } + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Metadata.Annotations[constants.VClusterSpace] = "true" + + // resolve the space apps + if spaceTemplate != nil && len(spaceTemplate.Spec.Template.Apps) > 0 { + apps, err := resolveApps(ctx, managementClient, spaceTemplate.Spec.Template.Apps) + if err != nil { + return errors.Wrap(err, "resolve space template apps") + } + + for _, appWithoutParameters := range apps { + task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Apps = append(task.Spec.Task.VirtualClusterCreationTask.SpaceCreationTask.Apps, agentstoragev1.AppReference{ + Name: appWithoutParameters.App.Name, + }) + } + } + } + + return nil +} + +func resolveVClusterApps(ctx context.Context, managementClient kube.Interface, apps []agentstoragev1.AppReference) ([]parameters.NamespacedApp, error) { + appsList, err := managementClient.Loft().ManagementV1().Apps().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retApps := []parameters.NamespacedApp{} + for _, a := range apps { + found := false + for _, ma := range appsList.Items { + if ma.Name == a.Name { + namespace := "default" + if a.Namespace != "" { + namespace = a.Namespace + } + + m := ma + retApps = append(retApps, parameters.NamespacedApp{ + App: &m, + Namespace: namespace, + }) + found = true + break + } + } + if !found { + return nil, fmt.Errorf("couldn't find app %s. The app either doesn't exist or you have no access to use it", a) + } + } + + return retApps, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/defaults.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/defaults.go new file mode 100644 index 000000000..1de210e94 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/defaults.go @@ -0,0 +1,25 @@ +package defaults + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/spf13/cobra" +) + +// NewDefaultsCmd creates a new command +func NewDefaultsCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + description := product.ReplaceWithHeader("defaults", "") + + defaultsCmd := &cobra.Command{ + Use: "defaults", + Short: "Sets default values for loftctl", + Long: description, + Args: cobra.NoArgs, + } + + defaultsCmd.AddCommand(NewSetCmd(globalFlags, defaults)) + defaultsCmd.AddCommand(NewGetCmd(globalFlags, defaults)) + defaultsCmd.AddCommand(NewViewCmd(globalFlags, defaults)) + return defaultsCmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/get.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/get.go new file mode 100644 index 000000000..d198679f8 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/get.go @@ -0,0 +1,79 @@ +package defaults + +import ( + "fmt" + "strings" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +// GetCmd holds the cmd flags +type getCmd struct { + *flags.GlobalFlags + + Log log.Logger + Defaults *pdefaults.Defaults +} + +// NewGetCmd creates a new command +func NewGetCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &getCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + Defaults: defaults, + } + + description := fmt.Sprintf(` +####################################################### +################## loft defaults get ################## +####################################################### +Get retrieves a default value configured for lofctl +loft defaults get $KEY + +Example: +loft defaults get project + +Supported keys include: +%s +####################################################### + `, strings.Join(pdefaults.DefaultKeys, "\n")) + + c := &cobra.Command{ + Use: "get", + Short: "Retrieve default value", + Long: description, + Args: func(cobraCmd *cobra.Command, args []string) error { + if err := cobra.ExactArgs(1)(cobraCmd, args); err != nil { + return err + } + if !pdefaults.IsSupportedKey(args[0]) { + return fmt.Errorf("unknown key %s, supported keys are: \n\t%s", args[0], strings.Join(pdefaults.DefaultKeys, "\n\t")) + } + + return nil + }, + RunE: func(cobraCmd *cobra.Command, args []string) error { return cmd.Run(args) }, + } + + return c +} + +// Run executes the functionality +func (cmd *getCmd) Run(args []string) error { + cmd.Log.Infof("Retrieving default value for \"%s\"", args[0]) + key := args[0] + + if value, err := cmd.Defaults.Get(key, ""); err != nil { + return err + } else { + if value == "" { + value = "" + } + cmd.Log.Infof("%s: %s", key, value) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/set.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/set.go new file mode 100644 index 000000000..add80564d --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/set.go @@ -0,0 +1,79 @@ +package defaults + +import ( + "fmt" + "strings" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +type setCmd struct { + *flags.GlobalFlags + + Log log.Logger + Defaults *pdefaults.Defaults +} + +// NewSetCmd creates a new command +func NewSetCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &setCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + Defaults: defaults, + } + + description := fmt.Sprintf(` +####################################################### +################## loft defaults set ################## +####################################################### +Set sets a default value for lofctl +loft defaults set $KEY $VALUE + +Example: +loft defaults set project your-project + +Supported keys include: +%s +####################################################### + `, strings.Join(pdefaults.DefaultKeys, "\n")) + + c := &cobra.Command{ + Use: "set", + Short: "Set default value", + Long: description, + Args: func(cobraCmd *cobra.Command, args []string) error { + if err := cobra.ExactArgs(2)(cobraCmd, args); err != nil { + return err + } + if !pdefaults.IsSupportedKey(args[0]) { + return fmt.Errorf("unknown key %s, supported keys are: \n\t%s", args[0], strings.Join(pdefaults.DefaultKeys, "\n\t")) + } + + return nil + }, + RunE: func(cobraCmd *cobra.Command, args []string) error { return cmd.Run(args) }, + } + + return c +} + +// Run executes the functionality +func (cmd *setCmd) Run(args []string) error { + cmd.Log.Infof("Setting default value for \"%s\"", args[0]) + key := args[0] + value := args[1] + + if err := cmd.Defaults.Set(key, value); err != nil { + return err + } else { + if value == "" { + value = "" + } + cmd.Log.Infof("%s: %s", key, value) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/view.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/view.go new file mode 100644 index 000000000..70cef59e5 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults/view.go @@ -0,0 +1,62 @@ +package defaults + +import ( + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +type viewCmd struct { + *flags.GlobalFlags + + Log log.Logger + Defaults *pdefaults.Defaults +} + +// NewViewCmd creates a new command +func NewViewCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &viewCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + Defaults: defaults, + } + + description := ` +####################################################### +################# loft defaults view ################## +####################################################### +View shows all default values configured for lofctl + +Example: +loft defaults view +####################################################### + ` + + c := &cobra.Command{ + Use: "view", + Short: "View all defaults values", + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { return cmd.Run() }, + } + + return c +} + +// Run executes the functionality +func (cmd *viewCmd) Run() error { + cmd.Log.Infof("Showing all default values configured for loftctl:") + for _, key := range pdefaults.DefaultKeys { + value, err := cmd.Defaults.Get(key, "") + if err != nil { + continue + } + if value == "" { + value = "" + } + cmd.Log.Infof("\t%s: %s", key, value) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete/delete.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete/delete.go new file mode 100644 index 000000000..2718cc6e7 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete/delete.go @@ -0,0 +1,31 @@ +package delete + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewDeleteCmd creates a new cobra command +func NewDeleteCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + description := product.ReplaceWithHeader("delete", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +##################### loft delete ##################### +####################################################### + ` + } + c := &cobra.Command{ + Use: "delete", + Short: product.Replace("Deletes loft resources"), + Long: description, + Args: cobra.NoArgs, + } + + c.AddCommand(NewSpaceCmd(globalFlags, defaults)) + c.AddCommand(NewVirtualClusterCmd(globalFlags, defaults)) + return c +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete/space.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete/space.go new file mode 100644 index 000000000..4f324c6f3 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete/space.go @@ -0,0 +1,188 @@ +package delete + +import ( + "context" + "time" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/util" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/pkg/errors" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// SpaceCmd holds the cmd flags +type SpaceCmd struct { + *flags.GlobalFlags + + Cluster string + Project string + DeleteContext bool + Wait bool + + Log log.Logger +} + +// NewSpaceCmd creates a new command +func NewSpaceCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &SpaceCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + description := product.ReplaceWithHeader("delete space", ` +Deletes a space from a cluster + +Example: +loft delete space myspace +loft delete space myspace --project myproject +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +############### devspace delete space ################# +####################################################### +Deletes a space from a cluster + +Example: +devspace delete space myspace +devspace delete space myspace --project myproject +####################################################### + ` + } + c := &cobra.Command{ + Use: "space" + util.SpaceNameOnlyUseLine, + Short: "Deletes a space from a cluster", + Long: description, + Args: util.SpaceNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVar(&cmd.Cluster, "cluster", "", "The cluster to use") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().BoolVar(&cmd.DeleteContext, "delete-context", true, "If the corresponding kube context should be deleted if there is any") + c.Flags().BoolVar(&cmd.Wait, "wait", false, "Termination of this command waits for space to be deleted") + return c +} + +// Run executes the command +func (cmd *SpaceCmd) Run(ctx context.Context, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + spaceName := "" + if len(args) > 0 { + spaceName = args[0] + } + + cmd.Cluster, cmd.Project, spaceName, err = helper.SelectSpaceInstanceOrSpace(baseClient, spaceName, cmd.Project, cmd.Cluster, cmd.Log) + if err != nil { + return err + } + + if cmd.Project == "" { + return cmd.legacyDeleteSpace(ctx, baseClient, spaceName) + } + + return cmd.deleteSpace(ctx, baseClient, spaceName) +} + +func (cmd *SpaceCmd) deleteSpace(ctx context.Context, baseClient client.Client, spaceName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + err = managementClient.Loft().ManagementV1().SpaceInstances(naming.ProjectNamespace(cmd.Project)).Delete(ctx, spaceName, metav1.DeleteOptions{}) + if err != nil { + return errors.Wrap(err, "delete space") + } + + cmd.Log.Donef("Successfully deleted space %s in project %s", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Project, "white+b")) + + // update kube config + if cmd.DeleteContext { + err = kubeconfig.DeleteContext(kubeconfig.SpaceInstanceContextName(cmd.Project, spaceName)) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully deleted kube context for space %s", ansi.Color(spaceName, "white+b")) + } + + // wait until deleted + if cmd.Wait { + cmd.Log.Info("Waiting for space to be deleted...") + for isSpaceInstanceStillThere(ctx, managementClient, naming.ProjectNamespace(cmd.Project), spaceName) { + time.Sleep(time.Second) + } + cmd.Log.Done("Space is deleted") + } + + return nil +} + +func isSpaceInstanceStillThere(ctx context.Context, managementClient kube.Interface, spaceInstanceNamespace, spaceName string) bool { + _, err := managementClient.Loft().ManagementV1().SpaceInstances(spaceInstanceNamespace).Get(ctx, spaceName, metav1.GetOptions{}) + return err == nil +} + +func (cmd *SpaceCmd) legacyDeleteSpace(ctx context.Context, baseClient client.Client, spaceName string) error { + clusterClient, err := baseClient.Cluster(cmd.Cluster) + if err != nil { + return err + } + + gracePeriod := int64(0) + err = clusterClient.Agent().ClusterV1().Spaces().Delete(ctx, spaceName, metav1.DeleteOptions{GracePeriodSeconds: &gracePeriod}) + if err != nil { + return errors.Wrap(err, "delete space") + } + + cmd.Log.Donef("Successfully deleted space %s in cluster %s", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Cluster, "white+b")) + + // update kube config + if cmd.DeleteContext { + err = kubeconfig.DeleteContext(kubeconfig.SpaceContextName(cmd.Cluster, spaceName)) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully deleted kube context for space %s", ansi.Color(spaceName, "white+b")) + } + + // update kube config + if cmd.Wait { + cmd.Log.Info("Waiting for space to be deleted...") + for isSpaceStillThere(ctx, clusterClient, spaceName) { + time.Sleep(time.Second) + } + cmd.Log.Done("Space is deleted") + } + + return nil +} + +func isSpaceStillThere(ctx context.Context, clusterClient kube.Interface, spaceName string) bool { + _, err := clusterClient.Agent().ClusterV1().Spaces().Get(ctx, spaceName, metav1.GetOptions{}) + return err == nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete/vcluster.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete/vcluster.go new file mode 100644 index 000000000..e80b46d77 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete/vcluster.go @@ -0,0 +1,203 @@ +package delete + +import ( + "context" + "time" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + "github.com/loft-sh/loftctl/v3/pkg/constants" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/util" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/pkg/errors" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// VirtualClusterCmd holds the cmd flags +type VirtualClusterCmd struct { + *flags.GlobalFlags + + Space string + Cluster string + Project string + DeleteContext bool + DeleteSpace bool + Wait bool + + Log log.Logger +} + +// NewVirtualClusterCmd creates a new command +func NewVirtualClusterCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &VirtualClusterCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + description := product.ReplaceWithHeader("delete virtualcluster", ` +Deletes a virtual cluster from a cluster + +Example: +loft delete vcluster myvirtualcluster +loft delete vcluster myvirtualcluster --project myproject +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +########## devspace delete virtualcluster ############# +####################################################### +Deletes a virtual cluster from a cluster + +Example: +devspace delete vcluster myvirtualcluster +devspace delete vcluster myvirtualcluster --project myproject +####################################################### + ` + } + c := &cobra.Command{ + Use: "vcluster" + util.VClusterNameOnlyUseLine, + Short: "Deletes a virtual cluster from a cluster", + Long: description, + Args: util.VClusterNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVar(&cmd.Space, "space", "", "The space to use") + c.Flags().StringVar(&cmd.Cluster, "cluster", "", "The cluster to use") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().BoolVar(&cmd.DeleteContext, "delete-context", true, "If the corresponding kube context should be deleted if there is any") + c.Flags().BoolVar(&cmd.DeleteSpace, "delete-space", false, "Should the corresponding space be deleted") + c.Flags().BoolVar(&cmd.Wait, "wait", false, "Termination of this command waits for space to be deleted. Without the flag delete-space, this flag has no effect.") + return c +} + +// Run executes the command +func (cmd *VirtualClusterCmd) Run(ctx context.Context, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + virtualClusterName := "" + if len(args) > 0 { + virtualClusterName = args[0] + } + + cmd.Cluster, cmd.Project, cmd.Space, virtualClusterName, err = helper.SelectVirtualClusterInstanceOrVirtualCluster(baseClient, virtualClusterName, cmd.Space, cmd.Project, cmd.Cluster, cmd.Log) + if err != nil { + return err + } + + if cmd.Project == "" { + return cmd.legacyDeleteVirtualCluster(ctx, baseClient, virtualClusterName) + } + + return cmd.deleteVirtualCluster(ctx, baseClient, virtualClusterName) +} + +func (cmd *VirtualClusterCmd) deleteVirtualCluster(ctx context.Context, baseClient client.Client, virtualClusterName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + err = managementClient.Loft().ManagementV1().VirtualClusterInstances(naming.ProjectNamespace(cmd.Project)).Delete(ctx, virtualClusterName, metav1.DeleteOptions{}) + if err != nil { + return errors.Wrap(err, "delete virtual cluster") + } + + cmd.Log.Donef("Successfully deleted virtual cluster %s in project %s", ansi.Color(virtualClusterName, "white+b"), ansi.Color(cmd.Project, "white+b")) + + // update kube config + if cmd.DeleteContext { + err = kubeconfig.DeleteContext(kubeconfig.VirtualClusterInstanceContextName(cmd.Project, virtualClusterName)) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully deleted kube context for virtual cluster %s", ansi.Color(virtualClusterName, "white+b")) + } + + // wait until deleted + if cmd.Wait { + cmd.Log.Info("Waiting for virtual cluster to be deleted...") + for isVirtualClusterInstanceStillThere(ctx, managementClient, naming.ProjectNamespace(cmd.Project), virtualClusterName) { + time.Sleep(time.Second) + } + cmd.Log.Done("Virtual Cluster is deleted") + } + + return nil +} + +func isVirtualClusterInstanceStillThere(ctx context.Context, managementClient kube.Interface, namespace, name string) bool { + _, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(namespace).Get(ctx, name, metav1.GetOptions{}) + return err == nil +} + +func (cmd *VirtualClusterCmd) legacyDeleteVirtualCluster(ctx context.Context, baseClient client.Client, virtualClusterName string) error { + clusterClient, err := baseClient.Cluster(cmd.Cluster) + if err != nil { + return err + } + + gracePeriod := int64(0) + err = clusterClient.Agent().StorageV1().VirtualClusters(cmd.Space).Delete(ctx, virtualClusterName, metav1.DeleteOptions{GracePeriodSeconds: &gracePeriod}) + if err != nil { + return errors.Wrap(err, "delete virtual cluster") + } + + cmd.Log.Donef("Successfully deleted virtual cluster %s in space %s in cluster %s", ansi.Color(virtualClusterName, "white+b"), ansi.Color(cmd.Space, "white+b"), ansi.Color(cmd.Cluster, "white+b")) + + // update kube config + if cmd.DeleteContext { + err = kubeconfig.DeleteContext(kubeconfig.VirtualClusterContextName(cmd.Cluster, cmd.Space, virtualClusterName)) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully deleted kube context for virtual cluster %s", ansi.Color(virtualClusterName, "white+b")) + } + + // check if we should delete space + spaceObject, err := clusterClient.Agent().ClusterV1().Spaces().Get(ctx, cmd.Space, metav1.GetOptions{}) + if err == nil && spaceObject.Annotations != nil && spaceObject.Annotations[constants.VClusterSpace] == "true" { + cmd.DeleteSpace = true + } + + // delete space + if cmd.DeleteSpace { + err = clusterClient.Agent().ClusterV1().Spaces().Delete(ctx, cmd.Space, metav1.DeleteOptions{}) + if err != nil { + return err + } + + // wait for termination + if cmd.Wait { + cmd.Log.Info("Waiting for space to be deleted...") + for isSpaceStillThere(ctx, clusterClient, cmd.Space) { + time.Sleep(time.Second) + } + } + + cmd.Log.Donef("Successfully deleted space %s", cmd.Space) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/delete.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/delete.go new file mode 100644 index 000000000..34e50a251 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/delete.go @@ -0,0 +1,70 @@ +package devpod + +import ( + "context" + "fmt" + "os" + + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/remotecommand" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +// DeleteCmd holds the cmd flags +type DeleteCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewDeleteCmd creates a new command +func NewDeleteCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &DeleteCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + c := &cobra.Command{ + Use: "delete", + Short: "Runs delete on a workspace", + Long: ` +####################################################### +################# loft devpod delete ################## +####################################################### + `, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context()) + }, + } + + return c +} + +func (cmd *DeleteCmd) Run(ctx context.Context) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + workspace, err := findWorkspace(ctx, baseClient) + if err != nil { + return err + } else if workspace == nil { + return fmt.Errorf("couldn't find workspace") + } + + conn, err := dialWorkspace(baseClient, workspace, "delete", optionsFromEnv(storagev1.DevPodFlagsDelete)) + if err != nil { + return err + } + + _, err = remotecommand.ExecuteConn(ctx, conn, os.Stdin, os.Stdout, os.Stderr, cmd.log.ErrorStreamOnly()) + if err != nil { + return fmt.Errorf("error executing: %w", err) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/devpod.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/devpod.go new file mode 100644 index 000000000..a3512fba5 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/devpod.go @@ -0,0 +1,45 @@ +package devpod + +import ( + "os" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/log" + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +// NewDevPodCmd creates a new cobra command +func NewDevPodCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + c := &cobra.Command{ + Use: "devpod", + Hidden: true, + Short: "DevPod commands", + Long: ` +######################################################## +##################### loft devpod ###################### +######################################################## + `, + PersistentPreRunE: func(cobraCmd *cobra.Command, args []string) error { + if os.Getenv("DEVPOD_DEBUG") == "true" { + log.Default.SetLevel(logrus.DebugLevel) + } + if globalFlags.Config == "" && os.Getenv("LOFT_CONFIG") != "" { + globalFlags.Config = os.Getenv("LOFT_CONFIG") + } + + log.Default.SetFormat(log.JSONFormat) + return nil + }, + Args: cobra.NoArgs, + } + + c.AddCommand(list.NewListCmd(globalFlags)) + c.AddCommand(NewUpCmd(globalFlags)) + c.AddCommand(NewStopCmd(globalFlags)) + c.AddCommand(NewSshCmd(globalFlags)) + c.AddCommand(NewStatusCmd(globalFlags)) + c.AddCommand(NewDeleteCmd(globalFlags)) + return c +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/list.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/list.go new file mode 100644 index 000000000..0c8a0f722 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/list.go @@ -0,0 +1,27 @@ +package list + +import ( + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/spf13/cobra" +) + +// NewListCmd creates a new cobra command +func NewListCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + c := &cobra.Command{ + Use: "list", + Hidden: true, + Short: "DevPod List commands", + Long: ` +####################################################### +################### loft devpod list ################## +####################################################### + `, + Args: cobra.NoArgs, + } + + c.AddCommand(NewProjectsCmd(globalFlags)) + c.AddCommand(NewTemplatesCmd(globalFlags)) + c.AddCommand(NewTemplateOptionsCmd(globalFlags)) + c.AddCommand(NewTemplateOptionsVersionCmd(globalFlags)) + return c +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/projects.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/projects.go new file mode 100644 index 000000000..90b5ff5b8 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/projects.go @@ -0,0 +1,122 @@ +package list + +import ( + "context" + "encoding/json" + "fmt" + "os" + "sort" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/log" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ProjectsCmd holds the cmd flags +type ProjectsCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewProjectsCmd creates a new command +func NewProjectsCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &ProjectsCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + c := &cobra.Command{ + Use: "projects", + Short: "Lists projects for the DevPod provider", + Long: ` +####################################################### +############# loft devpod list projects ############### +####################################################### + `, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context()) + }, + } + + return c +} + +func (cmd *ProjectsCmd) Run(ctx context.Context) error { + executable, err := os.Executable() + if err != nil { + return err + } + + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + projectList, err := managementClient.Loft().ManagementV1().Projects().List(ctx, metav1.ListOptions{}) + if err != nil { + return fmt.Errorf("list projects: %w", err) + } else if len(projectList.Items) == 0 { + return fmt.Errorf("you don't have access to any projects within DevPod engine, please make sure you have at least access to 1 project within Loft DevPod Engine") + } + + enum := []string{} + for _, project := range projectList.Items { + enum = append(enum, project.Name) + } + sort.Strings(enum) + + return printOptions(&OptionsFormat{ + Options: map[string]*Option{ + "LOFT_PROJECT": { + Description: "The Loft DevPod Engine project to use to create a new workspace in.", + Required: true, + Enum: enum, + Default: enum[0], + SubOptionsCommand: fmt.Sprintf("'%s' devpod list templates", executable), + }, + }, + }) +} + +func printOptions(options *OptionsFormat) error { + out, err := json.Marshal(options) + if err != nil { + return err + } + + fmt.Print(string(out)) + return nil +} + +type OptionsFormat struct { + // Options holds the provider options + Options map[string]*Option `json:"options,omitempty"` +} + +type Option struct { + // A description of the option displayed to the user by a supporting tool. + Description string `json:"description,omitempty"` + + // If required is true and the user doesn't supply a value, devpod will ask the user + Required bool `json:"required,omitempty"` + + // Suggestions are suggestions to show in the DevPod UI for this option + Suggestions []string `json:"suggestions,omitempty"` + + // Allowed values for this option. + Enum []string `json:"enum,omitempty"` + + // Default value if the user omits this option from their configuration. + Default string `json:"default,omitempty"` + + // SubOptionsCommand is the command to run to fetch sub options + SubOptionsCommand string `json:"subOptionsCommand,omitempty"` +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/templateoptions.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/templateoptions.go new file mode 100644 index 000000000..f70799461 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/templateoptions.go @@ -0,0 +1,148 @@ +package list + +import ( + "context" + "fmt" + "os" + "regexp" + "strings" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/log" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TemplateOptionsCmd holds the cmd flags +type TemplateOptionsCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewTemplateOptionsCmd creates a new command +func NewTemplateOptionsCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &TemplateOptionsCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + c := &cobra.Command{ + Use: "templateoptions", + Short: "Lists template options for the DevPod provider", + Long: ` +####################################################### +############ loft devpod list templates ############### +####################################################### + `, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context()) + }, + } + + return c +} + +func (cmd *TemplateOptionsCmd) Run(ctx context.Context) error { + executable, err := os.Executable() + if err != nil { + return err + } + + projectName := os.Getenv("LOFT_PROJECT") + if projectName == "" { + return fmt.Errorf("LOFT_PROJECT environment variable is empty") + } + + templateName := os.Getenv("LOFT_TEMPLATE") + if templateName == "" { + return fmt.Errorf("LOFT_TEMPLATE environment variable is empty") + } + + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // check template + template, err := FindTemplate(ctx, managementClient, projectName, templateName) + if err != nil { + return err + } + + // is template versioned? + options := map[string]*Option{} + if len(template.Spec.Versions) > 0 { + versions := []string{"latest"} + for _, version := range template.Spec.Versions { + versions = append(versions, version.Version) + } + + options["LOFT_TEMPLATE_VERSION"] = &Option{ + Description: "The template version. If empty will use the latest version", + Required: true, + Default: "latest", + Enum: versions, + SubOptionsCommand: fmt.Sprintf("'%s' devpod list templateoptionsversion", executable), + } + } else { + // parameters + options = parametersToOptions(template.Spec.Parameters) + } + + // print to stdout + return printOptions(&OptionsFormat{Options: options}) +} + +var replaceRegEx = regexp.MustCompile("[^a-zA-Z0-9]+") + +func parametersToOptions(parameters []storagev1.AppParameter) map[string]*Option { + options := map[string]*Option{} + for _, parameter := range parameters { + optionName := VariableToEnvironmentVariable(parameter.Variable) + options[optionName] = &Option{ + Description: parameter.Description, + Required: parameter.Required, + Enum: parameter.Options, + Default: parameter.DefaultValue, + } + } + return options +} + +func FindTemplate(ctx context.Context, managementClient kube.Interface, projectName, templateName string) (*managementv1.DevPodWorkspaceTemplate, error) { + templateList, err := managementClient.Loft().ManagementV1().Projects().ListTemplates(ctx, projectName, metav1.GetOptions{}) + if err != nil { + return nil, fmt.Errorf("list templates: %w", err) + } else if len(templateList.DevPodWorkspaceTemplates) == 0 { + return nil, fmt.Errorf("seems like there is no DevPod template allowed in project %s, please make sure to at least have a single template available", projectName) + } + + // find template + var template *managementv1.DevPodWorkspaceTemplate + for _, workspaceTemplate := range templateList.DevPodWorkspaceTemplates { + if workspaceTemplate.Name == templateName { + t := workspaceTemplate + template = &t + break + } + } + if template == nil { + return nil, fmt.Errorf("couldn't find template %s", templateName) + } + + return template, nil +} + +func VariableToEnvironmentVariable(variable string) string { + return "TEMPLATE_OPTION_" + strings.ToUpper(replaceRegEx.ReplaceAllString(variable, "_")) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/templateoptionsversion.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/templateoptionsversion.go new file mode 100644 index 000000000..b9c25954a --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/templateoptionsversion.go @@ -0,0 +1,109 @@ +package list + +import ( + "context" + "fmt" + "os" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/version" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +// TemplateOptionsVersionCmd holds the cmd flags +type TemplateOptionsVersionCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewTemplateOptionsVersionCmd creates a new command +func NewTemplateOptionsVersionCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &TemplateOptionsVersionCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + c := &cobra.Command{ + Use: "templateoptionsversion", + Short: "Lists template options for a specific version for the DevPod provider", + Long: ` +####################################################### +############ loft devpod list templates ############### +####################################################### + `, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context()) + }, + } + + return c +} + +func (cmd *TemplateOptionsVersionCmd) Run(ctx context.Context) error { + projectName := os.Getenv("LOFT_PROJECT") + if projectName == "" { + return fmt.Errorf("LOFT_PROJECT environment variable is empty") + } + templateName := os.Getenv("LOFT_TEMPLATE") + if templateName == "" { + return fmt.Errorf("LOFT_TEMPLATE environment variable is empty") + } + templateVersion := os.Getenv("LOFT_TEMPLATE_VERSION") + if templateName == "" { + return fmt.Errorf("LOFT_TEMPLATE_VERSION environment variable is empty") + } + + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // check template + template, err := FindTemplate(ctx, managementClient, projectName, templateName) + if err != nil { + return err + } + + // get parameters + parameters, err := GetTemplateParameters(template, templateVersion) + if err != nil { + return err + } + + // print to stdout + return printOptions(&OptionsFormat{Options: parametersToOptions(parameters)}) +} + +func GetTemplateParameters(template *managementv1.DevPodWorkspaceTemplate, templateVersion string) ([]storagev1.AppParameter, error) { + if templateVersion == "latest" { + templateVersion = "" + } + + if templateVersion == "" { + latestVersion := version.GetLatestVersion(template) + if latestVersion == nil { + return nil, fmt.Errorf("couldn't find any version in template") + } + + return latestVersion.(*storagev1.DevPodWorkspaceTemplateVersion).Parameters, nil + } + + _, latestMatched, err := version.GetLatestMatchedVersion(template, templateVersion) + if err != nil { + return nil, err + } else if latestMatched == nil { + return nil, fmt.Errorf("couldn't find any matching version to %s", templateVersion) + } + + return latestMatched.(*storagev1.DevPodWorkspaceTemplateVersion).Parameters, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/templates.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/templates.go new file mode 100644 index 000000000..74541a8be --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list/templates.go @@ -0,0 +1,110 @@ +package list + +import ( + "context" + "fmt" + "os" + "sort" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/log" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TemplatesCmd holds the cmd flags +type TemplatesCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewTemplatesCmd creates a new command +func NewTemplatesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &TemplatesCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + c := &cobra.Command{ + Use: "templates", + Short: "Lists templates for the DevPod provider", + Long: ` +####################################################### +############ loft devpod list templates ############### +####################################################### + `, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context()) + }, + } + + return c +} + +func (cmd *TemplatesCmd) Run(ctx context.Context) error { + executable, err := os.Executable() + if err != nil { + return err + } + + projectName := os.Getenv("LOFT_PROJECT") + if projectName == "" { + return fmt.Errorf("LOFT_PROJECT environment variable is empty") + } + + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + templateList, err := managementClient.Loft().ManagementV1().Projects().ListTemplates(ctx, projectName, metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("list templates: %w", err) + } else if len(templateList.DevPodWorkspaceTemplates) == 0 { + return fmt.Errorf("seems like there is no DevPod template allowed in project %s, please make sure to at least have a single template available", projectName) + } + + // collect templates + templates := []string{} + for _, template := range templateList.DevPodWorkspaceTemplates { + templates = append(templates, template.Name) + } + sort.Strings(templates) + + runnerList, err := managementClient.Loft().ManagementV1().Projects().ListClusters(ctx, projectName, metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("list runners: %w", err) + } else if len(runnerList.Runners) == 0 { + return fmt.Errorf("seems like there is no runner allowed in project %s, please make sure to at least have a single runner available", projectName) + } + + // collect runners + runners := []string{} + for _, runner := range runnerList.Runners { + runners = append(runners, runner.Name) + } + sort.Strings(runners) + + return printOptions(&OptionsFormat{ + Options: map[string]*Option{ + "LOFT_RUNNER": { + Description: "The Loft DevPod Engine runner to use for a new workspace.", + Enum: runners, + }, + "LOFT_TEMPLATE": { + Description: "The template to use for a new workspace.", + Required: true, + Enum: templates, + Default: templateList.DefaultDevPodWorkspaceTemplate, + SubOptionsCommand: fmt.Sprintf("'%s' devpod list templateoptions", executable), + }, + }, + }) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/ssh.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/ssh.go new file mode 100644 index 000000000..a4e814165 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/ssh.go @@ -0,0 +1,70 @@ +package devpod + +import ( + "context" + "fmt" + "os" + + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/remotecommand" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +// SshCmd holds the cmd flags +type SshCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewSshCmd creates a new command +func NewSshCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &SshCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + c := &cobra.Command{ + Use: "ssh", + Short: "Runs ssh on a workspace", + Long: ` +####################################################### +################### loft devpod ssh ################### +####################################################### + `, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context()) + }, + } + + return c +} + +func (cmd *SshCmd) Run(ctx context.Context) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + workspace, err := findWorkspace(ctx, baseClient) + if err != nil { + return err + } else if workspace == nil { + return fmt.Errorf("couldn't find workspace") + } + + conn, err := dialWorkspace(baseClient, workspace, "ssh", optionsFromEnv(storagev1.DevPodFlagsSsh)) + if err != nil { + return err + } + + _, err = remotecommand.ExecuteConn(ctx, conn, os.Stdin, os.Stdout, os.Stderr, cmd.log.ErrorStreamOnly()) + if err != nil { + return fmt.Errorf("error executing: %w", err) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/status.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/status.go new file mode 100644 index 000000000..82110667c --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/status.go @@ -0,0 +1,82 @@ +package devpod + +import ( + "context" + "encoding/json" + "fmt" + "os" + + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/remotecommand" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +// StatusCmd holds the cmd flags +type StatusCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewStatusCmd creates a new command +func NewStatusCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &StatusCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + c := &cobra.Command{ + Use: "status", + Short: "Runs status on a workspace", + Long: ` +####################################################### +################# loft devpod status ################## +####################################################### + `, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context()) + }, + } + + return c +} + +func (cmd *StatusCmd) Run(ctx context.Context) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + workspace, err := findWorkspace(ctx, baseClient) + if err != nil { + return err + } else if workspace == nil { + out, err := json.Marshal(&storagev1.WorkspaceStatusResult{ + ID: os.Getenv(LOFT_WORKSPACE_ID), + Context: os.Getenv(LOFT_WORKSPACE_CONTEXT), + State: string(storagev1.WorkspaceStatusNotFound), + Provider: os.Getenv(LOFT_WORKSPACE_PROVIDER), + }) + if err != nil { + return err + } + + fmt.Println(string(out)) + return nil + } + + conn, err := dialWorkspace(baseClient, workspace, "getstatus", optionsFromEnv(storagev1.DevPodFlagsStatus)) + if err != nil { + return err + } + + _, err = remotecommand.ExecuteConn(ctx, conn, os.Stdin, os.Stdout, os.Stderr, cmd.log.ErrorStreamOnly()) + if err != nil { + return fmt.Errorf("error executing: %w", err) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/stop.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/stop.go new file mode 100644 index 000000000..cb202c548 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/stop.go @@ -0,0 +1,83 @@ +package devpod + +import ( + "context" + "fmt" + "os" + + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/remotecommand" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +var ( + LOFT_WORKSPACE_ID = "WORKSPACE_ID" + LOFT_WORKSPACE_CONTEXT = "WORKSPACE_CONTEXT" + LOFT_WORKSPACE_PROVIDER = "WORKSPACE_PROVIDER" + + LOFT_WORKSPACE_UID = "WORKSPACE_UID" + + LOFT_PROJECT_OPTION = "LOFT_PROJECT" + + LOFT_TEMPLATE_OPTION = "LOFT_TEMPLATE" + LOFT_TEMPLATE_VERSION_OPTION = "LOFT_TEMPLATE_VERSION" +) + +// StopCmd holds the cmd flags +type StopCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewStopCmd creates a new command +func NewStopCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &StopCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + c := &cobra.Command{ + Use: "stop", + Short: "Runs stop on a workspace", + Long: ` +####################################################### +################## loft devpod stop ################### +####################################################### + `, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context()) + }, + } + + return c +} + +func (cmd *StopCmd) Run(ctx context.Context) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + workspace, err := findWorkspace(ctx, baseClient) + if err != nil { + return err + } else if workspace == nil { + return fmt.Errorf("couldn't find workspace") + } + + conn, err := dialWorkspace(baseClient, workspace, "stop", optionsFromEnv(storagev1.DevPodFlagsStop)) + if err != nil { + return err + } + + _, err = remotecommand.ExecuteConn(ctx, conn, os.Stdin, os.Stdout, os.Stderr, cmd.log.ErrorStreamOnly()) + if err != nil { + return fmt.Errorf("error executing: %w", err) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/up.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/up.go new file mode 100644 index 000000000..de402a4e5 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/up.go @@ -0,0 +1,336 @@ +package devpod + +import ( + "context" + "crypto/tls" + "fmt" + "net/http" + "net/url" + "os" + "strings" + "time" + + "github.com/ghodss/yaml" + "github.com/gorilla/websocket" + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/parameters" + "github.com/loft-sh/loftctl/v3/pkg/remotecommand" + "github.com/loft-sh/log" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" +) + +// UpCmd holds the cmd flags +type UpCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewUpCmd creates a new command +func NewUpCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &UpCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + c := &cobra.Command{ + Use: "up", + Short: "Runs up on a workspace", + Long: ` +####################################################### +#################### loft devpod up ################### +####################################################### + `, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context(), log.GetInstance().ErrorStreamOnly()) + }, + } + + return c +} + +func (cmd *UpCmd) Run(ctx context.Context, log log.Logger) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + workspace, err := findWorkspace(ctx, baseClient) + if err != nil { + return err + } + + // create workspace if doesn't exist + if workspace == nil { + workspace, err = createWorkspace(ctx, baseClient, log) + if err != nil { + return fmt.Errorf("create workspace: %w", err) + } + } + + conn, err := dialWorkspace(baseClient, workspace, "up", optionsFromEnv(storagev1.DevPodFlagsUp)) + if err != nil { + return err + } + + _, err = remotecommand.ExecuteConn(ctx, conn, os.Stdin, os.Stdout, os.Stderr, cmd.log.ErrorStreamOnly()) + if err != nil { + return fmt.Errorf("error executing: %w", err) + } + + return nil +} + +func createWorkspace(ctx context.Context, baseClient client.Client, log log.Logger) (*managementv1.DevPodWorkspaceInstance, error) { + workspaceID, workspaceUID, projectName, err := getWorkspaceInfo() + if err != nil { + return nil, err + } + + // get template + template := os.Getenv(LOFT_TEMPLATE_OPTION) + if template == "" { + return nil, fmt.Errorf("%s is missing in environment", LOFT_TEMPLATE_OPTION) + } + + // create client + managementClient, err := baseClient.Management() + if err != nil { + return nil, err + } + + // get template version + templateVersion := os.Getenv(LOFT_TEMPLATE_VERSION_OPTION) + if templateVersion == "latest" { + templateVersion = "" + } + + // find parameters + resolvedParameters, err := getParametersFromEnvironment(ctx, managementClient, projectName, template, templateVersion) + if err != nil { + return nil, fmt.Errorf("resolve parameters: %w", err) + } + + // get workspace picture + workspacePicture := os.Getenv("WORKSPACE_PICTURE") + // get workspace source + workspaceSource := os.Getenv("WORKSPACE_SOURCE") + + workspace := &managementv1.DevPodWorkspaceInstance{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: naming.SafeConcatNameMax([]string{workspaceID}, 53) + "-", + Namespace: naming.ProjectNamespace(projectName), + Labels: map[string]string{ + storagev1.DevPodWorkspaceIDLabel: workspaceID, + storagev1.DevPodWorkspaceUIDLabel: workspaceUID, + }, + Annotations: map[string]string{ + storagev1.DevPodWorkspacePictureAnnotation: workspacePicture, + storagev1.DevPodWorkspaceSourceAnnotation: workspaceSource, + }, + }, + Spec: managementv1.DevPodWorkspaceInstanceSpec{ + DevPodWorkspaceInstanceSpec: storagev1.DevPodWorkspaceInstanceSpec{ + DisplayName: workspaceID, + Parameters: resolvedParameters, + TemplateRef: &storagev1.TemplateRef{ + Name: template, + Version: templateVersion, + }, + }, + }, + } + + // check if runner is defined + runnerName := os.Getenv("LOFT_RUNNER") + if runnerName != "" { + workspace.Spec.RunnerRef.Runner = runnerName + } + + // create instance + workspace, err = managementClient.Loft().ManagementV1().DevPodWorkspaceInstances(naming.ProjectNamespace(projectName)).Create(ctx, workspace, metav1.CreateOptions{}) + if err != nil { + return nil, err + } + log.Infof("Created workspace %s", workspace.Name) + + // we need to wait until instance is scheduled + err = wait.PollUntilContextTimeout(ctx, time.Second, 30*time.Second, true, func(ctx context.Context) (done bool, err error) { + workspace, err = managementClient.Loft().ManagementV1().DevPodWorkspaceInstances(naming.ProjectNamespace(projectName)).Get(ctx, workspace.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + + if !isReady(workspace) { + log.Debugf("Workspace %s is in phase %s, waiting until its ready", workspace.Name, workspace.Status.Phase) + return false, nil + } + + log.Debugf("Workspace %s is ready", workspace.Name) + return true, nil + }) + if err != nil { + return nil, fmt.Errorf("wait for instance to get ready: %w", err) + } + + return workspace, nil +} + +func getParametersFromEnvironment(ctx context.Context, kubeClient kube.Interface, projectName, templateName, templateVersion string) (string, error) { + // are there any parameters in environment? + environmentVariables := os.Environ() + envMap := map[string]string{} + for _, v := range environmentVariables { + splitted := strings.SplitN(v, "=", 2) + if len(splitted) != 2 { + continue + } else if !strings.HasPrefix(splitted[0], "TEMPLATE_OPTION_") { + continue + } + + envMap[splitted[0]] = splitted[1] + } + if len(envMap) == 0 { + return "", nil + } + + // find these in the template + template, err := list.FindTemplate(ctx, kubeClient, projectName, templateName) + if err != nil { + return "", fmt.Errorf("find template: %w", err) + } + + // find version + var templateParameters []storagev1.AppParameter + if len(template.Spec.Versions) > 0 { + templateParameters, err = list.GetTemplateParameters(template, templateVersion) + if err != nil { + return "", err + } + } else { + templateParameters = template.Spec.Parameters + } + + // parse versions + outMap := map[string]interface{}{} + for _, parameter := range templateParameters { + // check if its in environment + val := envMap[list.VariableToEnvironmentVariable(parameter.Variable)] + outVal, err := parameters.VerifyValue(val, parameter) + if err != nil { + return "", fmt.Errorf("validate parameter %s: %w", parameter.Variable, err) + } + + outMap[parameter.Variable] = outVal + } + + // convert to string + out, err := yaml.Marshal(outMap) + if err != nil { + return "", err + } + return string(out), nil +} + +func isReady(workspace *managementv1.DevPodWorkspaceInstance) bool { + return workspace.Status.Phase == storagev1.InstanceReady +} + +func getWorkspaceInfo() (string, string, string, error) { + // get workspace id + workspaceID := os.Getenv(LOFT_WORKSPACE_ID) + if workspaceID == "" { + return "", "", "", fmt.Errorf("%s is missing in environment", LOFT_WORKSPACE_ID) + } + + // get workspace uid + workspaceUID := os.Getenv(LOFT_WORKSPACE_UID) + if workspaceUID == "" { + return "", "", "", fmt.Errorf("%s is missing in environment", LOFT_WORKSPACE_UID) + } + + // get project + projectName := os.Getenv(LOFT_PROJECT_OPTION) + if projectName == "" { + return "", "", "", fmt.Errorf("%s is missing in environment", LOFT_PROJECT_OPTION) + } + + return workspaceID, workspaceUID, projectName, nil +} + +func findWorkspace(ctx context.Context, baseClient client.Client) (*managementv1.DevPodWorkspaceInstance, error) { + _, workspaceUID, projectName, err := getWorkspaceInfo() + if err != nil { + return nil, err + } + + // create client + managementClient, err := baseClient.Management() + if err != nil { + return nil, fmt.Errorf("create management client: %w", err) + } + + // get workspace + workspaceList, err := managementClient.Loft().ManagementV1().DevPodWorkspaceInstances(naming.ProjectNamespace(projectName)).List(ctx, metav1.ListOptions{ + LabelSelector: storagev1.DevPodWorkspaceUIDLabel + "=" + workspaceUID, + }) + if err != nil { + return nil, err + } else if len(workspaceList.Items) == 0 { + return nil, nil + } + + return &workspaceList.Items[0], nil +} + +func optionsFromEnv(name string) url.Values { + options := os.Getenv(name) + if options != "" { + return url.Values{ + "options": []string{options}, + } + } + + return nil +} + +func dialWorkspace(baseClient client.Client, workspace *managementv1.DevPodWorkspaceInstance, subResource string, values url.Values) (*websocket.Conn, error) { + restConfig, err := baseClient.ManagementConfig() + if err != nil { + return nil, err + } + + host := restConfig.Host + parsedURL, _ := url.Parse(restConfig.Host) + if parsedURL != nil && parsedURL.Host != "" { + host = parsedURL.Host + } + + loftURL := "wss://" + host + "/kubernetes/management/apis/management.loft.sh/v1/namespaces/" + workspace.Namespace + "/devpodworkspaceinstances/" + workspace.Name + "/" + subResource + if len(values) > 0 { + loftURL += "?" + values.Encode() + } + + dialer := websocket.Dialer{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + Proxy: http.ProxyFromEnvironment, + HandshakeTimeout: 45 * time.Second, + } + + conn, _, err := dialer.Dial(loftURL, map[string][]string{ + "Authorization": {"Bearer " + restConfig.BearerToken}, + }) + if err != nil { + return nil, fmt.Errorf("error dialing %s: %w", loftURL, err) + } + + return conn, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/generate/adminkubeconfig.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/generate/adminkubeconfig.go new file mode 100644 index 000000000..ef5651096 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/generate/adminkubeconfig.go @@ -0,0 +1,188 @@ +package generate + +import ( + "context" + "time" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/config" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + perrors "github.com/pkg/errors" + "github.com/spf13/cobra" + corev1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" +) + +// AdminKubeConfigCmd holds the cmd flags +type AdminKubeConfigCmd struct { + *flags.GlobalFlags + + Namespace string + ServiceAccount string + log log.Logger +} + +// NewAdminKubeConfigCmd creates a new command +func NewAdminKubeConfigCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &AdminKubeConfigCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("generate admin-kube-config", ` +Creates a new kube config that can be used to connect +a cluster to loft. + +Example: +loft generate admin-kube-config +loft generate admin-kube-config --namespace mynamespace +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +######## devspace generate admin-kube-config ########## +####################################################### +Creates a new kube config that can be used to connect +a cluster to loft. + +Example: +devspace generate admin-kube-config +devspace generate admin-kube-config --namespace mynamespace +####################################################### + ` + } + c := &cobra.Command{ + Use: "admin-kube-config", + Short: "Generates a new kube config for connecting a cluster", + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + loader := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(clientcmd.NewDefaultClientConfigLoadingRules(), &clientcmd.ConfigOverrides{}) + c, err := loader.ClientConfig() + if err != nil { + return err + } + + return cmd.Run(cobraCmd.Context(), c, cobraCmd, args) + }, + } + + c.Flags().StringVar(&cmd.Namespace, "namespace", "loft", "The namespace to generate the service account in. The namespace will be created if it does not exist") + c.Flags().StringVar(&cmd.ServiceAccount, "service-account", "loft-admin", "The service account name to create") + return c +} + +// Run executes the command +func (cmd *AdminKubeConfigCmd) Run(ctx context.Context, c *rest.Config, cobraCmd *cobra.Command, args []string) error { + token, err := GetAuthToken(ctx, c, cmd.Namespace, cmd.ServiceAccount) + if err != nil { + return perrors.Wrap(err, "get auth token") + } + + // print kube config + return kubeconfig.PrintTokenKubeConfig(c, string(token)) +} + +func GetAuthToken(ctx context.Context, c *rest.Config, namespace, serviceAccount string) ([]byte, error) { + client, err := kubernetes.NewForConfig(c) + if err != nil { + return []byte{}, perrors.Wrap(err, "create kube client") + } + + // make sure namespace exists + _, err = client.CoreV1().Namespaces().Create(ctx, &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: namespace, + }, + }, metav1.CreateOptions{}) + if err != nil { + if !kerrors.IsAlreadyExists(err) { + return []byte{}, err + } + } + + // create service account + _, err = client.CoreV1().ServiceAccounts(namespace).Create(ctx, &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: serviceAccount, + }, + }, metav1.CreateOptions{}) + if err != nil { + if !kerrors.IsAlreadyExists(err) { + return []byte{}, err + } + } + + // create clusterrolebinding + _, err = client.RbacV1().ClusterRoleBindings().Create(ctx, &rbacv1.ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{ + Name: serviceAccount + "-binding", + }, + Subjects: []rbacv1.Subject{ + { + Kind: "ServiceAccount", + Name: serviceAccount, + Namespace: namespace, + }, + }, + RoleRef: rbacv1.RoleRef{ + APIGroup: rbacv1.GroupName, + Kind: "ClusterRole", + Name: "cluster-admin", + }, + }, metav1.CreateOptions{}) + if err != nil { + if !kerrors.IsAlreadyExists(err) { + return []byte{}, err + } + } + + // manually create token secret. This approach works for all kubernetes versions + tokenSecretName := serviceAccount + "-token" + _, err = client.CoreV1().Secrets(namespace).Create(ctx, &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: tokenSecretName, + Namespace: namespace, + Annotations: map[string]string{ + corev1.ServiceAccountNameKey: serviceAccount, + }, + }, + Type: corev1.SecretTypeServiceAccountToken, + }, metav1.CreateOptions{}) + if err != nil { + if !kerrors.IsAlreadyExists(err) { + return []byte{}, err + } + } + + // wait for secret token to be populated + token := []byte{} + err = wait.PollUntilContextTimeout(ctx, 250*time.Millisecond, config.Timeout(), false, func(ctx context.Context) (done bool, err error) { + secret, err := client.CoreV1().Secrets(namespace).Get(ctx, tokenSecretName, metav1.GetOptions{}) + if err != nil { + return false, perrors.Wrap(err, "get service account secret") + } + + ok := false + token, ok = secret.Data["token"] + if !ok { + return false, nil + } + + return true, nil + }) + if err != nil { + return []byte{}, err + } + + return token, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/generate/generate.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/generate/generate.go new file mode 100644 index 000000000..c15b89323 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/generate/generate.go @@ -0,0 +1,29 @@ +package generate + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewGenerateCmd creates a new cobra command +func NewGenerateCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + description := product.ReplaceWithHeader("generate", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################## devspace generate ################## +####################################################### + ` + } + c := &cobra.Command{ + Use: "generate", + Short: "Generates configuration", + Long: description, + Args: cobra.NoArgs, + } + + c.AddCommand(NewAdminKubeConfigCmd(globalFlags)) + return c +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get/get.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get/get.go new file mode 100644 index 000000000..959f492c0 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get/get.go @@ -0,0 +1,31 @@ +package get + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewGetCmd creates a new cobra command +func NewGetCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + description := product.ReplaceWithHeader("get", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +#################### devspace get ##################### +####################################################### +` + } + c := &cobra.Command{ + Use: "get", + Short: "Get configuration", + Long: description, + Args: cobra.NoArgs, + } + + c.AddCommand(NewUserCmd(globalFlags)) + c.AddCommand(NewSecretCmd(globalFlags, defaults)) + return c +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get/secret.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get/secret.go new file mode 100644 index 000000000..a1bc44014 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get/secret.go @@ -0,0 +1,270 @@ +package get + +import ( + "context" + "encoding/json" + "fmt" + "os" + "strings" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/set" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + "github.com/loft-sh/log/survey" + "github.com/pkg/errors" + "github.com/spf13/cobra" + "gopkg.in/yaml.v2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + OutputYAML string = "yaml" + OutputJSON string = "json" + OutputValue string = "value" +) + +// SecretCmd holds the flags +type SecretCmd struct { + *flags.GlobalFlags + Namespace string + Project string + All bool + Output string + + log log.Logger +} + +// NewSecretCmd creates a new command +func NewSecretCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &SecretCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("get secret", ` +Returns the key value of a project / shared secret. + +Example: +loft get secret test-secret.key +loft get secret test-secret.key --project myproject +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################# devspace get secret ################## +######################################################## +Returns the key value of a project / shared secret. + +Example: +devspace get secret test-secret.key +devspace get secret test-secret.key --project myproject +######################################################## + ` + } + useLine, validator := util.NamedPositionalArgsValidator(true, "SECRET_NAME") + c := &cobra.Command{ + Use: "secret" + useLine, + Short: "Returns the key value of a project / shared secret", + Long: description, + Args: validator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to read the project secret from.") + c.Flags().StringVarP(&cmd.Namespace, "namespace", "n", "", product.Replace("The namespace in the loft cluster to read the secret from. If omitted will use the namespace where loft is installed in")) + c.Flags().BoolVarP(&cmd.All, "all", "a", false, "Display all secret keys") + c.Flags().StringVarP(&cmd.Output, "output", "o", "", "Output format. One of: (json, yaml, value). If the --all flag is passed 'yaml' will be the default format") + return c +} + +// RunUsers executes the functionality +func (cmd *SecretCmd) Run(ctx context.Context, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + var secretType set.SecretType + + if cmd.Project != "" { + secretType = set.ProjectSecret + } else { + secretType = set.SharedSecret + } + + output := cmd.Output + + if cmd.All && output == "" { + output = OutputYAML + } else if output == "" { + output = OutputValue + } + + if cmd.All && output == OutputValue { + return errors.Errorf("output format %s is not allowed with the --all flag.", OutputValue) + } + + // get target namespace + var namespace string + + switch secretType { + case set.ProjectSecret: + namespace, err = set.GetProjectSecretNamespace(cmd.Project) + if err != nil { + return errors.Wrap(err, "get project secrets namespace") + } + case set.SharedSecret: + namespace, err = set.GetSharedSecretNamespace(cmd.Namespace) + if err != nil { + return errors.Wrap(err, "get shared secrets namespace") + } + } + + // get secret + secretName := "" + keyName := "" + if len(args) == 1 { + secret := args[0] + idx := strings.Index(secret, ".") + if idx == -1 { + secretName = secret + } else { + secretName = secret[:idx] + keyName = secret[idx+1:] + } + } else { + secretNameList := []string{} + + switch secretType { + case set.ProjectSecret: + secrets, err := managementClient.Loft().ManagementV1().ProjectSecrets(namespace).List(ctx, metav1.ListOptions{}) + if err != nil { + return errors.Wrap(err, "list project secrets") + } + + for _, s := range secrets.Items { + secretNameList = append(secretNameList, s.Name) + } + case set.SharedSecret: + secrets, err := managementClient.Loft().ManagementV1().SharedSecrets(namespace).List(ctx, metav1.ListOptions{}) + if err != nil { + return errors.Wrap(err, "list shared secrets") + } + + for _, s := range secrets.Items { + secretNameList = append(secretNameList, s.Name) + } + } + + if len(secretNameList) == 0 { + return fmt.Errorf("couldn't find any secrets that could be read. Please make sure to create a shared secret before you try to read it") + } + + secretName, err = cmd.log.Question(&survey.QuestionOptions{ + Question: "Please select a secret to read from", + DefaultValue: secretNameList[0], + Options: secretNameList, + }) + if err != nil { + return errors.Wrap(err, "ask question") + } + } + + if cmd.All && keyName != "" { + cmd.log.Warnf("secret key %s ignored because --all was passed", keyName) + } + + var secretData map[string][]byte + + switch secretType { + case set.ProjectSecret: + pSecret, err := managementClient.Loft().ManagementV1().ProjectSecrets(namespace).Get(ctx, secretName, metav1.GetOptions{}) + if err != nil { + return errors.Wrap(err, "get secrets") + } else if len(pSecret.Spec.Data) == 0 { + return errors.Errorf("secret %s has no keys to read. Please set a key before trying to read it", secretName) + } + + secretData = pSecret.Spec.Data + case set.SharedSecret: + sSecret, err := managementClient.Loft().ManagementV1().SharedSecrets(namespace).Get(ctx, secretName, metav1.GetOptions{}) + if err != nil { + return errors.Wrap(err, "get secrets") + } else if len(sSecret.Spec.Data) == 0 { + return errors.Errorf("secret %s has no keys to read. Please set a key before trying to read it", secretName) + } + + secretData = sSecret.Spec.Data + } + + kvs := secretData + if !cmd.All { + if keyName == "" { + var keyNames []string + + for k := range secretData { + keyNames = append(keyNames, k) + } + + keyName, err = cmd.log.Question(&survey.QuestionOptions{ + Question: "Please select a secret key to read", + DefaultValue: keyNames[0], + Options: keyNames, + }) + if err != nil { + return errors.Wrap(err, "ask question") + } + } + + keyValue, ok := secretData[keyName] + if ok { + kvs = map[string][]byte{ + keyName: keyValue, + } + } + } + + var outputData []byte + if output == OutputValue { + var ok bool + outputData, ok = kvs[keyName] + if !ok { + return errors.Errorf("key %s does not exist in secret %s", keyName, secretName) + } + } else { + stringValues := map[string]string{} + for k, v := range kvs { + stringValues[k] = string(v) + } + + if output == OutputYAML { + outputData, err = yaml.Marshal(stringValues) + if err != nil { + return err + } + } else if output == OutputJSON { + outputData, err = json.Marshal(stringValues) + if err != nil { + return err + } + } else { + return errors.Errorf("unknown output format %s, allowed formats are: value, json, yaml", output) + } + } + + _, err = os.Stdout.Write(outputData) + return err +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get/user.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get/user.go new file mode 100644 index 000000000..495942889 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get/user.go @@ -0,0 +1,97 @@ +package get + +import ( + "context" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/loft-sh/log/table" + "github.com/pkg/errors" + "github.com/spf13/cobra" +) + +// UserCmd holds the lags +type UserCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewUserCmd creates a new command +func NewUserCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &UserCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("get user", ` +Returns the currently logged in user + +Example: +loft get user +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################## devspace get user ################### +######################################################## +Returns the currently logged in user + +Example: +devspace get user +######################################################## + ` + } + c := &cobra.Command{ + Use: "user", + Short: "Retrieves the current logged in user", + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context()) + }, + } + + return c +} + +// RunUsers executes the functionality +func (cmd *UserCmd) Run(ctx context.Context) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + client, err := baseClient.Management() + if err != nil { + return err + } + + userName, teamName, err := helper.GetCurrentUser(ctx, client) + if err != nil { + return err + } else if teamName != nil { + return errors.New("logged in with a team and not a user") + } + + header := []string{ + "Username", + "Kubernetes Name", + "Display Name", + "Email", + } + values := [][]string{} + values = append(values, []string{ + userName.Username, + userName.Name, + userName.DisplayName, + userName.Email, + }) + + table.PrintTable(cmd.log, header, values) + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd/importcmd.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd/importcmd.go new file mode 100644 index 000000000..d7b4ac605 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd/importcmd.go @@ -0,0 +1,35 @@ +package importcmd + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewImportCmd creates a new command +func NewImportCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + description := product.ReplaceWithHeader("import", ` + +Imports a specified resource into a Loft project. + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +#################### devspace import ################### +######################################################## + +Imports a specified resource into a Loft project. + ` + } + importCmd := &cobra.Command{ + Use: "import", + Short: product.Replace("Imports loft resources"), + Long: description, + Args: cobra.NoArgs, + } + + importCmd.AddCommand(NewVClusterCmd(globalFlags)) + importCmd.AddCommand(NewSpaceCmd(globalFlags)) + return importCmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd/space.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd/space.go new file mode 100644 index 000000000..7d9b0ad48 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd/space.go @@ -0,0 +1,113 @@ +package importcmd + +import ( + "context" + + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/api/v3/pkg/product" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type SpaceCmd struct { + *flags.GlobalFlags + + ClusterName string + Project string + ImportName string + + log log.Logger +} + +// NewSpaceCmd creates a new command +func NewSpaceCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &SpaceCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("import space", ` +Imports a space into a Loft project. + +Example: +loft import space my-space --cluster connected-cluster \ + --project my-project --importname my-space +####################################################### + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################ devspace import space ################ +####################################################### +Imports a space into a Loft project. + +Example: +devspace import space my-space --cluster connected-cluster \ + --project my-project --importname my-space +####################################################### + ` + } + c := &cobra.Command{ + Use: "space" + util.SpaceNameOnlyUseLine, + Short: product.Replace("Imports a space into a Loft project"), + Long: description, + Args: util.SpaceNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.Run(cobraCmd.Context(), args) + }, + } + + c.Flags().StringVar(&cmd.ClusterName, "cluster", "", "Cluster name of the cluster from where the space is to be imported") + c.Flags().StringVar(&cmd.Project, "project", "", "The project to import the space into") + c.Flags().StringVar(&cmd.ImportName, "importname", "", "The name of the space under projects. If unspecified, will use the space name") + + _ = c.MarkFlagRequired("cluster") + _ = c.MarkFlagRequired("project") + + return c +} + +func (cmd *SpaceCmd) Run(ctx context.Context, args []string) error { + // Get spaceName from command argument + var spaceName string = args[0] + + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + err = client.VerifyVersion(baseClient) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + if _, err = managementClient.Loft().ManagementV1().Projects().ImportSpace(ctx, cmd.Project, &managementv1.ProjectImportSpace{ + SourceSpace: managementv1.ProjectImportSpaceSource{ + Name: spaceName, + Cluster: cmd.ClusterName, + ImportName: cmd.ImportName, + }, + }, metav1.CreateOptions{}); err != nil { + return err + } + + cmd.log.Donef("Successfully imported space %s into project %s", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Project, "white+b")) + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd/vcluster.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd/vcluster.go new file mode 100644 index 000000000..4007dfda0 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd/vcluster.go @@ -0,0 +1,117 @@ +package importcmd + +import ( + "context" + + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/api/v3/pkg/product" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type VClusterCmd struct { + *flags.GlobalFlags + + VClusterClusterName string + VClusterNamespace string + Project string + ImportName string + + log log.Logger +} + +// NewVClusterCmd creates a new command +func NewVClusterCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &VClusterCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("import vcluster", ` +Imports a vcluster into a Loft project. + +Example: +loft import vcluster my-vcluster --cluster connected-cluster my-vcluster \ + --namespace vcluster-my-vcluster --project my-project --importname my-vcluster +####################################################### + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################ devspace import vcluster ############# +####################################################### +Imports a vcluster into a Loft project. + +Example: +devspace import vcluster my-vcluster --cluster connected-cluster my-vcluster \ + --namespace vcluster-my-vcluster --project my-project --importname my-vcluster +####################################################### + ` + } + c := &cobra.Command{ + Use: "vcluster" + util.VClusterNameOnlyUseLine, + Short: "Imports a vcluster into a Loft project", + Long: description, + Args: util.VClusterNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.Run(cobraCmd.Context(), args) + }, + } + + c.Flags().StringVar(&cmd.VClusterClusterName, "cluster", "", "Cluster name of the cluster the virtual cluster is running on") + c.Flags().StringVar(&cmd.VClusterNamespace, "namespace", "", "The namespace of the vcluster") + c.Flags().StringVar(&cmd.Project, "project", "", "The project to import the vcluster into") + c.Flags().StringVar(&cmd.ImportName, "importname", "", "The name of the vcluster under projects. If unspecified, will use the vcluster name") + + _ = c.MarkFlagRequired("cluster") + _ = c.MarkFlagRequired("namespace") + _ = c.MarkFlagRequired("project") + + return c +} + +func (cmd *VClusterCmd) Run(ctx context.Context, args []string) error { + // Get vclusterName from command argument + var vclusterName string = args[0] + + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + err = client.VerifyVersion(baseClient) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + if _, err = managementClient.Loft().ManagementV1().Projects().ImportVirtualCluster(ctx, cmd.Project, &managementv1.ProjectImportVirtualCluster{ + SourceVirtualCluster: managementv1.ProjectImportVirtualClusterSource{ + Name: vclusterName, + Namespace: cmd.VClusterNamespace, + Cluster: cmd.VClusterClusterName, + ImportName: cmd.ImportName, + }, + }, metav1.CreateOptions{}); err != nil { + return err + } + + cmd.log.Donef("Successfully imported vcluster %s into project %s", ansi.Color(vclusterName, "white+b"), ansi.Color(cmd.Project, "white+b")) + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/clusters.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/clusters.go new file mode 100644 index 000000000..fe12e311e --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/clusters.go @@ -0,0 +1,94 @@ +package list + +import ( + "context" + "time" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/loft-sh/log/table" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/duration" +) + +// ClustersCmd holds the login cmd flags +type ClustersCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewClustersCmd creates a new spaces command +func NewClustersCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &ClustersCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("list clusters", ` +List the loft clusters you have access to + +Example: +loft list clusters +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +############### devspace list clusters ################# +######################################################## +List the loft clusters you have access to + +Example: +devspace list clusters +######################################################## + ` + } + clustersCmd := &cobra.Command{ + Use: "clusters", + Short: product.Replace("Lists the loft clusters you have access to"), + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.RunClusters(cobraCmd.Context()) + }, + } + + return clustersCmd +} + +// RunClusters executes the functionality +func (cmd *ClustersCmd) RunClusters(ctx context.Context) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + clusterList, err := managementClient.Loft().ManagementV1().Clusters().List(ctx, metav1.ListOptions{}) + if err != nil { + return err + } + + header := []string{ + "Cluster", + "Age", + } + values := [][]string{} + for _, cluster := range clusterList.Items { + values = append(values, []string{ + cluster.Name, + duration.HumanDuration(time.Since(cluster.CreationTimestamp.Time)), + }) + } + + table.PrintTable(cmd.log, header, values) + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/list.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/list.go new file mode 100644 index 000000000..69fe449d8 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/list.go @@ -0,0 +1,33 @@ +package list + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewListCmd creates a new cobra command +func NewListCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + description := product.ReplaceWithHeader("list", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +#################### devspace list #################### +####################################################### + ` + } + listCmd := &cobra.Command{ + Use: "list", + Short: "Lists configuration", + Long: description, + Args: cobra.NoArgs, + } + + listCmd.AddCommand(NewTeamsCmd(globalFlags)) + listCmd.AddCommand(NewSpacesCmd(globalFlags)) + listCmd.AddCommand(NewClustersCmd(globalFlags)) + listCmd.AddCommand(NewVirtualClustersCmd(globalFlags)) + listCmd.AddCommand(NewSharedSecretsCmd(globalFlags)) + return listCmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/secrets.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/secrets.go new file mode 100644 index 000000000..5ccf397e2 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/secrets.go @@ -0,0 +1,233 @@ +package list + +import ( + "context" + "strings" + "time" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/loft-sh/log/table" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/duration" +) + +// SharedSecretsCmd holds the cmd flags +type SharedSecretsCmd struct { + *flags.GlobalFlags + Namespace string + Project []string + All bool + AllProjects bool + + log log.Logger +} + +// NewSharedSecretsCmd creates a new command +func NewSharedSecretsCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &SharedSecretsCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("list secrets", ` +List the shared secrets you have access to + +Example: +loft list secrets +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################ devspace list secrets ################# +######################################################## +List the shared secrets you have access to + +Example: +devspace list secrets +######################################################## + ` + } + c := &cobra.Command{ + Use: "secrets", + Short: "Lists all the shared secrets you have access to", + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd, args) + }, + } + + c.Flags().StringArrayVarP(&cmd.Project, "project", "p", []string{}, "The project(s) to read project secrets from. If omitted will list global secrets") + c.Flags().StringVarP(&cmd.Namespace, "namespace", "n", "", product.Replace("The namespace in the loft cluster to read global secrets from. If omitted will query all accessible global secrets")) + c.Flags().BoolVarP(&cmd.All, "all", "a", false, "Display global and project secrets. May be used with the --project flag to display global secrets and a subset of project secrets") + c.Flags().BoolVar(&cmd.AllProjects, "all-projects", false, "Display project secrets for all projects.") + return c +} + +// Run executes the functionality +func (cmd *SharedSecretsCmd) Run(command *cobra.Command, _ []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + if cmd.All { + sharedSecretList, err := managementClient.Loft().ManagementV1().SharedSecrets(cmd.Namespace).List(command.Context(), metav1.ListOptions{}) + if err != nil { + return err + } + + var sharedSecrets []*managementv1.SharedSecret + for idx := range sharedSecretList.Items { + sharedSecretItem := sharedSecretList.Items[idx] + sharedSecrets = append(sharedSecrets, &sharedSecretItem) + } + + projectSecrets, err := helper.GetProjectSecrets(command.Context(), managementClient, cmd.Project...) + if err != nil { + return err + } + + return cmd.printAllSecrets(sharedSecrets, projectSecrets) + } else if cmd.AllProjects { + projectSecrets, err := helper.GetProjectSecrets(command.Context(), managementClient) + if err != nil { + return err + } + + return cmd.printProjectSecrets(projectSecrets) + } else { + if len(cmd.Project) == 0 { + return cmd.printSharedSecrets(command.Context(), managementClient, cmd.Namespace) + } else { + projectSecrets, err := helper.GetProjectSecrets(command.Context(), managementClient, cmd.Project...) + if err != nil { + return err + } + + return cmd.printProjectSecrets(projectSecrets) + } + } +} + +func (cmd *SharedSecretsCmd) printSharedSecrets(ctx context.Context, managementClient kube.Interface, namespace string) error { + secrets, err := managementClient.Loft().ManagementV1().SharedSecrets(namespace).List(ctx, metav1.ListOptions{}) + if err != nil { + return err + } + + header := []string{ + "Name", + "Namespace", + "Keys", + "Age", + } + var values [][]string + for _, secret := range secrets.Items { + var keyNames []string + for k := range secret.Spec.Data { + keyNames = append(keyNames, k) + } + + values = append(values, []string{ + secret.Name, + secret.Namespace, + strings.Join(keyNames, ","), + duration.HumanDuration(time.Since(secret.CreationTimestamp.Time)), + }) + } + + table.PrintTable(cmd.log, header, values) + return nil +} + +func (cmd *SharedSecretsCmd) printProjectSecrets(projectSecrets []*helper.ProjectProjectSecret) error { + header := []string{ + "Name", + "Namespace", + "Project", + "Keys", + "Age", + } + var values [][]string + for _, secret := range projectSecrets { + projectSecret := secret.ProjectSecret + var keyNames []string + + for k := range projectSecret.Spec.Data { + keyNames = append(keyNames, k) + } + + values = append(values, []string{ + projectSecret.Name, + projectSecret.Namespace, + secret.Project, + strings.Join(keyNames, ","), + duration.HumanDuration(time.Since(projectSecret.CreationTimestamp.Time)), + }) + } + + table.PrintTable(cmd.log, header, values) + return nil +} + +func (cmd *SharedSecretsCmd) printAllSecrets( + sharedSecrets []*managementv1.SharedSecret, + projectSecrets []*helper.ProjectProjectSecret, +) error { + header := []string{ + "Name", + "Namespace", + "Project", + "Keys", + "Age", + } + + var values [][]string + for _, secret := range sharedSecrets { + var keyNames []string + for k := range secret.Spec.Data { + keyNames = append(keyNames, k) + } + + values = append(values, []string{ + secret.Name, + secret.Namespace, + "", + strings.Join(keyNames, ","), + duration.HumanDuration(time.Since(secret.CreationTimestamp.Time)), + }) + } + + for _, secret := range projectSecrets { + projectSecret := secret.ProjectSecret + var keyNames []string + for k := range projectSecret.Spec.Data { + keyNames = append(keyNames, k) + } + + values = append(values, []string{ + projectSecret.Name, + projectSecret.Namespace, + secret.Project, + strings.Join(keyNames, ","), + duration.HumanDuration(time.Since(projectSecret.CreationTimestamp.Time)), + }) + } + + table.PrintTable(cmd.log, header, values) + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/spaces.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/spaces.go new file mode 100644 index 000000000..65c50a531 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/spaces.go @@ -0,0 +1,126 @@ +package list + +import ( + "strconv" + "time" + + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/loft-sh/log/table" + "github.com/spf13/cobra" + "k8s.io/apimachinery/pkg/util/duration" +) + +// SpacesCmd holds the login cmd flags +type SpacesCmd struct { + *flags.GlobalFlags + + ShowLegacy bool + + log log.Logger +} + +// NewSpacesCmd creates a new spaces command +func NewSpacesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &SpacesCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("list spaces", ` +List the loft spaces you have access to + +Example: +loft list spaces +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################ devspace list spaces ################## +######################################################## +List the loft spaces you have access to + +Example: +devspace list spaces +######################################################## + ` + } + listCmd := &cobra.Command{ + Use: "spaces", + Short: product.Replace("Lists the loft spaces you have access to"), + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.RunSpaces() + }, + } + listCmd.Flags().BoolVar(&cmd.ShowLegacy, "show-legacy", false, "If true, will always show the legacy spaces as well") + return listCmd +} + +// RunSpaces executes the functionality +func (cmd *SpacesCmd) RunSpaces() error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + header := []string{ + "Name", + "Project", + "Cluster", + "Sleeping", + "Status", + "Age", + } + values := [][]string{} + spaceInstances, err := helper.GetSpaceInstances(baseClient) + if err != nil { + return err + } + for _, space := range spaceInstances { + values = append(values, []string{ + clihelper.GetTableDisplayName(space.SpaceInstance.Name, space.SpaceInstance.Spec.DisplayName), + space.Project, + space.SpaceInstance.Spec.ClusterRef.Cluster, + strconv.FormatBool(space.SpaceInstance.Status.Phase == storagev1.InstanceSleeping), + string(space.SpaceInstance.Status.Phase), + duration.HumanDuration(time.Since(space.SpaceInstance.CreationTimestamp.Time)), + }) + } + if len(spaceInstances) == 0 || cmd.ShowLegacy { + spaces, err := helper.GetSpaces(baseClient, cmd.log) + if err != nil { + return err + } + for _, space := range spaces { + sleepModeConfig := space.Status.SleepModeConfig + sleeping := "false" + if sleepModeConfig.Status.SleepingSince != 0 { + sleeping = duration.HumanDuration(time.Since(time.Unix(sleepModeConfig.Status.SleepingSince, 0))) + } + spaceName := space.Name + if space.Annotations != nil && space.Annotations["loft.sh/display-name"] != "" { + spaceName = space.Annotations["loft.sh/display-name"] + " (" + spaceName + ")" + } + + values = append(values, []string{ + spaceName, + "", + space.Cluster, + sleeping, + string(space.Space.Status.Phase), + duration.HumanDuration(time.Since(space.Space.CreationTimestamp.Time)), + }) + } + } + + table.PrintTable(cmd.log, header, values) + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/teams.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/teams.go new file mode 100644 index 000000000..377885855 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/teams.go @@ -0,0 +1,94 @@ +package list + +import ( + "context" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/loft-sh/log/table" + "github.com/pkg/errors" + "github.com/spf13/cobra" +) + +// TeamsCmd holds the cmd flags +type TeamsCmd struct { + *flags.GlobalFlags + + log log.Logger +} + +// NewTeamsCmd creates a new command +func NewTeamsCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &TeamsCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("list teams", ` +List the loft teams you are member of + +Example: +loft list teams +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################## devspace list teams ################# +######################################################## +List the loft teams you are member of + +Example: +devspace list teams +######################################################## + ` + } + clustersCmd := &cobra.Command{ + Use: "teams", + Short: product.Replace("Lists the loft teams you are member of"), + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context()) + }, + } + + return clustersCmd +} + +// RunUsers executes the functionality "loft list users" +func (cmd *TeamsCmd) Run(ctx context.Context) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + client, err := baseClient.Management() + if err != nil { + return err + } + + userName, teamName, err := helper.GetCurrentUser(ctx, client) + if err != nil { + return err + } else if teamName != nil { + return errors.New("logged in as a team") + } + + header := []string{ + "Name", + } + values := [][]string{} + for _, team := range userName.Teams { + values = append(values, []string{ + clihelper.DisplayName(team), + }) + } + + table.PrintTable(cmd.log, header, values) + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/vclusters.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/vclusters.go new file mode 100644 index 000000000..fdefd5e0a --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list/vclusters.go @@ -0,0 +1,124 @@ +package list + +import ( + "time" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/loft-sh/log/table" + "github.com/spf13/cobra" + "k8s.io/apimachinery/pkg/util/duration" +) + +// VirtualClustersCmd holds the data +type VirtualClustersCmd struct { + *flags.GlobalFlags + + ShowLegacy bool + log log.Logger +} + +// NewVirtualClustersCmd creates a new command +func NewVirtualClustersCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &VirtualClustersCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("list vclusters", ` +List the loft virtual clusters you have access to + +Example: +loft list vclusters +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +############### devspace list vclusters ################ +######################################################## +List the loft virtual clusters you have access to + +Example: +devspace list vclusters +######################################################## + ` + } + listCmd := &cobra.Command{ + Use: "vclusters", + Short: product.Replace("Lists the loft virtual clusters you have access to"), + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run() + }, + } + listCmd.Flags().BoolVar(&cmd.ShowLegacy, "show-legacy", false, "If true, will always show the legacy virtual clusters as well") + return listCmd +} + +// Run executes the functionality +func (cmd *VirtualClustersCmd) Run() error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + header := []string{ + "Name", + "Project", + "Cluster", + "Namespace", + "Status", + "Age", + } + values := [][]string{} + + virtualClusterInstances, err := helper.GetVirtualClusterInstances(baseClient) + if err != nil { + return err + } + + for _, virtualCluster := range virtualClusterInstances { + values = append(values, []string{ + clihelper.GetTableDisplayName(virtualCluster.VirtualClusterInstance.Name, virtualCluster.VirtualClusterInstance.Spec.DisplayName), + virtualCluster.Project, + virtualCluster.VirtualClusterInstance.Spec.ClusterRef.Cluster, + virtualCluster.VirtualClusterInstance.Spec.ClusterRef.Namespace, + string(virtualCluster.VirtualClusterInstance.Status.Phase), + duration.HumanDuration(time.Since(virtualCluster.VirtualClusterInstance.CreationTimestamp.Time)), + }) + } + if len(virtualClusterInstances) == 0 || cmd.ShowLegacy { + virtualClusters, err := helper.GetVirtualClusters(baseClient, cmd.log) + if err != nil { + return err + } + for _, virtualCluster := range virtualClusters { + status := "Active" + if virtualCluster.VirtualCluster.Status.HelmRelease != nil { + status = virtualCluster.VirtualCluster.Status.HelmRelease.Phase + } + vClusterName := virtualCluster.VirtualCluster.Name + if virtualCluster.VirtualCluster.Annotations != nil && virtualCluster.VirtualCluster.Annotations["loft.sh/display-name"] != "" { + vClusterName = virtualCluster.VirtualCluster.Annotations["loft.sh/display-name"] + " (" + vClusterName + ")" + } + + values = append(values, []string{ + vClusterName, + "", + virtualCluster.Cluster, + virtualCluster.VirtualCluster.Namespace, + status, + duration.HumanDuration(time.Since(virtualCluster.VirtualCluster.CreationTimestamp.Time)), + }) + } + } + + table.PrintTable(cmd.log, header, values) + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/login.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/login.go new file mode 100644 index 000000000..f790167a8 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/login.go @@ -0,0 +1,290 @@ +package cmd + +import ( + "bytes" + "context" + "fmt" + "os" + "strings" + + dockerconfig "github.com/docker/cli/cli/config" + "github.com/docker/cli/cli/config/configfile" + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/loftctl/v3/pkg/docker" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const LoftUrl = "LOFT_URL" + +// LoginCmd holds the login cmd flags +type LoginCmd struct { + *flags.GlobalFlags + + AccessKey string + Insecure bool + + DockerLogin bool + Log log.Logger +} + +// NewLoginCmd creates a new open command +func NewLoginCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &LoginCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("login", ` +Login into loft + +Example: +loft login https://my-loft.com +loft login https://my-loft.com --access-key myaccesskey +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +#################### devspace login #################### +######################################################## +Login into loft + +Example: +devspace login https://my-loft.com +devspace login https://my-loft.com --access-key myaccesskey +######################################################## + ` + } + + loginCmd := &cobra.Command{ + Use: product.Replace("login [LOFT_HOST]"), + Short: product.Replace("Login to a loft instance"), + Long: description, + Args: cobra.MaximumNArgs(1), + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.RunLogin(cobraCmd.Context(), args) + }, + } + + loginCmd.Flags().StringVar(&cmd.AccessKey, "access-key", "", "The access key to use") + loginCmd.Flags().BoolVar(&cmd.Insecure, "insecure", false, product.Replace("Allow login into an insecure Loft instance")) + loginCmd.Flags().BoolVar(&cmd.DockerLogin, "docker-login", true, "If true, will log into the docker image registries the user has image pull secrets for") + return loginCmd +} + +// RunLogin executes the functionality "loft login" +func (cmd *LoginCmd) RunLogin(ctx context.Context, args []string) error { + loader, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + var url string + // Print login information + if len(args) == 0 { + url = os.Getenv(LoftUrl) + if url == "" { + config := loader.Config() + insecureFlag := "" + if config.Insecure { + insecureFlag = "--insecure" + } + + err := cmd.printLoginDetails(ctx, loader, config) + if err != nil { + cmd.Log.Fatalf("%s\n\nYou may need to log in again via: %s login %s %s\n", err.Error(), os.Args[0], config.Host, insecureFlag) + } + + cmd.Log.WriteString(logrus.InfoLevel, fmt.Sprintf("\nTo log in as a different user, run: %s login %s %s\n\n", os.Args[0], config.Host, insecureFlag)) + + return nil + } + } else { + url = args[0] + } + + if !strings.HasPrefix(url, "http") { + url = "https://" + url + } + + // log into loft + url = strings.TrimSuffix(url, "/") + if cmd.AccessKey != "" { + err = loader.LoginWithAccessKey(url, cmd.AccessKey, cmd.Insecure) + } else { + err = loader.Login(url, cmd.Insecure, cmd.Log) + } + if err != nil { + return err + } + cmd.Log.Donef(product.Replace("Successfully logged into Loft instance %s"), ansi.Color(url, "white+b")) + + // skip log into docker registries? + if !cmd.DockerLogin { + return nil + } + + err = dockerLogin(ctx, loader, cmd.Log) + if err != nil { + return err + } + + return nil +} + +func (cmd *LoginCmd) printLoginDetails(ctx context.Context, loader client.Client, config *client.Config) error { + if config.Host == "" { + cmd.Log.Info("Not logged in") + return nil + } + + managementClient, err := loader.Management() + if err != nil { + return err + } + + userName, teamName, err := helper.GetCurrentUser(ctx, managementClient) + if err != nil { + return err + } + + if userName != nil { + cmd.Log.Infof("Logged into %s as user: %s", config.Host, clihelper.DisplayName(&userName.EntityInfo)) + } else { + cmd.Log.Infof("Logged into %s as team: %s", config.Host, clihelper.DisplayName(teamName)) + } + return nil +} + +func dockerLogin(ctx context.Context, loader client.Client, log log.Logger) error { + managementClient, err := loader.Management() + if err != nil { + return err + } + + // get user name + userName, teamName, err := helper.GetCurrentUser(ctx, managementClient) + if err != nil { + return err + } + + // collect image pull secrets from team or user + dockerConfigs := []*configfile.ConfigFile{} + if userName != nil { + // get image pull secrets from user + user, err := managementClient.Loft().ManagementV1().Users().Get(ctx, userName.Name, metav1.GetOptions{}) + if err != nil { + return err + } + dockerConfigs = append(dockerConfigs, collectImagePullSecrets(ctx, managementClient, user.Spec.ImagePullSecrets, log)...) + + // get image pull secrets from teams + if err != nil { + return err + } + for _, teamName := range user.Status.Teams { + team, err := managementClient.Loft().ManagementV1().Teams().Get(ctx, teamName, metav1.GetOptions{}) + if err != nil { + return err + } + + dockerConfigs = append(dockerConfigs, collectImagePullSecrets(ctx, managementClient, team.Spec.ImagePullSecrets, log)...) + } + } else if teamName != nil { + // get image pull secrets from team + team, err := managementClient.Loft().ManagementV1().Teams().Get(ctx, teamName.Name, metav1.GetOptions{}) + if err != nil { + return err + } + dockerConfigs = append(dockerConfigs, collectImagePullSecrets(ctx, managementClient, team.Spec.ImagePullSecrets, log)...) + } + + // store docker configs + if len(dockerConfigs) > 0 { + dockerConfig, err := docker.NewDockerConfig() + if err != nil { + return err + } + + // log into registries locally + for _, config := range dockerConfigs { + for registry, authConfig := range config.AuthConfigs { + err = dockerConfig.Store(registry, authConfig) + if err != nil { + return err + } + + if registry == "https://index.docker.io/v1/" { + registry = "docker hub" + } + + log.Donef("Successfully logged into docker registry '%s'", registry) + } + } + + err = dockerConfig.Save() + if err != nil { + return errors.Wrap(err, "save docker config") + } + } + + return nil +} + +func collectImagePullSecrets(ctx context.Context, managementClient kube.Interface, imagePullSecrets []*storagev1.KindSecretRef, log log.Logger) []*configfile.ConfigFile { + retConfigFiles := []*configfile.ConfigFile{} + for _, imagePullSecret := range imagePullSecrets { + // unknown image pull secret type? + if imagePullSecret.Kind != "SharedSecret" || (imagePullSecret.APIGroup != storagev1.SchemeGroupVersion.Group && imagePullSecret.APIGroup != managementv1.SchemeGroupVersion.Group) { + continue + } else if imagePullSecret.SecretName == "" || imagePullSecret.SecretNamespace == "" { + continue + } + + sharedSecret, err := managementClient.Loft().ManagementV1().SharedSecrets(imagePullSecret.SecretNamespace).Get(ctx, imagePullSecret.SecretName, metav1.GetOptions{}) + if err != nil { + log.Warnf("Unable to retrieve image pull secret %s/%s: %v", imagePullSecret.SecretNamespace, imagePullSecret.SecretName, err) + continue + } else if len(sharedSecret.Spec.Data) == 0 { + log.Warnf("Unable to retrieve image pull secret %s/%s: secret is empty", imagePullSecret.SecretNamespace, imagePullSecret.SecretName) + continue + } else if imagePullSecret.Key == "" && len(sharedSecret.Spec.Data) > 1 { + log.Warnf("Unable to retrieve image pull secret %s/%s: secret has multiple keys, but none is specified for image pull secret", imagePullSecret.SecretNamespace, imagePullSecret.SecretName) + continue + } + + // determine shared secret key + key := imagePullSecret.Key + if key == "" { + for k := range sharedSecret.Spec.Data { + key = k + } + } + + configFile, err := dockerconfig.LoadFromReader(bytes.NewReader(sharedSecret.Spec.Data[key])) + if err != nil { + log.Warnf("Parsing image pull secret %s/%s.%s: %v", imagePullSecret.SecretNamespace, imagePullSecret.SecretName, key, err) + continue + } + + retConfigFiles = append(retConfigFiles, configFile) + } + + return retConfigFiles +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/reset/password.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/reset/password.go new file mode 100644 index 000000000..13ad1ba1b --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/reset/password.go @@ -0,0 +1,194 @@ +package reset + +import ( + "context" + "crypto/sha256" + "fmt" + "strings" + + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/random" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/loft-sh/log/survey" + "github.com/pkg/errors" + "github.com/spf13/cobra" + corev1 "k8s.io/api/core/v1" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + ctrl "sigs.k8s.io/controller-runtime" +) + +// PasswordCmd holds the lags +type PasswordCmd struct { + *flags.GlobalFlags + + User string + Password string + Create bool + Force bool + + log log.Logger +} + +// NewPasswordCmd creates a new command +func NewPasswordCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &PasswordCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("reset password", ` +Resets the password of a user. + +Example: +loft reset password +loft reset password --user admin +####################################################### + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +############### devspace reset password ############### +####################################################### +Resets the password of a user. + +Example: +devspace reset password +devspace reset password --user admin +####################################################### + ` + } + c := &cobra.Command{ + Use: "password", + Short: "Resets the password of a user", + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run() + }, + } + + c.Flags().StringVar(&cmd.User, "user", "admin", "The name of the user to reset the password") + c.Flags().StringVar(&cmd.Password, "password", "", "The new password to use") + c.Flags().BoolVar(&cmd.Create, "create", false, "Creates the user if it does not exist") + c.Flags().BoolVar(&cmd.Force, "force", false, "If user had no password will create one") + return c +} + +// Run executes the functionality +func (cmd *PasswordCmd) Run() error { + restConfig, err := ctrl.GetConfig() + if err != nil { + return errors.Wrap(err, "get kube config") + } + + managementClient, err := kube.NewForConfig(restConfig) + if err != nil { + return err + } + + // get user + cmd.log.Infof("Resetting password of user %s", cmd.User) + user, err := managementClient.Loft().StorageV1().Users().Get(context.Background(), cmd.User, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return errors.Wrap(err, "get user") + } else if kerrors.IsNotFound(err) { + // create user + if !cmd.Create { + return fmt.Errorf("user %s was not found, run with '--create' to create this user automatically", cmd.User) + } + + user, err = managementClient.Loft().StorageV1().Users().Create(context.Background(), &storagev1.User{ + ObjectMeta: metav1.ObjectMeta{ + Name: cmd.User, + }, + Spec: storagev1.UserSpec{ + Username: cmd.User, + Subject: cmd.User, + Groups: []string{ + "system:masters", + }, + PasswordRef: &storagev1.SecretRef{ + SecretName: "loft-password-" + random.RandomString(5), + SecretNamespace: "loft", + Key: "password", + }, + }, + }, metav1.CreateOptions{}) + if err != nil { + return err + } + } + + // check if user had a password before + if user.Spec.PasswordRef == nil || user.Spec.PasswordRef.SecretName == "" || user.Spec.PasswordRef.SecretNamespace == "" || user.Spec.PasswordRef.Key == "" { + if !cmd.Force { + return fmt.Errorf("user %s had no password. If you want to force password creation, please run with the '--force' flag", cmd.User) + } + + user.Spec.PasswordRef = &storagev1.SecretRef{ + SecretName: "loft-password-" + random.RandomString(5), + SecretNamespace: "loft", + Key: "password", + } + user, err = managementClient.Loft().StorageV1().Users().Update(context.Background(), user, metav1.UpdateOptions{}) + if err != nil { + return errors.Wrap(err, "update user") + } + } + + // now ask user for new password + password := cmd.Password + if password == "" { + for { + password, err = cmd.log.Question(&survey.QuestionOptions{ + Question: "Please enter a new password", + IsPassword: true, + }) + password = strings.TrimSpace(password) + if err != nil { + return err + } else if password == "" { + cmd.log.Error("Please enter a password") + continue + } + + break + } + } + passwordHash := []byte(fmt.Sprintf("%x", sha256.Sum256([]byte(password)))) + + // check if secret exists + passwordSecret, err := managementClient.CoreV1().Secrets(user.Spec.PasswordRef.SecretNamespace).Get(context.Background(), user.Spec.PasswordRef.SecretName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } else if kerrors.IsNotFound(err) { + _, err = managementClient.CoreV1().Secrets(user.Spec.PasswordRef.SecretNamespace).Create(context.Background(), &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: user.Spec.PasswordRef.SecretName, + Namespace: user.Spec.PasswordRef.SecretNamespace, + }, + Data: map[string][]byte{ + user.Spec.PasswordRef.Key: passwordHash, + }, + }, metav1.CreateOptions{}) + if err != nil { + return errors.Wrap(err, "create password secret") + } + } else { + if passwordSecret.Data == nil { + passwordSecret.Data = map[string][]byte{} + } + passwordSecret.Data[user.Spec.PasswordRef.Key] = passwordHash + _, err = managementClient.CoreV1().Secrets(user.Spec.PasswordRef.SecretNamespace).Update(context.Background(), passwordSecret, metav1.UpdateOptions{}) + if err != nil { + return errors.Wrap(err, "update password secret") + } + } + + cmd.log.Donef("Successfully reset password of user %s", cmd.User) + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/reset/reset.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/reset/reset.go new file mode 100644 index 000000000..5a18f3acc --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/reset/reset.go @@ -0,0 +1,29 @@ +package reset + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewResetCmd creates a new cobra command +func NewResetCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + description := product.ReplaceWithHeader("reset", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################### devspace reset #################### +####################################################### + ` + } + c := &cobra.Command{ + Use: "reset", + Short: "Reset configuration", + Long: description, + Args: cobra.NoArgs, + } + + c.AddCommand(NewPasswordCmd(globalFlags)) + return c +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/root.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/root.go new file mode 100644 index 000000000..42153d5c9 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/root.go @@ -0,0 +1,140 @@ +package cmd + +import ( + "context" + "fmt" + "os" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/connect" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create" + cmddefaults "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/generate" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/reset" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/set" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars" + vclusterpro "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +// NewRootCmd returns a new root command +func NewRootCmd(streamLogger *log.StreamLogger) *cobra.Command { + return &cobra.Command{ + Use: "loft", + SilenceUsage: true, + SilenceErrors: true, + Short: product.Replace("Welcome to Loft!"), + PersistentPreRunE: func(cobraCmd *cobra.Command, args []string) error { + if globalFlags.Silent { + streamLogger.SetLevel(logrus.FatalLevel) + } + if globalFlags.Config == "" && os.Getenv("LOFT_CONFIG") != "" { + globalFlags.Config = os.Getenv("LOFT_CONFIG") + } + + if globalFlags.LogOutput == "json" { + streamLogger.SetFormat(log.JSONFormat) + } else if globalFlags.LogOutput == "raw" { + streamLogger.SetFormat(log.RawFormat) + } else if globalFlags.LogOutput != "plain" { + return fmt.Errorf("unrecognized log format %s, needs to be either plain or json", globalFlags.LogOutput) + } + + return nil + }, + Long: product.Replace(`Loft CLI`) + " - www.loft.sh", + } +} + +var globalFlags *flags.GlobalFlags + +// Execute adds all child commands to the root command and sets flags appropriately. +// This is called by main.main(). It only needs to happen once to the rootCmd. +func Execute() { + log := log.Default + rootCmd := BuildRoot(log) + + // Set version for --version flag + rootCmd.Version = upgrade.GetVersion() + + // Execute command + err := rootCmd.ExecuteContext(context.Background()) + if err != nil { + if globalFlags.Debug { + log.Fatalf("%+v", err) + } else { + log.Fatal(err) + } + } +} + +// BuildRoot creates a new root command from the +func BuildRoot(log *log.StreamLogger) *cobra.Command { + rootCmd := NewRootCmd(log) + persistentFlags := rootCmd.PersistentFlags() + globalFlags = flags.SetGlobalFlags(persistentFlags) + defaults, err := defaults.NewFromPath(defaults.ConfigFolder, defaults.ConfigFile) + if err != nil { + log.Debugf("Error loading defaults: %v", err) + } + + switch product.Product() { + case product.VClusterPro: + proCmd := rootCmd + proCmd.Use = "pro" + + rootCmd = &cobra.Command{Use: "vcluster"} + rootCmd.AddCommand(proCmd) + + vclusterpro.BuildVclusterProRoot(proCmd, globalFlags, defaults, []*cobra.Command{ + NewStartCmd(globalFlags), + NewLoginCmd(globalFlags), + }) + case product.DevPodPro, product.Loft: + buildLoftRoot(rootCmd, defaults) + } + + return rootCmd +} + +func buildLoftRoot(rootCmd *cobra.Command, defaults *defaults.Defaults) { + // add top level commands + rootCmd.AddCommand(NewStartCmd(globalFlags)) + rootCmd.AddCommand(NewLoginCmd(globalFlags)) + rootCmd.AddCommand(NewTokenCmd(globalFlags)) + rootCmd.AddCommand(NewBackupCmd(globalFlags)) + rootCmd.AddCommand(NewCompletionCmd(rootCmd, globalFlags)) + rootCmd.AddCommand(NewUpgradeCmd()) + + // add subcommands + rootCmd.AddCommand(list.NewListCmd(globalFlags)) + rootCmd.AddCommand(use.NewUseCmd(globalFlags, defaults)) + rootCmd.AddCommand(create.NewCreateCmd(globalFlags, defaults)) + rootCmd.AddCommand(delete.NewDeleteCmd(globalFlags, defaults)) + rootCmd.AddCommand(generate.NewGenerateCmd(globalFlags)) + rootCmd.AddCommand(get.NewGetCmd(globalFlags, defaults)) + rootCmd.AddCommand(vars.NewVarsCmd(globalFlags)) + rootCmd.AddCommand(share.NewShareCmd(globalFlags, defaults)) + rootCmd.AddCommand(set.NewSetCmd(globalFlags, defaults)) + rootCmd.AddCommand(reset.NewResetCmd(globalFlags)) + rootCmd.AddCommand(sleep.NewSleepCmd(globalFlags, defaults)) + rootCmd.AddCommand(wakeup.NewWakeUpCmd(globalFlags, defaults)) + rootCmd.AddCommand(importcmd.NewImportCmd(globalFlags)) + rootCmd.AddCommand(connect.NewConnectCmd(globalFlags)) + rootCmd.AddCommand(cmddefaults.NewDefaultsCmd(globalFlags, defaults)) + rootCmd.AddCommand(devpod.NewDevPodCmd(globalFlags)) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/set/secret.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/set/secret.go new file mode 100644 index 000000000..f77f26994 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/set/secret.go @@ -0,0 +1,293 @@ +package set + +import ( + "context" + "fmt" + "strings" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + "github.com/loft-sh/log/survey" + "github.com/pkg/errors" + "github.com/spf13/cobra" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var ( + ErrNoSecret = errors.New("please specify a secret key to set") +) + +type SecretType string + +const ( + ProjectNamespacePrefix = "loft-p-" + ProjectSecret SecretType = "Project Secret" + SharedSecret SecretType = "Shared Secret" +) + +// SecretCmd holds the flags +type SecretCmd struct { + *flags.GlobalFlags + Namespace string + Project string + + log log.Logger +} + +// NewSecretCmd creates a new command +func NewSecretCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &SecretCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + description := product.ReplaceWithHeader("set secret", ` +Sets the key value of a project / shared secret. + + +Example: +loft set secret test-secret.key value +loft set secret test-secret.key value --project myproject +####################################################### + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################# devspace set secret ################# +####################################################### +Sets the key value of a project / shared secret. + +Example: +devspace set secret test-secret.key value +devspace set secret test-secret.key value --project myproject +####################################################### + ` + } + useLine, validator := util.NamedPositionalArgsValidator(true, "SECRET_NAME", "SECRET_VALUE") + c := &cobra.Command{ + Use: "secret" + useLine, + Short: "Sets the key value of a project / shared secret", + Long: description, + Args: validator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd, args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVarP(&cmd.Namespace, "namespace", "n", "", product.Replace("The namespace in the loft cluster to create the secret in. If omitted will use the namespace were loft is installed in")) + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to create the project secret in.") + + return c +} + +// RunUsers executes the functionality +func (cmd *SecretCmd) Run(cobraCmd *cobra.Command, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // get secret + secretName := "" + keyName := "" + secretArg := args[0] + idx := strings.Index(secretArg, ".") + if idx == -1 { + secretName = secretArg + } else { + secretName = secretArg[:idx] + keyName = secretArg[idx+1:] + } + + var secretType SecretType + + if cmd.Project != "" { + secretType = ProjectSecret + } else { + secretType = SharedSecret + } + + ctx := cobraCmd.Context() + + switch secretType { + case ProjectSecret: + // get target namespace + namespace, err := GetProjectSecretNamespace(cmd.Project) + if err != nil { + return errors.Wrap(err, "get project secrets namespace") + } + + return cmd.setProjectSecret(ctx, managementClient, args, namespace, secretName, keyName) + case SharedSecret: + namespace, err := GetSharedSecretNamespace(cmd.Namespace) + if err != nil { + return errors.Wrap(err, "get shared secrets namespace") + } + + return cmd.setSharedSecret(ctx, managementClient, args, namespace, secretName, keyName) + } + + return nil +} + +func (cmd *SecretCmd) setProjectSecret(ctx context.Context, managementClient kube.Interface, args []string, namespace, secretName, keyName string) error { + secret, err := managementClient.Loft().ManagementV1().ProjectSecrets(namespace).Get(ctx, secretName, metav1.GetOptions{}) + if err != nil { + if !kerrors.IsNotFound(err) { + return errors.Wrap(err, "get secret") + } + + secret = nil + } + + if keyName == "" { + if secret == nil { + return fmt.Errorf(product.Replace("%w: for example 'loft set secret my-secret.key value'"), ErrNoSecret) + } + if len(secret.Spec.Data) == 0 { + return errors.Errorf(product.Replace("secret %s has no keys. Please specify a key like `loft set secret name.key value`"), secretName) + } + + keyNames := []string{} + for k := range secret.Spec.Data { + keyNames = append(keyNames, k) + } + + keyName, err = cmd.log.Question(&survey.QuestionOptions{ + Question: "Please select a secret key to set", + DefaultValue: keyNames[0], + Options: keyNames, + }) + if err != nil { + return errors.Wrap(err, "ask question") + } + } + + // create the secret + if secret == nil { + _, err = managementClient.Loft().ManagementV1().ProjectSecrets(namespace).Create(ctx, &managementv1.ProjectSecret{ + ObjectMeta: metav1.ObjectMeta{ + Name: secretName, + }, + Spec: managementv1.ProjectSecretSpec{ + Data: map[string][]byte{ + keyName: []byte(args[1]), + }, + }, + }, metav1.CreateOptions{}) + if err != nil { + return err + } + + cmd.log.Donef("Successfully created secret %s with key %s", secretName, keyName) + return nil + } + + // Update the secret + if secret.Spec.Data == nil { + secret.Spec.Data = map[string][]byte{} + } + secret.Spec.Data[keyName] = []byte(args[1]) + _, err = managementClient.Loft().ManagementV1().ProjectSecrets(namespace).Update(ctx, secret, metav1.UpdateOptions{}) + if err != nil { + return errors.Wrap(err, "update secret") + } + + cmd.log.Donef("Successfully set secret key %s.%s", secretName, keyName) + return nil +} + +func (cmd *SecretCmd) setSharedSecret(ctx context.Context, managementClient kube.Interface, args []string, namespace, secretName, keyName string) error { + secret, err := managementClient.Loft().ManagementV1().SharedSecrets(namespace).Get(ctx, secretName, metav1.GetOptions{}) + if err != nil { + if !kerrors.IsNotFound(err) { + return errors.Wrap(err, "get secret") + } + + secret = nil + } + + if keyName == "" { + if secret == nil { + return fmt.Errorf(product.Replace("%w: for example 'loft set secret my-secret.key value'"), ErrNoSecret) + } + if len(secret.Spec.Data) == 0 { + return errors.Errorf(product.Replace("secret %s has no keys. Please specify a key like `loft set secret name.key value`"), secretName) + } + + keyNames := []string{} + for k := range secret.Spec.Data { + keyNames = append(keyNames, k) + } + + keyName, err = cmd.log.Question(&survey.QuestionOptions{ + Question: "Please select a secret key to set", + DefaultValue: keyNames[0], + Options: keyNames, + }) + if err != nil { + return errors.Wrap(err, "ask question") + } + } + + // create the secret + if secret == nil { + _, err = managementClient.Loft().ManagementV1().SharedSecrets(namespace).Create(ctx, &managementv1.SharedSecret{ + ObjectMeta: metav1.ObjectMeta{ + Name: secretName, + }, + Spec: managementv1.SharedSecretSpec{ + SharedSecretSpec: storagev1.SharedSecretSpec{ + Data: map[string][]byte{ + keyName: []byte(args[1]), + }, + }, + }, + }, metav1.CreateOptions{}) + if err != nil { + return err + } + + cmd.log.Donef("Successfully created secret %s with key %s", secretName, keyName) + return nil + } + + // Update the secret + if secret.Spec.Data == nil { + secret.Spec.Data = map[string][]byte{} + } + secret.Spec.Data[keyName] = []byte(args[1]) + _, err = managementClient.Loft().ManagementV1().SharedSecrets(namespace).Update(ctx, secret, metav1.UpdateOptions{}) + if err != nil { + return errors.Wrap(err, "update secret") + } + + cmd.log.Donef("Successfully set secret key %s.%s", secretName, keyName) + return nil +} + +func GetSharedSecretNamespace(namespace string) (string, error) { + if namespace == "" { + namespace = "loft" + } + + return namespace, nil +} + +func GetProjectSecretNamespace(project string) (string, error) { + return ProjectNamespacePrefix + project, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/set/set.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/set/set.go new file mode 100644 index 000000000..863cba509 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/set/set.go @@ -0,0 +1,30 @@ +package set + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewSetCmd creates a new cobra command +func NewSetCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + description := product.ReplaceWithHeader("set", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +#################### devspace set ##################### +####################################################### + ` + } + c := &cobra.Command{ + Use: "set", + Short: "Set configuration", + Long: description, + Args: cobra.NoArgs, + } + + c.AddCommand(NewSecretCmd(globalFlags, defaults)) + return c +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share/share.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share/share.go new file mode 100644 index 000000000..9bc803f7a --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share/share.go @@ -0,0 +1,31 @@ +package share + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewShareCmd creates a new cobra command +func NewShareCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + description := product.ReplaceWithHeader("share", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################### devspace share #################### +####################################################### + ` + } + cmd := &cobra.Command{ + Use: "share", + Short: "Shares cluster resources", + Long: description, + Args: cobra.NoArgs, + } + + cmd.AddCommand(NewSpaceCmd(globalFlags, defaults)) + cmd.AddCommand(NewVClusterCmd(globalFlags, defaults)) + return cmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share/space.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share/space.go new file mode 100644 index 000000000..31de0d29f --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share/space.go @@ -0,0 +1,241 @@ +package share + +import ( + "context" + "fmt" + + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/pkg/errors" + "github.com/spf13/cobra" + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// SpaceCmd holds the cmd flags +type SpaceCmd struct { + *flags.GlobalFlags + + Project string + Cluster string + ClusterRole string + User string + Team string + + Log log.Logger +} + +// NewSpaceCmd creates a new command +func NewSpaceCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &SpaceCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + description := product.ReplaceWithHeader("share space", ` +Shares a space with another loft user or team. The user +or team need to have access to the cluster. + +Example: +loft share space myspace +loft share space myspace --project myproject +loft share space myspace --project myproject --user admin +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################# devspace share space ################# +######################################################## +Shares a space with another loft user or team. The user +or team need to have access to the cluster. + +Example: +devspace share space myspace +devspace share space myspace --project myproject +devspace share space myspace --project myproject --user admin +######################################################## + ` + } + c := &cobra.Command{ + Use: "space" + util.SpaceNameOnlyUseLine, + Short: product.Replace("Shares a space with another loft user or team"), + Long: description, + Args: util.SpaceNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.Run(cobraCmd, args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVar(&cmd.Cluster, "cluster", "", "The cluster to use") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().StringVar(&cmd.ClusterRole, "cluster-role", "loft-cluster-space-admin", "The cluster role which is assigned to the user or team for that space") + c.Flags().StringVar(&cmd.User, "user", "", "The user to share the space with. The user needs to have access to the cluster") + c.Flags().StringVar(&cmd.Team, "team", "", "The team to share the space with. The team needs to have access to the cluster") + return c +} + +// Run executes the command +func (cmd *SpaceCmd) Run(cobraCmd *cobra.Command, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + spaceName := "" + if len(args) > 0 { + spaceName = args[0] + } + + cmd.Cluster, cmd.Project, spaceName, err = helper.SelectSpaceInstanceOrSpace(baseClient, spaceName, cmd.Project, cmd.Cluster, cmd.Log) + if err != nil { + return err + } + + ctx := cobraCmd.Context() + + if cmd.Project == "" { + return cmd.legacyShareSpace(ctx, baseClient, spaceName) + } + + return cmd.shareSpace(ctx, baseClient, spaceName) +} + +func (cmd *SpaceCmd) shareSpace(ctx context.Context, baseClient client.Client, spaceName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + spaceInstance, err := managementClient.Loft().ManagementV1().SpaceInstances(naming.ProjectNamespace(cmd.Project)).Get(ctx, spaceName, metav1.GetOptions{}) + if err != nil { + return err + } + + accessRule := agentstoragev1.InstanceAccessRule{ + ClusterRole: cmd.ClusterRole, + } + if cmd.User != "" { + accessRule.Users = append(accessRule.Users, cmd.User) + } + if cmd.Team != "" { + accessRule.Teams = append(accessRule.Teams, cmd.Team) + } + spaceInstance.Spec.ExtraAccessRules = append(spaceInstance.Spec.ExtraAccessRules, accessRule) + if spaceInstance.Spec.TemplateRef != nil { + spaceInstance.Spec.TemplateRef.SyncOnce = true + } + _, err = managementClient.Loft().ManagementV1().SpaceInstances(naming.ProjectNamespace(cmd.Project)).Update(ctx, spaceInstance, metav1.UpdateOptions{}) + if err != nil { + return err + } + + if cmd.User != "" { + cmd.Log.Donef("Successfully granted user %s access to space %s", ansi.Color(cmd.User, "white+b"), ansi.Color(spaceName, "white+b")) + cmd.Log.Infof("The user can access the space now via: %s", ansi.Color(fmt.Sprintf(product.Replace("loft use space %s --project %s"), spaceName, cmd.Project), "white+b")) + } else { + cmd.Log.Donef("Successfully granted team %s access to space %s", ansi.Color(cmd.Team, "white+b"), ansi.Color(spaceName, "white+b")) + cmd.Log.Infof("The team can access the space now via: %s", ansi.Color(fmt.Sprintf(product.Replace("loft use space %s --project %s"), spaceName, cmd.Project), "white+b")) + } + + return nil +} + +func (cmd *SpaceCmd) legacyShareSpace(ctx context.Context, baseClient client.Client, spaceName string) error { + userOrTeam, err := createRoleBinding(ctx, baseClient, cmd.Cluster, spaceName, cmd.User, cmd.Team, cmd.ClusterRole, cmd.Log) + if err != nil { + return err + } + + if !userOrTeam.Team { + cmd.Log.Donef("Successfully granted user %s access to space %s", ansi.Color(userOrTeam.ClusterMember.Info.Name, "white+b"), ansi.Color(spaceName, "white+b")) + cmd.Log.Infof("The user can access the space now via: %s", ansi.Color(fmt.Sprintf(product.Replace("loft use space %s --cluster %s"), spaceName, cmd.Cluster), "white+b")) + } else { + cmd.Log.Donef("Successfully granted team %s access to space %s", ansi.Color(userOrTeam.ClusterMember.Info.Name, "white+b"), ansi.Color(spaceName, "white+b")) + cmd.Log.Infof("The team can access the space now via: %s", ansi.Color(fmt.Sprintf(product.Replace("loft use space %s --cluster %s"), spaceName, cmd.Cluster), "white+b")) + } + + return nil +} + +func createRoleBinding(ctx context.Context, baseClient client.Client, clusterName, spaceName, userName, teamName, clusterRole string, log log.Logger) (*helper.ClusterUserOrTeam, error) { + userOrTeam, err := helper.SelectClusterUserOrTeam(baseClient, clusterName, userName, teamName, log) + if err != nil { + return nil, err + } + + clusterClient, err := baseClient.Cluster(clusterName) + if err != nil { + return nil, err + } + + // check if there is already a role binding for this user or team already + roleBindings, err := clusterClient.RbacV1().RoleBindings(spaceName).List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + subjectString := "" + if userOrTeam.Team { + subjectString = "loft:team:" + userOrTeam.ClusterMember.Info.Name + } else { + subjectString = "loft:user:" + userOrTeam.ClusterMember.Info.Name + } + + // check if there is already a role binding + for _, roleBinding := range roleBindings.Items { + if roleBinding.RoleRef.Kind == "ClusterRole" && roleBinding.RoleRef.Name == clusterRole { + for _, subject := range roleBinding.Subjects { + if subject.Kind == "Group" || subject.Kind == "User" { + if subject.Name == subjectString { + return nil, nil + } + } + } + } + } + + roleBindingName := "loft-user-" + userOrTeam.ClusterMember.Info.Name + if userOrTeam.Team { + roleBindingName = "loft-team-" + userOrTeam.ClusterMember.Info.Name + } + if len(roleBindingName) > 52 { + roleBindingName = roleBindingName[:52] + } + + // create the rolebinding + _, err = clusterClient.RbacV1().RoleBindings(spaceName).Create(ctx, &rbacv1.RoleBinding{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: roleBindingName + "-", + }, + RoleRef: rbacv1.RoleRef{ + APIGroup: rbacv1.SchemeGroupVersion.Group, + Kind: "ClusterRole", + Name: clusterRole, + }, + Subjects: []rbacv1.Subject{ + { + Kind: "Group", + APIGroup: rbacv1.GroupName, + Name: subjectString, + }, + }, + }, metav1.CreateOptions{}) + if err != nil { + return nil, errors.Wrap(err, "create rolebinding") + } + + return userOrTeam, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share/vcluster.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share/vcluster.go new file mode 100644 index 000000000..47459caad --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share/vcluster.go @@ -0,0 +1,171 @@ +package share + +import ( + "context" + "fmt" + + agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// VClusterCmd holds the cmd flags +type VClusterCmd struct { + *flags.GlobalFlags + + Project string + Cluster string + Space string + ClusterRole string + User string + Team string + + Log log.Logger +} + +// NewVClusterCmd creates a new command +func NewVClusterCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &VClusterCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + description := product.ReplaceWithHeader("share vcluster", ` +Shares a vcluster with another loft user or team. The +user or team need to have access to the cluster. + +Example: +loft share vcluster myvcluster +loft share vcluster myvcluster --cluster mycluster +loft share vcluster myvcluster --cluster mycluster --user admin +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +############### devspace share vcluster ################ +######################################################## +Shares a vcluster with another loft user or team. The +user or team need to have access to the cluster. + +Example: +devspace share vcluster myvcluster +devspace share vcluster myvcluster --project myproject +devspace share vcluster myvcluster --project myproject --user admin +######################################################## + ` + } + c := &cobra.Command{ + Use: "vcluster" + util.VClusterNameOnlyUseLine, + Short: product.Replace("Shares a vcluster with another loft user or team"), + Long: description, + Args: util.VClusterNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.Run(cobraCmd, args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVar(&cmd.Cluster, "cluster", "", "The cluster to use") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().StringVar(&cmd.Space, "space", "", "The space to use") + c.Flags().StringVar(&cmd.ClusterRole, "cluster-role", "loft-cluster-space-admin", "The cluster role which is assigned to the user or team for that space") + c.Flags().StringVar(&cmd.User, "user", "", "The user to share the space with. The user needs to have access to the cluster") + c.Flags().StringVar(&cmd.Team, "team", "", "The team to share the space with. The team needs to have access to the cluster") + return c +} + +// Run executes the command +func (cmd *VClusterCmd) Run(cobraCmd *cobra.Command, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + vClusterName := "" + if len(args) > 0 { + vClusterName = args[0] + } + + cmd.Cluster, cmd.Project, cmd.Space, vClusterName, err = helper.SelectVirtualClusterInstanceOrVirtualCluster(baseClient, vClusterName, cmd.Space, cmd.Project, cmd.Cluster, cmd.Log) + if err != nil { + return err + } + + ctx := cobraCmd.Context() + + if cmd.Project == "" { + return cmd.legacyShareVCluster(ctx, baseClient, vClusterName) + } + + return cmd.shareVCluster(ctx, baseClient, vClusterName) +} + +func (cmd *VClusterCmd) shareVCluster(ctx context.Context, baseClient client.Client, vClusterName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + virtualClusterInstance, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(naming.ProjectNamespace(cmd.Project)).Get(ctx, vClusterName, metav1.GetOptions{}) + if err != nil { + return err + } + + accessRule := agentstoragev1.InstanceAccessRule{ + ClusterRole: cmd.ClusterRole, + } + if cmd.User != "" { + accessRule.Users = append(accessRule.Users, cmd.User) + } + if cmd.Team != "" { + accessRule.Teams = append(accessRule.Teams, cmd.Team) + } + virtualClusterInstance.Spec.ExtraAccessRules = append(virtualClusterInstance.Spec.ExtraAccessRules, accessRule) + if virtualClusterInstance.Spec.TemplateRef != nil { + virtualClusterInstance.Spec.TemplateRef.SyncOnce = true + } + _, err = managementClient.Loft().ManagementV1().VirtualClusterInstances(naming.ProjectNamespace(cmd.Project)).Update(ctx, virtualClusterInstance, metav1.UpdateOptions{}) + if err != nil { + return err + } + + if cmd.User != "" { + cmd.Log.Donef("Successfully granted user %s access to vcluster %s", ansi.Color(cmd.User, "white+b"), ansi.Color(vClusterName, "white+b")) + cmd.Log.Infof("The user can access the space now via: %s", ansi.Color(fmt.Sprintf(product.Replace("loft use vcluster %s --project %s"), vClusterName, cmd.Project), "white+b")) + } else { + cmd.Log.Donef("Successfully granted team %s access to vcluster %s", ansi.Color(cmd.Team, "white+b"), ansi.Color(vClusterName, "white+b")) + cmd.Log.Infof("The team can access the space now via: %s", ansi.Color(fmt.Sprintf(product.Replace("loft use vcluster %s --project %s"), vClusterName, cmd.Project), "white+b")) + } + + return nil +} + +func (cmd *VClusterCmd) legacyShareVCluster(ctx context.Context, baseClient client.Client, vClusterName string) error { + userOrTeam, err := createRoleBinding(ctx, baseClient, cmd.Cluster, cmd.Space, cmd.User, cmd.Team, cmd.ClusterRole, cmd.Log) + if err != nil { + return err + } + + if !userOrTeam.Team { + cmd.Log.Donef("Successfully granted user %s access to vcluster %s", ansi.Color(userOrTeam.ClusterMember.Info.Name, "white+b"), ansi.Color(vClusterName, "white+b")) + cmd.Log.Infof("The user can access the vcluster now via: %s", ansi.Color(fmt.Sprintf(product.Replace("loft use vcluster %s --space %s --cluster %s"), vClusterName, cmd.Space, cmd.Cluster), "white+b")) + } else { + cmd.Log.Donef("Successfully granted team %s access to vcluster %s", ansi.Color(userOrTeam.ClusterMember.Info.Name, "white+b"), ansi.Color(vClusterName, "white+b")) + cmd.Log.Infof("The team can access the vcluster now via: %s", ansi.Color(fmt.Sprintf(product.Replace("loft use vcluster %s --space %s --cluster %s"), vClusterName, cmd.Space, cmd.Cluster), "white+b")) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep/sleep.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep/sleep.go new file mode 100644 index 000000000..0190636a2 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep/sleep.go @@ -0,0 +1,31 @@ +package sleep + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewSleepCmd creates a new cobra command +func NewSleepCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + description := product.ReplaceWithHeader("sleep", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################### devspace sleep #################### +####################################################### + ` + } + cmd := &cobra.Command{ + Use: "sleep", + Short: "Puts spaces or vclusters to sleep", + Long: description, + Args: cobra.NoArgs, + } + + cmd.AddCommand(NewSpaceCmd(globalFlags, defaults)) + cmd.AddCommand(NewVClusterCmd(globalFlags, defaults)) + return cmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep/space.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep/space.go new file mode 100644 index 000000000..2341f7950 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep/space.go @@ -0,0 +1,187 @@ +package sleep + +import ( + "context" + "fmt" + "strconv" + "time" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + "github.com/loft-sh/loftctl/v3/pkg/config" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" +) + +// SpaceCmd holds the cmd flags +type SpaceCmd struct { + *flags.GlobalFlags + + Project string + Cluster string + ForceDuration int64 + + Log log.Logger +} + +// NewSpaceCmd creates a new command +func NewSpaceCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &SpaceCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("sleep space", ` +Sleep puts a space to sleep + +Example: +loft sleep space myspace +loft sleep space myspace --project myproject +####################################################### + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################ devspace sleep space ################# +####################################################### +Sleep puts a space to sleep + +Example: +devspace sleep space myspace +devspace sleep space myspace --project myproject +####################################################### + ` + } + + c := &cobra.Command{ + Use: "space" + util.SpaceNameOnlyUseLine, + Short: "Put a space to sleep", + Long: description, + Args: util.SpaceNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().Int64Var(&cmd.ForceDuration, "prevent-wakeup", -1, product.Replace("The amount of seconds this space should sleep until it can be woken up again (use 0 for infinite sleeping). During this time the space can only be woken up by `loft wakeup`, manually deleting the annotation on the namespace or through the loft UI")) + c.Flags().StringVar(&cmd.Cluster, "cluster", "", "The cluster to use") + return c +} + +// Run executes the functionality +func (cmd *SpaceCmd) Run(ctx context.Context, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + spaceName := "" + if len(args) > 0 { + spaceName = args[0] + } + + cmd.Cluster, cmd.Project, spaceName, err = helper.SelectSpaceInstanceOrSpace(baseClient, spaceName, cmd.Project, cmd.Cluster, cmd.Log) + if err != nil { + return err + } + + if cmd.Project == "" { + return cmd.legacySleepSpace(ctx, baseClient, spaceName) + } + + return cmd.sleepSpace(ctx, baseClient, spaceName) +} + +func (cmd *SpaceCmd) sleepSpace(ctx context.Context, baseClient client.Client, spaceName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + spaceInstance, err := managementClient.Loft().ManagementV1().SpaceInstances(naming.ProjectNamespace(cmd.Project)).Get(ctx, spaceName, metav1.GetOptions{}) + if err != nil { + return err + } + + if spaceInstance.Annotations == nil { + spaceInstance.Annotations = map[string]string{} + } + spaceInstance.Annotations[clusterv1.SleepModeForceAnnotation] = "true" + if cmd.ForceDuration >= 0 { + spaceInstance.Annotations[clusterv1.SleepModeForceDurationAnnotation] = strconv.FormatInt(cmd.ForceDuration, 10) + } + + _, err = managementClient.Loft().ManagementV1().SpaceInstances(naming.ProjectNamespace(cmd.Project)).Update(ctx, spaceInstance, metav1.UpdateOptions{}) + if err != nil { + return err + } + + // wait for sleeping + cmd.Log.Info("Wait until space is sleeping...") + err = wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), false, func(ctx context.Context) (done bool, err error) { + spaceInstance, err := managementClient.Loft().ManagementV1().SpaceInstances(naming.ProjectNamespace(cmd.Project)).Get(ctx, spaceName, metav1.GetOptions{}) + if err != nil { + return false, err + } + + return spaceInstance.Status.Phase == storagev1.InstanceSleeping, nil + }) + if err != nil { + return fmt.Errorf("error waiting for space to start sleeping: %w", err) + } + + cmd.Log.Donef("Successfully put space %s to sleep", spaceName) + return nil +} + +func (cmd *SpaceCmd) legacySleepSpace(ctx context.Context, baseClient client.Client, spaceName string) error { + clusterClient, err := baseClient.Cluster(cmd.Cluster) + if err != nil { + return err + } + + configs, err := clusterClient.Agent().ClusterV1().SleepModeConfigs(spaceName).List(ctx, metav1.ListOptions{}) + if err != nil { + return err + } + + sleepModeConfig := &configs.Items[0] + sleepModeConfig.Spec.ForceSleep = true + if cmd.ForceDuration >= 0 { + sleepModeConfig.Spec.ForceSleepDuration = &cmd.ForceDuration + } + + _, err = clusterClient.Agent().ClusterV1().SleepModeConfigs(spaceName).Create(ctx, sleepModeConfig, metav1.CreateOptions{}) + if err != nil { + return err + } + + // wait for sleeping + cmd.Log.Info("Wait until space is sleeping...") + err = wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), false, func(ctx context.Context) (done bool, err error) { + configs, err := clusterClient.Agent().ClusterV1().SleepModeConfigs(spaceName).List(ctx, metav1.ListOptions{}) + if err != nil { + return false, err + } + + return configs.Items[0].Status.SleepingSince != 0, nil + }) + if err != nil { + return fmt.Errorf("error waiting for space to start sleeping: %w", err) + } + + cmd.Log.Donef("Successfully put space %s to sleep", spaceName) + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep/vcluster.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep/vcluster.go new file mode 100644 index 000000000..bb08156bb --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep/vcluster.go @@ -0,0 +1,145 @@ +package sleep + +import ( + "context" + "fmt" + "strconv" + "time" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + "github.com/loft-sh/loftctl/v3/pkg/config" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" +) + +// VClusterCmd holds the cmd flags +type VClusterCmd struct { + *flags.GlobalFlags + + Project string + ForceDuration int64 + + Log log.Logger +} + +// NewVClusterCmd creates a new command +func NewVClusterCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &VClusterCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("sleep vcluster", ` +Sleep puts a vcluster to sleep + +Example: +loft sleep vcluster myvcluster +loft sleep vcluster myvcluster --project myproject +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +############### devspace sleep vcluster ################ +######################################################## +Sleep puts a vcluster to sleep + +Example: +devspace sleep vcluster myvcluster +devspace sleep vcluster myvcluster --project myproject +######################################################## + ` + } + + c := &cobra.Command{ + Use: "vcluster" + util.VClusterNameOnlyUseLine, + Short: "Put a vcluster to sleep", + Long: description, + Args: util.VClusterNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().Int64Var(&cmd.ForceDuration, "prevent-wakeup", -1, product.Replace("The amount of seconds this vcluster should sleep until it can be woken up again (use 0 for infinite sleeping). During this time the space can only be woken up by `loft wakeup vcluster`, manually deleting the annotation on the namespace or through the loft UI")) + return c +} + +// Run executes the functionality +func (cmd *VClusterCmd) Run(ctx context.Context, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + vClusterName := "" + if len(args) > 0 { + vClusterName = args[0] + } + + _, cmd.Project, _, vClusterName, err = helper.SelectVirtualClusterInstanceOrVirtualCluster(baseClient, vClusterName, "", cmd.Project, "", cmd.Log) + if err != nil { + return err + } + + if cmd.Project == "" { + return fmt.Errorf("couldn't find a vcluster you have access to") + } + + return cmd.sleepVCluster(ctx, baseClient, vClusterName) +} + +func (cmd *VClusterCmd) sleepVCluster(ctx context.Context, baseClient client.Client, vClusterName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + virtualClusterInstance, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(naming.ProjectNamespace(cmd.Project)).Get(ctx, vClusterName, metav1.GetOptions{}) + if err != nil { + return err + } + + if virtualClusterInstance.Annotations == nil { + virtualClusterInstance.Annotations = map[string]string{} + } + virtualClusterInstance.Annotations[clusterv1.SleepModeForceAnnotation] = "true" + if cmd.ForceDuration >= 0 { + virtualClusterInstance.Annotations[clusterv1.SleepModeForceDurationAnnotation] = strconv.FormatInt(cmd.ForceDuration, 10) + } + + _, err = managementClient.Loft().ManagementV1().VirtualClusterInstances(naming.ProjectNamespace(cmd.Project)).Update(ctx, virtualClusterInstance, metav1.UpdateOptions{}) + if err != nil { + return err + } + + // wait for sleeping + cmd.Log.Info("Wait until virtual cluster is sleeping...") + err = wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), false, func(ctx context.Context) (done bool, err error) { + virtualClusterInstance, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(naming.ProjectNamespace(cmd.Project)).Get(ctx, vClusterName, metav1.GetOptions{}) + if err != nil { + return false, err + } + + return virtualClusterInstance.Status.Phase == storagev1.InstanceSleeping, nil + }) + if err != nil { + return fmt.Errorf("error waiting for vcluster to start sleeping: %w", err) + } + + cmd.Log.Donef("Successfully put vcluster %s to sleep", vClusterName) + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/start.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/start.go new file mode 100644 index 000000000..1f4a71b03 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/start.go @@ -0,0 +1,81 @@ +package cmd + +import ( + "context" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/start" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +// StartCmd holds the cmd flags +type StartCmd struct { + start.Options +} + +// NewStartCmd creates a new command +func NewStartCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &StartCmd{ + Options: start.Options{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + }, + } + + startCmd := &cobra.Command{ + Use: "start", + Short: product.Replace("Start a loft instance and connect via port-forwarding"), + Long: product.ReplaceWithHeader("start", ` +Starts a loft instance in your Kubernetes cluster and +then establishes a port-forwarding connection. + +Please make sure you meet the following requirements +before running this command: + +1. Current kube-context has admin access to the cluster +2. Helm v3 must be installed +3. kubectl must be installed + +######################################################## + `), + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + upgrade.PrintNewerVersionWarning() + + return cmd.Run(cobraCmd.Context()) + }, + } + + startCmd.Flags().BoolVar(&cmd.Docker, "docker", false, product.Replace("If enabled will try to deploy Loft to the local docker installation.")) + startCmd.Flags().StringVar(&cmd.DockerImage, "docker-image", "", product.Replace("The docker image to install.")) + startCmd.Flags().StringArrayVar(&cmd.DockerArgs, "docker-arg", []string{}, product.Replace("Extra docker args for running Loft.")) + startCmd.Flags().StringVar(&cmd.Product, "product", "", "The Loft product to install") + startCmd.Flags().StringVar(&cmd.Context, "context", "", "The kube context to use for installation") + startCmd.Flags().StringVar(&cmd.Namespace, "namespace", "loft", product.Replace("The namespace to install loft into")) + startCmd.Flags().StringVar(&cmd.LocalPort, "local-port", "", "The local port to bind to if using port-forwarding") + startCmd.Flags().StringVar(&cmd.Host, "host", "", "Provide a hostname to enable ingress and configure its hostname") + startCmd.Flags().StringVar(&cmd.Password, "password", "", "The password to use for the admin account. (If empty this will be the namespace UID)") + startCmd.Flags().StringVar(&cmd.Version, "version", upgrade.GetVersion(), product.Replace("The loft version to install")) + startCmd.Flags().StringVar(&cmd.Values, "values", "", product.Replace("Path to a file for extra loft helm chart values")) + startCmd.Flags().BoolVar(&cmd.ReuseValues, "reuse-values", true, product.Replace("Reuse previous Loft helm values on upgrade")) + startCmd.Flags().BoolVar(&cmd.Upgrade, "upgrade", false, product.Replace("If true, Loft will try to upgrade the release")) + startCmd.Flags().StringVar(&cmd.Email, "email", "", "The email to use for the installation") + startCmd.Flags().BoolVar(&cmd.Reset, "reset", false, product.Replace("If true, an existing loft instance will be deleted before installing loft")) + startCmd.Flags().BoolVar(&cmd.NoWait, "no-wait", false, product.Replace("If true, loft will not wait after installing it")) + startCmd.Flags().BoolVar(&cmd.NoPortForwarding, "no-port-forwarding", false, product.Replace("If true, loft will not do port forwarding after installing it")) + startCmd.Flags().BoolVar(&cmd.NoTunnel, "no-tunnel", false, product.Replace("If true, loft will not create a loft.host tunnel for this installation")) + startCmd.Flags().BoolVar(&cmd.NoLogin, "no-login", false, product.Replace("If true, loft will not login to a loft instance on start")) + startCmd.Flags().StringVar(&cmd.ChartPath, "chart-path", "", product.Replace("The local chart path to deploy Loft")) + startCmd.Flags().StringVar(&cmd.ChartRepo, "chart-repo", "https://charts.loft.sh/", product.Replace("The chart repo to deploy Loft")) + startCmd.Flags().StringVar(&cmd.ChartName, "chart-name", "loft", product.Replace("The chart name to deploy Loft")) + return startCmd +} + +// Run executes the functionality "loft start" +func (cmd *StartCmd) Run(ctx context.Context) error { + return start.NewLoftStarter(cmd.Options).Start(ctx) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/token.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/token.go new file mode 100644 index 000000000..151393be4 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/token.go @@ -0,0 +1,170 @@ +package cmd + +import ( + "encoding/json" + "errors" + "fmt" + "os" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" +) + +var ( + ErrNoConfigLoaded = errors.New("no config loaded") + ErrNotLoggedIn = errors.New("not logged in") +) + +// TokenCmd holds the cmd flags +type TokenCmd struct { + *flags.GlobalFlags + + DirectClusterEndpoint bool + Project string + VirtualCluster string + log log.Logger +} + +// NewTokenCmd creates a new command +func NewTokenCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &TokenCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("token", ` +Prints an access token to a loft instance. This can +be used as an ExecAuthenticator for kubernetes + +Example: +loft token +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +#################### devspace token #################### +######################################################## +Prints an access token to a loft instance. This can +be used as an ExecAuthenticator for kubernetes + +Example: +devspace token +######################################################## + ` + } + + tokenCmd := &cobra.Command{ + Use: "token", + Short: product.Replace("Token prints the access token to a loft instance"), + Long: description, + Args: cobra.NoArgs, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run() + }, + } + + tokenCmd.Flags().BoolVar(&cmd.DirectClusterEndpoint, "direct-cluster-endpoint", false, "When enabled prints a direct cluster endpoint token") + tokenCmd.Flags().StringVar(&cmd.Project, "project", "", "The project containing the virtual cluster") + tokenCmd.Flags().StringVar(&cmd.VirtualCluster, "virtual-cluster", "", "The virtual cluster") + return tokenCmd +} + +// Run executes the command +func (cmd *TokenCmd) Run() error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + tokenFunc := getToken + + if cmd.Project != "" && cmd.VirtualCluster != "" { + cmd.log.Debug("project and virtual cluster set, attempting fetch virtual cluster certificate data") + tokenFunc = getCertificate + } + + return tokenFunc(cmd, baseClient) +} + +func getToken(cmd *TokenCmd, baseClient client.Client) error { + // get config + config := baseClient.Config() + if config == nil { + return ErrNoConfigLoaded + } else if config.Host == "" || config.AccessKey == "" { + return fmt.Errorf(product.Replace("%w: please make sure you have run 'loft login [loft-url]'"), ErrNotLoggedIn) + } + + // by default we print the access key as token + token := config.AccessKey + + // check if we should print a cluster gateway token instead + if cmd.DirectClusterEndpoint { + var err error + token, err = baseClient.DirectClusterEndpointToken(false) + if err != nil { + return err + } + } + + return printToken(token) +} + +func printToken(token string) error { + // Print token to stdout + response := &v1beta1.ExecCredential{ + TypeMeta: metav1.TypeMeta{ + Kind: "ExecCredential", + APIVersion: v1beta1.SchemeGroupVersion.String(), + }, + Status: &v1beta1.ExecCredentialStatus{ + Token: token, + }, + } + + bytes, err := json.Marshal(response) + if err != nil { + return fmt.Errorf("json marshal: %w", err) + } + + _, err = os.Stdout.Write(bytes) + return err +} + +func getCertificate(cmd *TokenCmd, baseClient client.Client) error { + certificateData, keyData, err := baseClient.VirtualClusterAccessPointCertificate(cmd.Project, cmd.VirtualCluster, false) + if err != nil { + return err + } + + return printCertificate(certificateData, keyData) +} + +func printCertificate(certificateData, keyData string) error { + // Print certificate-based exec credential to stdout + response := &v1beta1.ExecCredential{ + TypeMeta: metav1.TypeMeta{ + Kind: "ExecCredential", + APIVersion: v1beta1.SchemeGroupVersion.String(), + }, + Status: &v1beta1.ExecCredentialStatus{ + ClientCertificateData: certificateData, + ClientKeyData: keyData, + }, + } + + bytes, err := json.Marshal(response) + if err != nil { + return fmt.Errorf("json marshal: %w", err) + } + + _, err = os.Stdout.Write(bytes) + return err +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/upgrade.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/upgrade.go new file mode 100644 index 000000000..d7c438143 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/upgrade.go @@ -0,0 +1,46 @@ +package cmd + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/pkg/errors" + "github.com/spf13/cobra" +) + +// UpgradeCmd is a struct that defines a command call for "upgrade" +type UpgradeCmd struct { + Version string + + log log.Logger +} + +// NewUpgradeCmd creates a new upgrade command +func NewUpgradeCmd() *cobra.Command { + cmd := &UpgradeCmd{ + log: log.GetInstance(), + } + + upgradeCmd := &cobra.Command{ + Use: "upgrade", + Short: product.Replace("Upgrade the loft CLI to the newest version"), + Long: product.ReplaceWithHeader("upgrade", ` +Upgrades the loft CLI to the newest version +########################################################`), + Args: cobra.NoArgs, + RunE: cmd.Run, + } + + upgradeCmd.Flags().StringVar(&cmd.Version, "version", "", product.Replace("The version to update loft to. Defaults to the latest stable version available")) + return upgradeCmd +} + +// Run executes the command logic +func (cmd *UpgradeCmd) Run(cobraCmd *cobra.Command, args []string) error { + err := upgrade.Upgrade(cmd.Version, cmd.log) + if err != nil { + return errors.Errorf("Couldn't upgrade: %v", err) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/cluster.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/cluster.go new file mode 100644 index 000000000..0d7254208 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/cluster.go @@ -0,0 +1,225 @@ +package use + +import ( + "context" + "encoding/base64" + "fmt" + "os" + "strings" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/pkg/errors" + "github.com/spf13/cobra" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + // LoftDirectClusterEndpoint is a cluster annotation that tells the loft cli to use this endpoint instead of + // the default loft server address to connect to this cluster. + LoftDirectClusterEndpoint = "loft.sh/direct-cluster-endpoint" + + // LoftDirectClusterEndpointInsecure is a cluster annotation that tells the loft cli to allow untrusted certificates + LoftDirectClusterEndpointInsecure = "loft.sh/direct-cluster-endpoint-insecure" + + // LoftDirectClusterEndpointCaData is a cluster annotation that tells the loft cli which cluster ca data to use + LoftDirectClusterEndpointCaData = "loft.sh/direct-cluster-endpoint-ca-data" +) + +// ClusterCmd holds the cmd flags +type ClusterCmd struct { + *flags.GlobalFlags + + Print bool + DisableDirectClusterEndpoint bool + + log log.Logger +} + +// NewClusterCmd creates a new command +func NewClusterCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &ClusterCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("use cluster", ` +Creates a new kube context for the given cluster, if +it does not yet exist. + +Example: +loft use cluster mycluster +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################ devspace use cluster ################## +######################################################## +Creates a new kube context for the given cluster, if +it does not yet exist. + +Example: +devspace use cluster mycluster +######################################################## + ` + } + c := &cobra.Command{ + Use: "cluster", + Short: "Creates a kube context for the given cluster", + Long: description, + Args: cobra.MaximumNArgs(1), + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + if !cmd.Print { + upgrade.PrintNewerVersionWarning() + } + + return cmd.Run(cobraCmd.Context(), args) + }, + } + + c.Flags().BoolVar(&cmd.Print, "print", false, "When enabled prints the context to stdout") + c.Flags().BoolVar(&cmd.DisableDirectClusterEndpoint, "disable-direct-cluster-endpoint", false, "When enabled does not use an available direct cluster endpoint to connect to the cluster") + return c +} + +// Run executes the command +func (cmd *ClusterCmd) Run(ctx context.Context, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // determine cluster name + clusterName := "" + if len(args) == 0 { + clusterName, err = helper.SelectCluster(baseClient, cmd.log) + if err != nil { + return err + } + } else { + clusterName = args[0] + } + + // check if the cluster exists + cluster, err := managementClient.Loft().ManagementV1().Clusters().Get(ctx, clusterName, metav1.GetOptions{}) + if err != nil { + if kerrors.IsForbidden(err) { + return fmt.Errorf("cluster '%s' does not exist, or you don't have permission to use it", clusterName) + } + + return err + } + + // create kube context options + contextOptions, err := CreateClusterContextOptions(baseClient, cmd.Config, cluster, "", cmd.DisableDirectClusterEndpoint, true, cmd.log) + if err != nil { + return err + } + + // check if we should print or update the config + if cmd.Print { + err = kubeconfig.PrintKubeConfigTo(contextOptions, os.Stdout) + if err != nil { + return err + } + } else { + // update kube config + err = kubeconfig.UpdateKubeConfig(contextOptions) + if err != nil { + return err + } + + cmd.log.Donef("Successfully updated kube context to use cluster %s", ansi.Color(clusterName, "white+b")) + } + + return nil +} + +func findProjectCluster(ctx context.Context, baseClient client.Client, projectName, clusterName string) (*managementv1.Cluster, error) { + managementClient, err := baseClient.Management() + if err != nil { + return nil, err + } + + projectClusters, err := managementClient.Loft().ManagementV1().Projects().ListClusters(ctx, projectName, metav1.GetOptions{}) + if err != nil { + return nil, errors.Wrap(err, "list project clusters") + } + + for _, cluster := range projectClusters.Clusters { + if cluster.Name == clusterName { + return &cluster, nil + } + } + + return nil, fmt.Errorf("couldn't find cluster %s in project %s", clusterName, projectName) +} + +func CreateClusterContextOptions(baseClient client.Client, config string, cluster *managementv1.Cluster, spaceName string, disableClusterGateway, setActive bool, log log.Logger) (kubeconfig.ContextOptions, error) { + contextOptions := kubeconfig.ContextOptions{ + Name: kubeconfig.SpaceContextName(cluster.Name, spaceName), + ConfigPath: config, + CurrentNamespace: spaceName, + SetActive: setActive, + } + if !disableClusterGateway && cluster.Annotations != nil && cluster.Annotations[LoftDirectClusterEndpoint] != "" { + contextOptions = ApplyDirectClusterEndpointOptions(contextOptions, cluster, "/kubernetes/cluster", log) + _, err := baseClient.DirectClusterEndpointToken(true) + if err != nil { + return kubeconfig.ContextOptions{}, fmt.Errorf("retrieving direct cluster endpoint token: %w. Use --disable-direct-cluster-endpoint to create a context without using direct cluster endpoints", err) + } + } else { + contextOptions.Server = baseClient.Config().Host + "/kubernetes/cluster/" + cluster.Name + contextOptions.InsecureSkipTLSVerify = baseClient.Config().Insecure + } + + data, err := retrieveCaData(cluster) + if err != nil { + return kubeconfig.ContextOptions{}, err + } + contextOptions.CaData = data + return contextOptions, nil +} + +func ApplyDirectClusterEndpointOptions(options kubeconfig.ContextOptions, cluster *managementv1.Cluster, path string, log log.Logger) kubeconfig.ContextOptions { + server := strings.TrimSuffix(cluster.Annotations[LoftDirectClusterEndpoint], "/") + if !strings.HasPrefix(server, "https://") { + server = "https://" + server + } + + log.Infof("Using direct cluster endpoint at %s", server) + options.Server = server + path + if cluster.Annotations[LoftDirectClusterEndpointInsecure] == "true" { + options.InsecureSkipTLSVerify = true + } + options.DirectClusterEndpointEnabled = true + return options +} + +func retrieveCaData(cluster *managementv1.Cluster) ([]byte, error) { + if cluster.Annotations == nil || cluster.Annotations[LoftDirectClusterEndpointCaData] == "" { + return nil, nil + } + + data, err := base64.StdEncoding.DecodeString(cluster.Annotations[LoftDirectClusterEndpointCaData]) + if err != nil { + return nil, fmt.Errorf("error decoding cluster %s annotation: %w", LoftDirectClusterEndpointCaData, err) + } + + return data, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/management.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/management.go new file mode 100644 index 000000000..53363da4a --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/management.go @@ -0,0 +1,112 @@ +package use + +import ( + "os" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/spf13/cobra" +) + +// ManagementCmd holds the cmd flags +type ManagementCmd struct { + *flags.GlobalFlags + + Print bool + + log log.Logger +} + +// NewManagementCmd creates a new command +func NewManagementCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &ManagementCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("use management", ` +Creates a new kube context to the Loft Management API. + +Example: +loft use management +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################ devspace use management ############### +######################################################## +Creates a new kube context to the Loft Management API. + +Example: +devspace use management +######################################################## + ` + } + c := &cobra.Command{ + Use: "management", + Short: product.Replace("Creates a kube context to the Loft Management API"), + Long: description, + Args: cobra.MaximumNArgs(1), + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + if !cmd.Print { + upgrade.PrintNewerVersionWarning() + } + + return cmd.Run(args) + }, + } + + c.Flags().BoolVar(&cmd.Print, "print", false, "When enabled prints the context to stdout") + return c +} + +func (cmd *ManagementCmd) Run(args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + // create kube context options + contextOptions, err := CreateManagementContextOptions(baseClient, cmd.Config, true, cmd.log) + if err != nil { + return err + } + + // check if we should print or update the config + if cmd.Print { + err = kubeconfig.PrintKubeConfigTo(contextOptions, os.Stdout) + if err != nil { + return err + } + } else { + // update kube config + err = kubeconfig.UpdateKubeConfig(contextOptions) + if err != nil { + return err + } + + cmd.log.Donef("Successfully updated kube context to use cluster %s", ansi.Color(contextOptions.Name, "white+b")) + } + + return nil +} + +func CreateManagementContextOptions(baseClient client.Client, config string, setActive bool, log log.Logger) (kubeconfig.ContextOptions, error) { + contextOptions := kubeconfig.ContextOptions{ + Name: kubeconfig.ManagementContextName(), + ConfigPath: config, + SetActive: setActive, + } + + contextOptions.Server = baseClient.Config().Host + "/kubernetes/management" + contextOptions.InsecureSkipTLSVerify = baseClient.Config().Insecure + + return contextOptions, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/space.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/space.go new file mode 100644 index 000000000..64146691b --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/space.go @@ -0,0 +1,231 @@ +package use + +import ( + "context" + "fmt" + "os" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/loftctl/v3/pkg/space" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/pkg/errors" + "github.com/spf13/cobra" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// SpaceCmd holds the cmd flags +type SpaceCmd struct { + *flags.GlobalFlags + + Cluster string + Project string + Print bool + SkipWait bool + DisableDirectClusterEndpoint bool + + log log.Logger +} + +// NewSpaceCmd creates a new command +func NewSpaceCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &SpaceCmd{ + GlobalFlags: globalFlags, + log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("use space", ` +Creates a new kube context for the given space. + +Example: +loft use space +loft use space myspace +loft use space myspace --project myproject +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################# devspace use space ################### +######################################################## +Creates a new kube context for the given space. + +Example: +devspace use space +devspace use space myspace +devspace use space myspace --project myproject +######################################################## + ` + } + useLine, validator := util.NamedPositionalArgsValidator(false, "SPACE_NAME") + c := &cobra.Command{ + Use: "space" + useLine, + Short: "Creates a kube context for the given space", + Long: description, + Args: validator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + if !cmd.Print { + upgrade.PrintNewerVersionWarning() + } + + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVar(&cmd.Cluster, "cluster", "", "The cluster to use") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().BoolVar(&cmd.Print, "print", false, "When enabled prints the context to stdout") + c.Flags().BoolVar(&cmd.SkipWait, "skip-wait", false, "If true, will not wait until the space is running") + c.Flags().BoolVar(&cmd.DisableDirectClusterEndpoint, "disable-direct-cluster-endpoint", false, "When enabled does not use an available direct cluster endpoint to connect to the cluster") + return c +} + +// Run executes the command +func (cmd *SpaceCmd) Run(ctx context.Context, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + err = client.VerifyVersion(baseClient) + if err != nil { + return err + } + + spaceName := "" + if len(args) > 0 { + spaceName = args[0] + } + + cmd.Cluster, cmd.Project, spaceName, err = helper.SelectSpaceInstanceOrSpace(baseClient, spaceName, cmd.Project, cmd.Cluster, cmd.log) + if err != nil { + return err + } + + if cmd.Project == "" { + return cmd.legacyUseSpace(ctx, baseClient, spaceName) + } + + return cmd.useSpace(ctx, baseClient, spaceName) +} + +func (cmd *SpaceCmd) useSpace(ctx context.Context, baseClient client.Client, spaceName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // wait until space is ready + spaceInstance, err := space.WaitForSpaceInstance(ctx, managementClient, naming.ProjectNamespace(cmd.Project), spaceName, !cmd.SkipWait, cmd.log) + if err != nil { + return err + } + + // create kube context options + contextOptions, err := CreateSpaceInstanceOptions(ctx, baseClient, cmd.Config, cmd.Project, spaceInstance, cmd.DisableDirectClusterEndpoint, true, cmd.log) + if err != nil { + return err + } + + // check if we should print or update the config + if cmd.Print { + err = kubeconfig.PrintKubeConfigTo(contextOptions, os.Stdout) + if err != nil { + return err + } + } else { + // update kube config + err = kubeconfig.UpdateKubeConfig(contextOptions) + if err != nil { + return err + } + + cmd.log.Donef("Successfully updated kube context to use space %s in project %s", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Project, "white+b")) + } + + return nil +} + +func (cmd *SpaceCmd) legacyUseSpace(ctx context.Context, baseClient client.Client, spaceName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // check if the cluster exists + cluster, err := managementClient.Loft().ManagementV1().Clusters().Get(ctx, cmd.Cluster, metav1.GetOptions{}) + if err != nil { + if kerrors.IsForbidden(err) { + return fmt.Errorf("cluster '%s' does not exist, or you don't have permission to use it", cmd.Cluster) + } + + return err + } + + // create kube context options + contextOptions, err := CreateClusterContextOptions(baseClient, cmd.Config, cluster, spaceName, cmd.DisableDirectClusterEndpoint, true, cmd.log) + if err != nil { + return err + } + + // check if we should print or update the config + if cmd.Print { + err = kubeconfig.PrintKubeConfigTo(contextOptions, os.Stdout) + if err != nil { + return err + } + } else { + // update kube config + err = kubeconfig.UpdateKubeConfig(contextOptions) + if err != nil { + return err + } + + cmd.log.Donef("Successfully updated kube context to use space %s in cluster %s", ansi.Color(spaceName, "white+b"), ansi.Color(cmd.Cluster, "white+b")) + } + + return nil +} + +func CreateSpaceInstanceOptions(ctx context.Context, baseClient client.Client, config string, projectName string, spaceInstance *managementv1.SpaceInstance, disableClusterGateway, setActive bool, log log.Logger) (kubeconfig.ContextOptions, error) { + cluster, err := findProjectCluster(ctx, baseClient, projectName, spaceInstance.Spec.ClusterRef.Cluster) + if err != nil { + return kubeconfig.ContextOptions{}, errors.Wrap(err, "find space instance cluster") + } + + contextOptions := kubeconfig.ContextOptions{ + Name: kubeconfig.SpaceInstanceContextName(projectName, spaceInstance.Name), + ConfigPath: config, + CurrentNamespace: spaceInstance.Spec.ClusterRef.Namespace, + SetActive: setActive, + } + if !disableClusterGateway && cluster.Annotations != nil && cluster.Annotations[LoftDirectClusterEndpoint] != "" { + contextOptions = ApplyDirectClusterEndpointOptions(contextOptions, cluster, "/kubernetes/project/"+projectName+"/space/"+spaceInstance.Name, log) + _, err := baseClient.DirectClusterEndpointToken(true) + if err != nil { + return kubeconfig.ContextOptions{}, fmt.Errorf("retrieving direct cluster endpoint token: %w. Use --disable-direct-cluster-endpoint to create a context without using direct cluster endpoints", err) + } + } else { + contextOptions.Server = baseClient.Config().Host + "/kubernetes/project/" + projectName + "/space/" + spaceInstance.Name + contextOptions.InsecureSkipTLSVerify = baseClient.Config().Insecure + } + + data, err := retrieveCaData(cluster) + if err != nil { + return kubeconfig.ContextOptions{}, err + } + contextOptions.CaData = data + return contextOptions, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/use.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/use.go new file mode 100644 index 000000000..575cc8d22 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/use.go @@ -0,0 +1,38 @@ +package use + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewUseCmd creates a new cobra command +func NewUseCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + description := product.ReplaceWithHeader("use", ` + +Activates a kube context for the given cluster / space / vcluster / management. + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +#################### devspace use ##################### +####################################################### + +Activates a kube context for the given cluster / space / vcluster / management. + ` + } + useCmd := &cobra.Command{ + Use: "use", + Short: product.Replace("Uses loft resources"), + Long: description, + Args: cobra.NoArgs, + } + + useCmd.AddCommand(NewClusterCmd(globalFlags)) + useCmd.AddCommand(NewManagementCmd(globalFlags)) + useCmd.AddCommand(NewSpaceCmd(globalFlags, defaults)) + useCmd.AddCommand(NewVirtualClusterCmd(globalFlags, defaults)) + return useCmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/vcluster.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/vcluster.go new file mode 100644 index 000000000..0aa41b8ce --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use/vcluster.go @@ -0,0 +1,320 @@ +package use + +import ( + "context" + "fmt" + "io" + "os" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/loftctl/v3/pkg/vcluster" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/pkg/errors" + "github.com/spf13/cobra" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/tools/clientcmd/api" +) + +// VirtualClusterCmd holds the cmd flags +type VirtualClusterCmd struct { + *flags.GlobalFlags + + Space string + Cluster string + Project string + SkipWait bool + Print bool + PrintToken bool + DisableDirectClusterEndpoint bool + + Out io.Writer + Log log.Logger +} + +// NewVirtualClusterCmd creates a new command +func NewVirtualClusterCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &VirtualClusterCmd{ + GlobalFlags: globalFlags, + Out: os.Stdout, + Log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("use vcluster", ` +Creates a new kube context for the given virtual cluster. + +Example: +loft use vcluster +loft use vcluster myvcluster +loft use vcluster myvcluster --cluster mycluster +loft use vcluster myvcluster --cluster mycluster --space myspace +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +################ devspace use vcluster ################# +######################################################## +Creates a new kube context for the given virtual cluster. + +Example: +devspace use vcluster +devspace use vcluster myvcluster +devspace use vcluster myvcluster --cluster mycluster +devspace use vcluster myvcluster --cluster mycluster --space myspace +######################################################## + ` + } + useLine, validator := util.NamedPositionalArgsValidator(false, "VCLUSTER_NAME") + c := &cobra.Command{ + Use: "vcluster" + useLine, + Short: "Creates a kube context for the given virtual cluster", + Long: description, + Args: validator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + // Check for newer version + if !cmd.Print && !cmd.PrintToken { + upgrade.PrintNewerVersionWarning() + } + + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVar(&cmd.Space, "space", "", "The space to use") + c.Flags().StringVar(&cmd.Cluster, "cluster", "", "The cluster to use") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().BoolVar(&cmd.SkipWait, "skip-wait", false, "If true, will not wait until the virtual cluster is running") + c.Flags().BoolVar(&cmd.Print, "print", false, "When enabled prints the context to stdout") + c.Flags().BoolVar(&cmd.DisableDirectClusterEndpoint, "disable-direct-cluster-endpoint", false, "When enabled does not use an available direct cluster endpoint to connect to the vcluster") + return c +} + +// Run executes the command +func (cmd *VirtualClusterCmd) Run(ctx context.Context, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + err = client.VerifyVersion(baseClient) + if err != nil { + return err + } + + virtualClusterName := "" + if len(args) > 0 { + virtualClusterName = args[0] + } + + cmd.Cluster, cmd.Project, cmd.Space, virtualClusterName, err = helper.SelectVirtualClusterInstanceOrVirtualCluster(baseClient, virtualClusterName, cmd.Space, cmd.Project, cmd.Cluster, cmd.Log) + if err != nil { + return err + } + + if cmd.Project == "" { + return cmd.legacyUseVirtualCluster(ctx, baseClient, virtualClusterName) + } + + return cmd.useVirtualCluster(ctx, baseClient, virtualClusterName) +} + +func (cmd *VirtualClusterCmd) useVirtualCluster(ctx context.Context, baseClient client.Client, virtualClusterName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + virtualClusterInstance, err := vcluster.WaitForVirtualClusterInstance(ctx, managementClient, naming.ProjectNamespace(cmd.Project), virtualClusterName, !cmd.SkipWait, cmd.Log) + if err != nil { + return err + } + + // create kube context options + contextOptions, err := CreateVirtualClusterInstanceOptions(ctx, baseClient, cmd.Config, cmd.Project, virtualClusterInstance, cmd.DisableDirectClusterEndpoint, true, cmd.Log) + if err != nil { + return err + } + + // check if we should print or update the config + if cmd.Print { + err = kubeconfig.PrintKubeConfigTo(contextOptions, os.Stdout) + if err != nil { + return err + } + } else { + // update kube config + err = kubeconfig.UpdateKubeConfig(contextOptions) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully updated kube context to use virtual cluster %s in project %s", ansi.Color(virtualClusterName, "white+b"), ansi.Color(cmd.Project, "white+b")) + } + + return nil +} + +func CreateVirtualClusterInstanceOptions(ctx context.Context, baseClient client.Client, config string, projectName string, virtualClusterInstance *managementv1.VirtualClusterInstance, disableClusterGateway, setActive bool, log log.Logger) (kubeconfig.ContextOptions, error) { + cluster, err := findProjectCluster(ctx, baseClient, projectName, virtualClusterInstance.Spec.ClusterRef.Cluster) + if err != nil { + return kubeconfig.ContextOptions{}, errors.Wrap(err, "find space instance cluster") + } + + contextOptions := kubeconfig.ContextOptions{ + Name: kubeconfig.VirtualClusterInstanceContextName(projectName, virtualClusterInstance.Name), + ConfigPath: config, + SetActive: setActive, + } + if virtualClusterInstance.Status.VirtualCluster != nil && virtualClusterInstance.Status.VirtualCluster.AccessPoint.Ingress.Enabled { + kubeConfig, err := getVirtualClusterInstanceAccessConfig(ctx, baseClient, virtualClusterInstance) + if err != nil { + return kubeconfig.ContextOptions{}, errors.Wrap(err, "retrieve kube config") + } + + // get server + for _, val := range kubeConfig.Clusters { + contextOptions.Server = val.Server + } + + contextOptions.InsecureSkipTLSVerify = true + contextOptions.VirtualClusterAccessPointEnabled = true + } else { + if !disableClusterGateway && cluster.Annotations != nil && cluster.Annotations[LoftDirectClusterEndpoint] != "" { + contextOptions = ApplyDirectClusterEndpointOptions(contextOptions, cluster, "/kubernetes/project/"+projectName+"/virtualcluster/"+virtualClusterInstance.Name, log) + _, err := baseClient.DirectClusterEndpointToken(true) + if err != nil { + return kubeconfig.ContextOptions{}, fmt.Errorf("retrieving direct cluster endpoint token: %w. Use --disable-direct-cluster-endpoint to create a context without using direct cluster endpoints", err) + } + } else { + contextOptions.Server = baseClient.Config().Host + "/kubernetes/project/" + projectName + "/virtualcluster/" + virtualClusterInstance.Name + contextOptions.InsecureSkipTLSVerify = baseClient.Config().Insecure + } + + data, err := retrieveCaData(cluster) + if err != nil { + return kubeconfig.ContextOptions{}, err + } + contextOptions.CaData = data + } + return contextOptions, nil +} + +func (cmd *VirtualClusterCmd) legacyUseVirtualCluster(ctx context.Context, baseClient client.Client, virtualClusterName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // check if the cluster exists + cluster, err := managementClient.Loft().ManagementV1().Clusters().Get(ctx, cmd.Cluster, metav1.GetOptions{}) + if err != nil { + if kerrors.IsForbidden(err) { + return fmt.Errorf("cluster '%s' does not exist, or you don't have permission to use it", cmd.Cluster) + } + + return err + } + + // get token for virtual cluster + if !cmd.Print && !cmd.PrintToken { + cmd.Log.Info("Waiting for virtual cluster to become ready...") + } + err = vcluster.WaitForVCluster(ctx, baseClient, cmd.Cluster, cmd.Space, virtualClusterName, cmd.Log) + if err != nil { + return err + } + + // create kube context options + contextOptions, err := CreateVClusterContextOptions(baseClient, cmd.Config, cluster, cmd.Space, virtualClusterName, cmd.DisableDirectClusterEndpoint, true, cmd.Log) + if err != nil { + return err + } + + // check if we should print or update the config + if cmd.Print { + err = kubeconfig.PrintKubeConfigTo(contextOptions, cmd.Out) + if err != nil { + return err + } + } else { + // update kube config + err = kubeconfig.UpdateKubeConfig(contextOptions) + if err != nil { + return err + } + + cmd.Log.Donef("Successfully updated kube context to use space %s in cluster %s", ansi.Color(cmd.Space, "white+b"), ansi.Color(cmd.Cluster, "white+b")) + } + + return nil +} + +func CreateVClusterContextOptions(baseClient client.Client, config string, cluster *managementv1.Cluster, spaceName, virtualClusterName string, disableClusterGateway, setActive bool, log log.Logger) (kubeconfig.ContextOptions, error) { + contextOptions := kubeconfig.ContextOptions{ + Name: kubeconfig.VirtualClusterContextName(cluster.Name, spaceName, virtualClusterName), + ConfigPath: config, + SetActive: setActive, + } + if !disableClusterGateway && cluster.Annotations != nil && cluster.Annotations[LoftDirectClusterEndpoint] != "" { + contextOptions = ApplyDirectClusterEndpointOptions(contextOptions, cluster, "/kubernetes/virtualcluster/"+spaceName+"/"+virtualClusterName, log) + _, err := baseClient.DirectClusterEndpointToken(true) + if err != nil { + return kubeconfig.ContextOptions{}, fmt.Errorf("retrieving direct cluster endpoint token: %w. Use --disable-direct-cluster-endpoint to create a context without using direct cluster endpoints", err) + } + } else { + contextOptions.Server = baseClient.Config().Host + "/kubernetes/virtualcluster/" + cluster.Name + "/" + spaceName + "/" + virtualClusterName + contextOptions.InsecureSkipTLSVerify = baseClient.Config().Insecure + } + + data, err := retrieveCaData(cluster) + if err != nil { + return kubeconfig.ContextOptions{}, err + } + contextOptions.CaData = data + return contextOptions, nil +} + +func getVirtualClusterInstanceAccessConfig(ctx context.Context, baseClient client.Client, virtualClusterInstance *managementv1.VirtualClusterInstance) (*api.Config, error) { + managementClient, err := baseClient.Management() + if err != nil { + return nil, err + } + + kubeConfig, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(virtualClusterInstance.Namespace).GetKubeConfig( + ctx, + virtualClusterInstance.Name, + &managementv1.VirtualClusterInstanceKubeConfig{ + Spec: managementv1.VirtualClusterInstanceKubeConfigSpec{}, + }, + metav1.CreateOptions{}, + ) + if err != nil { + return nil, err + } + + // parse kube config string + clientCfg, err := clientcmd.NewClientConfigFromBytes([]byte(kubeConfig.Status.KubeConfig)) + if err != nil { + return nil, errors.Wrap(err, "") + } + + apiCfg, err := clientCfg.RawConfig() + if err != nil { + return nil, err + } + + return &apiCfg, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars/cluster.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars/cluster.go new file mode 100644 index 000000000..72e1bcb1a --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars/cluster.go @@ -0,0 +1,61 @@ +package vars + +import ( + "errors" + "os" + "strings" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/spf13/cobra" + "k8s.io/client-go/tools/clientcmd" +) + +var ( + ErrNotLoftContext = errors.New("current context is not a loft context, but predefined var LOFT_CLUSTER is used") +) + +type clusterCmd struct { + *flags.GlobalFlags +} + +func newClusterCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &clusterCmd{ + GlobalFlags: globalFlags, + } + + return &cobra.Command{ + Use: "cluster", + Short: "Prints the current cluster", + Args: cobra.NoArgs, + RunE: cmd.Run, + } +} + +// Run executes the command logic +func (*clusterCmd) Run(cobraCmd *cobra.Command, args []string) error { + kubeConfig, err := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(clientcmd.NewDefaultClientConfigLoadingRules(), &clientcmd.ConfigOverrides{}).RawConfig() + if err != nil { + return err + } + + kubeContext := os.Getenv("DEVSPACE_PLUGIN_KUBE_CONTEXT_FLAG") + if kubeContext == "" { + kubeContext = kubeConfig.CurrentContext + } + + cluster, ok := kubeConfig.Clusters[kubeContext] + if !ok { + return ErrNotLoftContext + } + + server := strings.TrimSuffix(cluster.Server, "/") + splitted := strings.Split(server, "/") + if len(splitted) < 3 { + return ErrNotLoftContext + } else if splitted[len(splitted)-2] != "cluster" || splitted[len(splitted)-3] != "kubernetes" { + return ErrNotLoftContext + } + + _, err = os.Stdout.Write([]byte(splitted[len(splitted)-1])) + return err +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars/username.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars/username.go new file mode 100644 index 000000000..51e5a99e3 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars/username.go @@ -0,0 +1,58 @@ +package vars + +import ( + "os" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/pkg/errors" + "github.com/spf13/cobra" +) + +var ( + ErrUserSetNoLogin = errors.New("not logged in, but predefined var LOFT_USERNAME is used") +) + +type usernameCmd struct { + *flags.GlobalFlags +} + +func newUsernameCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + cmd := &usernameCmd{ + GlobalFlags: globalFlags, + } + + return &cobra.Command{ + Use: "username", + Short: product.Replace("Prints the current loft username"), + Args: cobra.NoArgs, + RunE: cmd.Run, + } +} + +// Run executes the command logic +func (cmd *usernameCmd) Run(cobraCmd *cobra.Command, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return ErrUserSetNoLogin + } + + client, err := baseClient.Management() + if err != nil { + return err + } + + ctx := cobraCmd.Context() + + userName, teamName, err := helper.GetCurrentUser(ctx, client) + if err != nil { + return err + } else if teamName != nil { + return errors.New("logged in with a team and not a user") + } + + _, err = os.Stdout.Write([]byte(userName.Username)) + return err +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars/vars.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars/vars.go new file mode 100644 index 000000000..a7652e032 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars/vars.go @@ -0,0 +1,32 @@ +package vars + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewVarsCmd creates a new cobra command for the sub command +func NewVarsCmd(globalFlags *flags.GlobalFlags) *cobra.Command { + description := product.ReplaceWithHeader("var", "") + + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################### devspace vars ##################### +####################################################### +` + } + + cmd := &cobra.Command{ + Use: "vars", + Short: "Print predefined variables", + Long: description, + Args: cobra.NoArgs, + } + + cmd.AddCommand(newUsernameCmd(globalFlags)) + cmd.AddCommand(newClusterCmd(globalFlags)) + return cmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/cmds.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/cmds.go new file mode 100644 index 000000000..74e3c25a7 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/cmds.go @@ -0,0 +1,85 @@ +package vclusterpro + +import ( + "strings" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/spf13/cobra" +) + +func NewConnectCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + connectCmd := use.NewVirtualClusterCmd(globalFlags, defaults) + connectCmd.Use = strings.Replace(connectCmd.Use, "vcluster", "connect", 1) + connectCmd.Aliases = []string{"use"} + + connectCmd.Long = product.ReplaceWithHeader("connect", ` +Creates a new kube context for the given virtual cluster.`) + + connectCmd.Example = product.Replace(` vcluster pro connect + vcluster pro connect myvcluster + vcluster pro connect myvcluster --cluster mycluster + vcluster pro connect myvcluster --cluster mycluster --space myspace`) + + return connectCmd +} + +func NewCreateCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + createCmd := create.NewVirtualClusterCmd(globalFlags, defaults) + createCmd.Use = strings.Replace(createCmd.Use, "vcluster", "create", 1) + + createCmd.Long = product.ReplaceWithHeader("create", ` +Creates a new virtual cluster in a given space and +cluster. If no space or cluster is specified the user +will be asked.`) + + createCmd.Example = product.Replace(` vcluster pro create test + vcluster pro create test --project myproject`) + + return createCmd +} + +func NewDeleteCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + deleteCmd := delete.NewVirtualClusterCmd(globalFlags, defaults) + deleteCmd.Use = strings.Replace(deleteCmd.Use, "vcluster", "delete", 1) + + deleteCmd.Long = product.ReplaceWithHeader("delete", ` +Deletes a virtual cluster from a cluster.`) + + deleteCmd.Example = product.Replace(` vcluster pro delete myvirtualcluster + vcluster pro delete myvirtualcluster --project myproject`) + + return deleteCmd +} + +func NewImportCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + importCmd := importcmd.NewVClusterCmd(globalFlags) + importCmd.Use = strings.Replace(importCmd.Use, "vcluster", "import", 1) + + importCmd.Long = product.ReplaceWithHeader("import", ` +Imports a vcluster into a vCluster.Pro project.`) + + importCmd.Example = product.Replace(` vcluster pro import my-vcluster --cluster connected-cluster my-vcluster \ + --namespace vcluster-my-vcluster --project my-project --importname my-vcluster`) + + return importCmd +} + +func NewListCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + listCmd := list.NewVirtualClustersCmd(globalFlags) + listCmd.Use = "list" + listCmd.Aliases = []string{"ls"} + + listCmd.Long = product.ReplaceWithHeader("list", ` +List the virtual clusters you have access to.`) + + listCmd.Example = " vcluster pro list" + + return listCmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/root.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/root.go new file mode 100644 index 000000000..724a1d417 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/root.go @@ -0,0 +1,29 @@ +package vclusterpro + +import ( + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/generate" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/reset" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/secret" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/space" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/spf13/cobra" +) + +func BuildVclusterProRoot(rootCmd *cobra.Command, globalFlags *flags.GlobalFlags, defaults *defaults.Defaults, additionalCommands []*cobra.Command) { + // vcluster pro related top level commands + rootCmd.AddCommand(NewConnectCmd(globalFlags, defaults)) + rootCmd.AddCommand(NewCreateCmd(globalFlags, defaults)) + rootCmd.AddCommand(NewDeleteCmd(globalFlags, defaults)) + rootCmd.AddCommand(NewImportCmd(globalFlags, defaults)) + rootCmd.AddCommand(NewListCmd(globalFlags, defaults)) + + // add subcommands + rootCmd.AddCommand(space.NewRootCmd(globalFlags, defaults)) + rootCmd.AddCommand(secret.NewRootCmd(globalFlags, defaults)) + rootCmd.AddCommand(generate.NewGenerateCmd(globalFlags)) + rootCmd.AddCommand(reset.NewResetCmd(globalFlags)) + + // add additional commands + rootCmd.AddCommand(additionalCommands...) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/secret/cmds.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/secret/cmds.go new file mode 100644 index 000000000..193ae93e7 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/secret/cmds.go @@ -0,0 +1,52 @@ +package secret + +import ( + "strings" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/set" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/spf13/cobra" +) + +func NewSecretGetCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + getCmd := get.NewSecretCmd(globalFlags, defaults) + getCmd.Use = strings.Replace(getCmd.Use, "secret", "get", 1) + + getCmd.Long = product.ReplaceWithHeader("secret get", ` +Returns the key value of a project / shared secret. + `) + + getCmd.Example = product.Replace(` vcluster pro secret get test-secret.key + vcluster pro secret get test-secret.key --project myproject`) + + return getCmd +} + +func NewSecretSetCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + setCmd := set.NewSecretCmd(globalFlags, defaults) + setCmd.Use = strings.Replace(setCmd.Use, "secret", "set", 1) + + setCmd.Long = product.ReplaceWithHeader("secret set", ` +Sets the key value of a project / shared secret.`) + + setCmd.Example = product.Replace(` vcluster pro secret set test-secret.key value + vcluster pro secret set test-secret.key value --project myproject`) + + return setCmd +} + +func NewSecretListCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + listCmd := list.NewSharedSecretsCmd(globalFlags) + listCmd.Use = "list" + + listCmd.Long = product.ReplaceWithHeader("secret list", ` +List the shared secrets you have access to.`) + + listCmd.Example = product.Replace(` vcluster pro secret list`) + + return listCmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/secret/root.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/secret/root.go new file mode 100644 index 000000000..25df9e14b --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/secret/root.go @@ -0,0 +1,36 @@ +package secret + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/spf13/cobra" +) + +func NewRootCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + short := "Management operations on secret resources" + + secretCmd := &cobra.Command{ + Use: "secret", + Short: short, + Long: product.ReplaceWithHeader("secret", short), + + Aliases: []string{"secrets"}, + + Example: product.Replace(` # Get the value for a given key of a secret + vcluster pro secret get test-secret.key + + # List all secrets + vcluster pro secret list + + # Set the value for a given key of a secret + vcluster pro secret set test-secret.key value +`), + Args: cobra.NoArgs, + } + secretCmd.AddCommand(NewSecretListCmd(globalFlags, defaults)) + secretCmd.AddCommand(NewSecretGetCmd(globalFlags, defaults)) + secretCmd.AddCommand(NewSecretSetCmd(globalFlags, defaults)) + + return secretCmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/space/cmds.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/space/cmds.go new file mode 100644 index 000000000..1c97d573f --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/space/cmds.go @@ -0,0 +1,69 @@ +package space + +import ( + "strings" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/spf13/cobra" +) + +func NewSpaceListCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + listCmd := list.NewSpacesCmd(globalFlags) + listCmd.Use = "list" + + listCmd.Long = product.ReplaceWithHeader("space list", ` +List the vCluster.Pro spaces you have access to.`) + + listCmd.Example = " vcluster pro space list" + + return listCmd +} + +func NewSpaceCreateCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + createCmd := create.NewSpaceCmd(globalFlags, defaults) + createCmd.Use = strings.Replace(createCmd.Use, "space", "create", 1) + + createCmd.Long = product.ReplaceWithHeader("space create", ` +Creates a new space for the given project, if +it does not yet exist.`) + + createCmd.Example = product.Replace(` vcluster pro space create myspace + vcluster pro space create myspace --project myproject + vcluster pro space create myspace --project myproject --team myteam`) + + return createCmd +} + +func NewSpaceDeleteCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + deleteCmd := delete.NewSpaceCmd(globalFlags, defaults) + deleteCmd.Use = strings.Replace(deleteCmd.Use, "space", "delete", 1) + + deleteCmd.Long = product.ReplaceWithHeader("space delete", ` +Deletes a space from a cluster.`) + + deleteCmd.Example = product.Replace(` vcluster pro space delete myspace + vcluster pro space delete myspace --project myproject`) + + return deleteCmd +} + +func NewSpaceUseCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + useCmd := use.NewSpaceCmd(globalFlags, defaults) + useCmd.Use = strings.Replace(useCmd.Use, "space", "use", 1) + useCmd.Aliases = []string{"connect"} + + useCmd.Long = product.ReplaceWithHeader("space use", ` +Creates a new kube context for the given space.`) + + useCmd.Example = product.Replace(` vcluster pro space use + vcluster pro space use myspace + vcluster pro space use myspace --project myproject`) + + return useCmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/space/root.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/space/root.go new file mode 100644 index 000000000..ff60ebc55 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/space/root.go @@ -0,0 +1,40 @@ +package space + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/spf13/cobra" +) + +func NewRootCmd(globalFlags *flags.GlobalFlags, defaults *defaults.Defaults) *cobra.Command { + short := "Management operations on space resources" + + spaceCmd := &cobra.Command{ + Use: "space", + Short: short, + Long: product.ReplaceWithHeader("space", short), + + Aliases: []string{"spaces"}, + + Example: product.Replace(` # List all spaces + vcluster pro spaces list + + # Create a new space + vcluster pro spaces create myspace + + # Delete a space + vcluster pro spaces delete myspace + + # Use a space + vcluster pro space use myspace +`), + Args: cobra.NoArgs, + } + spaceCmd.AddCommand(NewSpaceListCmd(globalFlags, defaults)) + spaceCmd.AddCommand(NewSpaceCreateCmd(globalFlags, defaults)) + spaceCmd.AddCommand(NewSpaceDeleteCmd(globalFlags, defaults)) + spaceCmd.AddCommand(NewSpaceUseCmd(globalFlags, defaults)) + + return spaceCmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup/space.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup/space.go new file mode 100644 index 000000000..0541b1ead --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup/space.go @@ -0,0 +1,169 @@ +package wakeup + +import ( + "context" + "fmt" + "time" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/pkg/config" + "github.com/loft-sh/loftctl/v3/pkg/space" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/pkg/errors" + "k8s.io/apimachinery/pkg/util/wait" + + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// SpaceCmd holds the cmd flags +type SpaceCmd struct { + *flags.GlobalFlags + + Project string + Cluster string + Log log.Logger +} + +// NewSpaceCmd creates a new command +func NewSpaceCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &SpaceCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("wakeup space", ` +wakeup resumes a sleeping space + +Example: +loft wakeup space myspace +loft wakeup space myspace --project myproject +####################################################### + `) + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################ devspace wakeup space ################ +####################################################### +wakeup resumes a sleeping space + +Example: +devspace wakeup space myspace +devspace wakeup space myspace --project myproject +####################################################### + ` + } + + c := &cobra.Command{ + Use: "space" + util.SpaceNameOnlyUseLine, + Short: "Wakes up a space", + Long: description, + Args: util.SpaceNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + c.Flags().StringVar(&cmd.Cluster, "cluster", "", "The cluster to use") + return c +} + +// Run executes the functionality +func (cmd *SpaceCmd) Run(ctx context.Context, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + spaceName := "" + if len(args) > 0 { + spaceName = args[0] + } + + cmd.Cluster, cmd.Project, spaceName, err = helper.SelectSpaceInstanceOrSpace(baseClient, spaceName, cmd.Project, cmd.Cluster, cmd.Log) + if err != nil { + return err + } + + if cmd.Project == "" { + return cmd.legacySpaceWakeUp(ctx, baseClient, spaceName) + } + + return cmd.spaceWakeUp(ctx, baseClient, spaceName) +} + +func (cmd *SpaceCmd) spaceWakeUp(ctx context.Context, baseClient client.Client, spaceName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + _, err = space.WaitForSpaceInstance(ctx, managementClient, naming.ProjectNamespace(cmd.Project), spaceName, true, cmd.Log) + if err != nil { + return err + } + + return nil +} + +func (cmd *SpaceCmd) legacySpaceWakeUp(ctx context.Context, baseClient client.Client, spaceName string) error { + clusterClient, err := baseClient.Cluster(cmd.Cluster) + if err != nil { + return err + } + + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + // get current user / team + self, err := managementClient.Loft().ManagementV1().Selves().Create(ctx, &managementv1.Self{}, metav1.CreateOptions{}) + if err != nil { + return errors.Wrap(err, "get self") + } else if self.Status.User == nil && self.Status.Team == nil { + return fmt.Errorf("no user or team name returned") + } + + configs, err := clusterClient.Agent().ClusterV1().SleepModeConfigs(spaceName).List(ctx, metav1.ListOptions{}) + if err != nil { + return err + } + + sleepModeConfig := &configs.Items[0] + sleepModeConfig.Spec.ForceSleep = false + sleepModeConfig.Spec.ForceSleepDuration = nil + sleepModeConfig.Status.LastActivity = time.Now().Unix() + + _, err = clusterClient.Agent().ClusterV1().SleepModeConfigs(spaceName).Create(ctx, sleepModeConfig, metav1.CreateOptions{}) + if err != nil { + return err + } + + // wait for sleeping + cmd.Log.Info("Wait until space wakes up...") + err = wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), false, func(ctx context.Context) (done bool, err error) { + configs, err := clusterClient.Agent().ClusterV1().SleepModeConfigs(spaceName).List(ctx, metav1.ListOptions{}) + if err != nil { + return false, err + } + + return configs.Items[0].Status.SleepingSince == 0, nil + }) + if err != nil { + return fmt.Errorf("error waiting for space to wake up: %w", err) + } + + cmd.Log.Donef("Successfully woken up space %s", spaceName) + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup/vcluster.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup/vcluster.go new file mode 100644 index 000000000..358567fd1 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup/vcluster.go @@ -0,0 +1,109 @@ +package wakeup + +import ( + "context" + "fmt" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/client/helper" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/loftctl/v3/pkg/vcluster" + "github.com/loft-sh/log" + "github.com/spf13/cobra" +) + +// VClusterCmd holds the cmd flags +type VClusterCmd struct { + *flags.GlobalFlags + + Project string + + Log log.Logger +} + +// NewVClusterCmd creates a new command +func NewVClusterCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + cmd := &VClusterCmd{ + GlobalFlags: globalFlags, + Log: log.GetInstance(), + } + + description := product.ReplaceWithHeader("wakeup vcluster", ` +Wakes up a vcluster + +Example: +loft wakeup vcluster myvcluster +loft wakeup vcluster myvcluster --project myproject +######################################################## + `) + if upgrade.IsPlugin == "true" { + description = ` +######################################################## +############## devspace wakeup vcluster ################ +######################################################## +Wakes up a vcluster + +Example: +devspace wakeup vcluster myvcluster +devspace wakeup vcluster myvcluster --project myproject +######################################################## + ` + } + + c := &cobra.Command{ + Use: "vcluster" + util.VClusterNameOnlyUseLine, + Short: "Wake up a vcluster", + Long: description, + Args: util.VClusterNameOnlyValidator, + RunE: func(cobraCmd *cobra.Command, args []string) error { + return cmd.Run(cobraCmd.Context(), args) + }, + } + + p, _ := defaults.Get(pdefaults.KeyProject, "") + c.Flags().StringVarP(&cmd.Project, "project", "p", p, "The project to use") + return c +} + +// Run executes the functionality +func (cmd *VClusterCmd) Run(ctx context.Context, args []string) error { + baseClient, err := client.NewClientFromPath(cmd.Config) + if err != nil { + return err + } + + vClusterName := "" + if len(args) > 0 { + vClusterName = args[0] + } + + _, cmd.Project, _, vClusterName, err = helper.SelectVirtualClusterInstanceOrVirtualCluster(baseClient, vClusterName, "", cmd.Project, "", cmd.Log) + if err != nil { + return err + } + + if cmd.Project == "" { + return fmt.Errorf("couldn't find a vcluster you have access to") + } + + return cmd.wakeUpVCluster(ctx, baseClient, vClusterName) +} + +func (cmd *VClusterCmd) wakeUpVCluster(ctx context.Context, baseClient client.Client, vClusterName string) error { + managementClient, err := baseClient.Management() + if err != nil { + return err + } + + _, err = vcluster.WaitForVirtualClusterInstance(ctx, managementClient, naming.ProjectNamespace(cmd.Project), vClusterName, true, cmd.Log) + if err != nil { + return err + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup/wakeup.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup/wakeup.go new file mode 100644 index 000000000..b4d11b493 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup/wakeup.go @@ -0,0 +1,31 @@ +package wakeup + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + pdefaults "github.com/loft-sh/loftctl/v3/pkg/defaults" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/spf13/cobra" +) + +// NewWakeUpCmd creates a new cobra command +func NewWakeUpCmd(globalFlags *flags.GlobalFlags, defaults *pdefaults.Defaults) *cobra.Command { + description := product.ReplaceWithHeader("wakeup", "") + if upgrade.IsPlugin == "true" { + description = ` +####################################################### +################### devspace wakeup ################### +####################################################### + ` + } + cmd := &cobra.Command{ + Use: "wakeup", + Short: "Wakes up a space or vcluster", + Long: description, + Args: cobra.NoArgs, + } + + cmd.AddCommand(NewSpaceCmd(globalFlags, defaults)) + cmd.AddCommand(NewVClusterCmd(globalFlags, defaults)) + return cmd +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/flags/flags.go b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/flags/flags.go new file mode 100644 index 000000000..a92d0103c --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/cmd/loftctl/flags/flags.go @@ -0,0 +1,27 @@ +package flags + +import ( + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/pkg/client" + flag "github.com/spf13/pflag" +) + +// GlobalFlags is the flags that contains the global flags +type GlobalFlags struct { + Silent bool + Debug bool + Config string + LogOutput string +} + +// SetGlobalFlags applies the global flags +func SetGlobalFlags(flags *flag.FlagSet) *GlobalFlags { + globalFlags := &GlobalFlags{} + + flags.StringVar(&globalFlags.LogOutput, "log-output", "plain", "The log format to use. Can be either plain, raw or json") + flags.StringVar(&globalFlags.Config, "config", client.DefaultCacheConfig, product.Replace("The loft config to use (will be created if it does not exist)")) + flags.BoolVar(&globalFlags.Debug, "debug", false, "Prints the stack trace if an error occurs") + flags.BoolVar(&globalFlags.Silent, "silent", false, product.Replace("Run in silent mode and prevents any loft log output except panics & fatals")) + + return globalFlags +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/client/client.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/client/client.go new file mode 100644 index 000000000..7b109fa7e --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/client/client.go @@ -0,0 +1,604 @@ +package client + +import ( + "context" + "crypto/x509" + "encoding/json" + "errors" + "fmt" + "net/http" + "net/url" + "os" + "path/filepath" + "strconv" + "strings" + "sync" + "time" + + "github.com/blang/semver" + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "k8s.io/utils/pointer" + + "github.com/loft-sh/api/v3/pkg/auth" + "github.com/loft-sh/api/v3/pkg/product" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/loft-sh/loftctl/v3/pkg/constants" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/upgrade" + "github.com/loft-sh/log" + "github.com/mitchellh/go-homedir" + perrors "github.com/pkg/errors" + "github.com/skratchdot/open-golang/open" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +var CacheFolder = ".loft" + +// DefaultCacheConfig is the path to the config +var DefaultCacheConfig = "config.json" + +const ( + VersionPath = "%s/version" + LoginPath = "%s/login?cli=true" + RedirectPath = "%s/spaces" + AccessKeyPath = "%s/profile/access-keys" + RefreshToken = time.Minute * 30 +) + +func init() { + hd, _ := homedir.Dir() + if folder, ok := os.LookupEnv(constants.LoftCacheFolderEnv); ok { + CacheFolder = filepath.Join(hd, folder) + } else { + CacheFolder = filepath.Join(hd, CacheFolder) + } + DefaultCacheConfig = filepath.Join(CacheFolder, DefaultCacheConfig) +} + +type Client interface { + Management() (kube.Interface, error) + ManagementConfig() (*rest.Config, error) + + SpaceInstance(project, name string) (kube.Interface, error) + SpaceInstanceConfig(project, name string) (*rest.Config, error) + + VirtualClusterInstance(project, name string) (kube.Interface, error) + VirtualClusterInstanceConfig(project, name string) (*rest.Config, error) + + Cluster(cluster string) (kube.Interface, error) + ClusterConfig(cluster string) (*rest.Config, error) + + VirtualCluster(cluster, namespace, virtualCluster string) (kube.Interface, error) + VirtualClusterConfig(cluster, namespace, virtualCluster string) (*rest.Config, error) + + Login(host string, insecure bool, log log.Logger) error + LoginWithAccessKey(host, accessKey string, insecure bool) error + LoginRaw(host, accessKey string, insecure bool) error + + Version() (*auth.Version, error) + Config() *Config + DirectClusterEndpointToken(forceRefresh bool) (string, error) + VirtualClusterAccessPointCertificate(project, virtualCluster string, forceRefresh bool) (string, string, error) + Save() error +} + +func NewClient() Client { + return &client{ + config: &Config{}, + } +} + +func NewClientFromPath(path string) (Client, error) { + c := &client{ + configPath: path, + } + + err := c.initConfig() + if err != nil { + return nil, err + } + + return c, nil +} + +type client struct { + configOnce sync.Once + configPath string + config *Config +} + +func (c *client) initConfig() error { + var retErr error + c.configOnce.Do(func() { + // load the config or create new one if not found + content, err := os.ReadFile(c.configPath) + if err != nil { + if os.IsNotExist(err) { + c.config = NewConfig() + return + } + + retErr = err + return + } + + config := &Config{ + VirtualClusterAccessPointCertificates: make(map[string]VirtualClusterCertificatesEntry), + } + err = json.Unmarshal(content, config) + if err != nil { + retErr = err + return + } + + c.config = config + }) + + return retErr +} + +func (c *client) VirtualClusterAccessPointCertificate(project, virtualCluster string, forceRefresh bool) (string, string, error) { + if c.config == nil { + return "", "", perrors.New("no config loaded") + } + + contextName := kubeconfig.VirtualClusterInstanceContextName(project, virtualCluster) + + // see if we have stored cert data for this vci + now := metav1.Now() + cachedVirtualClusterAccessPointCertificate, ok := c.config.VirtualClusterAccessPointCertificates[contextName] + if !forceRefresh && ok && cachedVirtualClusterAccessPointCertificate.LastRequested.Add(RefreshToken).After(now.Time) && cachedVirtualClusterAccessPointCertificate.ExpirationTime.After(now.Time) { + return cachedVirtualClusterAccessPointCertificate.CertificateData, cachedVirtualClusterAccessPointCertificate.KeyData, nil + } + + // refresh token + managementClient, err := c.Management() + if err != nil { + return "", "", err + } + + kubeConfigResponse, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(naming.ProjectNamespace(project)).GetKubeConfig( + context.Background(), + virtualCluster, + &managementv1.VirtualClusterInstanceKubeConfig{ + Spec: managementv1.VirtualClusterInstanceKubeConfigSpec{ + CertificateTTL: pointer.Int32(86_400), + }, + }, + metav1.CreateOptions{}, + ) + if err != nil { + return "", "", perrors.Wrap(err, "fetch certificate data") + } + + certificateData, keyData, err := getCertificateAndKeyDataFromKubeConfig(kubeConfigResponse.Status.KubeConfig) + if err != nil { + return "", "", err + } + + if c.config.VirtualClusterAccessPointCertificates == nil { + c.config.VirtualClusterAccessPointCertificates = make(map[string]VirtualClusterCertificatesEntry) + } + c.config.VirtualClusterAccessPointCertificates[contextName] = VirtualClusterCertificatesEntry{ + CertificateData: certificateData, + KeyData: keyData, + LastRequested: now, + ExpirationTime: now.Add(86_400 * time.Second), + } + + err = c.Save() + if err != nil { + return "", "", perrors.Wrap(err, "save config") + } + + return certificateData, keyData, nil +} + +func getCertificateAndKeyDataFromKubeConfig(config string) (string, string, error) { + clientCfg, err := clientcmd.NewClientConfigFromBytes([]byte(config)) + if err != nil { + return "", "", err + } + + apiCfg, err := clientCfg.RawConfig() + if err != nil { + return "", "", err + } + + return string(apiCfg.AuthInfos["vcluster"].ClientCertificateData), string(apiCfg.AuthInfos["vcluster"].ClientKeyData), nil +} + +func (c *client) DirectClusterEndpointToken(forceRefresh bool) (string, error) { + if c.config == nil { + return "", perrors.New("no config loaded") + } + + // check if we can use existing token + now := metav1.Now() + if !forceRefresh && c.config.DirectClusterEndpointToken != "" && c.config.DirectClusterEndpointTokenRequested != nil && c.config.DirectClusterEndpointTokenRequested.Add(RefreshToken).After(now.Time) { + return c.config.DirectClusterEndpointToken, nil + } + + // refresh token + managementClient, err := c.Management() + if err != nil { + return "", err + } + + clusterGatewayToken, err := managementClient.Loft().ManagementV1().DirectClusterEndpointTokens().Create(context.Background(), &managementv1.DirectClusterEndpointToken{}, metav1.CreateOptions{}) + if err != nil { + if c.config.DirectClusterEndpointToken != "" && c.config.DirectClusterEndpointTokenRequested != nil && c.config.DirectClusterEndpointTokenRequested.Add(time.Hour*24).After(now.Time) { + return c.config.DirectClusterEndpointToken, nil + } + + return "", err + } else if clusterGatewayToken.Status.Token == "" { + return "", perrors.New("retrieved an empty token") + } + + c.config.DirectClusterEndpointToken = clusterGatewayToken.Status.Token + c.config.DirectClusterEndpointTokenRequested = &now + err = c.Save() + if err != nil { + return "", perrors.Wrap(err, "save config") + } + + return c.config.DirectClusterEndpointToken, nil +} + +func (c *client) Save() error { + if c.configPath == "" { + return nil + } + if c.config == nil { + return perrors.New("no config to write") + } + if c.config.TypeMeta.Kind == "" { + c.config.TypeMeta.Kind = "Config" + } + if c.config.TypeMeta.APIVersion == "" { + c.config.TypeMeta.APIVersion = "storage.loft.sh/v1" + } + + err := os.MkdirAll(filepath.Dir(c.configPath), 0755) + if err != nil { + return err + } + + out, err := json.Marshal(c.config) + if err != nil { + return err + } + + return os.WriteFile(c.configPath, out, 0660) +} + +func (c *client) ManagementConfig() (*rest.Config, error) { + return c.restConfig("/kubernetes/management") +} + +func (c *client) Management() (kube.Interface, error) { + restConfig, err := c.ManagementConfig() + if err != nil { + return nil, err + } + + return kube.NewForConfig(restConfig) +} + +func (c *client) SpaceInstanceConfig(project, name string) (*rest.Config, error) { + return c.restConfig("/kubernetes/project/" + project + "/space/" + name) +} + +func (c *client) SpaceInstance(project, name string) (kube.Interface, error) { + restConfig, err := c.SpaceInstanceConfig(project, name) + if err != nil { + return nil, err + } + + return kube.NewForConfig(restConfig) +} + +func (c *client) VirtualClusterInstanceConfig(project, name string) (*rest.Config, error) { + return c.restConfig("/kubernetes/project/" + project + "/virtualcluster/" + name) +} + +func (c *client) VirtualClusterInstance(project, name string) (kube.Interface, error) { + restConfig, err := c.VirtualClusterInstanceConfig(project, name) + if err != nil { + return nil, err + } + + return kube.NewForConfig(restConfig) +} + +func (c *client) ClusterConfig(cluster string) (*rest.Config, error) { + return c.restConfig("/kubernetes/cluster/" + cluster) +} + +func (c *client) Cluster(cluster string) (kube.Interface, error) { + restConfig, err := c.ClusterConfig(cluster) + if err != nil { + return nil, err + } + + return kube.NewForConfig(restConfig) +} + +func (c *client) VirtualClusterConfig(cluster, namespace, virtualCluster string) (*rest.Config, error) { + return c.restConfig("/kubernetes/virtualcluster/" + cluster + "/" + namespace + "/" + virtualCluster) +} + +func (c *client) VirtualCluster(cluster, namespace, virtualCluster string) (kube.Interface, error) { + restConfig, err := c.VirtualClusterConfig(cluster, namespace, virtualCluster) + if err != nil { + return nil, err + } + + return kube.NewForConfig(restConfig) +} + +func (c *client) Config() *Config { + return c.config +} + +type keyStruct struct { + Key string +} + +func verifyHost(host string) error { + if !strings.HasPrefix(host, "https") { + return fmt.Errorf("cannot log into a non https loft instance '%s', please make sure you have TLS enabled", host) + } + + return nil +} + +func (c *client) Version() (*auth.Version, error) { + restConfig, err := c.restConfig("") + if err != nil { + return nil, err + } + + restClient, err := kube.NewForConfig(restConfig) + if err != nil { + return nil, err + } + + raw, err := restClient.CoreV1().RESTClient().Get().RequestURI("/version").DoRaw(context.Background()) + if err != nil { + return nil, perrors.New(fmt.Sprintf("%s\n\nYou may need to login again via `%s login %s --insecure` to allow self-signed certificates\n", err.Error(), os.Args[0], restConfig.Host)) + } + + version := &auth.Version{} + err = json.Unmarshal(raw, version) + if err != nil { + return nil, perrors.Wrap(err, "parse version response") + } + + return version, nil +} + +func (c *client) Login(host string, insecure bool, log log.Logger) error { + var ( + loginUrl = fmt.Sprintf(LoginPath, host) + key keyStruct + keyChannel = make(chan keyStruct) + ) + + err := verifyHost(host) + if err != nil { + return err + } + + server := startServer(fmt.Sprintf(RedirectPath, host), keyChannel, log) + err = open.Run(fmt.Sprintf(LoginPath, host)) + if err != nil { + return fmt.Errorf("couldn't open the login page in a browser: %w. Please use the --access-key flag for the login command. You can generate an access key here: %s", err, fmt.Sprintf(AccessKeyPath, host)) + } else { + log.Infof("If the browser does not open automatically, please navigate to %s", loginUrl) + msg := "If you have problems logging in, please navigate to %s/profile/access-keys, click on 'Create Access Key' and then login via 'loft login %s --access-key ACCESS_KEY" + if insecure { + msg += " --insecure" + } + msg += "'" + log.Infof(msg, host, host) + log.Info("Logging into loft...") + + key = <-keyChannel + } + + go func() { + err = server.Shutdown(context.Background()) + if err != nil { + log.Debugf("Error shutting down server: %v", err) + } + }() + + close(keyChannel) + return c.LoginWithAccessKey(host, key.Key, insecure) +} + +func (c *client) LoginRaw(host, accessKey string, insecure bool) error { + if c.config.Host == host && c.config.AccessKey == accessKey { + return nil + } + + c.config.Host = host + c.config.Insecure = insecure + c.config.AccessKey = accessKey + c.config.DirectClusterEndpointToken = "" + c.config.DirectClusterEndpointTokenRequested = nil + return c.Save() +} + +func (c *client) LoginWithAccessKey(host, accessKey string, insecure bool) error { + err := verifyHost(host) + if err != nil { + return err + } + if c.config.Host == host && c.config.AccessKey == accessKey { + return nil + } + + // delete old access key if were logged in before + if c.config.AccessKey != "" { + managementClient, err := c.Management() + if err == nil { + self, err := managementClient.Loft().ManagementV1().Selves().Create(context.TODO(), &managementv1.Self{}, metav1.CreateOptions{}) + if err == nil && self.Status.AccessKey != "" && self.Status.AccessKeyType == storagev1.AccessKeyTypeLogin { + _ = managementClient.Loft().ManagementV1().OwnedAccessKeys().Delete(context.TODO(), self.Status.AccessKey, metav1.DeleteOptions{}) + } + } + } + + c.config.Host = host + c.config.Insecure = insecure + c.config.AccessKey = accessKey + c.config.DirectClusterEndpointToken = "" + c.config.DirectClusterEndpointTokenRequested = nil + + // verify version + err = VerifyVersion(c) + if err != nil { + return err + } + + // verify the connection works + managementClient, err := c.Management() + if err != nil { + return perrors.Wrap(err, "create management client") + } + + // try to get self + _, err = managementClient.Loft().ManagementV1().Selves().Create(context.TODO(), &managementv1.Self{}, metav1.CreateOptions{}) + if err != nil { + var urlError *url.Error + if errors.As(err, &urlError) { + var err x509.UnknownAuthorityError + if errors.As(urlError.Err, &err) { + return fmt.Errorf("unsafe login endpoint '%s', if you wish to login into an insecure loft endpoint run with the '--insecure' flag", c.config.Host) + } + } + + return perrors.Errorf("error logging in: %v", err) + } + + return c.Save() +} + +// VerifyVersion checks if the Loft version is compatible with this CLI version +func VerifyVersion(baseClient Client) error { + v, err := baseClient.Version() + if err != nil { + return err + } else if v.Version == "v0.0.0" { + return nil + } + + backendMajor, err := strconv.Atoi(v.Major) + if err != nil { + return perrors.Wrap(err, "parse major version string") + } + + cliVersionStr := upgrade.GetVersion() + if cliVersionStr == "" { + return nil + } + + cliVersion, err := semver.Parse(cliVersionStr) + if err != nil { + return err + } + + if int(cliVersion.Major) > backendMajor { + return fmt.Errorf("unsupported Loft version %[1]s. Please downgrade your CLI to below v%[2]d.0.0 to support this version, as Loft v%[2]d.0.0 and newer versions are incompatible with v%[3]d.x.x", v.Version, cliVersion.Major, backendMajor) + } else if int(cliVersion.Major) < backendMajor { + return fmt.Errorf("unsupported Loft version %[1]s. Please upgrade your CLI to v%[2]d.0.0 or above to support this version, as Loft v%[2]d.0.0 and newer versions are incompatible with v%[3]d.x.x", v.Version, backendMajor, cliVersion.Major) + } + + return nil +} + +func (c *client) restConfig(hostSuffix string) (*rest.Config, error) { + if c.config == nil { + return nil, perrors.New("no config loaded") + } else if c.config.Host == "" || c.config.AccessKey == "" { + return nil, perrors.New(product.Replace("not logged in, please make sure you have run 'loft login [loft-url]'")) + } + + // build a rest config + config, err := GetRestConfig(c.config.Host+hostSuffix, c.config.AccessKey, c.config.Insecure) + if err != nil { + return nil, err + } + + return config, err +} + +func GetKubeConfig(host, token, namespace string, insecure bool) clientcmd.ClientConfig { + contextName := "local" + kubeConfig := clientcmdapi.NewConfig() + kubeConfig.Contexts = map[string]*clientcmdapi.Context{ + contextName: { + Cluster: contextName, + AuthInfo: contextName, + Namespace: namespace, + }, + } + kubeConfig.Clusters = map[string]*clientcmdapi.Cluster{ + contextName: { + Server: host, + InsecureSkipTLSVerify: insecure, + }, + } + kubeConfig.AuthInfos = map[string]*clientcmdapi.AuthInfo{ + contextName: { + Token: token, + }, + } + kubeConfig.CurrentContext = contextName + return clientcmd.NewDefaultClientConfig(*kubeConfig, &clientcmd.ConfigOverrides{}) +} + +func GetRestConfig(host, token string, insecure bool) (*rest.Config, error) { + config, err := GetKubeConfig(host, token, "", insecure).ClientConfig() + if err != nil { + return nil, err + } + config.UserAgent = constants.LoftctlUserAgentPrefix + upgrade.GetVersion() + + return config, nil +} + +func startServer(redirectURI string, keyChannel chan keyStruct, log log.Logger) *http.Server { + srv := &http.Server{Addr: ":25843"} + + http.HandleFunc("/login", func(w http.ResponseWriter, r *http.Request) { + keys, ok := r.URL.Query()["key"] + if !ok || len(keys[0]) == 0 { + log.Warn("Login: the key used to login is not valid") + return + } + + keyChannel <- keyStruct{ + Key: keys[0], + } + http.Redirect(w, r, redirectURI, http.StatusSeeOther) + }) + + go func() { + // cannot panic, because this probably is an intentional close + _ = srv.ListenAndServe() + }() + + // returning reference so caller can call Shutdown() + return srv +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/client/config.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/client/config.go new file mode 100644 index 000000000..786e5f7ac --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/client/config.go @@ -0,0 +1,59 @@ +package client + +import ( + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// Config defines the client config structure +type Config struct { + metav1.TypeMeta `json:",inline"` + + // host is the http endpoint of how to access loft + // +optional + Host string `json:"host,omitempty"` + + // LastInstallContext is the last install context + // +optional + LastInstallContext string `json:"lastInstallContext,omitempty"` + + // insecure specifies if the loft instance is insecure + // +optional + Insecure bool `json:"insecure,omitempty"` + + // access key is the access key for the given loft host + // +optional + AccessKey string `json:"accesskey,omitempty"` + + // DEPRECATED: do not use anymore + // the direct cluster endpoint token + // +optional + DirectClusterEndpointToken string `json:"directClusterEndpointToken,omitempty"` + + // DEPRECATED: do not use anymore + // last time the direct cluster endpoint token was requested + // +optional + DirectClusterEndpointTokenRequested *metav1.Time `json:"directClusterEndpointTokenRequested,omitempty"` + + // map of cached certificates for "access point" mode virtual clusters + // +optional + VirtualClusterAccessPointCertificates map[string]VirtualClusterCertificatesEntry +} + +type VirtualClusterCertificatesEntry struct { + CertificateData string + KeyData string + LastRequested metav1.Time + ExpirationTime time.Time +} + +// NewConfig creates a new config +func NewConfig() *Config { + return &Config{ + TypeMeta: metav1.TypeMeta{ + Kind: "Config", + APIVersion: "storage.loft.sh/v1", + }, + } +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/client/helper/helper.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/client/helper/helper.go new file mode 100644 index 000000000..fb53ebfe8 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/client/helper/helper.go @@ -0,0 +1,1128 @@ +package helper + +import ( + "context" + "errors" + "fmt" + "os" + "sort" + "strings" + + "github.com/loft-sh/loftctl/v3/pkg/client/naming" + authorizationv1 "k8s.io/api/authorization/v1" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/kubeconfig" + "github.com/loft-sh/log" + "github.com/loft-sh/log/survey" + "github.com/mgutz/ansi" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/kubectl/pkg/util/term" +) + +var errNoClusterAccess = errors.New("the user has no access to any cluster") + +type VirtualClusterInstanceProject struct { + VirtualCluster *managementv1.VirtualClusterInstance + Project *managementv1.Project +} + +type SpaceInstanceProject struct { + Space *managementv1.SpaceInstance + Project *managementv1.Project +} + +func SelectVirtualClusterTemplate(baseClient client.Client, projectName, templateName string, log log.Logger) (*managementv1.VirtualClusterTemplate, error) { + managementClient, err := baseClient.Management() + if err != nil { + return nil, err + } + + projectTemplates, err := managementClient.Loft().ManagementV1().Projects().ListTemplates(context.TODO(), projectName, metav1.GetOptions{}) + if err != nil { + return nil, err + } + + // select default template + if templateName == "" && projectTemplates.DefaultVirtualClusterTemplate != "" { + templateName = projectTemplates.DefaultVirtualClusterTemplate + } + + // try to find template + if templateName != "" { + for _, virtualClusterTemplate := range projectTemplates.VirtualClusterTemplates { + if virtualClusterTemplate.Name == templateName { + return &virtualClusterTemplate, nil + } + } + + return nil, fmt.Errorf("couldn't find template %s as allowed template in project %s", templateName, projectName) + } else if len(projectTemplates.VirtualClusterTemplates) == 0 { + return nil, fmt.Errorf("there are no allowed virtual cluster templates in project %s", projectName) + } else if len(projectTemplates.VirtualClusterTemplates) == 1 { + return &projectTemplates.VirtualClusterTemplates[0], nil + } + + templateNames := []string{} + for _, template := range projectTemplates.VirtualClusterTemplates { + templateNames = append(templateNames, clihelper.GetDisplayName(template.Name, template.Spec.DisplayName)) + } + answer, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a template to use", + DefaultValue: templateNames[0], + Options: templateNames, + }) + if err != nil { + return nil, err + } + for _, template := range projectTemplates.VirtualClusterTemplates { + if answer == clihelper.GetDisplayName(template.Name, template.Spec.DisplayName) { + return &template, nil + } + } + + return nil, fmt.Errorf("answer not found") +} + +func SelectSpaceTemplate(baseClient client.Client, projectName, templateName string, log log.Logger) (*managementv1.SpaceTemplate, error) { + managementClient, err := baseClient.Management() + if err != nil { + return nil, err + } + + projectTemplates, err := managementClient.Loft().ManagementV1().Projects().ListTemplates(context.TODO(), projectName, metav1.GetOptions{}) + if err != nil { + return nil, err + } + + // select default template + if templateName == "" && projectTemplates.DefaultSpaceTemplate != "" { + templateName = projectTemplates.DefaultSpaceTemplate + } + + // try to find template + if templateName != "" { + for _, spaceTemplate := range projectTemplates.SpaceTemplates { + if spaceTemplate.Name == templateName { + return &spaceTemplate, nil + } + } + + return nil, fmt.Errorf("couldn't find template %s as allowed template in project %s", templateName, projectName) + } else if len(projectTemplates.SpaceTemplates) == 0 { + return nil, fmt.Errorf("there are no allowed space templates in project %s", projectName) + } else if len(projectTemplates.SpaceTemplates) == 1 { + return &projectTemplates.SpaceTemplates[0], nil + } + + templateNames := []string{} + for _, template := range projectTemplates.SpaceTemplates { + templateNames = append(templateNames, clihelper.GetDisplayName(template.Name, template.Spec.DisplayName)) + } + answer, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a template to use", + DefaultValue: templateNames[0], + Options: templateNames, + }) + if err != nil { + return nil, err + } + for _, template := range projectTemplates.SpaceTemplates { + if answer == clihelper.GetDisplayName(template.Name, template.Spec.DisplayName) { + return &template, nil + } + } + + return nil, fmt.Errorf("answer not found") +} + +func SelectVirtualClusterInstanceOrVirtualCluster(baseClient client.Client, virtualClusterName, spaceName, projectName, clusterName string, log log.Logger) (string, string, string, string, error) { + if clusterName != "" || spaceName != "" { + virtualCluster, space, cluster, err := SelectVirtualClusterAndSpaceAndClusterName(baseClient, virtualClusterName, spaceName, clusterName, log) + return cluster, "", space, virtualCluster, err + } + + managementClient, err := baseClient.Management() + if err != nil { + return "", "", "", "", err + } + + // gather projects and virtual cluster instances to access + projects := []*managementv1.Project{} + if projectName != "" { + project, err := managementClient.Loft().ManagementV1().Projects().Get(context.TODO(), projectName, metav1.GetOptions{}) + if err != nil { + if kerrors.IsNotFound(err) { + return "", "", "", "", fmt.Errorf("couldn't find or access project %s", projectName) + } + + return "", "", "", "", err + } + + projects = append(projects, project) + } else { + projectsList, err := managementClient.Loft().ManagementV1().Projects().List(context.TODO(), metav1.ListOptions{}) + if err != nil || len(projectsList.Items) == 0 { + virtualCluster, space, cluster, err := SelectVirtualClusterAndSpaceAndClusterName(baseClient, virtualClusterName, spaceName, clusterName, log) + return cluster, "", space, virtualCluster, err + } + + for _, p := range projectsList.Items { + proj := p + projects = append(projects, &proj) + } + } + + // gather space instances in those projects + virtualClusters := []VirtualClusterInstanceProject{} + for _, p := range projects { + if virtualClusterName != "" { + virtualClusterInstance, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(naming.ProjectNamespace(p.Name)).Get(context.TODO(), virtualClusterName, metav1.GetOptions{}) + if err != nil { + continue + } + + virtualClusters = append(virtualClusters, VirtualClusterInstanceProject{ + VirtualCluster: virtualClusterInstance, + Project: p, + }) + } else { + virtualClusterInstanceList, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(naming.ProjectNamespace(p.Name)).List(context.TODO(), metav1.ListOptions{}) + if err != nil { + continue + } + + for _, virtualClusterInstance := range virtualClusterInstanceList.Items { + s := virtualClusterInstance + virtualClusters = append(virtualClusters, VirtualClusterInstanceProject{ + VirtualCluster: &s, + Project: p, + }) + } + } + } + + // filter out virtualclusters we cannot access + newVirtualClusters := []VirtualClusterInstanceProject{} + optionsUnformatted := [][]string{} + for _, virtualCluster := range virtualClusters { + canAccess, err := CanAccessVirtualClusterInstance(managementClient, virtualCluster.VirtualCluster.Namespace, virtualCluster.VirtualCluster.Name) + if err != nil { + return "", "", "", "", err + } else if !canAccess { + continue + } + + optionsUnformatted = append(optionsUnformatted, []string{"vcluster: " + clihelper.GetDisplayName(virtualCluster.VirtualCluster.Name, virtualCluster.VirtualCluster.Spec.DisplayName), "Project: " + clihelper.GetDisplayName(virtualCluster.Project.Name, virtualCluster.Project.Spec.DisplayName)}) + newVirtualClusters = append(newVirtualClusters, virtualCluster) + } + virtualClusters = newVirtualClusters + + // check if there are virtualclusters + if len(virtualClusters) == 0 { + if virtualClusterName != "" { + return "", "", "", "", fmt.Errorf("couldn't find or access virtual cluster %s", virtualClusterName) + } + return "", "", "", "", fmt.Errorf("couldn't find a virtual cluster you have access to") + } else if len(virtualClusters) == 1 { + return "", virtualClusters[0].Project.Name, "", virtualClusters[0].VirtualCluster.Name, nil + } + + questionOptions := formatOptions("%s | %s", optionsUnformatted) + selectedOption, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a virtual cluster", + DefaultValue: questionOptions[0], + Options: questionOptions, + }) + if err != nil { + return "", "", "", "", err + } + + for idx, s := range questionOptions { + if s == selectedOption { + return "", virtualClusters[idx].Project.Name, "", virtualClusters[idx].VirtualCluster.Name, nil + } + } + + return "", "", "", "", fmt.Errorf("couldn't find answer") +} + +func SelectSpaceInstanceOrSpace(baseClient client.Client, spaceName, projectName, clusterName string, log log.Logger) (string, string, string, error) { + if clusterName != "" { + space, cluster, err := SelectSpaceAndClusterName(baseClient, spaceName, clusterName, log) + return cluster, "", space, err + } + + managementClient, err := baseClient.Management() + if err != nil { + return "", "", "", err + } + + // gather projects and space instances to access + projects := []*managementv1.Project{} + if projectName != "" { + project, err := managementClient.Loft().ManagementV1().Projects().Get(context.TODO(), projectName, metav1.GetOptions{}) + if err != nil { + if kerrors.IsNotFound(err) { + return "", "", "", fmt.Errorf("couldn't find or access project %s", projectName) + } + + return "", "", "", err + } + + projects = append(projects, project) + } else { + projectsList, err := managementClient.Loft().ManagementV1().Projects().List(context.TODO(), metav1.ListOptions{}) + if err != nil || len(projectsList.Items) == 0 { + space, cluster, err := SelectSpaceAndClusterName(baseClient, spaceName, clusterName, log) + return cluster, "", space, err + } + + for _, p := range projectsList.Items { + proj := p + projects = append(projects, &proj) + } + } + + // gather space instances in those projects + spaces := []SpaceInstanceProject{} + for _, p := range projects { + if spaceName != "" { + spaceInstance, err := managementClient.Loft().ManagementV1().SpaceInstances(naming.ProjectNamespace(p.Name)).Get(context.TODO(), spaceName, metav1.GetOptions{}) + if err != nil { + continue + } + + spaces = append(spaces, SpaceInstanceProject{ + Space: spaceInstance, + Project: p, + }) + } else { + spaceInstanceList, err := managementClient.Loft().ManagementV1().SpaceInstances(naming.ProjectNamespace(p.Name)).List(context.TODO(), metav1.ListOptions{}) + if err != nil { + continue + } + + for _, spaceInstance := range spaceInstanceList.Items { + s := spaceInstance + spaces = append(spaces, SpaceInstanceProject{ + Space: &s, + Project: p, + }) + } + } + } + + // filter out spaces we cannot access + newSpaces := []SpaceInstanceProject{} + optionsUnformatted := [][]string{} + for _, space := range spaces { + canAccess, err := CanAccessSpaceInstance(managementClient, space.Space.Namespace, space.Space.Name) + if err != nil { + return "", "", "", err + } else if !canAccess { + continue + } + + optionsUnformatted = append(optionsUnformatted, []string{"Space: " + clihelper.GetDisplayName(space.Space.Name, space.Space.Spec.DisplayName), "Project: " + clihelper.GetDisplayName(space.Project.Name, space.Project.Spec.DisplayName)}) + newSpaces = append(newSpaces, space) + } + spaces = newSpaces + + // check if there are spaces + if len(spaces) == 0 { + if spaceName != "" { + return "", "", "", fmt.Errorf("couldn't find or access space %s", spaceName) + } + return "", "", "", fmt.Errorf("couldn't find a space you have access to") + } else if len(spaces) == 1 { + return spaces[0].Space.Spec.ClusterRef.Cluster, spaces[0].Project.Name, spaces[0].Space.Name, nil + } + + questionOptions := formatOptions("%s | %s", optionsUnformatted) + selectedOption, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a space", + DefaultValue: questionOptions[0], + Options: questionOptions, + }) + if err != nil { + return "", "", "", err + } + + for idx, s := range questionOptions { + if s == selectedOption { + return spaces[idx].Space.Spec.ClusterRef.Cluster, spaces[idx].Project.Name, spaces[idx].Space.Name, nil + } + } + + return "", "", "", fmt.Errorf("couldn't find answer") +} + +func SelectProjectOrCluster(baseClient client.Client, clusterName, projectName string, log log.Logger) (cluster string, project string, err error) { + if projectName != "" { + return clusterName, projectName, nil + } else if clusterName != "" { + return clusterName, "", nil + } + + managementClient, err := baseClient.Management() + if err != nil { + return "", "", err + } + + projectList, err := managementClient.Loft().ManagementV1().Projects().List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return "", "", err + } + + projectNames := []string{} + for _, project := range projectList.Items { + projectNames = append(projectNames, clihelper.GetDisplayName(project.Name, project.Spec.DisplayName)) + } + + if len(projectNames) == 0 { + cluster, err := SelectCluster(baseClient, log) + if err != nil { + if errors.Is(err, errNoClusterAccess) { + return "", "", fmt.Errorf("the user has no access to a project") + } + + return "", "", err + } + + return cluster, "", nil + } + + var selectedProject *managementv1.Project + if len(projectNames) == 1 { + selectedProject = &projectList.Items[0] + } else { + answer, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a project to use", + DefaultValue: projectNames[0], + Options: projectNames, + }) + if err != nil { + return "", "", err + } + for idx, project := range projectList.Items { + if answer == clihelper.GetDisplayName(project.Name, project.Spec.DisplayName) { + selectedProject = &projectList.Items[idx] + } + } + if selectedProject == nil { + return "", "", fmt.Errorf("answer not found") + } + } + + if clusterName == "" { + clusterName, err = SelectProjectCluster(baseClient, selectedProject, log) + return clusterName, selectedProject.Name, err + } + + return clusterName, selectedProject.Name, nil +} + +// SelectCluster lets the user select a cluster +func SelectCluster(baseClient client.Client, log log.Logger) (string, error) { + managementClient, err := baseClient.Management() + if err != nil { + return "", err + } + + clusterList, err := managementClient.Loft().ManagementV1().Clusters().List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return "", err + } + + clusterNames := []string{} + for _, cluster := range clusterList.Items { + clusterNames = append(clusterNames, clihelper.GetDisplayName(cluster.Name, cluster.Spec.DisplayName)) + } + + if len(clusterNames) == 0 { + return "", errNoClusterAccess + } else if len(clusterNames) == 1 { + return clusterList.Items[0].Name, nil + } + + answer, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a cluster to use", + DefaultValue: clusterNames[0], + Options: clusterNames, + }) + if err != nil { + return "", err + } + for _, cluster := range clusterList.Items { + if answer == clihelper.GetDisplayName(cluster.Name, cluster.Spec.DisplayName) { + return cluster.Name, nil + } + } + return "", fmt.Errorf("answer not found") +} + +// SelectProjectCluster lets the user select a cluster from the project's allowed clusters +func SelectProjectCluster(baseClient client.Client, project *managementv1.Project, log log.Logger) (string, error) { + if !term.IsTerminal(os.Stdin) { + // Allow loft to schedule as before + return "", nil + } + + managementClient, err := baseClient.Management() + if err != nil { + return "", err + } + + clusterList, err := managementClient.Loft().ManagementV1().Projects().ListClusters(context.TODO(), project.Name, metav1.GetOptions{}) + if err != nil { + return "", err + } + + anyClusterOption := "Any Cluster [Loft Selects Cluster]" + + clusterNames := []string{} + for _, allowedCluster := range project.Spec.AllowedClusters { + if allowedCluster.Name == "*" { + clusterNames = append(clusterNames, anyClusterOption) + break + } + } + + for _, cluster := range clusterList.Clusters { + clusterNames = append(clusterNames, clihelper.GetDisplayName(cluster.Name, cluster.Spec.DisplayName)) + } + + if len(clusterNames) == 0 { + return "", errNoClusterAccess + } else if len(clusterNames) == 1 { + return clusterList.Clusters[0].Name, nil + } + + answer, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a cluster to use", + DefaultValue: clusterNames[0], + Options: clusterNames, + }) + if err != nil { + return "", err + } + + if answer == anyClusterOption { + return "", nil + } + + for _, cluster := range clusterList.Clusters { + if answer == clihelper.GetDisplayName(cluster.Name, cluster.Spec.DisplayName) { + return cluster.Name, nil + } + } + return "", fmt.Errorf("answer not found") +} + +// SelectUserOrTeam lets the user select an user or team in a cluster +func SelectUserOrTeam(baseClient client.Client, clusterName string, log log.Logger) (*clusterv1.EntityInfo, *clusterv1.EntityInfo, error) { + managementClient, err := baseClient.Management() + if err != nil { + return nil, nil, err + } + + clusterAccess, err := managementClient.Loft().ManagementV1().Clusters().ListAccess(context.TODO(), clusterName, metav1.GetOptions{}) + if err != nil { + return nil, nil, err + } + + var user *clusterv1.EntityInfo + if len(clusterAccess.Users) > 0 { + user = &clusterAccess.Users[0].Info + } + + teams := []*clusterv1.EntityInfo{} + for _, team := range clusterAccess.Teams { + t := team + teams = append(teams, &t.Info) + } + + if user == nil && len(teams) == 0 { + return nil, nil, fmt.Errorf("the user has no access to cluster %s", clusterName) + } else if user != nil && len(teams) == 0 { + return user, nil, nil + } else if user == nil && len(teams) == 1 { + return nil, teams[0], nil + } + + names := []string{} + if user != nil { + names = append(names, "User "+clihelper.DisplayName(user)) + } + for _, t := range teams { + names = append(names, "Team "+clihelper.DisplayName(t)) + } + + answer, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a user or team to use", + DefaultValue: names[0], + Options: names, + }) + if err != nil { + return nil, nil, err + } + + if user != nil && "User "+clihelper.DisplayName(user) == answer { + return user, nil, nil + } + for _, t := range teams { + if "Team "+clihelper.DisplayName(t) == answer { + return nil, t, nil + } + } + + return nil, nil, fmt.Errorf("answer not found") +} + +type ClusterUserOrTeam struct { + Team bool + ClusterMember managementv1.ClusterMember +} + +func SelectClusterUserOrTeam(baseClient client.Client, clusterName, userName, teamName string, log log.Logger) (*ClusterUserOrTeam, error) { + if userName != "" && teamName != "" { + return nil, fmt.Errorf("team and user specified, please only choose one") + } + + managementClient, err := baseClient.Management() + if err != nil { + return nil, err + } + + members, err := managementClient.Loft().ManagementV1().Clusters().ListMembers(context.TODO(), clusterName, metav1.GetOptions{}) + if err != nil { + return nil, fmt.Errorf("retrieve cluster members: %w", err) + } + + matchedMembers := []ClusterUserOrTeam{} + optionsUnformatted := [][]string{} + for _, user := range members.Users { + if teamName != "" { + continue + } else if userName != "" && user.Info.Name != userName { + continue + } + + matchedMembers = append(matchedMembers, ClusterUserOrTeam{ + ClusterMember: user, + }) + displayName := user.Info.DisplayName + if displayName == "" { + displayName = user.Info.Name + } + + optionsUnformatted = append(optionsUnformatted, []string{"User: " + displayName, "Kube User: " + user.Info.Name}) + } + for _, team := range members.Teams { + if userName != "" { + continue + } else if teamName != "" && team.Info.Name != teamName { + continue + } + + matchedMembers = append(matchedMembers, ClusterUserOrTeam{ + Team: true, + ClusterMember: team, + }) + displayName := team.Info.DisplayName + if displayName == "" { + displayName = team.Info.Name + } + + optionsUnformatted = append(optionsUnformatted, []string{"Team: " + displayName, "Kube Team: " + team.Info.Name}) + } + + questionOptions := formatOptions("%s | %s", optionsUnformatted) + if len(questionOptions) == 0 { + if userName == "" && teamName == "" { + return nil, fmt.Errorf("couldn't find any space") + } else if userName != "" { + return nil, fmt.Errorf("couldn't find user %s in cluster %s", ansi.Color(userName, "white+b"), ansi.Color(clusterName, "white+b")) + } + + return nil, fmt.Errorf("couldn't find team %s in cluster %s", ansi.Color(teamName, "white+b"), ansi.Color(clusterName, "white+b")) + } else if len(questionOptions) == 1 { + return &matchedMembers[0], nil + } + + selectedMember, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a user or team", + DefaultValue: questionOptions[0], + Options: questionOptions, + }) + if err != nil { + return nil, err + } + + for idx, s := range questionOptions { + if s == selectedMember { + return &matchedMembers[idx], nil + } + } + + return nil, fmt.Errorf("selected question option not found") +} + +type ProjectVirtualCluster struct { + VirtualClusterInstance managementv1.VirtualClusterInstance + Project string +} + +func GetVirtualClusterInstances(baseClient client.Client) ([]ProjectVirtualCluster, error) { + managementClient, err := baseClient.Management() + if err != nil { + return nil, err + } + + projectList, err := managementClient.Loft().ManagementV1().Projects().List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retVClusters := []ProjectVirtualCluster{} + for _, project := range projectList.Items { + virtualClusterInstances, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(naming.ProjectNamespace(project.Name)).List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return nil, err + } + + for _, virtualClusterInstance := range virtualClusterInstances.Items { + canAccess, err := CanAccessVirtualClusterInstance(managementClient, virtualClusterInstance.Namespace, virtualClusterInstance.Name) + if err != nil { + return nil, err + } else if !canAccess { + continue + } + + retVClusters = append(retVClusters, ProjectVirtualCluster{ + VirtualClusterInstance: virtualClusterInstance, + Project: project.Name, + }) + } + } + + return retVClusters, nil +} + +type ProjectSpace struct { + SpaceInstance managementv1.SpaceInstance + Project string +} + +func CanAccessVirtualClusterInstance(managementClient kube.Interface, namespace, name string) (bool, error) { + return canAccessInstance(managementClient, namespace, name, "virtualclusterinstances") +} + +func CanAccessSpaceInstance(managementClient kube.Interface, namespace, name string) (bool, error) { + return canAccessInstance(managementClient, namespace, name, "spaceinstances") +} + +func CanAccessProjectSecret(managementClient kube.Interface, namespace, name string) (bool, error) { + return canAccessInstance(managementClient, namespace, name, "projectsecrets") +} + +func canAccessInstance(managementClient kube.Interface, namespace, name string, resource string) (bool, error) { + selfSubjectAccessReview, err := managementClient.Loft().ManagementV1().SelfSubjectAccessReviews().Create(context.TODO(), &managementv1.SelfSubjectAccessReview{ + Spec: managementv1.SelfSubjectAccessReviewSpec{ + SelfSubjectAccessReviewSpec: authorizationv1.SelfSubjectAccessReviewSpec{ + ResourceAttributes: &authorizationv1.ResourceAttributes{ + Verb: "use", + Group: managementv1.SchemeGroupVersion.Group, + Version: managementv1.SchemeGroupVersion.Version, + Resource: resource, + Namespace: namespace, + Name: name, + }, + }, + }, + }, metav1.CreateOptions{}) + if err != nil { + return false, err + } else if !selfSubjectAccessReview.Status.Allowed || selfSubjectAccessReview.Status.Denied { + return false, nil + } + return true, nil +} + +func GetSpaceInstances(baseClient client.Client) ([]ProjectSpace, error) { + managementClient, err := baseClient.Management() + if err != nil { + return nil, err + } + + projectList, err := managementClient.Loft().ManagementV1().Projects().List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return nil, err + } + + retSpaces := []ProjectSpace{} + for _, project := range projectList.Items { + spaceInstances, err := managementClient.Loft().ManagementV1().SpaceInstances(naming.ProjectNamespace(project.Name)).List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return nil, err + } + + for _, spaceInstance := range spaceInstances.Items { + canAccess, err := CanAccessSpaceInstance(managementClient, spaceInstance.Namespace, spaceInstance.Name) + if err != nil { + return nil, err + } else if !canAccess { + continue + } + + retSpaces = append(retSpaces, ProjectSpace{ + SpaceInstance: spaceInstance, + Project: project.Name, + }) + } + } + + return retSpaces, nil +} + +type ProjectProjectSecret struct { + ProjectSecret managementv1.ProjectSecret + Project string +} + +func GetProjectSecrets(ctx context.Context, managementClient kube.Interface, projectNames ...string) ([]*ProjectProjectSecret, error) { + var projects []*managementv1.Project + if len(projectNames) == 0 { + projectList, err := managementClient.Loft().ManagementV1().Projects().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + for idx := range projectList.Items { + projectItem := projectList.Items[idx] + projects = append(projects, &projectItem) + } + } else { + for _, projectName := range projectNames { + project, err := managementClient.Loft().ManagementV1().Projects().Get(ctx, projectName, metav1.GetOptions{}) + if err != nil { + return nil, err + } + + projects = append(projects, project) + } + } + + var retSecrets []*ProjectProjectSecret + for _, project := range projects { + projectSecrets, err := managementClient.Loft().ManagementV1().ProjectSecrets(naming.ProjectNamespace(project.Name)).List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + + for _, projectSecret := range projectSecrets.Items { + canAccess, err := CanAccessProjectSecret(managementClient, projectSecret.Namespace, projectSecret.Name) + if err != nil { + return nil, err + } else if !canAccess { + continue + } + + retSecrets = append(retSecrets, &ProjectProjectSecret{ + ProjectSecret: projectSecret, + Project: project.Name, + }) + } + } + + return retSecrets, nil +} + +type ClusterSpace struct { + clusterv1.Space + Cluster string +} + +// GetSpaces returns all spaces accessible by the user or team +func GetSpaces(baseClient client.Client, log log.Logger) ([]ClusterSpace, error) { + managementClient, err := baseClient.Management() + if err != nil { + return nil, err + } + + clusterList, err := managementClient.Loft().ManagementV1().Clusters().List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return nil, err + } + + spaceList := []ClusterSpace{} + for _, cluster := range clusterList.Items { + clusterClient, err := baseClient.Cluster(cluster.Name) + if err != nil { + return nil, err + } + + spaces, err := clusterClient.Agent().ClusterV1().Spaces().List(context.TODO(), metav1.ListOptions{}) + if err != nil { + if kerrors.IsForbidden(err) { + continue + } + + log.Warnf("Error retrieving spaces from cluster %s: %v", clihelper.GetDisplayName(cluster.Name, cluster.Spec.DisplayName), err) + continue + } + + for _, space := range spaces.Items { + spaceList = append(spaceList, ClusterSpace{ + Space: space, + Cluster: cluster.Name, + }) + } + } + sort.Slice(spaceList, func(i, j int) bool { + return spaceList[i].Name < spaceList[j].Name + }) + + return spaceList, nil +} + +type ClusterVirtualCluster struct { + clusterv1.VirtualCluster + Cluster string +} + +// GetVirtualClusters returns all virtual clusters the user has access to +func GetVirtualClusters(baseClient client.Client, log log.Logger) ([]ClusterVirtualCluster, error) { + managementClient, err := baseClient.Management() + if err != nil { + return nil, err + } + + clusterList, err := managementClient.Loft().ManagementV1().Clusters().List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return nil, err + } + + virtualClusterList := []ClusterVirtualCluster{} + for _, cluster := range clusterList.Items { + clusterClient, err := baseClient.Cluster(cluster.Name) + if err != nil { + return nil, err + } + + virtualClusters, err := clusterClient.Agent().ClusterV1().VirtualClusters("").List(context.TODO(), metav1.ListOptions{}) + if err != nil { + if kerrors.IsForbidden(err) { + continue + } + + log.Warnf("Error retrieving virtual clusters from cluster %s: %v", clihelper.GetDisplayName(cluster.Name, cluster.Spec.DisplayName), err) + continue + } + + for _, virtualCluster := range virtualClusters.Items { + virtualClusterList = append(virtualClusterList, ClusterVirtualCluster{ + VirtualCluster: virtualCluster, + Cluster: cluster.Name, + }) + } + } + sort.Slice(virtualClusterList, func(i, j int) bool { + return virtualClusterList[i].Name < virtualClusterList[j].Name + }) + + return virtualClusterList, nil +} + +// SelectSpaceAndClusterName selects a space and cluster name +func SelectSpaceAndClusterName(baseClient client.Client, spaceName, clusterName string, log log.Logger) (string, string, error) { + spaces, err := GetSpaces(baseClient, log) + if err != nil { + return "", "", err + } + + currentContext, err := kubeconfig.CurrentContext() + if err != nil { + return "", "", fmt.Errorf("loading kubernetes config: %w", err) + } + + isLoftContext, cluster, namespace, vCluster := kubeconfig.ParseContext(currentContext) + matchedSpaces := []ClusterSpace{} + questionOptionsUnformatted := [][]string{} + defaultIndex := 0 + for _, space := range spaces { + if spaceName != "" && space.Space.Name != spaceName { + continue + } else if clusterName != "" && space.Cluster != clusterName { + continue + } else if len(matchedSpaces) > 20 { + break + } + + if isLoftContext && vCluster == "" && cluster == space.Cluster && namespace == space.Space.Name { + defaultIndex = len(questionOptionsUnformatted) + } + + matchedSpaces = append(matchedSpaces, space) + spaceName := space.Space.Name + if space.Space.Annotations != nil && space.Space.Annotations["loft.sh/display-name"] != "" { + spaceName = space.Space.Annotations["loft.sh/display-name"] + " (" + spaceName + ")" + } + + questionOptionsUnformatted = append(questionOptionsUnformatted, []string{spaceName, space.Cluster}) + } + + questionOptions := formatOptions("Space: %s | Cluster: %s", questionOptionsUnformatted) + if len(questionOptions) == 0 { + if spaceName == "" { + return "", "", fmt.Errorf("couldn't find any space") + } else if clusterName != "" { + return "", "", fmt.Errorf("couldn't find space %s in cluster %s", ansi.Color(spaceName, "white+b"), ansi.Color(clusterName, "white+b")) + } + + return "", "", fmt.Errorf("couldn't find space %s", ansi.Color(spaceName, "white+b")) + } else if len(questionOptions) == 1 { + return matchedSpaces[0].Space.Name, matchedSpaces[0].Cluster, nil + } + + selectedSpace, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a space", + DefaultValue: questionOptions[defaultIndex], + Options: questionOptions, + }) + if err != nil { + return "", "", err + } + + for idx, s := range questionOptions { + if s == selectedSpace { + clusterName = matchedSpaces[idx].Cluster + spaceName = matchedSpaces[idx].Space.Name + break + } + } + + return spaceName, clusterName, nil +} + +func GetCurrentUser(ctx context.Context, managementClient kube.Interface) (*managementv1.UserInfo, *clusterv1.EntityInfo, error) { + self, err := managementClient.Loft().ManagementV1().Selves().Create(ctx, &managementv1.Self{}, metav1.CreateOptions{}) + if err != nil { + return nil, nil, fmt.Errorf("get self: %w", err) + } else if self.Status.User == nil && self.Status.Team == nil { + return nil, nil, fmt.Errorf("no user or team name returned") + } + + return self.Status.User, self.Status.Team, nil +} + +func SelectVirtualClusterAndSpaceAndClusterName(baseClient client.Client, virtualClusterName, spaceName, clusterName string, log log.Logger) (string, string, string, error) { + virtualClusters, err := GetVirtualClusters(baseClient, log) + if err != nil { + return "", "", "", err + } + + currentContext, err := kubeconfig.CurrentContext() + if err != nil { + return "", "", "", fmt.Errorf("loading kubernetes config: %w", err) + } + + isLoftContext, cluster, namespace, vCluster := kubeconfig.ParseContext(currentContext) + matchedVClusters := []ClusterVirtualCluster{} + questionOptionsUnformatted := [][]string{} + defaultIndex := 0 + for _, virtualCluster := range virtualClusters { + if virtualClusterName != "" && virtualCluster.VirtualCluster.Name != virtualClusterName { + continue + } else if spaceName != "" && virtualCluster.VirtualCluster.Namespace != spaceName { + continue + } else if clusterName != "" && virtualCluster.Cluster != clusterName { + continue + } + + if isLoftContext && vCluster == virtualCluster.VirtualCluster.Name && cluster == virtualCluster.Cluster && namespace == virtualCluster.VirtualCluster.Namespace { + defaultIndex = len(questionOptionsUnformatted) + } + + matchedVClusters = append(matchedVClusters, virtualCluster) + vClusterName := virtualCluster.VirtualCluster.Name + if virtualCluster.VirtualCluster.Annotations != nil && virtualCluster.VirtualCluster.Annotations["loft.sh/display-name"] != "" { + vClusterName = virtualCluster.VirtualCluster.Annotations["loft.sh/display-name"] + " (" + vClusterName + ")" + } + + questionOptionsUnformatted = append(questionOptionsUnformatted, []string{vClusterName, virtualCluster.VirtualCluster.Namespace, virtualCluster.Cluster}) + } + + questionOptions := formatOptions("vCluster: %s | Space: %s | Cluster: %s", questionOptionsUnformatted) + if len(questionOptions) == 0 { + if virtualClusterName == "" { + return "", "", "", fmt.Errorf("couldn't find any virtual cluster") + } else if spaceName != "" { + return "", "", "", fmt.Errorf("couldn't find virtualcluster %s in space %s in cluster %s", ansi.Color(virtualClusterName, "white+b"), ansi.Color(spaceName, "white+b"), ansi.Color(clusterName, "white+b")) + } else if clusterName != "" { + return "", "", "", fmt.Errorf("couldn't find virtualcluster %s in space %s in cluster %s", ansi.Color(virtualClusterName, "white+b"), ansi.Color(spaceName, "white+b"), ansi.Color(clusterName, "white+b")) + } + + return "", "", "", fmt.Errorf("couldn't find virtual cluster %s", ansi.Color(virtualClusterName, "white+b")) + } else if len(questionOptions) == 1 { + return matchedVClusters[0].VirtualCluster.Name, matchedVClusters[0].VirtualCluster.Namespace, matchedVClusters[0].Cluster, nil + } + + selectedSpace, err := log.Question(&survey.QuestionOptions{ + Question: "Please choose a virtual cluster to use", + DefaultValue: questionOptions[defaultIndex], + Options: questionOptions, + }) + if err != nil { + return "", "", "", err + } + + for idx, s := range questionOptions { + if s == selectedSpace { + clusterName = matchedVClusters[idx].Cluster + virtualClusterName = matchedVClusters[idx].VirtualCluster.Name + spaceName = matchedVClusters[idx].VirtualCluster.Namespace + break + } + } + + return virtualClusterName, spaceName, clusterName, nil +} + +func formatOptions(format string, options [][]string) []string { + if len(options) == 0 { + return []string{} + } + + columnLengths := make([]int, len(options[0])) + for _, row := range options { + for i, column := range row { + if len(column) > columnLengths[i] { + columnLengths[i] = len(column) + } + } + } + + retOptions := []string{} + for _, row := range options { + columns := []interface{}{} + for i := range row { + value := row[i] + if columnLengths[i] > len(value) { + value = value + strings.Repeat(" ", columnLengths[i]-len(value)) + } + + columns = append(columns, value) + } + + retOptions = append(retOptions, fmt.Sprintf(format, columns...)) + } + + return retOptions +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/client/naming/naming.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/client/naming/naming.go new file mode 100644 index 000000000..e2952bfe2 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/client/naming/naming.go @@ -0,0 +1,24 @@ +package naming + +import ( + "crypto/sha256" + "encoding/hex" + "strings" +) + +func ProjectNamespace(projectName string) string { + return "loft-p-" + projectName +} + +func SafeConcatName(name ...string) string { + return SafeConcatNameMax(name, 63) +} + +func SafeConcatNameMax(name []string, max int) string { + fullPath := strings.Join(name, "-") + if len(fullPath) > max { + digest := sha256.Sum256([]byte(fullPath)) + return fullPath[0:max-8] + "-" + hex.EncodeToString(digest[0:])[0:7] + } + return fullPath +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/clihelper/clihelper.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/clihelper/clihelper.go new file mode 100644 index 000000000..4b9f335b8 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/clihelper/clihelper.go @@ -0,0 +1,746 @@ +package clihelper + +import ( + "context" + "crypto/sha256" + "crypto/tls" + "encoding/json" + "fmt" + "io" + "net" + "net/http" + "net/url" + "os" + "os/exec" + "path" + "sort" + "strconv" + "strings" + "time" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/sirupsen/logrus" + + jsonpatch "github.com/evanphx/json-patch" + loftclientset "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset" + "github.com/loft-sh/loftctl/v3/pkg/config" + "github.com/loft-sh/loftctl/v3/pkg/portforward" + "github.com/loft-sh/log" + "github.com/loft-sh/log/survey" + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/transport/spdy" + "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset" +) + +const defaultReleaseName = "loft" + +const LoftRouterDomainSecret = "loft-router-domain" + +var defaultDeploymentName = "loft" + +func GetDisplayName(name string, displayName string) string { + if displayName != "" { + return displayName + } + + return name +} + +func GetTableDisplayName(name string, displayName string) string { + if displayName != "" && displayName != name { + return displayName + " (" + name + ")" + } + + return name +} + +func DisplayName(entityInfo *clusterv1.EntityInfo) string { + if entityInfo == nil { + return "" + } else if entityInfo.DisplayName != "" { + return entityInfo.DisplayName + } else if entityInfo.Username != "" { + return entityInfo.Username + } + + return entityInfo.Name +} + +func GetLoftIngressHost(ctx context.Context, kubeClient kubernetes.Interface, namespace string) (string, error) { + ingress, err := kubeClient.NetworkingV1().Ingresses(namespace).Get(ctx, "loft-ingress", metav1.GetOptions{}) + if err != nil { + ingress, err := kubeClient.NetworkingV1beta1().Ingresses(namespace).Get(ctx, "loft-ingress", metav1.GetOptions{}) + if err != nil { + return "", err + } else { + // find host + for _, rule := range ingress.Spec.Rules { + return rule.Host, nil + } + } + } else { + // find host + for _, rule := range ingress.Spec.Rules { + return rule.Host, nil + } + } + + return "", fmt.Errorf("couldn't find any host in loft ingress '%s/loft-ingress', please make sure you have not changed any deployed resources", namespace) +} + +func WaitForReadyLoftPod(ctx context.Context, kubeClient kubernetes.Interface, namespace string, log log.Logger) (*corev1.Pod, error) { + // wait until we have a running loft pod + now := time.Now() + warningPrinted := false + pod := &corev1.Pod{} + err := wait.PollUntilContextTimeout(ctx, time.Second*2, config.Timeout(), true, func(ctx context.Context) (bool, error) { + pods, err := kubeClient.CoreV1().Pods(namespace).List(ctx, metav1.ListOptions{ + LabelSelector: "app=loft", + }) + if err != nil { + log.Warnf("Error trying to retrieve Loft pod: %v", err) + return false, nil + } else if len(pods.Items) == 0 { + return false, nil + } + + sort.Slice(pods.Items, func(i, j int) bool { + return pods.Items[i].CreationTimestamp.After(pods.Items[j].CreationTimestamp.Time) + }) + + loftPod := &pods.Items[0] + found := false + for _, containerStatus := range loftPod.Status.ContainerStatuses { + if containerStatus.State.Running != nil && containerStatus.Ready { + if containerStatus.Name == "manager" { + found = true + } + + continue + } else if containerStatus.State.Terminated != nil || (containerStatus.State.Waiting != nil && containerStatus.State.Waiting.Reason == "CrashLoopBackOff") { + out, err := kubeClient.CoreV1().Pods(namespace).GetLogs(loftPod.Name, &corev1.PodLogOptions{ + Container: "manager", + }).Do(context.Background()).Raw() + if err != nil { + return false, fmt.Errorf("there seems to be an issue with loft starting up. Please reach out to our support at https://loft.sh/") + } + if strings.Contains(string(out), "register instance: Post \"https://license.loft.sh/register\": dial tcp") { + return false, fmt.Errorf("loft logs: \n%v \nThere seems to be an issue with Loft starting up. Looks like you try to install Loft into an air-gapped environment, please reach out to our support at https://loft.sh/ for an offline license and take a look at the air-gapped installation guide https://loft.sh/docs/guides/administration/air-gapped-installation", string(out)) + } + + return false, fmt.Errorf("loft logs: \n%v \nThere seems to be an issue with loft starting up. Please reach out to our support at https://loft.sh/", string(out)) + } else if containerStatus.State.Waiting != nil && time.Now().After(now.Add(time.Minute*3)) && !warningPrinted { + log.Warnf("There might be an issue with Loft starting up. The container is still waiting, because of %s (%s). Please reach out to our support at https://loft.sh/", containerStatus.State.Waiting.Message, containerStatus.State.Waiting.Reason) + warningPrinted = true + } + + return false, nil + } + + pod = loftPod + return found, nil + }) + if err != nil { + return nil, err + } + + return pod, nil +} + +func StartPortForwarding(ctx context.Context, config *rest.Config, client kubernetes.Interface, pod *corev1.Pod, localPort string, log log.Logger) (chan struct{}, error) { + log.WriteString(logrus.InfoLevel, "\n") + log.Info("Starting port-forwarding to the Loft pod") + execRequest := client.CoreV1().RESTClient().Post(). + Resource("pods"). + Name(pod.Name). + Namespace(pod.Namespace). + SubResource("portforward") + + t, upgrader, err := spdy.RoundTripperFor(config) + if err != nil { + return nil, err + } + + dialer := spdy.NewDialer(upgrader, &http.Client{Transport: t}, "POST", execRequest.URL()) + errChan := make(chan error) + readyChan := make(chan struct{}) + stopChan := make(chan struct{}) + targetPort := getPortForwardingTargetPort(pod) + forwarder, err := portforward.New(dialer, []string{localPort + ":" + strconv.Itoa(targetPort)}, stopChan, readyChan, errChan, io.Discard, io.Discard) + if err != nil { + return nil, err + } + + go func() { + err := forwarder.ForwardPorts(ctx) + if err != nil { + errChan <- err + } + }() + + // wait till ready + select { + case err = <-errChan: + return nil, err + case <-readyChan: + case <-stopChan: + return nil, fmt.Errorf("stopped before ready") + } + + // start watcher + go func() { + for { + select { + case <-stopChan: + return + case err = <-errChan: + log.Infof("error during port forwarder: %v", err) + close(stopChan) + return + } + } + }() + + return stopChan, nil +} + +func GetLoftDefaultPassword(ctx context.Context, kubeClient kubernetes.Interface, namespace string) (string, error) { + loftNamespace, err := kubeClient.CoreV1().Namespaces().Get(ctx, namespace, metav1.GetOptions{}) + if err != nil { + if kerrors.IsNotFound(err) { + loftNamespace, err := kubeClient.CoreV1().Namespaces().Create(ctx, &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: namespace, + }, + }, metav1.CreateOptions{}) + if err != nil { + return "", err + } + + return string(loftNamespace.UID), nil + } + + return "", err + } + + return string(loftNamespace.UID), nil +} + +type version struct { + Version string `json:"version"` +} + +func IsLoftReachable(ctx context.Context, host string) (bool, error) { + // wait until loft is reachable at the given url + client := &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, + }, + }, + } + url := "https://" + host + "/version" + req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) + if err != nil { + return false, fmt.Errorf("error creating request with context: %w", err) + } + resp, err := client.Do(req) + if err == nil && resp.StatusCode == http.StatusOK { + out, err := io.ReadAll(resp.Body) + if err != nil { + return false, nil + } + + v := &version{} + err = json.Unmarshal(out, v) + if err != nil { + return false, fmt.Errorf("error decoding response from %s: %w. Try running 'loft start --reset'", url, err) + } else if v.Version == "" { + return false, fmt.Errorf("unexpected response from %s: %s. Try running 'loft start --reset'", url, string(out)) + } + + return true, nil + } + + return false, nil +} + +func IsLocalCluster(host string, log log.Logger) bool { + url, err := url.Parse(host) + if err != nil { + log.Warnf("Couldn't parse kube context host url: %v", err) + return false + } + + hostname := url.Hostname() + ip := net.ParseIP(hostname) + if ip != nil { + if IsPrivateIP(ip) { + return true + } + } + + if hostname == "localhost" || strings.HasSuffix(hostname, ".internal") || strings.HasSuffix(hostname, ".localhost") { + return true + } + + return false +} + +var privateIPBlocks []*net.IPNet + +func init() { + for _, cidr := range []string{ + "127.0.0.0/8", // IPv4 loopback + "10.0.0.0/8", // RFC1918 + "172.16.0.0/12", // RFC1918 + "192.168.0.0/16", // RFC1918 + "::1/128", // IPv6 loopback + "fe80::/10", // IPv6 link-local + "fc00::/7", // IPv6 unique local addr + } { + _, block, _ := net.ParseCIDR(cidr) + privateIPBlocks = append(privateIPBlocks, block) + } +} + +// IsPrivateIP checks if a given ip is private +func IsPrivateIP(ip net.IP) bool { + for _, block := range privateIPBlocks { + if block.Contains(ip) { + return true + } + } + + return false +} + +func EnterHostNameQuestion(log log.Logger) (string, error) { + return log.Question(&survey.QuestionOptions{ + Question: "Enter a hostname for your Loft instance (e.g. loft.my-domain.tld): \n ", + ValidationFunc: func(answer string) error { + u, err := url.Parse("https://" + answer) + if err != nil || u.Path != "" || u.Port() != "" || len(strings.Split(answer, ".")) < 2 { + return fmt.Errorf("please enter a valid hostname without protocol (https://), without path and without port, e.g. loft.my-domain.tld") + } + return nil + }, + }) +} + +func IsLoftAlreadyInstalled(ctx context.Context, kubeClient kubernetes.Interface, namespace string) (bool, error) { + _, err := kubeClient.AppsV1().Deployments(namespace).Get(ctx, defaultDeploymentName, metav1.GetOptions{}) + if err != nil { + if kerrors.IsNotFound(err) { + return false, nil + } + + return false, fmt.Errorf("error accessing kubernetes cluster: %w", err) + } + + return true, nil +} + +func UninstallLoft(ctx context.Context, kubeClient kubernetes.Interface, restConfig *rest.Config, kubeContext, namespace string, log log.Logger) error { + log.Infof(product.Replace("Uninstalling loft...")) + releaseName := defaultReleaseName + deploy, err := kubeClient.AppsV1().Deployments(namespace).Get(ctx, defaultDeploymentName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } else if deploy != nil && deploy.Labels != nil && deploy.Labels["release"] != "" { + releaseName = deploy.Labels["release"] + } + + args := []string{ + "uninstall", + releaseName, + "--kube-context", + kubeContext, + "--namespace", + namespace, + } + log.Infof("Executing command: helm %s", strings.Join(args, " ")) + output, err := exec.Command("helm", args...).CombinedOutput() + if err != nil { + log.Errorf("error during helm command: %s (%v)", string(output), err) + } + + // we also cleanup the validating webhook configuration and apiservice + apiRegistrationClient, err := clientset.NewForConfig(restConfig) + if err != nil { + return err + } + + err = apiRegistrationClient.ApiregistrationV1().APIServices().Delete(ctx, "v1.management.loft.sh", metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } + + err = deleteUser(ctx, restConfig, "admin") + if err != nil { + return err + } + + err = kubeClient.CoreV1().Secrets(namespace).Delete(context.Background(), "loft-user-secret-admin", metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } + + err = kubeClient.CoreV1().Secrets(namespace).Delete(context.Background(), LoftRouterDomainSecret, metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } + + // we also cleanup the validating webhook configuration and apiservice + err = kubeClient.AdmissionregistrationV1().ValidatingWebhookConfigurations().Delete(ctx, "loft-agent", metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } + + err = apiRegistrationClient.ApiregistrationV1().APIServices().Delete(ctx, "v1alpha1.tenancy.kiosk.sh", metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } + + err = apiRegistrationClient.ApiregistrationV1().APIServices().Delete(ctx, "v1.cluster.loft.sh", metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } + + err = kubeClient.CoreV1().ConfigMaps(namespace).Delete(ctx, "loft-agent-controller", metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } + + err = kubeClient.CoreV1().ConfigMaps(namespace).Delete(ctx, "loft-applied-defaults", metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } + + log.WriteString(logrus.InfoLevel, "\n") + log.Done(product.Replace("Successfully uninstalled Loft")) + log.WriteString(logrus.InfoLevel, "\n") + + return nil +} + +func deleteUser(ctx context.Context, restConfig *rest.Config, name string) error { + loftClient, err := loftclientset.NewForConfig(restConfig) + if err != nil { + return err + } + + user, err := loftClient.StorageV1().Users().Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return nil + } else if len(user.Finalizers) > 0 { + user.Finalizers = nil + _, err = loftClient.StorageV1().Users().Update(ctx, user, metav1.UpdateOptions{}) + if err != nil { + if kerrors.IsConflict(err) { + return deleteUser(ctx, restConfig, name) + } + + return err + } + } + + err = loftClient.StorageV1().Users().Delete(ctx, name, metav1.DeleteOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return err + } + + return nil +} + +func EnsureIngressController(ctx context.Context, kubeClient kubernetes.Interface, kubeContext string, log log.Logger) error { + // first create an ingress controller + const ( + YesOption = "Yes" + NoOption = "No, I already have an ingress controller installed." + ) + + answer, err := log.Question(&survey.QuestionOptions{ + Question: "Ingress controller required. Should the nginx-ingress controller be installed?", + DefaultValue: YesOption, + Options: []string{ + YesOption, + NoOption, + }, + }) + if err != nil { + return err + } + + if answer == YesOption { + args := []string{ + "install", + "ingress-nginx", + "ingress-nginx", + "--repository-config=''", + "--repo", + "https://kubernetes.github.io/ingress-nginx", + "--kube-context", + kubeContext, + "--namespace", + "ingress-nginx", + "--create-namespace", + "--set-string", + "controller.config.hsts=false", + "--wait", + } + log.WriteString(logrus.InfoLevel, "\n") + log.Infof("Executing command: helm %s\n", strings.Join(args, " ")) + log.Info("Waiting for ingress controller deployment, this can take several minutes...") + helmCmd := exec.Command("helm", args...) + output, err := helmCmd.CombinedOutput() + if err != nil { + return fmt.Errorf("error during helm command: %s (%w)", string(output), err) + } + + list, err := kubeClient.CoreV1().Secrets("ingress-nginx").List(ctx, metav1.ListOptions{ + LabelSelector: "name=ingress-nginx,owner=helm,status=deployed", + }) + if err != nil { + return err + } + + if len(list.Items) == 1 { + secret := list.Items[0] + originalSecret := secret.DeepCopy() + secret.Labels["loft.sh/app"] = "true" + if secret.Annotations == nil { + secret.Annotations = map[string]string{} + } + + secret.Annotations["loft.sh/url"] = "https://kubernetes.github.io/ingress-nginx" + originalJSON, err := json.Marshal(originalSecret) + if err != nil { + return err + } + modifiedJSON, err := json.Marshal(secret) + if err != nil { + return err + } + data, err := jsonpatch.CreateMergePatch(originalJSON, modifiedJSON) + if err != nil { + return err + } + _, err = kubeClient.CoreV1().Secrets(secret.Namespace).Patch(ctx, secret.Name, types.MergePatchType, data, metav1.PatchOptions{}) + if err != nil { + return err + } + } + + log.Done("Successfully installed ingress-nginx to your kubernetes cluster!") + } + + return nil +} + +func UpgradeLoft(chartName, chartRepo, kubeContext, namespace string, extraArgs []string, log log.Logger) error { + // now we install loft + args := []string{ + "upgrade", + defaultReleaseName, + chartName, + "--install", + "--reuse-values", + "--create-namespace", + "--repository-config=''", + "--kube-context", + kubeContext, + "--namespace", + namespace, + } + if chartRepo != "" { + args = append(args, "--repo", chartRepo) + } + args = append(args, extraArgs...) + + log.WriteString(logrus.InfoLevel, "\n") + log.Infof("Executing command: helm %s\n", strings.Join(args, " ")) + log.Info("Waiting for helm command, this can take up to several minutes...") + helmCmd := exec.Command("helm", args...) + if chartRepo != "" { + helmWorkDir, err := getHelmWorkdir(chartName) + if err != nil { + return err + } + + helmCmd.Dir = helmWorkDir + } + output, err := helmCmd.CombinedOutput() + if err != nil { + return fmt.Errorf("error during helm command: %s (%w)", string(output), err) + } + + log.Done(product.Replace("Loft has been deployed to your cluster!")) + return nil +} + +func GetLoftManifests(chartName, chartRepo, kubeContext, namespace string, extraArgs []string, log log.Logger) (string, error) { + args := []string{ + "template", + defaultReleaseName, + chartName, + "--repository-config=''", + "--kube-context", + kubeContext, + "--namespace", + namespace, + } + if chartRepo != "" { + args = append(args, "--repo", chartRepo) + } + args = append(args, extraArgs...) + + helmCmd := exec.Command("helm", args...) + if chartRepo != "" { + helmWorkDir, err := getHelmWorkdir(chartName) + if err != nil { + return "", err + } + + helmCmd.Dir = helmWorkDir + } + output, err := helmCmd.CombinedOutput() + if err != nil { + return "", fmt.Errorf("error during helm command: %s (%w)", string(output), err) + } + return string(output), nil +} + +// Return the directory where the `helm` commands should be executed or error if none can be found/created +// Uses current workdir by default unless it contains a folder with the chart name +func getHelmWorkdir(chartName string) (string, error) { + // If chartName folder exists, check temp dir next + if _, err := os.Stat(chartName); err == nil { + tempDir := os.TempDir() + + // If tempDir/chartName folder exists, create temp folder + if _, err := os.Stat(path.Join(tempDir, chartName)); err == nil { + tempDir, err = os.MkdirTemp(tempDir, chartName) + if err != nil { + return "", errors.New("problematic directory `" + chartName + "` found: please execute command in a different folder") + } + } + + // Use tempDir + return tempDir, nil + } + + // Use current workdir + return "", nil +} + +// Makes sure that admin user and password secret exists +// Returns (true, nil) if everything is correct but password is different from parameter `password` +func EnsureAdminPassword(ctx context.Context, kubeClient kubernetes.Interface, restConfig *rest.Config, password string, log log.Logger) (bool, error) { + loftClient, err := loftclientset.NewForConfig(restConfig) + if err != nil { + return false, err + } + + admin, err := loftClient.StorageV1().Users().Get(ctx, "admin", metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return false, err + } else if admin == nil { + admin, err = loftClient.StorageV1().Users().Create(ctx, &storagev1.User{ + ObjectMeta: metav1.ObjectMeta{ + Name: "admin", + }, + Spec: storagev1.UserSpec{ + Username: "admin", + Email: "test@domain.tld", + Subject: "admin", + Groups: []string{"system:masters"}, + PasswordRef: &storagev1.SecretRef{ + SecretName: "loft-user-secret-admin", + SecretNamespace: "loft", + Key: "password", + }, + }, + }, metav1.CreateOptions{}) + if err != nil { + return false, err + } + } else if admin.Spec.PasswordRef == nil || admin.Spec.PasswordRef.SecretName == "" || admin.Spec.PasswordRef.SecretNamespace == "" { + return false, nil + } + + key := admin.Spec.PasswordRef.Key + if key == "" { + key = "password" + } + + passwordHash := fmt.Sprintf("%x", sha256.Sum256([]byte(password))) + + secret, err := kubeClient.CoreV1().Secrets(admin.Spec.PasswordRef.SecretNamespace).Get(ctx, admin.Spec.PasswordRef.SecretName, metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + return false, err + } else if err == nil { + existingPasswordHash, keyExists := secret.Data[key] + if keyExists { + return (string(existingPasswordHash) != passwordHash), nil + } + + secret.Data[key] = []byte(passwordHash) + _, err = kubeClient.CoreV1().Secrets(secret.Namespace).Update(ctx, secret, metav1.UpdateOptions{}) + if err != nil { + return false, errors.Wrap(err, "update admin password secret") + } + return false, nil + } + + // create the password secret if it was not found, this can happen if you delete the loft namespace without deleting the admin user + secret = &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: admin.Spec.PasswordRef.SecretName, + Namespace: admin.Spec.PasswordRef.SecretNamespace, + }, + Data: map[string][]byte{ + key: []byte(passwordHash), + }, + } + _, err = kubeClient.CoreV1().Secrets(secret.Namespace).Create(ctx, secret, metav1.CreateOptions{}) + if err != nil { + return false, errors.Wrap(err, "create admin password secret") + } + + log.Info("Successfully recreated admin password secret") + return false, nil +} + +func IsLoftInstalledLocally(ctx context.Context, kubeClient kubernetes.Interface, namespace string) bool { + _, err := kubeClient.NetworkingV1().Ingresses(namespace).Get(ctx, "loft-ingress", metav1.GetOptions{}) + if err != nil && !kerrors.IsNotFound(err) { + _, err = kubeClient.NetworkingV1beta1().Ingresses(namespace).Get(ctx, "loft-ingress", metav1.GetOptions{}) + return kerrors.IsNotFound(err) + } + + return kerrors.IsNotFound(err) +} + +func getPortForwardingTargetPort(pod *corev1.Pod) int { + for _, container := range pod.Spec.Containers { + if container.Name == "manager" { + for _, port := range container.Ports { + if port.Name == "https" { + return int(port.ContainerPort) + } + } + } + } + + return 10443 +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/config/variables.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/config/variables.go new file mode 100644 index 000000000..de91b7bb7 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/config/variables.go @@ -0,0 +1,21 @@ +package config + +import ( + "os" + "time" +) + +const ( + defaultTimeout = 10 * time.Minute + timeoutEnvVariable = "LOFT_TIMEOUT" +) + +func Timeout() time.Duration { + if timeout := os.Getenv(timeoutEnvVariable); timeout != "" { + if parsedTimeout, err := time.ParseDuration(timeout); err == nil { + return parsedTimeout + } + } + + return defaultTimeout +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/constants/metadata.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/constants/metadata.go new file mode 100644 index 000000000..5f26c458e --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/constants/metadata.go @@ -0,0 +1,12 @@ +package constants + +const ( + LoftctlUserAgentPrefix = "loftctl/" + + VClusterSpace = "loft.sh/vcluster-space" + + // LoftDefaultSpaceTemplate indicates the default space template on a cluster + LoftDefaultSpaceTemplate = "space.loft.sh/default-template" + + LoftCacheFolderEnv = "LOFT_CACHE_FOLDER" +) diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/defaults/defaults.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/defaults/defaults.go new file mode 100644 index 000000000..f1a560fa3 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/defaults/defaults.go @@ -0,0 +1,112 @@ +package defaults + +import ( + "encoding/json" + "os" + "path/filepath" + + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/pkg/errors" +) + +const ( + KeyProject = "project" +) + +var ( + ConfigFile = "defaults.json" + ConfigFolder = client.CacheFolder + + DefaultKeys = []string{KeyProject} +) + +// Defaults holds the default values +type Defaults struct { + folderPath string + fileName string + fullPath string + + values map[string]string +} + +// NewFromPath creates a new defaults instance from the given path +func NewFromPath(folderPath string, fileName string) (*Defaults, error) { + fullPath := filepath.Join(folderPath, fileName) + defaults := &Defaults{folderPath, fileName, fullPath, make(map[string]string)} + + if err := defaults.ensureConfigFile(); err != nil { + return defaults, errors.Wrap(err, "no config file") + } + + contents, err := os.ReadFile(fullPath) + if err != nil { + return defaults, errors.Wrap(err, "read config file") + } + if len(contents) == 0 { + return defaults, nil + } + if err = json.Unmarshal(contents, &defaults.values); err != nil { + return defaults, errors.Wrap(err, "invalid json") + } + + return defaults, nil +} + +// Set sets the given key to the given value and persists the defaults on disk +func (d *Defaults) Set(key string, value string) error { + if !IsSupportedKey(key) { + return errors.Errorf("key %s is not supported", key) + } + + d.values[key] = value + json, err := json.Marshal(d.values) + if err != nil { + return errors.Wrap(err, "invalid json") + } + if err = os.WriteFile(d.fullPath, json, os.ModePerm); err != nil { + return errors.Wrap(err, "write config file") + } + + return nil +} + +// Get returns the value for the given key +func (d *Defaults) Get(key string, fallback string) (string, error) { + if !IsSupportedKey(key) { + return fallback, errors.Errorf("key %s is not supported", key) + } + + return d.values[key], nil +} + +// IsSupportedKey returns true if the given key is supported +func IsSupportedKey(key string) bool { + for _, k := range DefaultKeys { + if k == key { + return true + } + } + + return false +} + +func (d *Defaults) ensureConfigFile() error { + _, err := os.Stat(d.fullPath) + // file exists + if err == nil { + return nil + } + + if os.IsNotExist(err) { + if err := os.MkdirAll(d.folderPath, os.ModePerm); err != nil { + return errors.Wrap(err, "create cache folder") + } + if _, err := os.Create(d.fullPath); err != nil { + return errors.Wrap(err, "create defaults file") + } + + return nil + } else { + return err + } +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/docker/config.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/docker/config.go new file mode 100644 index 000000000..baa24d3e9 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/docker/config.go @@ -0,0 +1,66 @@ +package docker + +import ( + "os" + "path/filepath" + + "github.com/docker/docker/pkg/homedir" + + dockerconfig "github.com/docker/cli/cli/config" + "github.com/docker/cli/cli/config/configfile" + "github.com/docker/cli/cli/config/types" + "github.com/pkg/errors" +) + +const dockerFileFolder = ".docker" + +// Config is the interface to interact with the docker config +type Config interface { + // Store saves credentials for the given registry into the local config file + Store(registry string, authConfig types.AuthConfig) error + + // Save persists the locally changed config file to file + Save() error +} + +// NewDockerConfig creates a new docker client +func NewDockerConfig() (Config, error) { + configFile, err := loadDockerConfig() + if err != nil { + return nil, err + } + + return &config{ + DockerConfig: configFile, + }, nil +} + +type config struct { + DockerConfig *configfile.ConfigFile +} + +func (c *config) Store(registry string, authConfig types.AuthConfig) error { + if registry == "" { + return nil + } + + err := c.DockerConfig.GetCredentialsStore(registry).Store(authConfig) + if err != nil { + return errors.Wrapf(err, "store credentials for registry %s", registry) + } + + return nil +} + +func (c *config) Save() error { + return c.DockerConfig.Save() +} + +func loadDockerConfig() (*configfile.ConfigFile, error) { + configDir := os.Getenv("DOCKER_CONFIG") + if configDir == "" { + configDir = filepath.Join(homedir.Get(), dockerFileFolder) + } + + return dockerconfig.Load(configDir) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/kube/client.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/kube/client.go new file mode 100644 index 000000000..a0615ac41 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/kube/client.go @@ -0,0 +1,54 @@ +package kube + +import ( + agentloftclient "github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset" + loftclient "github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset" + + "github.com/pkg/errors" + + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" +) + +type Interface interface { + kubernetes.Interface + Loft() loftclient.Interface + Agent() agentloftclient.Interface +} + +func NewForConfig(c *rest.Config) (Interface, error) { + kubeClient, err := kubernetes.NewForConfig(c) + if err != nil { + return nil, errors.Wrap(err, "create kube client") + } + + loftClient, err := loftclient.NewForConfig(c) + if err != nil { + return nil, errors.Wrap(err, "create loft client") + } + + agentLoftClient, err := agentloftclient.NewForConfig(c) + if err != nil { + return nil, errors.Wrap(err, "create kiosk client") + } + + return &client{ + Interface: kubeClient, + loftClient: loftClient, + agentLoftClient: agentLoftClient, + }, nil +} + +type client struct { + kubernetes.Interface + loftClient loftclient.Interface + agentLoftClient agentloftclient.Interface +} + +func (c *client) Loft() loftclient.Interface { + return c.loftClient +} + +func (c *client) Agent() agentloftclient.Interface { + return c.agentLoftClient +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/kubeconfig/kubeconfig.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/kubeconfig/kubeconfig.go new file mode 100644 index 000000000..602ecf63e --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/kubeconfig/kubeconfig.go @@ -0,0 +1,266 @@ +package kubeconfig + +import ( + "io" + "os" + "path/filepath" + "strings" + + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/tools/clientcmd/api" +) + +type ContextOptions struct { + Name string + Server string + CaData []byte + ConfigPath string + InsecureSkipTLSVerify bool + DirectClusterEndpointEnabled bool + VirtualClusterAccessPointEnabled bool + + Token string + ClientKeyData []byte + ClientCertificateData []byte + + CurrentNamespace string + SetActive bool +} + +func SpaceInstanceContextName(projectName, spaceInstanceName string) string { + return "loft_" + spaceInstanceName + "_" + projectName +} + +func VirtualClusterInstanceContextName(projectName, virtualClusterInstance string) string { + return "loft-vcluster_" + virtualClusterInstance + "_" + projectName +} + +func virtualClusterInstanceProjectAndNameFromContextName(contextName string) (string, string) { + return strings.Split(contextName, "_")[2], strings.Split(contextName, "_")[1] +} + +func SpaceContextName(clusterName, namespaceName string) string { + contextName := "loft_" + if namespaceName != "" { + contextName += namespaceName + "_" + } + + contextName += clusterName + return contextName +} + +func VirtualClusterContextName(clusterName, namespaceName, virtualClusterName string) string { + return "loft-vcluster_" + virtualClusterName + "_" + namespaceName + "_" + clusterName +} + +func ManagementContextName() string { + return "loft-management" +} + +func ParseContext(contextName string) (isLoftContext bool, cluster string, namespace string, vCluster string) { + splitted := strings.Split(contextName, "_") + if len(splitted) == 0 || (splitted[0] != "loft" && splitted[0] != "loft-vcluster") { + return false, "", "", "" + } + + // cluster or space context + if splitted[0] == "loft" { + if len(splitted) > 3 || len(splitted) == 1 { + return false, "", "", "" + } else if len(splitted) == 2 { + return true, splitted[1], "", "" + } + + return true, splitted[2], splitted[1], "" + } + + // vCluster context + if len(splitted) != 4 { + return false, "", "", "" + } + + return true, splitted[3], splitted[2], splitted[1] +} + +func CurrentContext() (string, error) { + config, err := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(clientcmd.NewDefaultClientConfigLoadingRules(), &clientcmd.ConfigOverrides{}).RawConfig() + if err != nil { + return "", err + } + + return config.CurrentContext, nil +} + +// DeleteContext deletes the context with the given name from the kube config +func DeleteContext(contextName string) error { + config, err := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(clientcmd.NewDefaultClientConfigLoadingRules(), &clientcmd.ConfigOverrides{}).RawConfig() + if err != nil { + return err + } + + delete(config.Contexts, contextName) + delete(config.Clusters, contextName) + delete(config.AuthInfos, contextName) + + if config.CurrentContext == contextName { + config.CurrentContext = "" + for name := range config.Contexts { + config.CurrentContext = name + break + } + } + + // Save the config + return clientcmd.ModifyConfig(clientcmd.NewDefaultClientConfigLoadingRules(), config, false) +} + +func updateKubeConfig(contextName string, cluster *api.Cluster, authInfo *api.AuthInfo, namespaceName string, setActive bool) error { + config, err := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(clientcmd.NewDefaultClientConfigLoadingRules(), &clientcmd.ConfigOverrides{}).RawConfig() + if err != nil { + return err + } + + config.Clusters[contextName] = cluster + config.AuthInfos[contextName] = authInfo + + // Update kube context + context := api.NewContext() + context.Cluster = contextName + context.AuthInfo = contextName + context.Namespace = namespaceName + + config.Contexts[contextName] = context + if setActive { + config.CurrentContext = contextName + } + + // Save the config + return clientcmd.ModifyConfig(clientcmd.NewDefaultClientConfigLoadingRules(), config, false) +} + +func printKubeConfigTo(contextName string, cluster *api.Cluster, authInfo *api.AuthInfo, namespaceName string, writer io.Writer) error { + config := api.NewConfig() + + config.Clusters[contextName] = cluster + config.AuthInfos[contextName] = authInfo + + // Update kube context + context := api.NewContext() + context.Cluster = contextName + context.AuthInfo = contextName + context.Namespace = namespaceName + + config.Contexts[contextName] = context + config.CurrentContext = contextName + + // set kind & version + config.APIVersion = "v1" + config.Kind = "Config" + + out, err := clientcmd.Write(*config) + if err != nil { + return err + } + + _, err = writer.Write(out) + return err +} + +// UpdateKubeConfig updates the kube config and adds the virtual cluster context +func UpdateKubeConfig(options ContextOptions) error { + contextName, cluster, authInfo, err := createContext(options) + if err != nil { + return err + } + + // we don't want to set the space name here as the default namespace in the virtual cluster, because it couldn't exist + return updateKubeConfig(contextName, cluster, authInfo, options.CurrentNamespace, options.SetActive) +} + +// PrintKubeConfigTo prints the given config to the writer +func PrintKubeConfigTo(options ContextOptions, writer io.Writer) error { + contextName, cluster, authInfo, err := createContext(options) + if err != nil { + return err + } + + // we don't want to set the space name here as the default namespace in the virtual cluster, because it couldn't exist + return printKubeConfigTo(contextName, cluster, authInfo, options.CurrentNamespace, writer) +} + +// PrintTokenKubeConfig writes the kube config to the os.Stdout +func PrintTokenKubeConfig(restConfig *rest.Config, token string) error { + contextName, cluster, authInfo := createTokenContext(restConfig, token) + + return printKubeConfigTo(contextName, cluster, authInfo, "", os.Stdout) +} + +// WriteTokenKubeConfig writes the kube config to the io.Writer +func WriteTokenKubeConfig(restConfig *rest.Config, token string, w io.Writer) error { + contextName, cluster, authInfo := createTokenContext(restConfig, token) + + return printKubeConfigTo(contextName, cluster, authInfo, "", w) +} + +func createTokenContext(restConfig *rest.Config, token string) (string, *api.Cluster, *api.AuthInfo) { + contextName := "default" + + cluster := api.NewCluster() + cluster.Server = restConfig.Host + cluster.InsecureSkipTLSVerify = restConfig.Insecure + cluster.CertificateAuthority = restConfig.CAFile + cluster.CertificateAuthorityData = restConfig.CAData + cluster.TLSServerName = restConfig.ServerName + + authInfo := api.NewAuthInfo() + authInfo.Token = token + + return contextName, cluster, authInfo +} + +func createContext(options ContextOptions) (string, *api.Cluster, *api.AuthInfo, error) { + contextName := options.Name + cluster := api.NewCluster() + cluster.Server = options.Server + cluster.CertificateAuthorityData = options.CaData + cluster.InsecureSkipTLSVerify = options.InsecureSkipTLSVerify + + authInfo := api.NewAuthInfo() + if options.Token != "" || options.ClientCertificateData != nil || options.ClientKeyData != nil { + authInfo.Token = options.Token + authInfo.ClientKeyData = options.ClientKeyData + authInfo.ClientCertificateData = options.ClientCertificateData + } else { + command, err := os.Executable() + if err != nil { + return "", nil, nil, err + } + + absConfigPath, err := filepath.Abs(options.ConfigPath) + if err != nil { + return "", nil, nil, err + } + + if options.VirtualClusterAccessPointEnabled { + projectName, virtualClusterName := virtualClusterInstanceProjectAndNameFromContextName(contextName) + authInfo.Exec = &api.ExecConfig{ + APIVersion: v1beta1.SchemeGroupVersion.String(), + Command: command, + Args: []string{"token", "--silent", "--project", projectName, "--virtual-cluster", virtualClusterName}, + } + } else { + authInfo.Exec = &api.ExecConfig{ + APIVersion: v1beta1.SchemeGroupVersion.String(), + Command: command, + Args: []string{"token", "--silent", "--config", absConfigPath}, + } + if options.DirectClusterEndpointEnabled { + authInfo.Exec.Args = append(authInfo.Exec.Args, "--direct-cluster-endpoint") + } + } + } + + return contextName, cluster, authInfo, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/parameters/parameters.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/parameters/parameters.go new file mode 100644 index 000000000..18415ee29 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/parameters/parameters.go @@ -0,0 +1,383 @@ +package parameters + +import ( + "fmt" + "os" + "regexp" + "strconv" + "strings" + + "github.com/ghodss/yaml" + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/log" + "github.com/loft-sh/log/survey" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +type ParametersFile struct { + Parameters map[string]interface{} `json:"parameters"` +} + +type AppFile struct { + Apps []AppParameters `json:"apps,omitempty"` +} + +type AppParameters struct { + Name string `json:"name,omitempty"` + Parameters map[string]interface{} `json:"parameters"` +} + +type NamespacedApp struct { + App *managementv1.App + Namespace string +} + +type NamespacedAppWithParameters struct { + App *managementv1.App + Namespace string + Parameters string +} + +func SetDeepValue(parameters interface{}, path string, value interface{}) { + if parameters == nil { + return + } + + pathSegments := strings.Split(path, ".") + switch t := parameters.(type) { + case map[string]interface{}: + if len(pathSegments) == 1 { + t[pathSegments[0]] = value + return + } + + _, ok := t[pathSegments[0]] + if !ok { + t[pathSegments[0]] = map[string]interface{}{} + } + + SetDeepValue(t[pathSegments[0]], strings.Join(pathSegments[1:], "."), value) + } +} + +func GetDeepValue(parameters interface{}, path string) interface{} { + if parameters == nil { + return nil + } + + pathSegments := strings.Split(path, ".") + switch t := parameters.(type) { + case map[string]interface{}: + val, ok := t[pathSegments[0]] + if !ok { + return nil + } else if len(pathSegments) == 1 { + return val + } + + return GetDeepValue(val, strings.Join(pathSegments[1:], ".")) + case []interface{}: + index, err := strconv.Atoi(pathSegments[0]) + if err != nil { + return nil + } else if index < 0 || index >= len(t) { + return nil + } + + val := t[index] + if len(pathSegments) == 1 { + return val + } + + return GetDeepValue(val, strings.Join(pathSegments[1:], ".")) + } + + return nil +} + +func ResolveTemplateParameters(set []string, parameters []storagev1.AppParameter, fileName string) (string, error) { + var parametersFile map[string]interface{} + if fileName != "" { + out, err := os.ReadFile(fileName) + if err != nil { + return "", errors.Wrap(err, "read parameters file") + } + + parametersFile = map[string]interface{}{} + err = yaml.Unmarshal(out, ¶metersFile) + if err != nil { + return "", errors.Wrap(err, "parse parameters file") + } + } + + return fillParameters(parameters, set, parametersFile) +} + +func ResolveAppParameters(apps []NamespacedApp, appFilename string, log log.Logger) ([]NamespacedAppWithParameters, error) { + var appFile *AppFile + if appFilename != "" { + out, err := os.ReadFile(appFilename) + if err != nil { + return nil, errors.Wrap(err, "read parameters file") + } + + appFile = &AppFile{} + err = yaml.Unmarshal(out, appFile) + if err != nil { + return nil, errors.Wrap(err, "parse parameters file") + } + } + + ret := []NamespacedAppWithParameters{} + for _, app := range apps { + if len(app.App.Spec.Parameters) == 0 { + ret = append(ret, NamespacedAppWithParameters{ + App: app.App, + Namespace: app.Namespace, + }) + continue + } + + if appFile != nil { + parameters, err := getParametersInAppFile(app.App, appFile) + if err != nil { + return nil, err + } + + ret = append(ret, NamespacedAppWithParameters{ + App: app.App, + Namespace: app.Namespace, + Parameters: parameters, + }) + continue + } + + log.WriteString(logrus.InfoLevel, "\n") + if app.Namespace != "" { + log.Infof("Please specify parameters for app %s in namespace %s", clihelper.GetDisplayName(app.App.Name, app.App.Spec.DisplayName), app.Namespace) + } else { + log.Infof("Please specify parameters for app %s", clihelper.GetDisplayName(app.App.Name, app.App.Spec.DisplayName)) + } + + parameters := map[string]interface{}{} + for _, parameter := range app.App.Spec.Parameters { + question := parameter.Label + if parameter.Required { + question += " (Required)" + } + + for { + value, err := log.Question(&survey.QuestionOptions{ + Question: question, + DefaultValue: parameter.DefaultValue, + Options: parameter.Options, + IsPassword: parameter.Type == "password", + }) + if err != nil { + return nil, err + } + + outVal, err := VerifyValue(value, parameter) + if err != nil { + log.Errorf(err.Error()) + continue + } + + SetDeepValue(parameters, parameter.Variable, outVal) + break + } + } + + out, err := yaml.Marshal(parameters) + if err != nil { + return nil, errors.Wrapf(err, "marshal app %s parameters", clihelper.GetDisplayName(app.App.Name, app.App.Spec.DisplayName)) + } + ret = append(ret, NamespacedAppWithParameters{ + App: app.App, + Namespace: app.Namespace, + Parameters: string(out), + }) + } + + return ret, nil +} + +func VerifyValue(value string, parameter storagev1.AppParameter) (interface{}, error) { + switch parameter.Type { + case "": + fallthrough + case "password": + fallthrough + case "string": + fallthrough + case "multiline": + if parameter.DefaultValue != "" && value == "" { + value = parameter.DefaultValue + } + + if parameter.Required && value == "" { + return nil, fmt.Errorf("parameter %s (%s) is required", parameter.Label, parameter.Variable) + } + for _, option := range parameter.Options { + if option == value { + return value, nil + } + } + if parameter.Validation != "" { + regEx, err := regexp.Compile(parameter.Validation) + if err != nil { + return nil, errors.Wrap(err, "compile validation regex "+parameter.Validation) + } + + if !regEx.MatchString(value) { + return nil, fmt.Errorf("parameter %s (%s) needs to match regex %s", parameter.Label, parameter.Variable, parameter.Validation) + } + } + if parameter.Invalidation != "" { + regEx, err := regexp.Compile(parameter.Invalidation) + if err != nil { + return nil, errors.Wrap(err, "compile invalidation regex "+parameter.Invalidation) + } + + if regEx.MatchString(value) { + return nil, fmt.Errorf("parameter %s (%s) cannot match regex %s", parameter.Label, parameter.Variable, parameter.Invalidation) + } + } + + return value, nil + case "boolean": + if parameter.DefaultValue != "" && value == "" { + boolValue, err := strconv.ParseBool(parameter.DefaultValue) + if err != nil { + return nil, errors.Wrapf(err, "parse default value for parameter %s (%s)", parameter.Label, parameter.Variable) + } + + return boolValue, nil + } + if parameter.Required && value == "" { + return nil, fmt.Errorf("parameter %s (%s) is required", parameter.Label, parameter.Variable) + } + + boolValue, err := strconv.ParseBool(value) + if err != nil { + return nil, errors.Wrapf(err, "parse value for parameter %s (%s)", parameter.Label, parameter.Variable) + } + return boolValue, nil + case "number": + if parameter.DefaultValue != "" && value == "" { + intValue, err := strconv.Atoi(parameter.DefaultValue) + if err != nil { + return nil, errors.Wrapf(err, "parse default value for parameter %s (%s)", parameter.Label, parameter.Variable) + } + + return intValue, nil + } + if parameter.Required && value == "" { + return nil, fmt.Errorf("parameter %s (%s) is required", parameter.Label, parameter.Variable) + } + num, err := strconv.Atoi(value) + if err != nil { + return nil, errors.Wrapf(err, "parse value for parameter %s (%s)", parameter.Label, parameter.Variable) + } + if parameter.Min != nil && num < *parameter.Min { + return nil, fmt.Errorf("parameter %s (%s) cannot be smaller than %d", parameter.Label, parameter.Variable, *parameter.Min) + } + if parameter.Max != nil && num > *parameter.Max { + return nil, fmt.Errorf("parameter %s (%s) cannot be greater than %d", parameter.Label, parameter.Variable, *parameter.Max) + } + + return num, nil + } + + return nil, fmt.Errorf("unrecognized type %s for parameter %s (%s)", parameter.Type, parameter.Label, parameter.Variable) +} + +func getParametersInAppFile(appObj *managementv1.App, appFile *AppFile) (string, error) { + if appFile == nil { + return "", nil + } + + for _, app := range appFile.Apps { + if app.Name == appObj.Name { + return fillParameters(appObj.Spec.Parameters, nil, app.Parameters) + } + } + + return "", fmt.Errorf("couldn't find app %s (%s) in provided parameters file", clihelper.GetDisplayName(appObj.Name, appObj.Spec.DisplayName), appObj.Name) +} + +func fillParameters(parameters []storagev1.AppParameter, set []string, values map[string]interface{}) (string, error) { + if values == nil { + values = map[string]interface{}{} + } + + // parse set array + setMap, err := parseSet(parameters, set) + if err != nil { + return "", err + } + + // apply parameters + for _, parameter := range parameters { + strVal, ok := setMap[parameter.Variable] + if !ok { + val := GetDeepValue(values, parameter.Variable) + if val != nil { + switch t := val.(type) { + case string: + strVal = t + case int: + strVal = strconv.Itoa(t) + case bool: + strVal = strconv.FormatBool(t) + default: + return "", fmt.Errorf("unrecognized type for parameter %s (%s) in file: %v", parameter.Label, parameter.Variable, t) + } + } + } + + outVal, err := VerifyValue(strVal, parameter) + if err != nil { + return "", errors.Wrap(err, "validate parameters") + } + + SetDeepValue(values, parameter.Variable, outVal) + } + + out, err := yaml.Marshal(values) + if err != nil { + return "", errors.Wrap(err, "marshal parameters") + } + + return string(out), nil +} + +func parseSet(parameters []storagev1.AppParameter, set []string) (map[string]string, error) { + setValues := map[string]string{} + for _, s := range set { + splitted := strings.Split(s, "=") + if len(splitted) <= 1 { + return nil, fmt.Errorf("error parsing --set %s: need parameter=value format", s) + } + + key := splitted[0] + value := strings.Join(splitted[1:], "=") + found := false + for _, parameter := range parameters { + if parameter.Variable == key { + found = true + break + } + } + if !found { + return nil, fmt.Errorf("parameter %s doesn't exist on template", key) + } + + setValues[key] = value + } + + return setValues, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/portforward/portforward.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/portforward/portforward.go new file mode 100644 index 000000000..3634f680a --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/portforward/portforward.go @@ -0,0 +1,467 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package portforward + +import ( + "context" + "errors" + "fmt" + "io" + "net" + "net/http" + "sort" + "strconv" + "strings" + "sync" + + "go.uber.org/atomic" + klog "k8s.io/klog/v2" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/runtime" +) + +// PortForwardProtocolV1Name is the subprotocol used for port forwarding. +// TODO move to API machinery and re-unify with kubelet/server/portfoward +const PortForwardProtocolV1Name = "portforward.k8s.io" + +// PortForwarder knows how to listen for local connections and forward them to +// a remote pod via an upgraded HTTP request. +type PortForwarder struct { + addresses []listenAddress + ports []ForwardedPort + stopChan <-chan struct{} + + errChan chan<- error + + dialer httpstream.Dialer + streamConn httpstream.Connection + listeners []io.Closer + Ready chan struct{} + requestIDLock sync.Mutex + requestID int + out io.Writer + errOut io.Writer + + numConnections atomic.Int64 +} + +// ForwardedPort contains a Local:Remote port pairing. +type ForwardedPort struct { + Local uint16 + Remote uint16 +} + +/* +valid port specifications: + +5000 +- forwards from localhost:5000 to pod:5000 + +8888:5000 +- forwards from localhost:8888 to pod:5000 + +0:5000 +:5000 + - selects a random available local port, + forwards from localhost: to pod:5000 +*/ +func parsePorts(ports []string) ([]ForwardedPort, error) { + var forwards []ForwardedPort + for _, portString := range ports { + parts := strings.Split(portString, ":") + var localString, remoteString string + if len(parts) == 1 { + localString = parts[0] + remoteString = parts[0] + } else if len(parts) == 2 { + localString = parts[0] + if localString == "" { + // support :5000 + localString = "0" + } + remoteString = parts[1] + } else { + return nil, fmt.Errorf("invalid port format '%s'", portString) + } + + localPort, err := strconv.ParseUint(localString, 10, 16) + if err != nil { + return nil, fmt.Errorf("error parsing local port '%s': %w", localString, err) + } + + remotePort, err := strconv.ParseUint(remoteString, 10, 16) + if err != nil { + return nil, fmt.Errorf("error parsing remote port '%s': %w", remoteString, err) + } + if remotePort == 0 { + return nil, fmt.Errorf("remote port must be > 0") + } + + forwards = append(forwards, ForwardedPort{uint16(localPort), uint16(remotePort)}) + } + + return forwards, nil +} + +type listenAddress struct { + address string + protocol string + failureMode string +} + +func parseAddresses(addressesToParse []string) ([]listenAddress, error) { + var addresses []listenAddress + parsed := make(map[string]listenAddress) + for _, address := range addressesToParse { + if address == "localhost" { + if _, exists := parsed["127.0.0.1"]; !exists { + ip := listenAddress{address: "127.0.0.1", protocol: "tcp4", failureMode: "all"} + parsed[ip.address] = ip + } + if _, exists := parsed["::1"]; !exists { + ip := listenAddress{address: "::1", protocol: "tcp6", failureMode: "all"} + parsed[ip.address] = ip + } + } else if net.ParseIP(address).To4() != nil { + parsed[address] = listenAddress{address: address, protocol: "tcp4", failureMode: "any"} + } else if net.ParseIP(address) != nil { + parsed[address] = listenAddress{address: address, protocol: "tcp6", failureMode: "any"} + } else { + return nil, fmt.Errorf("%s is not a valid IP", address) + } + } + addresses = make([]listenAddress, len(parsed)) + id := 0 + for _, v := range parsed { + addresses[id] = v + id++ + } + // Sort addresses before returning to get a stable order + sort.Slice(addresses, func(i, j int) bool { return addresses[i].address < addresses[j].address }) + + return addresses, nil +} + +// New creates a new PortForwarder with localhost listen addresses. +func New(dialer httpstream.Dialer, ports []string, stopChan <-chan struct{}, readyChan chan struct{}, errChan chan<- error, out, errOut io.Writer) (*PortForwarder, error) { + return NewOnAddresses(dialer, []string{"localhost"}, ports, stopChan, readyChan, errChan, out, errOut) +} + +// NewOnAddresses creates a new PortForwarder with custom listen addresses. +func NewOnAddresses(dialer httpstream.Dialer, addresses []string, ports []string, stopChan <-chan struct{}, readyChan chan struct{}, errChan chan<- error, out, errOut io.Writer) (*PortForwarder, error) { + if len(addresses) == 0 { + return nil, errors.New("you must specify at least 1 address") + } + parsedAddresses, err := parseAddresses(addresses) + if err != nil { + return nil, err + } + if len(ports) == 0 { + return nil, errors.New("you must specify at least 1 port") + } + parsedPorts, err := parsePorts(ports) + if err != nil { + return nil, err + } + return &PortForwarder{ + dialer: dialer, + addresses: parsedAddresses, + ports: parsedPorts, + stopChan: stopChan, + Ready: readyChan, + out: out, + errChan: errChan, + errOut: errOut, + }, nil +} + +func (pf *PortForwarder) raiseError(err error) { + // make sure this is definitely non blocking + go func() { + if pf.errChan != nil { + pf.errChan <- err + } + }() + + _ = pf.streamConn.Close() +} + +func (pf *PortForwarder) NumConnections() int64 { + return pf.numConnections.Load() +} + +// ForwardPorts formats and executes a port forwarding request. The connection will remain +// open until stopChan is closed. +func (pf *PortForwarder) ForwardPorts(ctx context.Context) error { + defer pf.Close() + + var err error + pf.streamConn, _, err = pf.dialer.Dial(PortForwardProtocolV1Name) + if err != nil { + return fmt.Errorf("error upgrading connection: %w", err) + } + defer pf.streamConn.Close() + + return pf.forward(ctx) +} + +// forward dials the remote host specific in req, upgrades the request, starts +// listeners for each port specified in ports, and forwards local connections +// to the remote host via streams. +func (pf *PortForwarder) forward(ctx context.Context) error { + var err error + + listenSuccess := false + for i := range pf.ports { + port := &pf.ports[i] + err = pf.listenOnPort(ctx, port) + switch { + case err == nil: + listenSuccess = true + default: + if pf.errOut != nil { + fmt.Fprintf(pf.errOut, "Unable to listen on port %d: %v\n", port.Local, err) + } + } + } + + if !listenSuccess { + return fmt.Errorf("unable to listen on any of the requested ports: %v, error: %w", pf.ports, err) + } + + if pf.Ready != nil { + close(pf.Ready) + } + + // wait for interrupt or conn closure + select { + case <-pf.stopChan: + case <-pf.streamConn.CloseChan(): + pf.raiseError(errors.New("lost connection to pod")) + } + + return nil +} + +// listenOnPort delegates listener creation and waits for connections on requested bind addresses. +// An error is raised based on address groups (default and localhost) and their failure modes +func (pf *PortForwarder) listenOnPort(ctx context.Context, port *ForwardedPort) error { + var errors []error + failCounters := make(map[string]int, 2) + successCounters := make(map[string]int, 2) + for _, addr := range pf.addresses { + err := pf.listenOnPortAndAddress(ctx, port, addr.protocol, addr.address) + if err != nil { + errors = append(errors, err) + failCounters[addr.failureMode]++ + } else { + successCounters[addr.failureMode]++ + } + } + if successCounters["all"] == 0 && failCounters["all"] > 0 { + return fmt.Errorf("%s: %v", "Listeners failed to create with the following errors", errors) + } + if failCounters["any"] > 0 { + return fmt.Errorf("%s: %v", "Listeners failed to create with the following errors", errors) + } + return nil +} + +// listenOnPortAndAddress delegates listener creation and waits for new connections +// in the background f +func (pf *PortForwarder) listenOnPortAndAddress(ctx context.Context, port *ForwardedPort, protocol string, address string) error { + listener, err := pf.getListener(protocol, address, port) + if err != nil { + return err + } + pf.listeners = append(pf.listeners, listener) + go pf.waitForConnection(ctx, listener, *port) + return nil +} + +// getListener creates a listener on the interface targeted by the given hostname on the given port with +// the given protocol. protocol is in net.Listen style which basically admits values like tcp, tcp4, tcp6 +func (pf *PortForwarder) getListener(protocol string, hostname string, port *ForwardedPort) (net.Listener, error) { + listener, err := net.Listen(protocol, net.JoinHostPort(hostname, strconv.Itoa(int(port.Local)))) + if err != nil { + return nil, fmt.Errorf("unable to create listener: Error %w", err) + } + listenerAddress := listener.Addr().String() + host, localPort, _ := net.SplitHostPort(listenerAddress) + localPortUInt, err := strconv.ParseUint(localPort, 10, 16) + + if err != nil { + fmt.Fprintf(pf.out, "Failed to forward from %s:%d -> %d\n", hostname, localPortUInt, port.Remote) + return nil, fmt.Errorf("error parsing local port: %w from %s (%s)", err, listenerAddress, host) + } + port.Local = uint16(localPortUInt) + if pf.out != nil { + fmt.Fprintf(pf.out, "Forwarding from %s -> %d\n", net.JoinHostPort(hostname, strconv.Itoa(int(localPortUInt))), port.Remote) + } + + return listener, nil +} + +// waitForConnection waits for new connections to listener and handles them in +// the background. +func (pf *PortForwarder) waitForConnection(ctx context.Context, listener net.Listener, port ForwardedPort) { + for { + select { + case <-pf.streamConn.CloseChan(): + return + default: + conn, err := listener.Accept() + if err != nil { + // TODO consider using something like https://github.com/hydrogen18/stoppableListener? + if !strings.Contains(strings.ToLower(err.Error()), "use of closed network connection") { + pf.raiseError(fmt.Errorf("error accepting connection on port %d: %w", port.Local, err)) + } + return + } + go pf.handleConnection(ctx, conn, port) + } + } +} + +func (pf *PortForwarder) nextRequestID() int { + pf.requestIDLock.Lock() + defer pf.requestIDLock.Unlock() + id := pf.requestID + pf.requestID++ + return id +} + +// handleConnection copies data between the local connection and the stream to +// the remote server. +func (pf *PortForwarder) handleConnection(ctx context.Context, conn net.Conn, port ForwardedPort) { + defer conn.Close() + + logger := klog.FromContext(ctx) + + pf.numConnections.Inc() + defer pf.numConnections.Dec() + if pf.out != nil { + fmt.Fprintf(pf.out, "Handling connection for %d\n", port.Local) + } + + requestID := pf.nextRequestID() + + // create error stream + headers := http.Header{} + headers.Set(corev1.StreamType, corev1.StreamTypeError) + headers.Set(corev1.PortHeader, fmt.Sprintf("%d", port.Remote)) + headers.Set(corev1.PortForwardRequestIDHeader, strconv.Itoa(requestID)) + errorStream, err := pf.streamConn.CreateStream(headers) + if err != nil { + pf.raiseError(fmt.Errorf("error creating error stream for port %d -> %d: %w", port.Local, port.Remote, err)) + return + } + // we're not writing to this stream + errorStream.Close() + + errorChan := make(chan error) + go func() { + message, err := io.ReadAll(errorStream) + switch { + case err != nil: + errorChan <- fmt.Errorf("error reading from error stream for port %d -> %d: %w", port.Local, port.Remote, err) + case len(message) > 0: + errorChan <- fmt.Errorf("an error occurred forwarding %d -> %d: %v", port.Local, port.Remote, string(message)) + } + close(errorChan) + }() + + // create data stream + headers.Set(corev1.StreamType, corev1.StreamTypeData) + dataStream, err := pf.streamConn.CreateStream(headers) + if err != nil { + pf.raiseError(fmt.Errorf("error creating forwarding stream for port %d -> %d: %w", port.Local, port.Remote, err)) + return + } + + localError := make(chan struct{}) + remoteDone := make(chan struct{}) + + go func() { + // Copy from the remote side to the local port. + if _, err := io.Copy(conn, dataStream); err != nil && !strings.Contains(err.Error(), "use of closed network connection") { + logger.Error(err, "error copying from remote stream to local connection") + } + + // inform the select below that the remote copy is done + close(remoteDone) + }() + + go func() { + // inform server we're not sending any more data after copy unblocks + defer dataStream.Close() + + // Copy from the local port to the remote side. + if _, err := io.Copy(dataStream, conn); err != nil && !strings.Contains(err.Error(), "use of closed network connection") { + logger.Error(err, "error copying from local connection to remote stream") + + // break out of the select below without waiting for the other copy to finish + close(localError) + } + }() + + // wait for either a local->remote error or for copying from remote->local to finish + select { + case <-remoteDone: + case <-localError: + } + + // always expect something on errorChan (it may be nil) + err = <-errorChan + if err != nil { + // Fail for errors like container not running or No such container + if strings.Contains(err.Error(), "container") { + pf.raiseError(err) + } else { + logger.Error(err, "Failed handling connection") + } + } +} + +// Close stops all listeners of PortForwarder. +func (pf *PortForwarder) Close() { + // stop all listeners + for _, l := range pf.listeners { + if err := l.Close(); err != nil { + runtime.HandleError(fmt.Errorf("error closing listener: %w", err)) + } + } +} + +// GetPorts will return the ports that were forwarded; this can be used to +// retrieve the locally-bound port in cases where the input was port 0. This +// function will signal an error if the Ready channel is nil or if the +// listeners are not ready yet; this function will succeed after the Ready +// channel has been closed. +func (pf *PortForwarder) GetPorts() ([]ForwardedPort, error) { + if pf.Ready == nil { + return nil, fmt.Errorf("no Ready channel provided") + } + select { + case <-pf.Ready: + return pf.ports, nil + default: + return nil, fmt.Errorf("listeners not ready") + } +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/printhelper/printhelper.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/printhelper/printhelper.go new file mode 100644 index 000000000..a94ace860 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/printhelper/printhelper.go @@ -0,0 +1,127 @@ +package printhelper + +import ( + "fmt" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/log" + "github.com/mgutz/ansi" + "github.com/sirupsen/logrus" +) + +const passwordChangedHint = "(has been changed)" + +func PrintDNSConfiguration(host string, log log.Logger) { + log.WriteString(logrus.InfoLevel, ` + +################################### DNS CONFIGURATION REQUIRED ################################## + +Create a DNS A-record for `+host+` with the EXTERNAL-IP of your nginx-ingress controller. +To find this EXTERNAL-IP, run the following command and look at the output: + +> kubectl get services -n ingress-nginx + |---------------| +NAME TYPE CLUSTER-IP | EXTERNAL-IP | PORT(S) AGE +ingress-nginx-controller LoadBalancer 10.0.0.244 | XX.XXX.XXX.XX | 80:30984/TCP,443:31758/TCP 19m + |^^^^^^^^^^^^^^^| + +EXTERNAL-IP may be 'pending' for a while until your cloud provider has created a new load balancer. + +######################################################################################################### + +The command will wait until loft is reachable under the host. You can also abort and use port-forwarding instead +by running 'loft start' again. + +`) +} + +func PrintSuccessMessageLocalInstall(password, url string, log log.Logger) { + if password == "" { + password = passwordChangedHint + } + + log.WriteString(logrus.InfoLevel, fmt.Sprintf(product.Replace(` + +########################## LOGIN ############################ + +Username: `+ansi.Color("admin", "green+b")+` +Password: `+ansi.Color(password, "green+b")+` # Change via UI or via: `+ansi.Color(product.Replace("loft reset password"), "green+b")+` + +Login via UI: %s +Login via CLI: %s + +!!! You must accept the untrusted certificate in your browser !!! + +################################################################# + +Loft was successfully installed and port-forwarding has been started. +If you stop this command, run 'loft start' again to restart port-forwarding. + +Thanks for using Loft! +`), ansi.Color(url, "green+b"), ansi.Color(product.Replace(`loft login --insecure `)+url, "green+b"))) +} + +func PrintSuccessMessageRemoteInstall(host, password string, log log.Logger) { + url := "https://" + host + + if password == "" { + password = passwordChangedHint + } + + log.WriteString(logrus.InfoLevel, fmt.Sprintf(product.Replace(` + + +########################## LOGIN ############################ + +Username: `+ansi.Color("admin", "green+b")+` +Password: `+ansi.Color(password, "green+b")+` # Change via UI or via: `+ansi.Color(product.Replace("loft reset password"), "green+b")+` + +Login via UI: %s +Login via CLI: %s + +!!! You must accept the untrusted certificate in your browser !!! + +Follow this guide to add a valid certificate: %s + +################################################################# + +Loft was successfully installed and can now be reached at: %s + +Thanks for using Loft! +`), + ansi.Color(url, "green+b"), + ansi.Color(product.Replace(`loft login --insecure `)+url, "green+b"), + "https://loft.sh/docs/administration/ssl", + url, + )) +} + +func PrintSuccessMessageLoftRouterInstall(host, password string, log log.Logger) { + url := "https://" + host + + if password == "" { + password = passwordChangedHint + } + + log.WriteString(logrus.InfoLevel, fmt.Sprintf(product.Replace(` + + +########################## LOGIN ############################ + +Username: `+ansi.Color("admin", "green+b")+` +Password: `+ansi.Color(password, "green+b")+` # Change via UI or via: `+ansi.Color(product.Replace("loft reset password"), "green+b")+` + +Login via UI: %s +Login via CLI: %s + +################################################################# + +Loft was successfully installed and can now be reached at: %s + +Thanks for using Loft! +`), + ansi.Color(url, "green+b"), + ansi.Color(product.Replace(`loft login `)+url, "green+b"), + url, + )) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/random/random.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/random/random.go new file mode 100644 index 000000000..86a50fa1d --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/random/random.go @@ -0,0 +1,16 @@ +package random + +import ( + "math/rand" +) + +var letterRunes = []rune("abcdefghijklmnopqrstuvwxyz") + +// RandomString creates a new random string with the given length +func RandomString(length int) string { + b := make([]rune, length) + for i := range b { + b[i] = letterRunes[rand.Intn(len(letterRunes))] + } + return string(b) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/client.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/client.go new file mode 100644 index 000000000..00a32601d --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/client.go @@ -0,0 +1,70 @@ +package remotecommand + +import ( + "bytes" + "context" + "io" + + "github.com/gorilla/websocket" + "github.com/loft-sh/log" +) + +func ExecuteConn(ctx context.Context, rawConn *websocket.Conn, stdin io.Reader, stdout io.Writer, stderr io.Writer, log log.Logger) (int, error) { + conn := NewWebsocketConn(rawConn) + + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + // close websocket connection + defer conn.Close() + defer func() { + err := conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")) + if err != nil { + log.Debugf("error write close: %v", err) + return + } + }() + + // ping connection + go func() { + Ping(ctx, conn) + }() + + // pipe stdout into websocket + go func() { + err := NewStream(conn, StdinData, StdinClose).Read(stdin) + if err != nil { + log.Debugf("error pipe stdin: %v", err) + } + }() + + // read messages + for { + _, raw, err := conn.ReadMessage() + if err != nil { + log.Debugf("error read message: %v", err) + return 0, err + } + + message, err := ParseMessage(bytes.NewReader(raw)) + if err != nil { + log.Debugf("error parse message: %v", err) + continue + } + + if message.messageType == StdoutData { + if _, err := io.Copy(stdout, message.data); err != nil { + log.Debugf("error read stdout: %v", err) + return 1, err + } + } else if message.messageType == StderrData { + if _, err := io.Copy(stderr, message.data); err != nil { + log.Debugf("error read stderr: %v", err) + return 1, err + } + } else if message.messageType == ExitCode { + log.Debugf("exit code: %d", message.exitCode) + return int(message.exitCode), nil + } + } +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/protocol.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/protocol.go new file mode 100644 index 000000000..fd820e063 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/protocol.go @@ -0,0 +1,84 @@ +package remotecommand + +import ( + "bufio" + "encoding/binary" + "fmt" + "io" +) + +type MessageType byte + +const ( + StdoutData MessageType = 0 + StdoutClose MessageType = 1 + StderrData MessageType = 2 + StderrClose MessageType = 3 + StdinData MessageType = 4 + StdinClose MessageType = 5 + ExitCode MessageType = 6 +) + +type Message struct { + messageType MessageType + exitCode int64 + data io.Reader + + bytes []byte +} + +func newDataMessage(messageType MessageType, data []byte) *Message { + return &Message{ + messageType: messageType, + bytes: data, + } +} + +func newCloseMessage(messageType MessageType) *Message { + return &Message{ + messageType: messageType, + } +} + +func NewExitCodeMessage(exitCode int) *Message { + return &Message{ + messageType: ExitCode, + bytes: binary.AppendVarint([]byte{}, int64(exitCode)), + } +} + +func ParseMessage(reader io.Reader) (*Message, error) { + buf := bufio.NewReader(reader) + messageTypeInt, err := buf.ReadByte() + if err != nil { + return nil, err + } + + switch MessageType(messageTypeInt) { + case StdoutClose, StderrClose, StdinClose: + return &Message{ + messageType: MessageType(messageTypeInt), + }, nil + case StdoutData, StderrData, StdinData: + return &Message{ + messageType: MessageType(messageTypeInt), + data: buf, + }, nil + case ExitCode: + exitCode, err := binary.ReadVarint(buf) + if err != nil { + return nil, fmt.Errorf("read exit code: %w", err) + } + + return &Message{ + messageType: ExitCode, + exitCode: exitCode, + }, nil + default: + return nil, fmt.Errorf("unrecognized message type %b", messageTypeInt) + } +} + +func (m *Message) Bytes() []byte { + return append([]byte{byte(m.messageType)}, m.bytes...) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/remotecommand.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/remotecommand.go new file mode 100644 index 000000000..fea2480f0 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/remotecommand.go @@ -0,0 +1,30 @@ +package remotecommand + +import ( + "context" + "time" + + "github.com/gorilla/websocket" + "k8s.io/klog/v2" +) + +const ( + // Maximum message size allowed from peer. + MaxMessageSize = 2 << 14 +) + +func Ping(ctx context.Context, ws *WebsocketConn) { + defer ws.Close() + + for { + select { + case <-time.After(time.Second * 10): + if err := ws.WriteControl(websocket.PingMessage, []byte{}, time.Now().Add(10*time.Second)); err != nil { + klog.FromContext(ctx).Error(err, "Error sending ping message") + return + } + case <-ctx.Done(): + return + } + } +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/stream.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/stream.go new file mode 100644 index 000000000..ad0026c2e --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/stream.go @@ -0,0 +1,85 @@ +package remotecommand + +import ( + "bytes" + "context" + "fmt" + "io" + + "github.com/gorilla/websocket" + "k8s.io/klog/v2" +) + +func NewStream(ws *WebsocketConn, dataType, closeType MessageType) *Stream { + return &Stream{ + ws: ws, + dataType: dataType, + closeType: closeType, + } +} + +type Stream struct { + ws *WebsocketConn + + dataType MessageType + closeType MessageType +} + +func (s *Stream) Write(ctx context.Context, writer io.WriteCloser) error { + if writer == nil { + return nil + } + + for { + _, raw, err := s.ws.ReadMessage() + if err != nil { + break + } + + message, err := ParseMessage(bytes.NewReader(raw)) + if err != nil { + klog.FromContext(ctx).Error(err, "Unexpected message") + continue + } + + if message.messageType == s.dataType { + if _, err := io.Copy(writer, message.data); err != nil { + break + } + } else if message.messageType == s.closeType { + return writer.Close() + } + } + + return nil +} + +func (s *Stream) Read(reader io.Reader) error { + if reader == nil { + return s.ws.WriteMessage(websocket.BinaryMessage, newCloseMessage(s.closeType).Bytes()) + } + + buf := make([]byte, MaxMessageSize-1) + for { + n, err := reader.Read(buf) + if n > 0 { + err = s.ws.WriteMessage(websocket.BinaryMessage, newDataMessage(s.dataType, buf[:n]).Bytes()) + if err != nil { + //nolint:all + if err == websocket.ErrCloseSent { + return nil + } + + return err + } + } + + //nolint:all + if err == io.EOF { + _ = s.ws.WriteMessage(websocket.BinaryMessage, newCloseMessage(s.closeType).Bytes()) + return nil + } else if err != nil { + return fmt.Errorf("read reader: %w", err) + } + } +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/websocket.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/websocket.go new file mode 100644 index 000000000..4bbd6fbc1 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/remotecommand/websocket.go @@ -0,0 +1,82 @@ +package remotecommand + +import ( + "sync" + "time" + + "github.com/gorilla/websocket" +) + +const ( + // Time allowed to write a message to the peer. + writeWait = 10 * time.Second + + PingWaitDuration = 60 * time.Second +) + +func NewWebsocketConn(ws *websocket.Conn) *WebsocketConn { + conn := &WebsocketConn{ + ws: ws, + } + conn.setupDeadline() + return conn +} + +type WebsocketConn struct { + m sync.Mutex + + ws *websocket.Conn + + closeOnce sync.Once + closeError error +} + +func (w *WebsocketConn) setupDeadline() { + _ = w.ws.SetReadDeadline(time.Now().Add(PingWaitDuration)) + w.ws.SetPingHandler(func(string) error { + w.m.Lock() + err := w.ws.WriteControl(websocket.PongMessage, []byte(""), time.Now().Add(PingWaitDuration)) + w.m.Unlock() + if err != nil { + return err + } + if err := w.ws.SetReadDeadline(time.Now().Add(PingWaitDuration)); err != nil { + return err + } + return w.ws.SetWriteDeadline(time.Now().Add(PingWaitDuration)) + }) + w.ws.SetPongHandler(func(string) error { + if err := w.ws.SetReadDeadline(time.Now().Add(PingWaitDuration)); err != nil { + return err + } + return w.ws.SetWriteDeadline(time.Now().Add(PingWaitDuration)) + }) +} + +func (w *WebsocketConn) ReadMessage() (messageType int, p []byte, err error) { + return w.ws.ReadMessage() +} + +func (w *WebsocketConn) WriteControl(messageType int, data []byte, deadline time.Time) error { + w.m.Lock() + defer w.m.Unlock() + + _ = w.ws.SetWriteDeadline(time.Now().Add(writeWait)) + return w.ws.WriteControl(messageType, data, deadline) +} + +func (w *WebsocketConn) WriteMessage(messageType int, data []byte) error { + w.m.Lock() + defer w.m.Unlock() + + _ = w.ws.SetWriteDeadline(time.Now().Add(writeWait)) + return w.ws.WriteMessage(messageType, data) +} + +func (w *WebsocketConn) Close() error { + w.closeOnce.Do(func() { + w.closeError = w.ws.Close() + }) + + return w.closeError +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/space/space.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/space/space.go new file mode 100644 index 000000000..fbfdd2eaf --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/space/space.go @@ -0,0 +1,92 @@ +package space + +import ( + "context" + "fmt" + "strconv" + "time" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/loftctl/v3/pkg/config" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +var waitDuration = 20 * time.Second + +func WaitForSpaceInstance(ctx context.Context, managementClient kube.Interface, namespace, name string, waitUntilReady bool, log log.Logger) (*managementv1.SpaceInstance, error) { + now := time.Now() + nextMessage := now.Add(waitDuration) + spaceInstance, err := managementClient.Loft().ManagementV1().SpaceInstances(namespace).Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return nil, err + } + + if spaceInstance.Status.Phase == storagev1.InstanceSleeping { + log.Info("Wait until space wakes up") + defer log.Donef("Successfully woken up space %s", name) + err := wakeup(ctx, managementClient, spaceInstance) + if err != nil { + return nil, fmt.Errorf("Error waking up space %s: %s", name, util.GetCause(err)) + } + } + + if !waitUntilReady { + return spaceInstance, nil + } + + warnCounter := 0 + return spaceInstance, wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), true, func(ctx context.Context) (bool, error) { + spaceInstance, err = managementClient.Loft().ManagementV1().SpaceInstances(namespace).Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return false, err + } + + if spaceInstance.Status.Phase != storagev1.InstanceReady && spaceInstance.Status.Phase != storagev1.InstanceSleeping { + if time.Now().After(nextMessage) { + if warnCounter > 1 { + log.Warnf("Cannot reach space because: %s (%s). Loft will continue waiting, but this operation may timeout", spaceInstance.Status.Message, spaceInstance.Status.Reason) + } else { + log.Info("Waiting for space to be available...") + } + nextMessage = time.Now().Add(waitDuration) + warnCounter++ + } + return false, nil + } + + return true, nil + }) +} + +func wakeup(ctx context.Context, managementClient kube.Interface, spaceInstance *managementv1.SpaceInstance) error { + // Update instance to wake up + oldSpaceInstance := spaceInstance.DeepCopy() + if spaceInstance.Annotations == nil { + spaceInstance.Annotations = map[string]string{} + } + delete(spaceInstance.Annotations, clusterv1.SleepModeForceAnnotation) + delete(spaceInstance.Annotations, clusterv1.SleepModeForceDurationAnnotation) + spaceInstance.Annotations[clusterv1.SleepModeLastActivityAnnotation] = strconv.FormatInt(time.Now().Unix(), 10) + + // Calculate patch + patch := client.MergeFrom(oldSpaceInstance) + patchData, err := patch.Data(spaceInstance) + if err != nil { + return err + } + + // Patch the instance + _, err = managementClient.Loft().ManagementV1().SpaceInstances(spaceInstance.Namespace).Patch(ctx, spaceInstance.Name, patch.Type(), patchData, metav1.PatchOptions{}) + if err != nil { + return err + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/start/docker.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/docker.go new file mode 100644 index 000000000..24a84d2e5 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/docker.go @@ -0,0 +1,438 @@ +package start + +import ( + "bytes" + "context" + "crypto/hmac" + "crypto/sha256" + "encoding/json" + "errors" + "fmt" + "os" + "os/exec" + "strings" + "time" + + "github.com/denisbrodbeck/machineid" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/log" + "github.com/loft-sh/log/hash" + "github.com/loft-sh/log/scanner" + "github.com/mgutz/ansi" + "github.com/mitchellh/go-homedir" + "github.com/sirupsen/logrus" + "k8s.io/apimachinery/pkg/util/wait" +) + +var ( + ErrMissingContainer = errors.New("missing container") + ErrLoftNotReachable = errors.New("product is not reachable") +) + +type ContainerDetails struct { + ID string `json:"ID,omitempty"` + Created string `json:"Created,omitempty"` + State ContainerDetailsState `json:"State,omitempty"` + Config ContainerDetailsConfig `json:"Config,omitempty"` + NetworkSettings ContainerNetworkSettings `json:"NetworkSettings,omitempty"` +} + +type ContainerNetworkSettings struct { + Ports map[string][]ContainerPort `json:"ports,omitempty"` +} + +type ContainerPort struct { + HostIP string `json:"HostIp,omitempty"` + HostPort string `json:"HostPort,omitempty"` +} + +type ContainerDetailsConfig struct { + Image string `json:"Image,omitempty"` + User string `json:"User,omitempty"` + Env []string `json:"Env,omitempty"` + Labels map[string]string `json:"Labels,omitempty"` +} + +type ContainerDetailsState struct { + Status string `json:"Status,omitempty"` + StartedAt string `json:"StartedAt,omitempty"` +} + +func (l *LoftStarter) startDocker(ctx context.Context, name string) error { + l.Log.Infof(product.Replace("Starting loft in Docker...")) + + // prepare installation + err := l.prepareDocker() + if err != nil { + return err + } + + // try to find loft container + containerID, err := l.findLoftContainer(ctx, name, true) + if err != nil { + return err + } + + // check if container is there + if containerID != "" && (l.Reset || l.Upgrade) { + l.Log.Info(product.Replace("Existing Loft instance found.")) + err = l.uninstallDocker(ctx, containerID) + if err != nil { + return err + } + + containerID = "" + } + + // Use default password if none is set + if l.Password == "" { + l.Password = getMachineUID(l.Log) + } + + // check if is installed + if containerID != "" { + l.Log.Info(product.Replace("Existing Loft instance found. Run with --upgrade to apply new configuration")) + return l.successDocker(ctx, containerID) + } + + // Install Loft + l.Log.Info(product.Replace("Welcome to Loft!")) + l.Log.Info(product.Replace("This installer will help you configure and deploy Loft.")) + + // Get email + email, err := l.getEmail() + if err != nil { + return err + } + + // make sure we are ready for installing + containerID, err = l.runLoftInDocker(ctx, name, email) + if err != nil { + return err + } else if containerID == "" { + return fmt.Errorf("%w: %s", ErrMissingContainer, product.Replace("couldn't find Loft container after starting it")) + } + + return l.successDocker(ctx, containerID) +} + +func (l *LoftStarter) successDocker(ctx context.Context, containerID string) error { + if l.NoWait { + return nil + } + + // wait until Loft is ready + host, err := l.waitForLoftDocker(ctx, containerID) + if err != nil { + return err + } + + // wait for domain to become reachable + l.Log.Infof(product.Replace("Wait for Loft to become available at %s..."), host) + err = wait.PollUntilContextTimeout(ctx, time.Second, time.Minute*10, true, func(ctx context.Context) (bool, error) { + containerDetails, err := l.inspectContainer(ctx, containerID) + if err != nil { + return false, fmt.Errorf("inspect loft container: %w", err) + } else if strings.ToLower(containerDetails.State.Status) == "exited" || strings.ToLower(containerDetails.State.Status) == "dead" { + logs, _ := l.logsContainer(ctx, containerID) + return false, fmt.Errorf("container failed (status: %s):\n %s", containerDetails.State.Status, logs) + } + + return clihelper.IsLoftReachable(ctx, host) + }) + if err != nil { + return fmt.Errorf(product.Replace("error waiting for loft: %v%w"), err) + } + + // print success message + PrintSuccessMessageDockerInstall(host, l.Password, l.Log) + return nil +} + +func PrintSuccessMessageDockerInstall(host, password string, log log.Logger) { + url := "https://" + host + log.WriteString(logrus.InfoLevel, fmt.Sprintf(product.Replace(` + + +########################## LOGIN ############################ + +Username: `+ansi.Color("admin", "green+b")+` +Password: `+ansi.Color(password, "green+b")+` + +Login via UI: %s +Login via CLI: %s + +################################################################# + +Loft was successfully installed and can now be reached at: %s + +Thanks for using Loft! +`), + ansi.Color(url, "green+b"), + ansi.Color(product.Replace(`loft login `)+url, "green+b"), + url, + )) +} + +func (l *LoftStarter) waitForLoftDocker(ctx context.Context, containerID string) (string, error) { + l.Log.Info(product.Replace("Wait for Loft to become available...")) + + // check for local port + containerDetails, err := l.inspectContainer(ctx, containerID) + if err != nil { + return "", err + } else if len(containerDetails.NetworkSettings.Ports) > 0 && len(containerDetails.NetworkSettings.Ports["10443/tcp"]) > 0 { + return "localhost:" + containerDetails.NetworkSettings.Ports["10443/tcp"][0].HostPort, nil + } + + // check if no tunnel + if l.NoTunnel { + return "", fmt.Errorf("%w: %s", ErrLoftNotReachable, product.Replace("cannot connect to Loft as it has no exposed port and --no-tunnel is enabled")) + } + + // wait for router + url := "" + waitErr := wait.PollUntilContextTimeout(ctx, time.Second, time.Minute*10, true, func(ctx context.Context) (bool, error) { + url, err = l.findLoftRouter(ctx, containerID) + if err != nil { + return false, nil + } + + return true, nil + }) + if waitErr != nil { + return "", fmt.Errorf("error waiting for loft router domain: %w", err) + } + + return url, nil +} + +func (l *LoftStarter) findLoftRouter(ctx context.Context, id string) (string, error) { + out, err := l.buildDockerCmd(ctx, "exec", id, "cat", "/var/lib/loft/loft-domain.txt").Output() + if err != nil { + return "", WrapCommandError(out, err) + } + + return strings.TrimSpace(string(out)), nil +} + +func (l *LoftStarter) prepareDocker() error { + // test for helm and kubectl + _, err := exec.LookPath("docker") + if err != nil { + return fmt.Errorf("seems like docker is not installed. Docker is required for the installation of loft. Please visit https://docs.docker.com/engine/install/ for install instructions") + } + + output, err := exec.Command("docker", "ps").CombinedOutput() + if err != nil { + return fmt.Errorf("seems like there are issues with your docker cli: \n\n%s", output) + } + + return nil +} + +func (l *LoftStarter) uninstallDocker(ctx context.Context, id string) error { + l.Log.Infof(product.Replace("Uninstalling loft...")) + + // stop container + out, err := l.buildDockerCmd(ctx, "stop", id).Output() + if err != nil { + return fmt.Errorf("stop container: %w", WrapCommandError(out, err)) + } + + // remove container + out, err = l.buildDockerCmd(ctx, "rm", id).Output() + if err != nil { + return fmt.Errorf("remove container: %w", WrapCommandError(out, err)) + } + + return nil +} + +func (l *LoftStarter) runLoftInDocker(ctx context.Context, name, email string) (string, error) { + args := []string{"run", "-d", "--name", name} + if l.NoTunnel { + args = append(args, "--env", "DISABLE_LOFT_ROUTER=true") + } + if l.Password != "" { + args = append(args, "--env", "ADMIN_PASSWORD_HASH="+hash.String(l.Password)) + } + if email != "" { + args = append(args, "--env", "ADMIN_EMAIL="+email) + } + if l.Product != "" { + args = append(args, "--env", "PRODUCT="+l.Product) + if l.Product == "devpod-pro" { + // run docker in docker + args = append(args, "--env", "LOFT_DIND=true") + args = append(args, "-v", "loft-docker:/var/lib/docker") + args = append(args, "--privileged") + } + } + + // run as root otherwise we get permission errors + args = append(args, "-u", "root") + + // mount the loft lib + args = append(args, "-v", "loft-data:/var/lib/loft") + + // set port + if l.LocalPort != "" { + args = append(args, "-p", l.LocalPort+":10443") + } + + // set extra args + args = append(args, l.DockerArgs...) + + // set image + if l.DockerImage != "" { + args = append(args, l.DockerImage) + } else if l.Version != "" { + args = append(args, "ghcr.io/loft-sh/loft:"+strings.TrimPrefix(l.Version, "v")) + } else { + args = append(args, "ghcr.io/loft-sh/loft:latest") + } + + l.Log.Infof("Start Loft via 'docker %s'", strings.Join(args, " ")) + runCmd := l.buildDockerCmd(ctx, args...) + runCmd.Stdout = os.Stdout + runCmd.Stderr = os.Stderr + err := runCmd.Run() + if err != nil { + return "", err + } + + return l.findLoftContainer(ctx, name, false) +} + +func (l *LoftStarter) logsContainer(ctx context.Context, id string) (string, error) { + args := []string{"logs", id} + out, err := l.buildDockerCmd(ctx, args...).CombinedOutput() + if err != nil { + return "", fmt.Errorf("logs container: %w", WrapCommandError(out, err)) + } + + return string(out), nil +} + +func (l *LoftStarter) inspectContainer(ctx context.Context, id string) (*ContainerDetails, error) { + args := []string{"inspect", "--type", "container", id} + out, err := l.buildDockerCmd(ctx, args...).Output() + if err != nil { + return nil, fmt.Errorf("inspect container: %w", WrapCommandError(out, err)) + } + + containerDetails := []*ContainerDetails{} + err = json.Unmarshal(out, &containerDetails) + if err != nil { + return nil, fmt.Errorf("parse inspect output: %w", err) + } else if len(containerDetails) == 0 { + return nil, fmt.Errorf("coudln't find container %s", id) + } + + return containerDetails[0], nil +} + +func (l *LoftStarter) removeContainer(ctx context.Context, id string) error { + args := []string{"rm", id} + out, err := l.buildDockerCmd(ctx, args...).Output() + if err != nil { + return fmt.Errorf("remove container: %w", WrapCommandError(out, err)) + } + + return nil +} + +func (l *LoftStarter) findLoftContainer(ctx context.Context, name string, onlyRunning bool) (string, error) { + args := []string{"ps", "-q", "-a", "-f", "name=^" + name + "$"} + out, err := l.buildDockerCmd(ctx, args...).Output() + if err != nil { + // fallback to manual search + return "", fmt.Errorf("error finding container: %w", WrapCommandError(out, err)) + } + + arr := []string{} + scan := scanner.NewScanner(bytes.NewReader(out)) + for scan.Scan() { + arr = append(arr, strings.TrimSpace(scan.Text())) + } + if len(arr) == 0 { + return "", nil + } + + // remove the failed / exited containers + runningContainerID := "" + for _, containerID := range arr { + containerState, err := l.inspectContainer(ctx, containerID) + if err != nil { + return "", err + } else if onlyRunning && strings.ToLower(containerState.State.Status) != "running" { + err = l.removeContainer(ctx, containerID) + if err != nil { + return "", err + } + } else { + runningContainerID = containerID + } + } + + return runningContainerID, nil +} + +func (l *LoftStarter) buildDockerCmd(ctx context.Context, args ...string) *exec.Cmd { + cmd := exec.CommandContext(ctx, "docker", args...) + return cmd +} + +func WrapCommandError(stdout []byte, err error) error { + if err == nil { + return nil + } + + return &Error{ + stdout: stdout, + err: err, + } +} + +type Error struct { + stdout []byte + err error +} + +func (e *Error) Error() string { + message := "" + if len(e.stdout) > 0 { + message += string(e.stdout) + "\n" + } + + var exitError *exec.ExitError + if errors.As(e.err, &exitError) && len(exitError.Stderr) > 0 { + message += string(exitError.Stderr) + "\n" + } + + return message + e.err.Error() +} + +func getMachineUID(log log.Logger) string { + id, err := machineid.ID() + if err != nil { + id = "error" + if log != nil { + log.Debugf("Error retrieving machine uid: %v", err) + } + } + // get $HOME to distinguish two users on the same machine + // will be hashed later together with the ID + home, err := homedir.Dir() + if err != nil { + home = "error" + if log != nil { + log.Debugf("Error retrieving machine home: %v", err) + } + } + mac := hmac.New(sha256.New, []byte(id)) + mac.Write([]byte(home)) + return fmt.Sprintf("%x", mac.Sum(nil)) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/start/login.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/login.go new file mode 100644 index 000000000..6a5d45d61 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/login.go @@ -0,0 +1,104 @@ +package start + +import ( + "bytes" + "crypto/tls" + "encoding/json" + "fmt" + "io" + "net/http" + netUrl "net/url" + "strings" + + types "github.com/loft-sh/api/v3/pkg/auth" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/mgutz/ansi" + "github.com/sirupsen/logrus" + "github.com/skratchdot/open-golang/open" +) + +const defaultUser = "admin" + +func (l *LoftStarter) login(url string) error { + err := l.loginViaCLI(url) + if err != nil { + return err + } + + err = l.loginUI(url) + if err != nil { + return err + } + + return nil +} + +func (l *LoftStarter) loginViaCLI(url string) error { + loginPath := "%s/auth/password/login" + + loginRequest := types.PasswordLoginRequest{ + Username: defaultUser, + Password: l.Password, + } + + loginRequestBytes, err := json.Marshal(loginRequest) + if err != nil { + return err + } + + loginRequestBuf := bytes.NewBuffer(loginRequestBytes) + + tr := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + httpClient := &http.Client{Transport: tr} + + resp, err := httpClient.Post(fmt.Sprintf(loginPath, url), "application/json", loginRequestBuf) + if err != nil { + return err + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + return err + } + + accessKey := &types.AccessKey{} + err = json.Unmarshal(body, accessKey) + if err != nil { + return err + } + + // log into loft + loader, err := client.NewClientFromPath(l.Config) + if err != nil { + return err + } + + url = strings.TrimSuffix(url, "/") + err = loader.LoginWithAccessKey(url, accessKey.AccessKey, true) + if err != nil { + return err + } + + l.Log.WriteString(logrus.InfoLevel, "\n") + l.Log.Donef(product.Replace("Successfully logged in via CLI into Loft instance %s"), ansi.Color(url, "white+b")) + + return nil +} + +func (l *LoftStarter) loginUI(url string) error { + queryString := fmt.Sprintf("username=%s&password=%s", defaultUser, netUrl.QueryEscape(l.Password)) + loginURL := fmt.Sprintf("%s/login#%s", url, queryString) + + err := open.Run(loginURL) + if err != nil { + return fmt.Errorf("couldn't open the login page in a browser: %w.", err) + } + + l.Log.Infof("If the browser does not open automatically, please navigate to %s", loginURL) + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/start/port_forwarding.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/port_forwarding.go new file mode 100644 index 000000000..1be6d0262 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/port_forwarding.go @@ -0,0 +1,72 @@ +package start + +import ( + "context" + "crypto/tls" + "net/http" + "time" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/loftctl/v3/pkg/config" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/wait" +) + +func (l *LoftStarter) startPortForwarding(ctx context.Context, loftPod *corev1.Pod) error { + stopChan, err := clihelper.StartPortForwarding(ctx, l.RestConfig, l.KubeClient, loftPod, l.LocalPort, l.Log) + if err != nil { + return err + } + go l.restartPortForwarding(ctx, stopChan) + + // wait until loft is reachable at the given url + httpClient := &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, + }, + }, + } + l.Log.Infof(product.Replace("Waiting until loft is reachable at https://localhost:%s"), l.LocalPort) + err = wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), true, func(ctx context.Context) (bool, error) { + req, err := http.NewRequestWithContext(ctx, http.MethodGet, "https://localhost:"+l.LocalPort+"/version", nil) + if err != nil { + return false, nil + } + + resp, err := httpClient.Do(req) + if err != nil { + return false, nil + } + + return resp.StatusCode == http.StatusOK, nil + }) + if err != nil { + return err + } + + return nil +} + +func (l *LoftStarter) restartPortForwarding(ctx context.Context, stopChan chan struct{}) { + for { + <-stopChan + l.Log.Info("Restart port forwarding") + + // wait for loft pod to start + l.Log.Info(product.Replace("Waiting until loft pod has been started...")) + loftPod, err := clihelper.WaitForReadyLoftPod(ctx, l.KubeClient, l.Namespace, l.Log) + if err != nil { + l.Log.Fatalf(product.Replace("Error waiting for ready loft pod: %v"), err) + } + + // restart port forwarding + stopChan, err = clihelper.StartPortForwarding(ctx, l.RestConfig, l.KubeClient, loftPod, l.LocalPort, l.Log) + if err != nil { + l.Log.Fatalf("Error starting port forwarding: %v", err) + } + + l.Log.Donef("Successfully restarted port forwarding") + } +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/start/start.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/start.go new file mode 100644 index 000000000..cac9a4827 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/start.go @@ -0,0 +1,350 @@ +package start + +import ( + "context" + "fmt" + "os" + "os/exec" + "regexp" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/cmd/loftctl/flags" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/log" + "github.com/loft-sh/log/survey" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/kubectl/pkg/util/term" +) + +var ( + ErrMissingEmail = errors.New("missing email") +) + +var emailRegex = regexp.MustCompile(`^[^@]+@[^\.]+\..+$`) + +// Options holds the cmd flags +type Options struct { + *flags.GlobalFlags + + Docker bool + DockerArgs []string + DockerImage string + + Product string + + LocalPort string + Host string + Reset bool + Version string + Context string + Namespace string + Password string + Values string + Email string + ReuseValues bool + Upgrade bool + + ChartName string + ChartPath string + ChartRepo string + + NoWait bool + NoPortForwarding bool + NoTunnel bool + NoLogin bool + + // Will be filled later + KubeClient kubernetes.Interface + RestConfig *rest.Config + Log log.Logger +} + +func NewLoftStarter(options Options) *LoftStarter { + return &LoftStarter{ + Options: options, + } +} + +type LoftStarter struct { + Options +} + +// Start executes the functionality "loft start" +func (l *LoftStarter) Start(ctx context.Context) error { + // start in Docker? + if l.Docker { + return l.startDocker(ctx, "loft") + } + + // only set local port by default in kubernetes installation + if l.LocalPort == "" { + l.LocalPort = "9898" + } + + err := l.prepare() + if err != nil { + return err + } + l.Log.WriteString(logrus.InfoLevel, "\n") + + // Uninstall already existing Loft instance + if l.Reset { + err = clihelper.UninstallLoft(ctx, l.KubeClient, l.RestConfig, l.Context, l.Namespace, l.Log) + if err != nil { + return err + } + } + + // Is already installed? + isInstalled, err := clihelper.IsLoftAlreadyInstalled(ctx, l.KubeClient, l.Namespace) + if err != nil { + return err + } + + // Use default password if none is set + if l.Password == "" { + defaultPassword, err := clihelper.GetLoftDefaultPassword(ctx, l.KubeClient, l.Namespace) + if err != nil { + return err + } + + l.Password = defaultPassword + } + + // Upgrade Loft if already installed + if isInstalled { + return l.handleAlreadyExistingInstallation(ctx) + } + + // Install Loft + l.Log.Info(product.Replace("Welcome to Loft!")) + l.Log.Info(product.Replace("This installer will help you configure and deploy Loft.")) + + // Get email + email, err := l.getEmail() + if err != nil { + return err + } + + // make sure we are ready for installing + err = l.prepareInstall(ctx) + if err != nil { + return err + } + + err = l.upgradeLoft(email) + if err != nil { + return err + } + + return l.success(ctx) +} + +func (l *LoftStarter) getEmail() (string, error) { + var err error + + email := l.Email + if email == "" { + if !term.IsTerminal(os.Stdin) { + return "", fmt.Errorf("%w: %s", ErrMissingEmail, product.Replace("please enter an email via 'loft start --email my-email@domain.com'")) + } + + email, err = l.Log.Question(&survey.QuestionOptions{ + Question: "Enter your email address to create the login for your admin user", + ValidationFunc: func(emailVal string) error { + if !emailRegex.MatchString(emailVal) { + return fmt.Errorf("%s is not a valid email address", emailVal) + } + return nil + }, + }) + if err != nil { + return "", err + } + } + + return email, nil +} + +func (l *LoftStarter) prepareInstall(ctx context.Context) error { + // delete admin user & secret + return clihelper.UninstallLoft(ctx, l.KubeClient, l.RestConfig, l.Context, l.Namespace, log.Discard) +} + +func (l *LoftStarter) prepare() error { + loader, err := client.NewClientFromPath(l.Config) + if err != nil { + return err + } + loftConfig := loader.Config() + + // first load the kube config + kubeClientConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(clientcmd.NewDefaultClientConfigLoadingRules(), &clientcmd.ConfigOverrides{}) + + // load the raw config + kubeConfig, err := kubeClientConfig.RawConfig() + if err != nil { + return fmt.Errorf("there is an error loading your current kube config (%w), please make sure you have access to a kubernetes cluster and the command `kubectl get namespaces` is working", err) + } + + // we switch the context to the install config + contextToLoad := kubeConfig.CurrentContext + if l.Context != "" { + contextToLoad = l.Context + } else if loftConfig.LastInstallContext != "" && loftConfig.LastInstallContext != contextToLoad { + contextToLoad, err = l.Log.Question(&survey.QuestionOptions{ + Question: product.Replace("Seems like you try to use 'loft start' with a different kubernetes context than before. Please choose which kubernetes context you want to use"), + DefaultValue: contextToLoad, + Options: []string{contextToLoad, loftConfig.LastInstallContext}, + }) + if err != nil { + return err + } + } + l.Context = contextToLoad + + loftConfig.LastInstallContext = contextToLoad + _ = loader.Save() + + // kube client config + kubeClientConfig = clientcmd.NewNonInteractiveClientConfig(kubeConfig, contextToLoad, &clientcmd.ConfigOverrides{}, clientcmd.NewDefaultClientConfigLoadingRules()) + + // test for helm and kubectl + _, err = exec.LookPath("helm") + if err != nil { + return fmt.Errorf("seems like helm is not installed. Helm is required for the installation of loft. Please visit https://helm.sh/docs/intro/install/ for install instructions") + } + + output, err := exec.Command("helm", "version").CombinedOutput() + if err != nil { + return fmt.Errorf("seems like there are issues with your helm client: \n\n%s", output) + } + + _, err = exec.LookPath("kubectl") + if err != nil { + return fmt.Errorf("seems like kubectl is not installed. Kubectl is required for the installation of loft. Please visit https://kubernetes.io/docs/tasks/tools/install-kubectl/ for install instructions") + } + + output, err = exec.Command("kubectl", "version", "--context", contextToLoad).CombinedOutput() + if err != nil { + return fmt.Errorf("seems like kubectl cannot connect to your Kubernetes cluster: \n\n%s", output) + } + + l.RestConfig, err = kubeClientConfig.ClientConfig() + if err != nil { + return fmt.Errorf("there is an error loading your current kube config (%w), please make sure you have access to a kubernetes cluster and the command `kubectl get namespaces` is working", err) + } + l.KubeClient, err = kubernetes.NewForConfig(l.RestConfig) + if err != nil { + return fmt.Errorf("there is an error loading your current kube config (%w), please make sure you have access to a kubernetes cluster and the command `kubectl get namespaces` is working", err) + } + + // Check if cluster has RBAC correctly configured + _, err = l.KubeClient.RbacV1().ClusterRoles().Get(context.Background(), "cluster-admin", metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("error retrieving cluster role 'cluster-admin': %w. Please make sure RBAC is correctly configured in your cluster", err) + } + + return nil +} + +func (l *LoftStarter) handleAlreadyExistingInstallation(ctx context.Context) error { + enableIngress := false + + // Only ask if ingress should be enabled if --upgrade flag is not provided + if !l.Upgrade && term.IsTerminal(os.Stdin) { + l.Log.Info(product.Replace("Existing Loft instance found.")) + + // Check if Loft is installed in a local cluster + isLocal := clihelper.IsLoftInstalledLocally(ctx, l.KubeClient, l.Namespace) + + // Skip question if --host flag is provided + if l.Host != "" { + enableIngress = true + } + + if enableIngress { + if isLocal { + // Confirm with user if this is a local cluster + const ( + YesOption = "Yes" + NoOption = "No, my cluster is running not locally (GKE, EKS, Bare Metal, etc.)" + ) + + answer, err := l.Log.Question(&survey.QuestionOptions{ + Question: "Seems like your cluster is running locally (docker desktop, minikube, kind etc.). Is that correct?", + DefaultValue: YesOption, + Options: []string{ + YesOption, + NoOption, + }, + }) + if err != nil { + return err + } + + isLocal = answer == YesOption + } + + if isLocal { + // Confirm with user if ingress should be installed in local cluster + var ( + YesOption = product.Replace("Yes, enable the ingress for Loft anyway") + NoOption = "No" + ) + + answer, err := l.Log.Question(&survey.QuestionOptions{ + Question: product.Replace("Enabling ingress is usually only useful for remote clusters. Do you still want to deploy the ingress for Loft to your local cluster?"), + DefaultValue: NoOption, + Options: []string{ + NoOption, + YesOption, + }, + }) + if err != nil { + return err + } + + enableIngress = answer == YesOption + } + } + + // Check if we need to enable ingress + if enableIngress { + // Ask for hostname if --host flag is not provided + if l.Host == "" { + host, err := clihelper.EnterHostNameQuestion(l.Log) + if err != nil { + return err + } + + l.Host = host + } else { + l.Log.Info(product.Replace("Will enable Loft ingress with hostname: ") + l.Host) + } + + if term.IsTerminal(os.Stdin) { + err := clihelper.EnsureIngressController(ctx, l.KubeClient, l.Context, l.Log) + if err != nil { + return errors.Wrap(err, "install ingress controller") + } + } + } + } + + // Only upgrade if --upgrade flag is present or user decided to enable ingress + if l.Upgrade || enableIngress { + err := l.upgradeLoft("") + if err != nil { + return err + } + } + + return l.success(ctx) +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/start/success.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/success.go new file mode 100644 index 000000000..ae2a203f0 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/success.go @@ -0,0 +1,207 @@ +package start + +import ( + "context" + "crypto/tls" + "fmt" + "net/http" + "time" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/loft-sh/loftctl/v3/pkg/config" + "github.com/loft-sh/loftctl/v3/pkg/printhelper" + "github.com/loft-sh/log/survey" + corev1 "k8s.io/api/core/v1" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" +) + +func (l *LoftStarter) success(ctx context.Context) error { + if l.NoWait { + return nil + } + + // wait until Loft is ready + loftPod, err := l.waitForLoft(ctx) + if err != nil { + return err + } + + if l.NoPortForwarding { + return nil + } + + // check if Loft was installed locally + isLocal := clihelper.IsLoftInstalledLocally(ctx, l.KubeClient, l.Namespace) + if isLocal { + // check if loft domain secret is there + if !l.NoTunnel { + loftRouterDomain, err := l.pingLoftRouter(ctx, loftPod) + if err != nil { + l.Log.Errorf("Error retrieving loft router domain: %v", err) + l.Log.Info("Fallback to use port-forwarding") + } else if loftRouterDomain != "" { + printhelper.PrintSuccessMessageLoftRouterInstall(loftRouterDomain, l.Password, l.Log) + return nil + } + } + + // start port-forwarding + err = l.startPortForwarding(ctx, loftPod) + if err != nil { + return err + } + + return l.successLocal() + } + + // get login link + l.Log.Info("Checking Loft status...") + host, err := clihelper.GetLoftIngressHost(ctx, l.KubeClient, l.Namespace) + if err != nil { + return err + } + + // check if loft is reachable + reachable, err := clihelper.IsLoftReachable(ctx, host) + if !reachable || err != nil { + const ( + YesOption = "Yes" + NoOption = "No, please re-run the DNS check" + ) + + answer, err := l.Log.Question(&survey.QuestionOptions{ + Question: "Unable to reach Loft at https://" + host + ". Do you want to start port-forwarding instead?", + DefaultValue: YesOption, + Options: []string{ + YesOption, + NoOption, + }, + }) + if err != nil { + return err + } + + if answer == YesOption { + err = l.startPortForwarding(ctx, loftPod) + if err != nil { + return err + } + + return l.successLocal() + } + } + + return l.successRemote(ctx, host) +} + +func (l *LoftStarter) pingLoftRouter(ctx context.Context, loftPod *corev1.Pod) (string, error) { + loftRouterSecret, err := l.KubeClient.CoreV1().Secrets(loftPod.Namespace).Get(ctx, clihelper.LoftRouterDomainSecret, metav1.GetOptions{}) + if err != nil { + if kerrors.IsNotFound(err) { + return "", nil + } + + return "", fmt.Errorf("find loft router domain secret: %w", err) + } else if loftRouterSecret.Data == nil || len(loftRouterSecret.Data["domain"]) == 0 { + return "", nil + } + + // get the domain from secret + loftRouterDomain := string(loftRouterSecret.Data["domain"]) + + // wait until loft is reachable at the given url + httpClient := &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, + }, + }, + } + l.Log.Infof(product.Replace("Waiting until loft is reachable at https://%s"), loftRouterDomain) + err = wait.PollUntilContextTimeout(ctx, time.Second*3, time.Minute*5, true, func(ctx context.Context) (bool, error) { + req, err := http.NewRequestWithContext(ctx, http.MethodGet, "https://"+loftRouterDomain+"/version", nil) + if err != nil { + return false, nil + } + + resp, err := httpClient.Do(req) + if err != nil { + return false, nil + } + + return resp.StatusCode == http.StatusOK, nil + }) + if err != nil { + return "", err + } + + return loftRouterDomain, nil +} + +func (l *LoftStarter) successLocal() error { + url := "https://localhost:" + l.LocalPort + + if !l.NoLogin { + err := l.login(url) + if err != nil { + return err + } + } + + printhelper.PrintSuccessMessageLocalInstall(l.Password, url, l.Log) + + blockChan := make(chan bool) + <-blockChan + return nil +} + +func (l *LoftStarter) successRemote(ctx context.Context, host string) error { + ready, err := clihelper.IsLoftReachable(ctx, host) + if err != nil { + return err + } else if ready { + printhelper.PrintSuccessMessageRemoteInstall(host, l.Password, l.Log) + return nil + } + + // Print DNS Configuration + printhelper.PrintDNSConfiguration(host, l.Log) + + l.Log.Info("Waiting for you to configure DNS, so loft can be reached on https://" + host) + err = wait.PollUntilContextTimeout(ctx, 5*time.Second, config.Timeout(), true, func(ctx context.Context) (done bool, err error) { + return clihelper.IsLoftReachable(ctx, host) + }) + if err != nil { + return err + } + + l.Log.Done(product.Replace("Loft is reachable at https://") + host) + printhelper.PrintSuccessMessageRemoteInstall(host, l.Password, l.Log) + return nil +} + +func (l *LoftStarter) waitForLoft(ctx context.Context) (*corev1.Pod, error) { + // wait for loft pod to start + l.Log.Info(product.Replace("Waiting for Loft pod to be running...")) + loftPod, err := clihelper.WaitForReadyLoftPod(ctx, l.KubeClient, l.Namespace, l.Log) + l.Log.Donef(product.Replace("Loft pod successfully started")) + if err != nil { + return nil, err + } + + // ensure user admin secret is there + isNewPassword, err := clihelper.EnsureAdminPassword(ctx, l.KubeClient, l.RestConfig, l.Password, l.Log) + if err != nil { + return nil, err + } + + // If password is different than expected + if isNewPassword { + l.Password = "" + } + + return loftPod, nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/start/upgrade.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/upgrade.go new file mode 100644 index 000000000..b7c3106ae --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/start/upgrade.go @@ -0,0 +1,94 @@ +package start + +import ( + "bytes" + "fmt" + "os" + "os/exec" + "path/filepath" + + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/loftctl/v3/pkg/clihelper" + "github.com/mgutz/ansi" + "github.com/pkg/errors" +) + +func (l *LoftStarter) upgradeLoft(email string) error { + extraArgs := []string{} + if email != "" { + extraArgs = append(extraArgs, "--set", "admin.email="+email) + } + if l.NoTunnel { + extraArgs = append(extraArgs, "--set-string", "env.DISABLE_LOFT_ROUTER=true") + } + if l.Password != "" { + extraArgs = append(extraArgs, "--set", "admin.password="+l.Password) + } + if l.Host != "" { + extraArgs = append(extraArgs, "--set", "ingress.enabled=true", "--set", "ingress.host="+l.Host) + } + if l.Version != "" { + extraArgs = append(extraArgs, "--version", l.Version) + } + if l.Product != "" { + extraArgs = append(extraArgs, "--set", "env.PRODUCT="+l.Product) + if l.Product == "devpod-pro" { + extraArgs = append(extraArgs, "--set", "persistence.enabled=true") + } + } + + // Do not use --reuse-values if --reset flag is provided because this should be a new install and it will cause issues with `helm template` + if !l.Reset && l.ReuseValues { + extraArgs = append(extraArgs, "--reuse-values") + } + + if l.Values != "" { + absValuesPath, err := filepath.Abs(l.Values) + if err != nil { + return err + } + extraArgs = append(extraArgs, "--values", absValuesPath) + } + + chartName := l.ChartPath + chartRepo := "" + if chartName == "" { + chartName = l.ChartName + chartRepo = l.ChartRepo + } + + err := clihelper.UpgradeLoft(chartName, chartRepo, l.Context, l.Namespace, extraArgs, l.Log) + if err != nil { + if !l.Reset { + return errors.New(err.Error() + product.Replace(fmt.Sprintf("\n\nIf want to purge and reinstall Loft, run: %s\n", ansi.Color("loft start --reset", "green+b")))) + } + + // Try to purge Loft and retry install + l.Log.Info(product.Replace("Trying to delete objects blocking Loft installation")) + + manifests, err := clihelper.GetLoftManifests(chartName, chartRepo, l.Context, l.Namespace, extraArgs, l.Log) + if err != nil { + return err + } + + kubectlDelete := exec.Command("kubectl", "delete", "-f", "-", "--ignore-not-found=true", "--grace-period=0", "--force") + + buffer := bytes.Buffer{} + buffer.Write([]byte(manifests)) + + kubectlDelete.Stdin = &buffer + kubectlDelete.Stdout = os.Stdout + kubectlDelete.Stderr = os.Stderr + + // Ignoring potential errors here + _ = kubectlDelete.Run() + + // Retry Loft installation + err = clihelper.UpgradeLoft(chartName, chartRepo, l.Context, l.Namespace, extraArgs, l.Log) + if err != nil { + return errors.New(err.Error() + product.Replace(fmt.Sprintf("\n\nLoft installation failed. Reach out to get help:\n- via Slack: %s (fastest option)\n- via Online Chat: %s\n- via Email: %s\n", ansi.Color("https://slack.loft.sh/", "green+b"), ansi.Color("https://loft.sh/", "green+b"), ansi.Color("support@loft.sh", "green+b")))) + } + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/task/stream.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/task/stream.go new file mode 100644 index 000000000..093b9d6b7 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/task/stream.go @@ -0,0 +1,123 @@ +package task + +import ( + "context" + "encoding/json" + "fmt" + "io" + "os" + "os/signal" + "syscall" + "time" + + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + "github.com/loft-sh/apiserver/pkg/builders" + "github.com/loft-sh/loftctl/v3/pkg/config" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/log" + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/wait" + + _ "github.com/loft-sh/api/v3/pkg/apis/management/install" // Install the management group +) + +func StreamTask(ctx context.Context, managementClient kube.Interface, task *managementv1.Task, out io.Writer, log log.Logger) (err error) { + // cleanup on ctrl+c + c := make(chan os.Signal, 1) + signal.Notify(c, os.Interrupt, syscall.SIGTERM) + go func() { + <-c + _ = managementClient.Loft().ManagementV1().Tasks().Delete(context.TODO(), task.Name, metav1.DeleteOptions{}) + os.Exit(1) + }() + + defer func() { + signal.Stop(c) + }() + + log.Infof("Waiting for task to start...") + createdTask, err := managementClient.Loft().ManagementV1().Tasks().Create(ctx, task, metav1.CreateOptions{}) + if err != nil { + return errors.Wrap(err, "create task") + } + + // wait for the task to be ready + err = wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), true, func(ctx context.Context) (done bool, err error) { + task, err := managementClient.Loft().ManagementV1().Tasks().Get(ctx, createdTask.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + if task.Status.PodPhase == corev1.PodSucceeded || task.Status.PodPhase == corev1.PodFailed { + return true, nil + } + if task.Status.PodPhase == corev1.PodRunning && task.Status.ContainerState != nil && task.Status.ContainerState.Ready { + return true, nil + } + + return false, nil + }) + if err != nil { + // compile an understandable error message + task, err := managementClient.Loft().ManagementV1().Tasks().Get(ctx, createdTask.Name, metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("the task couldn't be retrieved from server: %w", err) + } + + // task pending + if task.Status.PodPhase == corev1.PodPending { + if task.Status.ContainerState != nil && task.Status.ContainerState.State.Waiting != nil { + return fmt.Errorf("the task is still pending which means that there was a problem starting a pod in the host cluster. The task container is pending because: %s (%s). For more information please take a look in the namespace loft-tasks in the Loft management cluster", task.Status.ContainerState.State.Waiting.Message, task.Status.ContainerState.State.Waiting.Reason) + } + + return fmt.Errorf("the task is still pending which means that there was a problem starting a pod in the host cluster. Please check the pods in namespace loft-tasks in the Loft management cluster as well as any events there that might indicate an error why this task couldn't be started") + } + + if task.Status.ContainerState != nil { + out, err := json.MarshalIndent(task.Status.ContainerState, "", " ") + if err == nil { + return fmt.Errorf("the task somehow still hasn't started which means that there was a problem starting a pod in the host cluster. Please check the pods in namespace loft-tasks in the Loft management cluster as well as any events there that might indicate an error why this task couldn't be started. The task container has the following status: \n%v", string(out)) + } + } + return fmt.Errorf("the task somehow still hasn't started which means that there was a problem starting a pod in the host cluster. Please check the pods in namespace loft-tasks in the Loft management cluster as well as any events there that might indicate an error why this task couldn't be started") + } + + // now stream the logs + for retry := 3; retry >= 0; retry-- { + request := managementClient.Loft().ManagementV1().RESTClient().Get().Name(createdTask.Name).Resource("tasks").SubResource("log").VersionedParams(&managementv1.TaskLogOptions{ + Follow: true, + }, runtime.NewParameterCodec(builders.ParameterScheme)) + + reader, err := request.Stream(ctx) + if err != nil { + log.Warnf("Error streaming task logs: %v", err) + time.Sleep(time.Second * 5) + continue + } + + _, err = io.Copy(out, reader) + if err != nil { + log.Warnf("Error reading task logs: %v", err) + time.Sleep(time.Second * 5) + continue + } + + break + } + + // check task result + task, err = managementClient.Loft().ManagementV1().Tasks().Get(ctx, createdTask.Name, metav1.GetOptions{}) + if err != nil { + return err + } else if task.Status.PodPhase == corev1.PodFailed { + if task.Status.ContainerState != nil && task.Status.ContainerState.State.Terminated != nil { + return fmt.Errorf("task failed: %v (%v)", task.Status.ContainerState.State.Terminated.Message, task.Status.ContainerState.State.Terminated.Reason) + } + + return fmt.Errorf("task failed") + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/upgrade/upgrade.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/upgrade/upgrade.go new file mode 100644 index 000000000..8ec97ce72 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/upgrade/upgrade.go @@ -0,0 +1,215 @@ +package upgrade + +import ( + "fmt" + "os" + "regexp" + "strings" + "sync" + + "github.com/pkg/errors" + + "github.com/blang/semver" + "github.com/loft-sh/api/v3/pkg/product" + "github.com/loft-sh/log" + "github.com/rhysd/go-github-selfupdate/selfupdate" +) + +var IsPlugin = "false" + +// Version holds the current version tag +var version string + +var githubSlug = "loft-sh/loft" +var reVersion = regexp.MustCompile(`\d+\.\d+\.\d+`) + +func eraseVersionPrefix(version string) (string, error) { + indices := reVersion.FindStringIndex(version) + if indices == nil { + return version, errors.New("Version not adopting semver") + } + if indices[0] > 0 { + version = version[indices[0]:] + } + + return version, nil +} + +func attachVersionPrefix(version string) string { + if !strings.HasPrefix(version, "v") { + version = "v" + version + } + + return version +} + +func PrintNewerVersionWarning() { + if os.Getenv("LOFT_SKIP_VERSION_CHECK") != "true" { + // Get version of latest binary + latestVersionStr := NewerVersionAvailable() + if latestVersionStr != "" { + checkMajorVersion := true + + latestVersion, err := semver.Parse(latestVersionStr) + if err != nil { + log.GetInstance().Debugf("Could not parse current version: %s", latestVersionStr) + checkMajorVersion = false + } + + currentVersionStr := GetVersion() + if currentVersionStr == "" { + log.GetInstance().Debugf("Current version is not defined") + checkMajorVersion = false + } + + currentVersion, err := semver.Parse(currentVersionStr) + if err != nil { + log.GetInstance().Debugf("Could not parse current version: %s", currentVersionStr) + checkMajorVersion = false + } + + if checkMajorVersion { + if currentVersion.Major == latestVersion.Major && currentVersion.LT(latestVersion) { + // Same major version, but upgrade is available + if IsPlugin == "true" { + log.GetInstance().Warnf("There is a newer version of the Loft DevSpace plugin: v%s. Run `devspace update plugin loft` to upgrade to the newest version.\n", latestVersionStr) + } else { + log.GetInstance().Warnf(product.Replace("There is a newer version of Loft: v%s. Run `loft upgrade` to upgrade to the newest version.\n"), latestVersionStr) + } + } else if currentVersion.Major == uint64(2) && latestVersion.Major == uint64(3) { + // Different major version, link to upgrade guide + log.GetInstance().Warnf("There is a newer version of Loft: v%s. Please visit https://loft.sh/docs/guides/upgrade-2-to-3 for more information on upgrading.\n", latestVersionStr) + } + } else { + if IsPlugin == "true" { + log.GetInstance().Warnf("There is a newer version of the Loft DevSpace plugin: v%s. Run `devspace update plugin loft` to upgrade to the newest version.\n", latestVersionStr) + } else { + log.GetInstance().Warnf(product.Replace("There is a newer version of Loft: v%s. Run `loft upgrade` to upgrade to the newest version.\n"), latestVersionStr) + } + } + } + } +} + +// GetVersion returns the application version +func GetVersion() string { + return version +} + +// SetVersion sets the application version +func SetVersion(verText string) error { + if len(verText) > 0 { + _version, err := eraseVersionPrefix(verText) + if err != nil { + return fmt.Errorf("error parsing version: %w", err) + } + + version = _version + } + + return nil +} + +var ( + latestVersion string + errLatestVersion error + latestVersionOnce sync.Once +) + +// CheckForNewerVersion checks if there is a newer version on github and returns the newer version +func CheckForNewerVersion() (string, error) { + latestVersionOnce.Do(func() { + latest, found, err := selfupdate.DetectLatest(githubSlug) + if err != nil { + errLatestVersion = err + return + } + + v := semver.MustParse(version) + if !found || latest.Version.Equals(v) { + return + } + + latestVersion = latest.Version.String() + }) + + return latestVersion, errLatestVersion +} + +// NewerVersionAvailable checks if there is a newer version of loft +func NewerVersionAvailable() string { + // Get version of current binary + version := GetVersion() + if version != "" { + latestStableVersion, err := CheckForNewerVersion() + if latestStableVersion != "" && err == nil { // Check versions only if newest version could be determined without errors + semverVersion, err := semver.Parse(version) + if err == nil { // Only compare version if version can be parsed + semverLatestStableVersion, err := semver.Parse(latestStableVersion) + if err == nil { // Only compare version if latestStableVersion can be parsed + // If latestStableVersion > version + if semverLatestStableVersion.Compare(semverVersion) == 1 { + return latestStableVersion + } + } + } + } + } + + return "" +} + +// Upgrade downloads the latest release from github and replaces loft if a new version is found +func Upgrade(flagVersion string, log log.Logger) error { + if flagVersion != "" { + flagVersion = attachVersionPrefix(flagVersion) + + release, found, err := selfupdate.DetectVersion(githubSlug, flagVersion) + if err != nil { + return errors.Wrap(err, "find version") + } else if !found { + return fmt.Errorf("loft version %s couldn't be found", flagVersion) + } + + cmdPath, err := os.Executable() + if err != nil { + return err + } + + log.Infof("Downloading version %s...", flagVersion) + err = selfupdate.DefaultUpdater().UpdateTo(release, cmdPath) + if err != nil { + return err + } + + log.Donef("Successfully updated Loft to version %s", flagVersion) + return nil + } + + newerVersion, err := CheckForNewerVersion() + if err != nil { + return err + } + if newerVersion == "" { + log.Infof("Current binary is the latest version: %s", version) + return nil + } + + v := semver.MustParse(version) + + log.Info("Downloading newest version...") + latest, err := selfupdate.UpdateSelf(v, githubSlug) + if err != nil { + return err + } + + if latest.Version.Equals(v) { + // latest version is the same as current version. It means current binary is up to date. + log.Infof("Current binary is the latest version: %s", version) + } else { + log.Donef("Successfully updated to version %s", latest.Version) + log.Infof("Release note: \n\n%s", latest.ReleaseNotes) + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/vcluster/vcluster.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/vcluster/vcluster.go new file mode 100644 index 000000000..38db7e2dd --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/vcluster/vcluster.go @@ -0,0 +1,121 @@ +package vcluster + +import ( + "context" + "fmt" + "strconv" + "time" + + clusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1" + managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" + "github.com/loft-sh/loftctl/v3/pkg/client" + "github.com/loft-sh/loftctl/v3/pkg/config" + "github.com/loft-sh/loftctl/v3/pkg/kube" + "github.com/loft-sh/loftctl/v3/pkg/util" + "github.com/loft-sh/log" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + client2 "sigs.k8s.io/controller-runtime/pkg/client" +) + +var waitDuration = 20 * time.Second + +func WaitForVCluster(ctx context.Context, baseClient client.Client, clusterName, spaceName, virtualClusterName string, log log.Logger) error { + vClusterClient, err := baseClient.VirtualCluster(clusterName, spaceName, virtualClusterName) + if err != nil { + return err + } + + now := time.Now() + nextMessage := now.Add(waitDuration) + + warnCounter := 0 + + return wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), true, func(ctx context.Context) (bool, error) { + _, err = vClusterClient.CoreV1().ServiceAccounts("default").Get(ctx, "default", metav1.GetOptions{}) + if err != nil && time.Now().After(nextMessage) { + if warnCounter > 1 { + log.Warnf("Cannot reach virtual cluster because: %v. Loft will continue waiting, but this operation may timeout", err) + } else { + log.Info("Waiting for virtual cluster to be available...") + } + + nextMessage = time.Now().Add(waitDuration) + warnCounter++ + return false, nil + } + + return err == nil, nil + }) +} + +func WaitForVirtualClusterInstance(ctx context.Context, managementClient kube.Interface, namespace, name string, waitUntilReady bool, log log.Logger) (*managementv1.VirtualClusterInstance, error) { + now := time.Now() + nextMessage := now.Add(waitDuration) + virtualClusterInstance, err := managementClient.Loft().ManagementV1().VirtualClusterInstances(namespace).Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return nil, err + } + + if virtualClusterInstance.Status.Phase == storagev1.InstanceSleeping { + log.Info("Wait until vcluster wakes up") + defer log.Donef("Successfully woken up vcluster %s", name) + err := wakeup(ctx, managementClient, virtualClusterInstance) + if err != nil { + return nil, fmt.Errorf("error waking up vcluster %s: %s", name, util.GetCause(err)) + } + } + + if !waitUntilReady { + return virtualClusterInstance, nil + } + + warnCounter := 0 + return virtualClusterInstance, wait.PollUntilContextTimeout(ctx, time.Second, config.Timeout(), true, func(ctx context.Context) (bool, error) { + virtualClusterInstance, err = managementClient.Loft().ManagementV1().VirtualClusterInstances(namespace).Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return false, err + } + + if virtualClusterInstance.Status.Phase != storagev1.InstanceReady && virtualClusterInstance.Status.Phase != storagev1.InstanceSleeping { + if time.Now().After(nextMessage) { + if warnCounter > 1 { + log.Warnf("Cannot reach virtual cluster because: %s (%s). Loft will continue waiting, but this operation may timeout", virtualClusterInstance.Status.Message, virtualClusterInstance.Status.Reason) + } else { + log.Info("Waiting for virtual cluster to be available...") + } + nextMessage = time.Now().Add(waitDuration) + warnCounter++ + } + return false, nil + } + + return true, nil + }) +} + +func wakeup(ctx context.Context, managementClient kube.Interface, virtualClusterInstance *managementv1.VirtualClusterInstance) error { + // Update instance to wake up + oldVirtualClusterInstance := virtualClusterInstance.DeepCopy() + if virtualClusterInstance.Annotations == nil { + virtualClusterInstance.Annotations = map[string]string{} + } + delete(virtualClusterInstance.Annotations, clusterv1.SleepModeForceAnnotation) + delete(virtualClusterInstance.Annotations, clusterv1.SleepModeForceDurationAnnotation) + virtualClusterInstance.Annotations[clusterv1.SleepModeLastActivityAnnotation] = strconv.FormatInt(time.Now().Unix(), 10) + + // Calculate patch + patch := client2.MergeFrom(oldVirtualClusterInstance) + patchData, err := patch.Data(virtualClusterInstance) + if err != nil { + return err + } + + _, err = managementClient.Loft().ManagementV1().VirtualClusterInstances(virtualClusterInstance.Namespace).Patch(ctx, virtualClusterInstance.Name, patch.Type(), patchData, metav1.PatchOptions{}) + if err != nil { + return err + } + + return nil +} diff --git a/vendor/github.com/loft-sh/loftctl/v3/pkg/version/version.go b/vendor/github.com/loft-sh/loftctl/v3/pkg/version/version.go new file mode 100644 index 000000000..7dbf2f6f6 --- /dev/null +++ b/vendor/github.com/loft-sh/loftctl/v3/pkg/version/version.go @@ -0,0 +1,86 @@ +package version + +import ( + "fmt" + "strconv" + "strings" + + "github.com/blang/semver" + storagev1 "github.com/loft-sh/api/v3/pkg/apis/storage/v1" +) + +type matchedVersion struct { + Object storagev1.VersionAccessor + Version semver.Version +} + +func GetLatestVersion(versions storagev1.VersionsAccessor) storagev1.VersionAccessor { + // find the latest version + var latestVersion *matchedVersion + for _, version := range versions.GetVersions() { + parsedVersion, err := semver.Parse(strings.TrimPrefix(version.GetVersion(), "v")) + if err != nil { + continue + } + + // latest available version + if latestVersion == nil || latestVersion.Version.LT(parsedVersion) { + latestVersion = &matchedVersion{ + Object: version, + Version: parsedVersion, + } + } + } + if latestVersion == nil { + return nil + } + + return latestVersion.Object +} + +func GetLatestMatchedVersion(versions storagev1.VersionsAccessor, versionPattern string) (latestVersion storagev1.VersionAccessor, latestMatchedVersion storagev1.VersionAccessor, err error) { + // parse version + splittedVersion := strings.Split(strings.ToLower(strings.TrimPrefix(versionPattern, "v")), ".") + if len(splittedVersion) != 3 { + return nil, nil, fmt.Errorf("couldn't parse version %s, expected version in format: 0.0.0", versionPattern) + } + + // find latest version that matches our defined version + var latestVersionObj *matchedVersion + var latestMatchedVersionObj *matchedVersion + for _, version := range versions.GetVersions() { + parsedVersion, err := semver.Parse(strings.TrimPrefix(version.GetVersion(), "v")) + if err != nil { + continue + } + + // does the version match our restrictions? + if (splittedVersion[0] == "x" || splittedVersion[0] == "X" || strconv.FormatUint(parsedVersion.Major, 10) == splittedVersion[0]) && + (splittedVersion[1] == "x" || splittedVersion[1] == "X" || strconv.FormatUint(parsedVersion.Minor, 10) == splittedVersion[1]) && + (splittedVersion[2] == "x" || splittedVersion[2] == "X" || strconv.FormatUint(parsedVersion.Patch, 10) == splittedVersion[2]) { + if latestMatchedVersionObj == nil || latestMatchedVersionObj.Version.LT(parsedVersion) { + latestMatchedVersionObj = &matchedVersion{ + Object: version, + Version: parsedVersion, + } + } + } + + // latest available version + if latestVersionObj == nil || latestVersionObj.Version.LT(parsedVersion) { + latestVersionObj = &matchedVersion{ + Object: version, + Version: parsedVersion, + } + } + } + + if latestVersionObj != nil { + latestVersion = latestVersionObj.Object + } + if latestMatchedVersionObj != nil { + latestMatchedVersion = latestMatchedVersionObj.Object + } + + return latestVersion, latestMatchedVersion, nil +} diff --git a/vendor/github.com/loft-sh/log/table/table.go b/vendor/github.com/loft-sh/log/table/table.go new file mode 100644 index 000000000..adee969d5 --- /dev/null +++ b/vendor/github.com/loft-sh/log/table/table.go @@ -0,0 +1,55 @@ +package table + +import ( + "io" + "runtime" + + "github.com/loft-sh/log" + "github.com/loft-sh/log/scanner" + "github.com/olekukonko/tablewriter" + "github.com/sirupsen/logrus" +) + +func PrintTable(s log.Logger, header []string, values [][]string) { + PrintTableWithOptions(s, header, values, nil) +} + +// PrintTableWithOptions prints a table with header columns and string values +func PrintTableWithOptions(s log.Logger, header []string, values [][]string, modify func(table *tablewriter.Table)) { + reader, writer := io.Pipe() + defer writer.Close() + + done := make(chan struct{}) + go func() { + defer close(done) + + sa := scanner.NewScanner(reader) + for sa.Scan() { + s.WriteString(logrus.InfoLevel, " "+sa.Text()+"\n") + } + }() + + table := tablewriter.NewWriter(writer) + table.SetHeader(header) + if runtime.GOOS == "darwin" || runtime.GOOS == "linux" { + colors := []tablewriter.Colors{} + for range header { + colors = append(colors, tablewriter.Color(tablewriter.FgGreenColor)) + } + table.SetHeaderColor(colors...) + } + + table.SetAlignment(tablewriter.ALIGN_LEFT) + table.SetBorders(tablewriter.Border{Left: false, Top: false, Right: false, Bottom: false}) + table.AppendBulk(values) + if modify != nil { + modify(table) + } + + // Render + _, _ = writer.Write([]byte("\n")) + table.Render() + _, _ = writer.Write([]byte("\n")) + _ = writer.Close() + <-done +} diff --git a/vendor/github.com/mattn/go-runewidth/.travis.yml b/vendor/github.com/mattn/go-runewidth/.travis.yml new file mode 100644 index 000000000..6a21813a3 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/.travis.yml @@ -0,0 +1,16 @@ +language: go +sudo: false +go: + - 1.13.x + - tip + +before_install: + - go get -t -v ./... + +script: + - go generate + - git diff --cached --exit-code + - ./go.test.sh + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/mattn/go-runewidth/LICENSE b/vendor/github.com/mattn/go-runewidth/LICENSE new file mode 100644 index 000000000..91b5cef30 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/mattn/go-runewidth/README.md b/vendor/github.com/mattn/go-runewidth/README.md new file mode 100644 index 000000000..aa56ab96c --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/README.md @@ -0,0 +1,27 @@ +go-runewidth +============ + +[![Build Status](https://travis-ci.org/mattn/go-runewidth.png?branch=master)](https://travis-ci.org/mattn/go-runewidth) +[![Codecov](https://codecov.io/gh/mattn/go-runewidth/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-runewidth) +[![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth) +[![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth) + +Provides functions to get fixed width of the character or string. + +Usage +----- + +```go +runewidth.StringWidth("つのだ☆HIRO") == 12 +``` + + +Author +------ + +Yasuhiro Matsumoto + +License +------- + +under the MIT License: http://mattn.mit-license.org/2013 diff --git a/vendor/github.com/mattn/go-runewidth/go.test.sh b/vendor/github.com/mattn/go-runewidth/go.test.sh new file mode 100644 index 000000000..012162b07 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/go.test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e +echo "" > coverage.txt + +for d in $(go list ./... | grep -v vendor); do + go test -race -coverprofile=profile.out -covermode=atomic "$d" + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done diff --git a/vendor/github.com/mattn/go-runewidth/runewidth.go b/vendor/github.com/mattn/go-runewidth/runewidth.go new file mode 100644 index 000000000..19f8e0449 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth.go @@ -0,0 +1,257 @@ +package runewidth + +import ( + "os" +) + +//go:generate go run script/generate.go + +var ( + // EastAsianWidth will be set true if the current locale is CJK + EastAsianWidth bool + + // ZeroWidthJoiner is flag to set to use UTR#51 ZWJ + ZeroWidthJoiner bool + + // DefaultCondition is a condition in current locale + DefaultCondition = &Condition{} +) + +func init() { + handleEnv() +} + +func handleEnv() { + env := os.Getenv("RUNEWIDTH_EASTASIAN") + if env == "" { + EastAsianWidth = IsEastAsian() + } else { + EastAsianWidth = env == "1" + } + // update DefaultCondition + DefaultCondition.EastAsianWidth = EastAsianWidth + DefaultCondition.ZeroWidthJoiner = ZeroWidthJoiner +} + +type interval struct { + first rune + last rune +} + +type table []interval + +func inTables(r rune, ts ...table) bool { + for _, t := range ts { + if inTable(r, t) { + return true + } + } + return false +} + +func inTable(r rune, t table) bool { + if r < t[0].first { + return false + } + + bot := 0 + top := len(t) - 1 + for top >= bot { + mid := (bot + top) >> 1 + + switch { + case t[mid].last < r: + bot = mid + 1 + case t[mid].first > r: + top = mid - 1 + default: + return true + } + } + + return false +} + +var private = table{ + {0x00E000, 0x00F8FF}, {0x0F0000, 0x0FFFFD}, {0x100000, 0x10FFFD}, +} + +var nonprint = table{ + {0x0000, 0x001F}, {0x007F, 0x009F}, {0x00AD, 0x00AD}, + {0x070F, 0x070F}, {0x180B, 0x180E}, {0x200B, 0x200F}, + {0x2028, 0x202E}, {0x206A, 0x206F}, {0xD800, 0xDFFF}, + {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, {0xFFFE, 0xFFFF}, +} + +// Condition have flag EastAsianWidth whether the current locale is CJK or not. +type Condition struct { + EastAsianWidth bool + ZeroWidthJoiner bool +} + +// NewCondition return new instance of Condition which is current locale. +func NewCondition() *Condition { + return &Condition{ + EastAsianWidth: EastAsianWidth, + ZeroWidthJoiner: ZeroWidthJoiner, + } +} + +// RuneWidth returns the number of cells in r. +// See http://www.unicode.org/reports/tr11/ +func (c *Condition) RuneWidth(r rune) int { + switch { + case r < 0 || r > 0x10FFFF || inTables(r, nonprint, combining, notassigned): + return 0 + case (c.EastAsianWidth && IsAmbiguousWidth(r)) || inTables(r, doublewidth): + return 2 + default: + return 1 + } +} + +func (c *Condition) stringWidth(s string) (width int) { + for _, r := range []rune(s) { + width += c.RuneWidth(r) + } + return width +} + +func (c *Condition) stringWidthZeroJoiner(s string) (width int) { + r1, r2 := rune(0), rune(0) + for _, r := range []rune(s) { + if r == 0xFE0E || r == 0xFE0F { + continue + } + w := c.RuneWidth(r) + if r2 == 0x200D && inTables(r, emoji) && inTables(r1, emoji) { + if width < w { + width = w + } + } else { + width += w + } + r1, r2 = r2, r + } + return width +} + +// StringWidth return width as you can see +func (c *Condition) StringWidth(s string) (width int) { + if c.ZeroWidthJoiner { + return c.stringWidthZeroJoiner(s) + } + return c.stringWidth(s) +} + +// Truncate return string truncated with w cells +func (c *Condition) Truncate(s string, w int, tail string) string { + if c.StringWidth(s) <= w { + return s + } + r := []rune(s) + tw := c.StringWidth(tail) + w -= tw + width := 0 + i := 0 + for ; i < len(r); i++ { + cw := c.RuneWidth(r[i]) + if width+cw > w { + break + } + width += cw + } + return string(r[0:i]) + tail +} + +// Wrap return string wrapped with w cells +func (c *Condition) Wrap(s string, w int) string { + width := 0 + out := "" + for _, r := range []rune(s) { + cw := RuneWidth(r) + if r == '\n' { + out += string(r) + width = 0 + continue + } else if width+cw > w { + out += "\n" + width = 0 + out += string(r) + width += cw + continue + } + out += string(r) + width += cw + } + return out +} + +// FillLeft return string filled in left by spaces in w cells +func (c *Condition) FillLeft(s string, w int) string { + width := c.StringWidth(s) + count := w - width + if count > 0 { + b := make([]byte, count) + for i := range b { + b[i] = ' ' + } + return string(b) + s + } + return s +} + +// FillRight return string filled in left by spaces in w cells +func (c *Condition) FillRight(s string, w int) string { + width := c.StringWidth(s) + count := w - width + if count > 0 { + b := make([]byte, count) + for i := range b { + b[i] = ' ' + } + return s + string(b) + } + return s +} + +// RuneWidth returns the number of cells in r. +// See http://www.unicode.org/reports/tr11/ +func RuneWidth(r rune) int { + return DefaultCondition.RuneWidth(r) +} + +// IsAmbiguousWidth returns whether is ambiguous width or not. +func IsAmbiguousWidth(r rune) bool { + return inTables(r, private, ambiguous) +} + +// IsNeutralWidth returns whether is neutral width or not. +func IsNeutralWidth(r rune) bool { + return inTable(r, neutral) +} + +// StringWidth return width as you can see +func StringWidth(s string) (width int) { + return DefaultCondition.StringWidth(s) +} + +// Truncate return string truncated with w cells +func Truncate(s string, w int, tail string) string { + return DefaultCondition.Truncate(s, w, tail) +} + +// Wrap return string wrapped with w cells +func Wrap(s string, w int) string { + return DefaultCondition.Wrap(s, w) +} + +// FillLeft return string filled in left by spaces in w cells +func FillLeft(s string, w int) string { + return DefaultCondition.FillLeft(s, w) +} + +// FillRight return string filled in left by spaces in w cells +func FillRight(s string, w int) string { + return DefaultCondition.FillRight(s, w) +} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_appengine.go b/vendor/github.com/mattn/go-runewidth/runewidth_appengine.go new file mode 100644 index 000000000..7d99f6e52 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth_appengine.go @@ -0,0 +1,8 @@ +// +build appengine + +package runewidth + +// IsEastAsian return true if the current locale is CJK +func IsEastAsian() bool { + return false +} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_js.go b/vendor/github.com/mattn/go-runewidth/runewidth_js.go new file mode 100644 index 000000000..c5fdf40ba --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth_js.go @@ -0,0 +1,9 @@ +// +build js +// +build !appengine + +package runewidth + +func IsEastAsian() bool { + // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. + return false +} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_posix.go b/vendor/github.com/mattn/go-runewidth/runewidth_posix.go new file mode 100644 index 000000000..480ad7485 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth_posix.go @@ -0,0 +1,82 @@ +// +build !windows +// +build !js +// +build !appengine + +package runewidth + +import ( + "os" + "regexp" + "strings" +) + +var reLoc = regexp.MustCompile(`^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\.(.+)`) + +var mblenTable = map[string]int{ + "utf-8": 6, + "utf8": 6, + "jis": 8, + "eucjp": 3, + "euckr": 2, + "euccn": 2, + "sjis": 2, + "cp932": 2, + "cp51932": 2, + "cp936": 2, + "cp949": 2, + "cp950": 2, + "big5": 2, + "gbk": 2, + "gb2312": 2, +} + +func isEastAsian(locale string) bool { + charset := strings.ToLower(locale) + r := reLoc.FindStringSubmatch(locale) + if len(r) == 2 { + charset = strings.ToLower(r[1]) + } + + if strings.HasSuffix(charset, "@cjk_narrow") { + return false + } + + for pos, b := range []byte(charset) { + if b == '@' { + charset = charset[:pos] + break + } + } + max := 1 + if m, ok := mblenTable[charset]; ok { + max = m + } + if max > 1 && (charset[0] != 'u' || + strings.HasPrefix(locale, "ja") || + strings.HasPrefix(locale, "ko") || + strings.HasPrefix(locale, "zh")) { + return true + } + return false +} + +// IsEastAsian return true if the current locale is CJK +func IsEastAsian() bool { + locale := os.Getenv("LC_ALL") + if locale == "" { + locale = os.Getenv("LC_CTYPE") + } + if locale == "" { + locale = os.Getenv("LANG") + } + + // ignore C locale + if locale == "POSIX" || locale == "C" { + return false + } + if len(locale) > 1 && locale[0] == 'C' && (locale[1] == '.' || locale[1] == '-') { + return false + } + + return isEastAsian(locale) +} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_table.go b/vendor/github.com/mattn/go-runewidth/runewidth_table.go new file mode 100644 index 000000000..b27d77d89 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth_table.go @@ -0,0 +1,437 @@ +// Code generated by script/generate.go. DO NOT EDIT. + +package runewidth + +var combining = table{ + {0x0300, 0x036F}, {0x0483, 0x0489}, {0x07EB, 0x07F3}, + {0x0C00, 0x0C00}, {0x0C04, 0x0C04}, {0x0D00, 0x0D01}, + {0x135D, 0x135F}, {0x1A7F, 0x1A7F}, {0x1AB0, 0x1AC0}, + {0x1B6B, 0x1B73}, {0x1DC0, 0x1DF9}, {0x1DFB, 0x1DFF}, + {0x20D0, 0x20F0}, {0x2CEF, 0x2CF1}, {0x2DE0, 0x2DFF}, + {0x3099, 0x309A}, {0xA66F, 0xA672}, {0xA674, 0xA67D}, + {0xA69E, 0xA69F}, {0xA6F0, 0xA6F1}, {0xA8E0, 0xA8F1}, + {0xFE20, 0xFE2F}, {0x101FD, 0x101FD}, {0x10376, 0x1037A}, + {0x10EAB, 0x10EAC}, {0x10F46, 0x10F50}, {0x11300, 0x11301}, + {0x1133B, 0x1133C}, {0x11366, 0x1136C}, {0x11370, 0x11374}, + {0x16AF0, 0x16AF4}, {0x1D165, 0x1D169}, {0x1D16D, 0x1D172}, + {0x1D17B, 0x1D182}, {0x1D185, 0x1D18B}, {0x1D1AA, 0x1D1AD}, + {0x1D242, 0x1D244}, {0x1E000, 0x1E006}, {0x1E008, 0x1E018}, + {0x1E01B, 0x1E021}, {0x1E023, 0x1E024}, {0x1E026, 0x1E02A}, + {0x1E8D0, 0x1E8D6}, +} + +var doublewidth = table{ + {0x1100, 0x115F}, {0x231A, 0x231B}, {0x2329, 0x232A}, + {0x23E9, 0x23EC}, {0x23F0, 0x23F0}, {0x23F3, 0x23F3}, + {0x25FD, 0x25FE}, {0x2614, 0x2615}, {0x2648, 0x2653}, + {0x267F, 0x267F}, {0x2693, 0x2693}, {0x26A1, 0x26A1}, + {0x26AA, 0x26AB}, {0x26BD, 0x26BE}, {0x26C4, 0x26C5}, + {0x26CE, 0x26CE}, {0x26D4, 0x26D4}, {0x26EA, 0x26EA}, + {0x26F2, 0x26F3}, {0x26F5, 0x26F5}, {0x26FA, 0x26FA}, + {0x26FD, 0x26FD}, {0x2705, 0x2705}, {0x270A, 0x270B}, + {0x2728, 0x2728}, {0x274C, 0x274C}, {0x274E, 0x274E}, + {0x2753, 0x2755}, {0x2757, 0x2757}, {0x2795, 0x2797}, + {0x27B0, 0x27B0}, {0x27BF, 0x27BF}, {0x2B1B, 0x2B1C}, + {0x2B50, 0x2B50}, {0x2B55, 0x2B55}, {0x2E80, 0x2E99}, + {0x2E9B, 0x2EF3}, {0x2F00, 0x2FD5}, {0x2FF0, 0x2FFB}, + {0x3000, 0x303E}, {0x3041, 0x3096}, {0x3099, 0x30FF}, + {0x3105, 0x312F}, {0x3131, 0x318E}, {0x3190, 0x31E3}, + {0x31F0, 0x321E}, {0x3220, 0x3247}, {0x3250, 0x4DBF}, + {0x4E00, 0xA48C}, {0xA490, 0xA4C6}, {0xA960, 0xA97C}, + {0xAC00, 0xD7A3}, {0xF900, 0xFAFF}, {0xFE10, 0xFE19}, + {0xFE30, 0xFE52}, {0xFE54, 0xFE66}, {0xFE68, 0xFE6B}, + {0xFF01, 0xFF60}, {0xFFE0, 0xFFE6}, {0x16FE0, 0x16FE4}, + {0x16FF0, 0x16FF1}, {0x17000, 0x187F7}, {0x18800, 0x18CD5}, + {0x18D00, 0x18D08}, {0x1B000, 0x1B11E}, {0x1B150, 0x1B152}, + {0x1B164, 0x1B167}, {0x1B170, 0x1B2FB}, {0x1F004, 0x1F004}, + {0x1F0CF, 0x1F0CF}, {0x1F18E, 0x1F18E}, {0x1F191, 0x1F19A}, + {0x1F200, 0x1F202}, {0x1F210, 0x1F23B}, {0x1F240, 0x1F248}, + {0x1F250, 0x1F251}, {0x1F260, 0x1F265}, {0x1F300, 0x1F320}, + {0x1F32D, 0x1F335}, {0x1F337, 0x1F37C}, {0x1F37E, 0x1F393}, + {0x1F3A0, 0x1F3CA}, {0x1F3CF, 0x1F3D3}, {0x1F3E0, 0x1F3F0}, + {0x1F3F4, 0x1F3F4}, {0x1F3F8, 0x1F43E}, {0x1F440, 0x1F440}, + {0x1F442, 0x1F4FC}, {0x1F4FF, 0x1F53D}, {0x1F54B, 0x1F54E}, + {0x1F550, 0x1F567}, {0x1F57A, 0x1F57A}, {0x1F595, 0x1F596}, + {0x1F5A4, 0x1F5A4}, {0x1F5FB, 0x1F64F}, {0x1F680, 0x1F6C5}, + {0x1F6CC, 0x1F6CC}, {0x1F6D0, 0x1F6D2}, {0x1F6D5, 0x1F6D7}, + {0x1F6EB, 0x1F6EC}, {0x1F6F4, 0x1F6FC}, {0x1F7E0, 0x1F7EB}, + {0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945}, {0x1F947, 0x1F978}, + {0x1F97A, 0x1F9CB}, {0x1F9CD, 0x1F9FF}, {0x1FA70, 0x1FA74}, + {0x1FA78, 0x1FA7A}, {0x1FA80, 0x1FA86}, {0x1FA90, 0x1FAA8}, + {0x1FAB0, 0x1FAB6}, {0x1FAC0, 0x1FAC2}, {0x1FAD0, 0x1FAD6}, + {0x20000, 0x2FFFD}, {0x30000, 0x3FFFD}, +} + +var ambiguous = table{ + {0x00A1, 0x00A1}, {0x00A4, 0x00A4}, {0x00A7, 0x00A8}, + {0x00AA, 0x00AA}, {0x00AD, 0x00AE}, {0x00B0, 0x00B4}, + {0x00B6, 0x00BA}, {0x00BC, 0x00BF}, {0x00C6, 0x00C6}, + {0x00D0, 0x00D0}, {0x00D7, 0x00D8}, {0x00DE, 0x00E1}, + {0x00E6, 0x00E6}, {0x00E8, 0x00EA}, {0x00EC, 0x00ED}, + {0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F7, 0x00FA}, + {0x00FC, 0x00FC}, {0x00FE, 0x00FE}, {0x0101, 0x0101}, + {0x0111, 0x0111}, {0x0113, 0x0113}, {0x011B, 0x011B}, + {0x0126, 0x0127}, {0x012B, 0x012B}, {0x0131, 0x0133}, + {0x0138, 0x0138}, {0x013F, 0x0142}, {0x0144, 0x0144}, + {0x0148, 0x014B}, {0x014D, 0x014D}, {0x0152, 0x0153}, + {0x0166, 0x0167}, {0x016B, 0x016B}, {0x01CE, 0x01CE}, + {0x01D0, 0x01D0}, {0x01D2, 0x01D2}, {0x01D4, 0x01D4}, + {0x01D6, 0x01D6}, {0x01D8, 0x01D8}, {0x01DA, 0x01DA}, + {0x01DC, 0x01DC}, {0x0251, 0x0251}, {0x0261, 0x0261}, + {0x02C4, 0x02C4}, {0x02C7, 0x02C7}, {0x02C9, 0x02CB}, + {0x02CD, 0x02CD}, {0x02D0, 0x02D0}, {0x02D8, 0x02DB}, + {0x02DD, 0x02DD}, {0x02DF, 0x02DF}, {0x0300, 0x036F}, + {0x0391, 0x03A1}, {0x03A3, 0x03A9}, {0x03B1, 0x03C1}, + {0x03C3, 0x03C9}, {0x0401, 0x0401}, {0x0410, 0x044F}, + {0x0451, 0x0451}, {0x2010, 0x2010}, {0x2013, 0x2016}, + {0x2018, 0x2019}, {0x201C, 0x201D}, {0x2020, 0x2022}, + {0x2024, 0x2027}, {0x2030, 0x2030}, {0x2032, 0x2033}, + {0x2035, 0x2035}, {0x203B, 0x203B}, {0x203E, 0x203E}, + {0x2074, 0x2074}, {0x207F, 0x207F}, {0x2081, 0x2084}, + {0x20AC, 0x20AC}, {0x2103, 0x2103}, {0x2105, 0x2105}, + {0x2109, 0x2109}, {0x2113, 0x2113}, {0x2116, 0x2116}, + {0x2121, 0x2122}, {0x2126, 0x2126}, {0x212B, 0x212B}, + {0x2153, 0x2154}, {0x215B, 0x215E}, {0x2160, 0x216B}, + {0x2170, 0x2179}, {0x2189, 0x2189}, {0x2190, 0x2199}, + {0x21B8, 0x21B9}, {0x21D2, 0x21D2}, {0x21D4, 0x21D4}, + {0x21E7, 0x21E7}, {0x2200, 0x2200}, {0x2202, 0x2203}, + {0x2207, 0x2208}, {0x220B, 0x220B}, {0x220F, 0x220F}, + {0x2211, 0x2211}, {0x2215, 0x2215}, {0x221A, 0x221A}, + {0x221D, 0x2220}, {0x2223, 0x2223}, {0x2225, 0x2225}, + {0x2227, 0x222C}, {0x222E, 0x222E}, {0x2234, 0x2237}, + {0x223C, 0x223D}, {0x2248, 0x2248}, {0x224C, 0x224C}, + {0x2252, 0x2252}, {0x2260, 0x2261}, {0x2264, 0x2267}, + {0x226A, 0x226B}, {0x226E, 0x226F}, {0x2282, 0x2283}, + {0x2286, 0x2287}, {0x2295, 0x2295}, {0x2299, 0x2299}, + {0x22A5, 0x22A5}, {0x22BF, 0x22BF}, {0x2312, 0x2312}, + {0x2460, 0x24E9}, {0x24EB, 0x254B}, {0x2550, 0x2573}, + {0x2580, 0x258F}, {0x2592, 0x2595}, {0x25A0, 0x25A1}, + {0x25A3, 0x25A9}, {0x25B2, 0x25B3}, {0x25B6, 0x25B7}, + {0x25BC, 0x25BD}, {0x25C0, 0x25C1}, {0x25C6, 0x25C8}, + {0x25CB, 0x25CB}, {0x25CE, 0x25D1}, {0x25E2, 0x25E5}, + {0x25EF, 0x25EF}, {0x2605, 0x2606}, {0x2609, 0x2609}, + {0x260E, 0x260F}, {0x261C, 0x261C}, {0x261E, 0x261E}, + {0x2640, 0x2640}, {0x2642, 0x2642}, {0x2660, 0x2661}, + {0x2663, 0x2665}, {0x2667, 0x266A}, {0x266C, 0x266D}, + {0x266F, 0x266F}, {0x269E, 0x269F}, {0x26BF, 0x26BF}, + {0x26C6, 0x26CD}, {0x26CF, 0x26D3}, {0x26D5, 0x26E1}, + {0x26E3, 0x26E3}, {0x26E8, 0x26E9}, {0x26EB, 0x26F1}, + {0x26F4, 0x26F4}, {0x26F6, 0x26F9}, {0x26FB, 0x26FC}, + {0x26FE, 0x26FF}, {0x273D, 0x273D}, {0x2776, 0x277F}, + {0x2B56, 0x2B59}, {0x3248, 0x324F}, {0xE000, 0xF8FF}, + {0xFE00, 0xFE0F}, {0xFFFD, 0xFFFD}, {0x1F100, 0x1F10A}, + {0x1F110, 0x1F12D}, {0x1F130, 0x1F169}, {0x1F170, 0x1F18D}, + {0x1F18F, 0x1F190}, {0x1F19B, 0x1F1AC}, {0xE0100, 0xE01EF}, + {0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD}, +} +var notassigned = table{ + {0x27E6, 0x27ED}, {0x2985, 0x2986}, +} + +var neutral = table{ + {0x0000, 0x001F}, {0x007F, 0x00A0}, {0x00A9, 0x00A9}, + {0x00AB, 0x00AB}, {0x00B5, 0x00B5}, {0x00BB, 0x00BB}, + {0x00C0, 0x00C5}, {0x00C7, 0x00CF}, {0x00D1, 0x00D6}, + {0x00D9, 0x00DD}, {0x00E2, 0x00E5}, {0x00E7, 0x00E7}, + {0x00EB, 0x00EB}, {0x00EE, 0x00EF}, {0x00F1, 0x00F1}, + {0x00F4, 0x00F6}, {0x00FB, 0x00FB}, {0x00FD, 0x00FD}, + {0x00FF, 0x0100}, {0x0102, 0x0110}, {0x0112, 0x0112}, + {0x0114, 0x011A}, {0x011C, 0x0125}, {0x0128, 0x012A}, + {0x012C, 0x0130}, {0x0134, 0x0137}, {0x0139, 0x013E}, + {0x0143, 0x0143}, {0x0145, 0x0147}, {0x014C, 0x014C}, + {0x014E, 0x0151}, {0x0154, 0x0165}, {0x0168, 0x016A}, + {0x016C, 0x01CD}, {0x01CF, 0x01CF}, {0x01D1, 0x01D1}, + {0x01D3, 0x01D3}, {0x01D5, 0x01D5}, {0x01D7, 0x01D7}, + {0x01D9, 0x01D9}, {0x01DB, 0x01DB}, {0x01DD, 0x0250}, + {0x0252, 0x0260}, {0x0262, 0x02C3}, {0x02C5, 0x02C6}, + {0x02C8, 0x02C8}, {0x02CC, 0x02CC}, {0x02CE, 0x02CF}, + {0x02D1, 0x02D7}, {0x02DC, 0x02DC}, {0x02DE, 0x02DE}, + {0x02E0, 0x02FF}, {0x0370, 0x0377}, {0x037A, 0x037F}, + {0x0384, 0x038A}, {0x038C, 0x038C}, {0x038E, 0x0390}, + {0x03AA, 0x03B0}, {0x03C2, 0x03C2}, {0x03CA, 0x0400}, + {0x0402, 0x040F}, {0x0450, 0x0450}, {0x0452, 0x052F}, + {0x0531, 0x0556}, {0x0559, 0x058A}, {0x058D, 0x058F}, + {0x0591, 0x05C7}, {0x05D0, 0x05EA}, {0x05EF, 0x05F4}, + {0x0600, 0x061C}, {0x061E, 0x070D}, {0x070F, 0x074A}, + {0x074D, 0x07B1}, {0x07C0, 0x07FA}, {0x07FD, 0x082D}, + {0x0830, 0x083E}, {0x0840, 0x085B}, {0x085E, 0x085E}, + {0x0860, 0x086A}, {0x08A0, 0x08B4}, {0x08B6, 0x08C7}, + {0x08D3, 0x0983}, {0x0985, 0x098C}, {0x098F, 0x0990}, + {0x0993, 0x09A8}, {0x09AA, 0x09B0}, {0x09B2, 0x09B2}, + {0x09B6, 0x09B9}, {0x09BC, 0x09C4}, {0x09C7, 0x09C8}, + {0x09CB, 0x09CE}, {0x09D7, 0x09D7}, {0x09DC, 0x09DD}, + {0x09DF, 0x09E3}, {0x09E6, 0x09FE}, {0x0A01, 0x0A03}, + {0x0A05, 0x0A0A}, {0x0A0F, 0x0A10}, {0x0A13, 0x0A28}, + {0x0A2A, 0x0A30}, {0x0A32, 0x0A33}, {0x0A35, 0x0A36}, + {0x0A38, 0x0A39}, {0x0A3C, 0x0A3C}, {0x0A3E, 0x0A42}, + {0x0A47, 0x0A48}, {0x0A4B, 0x0A4D}, {0x0A51, 0x0A51}, + {0x0A59, 0x0A5C}, {0x0A5E, 0x0A5E}, {0x0A66, 0x0A76}, + {0x0A81, 0x0A83}, {0x0A85, 0x0A8D}, {0x0A8F, 0x0A91}, + {0x0A93, 0x0AA8}, {0x0AAA, 0x0AB0}, {0x0AB2, 0x0AB3}, + {0x0AB5, 0x0AB9}, {0x0ABC, 0x0AC5}, {0x0AC7, 0x0AC9}, + {0x0ACB, 0x0ACD}, {0x0AD0, 0x0AD0}, {0x0AE0, 0x0AE3}, + {0x0AE6, 0x0AF1}, {0x0AF9, 0x0AFF}, {0x0B01, 0x0B03}, + {0x0B05, 0x0B0C}, {0x0B0F, 0x0B10}, {0x0B13, 0x0B28}, + {0x0B2A, 0x0B30}, {0x0B32, 0x0B33}, {0x0B35, 0x0B39}, + {0x0B3C, 0x0B44}, {0x0B47, 0x0B48}, {0x0B4B, 0x0B4D}, + {0x0B55, 0x0B57}, {0x0B5C, 0x0B5D}, {0x0B5F, 0x0B63}, + {0x0B66, 0x0B77}, {0x0B82, 0x0B83}, {0x0B85, 0x0B8A}, + {0x0B8E, 0x0B90}, {0x0B92, 0x0B95}, {0x0B99, 0x0B9A}, + {0x0B9C, 0x0B9C}, {0x0B9E, 0x0B9F}, {0x0BA3, 0x0BA4}, + {0x0BA8, 0x0BAA}, {0x0BAE, 0x0BB9}, {0x0BBE, 0x0BC2}, + {0x0BC6, 0x0BC8}, {0x0BCA, 0x0BCD}, {0x0BD0, 0x0BD0}, + {0x0BD7, 0x0BD7}, {0x0BE6, 0x0BFA}, {0x0C00, 0x0C0C}, + {0x0C0E, 0x0C10}, {0x0C12, 0x0C28}, {0x0C2A, 0x0C39}, + {0x0C3D, 0x0C44}, {0x0C46, 0x0C48}, {0x0C4A, 0x0C4D}, + {0x0C55, 0x0C56}, {0x0C58, 0x0C5A}, {0x0C60, 0x0C63}, + {0x0C66, 0x0C6F}, {0x0C77, 0x0C8C}, {0x0C8E, 0x0C90}, + {0x0C92, 0x0CA8}, {0x0CAA, 0x0CB3}, {0x0CB5, 0x0CB9}, + {0x0CBC, 0x0CC4}, {0x0CC6, 0x0CC8}, {0x0CCA, 0x0CCD}, + {0x0CD5, 0x0CD6}, {0x0CDE, 0x0CDE}, {0x0CE0, 0x0CE3}, + {0x0CE6, 0x0CEF}, {0x0CF1, 0x0CF2}, {0x0D00, 0x0D0C}, + {0x0D0E, 0x0D10}, {0x0D12, 0x0D44}, {0x0D46, 0x0D48}, + {0x0D4A, 0x0D4F}, {0x0D54, 0x0D63}, {0x0D66, 0x0D7F}, + {0x0D81, 0x0D83}, {0x0D85, 0x0D96}, {0x0D9A, 0x0DB1}, + {0x0DB3, 0x0DBB}, {0x0DBD, 0x0DBD}, {0x0DC0, 0x0DC6}, + {0x0DCA, 0x0DCA}, {0x0DCF, 0x0DD4}, {0x0DD6, 0x0DD6}, + {0x0DD8, 0x0DDF}, {0x0DE6, 0x0DEF}, {0x0DF2, 0x0DF4}, + {0x0E01, 0x0E3A}, {0x0E3F, 0x0E5B}, {0x0E81, 0x0E82}, + {0x0E84, 0x0E84}, {0x0E86, 0x0E8A}, {0x0E8C, 0x0EA3}, + {0x0EA5, 0x0EA5}, {0x0EA7, 0x0EBD}, {0x0EC0, 0x0EC4}, + {0x0EC6, 0x0EC6}, {0x0EC8, 0x0ECD}, {0x0ED0, 0x0ED9}, + {0x0EDC, 0x0EDF}, {0x0F00, 0x0F47}, {0x0F49, 0x0F6C}, + {0x0F71, 0x0F97}, {0x0F99, 0x0FBC}, {0x0FBE, 0x0FCC}, + {0x0FCE, 0x0FDA}, {0x1000, 0x10C5}, {0x10C7, 0x10C7}, + {0x10CD, 0x10CD}, {0x10D0, 0x10FF}, {0x1160, 0x1248}, + {0x124A, 0x124D}, {0x1250, 0x1256}, {0x1258, 0x1258}, + {0x125A, 0x125D}, {0x1260, 0x1288}, {0x128A, 0x128D}, + {0x1290, 0x12B0}, {0x12B2, 0x12B5}, {0x12B8, 0x12BE}, + {0x12C0, 0x12C0}, {0x12C2, 0x12C5}, {0x12C8, 0x12D6}, + {0x12D8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135A}, + {0x135D, 0x137C}, {0x1380, 0x1399}, {0x13A0, 0x13F5}, + {0x13F8, 0x13FD}, {0x1400, 0x169C}, {0x16A0, 0x16F8}, + {0x1700, 0x170C}, {0x170E, 0x1714}, {0x1720, 0x1736}, + {0x1740, 0x1753}, {0x1760, 0x176C}, {0x176E, 0x1770}, + {0x1772, 0x1773}, {0x1780, 0x17DD}, {0x17E0, 0x17E9}, + {0x17F0, 0x17F9}, {0x1800, 0x180E}, {0x1810, 0x1819}, + {0x1820, 0x1878}, {0x1880, 0x18AA}, {0x18B0, 0x18F5}, + {0x1900, 0x191E}, {0x1920, 0x192B}, {0x1930, 0x193B}, + {0x1940, 0x1940}, {0x1944, 0x196D}, {0x1970, 0x1974}, + {0x1980, 0x19AB}, {0x19B0, 0x19C9}, {0x19D0, 0x19DA}, + {0x19DE, 0x1A1B}, {0x1A1E, 0x1A5E}, {0x1A60, 0x1A7C}, + {0x1A7F, 0x1A89}, {0x1A90, 0x1A99}, {0x1AA0, 0x1AAD}, + {0x1AB0, 0x1AC0}, {0x1B00, 0x1B4B}, {0x1B50, 0x1B7C}, + {0x1B80, 0x1BF3}, {0x1BFC, 0x1C37}, {0x1C3B, 0x1C49}, + {0x1C4D, 0x1C88}, {0x1C90, 0x1CBA}, {0x1CBD, 0x1CC7}, + {0x1CD0, 0x1CFA}, {0x1D00, 0x1DF9}, {0x1DFB, 0x1F15}, + {0x1F18, 0x1F1D}, {0x1F20, 0x1F45}, {0x1F48, 0x1F4D}, + {0x1F50, 0x1F57}, {0x1F59, 0x1F59}, {0x1F5B, 0x1F5B}, + {0x1F5D, 0x1F5D}, {0x1F5F, 0x1F7D}, {0x1F80, 0x1FB4}, + {0x1FB6, 0x1FC4}, {0x1FC6, 0x1FD3}, {0x1FD6, 0x1FDB}, + {0x1FDD, 0x1FEF}, {0x1FF2, 0x1FF4}, {0x1FF6, 0x1FFE}, + {0x2000, 0x200F}, {0x2011, 0x2012}, {0x2017, 0x2017}, + {0x201A, 0x201B}, {0x201E, 0x201F}, {0x2023, 0x2023}, + {0x2028, 0x202F}, {0x2031, 0x2031}, {0x2034, 0x2034}, + {0x2036, 0x203A}, {0x203C, 0x203D}, {0x203F, 0x2064}, + {0x2066, 0x2071}, {0x2075, 0x207E}, {0x2080, 0x2080}, + {0x2085, 0x208E}, {0x2090, 0x209C}, {0x20A0, 0x20A8}, + {0x20AA, 0x20AB}, {0x20AD, 0x20BF}, {0x20D0, 0x20F0}, + {0x2100, 0x2102}, {0x2104, 0x2104}, {0x2106, 0x2108}, + {0x210A, 0x2112}, {0x2114, 0x2115}, {0x2117, 0x2120}, + {0x2123, 0x2125}, {0x2127, 0x212A}, {0x212C, 0x2152}, + {0x2155, 0x215A}, {0x215F, 0x215F}, {0x216C, 0x216F}, + {0x217A, 0x2188}, {0x218A, 0x218B}, {0x219A, 0x21B7}, + {0x21BA, 0x21D1}, {0x21D3, 0x21D3}, {0x21D5, 0x21E6}, + {0x21E8, 0x21FF}, {0x2201, 0x2201}, {0x2204, 0x2206}, + {0x2209, 0x220A}, {0x220C, 0x220E}, {0x2210, 0x2210}, + {0x2212, 0x2214}, {0x2216, 0x2219}, {0x221B, 0x221C}, + {0x2221, 0x2222}, {0x2224, 0x2224}, {0x2226, 0x2226}, + {0x222D, 0x222D}, {0x222F, 0x2233}, {0x2238, 0x223B}, + {0x223E, 0x2247}, {0x2249, 0x224B}, {0x224D, 0x2251}, + {0x2253, 0x225F}, {0x2262, 0x2263}, {0x2268, 0x2269}, + {0x226C, 0x226D}, {0x2270, 0x2281}, {0x2284, 0x2285}, + {0x2288, 0x2294}, {0x2296, 0x2298}, {0x229A, 0x22A4}, + {0x22A6, 0x22BE}, {0x22C0, 0x2311}, {0x2313, 0x2319}, + {0x231C, 0x2328}, {0x232B, 0x23E8}, {0x23ED, 0x23EF}, + {0x23F1, 0x23F2}, {0x23F4, 0x2426}, {0x2440, 0x244A}, + {0x24EA, 0x24EA}, {0x254C, 0x254F}, {0x2574, 0x257F}, + {0x2590, 0x2591}, {0x2596, 0x259F}, {0x25A2, 0x25A2}, + {0x25AA, 0x25B1}, {0x25B4, 0x25B5}, {0x25B8, 0x25BB}, + {0x25BE, 0x25BF}, {0x25C2, 0x25C5}, {0x25C9, 0x25CA}, + {0x25CC, 0x25CD}, {0x25D2, 0x25E1}, {0x25E6, 0x25EE}, + {0x25F0, 0x25FC}, {0x25FF, 0x2604}, {0x2607, 0x2608}, + {0x260A, 0x260D}, {0x2610, 0x2613}, {0x2616, 0x261B}, + {0x261D, 0x261D}, {0x261F, 0x263F}, {0x2641, 0x2641}, + {0x2643, 0x2647}, {0x2654, 0x265F}, {0x2662, 0x2662}, + {0x2666, 0x2666}, {0x266B, 0x266B}, {0x266E, 0x266E}, + {0x2670, 0x267E}, {0x2680, 0x2692}, {0x2694, 0x269D}, + {0x26A0, 0x26A0}, {0x26A2, 0x26A9}, {0x26AC, 0x26BC}, + {0x26C0, 0x26C3}, {0x26E2, 0x26E2}, {0x26E4, 0x26E7}, + {0x2700, 0x2704}, {0x2706, 0x2709}, {0x270C, 0x2727}, + {0x2729, 0x273C}, {0x273E, 0x274B}, {0x274D, 0x274D}, + {0x274F, 0x2752}, {0x2756, 0x2756}, {0x2758, 0x2775}, + {0x2780, 0x2794}, {0x2798, 0x27AF}, {0x27B1, 0x27BE}, + {0x27C0, 0x27E5}, {0x27EE, 0x2984}, {0x2987, 0x2B1A}, + {0x2B1D, 0x2B4F}, {0x2B51, 0x2B54}, {0x2B5A, 0x2B73}, + {0x2B76, 0x2B95}, {0x2B97, 0x2C2E}, {0x2C30, 0x2C5E}, + {0x2C60, 0x2CF3}, {0x2CF9, 0x2D25}, {0x2D27, 0x2D27}, + {0x2D2D, 0x2D2D}, {0x2D30, 0x2D67}, {0x2D6F, 0x2D70}, + {0x2D7F, 0x2D96}, {0x2DA0, 0x2DA6}, {0x2DA8, 0x2DAE}, + {0x2DB0, 0x2DB6}, {0x2DB8, 0x2DBE}, {0x2DC0, 0x2DC6}, + {0x2DC8, 0x2DCE}, {0x2DD0, 0x2DD6}, {0x2DD8, 0x2DDE}, + {0x2DE0, 0x2E52}, {0x303F, 0x303F}, {0x4DC0, 0x4DFF}, + {0xA4D0, 0xA62B}, {0xA640, 0xA6F7}, {0xA700, 0xA7BF}, + {0xA7C2, 0xA7CA}, {0xA7F5, 0xA82C}, {0xA830, 0xA839}, + {0xA840, 0xA877}, {0xA880, 0xA8C5}, {0xA8CE, 0xA8D9}, + {0xA8E0, 0xA953}, {0xA95F, 0xA95F}, {0xA980, 0xA9CD}, + {0xA9CF, 0xA9D9}, {0xA9DE, 0xA9FE}, {0xAA00, 0xAA36}, + {0xAA40, 0xAA4D}, {0xAA50, 0xAA59}, {0xAA5C, 0xAAC2}, + {0xAADB, 0xAAF6}, {0xAB01, 0xAB06}, {0xAB09, 0xAB0E}, + {0xAB11, 0xAB16}, {0xAB20, 0xAB26}, {0xAB28, 0xAB2E}, + {0xAB30, 0xAB6B}, {0xAB70, 0xABED}, {0xABF0, 0xABF9}, + {0xD7B0, 0xD7C6}, {0xD7CB, 0xD7FB}, {0xD800, 0xDFFF}, + {0xFB00, 0xFB06}, {0xFB13, 0xFB17}, {0xFB1D, 0xFB36}, + {0xFB38, 0xFB3C}, {0xFB3E, 0xFB3E}, {0xFB40, 0xFB41}, + {0xFB43, 0xFB44}, {0xFB46, 0xFBC1}, {0xFBD3, 0xFD3F}, + {0xFD50, 0xFD8F}, {0xFD92, 0xFDC7}, {0xFDF0, 0xFDFD}, + {0xFE20, 0xFE2F}, {0xFE70, 0xFE74}, {0xFE76, 0xFEFC}, + {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFC}, {0x10000, 0x1000B}, + {0x1000D, 0x10026}, {0x10028, 0x1003A}, {0x1003C, 0x1003D}, + {0x1003F, 0x1004D}, {0x10050, 0x1005D}, {0x10080, 0x100FA}, + {0x10100, 0x10102}, {0x10107, 0x10133}, {0x10137, 0x1018E}, + {0x10190, 0x1019C}, {0x101A0, 0x101A0}, {0x101D0, 0x101FD}, + {0x10280, 0x1029C}, {0x102A0, 0x102D0}, {0x102E0, 0x102FB}, + {0x10300, 0x10323}, {0x1032D, 0x1034A}, {0x10350, 0x1037A}, + {0x10380, 0x1039D}, {0x1039F, 0x103C3}, {0x103C8, 0x103D5}, + {0x10400, 0x1049D}, {0x104A0, 0x104A9}, {0x104B0, 0x104D3}, + {0x104D8, 0x104FB}, {0x10500, 0x10527}, {0x10530, 0x10563}, + {0x1056F, 0x1056F}, {0x10600, 0x10736}, {0x10740, 0x10755}, + {0x10760, 0x10767}, {0x10800, 0x10805}, {0x10808, 0x10808}, + {0x1080A, 0x10835}, {0x10837, 0x10838}, {0x1083C, 0x1083C}, + {0x1083F, 0x10855}, {0x10857, 0x1089E}, {0x108A7, 0x108AF}, + {0x108E0, 0x108F2}, {0x108F4, 0x108F5}, {0x108FB, 0x1091B}, + {0x1091F, 0x10939}, {0x1093F, 0x1093F}, {0x10980, 0x109B7}, + {0x109BC, 0x109CF}, {0x109D2, 0x10A03}, {0x10A05, 0x10A06}, + {0x10A0C, 0x10A13}, {0x10A15, 0x10A17}, {0x10A19, 0x10A35}, + {0x10A38, 0x10A3A}, {0x10A3F, 0x10A48}, {0x10A50, 0x10A58}, + {0x10A60, 0x10A9F}, {0x10AC0, 0x10AE6}, {0x10AEB, 0x10AF6}, + {0x10B00, 0x10B35}, {0x10B39, 0x10B55}, {0x10B58, 0x10B72}, + {0x10B78, 0x10B91}, {0x10B99, 0x10B9C}, {0x10BA9, 0x10BAF}, + {0x10C00, 0x10C48}, {0x10C80, 0x10CB2}, {0x10CC0, 0x10CF2}, + {0x10CFA, 0x10D27}, {0x10D30, 0x10D39}, {0x10E60, 0x10E7E}, + {0x10E80, 0x10EA9}, {0x10EAB, 0x10EAD}, {0x10EB0, 0x10EB1}, + {0x10F00, 0x10F27}, {0x10F30, 0x10F59}, {0x10FB0, 0x10FCB}, + {0x10FE0, 0x10FF6}, {0x11000, 0x1104D}, {0x11052, 0x1106F}, + {0x1107F, 0x110C1}, {0x110CD, 0x110CD}, {0x110D0, 0x110E8}, + {0x110F0, 0x110F9}, {0x11100, 0x11134}, {0x11136, 0x11147}, + {0x11150, 0x11176}, {0x11180, 0x111DF}, {0x111E1, 0x111F4}, + {0x11200, 0x11211}, {0x11213, 0x1123E}, {0x11280, 0x11286}, + {0x11288, 0x11288}, {0x1128A, 0x1128D}, {0x1128F, 0x1129D}, + {0x1129F, 0x112A9}, {0x112B0, 0x112EA}, {0x112F0, 0x112F9}, + {0x11300, 0x11303}, {0x11305, 0x1130C}, {0x1130F, 0x11310}, + {0x11313, 0x11328}, {0x1132A, 0x11330}, {0x11332, 0x11333}, + {0x11335, 0x11339}, {0x1133B, 0x11344}, {0x11347, 0x11348}, + {0x1134B, 0x1134D}, {0x11350, 0x11350}, {0x11357, 0x11357}, + {0x1135D, 0x11363}, {0x11366, 0x1136C}, {0x11370, 0x11374}, + {0x11400, 0x1145B}, {0x1145D, 0x11461}, {0x11480, 0x114C7}, + {0x114D0, 0x114D9}, {0x11580, 0x115B5}, {0x115B8, 0x115DD}, + {0x11600, 0x11644}, {0x11650, 0x11659}, {0x11660, 0x1166C}, + {0x11680, 0x116B8}, {0x116C0, 0x116C9}, {0x11700, 0x1171A}, + {0x1171D, 0x1172B}, {0x11730, 0x1173F}, {0x11800, 0x1183B}, + {0x118A0, 0x118F2}, {0x118FF, 0x11906}, {0x11909, 0x11909}, + {0x1190C, 0x11913}, {0x11915, 0x11916}, {0x11918, 0x11935}, + {0x11937, 0x11938}, {0x1193B, 0x11946}, {0x11950, 0x11959}, + {0x119A0, 0x119A7}, {0x119AA, 0x119D7}, {0x119DA, 0x119E4}, + {0x11A00, 0x11A47}, {0x11A50, 0x11AA2}, {0x11AC0, 0x11AF8}, + {0x11C00, 0x11C08}, {0x11C0A, 0x11C36}, {0x11C38, 0x11C45}, + {0x11C50, 0x11C6C}, {0x11C70, 0x11C8F}, {0x11C92, 0x11CA7}, + {0x11CA9, 0x11CB6}, {0x11D00, 0x11D06}, {0x11D08, 0x11D09}, + {0x11D0B, 0x11D36}, {0x11D3A, 0x11D3A}, {0x11D3C, 0x11D3D}, + {0x11D3F, 0x11D47}, {0x11D50, 0x11D59}, {0x11D60, 0x11D65}, + {0x11D67, 0x11D68}, {0x11D6A, 0x11D8E}, {0x11D90, 0x11D91}, + {0x11D93, 0x11D98}, {0x11DA0, 0x11DA9}, {0x11EE0, 0x11EF8}, + {0x11FB0, 0x11FB0}, {0x11FC0, 0x11FF1}, {0x11FFF, 0x12399}, + {0x12400, 0x1246E}, {0x12470, 0x12474}, {0x12480, 0x12543}, + {0x13000, 0x1342E}, {0x13430, 0x13438}, {0x14400, 0x14646}, + {0x16800, 0x16A38}, {0x16A40, 0x16A5E}, {0x16A60, 0x16A69}, + {0x16A6E, 0x16A6F}, {0x16AD0, 0x16AED}, {0x16AF0, 0x16AF5}, + {0x16B00, 0x16B45}, {0x16B50, 0x16B59}, {0x16B5B, 0x16B61}, + {0x16B63, 0x16B77}, {0x16B7D, 0x16B8F}, {0x16E40, 0x16E9A}, + {0x16F00, 0x16F4A}, {0x16F4F, 0x16F87}, {0x16F8F, 0x16F9F}, + {0x1BC00, 0x1BC6A}, {0x1BC70, 0x1BC7C}, {0x1BC80, 0x1BC88}, + {0x1BC90, 0x1BC99}, {0x1BC9C, 0x1BCA3}, {0x1D000, 0x1D0F5}, + {0x1D100, 0x1D126}, {0x1D129, 0x1D1E8}, {0x1D200, 0x1D245}, + {0x1D2E0, 0x1D2F3}, {0x1D300, 0x1D356}, {0x1D360, 0x1D378}, + {0x1D400, 0x1D454}, {0x1D456, 0x1D49C}, {0x1D49E, 0x1D49F}, + {0x1D4A2, 0x1D4A2}, {0x1D4A5, 0x1D4A6}, {0x1D4A9, 0x1D4AC}, + {0x1D4AE, 0x1D4B9}, {0x1D4BB, 0x1D4BB}, {0x1D4BD, 0x1D4C3}, + {0x1D4C5, 0x1D505}, {0x1D507, 0x1D50A}, {0x1D50D, 0x1D514}, + {0x1D516, 0x1D51C}, {0x1D51E, 0x1D539}, {0x1D53B, 0x1D53E}, + {0x1D540, 0x1D544}, {0x1D546, 0x1D546}, {0x1D54A, 0x1D550}, + {0x1D552, 0x1D6A5}, {0x1D6A8, 0x1D7CB}, {0x1D7CE, 0x1DA8B}, + {0x1DA9B, 0x1DA9F}, {0x1DAA1, 0x1DAAF}, {0x1E000, 0x1E006}, + {0x1E008, 0x1E018}, {0x1E01B, 0x1E021}, {0x1E023, 0x1E024}, + {0x1E026, 0x1E02A}, {0x1E100, 0x1E12C}, {0x1E130, 0x1E13D}, + {0x1E140, 0x1E149}, {0x1E14E, 0x1E14F}, {0x1E2C0, 0x1E2F9}, + {0x1E2FF, 0x1E2FF}, {0x1E800, 0x1E8C4}, {0x1E8C7, 0x1E8D6}, + {0x1E900, 0x1E94B}, {0x1E950, 0x1E959}, {0x1E95E, 0x1E95F}, + {0x1EC71, 0x1ECB4}, {0x1ED01, 0x1ED3D}, {0x1EE00, 0x1EE03}, + {0x1EE05, 0x1EE1F}, {0x1EE21, 0x1EE22}, {0x1EE24, 0x1EE24}, + {0x1EE27, 0x1EE27}, {0x1EE29, 0x1EE32}, {0x1EE34, 0x1EE37}, + {0x1EE39, 0x1EE39}, {0x1EE3B, 0x1EE3B}, {0x1EE42, 0x1EE42}, + {0x1EE47, 0x1EE47}, {0x1EE49, 0x1EE49}, {0x1EE4B, 0x1EE4B}, + {0x1EE4D, 0x1EE4F}, {0x1EE51, 0x1EE52}, {0x1EE54, 0x1EE54}, + {0x1EE57, 0x1EE57}, {0x1EE59, 0x1EE59}, {0x1EE5B, 0x1EE5B}, + {0x1EE5D, 0x1EE5D}, {0x1EE5F, 0x1EE5F}, {0x1EE61, 0x1EE62}, + {0x1EE64, 0x1EE64}, {0x1EE67, 0x1EE6A}, {0x1EE6C, 0x1EE72}, + {0x1EE74, 0x1EE77}, {0x1EE79, 0x1EE7C}, {0x1EE7E, 0x1EE7E}, + {0x1EE80, 0x1EE89}, {0x1EE8B, 0x1EE9B}, {0x1EEA1, 0x1EEA3}, + {0x1EEA5, 0x1EEA9}, {0x1EEAB, 0x1EEBB}, {0x1EEF0, 0x1EEF1}, + {0x1F000, 0x1F003}, {0x1F005, 0x1F02B}, {0x1F030, 0x1F093}, + {0x1F0A0, 0x1F0AE}, {0x1F0B1, 0x1F0BF}, {0x1F0C1, 0x1F0CE}, + {0x1F0D1, 0x1F0F5}, {0x1F10B, 0x1F10F}, {0x1F12E, 0x1F12F}, + {0x1F16A, 0x1F16F}, {0x1F1AD, 0x1F1AD}, {0x1F1E6, 0x1F1FF}, + {0x1F321, 0x1F32C}, {0x1F336, 0x1F336}, {0x1F37D, 0x1F37D}, + {0x1F394, 0x1F39F}, {0x1F3CB, 0x1F3CE}, {0x1F3D4, 0x1F3DF}, + {0x1F3F1, 0x1F3F3}, {0x1F3F5, 0x1F3F7}, {0x1F43F, 0x1F43F}, + {0x1F441, 0x1F441}, {0x1F4FD, 0x1F4FE}, {0x1F53E, 0x1F54A}, + {0x1F54F, 0x1F54F}, {0x1F568, 0x1F579}, {0x1F57B, 0x1F594}, + {0x1F597, 0x1F5A3}, {0x1F5A5, 0x1F5FA}, {0x1F650, 0x1F67F}, + {0x1F6C6, 0x1F6CB}, {0x1F6CD, 0x1F6CF}, {0x1F6D3, 0x1F6D4}, + {0x1F6E0, 0x1F6EA}, {0x1F6F0, 0x1F6F3}, {0x1F700, 0x1F773}, + {0x1F780, 0x1F7D8}, {0x1F800, 0x1F80B}, {0x1F810, 0x1F847}, + {0x1F850, 0x1F859}, {0x1F860, 0x1F887}, {0x1F890, 0x1F8AD}, + {0x1F8B0, 0x1F8B1}, {0x1F900, 0x1F90B}, {0x1F93B, 0x1F93B}, + {0x1F946, 0x1F946}, {0x1FA00, 0x1FA53}, {0x1FA60, 0x1FA6D}, + {0x1FB00, 0x1FB92}, {0x1FB94, 0x1FBCA}, {0x1FBF0, 0x1FBF9}, + {0xE0001, 0xE0001}, {0xE0020, 0xE007F}, +} + +var emoji = table{ + {0x203C, 0x203C}, {0x2049, 0x2049}, {0x2122, 0x2122}, + {0x2139, 0x2139}, {0x2194, 0x2199}, {0x21A9, 0x21AA}, + {0x231A, 0x231B}, {0x2328, 0x2328}, {0x2388, 0x2388}, + {0x23CF, 0x23CF}, {0x23E9, 0x23F3}, {0x23F8, 0x23FA}, + {0x24C2, 0x24C2}, {0x25AA, 0x25AB}, {0x25B6, 0x25B6}, + {0x25C0, 0x25C0}, {0x25FB, 0x25FE}, {0x2600, 0x2605}, + {0x2607, 0x2612}, {0x2614, 0x2685}, {0x2690, 0x2705}, + {0x2708, 0x2712}, {0x2714, 0x2714}, {0x2716, 0x2716}, + {0x271D, 0x271D}, {0x2721, 0x2721}, {0x2728, 0x2728}, + {0x2733, 0x2734}, {0x2744, 0x2744}, {0x2747, 0x2747}, + {0x274C, 0x274C}, {0x274E, 0x274E}, {0x2753, 0x2755}, + {0x2757, 0x2757}, {0x2763, 0x2767}, {0x2795, 0x2797}, + {0x27A1, 0x27A1}, {0x27B0, 0x27B0}, {0x27BF, 0x27BF}, + {0x2934, 0x2935}, {0x2B05, 0x2B07}, {0x2B1B, 0x2B1C}, + {0x2B50, 0x2B50}, {0x2B55, 0x2B55}, {0x3030, 0x3030}, + {0x303D, 0x303D}, {0x3297, 0x3297}, {0x3299, 0x3299}, + {0x1F000, 0x1F0FF}, {0x1F10D, 0x1F10F}, {0x1F12F, 0x1F12F}, + {0x1F16C, 0x1F171}, {0x1F17E, 0x1F17F}, {0x1F18E, 0x1F18E}, + {0x1F191, 0x1F19A}, {0x1F1AD, 0x1F1E5}, {0x1F201, 0x1F20F}, + {0x1F21A, 0x1F21A}, {0x1F22F, 0x1F22F}, {0x1F232, 0x1F23A}, + {0x1F23C, 0x1F23F}, {0x1F249, 0x1F3FA}, {0x1F400, 0x1F53D}, + {0x1F546, 0x1F64F}, {0x1F680, 0x1F6FF}, {0x1F774, 0x1F77F}, + {0x1F7D5, 0x1F7FF}, {0x1F80C, 0x1F80F}, {0x1F848, 0x1F84F}, + {0x1F85A, 0x1F85F}, {0x1F888, 0x1F88F}, {0x1F8AE, 0x1F8FF}, + {0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945}, {0x1F947, 0x1FAFF}, + {0x1FC00, 0x1FFFD}, +} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_windows.go b/vendor/github.com/mattn/go-runewidth/runewidth_windows.go new file mode 100644 index 000000000..d6a61777d --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth_windows.go @@ -0,0 +1,28 @@ +// +build windows +// +build !appengine + +package runewidth + +import ( + "syscall" +) + +var ( + kernel32 = syscall.NewLazyDLL("kernel32") + procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") +) + +// IsEastAsian return true if the current locale is CJK +func IsEastAsian() bool { + r1, _, _ := procGetConsoleOutputCP.Call() + if r1 == 0 { + return false + } + + switch int(r1) { + case 932, 51932, 936, 949, 950: + return true + } + + return false +} diff --git a/vendor/github.com/olekukonko/tablewriter/.gitignore b/vendor/github.com/olekukonko/tablewriter/.gitignore new file mode 100644 index 000000000..b66cec635 --- /dev/null +++ b/vendor/github.com/olekukonko/tablewriter/.gitignore @@ -0,0 +1,15 @@ +# Created by .ignore support plugin (hsz.mobi) +### Go template +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + diff --git a/vendor/github.com/olekukonko/tablewriter/.travis.yml b/vendor/github.com/olekukonko/tablewriter/.travis.yml new file mode 100644 index 000000000..366d48a35 --- /dev/null +++ b/vendor/github.com/olekukonko/tablewriter/.travis.yml @@ -0,0 +1,22 @@ +language: go +arch: + - ppc64le + - amd64 +go: + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - 1.7 + - 1.8 + - 1.9 + - "1.10" + - tip +jobs: + exclude : + - arch : ppc64le + go : + - 1.3 + - arch : ppc64le + go : + - 1.4 diff --git a/vendor/github.com/olekukonko/tablewriter/LICENSE.md b/vendor/github.com/olekukonko/tablewriter/LICENSE.md new file mode 100644 index 000000000..a0769b5c1 --- /dev/null +++ b/vendor/github.com/olekukonko/tablewriter/LICENSE.md @@ -0,0 +1,19 @@ +Copyright (C) 2014 by Oleku Konko + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/olekukonko/tablewriter/README.md b/vendor/github.com/olekukonko/tablewriter/README.md new file mode 100644 index 000000000..f06530d75 --- /dev/null +++ b/vendor/github.com/olekukonko/tablewriter/README.md @@ -0,0 +1,431 @@ +ASCII Table Writer +========= + +[![Build Status](https://travis-ci.org/olekukonko/tablewriter.png?branch=master)](https://travis-ci.org/olekukonko/tablewriter) +[![Total views](https://img.shields.io/sourcegraph/rrc/github.com/olekukonko/tablewriter.svg)](https://sourcegraph.com/github.com/olekukonko/tablewriter) +[![Godoc](https://godoc.org/github.com/olekukonko/tablewriter?status.svg)](https://godoc.org/github.com/olekukonko/tablewriter) + +Generate ASCII table on the fly ... Installation is simple as + + go get github.com/olekukonko/tablewriter + + +#### Features +- Automatic Padding +- Support Multiple Lines +- Supports Alignment +- Support Custom Separators +- Automatic Alignment of numbers & percentage +- Write directly to http , file etc via `io.Writer` +- Read directly from CSV file +- Optional row line via `SetRowLine` +- Normalise table header +- Make CSV Headers optional +- Enable or disable table border +- Set custom footer support +- Optional identical cells merging +- Set custom caption +- Optional reflowing of paragraphs in multi-line cells. + +#### Example 1 - Basic +```go +data := [][]string{ + []string{"A", "The Good", "500"}, + []string{"B", "The Very very Bad Man", "288"}, + []string{"C", "The Ugly", "120"}, + []string{"D", "The Gopher", "800"}, +} + +table := tablewriter.NewWriter(os.Stdout) +table.SetHeader([]string{"Name", "Sign", "Rating"}) + +for _, v := range data { + table.Append(v) +} +table.Render() // Send output +``` + +##### Output 1 +``` ++------+-----------------------+--------+ +| NAME | SIGN | RATING | ++------+-----------------------+--------+ +| A | The Good | 500 | +| B | The Very very Bad Man | 288 | +| C | The Ugly | 120 | +| D | The Gopher | 800 | ++------+-----------------------+--------+ +``` + +#### Example 2 - Without Border / Footer / Bulk Append +```go +data := [][]string{ + []string{"1/1/2014", "Domain name", "2233", "$10.98"}, + []string{"1/1/2014", "January Hosting", "2233", "$54.95"}, + []string{"1/4/2014", "February Hosting", "2233", "$51.00"}, + []string{"1/4/2014", "February Extra Bandwidth", "2233", "$30.00"}, +} + +table := tablewriter.NewWriter(os.Stdout) +table.SetHeader([]string{"Date", "Description", "CV2", "Amount"}) +table.SetFooter([]string{"", "", "Total", "$146.93"}) // Add Footer +table.SetBorder(false) // Set Border to false +table.AppendBulk(data) // Add Bulk Data +table.Render() +``` + +##### Output 2 +``` + + DATE | DESCRIPTION | CV2 | AMOUNT +-----------+--------------------------+-------+---------- + 1/1/2014 | Domain name | 2233 | $10.98 + 1/1/2014 | January Hosting | 2233 | $54.95 + 1/4/2014 | February Hosting | 2233 | $51.00 + 1/4/2014 | February Extra Bandwidth | 2233 | $30.00 +-----------+--------------------------+-------+---------- + TOTAL | $146 93 + --------+---------- + +``` + + +#### Example 3 - CSV +```go +table, _ := tablewriter.NewCSV(os.Stdout, "testdata/test_info.csv", true) +table.SetAlignment(tablewriter.ALIGN_LEFT) // Set Alignment +table.Render() +``` + +##### Output 3 +``` ++----------+--------------+------+-----+---------+----------------+ +| FIELD | TYPE | NULL | KEY | DEFAULT | EXTRA | ++----------+--------------+------+-----+---------+----------------+ +| user_id | smallint(5) | NO | PRI | NULL | auto_increment | +| username | varchar(10) | NO | | NULL | | +| password | varchar(100) | NO | | NULL | | ++----------+--------------+------+-----+---------+----------------+ +``` + +#### Example 4 - Custom Separator +```go +table, _ := tablewriter.NewCSV(os.Stdout, "testdata/test.csv", true) +table.SetRowLine(true) // Enable row line + +// Change table lines +table.SetCenterSeparator("*") +table.SetColumnSeparator("╪") +table.SetRowSeparator("-") + +table.SetAlignment(tablewriter.ALIGN_LEFT) +table.Render() +``` + +##### Output 4 +``` +*------------*-----------*---------* +╪ FIRST NAME ╪ LAST NAME ╪ SSN ╪ +*------------*-----------*---------* +╪ John ╪ Barry ╪ 123456 ╪ +*------------*-----------*---------* +╪ Kathy ╪ Smith ╪ 687987 ╪ +*------------*-----------*---------* +╪ Bob ╪ McCornick ╪ 3979870 ╪ +*------------*-----------*---------* +``` + +#### Example 5 - Markdown Format +```go +data := [][]string{ + []string{"1/1/2014", "Domain name", "2233", "$10.98"}, + []string{"1/1/2014", "January Hosting", "2233", "$54.95"}, + []string{"1/4/2014", "February Hosting", "2233", "$51.00"}, + []string{"1/4/2014", "February Extra Bandwidth", "2233", "$30.00"}, +} + +table := tablewriter.NewWriter(os.Stdout) +table.SetHeader([]string{"Date", "Description", "CV2", "Amount"}) +table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) +table.SetCenterSeparator("|") +table.AppendBulk(data) // Add Bulk Data +table.Render() +``` + +##### Output 5 +``` +| DATE | DESCRIPTION | CV2 | AMOUNT | +|----------|--------------------------|------|--------| +| 1/1/2014 | Domain name | 2233 | $10.98 | +| 1/1/2014 | January Hosting | 2233 | $54.95 | +| 1/4/2014 | February Hosting | 2233 | $51.00 | +| 1/4/2014 | February Extra Bandwidth | 2233 | $30.00 | +``` + +#### Example 6 - Identical cells merging +```go +data := [][]string{ + []string{"1/1/2014", "Domain name", "1234", "$10.98"}, + []string{"1/1/2014", "January Hosting", "2345", "$54.95"}, + []string{"1/4/2014", "February Hosting", "3456", "$51.00"}, + []string{"1/4/2014", "February Extra Bandwidth", "4567", "$30.00"}, +} + +table := tablewriter.NewWriter(os.Stdout) +table.SetHeader([]string{"Date", "Description", "CV2", "Amount"}) +table.SetFooter([]string{"", "", "Total", "$146.93"}) +table.SetAutoMergeCells(true) +table.SetRowLine(true) +table.AppendBulk(data) +table.Render() +``` + +##### Output 6 +``` ++----------+--------------------------+-------+---------+ +| DATE | DESCRIPTION | CV2 | AMOUNT | ++----------+--------------------------+-------+---------+ +| 1/1/2014 | Domain name | 1234 | $10.98 | ++ +--------------------------+-------+---------+ +| | January Hosting | 2345 | $54.95 | ++----------+--------------------------+-------+---------+ +| 1/4/2014 | February Hosting | 3456 | $51.00 | ++ +--------------------------+-------+---------+ +| | February Extra Bandwidth | 4567 | $30.00 | ++----------+--------------------------+-------+---------+ +| TOTAL | $146 93 | ++----------+--------------------------+-------+---------+ +``` + +#### Example 7 - Identical cells merging (specify the column index to merge) +```go +data := [][]string{ + []string{"1/1/2014", "Domain name", "1234", "$10.98"}, + []string{"1/1/2014", "January Hosting", "1234", "$10.98"}, + []string{"1/4/2014", "February Hosting", "3456", "$51.00"}, + []string{"1/4/2014", "February Extra Bandwidth", "4567", "$30.00"}, +} + +table := tablewriter.NewWriter(os.Stdout) +table.SetHeader([]string{"Date", "Description", "CV2", "Amount"}) +table.SetFooter([]string{"", "", "Total", "$146.93"}) +table.SetAutoMergeCellsByColumnIndex([]int{2, 3}) +table.SetRowLine(true) +table.AppendBulk(data) +table.Render() +``` + +##### Output 7 +``` ++----------+--------------------------+-------+---------+ +| DATE | DESCRIPTION | CV2 | AMOUNT | ++----------+--------------------------+-------+---------+ +| 1/1/2014 | Domain name | 1234 | $10.98 | ++----------+--------------------------+ + + +| 1/1/2014 | January Hosting | | | ++----------+--------------------------+-------+---------+ +| 1/4/2014 | February Hosting | 3456 | $51.00 | ++----------+--------------------------+-------+---------+ +| 1/4/2014 | February Extra Bandwidth | 4567 | $30.00 | ++----------+--------------------------+-------+---------+ +| TOTAL | $146.93 | ++----------+--------------------------+-------+---------+ +``` + + +#### Table with color +```go +data := [][]string{ + []string{"1/1/2014", "Domain name", "2233", "$10.98"}, + []string{"1/1/2014", "January Hosting", "2233", "$54.95"}, + []string{"1/4/2014", "February Hosting", "2233", "$51.00"}, + []string{"1/4/2014", "February Extra Bandwidth", "2233", "$30.00"}, +} + +table := tablewriter.NewWriter(os.Stdout) +table.SetHeader([]string{"Date", "Description", "CV2", "Amount"}) +table.SetFooter([]string{"", "", "Total", "$146.93"}) // Add Footer +table.SetBorder(false) // Set Border to false + +table.SetHeaderColor(tablewriter.Colors{tablewriter.Bold, tablewriter.BgGreenColor}, + tablewriter.Colors{tablewriter.FgHiRedColor, tablewriter.Bold, tablewriter.BgBlackColor}, + tablewriter.Colors{tablewriter.BgRedColor, tablewriter.FgWhiteColor}, + tablewriter.Colors{tablewriter.BgCyanColor, tablewriter.FgWhiteColor}) + +table.SetColumnColor(tablewriter.Colors{tablewriter.Bold, tablewriter.FgHiBlackColor}, + tablewriter.Colors{tablewriter.Bold, tablewriter.FgHiRedColor}, + tablewriter.Colors{tablewriter.Bold, tablewriter.FgHiBlackColor}, + tablewriter.Colors{tablewriter.Bold, tablewriter.FgBlackColor}) + +table.SetFooterColor(tablewriter.Colors{}, tablewriter.Colors{}, + tablewriter.Colors{tablewriter.Bold}, + tablewriter.Colors{tablewriter.FgHiRedColor}) + +table.AppendBulk(data) +table.Render() +``` + +#### Table with color Output +![Table with Color](https://cloud.githubusercontent.com/assets/6460392/21101956/bbc7b356-c0a1-11e6-9f36-dba694746efc.png) + +#### Example - 8 Table Cells with Color + +Individual Cell Colors from `func Rich` take precedence over Column Colors + +```go +data := [][]string{ + []string{"Test1Merge", "HelloCol2 - 1", "HelloCol3 - 1", "HelloCol4 - 1"}, + []string{"Test1Merge", "HelloCol2 - 2", "HelloCol3 - 2", "HelloCol4 - 2"}, + []string{"Test1Merge", "HelloCol2 - 3", "HelloCol3 - 3", "HelloCol4 - 3"}, + []string{"Test2Merge", "HelloCol2 - 4", "HelloCol3 - 4", "HelloCol4 - 4"}, + []string{"Test2Merge", "HelloCol2 - 5", "HelloCol3 - 5", "HelloCol4 - 5"}, + []string{"Test2Merge", "HelloCol2 - 6", "HelloCol3 - 6", "HelloCol4 - 6"}, + []string{"Test2Merge", "HelloCol2 - 7", "HelloCol3 - 7", "HelloCol4 - 7"}, + []string{"Test3Merge", "HelloCol2 - 8", "HelloCol3 - 8", "HelloCol4 - 8"}, + []string{"Test3Merge", "HelloCol2 - 9", "HelloCol3 - 9", "HelloCol4 - 9"}, + []string{"Test3Merge", "HelloCol2 - 10", "HelloCol3 -10", "HelloCol4 - 10"}, +} + +table := tablewriter.NewWriter(os.Stdout) +table.SetHeader([]string{"Col1", "Col2", "Col3", "Col4"}) +table.SetFooter([]string{"", "", "Footer3", "Footer4"}) +table.SetBorder(false) + +table.SetHeaderColor(tablewriter.Colors{tablewriter.Bold, tablewriter.BgGreenColor}, + tablewriter.Colors{tablewriter.FgHiRedColor, tablewriter.Bold, tablewriter.BgBlackColor}, + tablewriter.Colors{tablewriter.BgRedColor, tablewriter.FgWhiteColor}, + tablewriter.Colors{tablewriter.BgCyanColor, tablewriter.FgWhiteColor}) + +table.SetColumnColor(tablewriter.Colors{tablewriter.Bold, tablewriter.FgHiBlackColor}, + tablewriter.Colors{tablewriter.Bold, tablewriter.FgHiRedColor}, + tablewriter.Colors{tablewriter.Bold, tablewriter.FgHiBlackColor}, + tablewriter.Colors{tablewriter.Bold, tablewriter.FgBlackColor}) + +table.SetFooterColor(tablewriter.Colors{}, tablewriter.Colors{}, + tablewriter.Colors{tablewriter.Bold}, + tablewriter.Colors{tablewriter.FgHiRedColor}) + +colorData1 := []string{"TestCOLOR1Merge", "HelloCol2 - COLOR1", "HelloCol3 - COLOR1", "HelloCol4 - COLOR1"} +colorData2 := []string{"TestCOLOR2Merge", "HelloCol2 - COLOR2", "HelloCol3 - COLOR2", "HelloCol4 - COLOR2"} + +for i, row := range data { + if i == 4 { + table.Rich(colorData1, []tablewriter.Colors{tablewriter.Colors{}, tablewriter.Colors{tablewriter.Normal, tablewriter.FgCyanColor}, tablewriter.Colors{tablewriter.Bold, tablewriter.FgWhiteColor}, tablewriter.Colors{}}) + table.Rich(colorData2, []tablewriter.Colors{tablewriter.Colors{tablewriter.Normal, tablewriter.FgMagentaColor}, tablewriter.Colors{}, tablewriter.Colors{tablewriter.Bold, tablewriter.BgRedColor}, tablewriter.Colors{tablewriter.FgHiGreenColor, tablewriter.Italic, tablewriter.BgHiCyanColor}}) + } + table.Append(row) +} + +table.SetAutoMergeCells(true) +table.Render() + +``` + +##### Table cells with color Output +![Table cells with Color](https://user-images.githubusercontent.com/9064687/63969376-bcd88d80-ca6f-11e9-9466-c3d954700b25.png) + +#### Example 9 - Set table caption +```go +data := [][]string{ + []string{"A", "The Good", "500"}, + []string{"B", "The Very very Bad Man", "288"}, + []string{"C", "The Ugly", "120"}, + []string{"D", "The Gopher", "800"}, +} + +table := tablewriter.NewWriter(os.Stdout) +table.SetHeader([]string{"Name", "Sign", "Rating"}) +table.SetCaption(true, "Movie ratings.") + +for _, v := range data { + table.Append(v) +} +table.Render() // Send output +``` + +Note: Caption text will wrap with total width of rendered table. + +##### Output 9 +``` ++------+-----------------------+--------+ +| NAME | SIGN | RATING | ++------+-----------------------+--------+ +| A | The Good | 500 | +| B | The Very very Bad Man | 288 | +| C | The Ugly | 120 | +| D | The Gopher | 800 | ++------+-----------------------+--------+ +Movie ratings. +``` + +#### Example 10 - Set NoWhiteSpace and TablePadding option +```go +data := [][]string{ + {"node1.example.com", "Ready", "compute", "1.11"}, + {"node2.example.com", "Ready", "compute", "1.11"}, + {"node3.example.com", "Ready", "compute", "1.11"}, + {"node4.example.com", "NotReady", "compute", "1.11"}, +} + +table := tablewriter.NewWriter(os.Stdout) +table.SetHeader([]string{"Name", "Status", "Role", "Version"}) +table.SetAutoWrapText(false) +table.SetAutoFormatHeaders(true) +table.SetHeaderAlignment(ALIGN_LEFT) +table.SetAlignment(ALIGN_LEFT) +table.SetCenterSeparator("") +table.SetColumnSeparator("") +table.SetRowSeparator("") +table.SetHeaderLine(false) +table.SetBorder(false) +table.SetTablePadding("\t") // pad with tabs +table.SetNoWhiteSpace(true) +table.AppendBulk(data) // Add Bulk Data +table.Render() +``` + +##### Output 10 +``` +NAME STATUS ROLE VERSION +node1.example.com Ready compute 1.11 +node2.example.com Ready compute 1.11 +node3.example.com Ready compute 1.11 +node4.example.com NotReady compute 1.11 +``` + +#### Render table into a string + +Instead of rendering the table to `io.Stdout` you can also render it into a string. Go 1.10 introduced the `strings.Builder` type which implements the `io.Writer` interface and can therefore be used for this task. Example: + +```go +package main + +import ( + "strings" + "fmt" + + "github.com/olekukonko/tablewriter" +) + +func main() { + tableString := &strings.Builder{} + table := tablewriter.NewWriter(tableString) + + /* + * Code to fill the table + */ + + table.Render() + + fmt.Println(tableString.String()) +} +``` + +#### TODO +- ~~Import Directly from CSV~~ - `done` +- ~~Support for `SetFooter`~~ - `done` +- ~~Support for `SetBorder`~~ - `done` +- ~~Support table with uneven rows~~ - `done` +- ~~Support custom alignment~~ +- General Improvement & Optimisation +- `NewHTML` Parse table from HTML diff --git a/vendor/github.com/olekukonko/tablewriter/csv.go b/vendor/github.com/olekukonko/tablewriter/csv.go new file mode 100644 index 000000000..98878303b --- /dev/null +++ b/vendor/github.com/olekukonko/tablewriter/csv.go @@ -0,0 +1,52 @@ +// Copyright 2014 Oleku Konko All rights reserved. +// Use of this source code is governed by a MIT +// license that can be found in the LICENSE file. + +// This module is a Table Writer API for the Go Programming Language. +// The protocols were written in pure Go and works on windows and unix systems + +package tablewriter + +import ( + "encoding/csv" + "io" + "os" +) + +// Start A new table by importing from a CSV file +// Takes io.Writer and csv File name +func NewCSV(writer io.Writer, fileName string, hasHeader bool) (*Table, error) { + file, err := os.Open(fileName) + if err != nil { + return &Table{}, err + } + defer file.Close() + csvReader := csv.NewReader(file) + t, err := NewCSVReader(writer, csvReader, hasHeader) + return t, err +} + +// Start a New Table Writer with csv.Reader +// This enables customisation such as reader.Comma = ';' +// See http://golang.org/src/pkg/encoding/csv/reader.go?s=3213:3671#L94 +func NewCSVReader(writer io.Writer, csvReader *csv.Reader, hasHeader bool) (*Table, error) { + t := NewWriter(writer) + if hasHeader { + // Read the first row + headers, err := csvReader.Read() + if err != nil { + return &Table{}, err + } + t.SetHeader(headers) + } + for { + record, err := csvReader.Read() + if err == io.EOF { + break + } else if err != nil { + return &Table{}, err + } + t.Append(record) + } + return t, nil +} diff --git a/vendor/github.com/olekukonko/tablewriter/table.go b/vendor/github.com/olekukonko/tablewriter/table.go new file mode 100644 index 000000000..f913149c6 --- /dev/null +++ b/vendor/github.com/olekukonko/tablewriter/table.go @@ -0,0 +1,967 @@ +// Copyright 2014 Oleku Konko All rights reserved. +// Use of this source code is governed by a MIT +// license that can be found in the LICENSE file. + +// This module is a Table Writer API for the Go Programming Language. +// The protocols were written in pure Go and works on windows and unix systems + +// Create & Generate text based table +package tablewriter + +import ( + "bytes" + "fmt" + "io" + "regexp" + "strings" +) + +const ( + MAX_ROW_WIDTH = 30 +) + +const ( + CENTER = "+" + ROW = "-" + COLUMN = "|" + SPACE = " " + NEWLINE = "\n" +) + +const ( + ALIGN_DEFAULT = iota + ALIGN_CENTER + ALIGN_RIGHT + ALIGN_LEFT +) + +var ( + decimal = regexp.MustCompile(`^-?(?:\d{1,3}(?:,\d{3})*|\d+)(?:\.\d+)?$`) + percent = regexp.MustCompile(`^-?\d+\.?\d*$%$`) +) + +type Border struct { + Left bool + Right bool + Top bool + Bottom bool +} + +type Table struct { + out io.Writer + rows [][]string + lines [][][]string + cs map[int]int + rs map[int]int + headers [][]string + footers [][]string + caption bool + captionText string + autoFmt bool + autoWrap bool + reflowText bool + mW int + pCenter string + pRow string + pColumn string + tColumn int + tRow int + hAlign int + fAlign int + align int + newLine string + rowLine bool + autoMergeCells bool + columnsToAutoMergeCells map[int]bool + noWhiteSpace bool + tablePadding string + hdrLine bool + borders Border + colSize int + headerParams []string + columnsParams []string + footerParams []string + columnsAlign []int +} + +// Start New Table +// Take io.Writer Directly +func NewWriter(writer io.Writer) *Table { + t := &Table{ + out: writer, + rows: [][]string{}, + lines: [][][]string{}, + cs: make(map[int]int), + rs: make(map[int]int), + headers: [][]string{}, + footers: [][]string{}, + caption: false, + captionText: "Table caption.", + autoFmt: true, + autoWrap: true, + reflowText: true, + mW: MAX_ROW_WIDTH, + pCenter: CENTER, + pRow: ROW, + pColumn: COLUMN, + tColumn: -1, + tRow: -1, + hAlign: ALIGN_DEFAULT, + fAlign: ALIGN_DEFAULT, + align: ALIGN_DEFAULT, + newLine: NEWLINE, + rowLine: false, + hdrLine: true, + borders: Border{Left: true, Right: true, Bottom: true, Top: true}, + colSize: -1, + headerParams: []string{}, + columnsParams: []string{}, + footerParams: []string{}, + columnsAlign: []int{}} + return t +} + +// Render table output +func (t *Table) Render() { + if t.borders.Top { + t.printLine(true) + } + t.printHeading() + if t.autoMergeCells { + t.printRowsMergeCells() + } else { + t.printRows() + } + if !t.rowLine && t.borders.Bottom { + t.printLine(true) + } + t.printFooter() + + if t.caption { + t.printCaption() + } +} + +const ( + headerRowIdx = -1 + footerRowIdx = -2 +) + +// Set table header +func (t *Table) SetHeader(keys []string) { + t.colSize = len(keys) + for i, v := range keys { + lines := t.parseDimension(v, i, headerRowIdx) + t.headers = append(t.headers, lines) + } +} + +// Set table Footer +func (t *Table) SetFooter(keys []string) { + //t.colSize = len(keys) + for i, v := range keys { + lines := t.parseDimension(v, i, footerRowIdx) + t.footers = append(t.footers, lines) + } +} + +// Set table Caption +func (t *Table) SetCaption(caption bool, captionText ...string) { + t.caption = caption + if len(captionText) == 1 { + t.captionText = captionText[0] + } +} + +// Turn header autoformatting on/off. Default is on (true). +func (t *Table) SetAutoFormatHeaders(auto bool) { + t.autoFmt = auto +} + +// Turn automatic multiline text adjustment on/off. Default is on (true). +func (t *Table) SetAutoWrapText(auto bool) { + t.autoWrap = auto +} + +// Turn automatic reflowing of multiline text when rewrapping. Default is on (true). +func (t *Table) SetReflowDuringAutoWrap(auto bool) { + t.reflowText = auto +} + +// Set the Default column width +func (t *Table) SetColWidth(width int) { + t.mW = width +} + +// Set the minimal width for a column +func (t *Table) SetColMinWidth(column int, width int) { + t.cs[column] = width +} + +// Set the Column Separator +func (t *Table) SetColumnSeparator(sep string) { + t.pColumn = sep +} + +// Set the Row Separator +func (t *Table) SetRowSeparator(sep string) { + t.pRow = sep +} + +// Set the center Separator +func (t *Table) SetCenterSeparator(sep string) { + t.pCenter = sep +} + +// Set Header Alignment +func (t *Table) SetHeaderAlignment(hAlign int) { + t.hAlign = hAlign +} + +// Set Footer Alignment +func (t *Table) SetFooterAlignment(fAlign int) { + t.fAlign = fAlign +} + +// Set Table Alignment +func (t *Table) SetAlignment(align int) { + t.align = align +} + +// Set No White Space +func (t *Table) SetNoWhiteSpace(allow bool) { + t.noWhiteSpace = allow +} + +// Set Table Padding +func (t *Table) SetTablePadding(padding string) { + t.tablePadding = padding +} + +func (t *Table) SetColumnAlignment(keys []int) { + for _, v := range keys { + switch v { + case ALIGN_CENTER: + break + case ALIGN_LEFT: + break + case ALIGN_RIGHT: + break + default: + v = ALIGN_DEFAULT + } + t.columnsAlign = append(t.columnsAlign, v) + } +} + +// Set New Line +func (t *Table) SetNewLine(nl string) { + t.newLine = nl +} + +// Set Header Line +// This would enable / disable a line after the header +func (t *Table) SetHeaderLine(line bool) { + t.hdrLine = line +} + +// Set Row Line +// This would enable / disable a line on each row of the table +func (t *Table) SetRowLine(line bool) { + t.rowLine = line +} + +// Set Auto Merge Cells +// This would enable / disable the merge of cells with identical values +func (t *Table) SetAutoMergeCells(auto bool) { + t.autoMergeCells = auto +} + +// Set Auto Merge Cells By Column Index +// This would enable / disable the merge of cells with identical values for specific columns +// If cols is empty, it is the same as `SetAutoMergeCells(true)`. +func (t *Table) SetAutoMergeCellsByColumnIndex(cols []int) { + t.autoMergeCells = true + + if len(cols) > 0 { + m := make(map[int]bool) + for _, col := range cols { + m[col] = true + } + t.columnsToAutoMergeCells = m + } +} + +// Set Table Border +// This would enable / disable line around the table +func (t *Table) SetBorder(border bool) { + t.SetBorders(Border{border, border, border, border}) +} + +func (t *Table) SetBorders(border Border) { + t.borders = border +} + +// Append row to table +func (t *Table) Append(row []string) { + rowSize := len(t.headers) + if rowSize > t.colSize { + t.colSize = rowSize + } + + n := len(t.lines) + line := [][]string{} + for i, v := range row { + + // Detect string width + // Detect String height + // Break strings into words + out := t.parseDimension(v, i, n) + + // Append broken words + line = append(line, out) + } + t.lines = append(t.lines, line) +} + +// Append row to table with color attributes +func (t *Table) Rich(row []string, colors []Colors) { + rowSize := len(t.headers) + if rowSize > t.colSize { + t.colSize = rowSize + } + + n := len(t.lines) + line := [][]string{} + for i, v := range row { + + // Detect string width + // Detect String height + // Break strings into words + out := t.parseDimension(v, i, n) + + if len(colors) > i { + color := colors[i] + out[0] = format(out[0], color) + } + + // Append broken words + line = append(line, out) + } + t.lines = append(t.lines, line) +} + +// Allow Support for Bulk Append +// Eliminates repeated for loops +func (t *Table) AppendBulk(rows [][]string) { + for _, row := range rows { + t.Append(row) + } +} + +// NumLines to get the number of lines +func (t *Table) NumLines() int { + return len(t.lines) +} + +// Clear rows +func (t *Table) ClearRows() { + t.lines = [][][]string{} +} + +// Clear footer +func (t *Table) ClearFooter() { + t.footers = [][]string{} +} + +// Center based on position and border. +func (t *Table) center(i int) string { + if i == -1 && !t.borders.Left { + return t.pRow + } + + if i == len(t.cs)-1 && !t.borders.Right { + return t.pRow + } + + return t.pCenter +} + +// Print line based on row width +func (t *Table) printLine(nl bool) { + fmt.Fprint(t.out, t.center(-1)) + for i := 0; i < len(t.cs); i++ { + v := t.cs[i] + fmt.Fprintf(t.out, "%s%s%s%s", + t.pRow, + strings.Repeat(string(t.pRow), v), + t.pRow, + t.center(i)) + } + if nl { + fmt.Fprint(t.out, t.newLine) + } +} + +// Print line based on row width with our without cell separator +func (t *Table) printLineOptionalCellSeparators(nl bool, displayCellSeparator []bool) { + fmt.Fprint(t.out, t.pCenter) + for i := 0; i < len(t.cs); i++ { + v := t.cs[i] + if i > len(displayCellSeparator) || displayCellSeparator[i] { + // Display the cell separator + fmt.Fprintf(t.out, "%s%s%s%s", + t.pRow, + strings.Repeat(string(t.pRow), v), + t.pRow, + t.pCenter) + } else { + // Don't display the cell separator for this cell + fmt.Fprintf(t.out, "%s%s", + strings.Repeat(" ", v+2), + t.pCenter) + } + } + if nl { + fmt.Fprint(t.out, t.newLine) + } +} + +// Return the PadRight function if align is left, PadLeft if align is right, +// and Pad by default +func pad(align int) func(string, string, int) string { + padFunc := Pad + switch align { + case ALIGN_LEFT: + padFunc = PadRight + case ALIGN_RIGHT: + padFunc = PadLeft + } + return padFunc +} + +// Print heading information +func (t *Table) printHeading() { + // Check if headers is available + if len(t.headers) < 1 { + return + } + + // Identify last column + end := len(t.cs) - 1 + + // Get pad function + padFunc := pad(t.hAlign) + + // Checking for ANSI escape sequences for header + is_esc_seq := false + if len(t.headerParams) > 0 { + is_esc_seq = true + } + + // Maximum height. + max := t.rs[headerRowIdx] + + // Print Heading + for x := 0; x < max; x++ { + // Check if border is set + // Replace with space if not set + if !t.noWhiteSpace { + fmt.Fprint(t.out, ConditionString(t.borders.Left, t.pColumn, SPACE)) + } + + for y := 0; y <= end; y++ { + v := t.cs[y] + h := "" + + if y < len(t.headers) && x < len(t.headers[y]) { + h = t.headers[y][x] + } + if t.autoFmt { + h = Title(h) + } + pad := ConditionString((y == end && !t.borders.Left), SPACE, t.pColumn) + if t.noWhiteSpace { + pad = ConditionString((y == end && !t.borders.Left), SPACE, t.tablePadding) + } + if is_esc_seq { + if !t.noWhiteSpace { + fmt.Fprintf(t.out, " %s %s", + format(padFunc(h, SPACE, v), + t.headerParams[y]), pad) + } else { + fmt.Fprintf(t.out, "%s %s", + format(padFunc(h, SPACE, v), + t.headerParams[y]), pad) + } + } else { + if !t.noWhiteSpace { + fmt.Fprintf(t.out, " %s %s", + padFunc(h, SPACE, v), + pad) + } else { + // the spaces between breaks the kube formatting + fmt.Fprintf(t.out, "%s%s", + padFunc(h, SPACE, v), + pad) + } + } + } + // Next line + fmt.Fprint(t.out, t.newLine) + } + if t.hdrLine { + t.printLine(true) + } +} + +// Print heading information +func (t *Table) printFooter() { + // Check if headers is available + if len(t.footers) < 1 { + return + } + + // Only print line if border is not set + if !t.borders.Bottom { + t.printLine(true) + } + + // Identify last column + end := len(t.cs) - 1 + + // Get pad function + padFunc := pad(t.fAlign) + + // Checking for ANSI escape sequences for header + is_esc_seq := false + if len(t.footerParams) > 0 { + is_esc_seq = true + } + + // Maximum height. + max := t.rs[footerRowIdx] + + // Print Footer + erasePad := make([]bool, len(t.footers)) + for x := 0; x < max; x++ { + // Check if border is set + // Replace with space if not set + fmt.Fprint(t.out, ConditionString(t.borders.Bottom, t.pColumn, SPACE)) + + for y := 0; y <= end; y++ { + v := t.cs[y] + f := "" + if y < len(t.footers) && x < len(t.footers[y]) { + f = t.footers[y][x] + } + if t.autoFmt { + f = Title(f) + } + pad := ConditionString((y == end && !t.borders.Top), SPACE, t.pColumn) + + if erasePad[y] || (x == 0 && len(f) == 0) { + pad = SPACE + erasePad[y] = true + } + + if is_esc_seq { + fmt.Fprintf(t.out, " %s %s", + format(padFunc(f, SPACE, v), + t.footerParams[y]), pad) + } else { + fmt.Fprintf(t.out, " %s %s", + padFunc(f, SPACE, v), + pad) + } + + //fmt.Fprintf(t.out, " %s %s", + // padFunc(f, SPACE, v), + // pad) + } + // Next line + fmt.Fprint(t.out, t.newLine) + //t.printLine(true) + } + + hasPrinted := false + + for i := 0; i <= end; i++ { + v := t.cs[i] + pad := t.pRow + center := t.pCenter + length := len(t.footers[i][0]) + + if length > 0 { + hasPrinted = true + } + + // Set center to be space if length is 0 + if length == 0 && !t.borders.Right { + center = SPACE + } + + // Print first junction + if i == 0 { + if length > 0 && !t.borders.Left { + center = t.pRow + } + fmt.Fprint(t.out, center) + } + + // Pad With space of length is 0 + if length == 0 { + pad = SPACE + } + // Ignore left space as it has printed before + if hasPrinted || t.borders.Left { + pad = t.pRow + center = t.pCenter + } + + // Change Center end position + if center != SPACE { + if i == end && !t.borders.Right { + center = t.pRow + } + } + + // Change Center start position + if center == SPACE { + if i < end && len(t.footers[i+1][0]) != 0 { + if !t.borders.Left { + center = t.pRow + } else { + center = t.pCenter + } + } + } + + // Print the footer + fmt.Fprintf(t.out, "%s%s%s%s", + pad, + strings.Repeat(string(pad), v), + pad, + center) + + } + + fmt.Fprint(t.out, t.newLine) +} + +// Print caption text +func (t Table) printCaption() { + width := t.getTableWidth() + paragraph, _ := WrapString(t.captionText, width) + for linecount := 0; linecount < len(paragraph); linecount++ { + fmt.Fprintln(t.out, paragraph[linecount]) + } +} + +// Calculate the total number of characters in a row +func (t Table) getTableWidth() int { + var chars int + for _, v := range t.cs { + chars += v + } + + // Add chars, spaces, seperators to calculate the total width of the table. + // ncols := t.colSize + // spaces := ncols * 2 + // seps := ncols + 1 + + return (chars + (3 * t.colSize) + 2) +} + +func (t Table) printRows() { + for i, lines := range t.lines { + t.printRow(lines, i) + } +} + +func (t *Table) fillAlignment(num int) { + if len(t.columnsAlign) < num { + t.columnsAlign = make([]int, num) + for i := range t.columnsAlign { + t.columnsAlign[i] = t.align + } + } +} + +// Print Row Information +// Adjust column alignment based on type + +func (t *Table) printRow(columns [][]string, rowIdx int) { + // Get Maximum Height + max := t.rs[rowIdx] + total := len(columns) + + // TODO Fix uneven col size + // if total < t.colSize { + // for n := t.colSize - total; n < t.colSize ; n++ { + // columns = append(columns, []string{SPACE}) + // t.cs[n] = t.mW + // } + //} + + // Pad Each Height + pads := []int{} + + // Checking for ANSI escape sequences for columns + is_esc_seq := false + if len(t.columnsParams) > 0 { + is_esc_seq = true + } + t.fillAlignment(total) + + for i, line := range columns { + length := len(line) + pad := max - length + pads = append(pads, pad) + for n := 0; n < pad; n++ { + columns[i] = append(columns[i], " ") + } + } + //fmt.Println(max, "\n") + for x := 0; x < max; x++ { + for y := 0; y < total; y++ { + + // Check if border is set + if !t.noWhiteSpace { + fmt.Fprint(t.out, ConditionString((!t.borders.Left && y == 0), SPACE, t.pColumn)) + fmt.Fprintf(t.out, SPACE) + } + + str := columns[y][x] + + // Embedding escape sequence with column value + if is_esc_seq { + str = format(str, t.columnsParams[y]) + } + + // This would print alignment + // Default alignment would use multiple configuration + switch t.columnsAlign[y] { + case ALIGN_CENTER: // + fmt.Fprintf(t.out, "%s", Pad(str, SPACE, t.cs[y])) + case ALIGN_RIGHT: + fmt.Fprintf(t.out, "%s", PadLeft(str, SPACE, t.cs[y])) + case ALIGN_LEFT: + fmt.Fprintf(t.out, "%s", PadRight(str, SPACE, t.cs[y])) + default: + if decimal.MatchString(strings.TrimSpace(str)) || percent.MatchString(strings.TrimSpace(str)) { + fmt.Fprintf(t.out, "%s", PadLeft(str, SPACE, t.cs[y])) + } else { + fmt.Fprintf(t.out, "%s", PadRight(str, SPACE, t.cs[y])) + + // TODO Custom alignment per column + //if max == 1 || pads[y] > 0 { + // fmt.Fprintf(t.out, "%s", Pad(str, SPACE, t.cs[y])) + //} else { + // fmt.Fprintf(t.out, "%s", PadRight(str, SPACE, t.cs[y])) + //} + + } + } + if !t.noWhiteSpace { + fmt.Fprintf(t.out, SPACE) + } else { + fmt.Fprintf(t.out, t.tablePadding) + } + } + // Check if border is set + // Replace with space if not set + if !t.noWhiteSpace { + fmt.Fprint(t.out, ConditionString(t.borders.Left, t.pColumn, SPACE)) + } + fmt.Fprint(t.out, t.newLine) + } + + if t.rowLine { + t.printLine(true) + } +} + +// Print the rows of the table and merge the cells that are identical +func (t *Table) printRowsMergeCells() { + var previousLine []string + var displayCellBorder []bool + var tmpWriter bytes.Buffer + for i, lines := range t.lines { + // We store the display of the current line in a tmp writer, as we need to know which border needs to be print above + previousLine, displayCellBorder = t.printRowMergeCells(&tmpWriter, lines, i, previousLine) + if i > 0 { //We don't need to print borders above first line + if t.rowLine { + t.printLineOptionalCellSeparators(true, displayCellBorder) + } + } + tmpWriter.WriteTo(t.out) + } + //Print the end of the table + if t.rowLine { + t.printLine(true) + } +} + +// Print Row Information to a writer and merge identical cells. +// Adjust column alignment based on type + +func (t *Table) printRowMergeCells(writer io.Writer, columns [][]string, rowIdx int, previousLine []string) ([]string, []bool) { + // Get Maximum Height + max := t.rs[rowIdx] + total := len(columns) + + // Pad Each Height + pads := []int{} + + // Checking for ANSI escape sequences for columns + is_esc_seq := false + if len(t.columnsParams) > 0 { + is_esc_seq = true + } + for i, line := range columns { + length := len(line) + pad := max - length + pads = append(pads, pad) + for n := 0; n < pad; n++ { + columns[i] = append(columns[i], " ") + } + } + + var displayCellBorder []bool + t.fillAlignment(total) + for x := 0; x < max; x++ { + for y := 0; y < total; y++ { + + // Check if border is set + fmt.Fprint(writer, ConditionString((!t.borders.Left && y == 0), SPACE, t.pColumn)) + + fmt.Fprintf(writer, SPACE) + + str := columns[y][x] + + // Embedding escape sequence with column value + if is_esc_seq { + str = format(str, t.columnsParams[y]) + } + + if t.autoMergeCells { + var mergeCell bool + if t.columnsToAutoMergeCells != nil { + // Check to see if the column index is in columnsToAutoMergeCells. + if t.columnsToAutoMergeCells[y] { + mergeCell = true + } + } else { + // columnsToAutoMergeCells was not set. + mergeCell = true + } + //Store the full line to merge mutli-lines cells + fullLine := strings.TrimRight(strings.Join(columns[y], " "), " ") + if len(previousLine) > y && fullLine == previousLine[y] && fullLine != "" && mergeCell { + // If this cell is identical to the one above but not empty, we don't display the border and keep the cell empty. + displayCellBorder = append(displayCellBorder, false) + str = "" + } else { + // First line or different content, keep the content and print the cell border + displayCellBorder = append(displayCellBorder, true) + } + } + + // This would print alignment + // Default alignment would use multiple configuration + switch t.columnsAlign[y] { + case ALIGN_CENTER: // + fmt.Fprintf(writer, "%s", Pad(str, SPACE, t.cs[y])) + case ALIGN_RIGHT: + fmt.Fprintf(writer, "%s", PadLeft(str, SPACE, t.cs[y])) + case ALIGN_LEFT: + fmt.Fprintf(writer, "%s", PadRight(str, SPACE, t.cs[y])) + default: + if decimal.MatchString(strings.TrimSpace(str)) || percent.MatchString(strings.TrimSpace(str)) { + fmt.Fprintf(writer, "%s", PadLeft(str, SPACE, t.cs[y])) + } else { + fmt.Fprintf(writer, "%s", PadRight(str, SPACE, t.cs[y])) + } + } + fmt.Fprintf(writer, SPACE) + } + // Check if border is set + // Replace with space if not set + fmt.Fprint(writer, ConditionString(t.borders.Left, t.pColumn, SPACE)) + fmt.Fprint(writer, t.newLine) + } + + //The new previous line is the current one + previousLine = make([]string, total) + for y := 0; y < total; y++ { + previousLine[y] = strings.TrimRight(strings.Join(columns[y], " "), " ") //Store the full line for multi-lines cells + } + //Returns the newly added line and wether or not a border should be displayed above. + return previousLine, displayCellBorder +} + +func (t *Table) parseDimension(str string, colKey, rowKey int) []string { + var ( + raw []string + maxWidth int + ) + + raw = getLines(str) + maxWidth = 0 + for _, line := range raw { + if w := DisplayWidth(line); w > maxWidth { + maxWidth = w + } + } + + // If wrapping, ensure that all paragraphs in the cell fit in the + // specified width. + if t.autoWrap { + // If there's a maximum allowed width for wrapping, use that. + if maxWidth > t.mW { + maxWidth = t.mW + } + + // In the process of doing so, we need to recompute maxWidth. This + // is because perhaps a word in the cell is longer than the + // allowed maximum width in t.mW. + newMaxWidth := maxWidth + newRaw := make([]string, 0, len(raw)) + + if t.reflowText { + // Make a single paragraph of everything. + raw = []string{strings.Join(raw, " ")} + } + for i, para := range raw { + paraLines, _ := WrapString(para, maxWidth) + for _, line := range paraLines { + if w := DisplayWidth(line); w > newMaxWidth { + newMaxWidth = w + } + } + if i > 0 { + newRaw = append(newRaw, " ") + } + newRaw = append(newRaw, paraLines...) + } + raw = newRaw + maxWidth = newMaxWidth + } + + // Store the new known maximum width. + v, ok := t.cs[colKey] + if !ok || v < maxWidth || v == 0 { + t.cs[colKey] = maxWidth + } + + // Remember the number of lines for the row printer. + h := len(raw) + v, ok = t.rs[rowKey] + + if !ok || v < h || v == 0 { + t.rs[rowKey] = h + } + //fmt.Printf("Raw %+v %d\n", raw, len(raw)) + return raw +} diff --git a/vendor/github.com/olekukonko/tablewriter/table_with_color.go b/vendor/github.com/olekukonko/tablewriter/table_with_color.go new file mode 100644 index 000000000..ae7a364ae --- /dev/null +++ b/vendor/github.com/olekukonko/tablewriter/table_with_color.go @@ -0,0 +1,136 @@ +package tablewriter + +import ( + "fmt" + "strconv" + "strings" +) + +const ESC = "\033" +const SEP = ";" + +const ( + BgBlackColor int = iota + 40 + BgRedColor + BgGreenColor + BgYellowColor + BgBlueColor + BgMagentaColor + BgCyanColor + BgWhiteColor +) + +const ( + FgBlackColor int = iota + 30 + FgRedColor + FgGreenColor + FgYellowColor + FgBlueColor + FgMagentaColor + FgCyanColor + FgWhiteColor +) + +const ( + BgHiBlackColor int = iota + 100 + BgHiRedColor + BgHiGreenColor + BgHiYellowColor + BgHiBlueColor + BgHiMagentaColor + BgHiCyanColor + BgHiWhiteColor +) + +const ( + FgHiBlackColor int = iota + 90 + FgHiRedColor + FgHiGreenColor + FgHiYellowColor + FgHiBlueColor + FgHiMagentaColor + FgHiCyanColor + FgHiWhiteColor +) + +const ( + Normal = 0 + Bold = 1 + UnderlineSingle = 4 + Italic +) + +type Colors []int + +func startFormat(seq string) string { + return fmt.Sprintf("%s[%sm", ESC, seq) +} + +func stopFormat() string { + return fmt.Sprintf("%s[%dm", ESC, Normal) +} + +// Making the SGR (Select Graphic Rendition) sequence. +func makeSequence(codes []int) string { + codesInString := []string{} + for _, code := range codes { + codesInString = append(codesInString, strconv.Itoa(code)) + } + return strings.Join(codesInString, SEP) +} + +// Adding ANSI escape sequences before and after string +func format(s string, codes interface{}) string { + var seq string + + switch v := codes.(type) { + + case string: + seq = v + case []int: + seq = makeSequence(v) + case Colors: + seq = makeSequence(v) + default: + return s + } + + if len(seq) == 0 { + return s + } + return startFormat(seq) + s + stopFormat() +} + +// Adding header colors (ANSI codes) +func (t *Table) SetHeaderColor(colors ...Colors) { + if t.colSize != len(colors) { + panic("Number of header colors must be equal to number of headers.") + } + for i := 0; i < len(colors); i++ { + t.headerParams = append(t.headerParams, makeSequence(colors[i])) + } +} + +// Adding column colors (ANSI codes) +func (t *Table) SetColumnColor(colors ...Colors) { + if t.colSize != len(colors) { + panic("Number of column colors must be equal to number of headers.") + } + for i := 0; i < len(colors); i++ { + t.columnsParams = append(t.columnsParams, makeSequence(colors[i])) + } +} + +// Adding column colors (ANSI codes) +func (t *Table) SetFooterColor(colors ...Colors) { + if len(t.footers) != len(colors) { + panic("Number of footer colors must be equal to number of footer.") + } + for i := 0; i < len(colors); i++ { + t.footerParams = append(t.footerParams, makeSequence(colors[i])) + } +} + +func Color(colors ...int) []int { + return colors +} diff --git a/vendor/github.com/olekukonko/tablewriter/util.go b/vendor/github.com/olekukonko/tablewriter/util.go new file mode 100644 index 000000000..380e7ab35 --- /dev/null +++ b/vendor/github.com/olekukonko/tablewriter/util.go @@ -0,0 +1,93 @@ +// Copyright 2014 Oleku Konko All rights reserved. +// Use of this source code is governed by a MIT +// license that can be found in the LICENSE file. + +// This module is a Table Writer API for the Go Programming Language. +// The protocols were written in pure Go and works on windows and unix systems + +package tablewriter + +import ( + "math" + "regexp" + "strings" + + "github.com/mattn/go-runewidth" +) + +var ansi = regexp.MustCompile("\033\\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]") + +func DisplayWidth(str string) int { + return runewidth.StringWidth(ansi.ReplaceAllLiteralString(str, "")) +} + +// Simple Condition for string +// Returns value based on condition +func ConditionString(cond bool, valid, inValid string) string { + if cond { + return valid + } + return inValid +} + +func isNumOrSpace(r rune) bool { + return ('0' <= r && r <= '9') || r == ' ' +} + +// Format Table Header +// Replace _ , . and spaces +func Title(name string) string { + origLen := len(name) + rs := []rune(name) + for i, r := range rs { + switch r { + case '_': + rs[i] = ' ' + case '.': + // ignore floating number 0.0 + if (i != 0 && !isNumOrSpace(rs[i-1])) || (i != len(rs)-1 && !isNumOrSpace(rs[i+1])) { + rs[i] = ' ' + } + } + } + name = string(rs) + name = strings.TrimSpace(name) + if len(name) == 0 && origLen > 0 { + // Keep at least one character. This is important to preserve + // empty lines in multi-line headers/footers. + name = " " + } + return strings.ToUpper(name) +} + +// Pad String +// Attempts to place string in the center +func Pad(s, pad string, width int) string { + gap := width - DisplayWidth(s) + if gap > 0 { + gapLeft := int(math.Ceil(float64(gap / 2))) + gapRight := gap - gapLeft + return strings.Repeat(string(pad), gapLeft) + s + strings.Repeat(string(pad), gapRight) + } + return s +} + +// Pad String Right position +// This would place string at the left side of the screen +func PadRight(s, pad string, width int) string { + gap := width - DisplayWidth(s) + if gap > 0 { + return s + strings.Repeat(string(pad), gap) + } + return s +} + +// Pad String Left position +// This would place string at the right side of the screen +func PadLeft(s, pad string, width int) string { + gap := width - DisplayWidth(s) + if gap > 0 { + return strings.Repeat(string(pad), gap) + s + } + return s +} diff --git a/vendor/github.com/olekukonko/tablewriter/wrap.go b/vendor/github.com/olekukonko/tablewriter/wrap.go new file mode 100644 index 000000000..a092ee1f7 --- /dev/null +++ b/vendor/github.com/olekukonko/tablewriter/wrap.go @@ -0,0 +1,99 @@ +// Copyright 2014 Oleku Konko All rights reserved. +// Use of this source code is governed by a MIT +// license that can be found in the LICENSE file. + +// This module is a Table Writer API for the Go Programming Language. +// The protocols were written in pure Go and works on windows and unix systems + +package tablewriter + +import ( + "math" + "strings" + + "github.com/mattn/go-runewidth" +) + +var ( + nl = "\n" + sp = " " +) + +const defaultPenalty = 1e5 + +// Wrap wraps s into a paragraph of lines of length lim, with minimal +// raggedness. +func WrapString(s string, lim int) ([]string, int) { + words := strings.Split(strings.Replace(s, nl, sp, -1), sp) + var lines []string + max := 0 + for _, v := range words { + max = runewidth.StringWidth(v) + if max > lim { + lim = max + } + } + for _, line := range WrapWords(words, 1, lim, defaultPenalty) { + lines = append(lines, strings.Join(line, sp)) + } + return lines, lim +} + +// WrapWords is the low-level line-breaking algorithm, useful if you need more +// control over the details of the text wrapping process. For most uses, +// WrapString will be sufficient and more convenient. +// +// WrapWords splits a list of words into lines with minimal "raggedness", +// treating each rune as one unit, accounting for spc units between adjacent +// words on each line, and attempting to limit lines to lim units. Raggedness +// is the total error over all lines, where error is the square of the +// difference of the length of the line and lim. Too-long lines (which only +// happen when a single word is longer than lim units) have pen penalty units +// added to the error. +func WrapWords(words []string, spc, lim, pen int) [][]string { + n := len(words) + + length := make([][]int, n) + for i := 0; i < n; i++ { + length[i] = make([]int, n) + length[i][i] = runewidth.StringWidth(words[i]) + for j := i + 1; j < n; j++ { + length[i][j] = length[i][j-1] + spc + runewidth.StringWidth(words[j]) + } + } + nbrk := make([]int, n) + cost := make([]int, n) + for i := range cost { + cost[i] = math.MaxInt32 + } + for i := n - 1; i >= 0; i-- { + if length[i][n-1] <= lim { + cost[i] = 0 + nbrk[i] = n + } else { + for j := i + 1; j < n; j++ { + d := lim - length[i][j-1] + c := d*d + cost[j] + if length[i][j-1] > lim { + c += pen // too-long lines get a worse penalty + } + if c < cost[i] { + cost[i] = c + nbrk[i] = j + } + } + } + } + var lines [][]string + i := 0 + for i < n { + lines = append(lines, words[i:nbrk[i]]) + i = nbrk[i] + } + return lines +} + +// getLines decomposes a multiline string into a slice of strings. +func getLines(s string) []string { + return strings.Split(s, nl) +} diff --git a/vendor/github.com/skratchdot/open-golang/LICENSE b/vendor/github.com/skratchdot/open-golang/LICENSE new file mode 100644 index 000000000..afd04c821 --- /dev/null +++ b/vendor/github.com/skratchdot/open-golang/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2013 skratchdot + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/skratchdot/open-golang/open/exec.go b/vendor/github.com/skratchdot/open-golang/open/exec.go new file mode 100644 index 000000000..1b0e71368 --- /dev/null +++ b/vendor/github.com/skratchdot/open-golang/open/exec.go @@ -0,0 +1,18 @@ +// +build !windows,!darwin + +package open + +import ( + "os/exec" +) + +// http://sources.debian.net/src/xdg-utils/1.1.0~rc1%2Bgit20111210-7.1/scripts/xdg-open/ +// http://sources.debian.net/src/xdg-utils/1.1.0~rc1%2Bgit20111210-7.1/scripts/xdg-mime/ + +func open(input string) *exec.Cmd { + return exec.Command("xdg-open", input) +} + +func openWith(input string, appName string) *exec.Cmd { + return exec.Command(appName, input) +} diff --git a/vendor/github.com/skratchdot/open-golang/open/exec_darwin.go b/vendor/github.com/skratchdot/open-golang/open/exec_darwin.go new file mode 100644 index 000000000..16160e6f0 --- /dev/null +++ b/vendor/github.com/skratchdot/open-golang/open/exec_darwin.go @@ -0,0 +1,15 @@ +// +build darwin + +package open + +import ( + "os/exec" +) + +func open(input string) *exec.Cmd { + return exec.Command("open", input) +} + +func openWith(input string, appName string) *exec.Cmd { + return exec.Command("open", "-a", appName, input) +} diff --git a/vendor/github.com/skratchdot/open-golang/open/exec_windows.go b/vendor/github.com/skratchdot/open-golang/open/exec_windows.go new file mode 100644 index 000000000..6e46c0054 --- /dev/null +++ b/vendor/github.com/skratchdot/open-golang/open/exec_windows.go @@ -0,0 +1,33 @@ +// +build windows + +package open + +import ( + "os" + "os/exec" + "path/filepath" + "strings" + // "syscall" +) + +var ( + cmd = "url.dll,FileProtocolHandler" + runDll32 = filepath.Join(os.Getenv("SYSTEMROOT"), "System32", "rundll32.exe") +) + +func cleaninput(input string) string { + r := strings.NewReplacer("&", "^&") + return r.Replace(input) +} + +func open(input string) *exec.Cmd { + cmd := exec.Command(runDll32, cmd, input) + //cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} + return cmd +} + +func openWith(input string, appName string) *exec.Cmd { + cmd := exec.Command("cmd", "/C", "start", "", appName, cleaninput(input)) + //cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} + return cmd +} diff --git a/vendor/github.com/skratchdot/open-golang/open/open.go b/vendor/github.com/skratchdot/open-golang/open/open.go new file mode 100644 index 000000000..b1f648ff5 --- /dev/null +++ b/vendor/github.com/skratchdot/open-golang/open/open.go @@ -0,0 +1,50 @@ +/* + + Open a file, directory, or URI using the OS's default + application for that object type. Optionally, you can + specify an application to use. + + This is a proxy for the following commands: + + OSX: "open" + Windows: "start" + Linux/Other: "xdg-open" + + This is a golang port of the node.js module: https://github.com/pwnall/node-open + +*/ +package open + +/* + Open a file, directory, or URI using the OS's default + application for that object type. Wait for the open + command to complete. +*/ +func Run(input string) error { + return open(input).Run() +} + +/* + Open a file, directory, or URI using the OS's default + application for that object type. Don't wait for the + open command to complete. +*/ +func Start(input string) error { + return open(input).Start() +} + +/* + Open a file, directory, or URI using the specified application. + Wait for the open command to complete. +*/ +func RunWith(input string, appName string) error { + return openWith(input, appName).Run() +} + +/* + Open a file, directory, or URI using the specified application. + Don't wait for the open command to complete. +*/ +func StartWith(input string, appName string) error { + return openWith(input, appName).Start() +} diff --git a/vendor/golang.org/x/sys/execabs/execabs.go b/vendor/golang.org/x/sys/execabs/execabs.go new file mode 100644 index 000000000..3bf40fdfe --- /dev/null +++ b/vendor/golang.org/x/sys/execabs/execabs.go @@ -0,0 +1,102 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package execabs is a drop-in replacement for os/exec +// that requires PATH lookups to find absolute paths. +// That is, execabs.Command("cmd") runs the same PATH lookup +// as exec.Command("cmd"), but if the result is a path +// which is relative, the Run and Start methods will report +// an error instead of running the executable. +// +// See https://blog.golang.org/path-security for more information +// about when it may be necessary or appropriate to use this package. +package execabs + +import ( + "context" + "fmt" + "os/exec" + "path/filepath" + "reflect" + "unsafe" +) + +// ErrNotFound is the error resulting if a path search failed to find an executable file. +// It is an alias for exec.ErrNotFound. +var ErrNotFound = exec.ErrNotFound + +// Cmd represents an external command being prepared or run. +// It is an alias for exec.Cmd. +type Cmd = exec.Cmd + +// Error is returned by LookPath when it fails to classify a file as an executable. +// It is an alias for exec.Error. +type Error = exec.Error + +// An ExitError reports an unsuccessful exit by a command. +// It is an alias for exec.ExitError. +type ExitError = exec.ExitError + +func relError(file, path string) error { + return fmt.Errorf("%s resolves to executable in current directory (.%c%s)", file, filepath.Separator, path) +} + +// LookPath searches for an executable named file in the directories +// named by the PATH environment variable. If file contains a slash, +// it is tried directly and the PATH is not consulted. The result will be +// an absolute path. +// +// LookPath differs from exec.LookPath in its handling of PATH lookups, +// which are used for file names without slashes. If exec.LookPath's +// PATH lookup would have returned an executable from the current directory, +// LookPath instead returns an error. +func LookPath(file string) (string, error) { + path, err := exec.LookPath(file) + if err != nil && !isGo119ErrDot(err) { + return "", err + } + if filepath.Base(file) == file && !filepath.IsAbs(path) { + return "", relError(file, path) + } + return path, nil +} + +func fixCmd(name string, cmd *exec.Cmd) { + if filepath.Base(name) == name && !filepath.IsAbs(cmd.Path) && !isGo119ErrFieldSet(cmd) { + // exec.Command was called with a bare binary name and + // exec.LookPath returned a path which is not absolute. + // Set cmd.lookPathErr and clear cmd.Path so that it + // cannot be run. + lookPathErr := (*error)(unsafe.Pointer(reflect.ValueOf(cmd).Elem().FieldByName("lookPathErr").Addr().Pointer())) + if *lookPathErr == nil { + *lookPathErr = relError(name, cmd.Path) + } + cmd.Path = "" + } +} + +// CommandContext is like Command but includes a context. +// +// The provided context is used to kill the process (by calling os.Process.Kill) +// if the context becomes done before the command completes on its own. +func CommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd { + cmd := exec.CommandContext(ctx, name, arg...) + fixCmd(name, cmd) + return cmd + +} + +// Command returns the Cmd struct to execute the named program with the given arguments. +// See exec.Command for most details. +// +// Command differs from exec.Command in its handling of PATH lookups, +// which are used when the program name contains no slashes. +// If exec.Command would have returned an exec.Cmd configured to run an +// executable from the current directory, Command instead +// returns an exec.Cmd that will return an error from Start or Run. +func Command(name string, arg ...string) *exec.Cmd { + cmd := exec.Command(name, arg...) + fixCmd(name, cmd) + return cmd +} diff --git a/vendor/golang.org/x/sys/execabs/execabs_go118.go b/vendor/golang.org/x/sys/execabs/execabs_go118.go new file mode 100644 index 000000000..2000064a8 --- /dev/null +++ b/vendor/golang.org/x/sys/execabs/execabs_go118.go @@ -0,0 +1,18 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !go1.19 +// +build !go1.19 + +package execabs + +import "os/exec" + +func isGo119ErrDot(err error) bool { + return false +} + +func isGo119ErrFieldSet(cmd *exec.Cmd) bool { + return false +} diff --git a/vendor/golang.org/x/sys/execabs/execabs_go119.go b/vendor/golang.org/x/sys/execabs/execabs_go119.go new file mode 100644 index 000000000..f364b3418 --- /dev/null +++ b/vendor/golang.org/x/sys/execabs/execabs_go119.go @@ -0,0 +1,21 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.19 +// +build go1.19 + +package execabs + +import ( + "errors" + "os/exec" +) + +func isGo119ErrDot(err error) bool { + return errors.Is(err, exec.ErrDot) +} + +func isGo119ErrFieldSet(cmd *exec.Cmd) bool { + return cmd.Err != nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 0793d5a96..de696027c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -90,6 +90,19 @@ github.com/davecgh/go-spew/spew # github.com/denisbrodbeck/machineid v1.0.1 ## explicit github.com/denisbrodbeck/machineid +# github.com/docker/cli v23.0.0-rc.1+incompatible +## explicit +github.com/docker/cli/cli/config +github.com/docker/cli/cli/config/configfile +github.com/docker/cli/cli/config/credentials +github.com/docker/cli/cli/config/types +# github.com/docker/docker v23.0.0-rc.1+incompatible +## explicit +github.com/docker/docker/pkg/homedir +# github.com/docker/docker-credential-helpers v0.7.0 +## explicit; go 1.18 +github.com/docker/docker-credential-helpers/client +github.com/docker/docker-credential-helpers/credentials # github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960 ## explicit; go 1.13 github.com/dprotaso/go-yit @@ -291,18 +304,95 @@ github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1 # github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de ## explicit github.com/liggitt/tabwriter -# github.com/loft-sh/api/v3 v3.2.4 +# github.com/loft-sh/agentapi/v3 v3.3.0-ci.1.0.20230921083523-e1d74f6f8fd1 +## explicit; go 1.21.1 +github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster +github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1 +github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1 +github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset +github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/scheme +github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/cluster/v1 +github.com/loft-sh/agentapi/v3/pkg/client/loft/clientset_generated/clientset/typed/storage/v1 +# github.com/loft-sh/api/v3 v3.3.0-alpha.21 ## explicit; go 1.21.0 +github.com/loft-sh/api/v3/pkg/apis/audit/v1 +github.com/loft-sh/api/v3/pkg/apis/management +github.com/loft-sh/api/v3/pkg/apis/management/install +github.com/loft-sh/api/v3/pkg/apis/management/v1 +github.com/loft-sh/api/v3/pkg/apis/storage/v1 +github.com/loft-sh/api/v3/pkg/apis/ui/v1 +github.com/loft-sh/api/v3/pkg/apis/virtualcluster +github.com/loft-sh/api/v3/pkg/apis/virtualcluster/v1 github.com/loft-sh/api/v3/pkg/auth -# github.com/loft-sh/loftctl/v3 v3.2.4 -## explicit; go 1.21.0 +github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset +github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/scheme +github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/management/v1 +github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/storage/v1 +github.com/loft-sh/api/v3/pkg/client/clientset_generated/clientset/typed/virtualcluster/v1 +github.com/loft-sh/api/v3/pkg/managerfactory +github.com/loft-sh/api/v3/pkg/product +# github.com/loft-sh/apiserver v0.0.0-20230628051307-f26967fbb40f +## explicit; go 1.19 +github.com/loft-sh/apiserver/pkg/builders +# github.com/loft-sh/external-types v0.0.2-0.20230301201552-ec939da949b4 +## explicit; go 1.17 +github.com/loft-sh/external-types/loft-sh/admin-services/pkg/server +# github.com/loft-sh/jspolicy v0.1.0 +## explicit; go 1.16 +github.com/loft-sh/jspolicy/pkg/apis/policy/v1beta1 +# github.com/loft-sh/loftctl/v3 v3.0.0-20230921095454-4a09cdaacca3 +## explicit; go 1.21.1 +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/connect +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/create +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/defaults +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/delete +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/devpod/list +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/generate +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/get +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/importcmd +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/list +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/reset +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/set +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/share +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/sleep +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/use +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vars +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/secret +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/vcluster-pro/space +github.com/loft-sh/loftctl/v3/cmd/loftctl/cmd/wakeup +github.com/loft-sh/loftctl/v3/cmd/loftctl/flags +github.com/loft-sh/loftctl/v3/pkg/client +github.com/loft-sh/loftctl/v3/pkg/client/helper +github.com/loft-sh/loftctl/v3/pkg/client/naming +github.com/loft-sh/loftctl/v3/pkg/clihelper +github.com/loft-sh/loftctl/v3/pkg/config +github.com/loft-sh/loftctl/v3/pkg/constants +github.com/loft-sh/loftctl/v3/pkg/defaults +github.com/loft-sh/loftctl/v3/pkg/docker +github.com/loft-sh/loftctl/v3/pkg/kube +github.com/loft-sh/loftctl/v3/pkg/kubeconfig +github.com/loft-sh/loftctl/v3/pkg/parameters +github.com/loft-sh/loftctl/v3/pkg/portforward +github.com/loft-sh/loftctl/v3/pkg/printhelper +github.com/loft-sh/loftctl/v3/pkg/random +github.com/loft-sh/loftctl/v3/pkg/remotecommand +github.com/loft-sh/loftctl/v3/pkg/space +github.com/loft-sh/loftctl/v3/pkg/start +github.com/loft-sh/loftctl/v3/pkg/task +github.com/loft-sh/loftctl/v3/pkg/upgrade github.com/loft-sh/loftctl/v3/pkg/util +github.com/loft-sh/loftctl/v3/pkg/vcluster +github.com/loft-sh/loftctl/v3/pkg/version # github.com/loft-sh/log v0.0.0-20230824104949-bd516c25712a ## explicit; go 1.20 github.com/loft-sh/log github.com/loft-sh/log/hash github.com/loft-sh/log/scanner github.com/loft-sh/log/survey +github.com/loft-sh/log/table github.com/loft-sh/log/terminal # github.com/loft-sh/utils v0.0.25 ## explicit; go 1.20 @@ -323,6 +413,9 @@ github.com/mattn/go-colorable # github.com/mattn/go-isatty v0.0.12 ## explicit; go 1.12 github.com/mattn/go-isatty +# github.com/mattn/go-runewidth v0.0.9 +## explicit; go 1.9 +github.com/mattn/go-runewidth # github.com/matttproud/golang_protobuf_extensions v1.0.4 ## explicit; go 1.9 github.com/matttproud/golang_protobuf_extensions/pbutil @@ -364,6 +457,9 @@ github.com/mxk/go-flowrate/flowrate # github.com/oklog/ulid v1.3.1 ## explicit github.com/oklog/ulid +# github.com/olekukonko/tablewriter v0.0.5 +## explicit; go 1.12 +github.com/olekukonko/tablewriter # github.com/onsi/ginkgo v1.16.5 ## explicit; go 1.16 # github.com/onsi/ginkgo/v2 v2.11.0 @@ -442,6 +538,9 @@ github.com/samber/lo # github.com/sirupsen/logrus v1.9.3 ## explicit; go 1.13 github.com/sirupsen/logrus +# github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 +## explicit +github.com/skratchdot/open-golang/open # github.com/spf13/cobra v1.7.0 ## explicit; go 1.15 github.com/spf13/cobra @@ -633,6 +732,7 @@ golang.org/x/sync/singleflight # golang.org/x/sys v0.11.0 ## explicit; go 1.17 golang.org/x/sys/cpu +golang.org/x/sys/execabs golang.org/x/sys/internal/unsafeheader golang.org/x/sys/plan9 golang.org/x/sys/unix