diff --git a/cmd/hostpaths/hostpaths.go b/cmd/hostpaths/hostpaths.go index 6106c957..4c318fa0 100644 --- a/cmd/hostpaths/hostpaths.go +++ b/cmd/hostpaths/hostpaths.go @@ -9,7 +9,6 @@ import ( "strings" "time" - "github.com/loft-sh/vcluster/pkg/controllers/resources/namespaces" podtranslate "github.com/loft-sh/vcluster/pkg/controllers/resources/pods/translate" "github.com/loft-sh/vcluster/pkg/util/clienthelper" @@ -24,7 +23,6 @@ import ( kerrors "k8s.io/apimachinery/pkg/api/errors" 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/wait" "k8s.io/client-go/kubernetes" @@ -59,8 +57,7 @@ const ( // naming format __-:// prefix removed)>.log ContainerSymlinkSourceTemplate = "%s_%s_%s-%s.log" - MultiNamespaceMode = "multi-namespace-mode" - SyncerContainer = "syncer" + SyncerContainer = "syncer" optionsKey key = iota @@ -191,7 +188,15 @@ func Start(ctx context.Context, options *VirtualClusterOptions, init bool) error return fmt.Errorf("find vcluster mode: %w", err) } - localManager, err := ctrl.NewManager(inClusterConfig, localManagerCtrlOptions(options)) + localManager, err := ctrl.NewManager(inClusterConfig, ctrl.Options{ + Scheme: scheme, + Metrics: metricsserver.Options{BindAddress: "0"}, + LeaderElection: false, + NewClient: pluginhookclient.NewPhysicalPluginClientFactory(blockingcacheclient.NewCacheClient), + Cache: cache.Options{ + DefaultNamespaces: map[string]cache.Config{options.TargetNamespace: {}}, + }, + }) if err != nil { return err } @@ -228,29 +233,6 @@ func Start(ctx context.Context, options *VirtualClusterOptions, init bool) error return mapHostPaths(ctx, localManager, virtualClusterManager) } -func getSyncerPodSpec(ctx context.Context, kubeClient kubernetes.Interface, vclusterName, vclusterNamespace string) (*corev1.PodSpec, error) { - // try looking for the stateful set first - - vclusterSts, err := kubeClient.AppsV1().StatefulSets(vclusterNamespace).Get(ctx, vclusterName, metav1.GetOptions{}) - if kerrors.IsNotFound(err) { - // try looking for deployment - in case of eks/k8s - vclusterDeploy, err := kubeClient.AppsV1().Deployments(vclusterNamespace).Get(ctx, vclusterName, metav1.GetOptions{}) - if kerrors.IsNotFound(err) { - klog.Errorf("could not find vcluster either in statefulset or deployment: %v", err) - return nil, err - } else if err != nil { - klog.Errorf("error looking for vcluster deployment: %v", err) - return nil, err - } - - return &vclusterDeploy.Spec.Template.Spec, nil - } else if err != nil { - return nil, err - } - - return &vclusterSts.Spec.Template.Spec, nil -} - func getVclusterConfigFromSecret(ctx context.Context, kubeClient kubernetes.Interface, vclusterName, vclusterNamespace string) (*config.Config, error) { configSecret, err := kubeClient.CoreV1().Secrets(vclusterNamespace).Get(ctx, fmt.Sprintf(configSecretNameTemplate, vclusterName), metav1.GetOptions{}) if err != nil { @@ -273,50 +255,12 @@ func getVclusterConfigFromSecret(ctx context.Context, kubeClient kubernetes.Inte return rawConfig, nil } -func setMultiNamespaceMode(options *VirtualClusterOptions) { - options.MultiNamespaceMode = true - translate.Default = translate.NewMultiNamespaceTranslator(options.TargetNamespace) -} - -func localManagerCtrlOptions(options *VirtualClusterOptions) manager.Options { - controllerOptions := ctrl.Options{ - Scheme: scheme, - Metrics: metricsserver.Options{BindAddress: "0"}, - LeaderElection: false, - NewClient: pluginhookclient.NewPhysicalPluginClientFactory(blockingcacheclient.NewCacheClient), - } - - if !options.MultiNamespaceMode { - controllerOptions.Cache.DefaultNamespaces = map[string]cache.Config{options.TargetNamespace: {}} - } - - return controllerOptions -} - func findVclusterModeAndSetDefaultTranslation(ctx context.Context, kubeClient kubernetes.Interface, options *VirtualClusterOptions) error { vClusterConfig, err := getVclusterConfigFromSecret(ctx, kubeClient, options.Name, options.TargetNamespace) if err != nil && !kerrors.IsNotFound(err) { return err - } else if vClusterConfig != nil && vClusterConfig.Experimental.MultiNamespaceMode.Enabled { - setMultiNamespaceMode(options) - return nil - } - - vclusterPodSpec, err := getSyncerPodSpec(ctx, kubeClient, options.Name, options.TargetNamespace) - if err != nil { - return err - } - - for _, container := range vclusterPodSpec.Containers { - if container.Name == SyncerContainer { - // iterate over command args - for _, arg := range container.Args { - if strings.Contains(arg, MultiNamespaceMode) { - setMultiNamespaceMode(options) - return nil - } - } - } + } else if vClusterConfig != nil && vClusterConfig.Sync.ToHost.Namespaces.Enabled { + return fmt.Errorf("unsupported vCluster config. Hostpathmapper is not compatible with toHost namespace syncing (sync.toHost.namespaces)") } translate.Default = translate.NewSingleNamespaceTranslator(options.TargetNamespace) @@ -475,10 +419,7 @@ func getPhysicalPodMap(ctx context.Context, options *VirtualClusterOptions, pMan FieldSelector: fields.SelectorFromSet(fields.Set{ NodeIndexName: os.Getenv(HostpathMapperSelfNodeNameEnvVar), }), - } - - if !options.MultiNamespaceMode { - podListOptions.Namespace = options.TargetNamespace + Namespace: options.TargetNamespace, } podList := &corev1.PodList{} @@ -487,32 +428,8 @@ func getPhysicalPodMap(ctx context.Context, options *VirtualClusterOptions, pMan return nil, fmt.Errorf("unable to list pods: %w", err) } - var pods []corev1.Pod - if options.MultiNamespaceMode { - // find namespaces managed by the current vcluster - nsList := &corev1.NamespaceList{} - err = pManager.GetClient().List(ctx, nsList, &client.ListOptions{ - LabelSelector: labels.SelectorFromSet(labels.Set{ - namespaces.VClusterNamespaceAnnotation: options.TargetNamespace, - }), - }) - if err != nil { - return nil, fmt.Errorf("unable to list namespaces: %w", err) - } - - vclusterNamespaces := make(map[string]struct{}, len(nsList.Items)) - for _, ns := range nsList.Items { - vclusterNamespaces[ns.Name] = struct{}{} - } - - // Limit Pods - pods = filter(ctx, podList.Items, vclusterNamespaces) - } else { - pods = podList.Items - } - - podMappings := make(PhysicalPodMap, len(pods)) - for _, pPod := range pods { + podMappings := make(PhysicalPodMap, len(podList.Items)) + for _, pPod := range podList.Items { lookupName := fmt.Sprintf("%s_%s_%s", pPod.Namespace, pPod.Name, pPod.UID) ok, err := checkIfPathExists(lookupName) diff --git a/go.mod b/go.mod index bff63eae..95c84717 100644 --- a/go.mod +++ b/go.mod @@ -6,13 +6,13 @@ toolchain go1.24.2 require ( github.com/go-openapi/loads v0.21.2 - github.com/loft-sh/vcluster v0.25.0 + github.com/loft-sh/vcluster v0.26.1 github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.8.1 gotest.tools v2.2.0+incompatible - k8s.io/api v0.32.1 - k8s.io/apimachinery v0.32.1 - k8s.io/client-go v0.32.1 + k8s.io/api v0.32.8 + k8s.io/apimachinery v0.32.8 + k8s.io/client-go v0.32.8 k8s.io/klog/v2 v2.130.1 sigs.k8s.io/controller-runtime v0.20.1 sigs.k8s.io/yaml v1.4.0 @@ -87,10 +87,10 @@ require ( github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect - github.com/loft-sh/admin-apis v0.0.0-20240203010124-3600c1c582a8 // indirect - github.com/loft-sh/agentapi/v4 v4.0.0-alpha.6.0.20240614131646-3359da6a4818 // indirect - github.com/loft-sh/api/v4 v4.0.0-alpha.6.0.20240614134907-f9ecc1668e9e // indirect - github.com/loft-sh/apiserver v0.0.0-20240607231110-634aeeab2b36 // indirect + github.com/loft-sh/admin-apis v0.0.0-20250429193833-4e0a455c33dd // indirect + github.com/loft-sh/agentapi/v4 v4.3.0-alpha.39 // indirect + github.com/loft-sh/api/v4 v4.3.0-alpha.32 // indirect + github.com/loft-sh/apiserver v0.0.0-20250206205835-422f1d472459 // indirect github.com/loft-sh/log v0.0.0-20240219160058-26d83ffb46ac // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -109,7 +109,7 @@ require ( github.com/oklog/run v1.0.0 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/prometheus/client_golang v1.20.4 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect @@ -142,7 +142,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/crypto v0.36.0 // indirect - golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect + golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/net v0.38.0 // indirect golang.org/x/oauth2 v0.28.0 // indirect @@ -150,7 +150,7 @@ require ( golang.org/x/sys v0.31.0 // indirect golang.org/x/term v0.30.0 // indirect golang.org/x/text v0.23.0 // indirect - golang.org/x/time v0.7.0 // indirect + golang.org/x/time v0.9.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect @@ -161,15 +161,15 @@ require ( gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.32.1 // indirect - k8s.io/apiserver v0.32.1 // indirect - k8s.io/cli-runtime v0.32.1 // indirect - k8s.io/component-base v0.32.1 // indirect - k8s.io/component-helpers v0.32.1 // indirect - k8s.io/kube-aggregator v0.32.1 // indirect + k8s.io/apiextensions-apiserver v0.32.8 // indirect + k8s.io/apiserver v0.32.8 // indirect + k8s.io/cli-runtime v0.32.8 // indirect + k8s.io/component-base v0.32.8 // indirect + k8s.io/component-helpers v0.32.8 // indirect + k8s.io/kube-aggregator v0.32.8 // indirect k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect - k8s.io/kubectl v0.32.1 // indirect - k8s.io/metrics v0.32.1 // indirect + k8s.io/kubectl v0.32.8 // indirect + k8s.io/metrics v0.32.8 // indirect k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect diff --git a/go.sum b/go.sum index 7738c377..a2553fc0 100644 --- a/go.sum +++ b/go.sum @@ -303,18 +303,18 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhn github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= -github.com/loft-sh/admin-apis v0.0.0-20240203010124-3600c1c582a8 h1:nuY9Vgvabh2FlaTYp9yhzh3cBzY6jjFEFSsOvw9ZAJw= -github.com/loft-sh/admin-apis v0.0.0-20240203010124-3600c1c582a8/go.mod h1:MWczNwKvWssHo1KaeZKaWDdRLYSNbWqQBGsTLoCNd7U= -github.com/loft-sh/agentapi/v4 v4.0.0-alpha.6.0.20240614131646-3359da6a4818 h1:NysDbuR9OBb0sl3BvjD+6J+wlupSrydjSnG6egS8JQ4= -github.com/loft-sh/agentapi/v4 v4.0.0-alpha.6.0.20240614131646-3359da6a4818/go.mod h1:RMUME+v+LxjqG05t7JdLq5WYfnSwGgchp93S1gdT2aw= -github.com/loft-sh/api/v4 v4.0.0-alpha.6.0.20240614134907-f9ecc1668e9e h1:3foIUcJ4XaY8UTPFweHKKzJTYiflIZOApf47Vqrek1Q= -github.com/loft-sh/api/v4 v4.0.0-alpha.6.0.20240614134907-f9ecc1668e9e/go.mod h1:Lu5brVQPWlRPPA4qsMg1mr3IOKk+GqBkn0YUyW8QW48= -github.com/loft-sh/apiserver v0.0.0-20240607231110-634aeeab2b36 h1:1euJ7mNHMI2MMA+g+jEYYKtoMrHZTkUMapHnmjHb9lM= -github.com/loft-sh/apiserver v0.0.0-20240607231110-634aeeab2b36/go.mod h1:XxI95azXiqXHiIDRiyDTpZcxdtXQlUqeU5VMMDz8INA= +github.com/loft-sh/admin-apis v0.0.0-20250429193833-4e0a455c33dd h1:U3nN7qFQ3Jad8oc7gw0/eyL7dc6bnGs/EwcQWadY/oY= +github.com/loft-sh/admin-apis v0.0.0-20250429193833-4e0a455c33dd/go.mod h1:WHCqWfljfD1hkwk41hLeqBhW2yeLvWipB1sH6vfnR7U= +github.com/loft-sh/agentapi/v4 v4.3.0-alpha.39 h1:6z4b0fLn/1Hu0XSZIYLIvq7iRVtns8WlUIBYcVs9Ex4= +github.com/loft-sh/agentapi/v4 v4.3.0-alpha.39/go.mod h1:2ik+TI+fGtoINeFc9BqlUCJSupyRUek70Qbr3WpB6/4= +github.com/loft-sh/api/v4 v4.3.0-alpha.32 h1:8KQMDDdQiOHcAFKwcbDf63wlEvwBLOS2Wc4iaOPrPXE= +github.com/loft-sh/api/v4 v4.3.0-alpha.32/go.mod h1:7+afVa1YM89WtGi9SoF40+kqS4ZR9UXoGCJs8MIIrb8= +github.com/loft-sh/apiserver v0.0.0-20250206205835-422f1d472459 h1:6SrgBtT1S9ANsQMoO/O0Mq+hs9EbC5te5kPqOBfg5UI= +github.com/loft-sh/apiserver v0.0.0-20250206205835-422f1d472459/go.mod h1:rung3jsKjaVAtykQN0vWmFHhx2A/umpRyAae8BJVSeE= github.com/loft-sh/log v0.0.0-20240219160058-26d83ffb46ac h1:Gz/7Lb7WgdgIv+KJz87ORA1zvQW52tUqKPGyunlp4dQ= github.com/loft-sh/log v0.0.0-20240219160058-26d83ffb46ac/go.mod h1:YImeRjXH34Yf5E79T7UHBQpDZl9fIaaFRgyZ/bkY+UQ= -github.com/loft-sh/vcluster v0.25.0 h1:HiXmGdywyLAa1isSSVXUz1d6WvuTqj2DN1rOCigF+I4= -github.com/loft-sh/vcluster v0.25.0/go.mod h1:9W0/ukRLZ4m1tv5dKzW2AzV4upAA8/qmGoXlcLJu7Sg= +github.com/loft-sh/vcluster v0.26.1 h1:Ulecpt9kANgyImQTb8jaG7ew3B+B+euomSWYqDRzae0= +github.com/loft-sh/vcluster v0.26.1/go.mod h1:I5+MT4agr6B4p5UU9rSoZ9ycGTbwg6SwEesxhhrqiRA= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/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= @@ -384,8 +384,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= -github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= @@ -522,8 +522,8 @@ golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL 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-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw= -golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= +golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 h1:yqrTHse8TCMW1M1ZCP+VAR/l0kKxwaAIqN/il7x4voA= +golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -634,8 +634,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb 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.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -690,8 +690,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f h1:jTm13A2itBi3La6yTGqn8bVSrc3ZZ1r8ENHlIXBfnRA= google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f/go.mod h1:CLGoBuH1VHxAUXVPP8FfPwPEVJB6lz3URE5mY2SuayE= google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f h1:cUMEy+8oS78BWIH9OWazBkzbr090Od9tWBNtZHkOhf0= @@ -750,40 +750,40 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh 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= k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= -k8s.io/api v0.32.1 h1:f562zw9cy+GvXzXf0CKlVQ7yHJVYzLfL6JAS4kOAaOc= -k8s.io/api v0.32.1/go.mod h1:/Yi/BqkuueW1BgpoePYBRdDYfjPF5sgTr5+YqDZra5k= -k8s.io/apiextensions-apiserver v0.32.1 h1:hjkALhRUeCariC8DiVmb5jj0VjIc1N0DREP32+6UXZw= -k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto= +k8s.io/api v0.32.8 h1:PhuKPnqsaXYuwmLXRLAmdDJ9EZ2R2kEbOZTq4UE3lGc= +k8s.io/api v0.32.8/go.mod h1:gdRZQ4zXGawr9YrJ5OjTl7aR3TD0mTowtFsqFtpCDXo= +k8s.io/apiextensions-apiserver v0.32.8 h1:iYIIaZmn/BMTwzGYRZnYZysaKB4t2TL3O+0yhmbXE2U= +k8s.io/apiextensions-apiserver v0.32.8/go.mod h1:GTGskWgcBo/7boX33zcS8JY6vaG4s728AdbQPxtheVk= k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apimachinery v0.32.1 h1:683ENpaCBjma4CYqsmZyhEzrGz6cjn1MY/X2jB2hkZs= -k8s.io/apimachinery v0.32.1/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/apiserver v0.32.1 h1:oo0OozRos66WFq87Zc5tclUX2r0mymoVHRq8JmR7Aak= -k8s.io/apiserver v0.32.1/go.mod h1:UcB9tWjBY7aryeI5zAgzVJB/6k7E97bkr1RgqDz0jPw= -k8s.io/cli-runtime v0.32.1 h1:19nwZPlYGJPUDbhAxDIS2/oydCikvKMHsxroKNGA2mM= -k8s.io/cli-runtime v0.32.1/go.mod h1:NJPbeadVFnV2E7B7vF+FvU09mpwYlZCu8PqjzfuOnkY= +k8s.io/apimachinery v0.32.8 h1:95I+2jX71Tev+C+UlhNbmKfv+A/TQII42HLskiHZpBg= +k8s.io/apimachinery v0.32.8/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/apiserver v0.32.8 h1:QRXnrAxVsKMHW9BinWwhbD0oh78yE817UlLVTTYa3wY= +k8s.io/apiserver v0.32.8/go.mod h1:tqqhcCOS8MRUiNncD7DNsyRWXw04AUJSRISTX4D3FsQ= +k8s.io/cli-runtime v0.32.8 h1:dcePskup9S5ZC57oqQTXHNDwEBMd3kOSBv6Nru9m7qU= +k8s.io/cli-runtime v0.32.8/go.mod h1:MnIx/3V8vA4vQ+YtRy7YkLZzTnVQ8nscYy0HL1d14nk= k8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU= -k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU= -k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg= +k8s.io/client-go v0.32.8 h1:BkSFWUtRz/BbE3DJF98KPg7ix6lwMnIQ9DnHw3iWiSw= +k8s.io/client-go v0.32.8/go.mod h1:vGkCzRxZ7BuRX2zdW7+kOwCdcgOkq9omDWb26wk/sE0= k8s.io/code-generator v0.19.0/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= -k8s.io/component-base v0.32.1 h1:/5IfJ0dHIKBWysGV0yKTFfacZ5yNV1sulPh3ilJjRZk= -k8s.io/component-base v0.32.1/go.mod h1:j1iMMHi/sqAHeG5z+O9BFNCF698a1u0186zkjMZQ28w= -k8s.io/component-helpers v0.32.1 h1:TwdsSM1vW9GjnfX18lkrZbwE5G9psCIS2/rhenTDXd8= -k8s.io/component-helpers v0.32.1/go.mod h1:1JT1Ei3FD29yFQ18F3laj1WyvxYdHIhyxx6adKMFQXI= +k8s.io/component-base v0.32.8 h1:Ez5yxl4Apas9m0gUQfwD60GbMyhfHPbvaYzQkpBDE6k= +k8s.io/component-base v0.32.8/go.mod h1:zrTYhjPNFrItmyFEPiRIL9pgZa4jIgOUyOwrEL7xb10= +k8s.io/component-helpers v0.32.8 h1:Z5g8jnqE+RCndqbfG5hKsrPGTFAecAjn9NphUKIN+ko= +k8s.io/component-helpers v0.32.8/go.mod h1:vTx1Mk59REzJV28uHMxm/uXRAD/XSB5XJbjt2Ic37CA= 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/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.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-aggregator v0.32.1 h1:cztPyIHbo6tgrhYHDqmdmvxUufJKuxgAC/vog7yeWek= -k8s.io/kube-aggregator v0.32.1/go.mod h1:sXjL5T8FO/rlBzTbBhahw9V5Nnr1UtzZHKTj9WxQCOU= +k8s.io/kube-aggregator v0.32.8 h1:DIRI/pRYbkYl6jT8pCYn0+mpkVifBiqWymXxMOL04ZE= +k8s.io/kube-aggregator v0.32.8/go.mod h1:ZHXMjT+LaqzvXcTlZhVkGIXoxiLlauUo8CuIAhv7nso= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= -k8s.io/kubectl v0.32.1 h1:/btLtXLQUU1rWx8AEvX9jrb9LaI6yeezt3sFALhB8M8= -k8s.io/kubectl v0.32.1/go.mod h1:sezNuyWi1STk4ZNPVRIFfgjqMI6XMf+oCVLjZen/pFQ= -k8s.io/metrics v0.32.1 h1:Ou4nrEtZS2vFf7OJCf9z3+2kr0A00kQzfoSwxg0gXps= -k8s.io/metrics v0.32.1/go.mod h1:cLnai9XKYby1tNMX+xe8p9VLzTqrxYPcmqfCBoWObcM= +k8s.io/kubectl v0.32.8 h1:X6I2Rmd+RZvtu+BRplREUTkIYgUc87s87m/kZsbKC7s= +k8s.io/kubectl v0.32.8/go.mod h1:RbwOkKZdxIFzhFIxXY3on/n6aaSXCc353iJ0IXb4DvU= +k8s.io/metrics v0.32.8 h1:9fu74SRNrhVG51EFnOtMmgTiSQlM/9tpyornxy3tPEY= +k8s.io/metrics v0.32.8/go.mod h1:7AJIMxYbjEk/HRlmmY4mInudlS2sLlm1IYhOb9f37hs= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= diff --git a/vendor/github.com/loft-sh/admin-apis/LICENSE b/vendor/github.com/loft-sh/admin-apis/LICENSE new file mode 100644 index 00000000..89161536 --- /dev/null +++ b/vendor/github.com/loft-sh/admin-apis/LICENSE @@ -0,0 +1,8 @@ +Copyright (C) Loft Labs, Inc. - All Rights Reserved + +All information contained in thie source code repository is, and remains the property of +Loft Labs, Inc. (Notice email address: legal@loft.sh). The intellectual and technical concepts +contained herein are proprietary to Loft Labs, Inc. and may be covered by U.S. and +Foreign Patents, patents in process, and are protected by trade secret or copyright law. ' +Dissemination of this information or reproduction of this material is strictly forbidden +unless prior written permission is obtained from Loft Labs, Inc. diff --git a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/features.go b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/features.go index 49e55b1f..af742fc7 100644 --- a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/features.go +++ b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/features.go @@ -1,77 +1,156 @@ package licenseapi +// This code was generated. Change features.yaml to add, remove, or edit features. + // Features const ( - // DevPod - DevPod FeatureName = "devpod" - - // Virtual Clusters - // when adding a new vCluster feature, add it to GetVClusterFeatures() as well - VirtualCluster FeatureName = "vclusters" - VirtualClusterSleepMode FeatureName = "vcluster-sleep-mode" - VirtualClusterCentralHostPathMapper FeatureName = "vcluster-host-path-mapper" - VirtualClusterProDistroImage FeatureName = "vcp-distro-image" - VirtualClusterProDistroAdmissionControl FeatureName = "vcp-distro-admission-control" - VirtualClusterProDistroBuiltInCoreDNS FeatureName = "vcp-distro-built-in-coredns" - VirtualClusterProDistroIsolatedControlPlane FeatureName = "vcp-distro-isolated-cp" - VirtualClusterProDistroSyncPatches FeatureName = "vcp-distro-sync-patches" - VirtualClusterProDistroCentralizedAdmissionControl FeatureName = "vcp-distro-centralized-admission-control" - VirtualClusterProEmbeddedEtcd FeatureName = "vcp-distro-embedded-etcd" - - // Spaces & Clusters - ConnectedClusters FeatureName = "connected-clusters" - ClusterAccess FeatureName = "cluster-access" - ClusterRoles FeatureName = "cluster-roles" - Namespace FeatureName = "namespaces" - NamespaceSleepMode FeatureName = "namespace-sleep-mode" - - // Auth-Related Features - AuditLogging FeatureName = "audit-logging" - AutomaticIngressAuth FeatureName = "auto-ingress-authentication" - MultipleSSOProviders FeatureName = "multiple-sso-providers" - OIDCProvider FeatureName = "oidc-provider" - SSOAuth FeatureName = "sso-authentication" - - // Templating Features - Apps FeatureName = "apps" - TemplateVersioning FeatureName = "template-versioning" - - // Secrets - Secrets FeatureName = "secrets" - SecretEncryption FeatureName = "secret-encryption" - - // Integrations - ArgoIntegration FeatureName = "argo-integration" - VaultIntegration FeatureName = "vault-integration" - RancherIntegration FeatureName = "rancher-integration" - - // HA & Other Advanced Deployment Features - AirGappedMode FeatureName = "air-gapped-mode" - HighAvailabilityMode FeatureName = "ha-mode" - MultiRegionMode FeatureName = "multi-region-mode" - - // UI Customization Features - AdvancedUICustomizations FeatureName = "advanced-ui-customizations" - CustomBranding FeatureName = "custom-branding" - - // Internal Features - not to be directly used by the license service - Metrics FeatureName = "metrics" - Runners FeatureName = "runners" - ConnectLocalCluster FeatureName = "connect-local-cluster" - PasswordAuthentication FeatureName = "password-auth" + VirtualCluster FeatureName = "vclusters" // Virtual Cluster Management + + VirtualClusterSleepMode FeatureName = "vcluster-sleep-mode" // Sleep Mode for Virtual Clusters + + VirtualClusterHostPathMapper FeatureName = "vcluster-host-path-mapper" // Central HostPath Mapper + + VirtualClusterEnterprisePlugins FeatureName = "vcluster-enterprise-plugins" // Enterprise Plugins + + VirtualClusterProDistroImage FeatureName = "vcp-distro-image" // Security-Hardened vCluster Image + + VirtualClusterProDistroBuiltInCoreDNS FeatureName = "vcp-distro-built-in-coredns" // Built-In CoreDNS + + VirtualClusterProDistroAdmissionControl FeatureName = "vcp-distro-admission-control" // Virtual Admission Control + + VirtualClusterProDistroSyncPatches FeatureName = "vcp-distro-sync-patches" // Sync Patches + + VirtualClusterProDistroEmbeddedEtcd FeatureName = "vcp-distro-embedded-etcd" // Embedded etcd + + VirtualClusterProDistroIsolatedControlPlane FeatureName = "vcp-distro-isolated-cp" // Isolated Control Plane + + VirtualClusterProDistroCentralizedAdmissionControl FeatureName = "vcp-distro-centralized-admission-control" // Centralized Admission Control + + VirtualClusterProDistroGenericSync FeatureName = "vcp-distro-generic-sync" // Generic Sync + + VirtualClusterProDistroTranslatePatches FeatureName = "vcp-distro-translate-patches" // Translate Patches + + VirtualClusterProDistroIntegrationsKubeVirt FeatureName = "vcp-distro-integrations-kube-virt" // KubeVirt Integration + + VirtualClusterProDistroIntegrationsExternalSecrets FeatureName = "vcp-distro-integrations-external-secrets" // External Secrets Integration + + VirtualClusterProDistroIntegrationsCertManager FeatureName = "vcp-distro-integrations-cert-manager" // Cert Manager Integration + + VirtualClusterProDistroFips FeatureName = "vcp-distro-fips" // FIPS + + VirtualClusterProDistroExternalDatabase FeatureName = "vcp-distro-external-database" // External Database + + ConnectorExternalDatabase FeatureName = "connector-external-database" // Database Connector + + VirtualClusterProDistroSleepMode FeatureName = "vcp-distro-sleep-mode" // SleepMode + + Devpod FeatureName = "devpod" // Dev Environment Management + + Namespaces FeatureName = "namespaces" // Namespace Management + + NamespaceSleepMode FeatureName = "namespace-sleep-mode" // Sleep Mode for Namespaces + + ConnectedClusters FeatureName = "connected-clusters" // Connected Clusters + + ClusterAccess FeatureName = "cluster-access" // Cluster Access + + ClusterRoles FeatureName = "cluster-roles" // Cluster Role Management + + SSOAuth FeatureName = "sso-authentication" // Single Sign-On + + AuditLogging FeatureName = "audit-logging" // Audit Logging + + AutoIngressAuth FeatureName = "auto-ingress-authentication" // Automatic Auth For Ingresses + + OIDCProvider FeatureName = "oidc-provider" // Platform as OIDC Provider + + MultipleSSOProviders FeatureName = "multiple-sso-providers" // Multiple SSO Providers + + Apps FeatureName = "apps" // Apps + + TemplateVersioning FeatureName = "template-versioning" // Template Versioning + + ArgoIntegration FeatureName = "argo-integration" // Argo Integration + + RancherIntegration FeatureName = "rancher-integration" // Rancher Integration + + Secrets FeatureName = "secrets" // Secrets Sync + + SecretEncryption FeatureName = "secret-encryption" // Secrets Encryption + + VaultIntegration FeatureName = "vault-integration" // HashiCorp Vault Integration + + HighAvailabilityMode FeatureName = "ha-mode" // High-Availability Mode + + MultiRegionMode FeatureName = "multi-region-mode" // Multi-Region Mode + + AirGappedMode FeatureName = "air-gapped-mode" // Air-Gapped Mode + + CustomBranding FeatureName = "custom-branding" // Custom Branding + + AdvancedUICustomizations FeatureName = "advanced-ui-customizations" // Advanced UI Customizations + + VNodeRuntime FeatureName = "vnode-runtime" // vNode Runtime + + ProjectQuotas FeatureName = "project-quotas" // Project Quotas + + ResolveDns FeatureName = "resolve-dns" // Resolve DNS + + IstioIntegration FeatureName = "istio-integration" // Istio Integration + + HybridScheduling FeatureName = "hybrid-scheduling" // Hybrid Scheduling + ) -func GetVClusterFeatures() []FeatureName { +func GetFeatures() []FeatureName { return []FeatureName{ VirtualCluster, VirtualClusterSleepMode, - VirtualClusterCentralHostPathMapper, + VirtualClusterHostPathMapper, + VirtualClusterEnterprisePlugins, VirtualClusterProDistroImage, - VirtualClusterProDistroAdmissionControl, VirtualClusterProDistroBuiltInCoreDNS, - VirtualClusterProDistroIsolatedControlPlane, + VirtualClusterProDistroAdmissionControl, VirtualClusterProDistroSyncPatches, + VirtualClusterProDistroEmbeddedEtcd, + VirtualClusterProDistroIsolatedControlPlane, VirtualClusterProDistroCentralizedAdmissionControl, - VirtualClusterProEmbeddedEtcd, + VirtualClusterProDistroGenericSync, + VirtualClusterProDistroTranslatePatches, + VirtualClusterProDistroIntegrationsKubeVirt, + VirtualClusterProDistroIntegrationsExternalSecrets, + VirtualClusterProDistroIntegrationsCertManager, + VirtualClusterProDistroFips, + VirtualClusterProDistroExternalDatabase, + ConnectorExternalDatabase, + VirtualClusterProDistroSleepMode, + Devpod, + Namespaces, + NamespaceSleepMode, + ConnectedClusters, + ClusterAccess, + ClusterRoles, + SSOAuth, + AuditLogging, + AutoIngressAuth, + OIDCProvider, + MultipleSSOProviders, + Apps, + TemplateVersioning, + ArgoIntegration, + RancherIntegration, + Secrets, + SecretEncryption, + VaultIntegration, + HighAvailabilityMode, + MultiRegionMode, + AirGappedMode, + CustomBranding, + AdvancedUICustomizations, + VNodeRuntime, + ProjectQuotas, + ResolveDns, + IstioIntegration, + HybridScheduling, } } diff --git a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/features_allowed_before.go b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/features_allowed_before.go new file mode 100644 index 00000000..7aabdda8 --- /dev/null +++ b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/features_allowed_before.go @@ -0,0 +1,46 @@ +package licenseapi + +// This code was generated. Change features.yaml to add, remove, or edit features. + +import ( + "errors" + "time" +) + +var errNoAllowBefore = errors.New("feature not allowed before license's issued date") + +// featureToAllowBefore maps feature names to their corresponding +// RFC3339-formatted allowBefore timestamps. If a license was issued before this +// timestamp, the feature is allowed even if it is not explicitly included in the license. +var featuresToAllowBefore = map[FeatureName]string{ + ProjectQuotas: "2025-05-31T00:00:00Z", +} + +// GetFeaturesAllowedBefore returns list of features +// to be allowed before license's issued time +func GetFeaturesAllowedBefore() []FeatureName { + return []FeatureName{ + ProjectQuotas, + } +} + +// AllowedBeforeTime returns the parsed allowBefore time for a given feature. +// If the feature does not have an allowBefore date, it returns errNoAllowBefore. +// If the date is present but invalid, it returns the corresponding parsing error. +func AllowedBeforeTime(featureName FeatureName) (*time.Time, error) { + if date, exists := featuresToAllowBefore[featureName]; exists { + t, err := time.Parse(time.RFC3339, date) + if err != nil { + return nil, err + } + return &t, nil + + } + return nil, errNoAllowBefore +} + +// IsAllowBeforeNotDefined determines whether the provided error is +// errNoAllowBefore, indicating that the feature has no allowBefore date. +func IsAllowBeforeNotDefined(err error) bool { + return errors.Is(err, errNoAllowBefore) +} diff --git a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/features_internal.go b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/features_internal.go new file mode 100644 index 00000000..f28e932b --- /dev/null +++ b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/features_internal.go @@ -0,0 +1,13 @@ +package licenseapi + +// Internal Features - not to be directly used by the license service + +const ( + Metrics FeatureName = "metrics" + + Runners FeatureName = "runners" + + ConnectLocalCluster FeatureName = "connect-local-cluster" + + PasswordAuthentication FeatureName = "password-auth" +) diff --git a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/generate.go b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/generate.go new file mode 100644 index 00000000..25605445 --- /dev/null +++ b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/generate.go @@ -0,0 +1,3 @@ +package licenseapi + +//go:generate go run ../../hack/gen-features/main.go diff --git a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license.go b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license.go index c2d92cc3..c49824c2 100644 --- a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license.go +++ b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license.go @@ -7,6 +7,8 @@ package licenseapi type License struct { // InstanceID contains the instance id of the Loft instance InstanceID string `json:"instance,omitempty"` + // Entity holds a name for an organization, person or entity this product is licensed for. This will be displayed to the user. + Entity string `json:"entity,omitempty"` // Analytics indicates the analytics endpoints and which requests should be sent to the // analytics server. diff --git a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_feature.go b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_feature.go index 3acf2658..4ee86b4f 100644 --- a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_feature.go +++ b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_feature.go @@ -12,18 +12,20 @@ type Feature struct { // +optional DisplayName string `json:"displayName,omitempty"` + // Preview represents whether the feature can be previewed if a user's license does not allow the feature // +optional - Description string `json:"description,omitempty"` + Preview bool `json:"preview,omitempty"` - // Status shows the status of the feature (see type FeatureStatus) + // AllowBefore is an optional timestamp. If set, licenses issued before this time are allowed + // to use the feature even if it's not included in the license. // +optional - Status string `json:"status,omitempty"` + AllowBefore string `json:"allowBefore,omitempty"` - // Compatibility contains a series of semver compatibility constraints + // Status shows the status of the feature (see type FeatureStatus) // +optional - Compatibility string `json:"compatibility,omitempty"` + Status string `json:"status,omitempty"` - // Labels contains a list of labels to be displayed for this feature (e.g. alpha, beta) + // Name of the module that this feature belongs to // +optional - Labels []string `json:"labels,omitempty"` + Module string `json:"module,omitempty"` } diff --git a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_limit.go b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_limit.go index 2bccd9cc..c9364768 100644 --- a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_limit.go +++ b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_limit.go @@ -1,5 +1,28 @@ package licenseapi +var Limits = map[ResourceName]*Limit{ + ConnectedClusterLimit: { + DisplayName: "Connected Clusters", + Name: string(ConnectedClusterLimit), + }, + VirtualClusterInstanceLimit: { + DisplayName: "Virtual Clusters", + Name: string(VirtualClusterInstanceLimit), + }, + DevPodWorkspaceInstanceLimit: { + DisplayName: "Dev Environments", + Name: string(DevPodWorkspaceInstanceLimit), + }, + UserLimit: { + DisplayName: "Users", + Name: string(UserLimit), + }, + InstanceLimit: { + DisplayName: "Instances", + Name: string(InstanceLimit), + }, +} + // Limit defines a limit set in the license // +k8s:openapi-gen=true // +k8s:deepcopy-gen=true @@ -15,4 +38,8 @@ type Limit struct { // Limit specifies the limit for this resource. // +optional Quantity *ResourceCount `json:"quantity,omitempty"` + + // Name of the module that this limit belongs to + // +optional + Module string `json:"module,omitempty"` } diff --git a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_new.go b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_new.go index cc514b9f..203b1c2a 100644 --- a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_new.go +++ b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/license_new.go @@ -1,285 +1,221 @@ package licenseapi -var Limits = map[ResourceName]*Limit{ - ConnectedClusterLimit: { - DisplayName: "Connected Clusters", - Name: string(ConnectedClusterLimit), - }, - VirtualClusterInstanceLimit: { - DisplayName: "Virtual Clusters", - Name: string(VirtualClusterInstanceLimit), - }, - DevPodWorkspaceInstanceLimit: { - DisplayName: "Dev Environments", - Name: string(DevPodWorkspaceInstanceLimit), - }, - UserLimit: { - DisplayName: "Users", - Name: string(UserLimit), - }, - InstanceLimit: { - DisplayName: "Instances", - Name: string(InstanceLimit), - }, -} - -func New(product ProductName) *License { - allowedStatus := string(FeatureStatusActive) - - connectedClusterStatus := string(FeatureStatusActive) - if product != VClusterPro && product != Loft { - connectedClusterStatus = string(FeatureStatusDisallowed) - } - - namespaceStatus := string(FeatureStatusActive) - if product != Loft { - namespaceStatus = string(FeatureStatusDisallowed) - } +// This code was generated. Change features.yaml to add, remove, or edit features. - virtualClusterStatus := string(FeatureStatusActive) - if product != VClusterPro && product != Loft { - virtualClusterStatus = string(FeatureStatusDisallowed) - } +import ( + "cmp" + "slices" +) - devpodStatus := string(FeatureStatusActive) - if product != DevPodPro { - devpodStatus = string(FeatureStatusDisallowed) +func New() *License { + limits := make([]*Limit, 0, len(Limits)) + for _, limit := range Limits { + limits = append(limits, limit) } + slices.SortFunc(limits, func(a, b *Limit) int { + return cmp.Compare(a.Name, b.Name) + }) + // Sorting features by module is not requires here. However, to maintain backwards compatibility, the structure of + // features being contained within a module is still necessary. Therefore, all features are now returned in one module. return &License{ Modules: []*Module{ { - DisplayName: "Virtual Clusters", + DisplayName: "All Features", Name: string(VirtualClusterModule), - Limits: []*Limit{ - Limits[VirtualClusterInstanceLimit], - }, + Limits: limits, Features: []*Feature{ { DisplayName: "Virtual Cluster Management", - Name: string(VirtualCluster), - Status: virtualClusterStatus, + Name: "vclusters", }, { DisplayName: "Sleep Mode for Virtual Clusters", - Name: string(VirtualClusterSleepMode), - Status: virtualClusterStatus, + Name: "vcluster-sleep-mode", }, { DisplayName: "Central HostPath Mapper", - Name: string(VirtualClusterCentralHostPathMapper), - Status: virtualClusterStatus, + Name: "vcluster-host-path-mapper", + }, + { + DisplayName: "Enterprise Plugins", + Name: "vcluster-enterprise-plugins", }, - }, - }, - { - DisplayName: "vCluster.Pro Distro", - Name: string(VClusterProDistroModule), - Features: []*Feature{ { DisplayName: "Security-Hardened vCluster Image", - Name: string(VirtualClusterProDistroImage), - Status: virtualClusterStatus, + Name: "vcp-distro-image", }, { DisplayName: "Built-In CoreDNS", - Name: string(VirtualClusterProDistroBuiltInCoreDNS), - Status: virtualClusterStatus, + Name: "vcp-distro-built-in-coredns", }, { DisplayName: "Virtual Admission Control", - Name: string(VirtualClusterProDistroAdmissionControl), - Status: string(FeatureStatusHidden), + Name: "vcp-distro-admission-control", }, { DisplayName: "Sync Patches", - Name: string(VirtualClusterProDistroSyncPatches), - Status: virtualClusterStatus, + Name: "vcp-distro-sync-patches", + }, + { + DisplayName: "Embedded etcd", + Name: "vcp-distro-embedded-etcd", }, { DisplayName: "Isolated Control Plane", - Name: string(VirtualClusterProDistroIsolatedControlPlane), - Status: virtualClusterStatus, + Name: "vcp-distro-isolated-cp", }, { DisplayName: "Centralized Admission Control", - Name: string(VirtualClusterProDistroCentralizedAdmissionControl), - Status: virtualClusterStatus, + Name: "vcp-distro-centralized-admission-control", + }, + { + DisplayName: "Generic Sync", + Name: "vcp-distro-generic-sync", + }, + { + DisplayName: "Translate Patches", + Name: "vcp-distro-translate-patches", + }, + { + DisplayName: "KubeVirt Integration", + Name: "vcp-distro-integrations-kube-virt", + }, + { + DisplayName: "External Secrets Integration", + Name: "vcp-distro-integrations-external-secrets", + }, + { + DisplayName: "Cert Manager Integration", + Name: "vcp-distro-integrations-cert-manager", + }, + { + DisplayName: "FIPS", + Name: "vcp-distro-fips", + }, + { + DisplayName: "External Database", + Name: "vcp-distro-external-database", + }, + { + DisplayName: "Database Connector", + Name: "connector-external-database", + }, + { + DisplayName: "SleepMode", + Name: "vcp-distro-sleep-mode", }, - }, - }, - { - DisplayName: "Dev Environments", - Name: string(DevPodModule), - Limits: []*Limit{ - Limits[DevPodWorkspaceInstanceLimit], - }, - Features: []*Feature{ { DisplayName: "Dev Environment Management", - Name: string(DevPod), - Status: devpodStatus, + Name: "devpod", }, - }, - }, - { - DisplayName: "Kubernetes Namespaces", - Name: string(KubernetesNamespaceModule), - Features: []*Feature{ { DisplayName: "Namespace Management", - Name: string(Namespace), - Status: namespaceStatus, + Name: "namespaces", }, { DisplayName: "Sleep Mode for Namespaces", - Name: string(NamespaceSleepMode), - Status: namespaceStatus, + Name: "namespace-sleep-mode", }, - }, - }, - { - DisplayName: "Kubernetes Clusters", - Name: string(KubernetesClusterModule), - Limits: []*Limit{ - Limits[ConnectedClusterLimit], - }, - Features: []*Feature{ { DisplayName: "Connected Clusters", - Name: string(ConnectedClusters), - Status: connectedClusterStatus, + Name: "connected-clusters", }, { DisplayName: "Cluster Access", - Name: string(ClusterAccess), - Status: connectedClusterStatus, + Name: "cluster-access", }, { DisplayName: "Cluster Role Management", - Name: string(ClusterRoles), - Status: connectedClusterStatus, + Name: "cluster-roles", }, - }, - }, - { - DisplayName: "Authentication & Audit Logging", - Name: string(AuthModule), - Limits: []*Limit{ - Limits[UserLimit], - }, - Features: []*Feature{ { DisplayName: "Single Sign-On", - Name: string(SSOAuth), - Status: allowedStatus, + Name: "sso-authentication", }, { DisplayName: "Audit Logging", - Name: string(AuditLogging), - Status: allowedStatus, + Name: "audit-logging", }, { DisplayName: "Automatic Auth For Ingresses", - Name: string(AutomaticIngressAuth), - Status: allowedStatus, + Name: "auto-ingress-authentication", }, { - DisplayName: "Loft as OIDC Provider", - Name: string(OIDCProvider), - Status: allowedStatus, + DisplayName: "Platform as OIDC Provider", + Name: "oidc-provider", }, { DisplayName: "Multiple SSO Providers", - Name: string(MultipleSSOProviders), - Status: allowedStatus, + Name: "multiple-sso-providers", }, - }, - }, - { - DisplayName: "Templating & GitOps", - Name: string(TemplatingModule), - Features: []*Feature{ { DisplayName: "Apps", - Name: string(Apps), - Status: allowedStatus, + Name: "apps", }, { DisplayName: "Template Versioning", - Name: string(TemplateVersioning), - Status: allowedStatus, + Name: "template-versioning", }, { DisplayName: "Argo Integration", - Name: string(ArgoIntegration), - Status: allowedStatus, + Name: "argo-integration", }, { DisplayName: "Rancher Integration", - Name: string(RancherIntegration), - Status: allowedStatus, + Name: "rancher-integration", }, - }, - }, - { - DisplayName: "Secrets Management", - Name: string(SecretsModule), - Features: []*Feature{ { DisplayName: "Secrets Sync", - Name: string(Secrets), - Status: allowedStatus, + Name: "secrets", }, { DisplayName: "Secrets Encryption", - Name: string(SecretEncryption), - Status: allowedStatus, + Name: "secret-encryption", }, { DisplayName: "HashiCorp Vault Integration", - Name: string(VaultIntegration), - Status: allowedStatus, + Name: "vault-integration", }, - }, - }, - { - DisplayName: "Deployment Modes", - Name: string(DeploymentModesModule), - Limits: []*Limit{ - Limits[InstanceLimit], - }, - Features: []*Feature{ { DisplayName: "High-Availability Mode", - Name: string(HighAvailabilityMode), - Status: allowedStatus, + Name: "ha-mode", }, { DisplayName: "Multi-Region Mode", - Name: string(MultiRegionMode), - Status: allowedStatus, + Name: "multi-region-mode", }, { DisplayName: "Air-Gapped Mode", - Name: string(AirGappedMode), - Status: allowedStatus, + Name: "air-gapped-mode", }, - }, - }, - { - DisplayName: "UI Customization", - Name: string(UIModule), - Features: []*Feature{ { DisplayName: "Custom Branding", - Name: string(CustomBranding), - Status: allowedStatus, + Name: "custom-branding", }, { DisplayName: "Advanced UI Customizations", - Name: string(AdvancedUICustomizations), - Status: allowedStatus, + Name: "advanced-ui-customizations", + }, + { + DisplayName: "vNode Runtime", + Name: "vnode-runtime", + }, + { + DisplayName: "Project Quotas", + Name: "project-quotas", + }, + { + DisplayName: "Resolve DNS", + Name: "resolve-dns", + }, + { + DisplayName: "Istio Integration", + Name: "istio-integration", + }, + { + DisplayName: "Hybrid Scheduling", + Name: "hybrid-scheduling", }, }, }, diff --git a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/names.go b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/names.go index f434e99e..a8e105fb 100644 --- a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/names.go +++ b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/names.go @@ -12,8 +12,28 @@ type FeatureStatus string type FeatureName string type ButtonName string +// Metadata Keys +const ( + /* NEVER CHANGE ANY OF THESE */ + MetadataKeyAttachAll = "attach_all_features" + MetadataKeyProductForFeature = "product_for_feature" + MetadataKeyFeatureIsHidden = "is_hidden" + MetadataKeyFeatureIsPreview = "is_preview" + MetadataKeyFeatureIsLimit = "is_limit" + MetadataKeyFeatureLimitType = "limit_type" + MetadataKeyFeatureLimitTypeActive = "active" + MetadataValueTrue = "true" +) + +// Other +const ( + /* NEVER CHANGE ANY OF THESE */ + LimitsPrefix = "limits-" +) + // Products const ( + /* NEVER CHANGE ANY OF THESE */ Loft ProductName = "loft" VClusterPro ProductName = "vcluster-pro" DevPodPro ProductName = "devpod-pro" @@ -55,6 +75,7 @@ const ( // Resources (e.g. for limits) const ( + /* NEVER CHANGE ANY OF THESE */ ConnectedClusterLimit ResourceName = "connected-cluster" VirtualClusterInstanceLimit ResourceName = "virtual-cluster-instance" SpaceInstanceLimit ResourceName = "space-instance" diff --git a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/zz_generated.deepcopy.go index 42ecfa45..644d829c 100644 --- a/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/zz_generated.deepcopy.go +++ b/vendor/github.com/loft-sh/admin-apis/pkg/licenseapi/zz_generated.deepcopy.go @@ -149,11 +149,6 @@ func (in *DomainToken) DeepCopy() *DomainToken { // 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 - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make([]string, len(*in)) - copy(*out, *in) - } return } @@ -231,6 +226,11 @@ func (in *InstanceCreateInput) DeepCopyInto(out *InstanceCreateInput) { (*out)[key] = val } } + if in.DebugInstanceID != nil { + in, out := &in.DebugInstanceID, &out.DebugInstanceID + *out = new(string) + **out = **in + } return } @@ -464,7 +464,7 @@ func (in *Module) DeepCopyInto(out *Module) { if (*in)[i] != nil { in, out := &(*in)[i], &(*out)[i] *out = new(Feature) - (*in).DeepCopyInto(*out) + **out = **in } } } diff --git a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/helmrelease_types.go b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/helmrelease_types.go index 51a76473..6a813301 100644 --- a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/helmrelease_types.go +++ b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/helmrelease_types.go @@ -1,6 +1,7 @@ package v1 import ( + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -139,6 +140,14 @@ type Bash struct { // ClusterRole is the cluster role to use for this job // +optional ClusterRole string `json:"clusterRole,omitempty"` + + // PodSecurityContext for the bash pod. + // +optional + PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"` + + // SecurityContext for the bash container. + // +optional + SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"` } // Info describes release information. diff --git a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/sleepmodeconfig_types.go b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/sleepmodeconfig_types.go index c3b1c8bf..d8bd3667 100644 --- a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/sleepmodeconfig_types.go +++ b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/sleepmodeconfig_types.go @@ -113,6 +113,7 @@ type SleepModeConfigSpec struct { // 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". + // See also: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones // +optional Timezone string `json:"timezone,omitempty"` diff --git a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/zz_generated.conversion.go b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/zz_generated.conversion.go index 5232456c..9fd59e82 100644 --- a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/zz_generated.conversion.go +++ b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/zz_generated.conversion.go @@ -9,6 +9,7 @@ import ( unsafe "unsafe" cluster "github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster" + corev1 "k8s.io/api/core/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -227,6 +228,8 @@ func autoConvert_v1_Bash_To_cluster_Bash(in *Bash, out *cluster.Bash, s conversi out.Script = in.Script out.Image = in.Image out.ClusterRole = in.ClusterRole + out.PodSecurityContext = (*corev1.PodSecurityContext)(unsafe.Pointer(in.PodSecurityContext)) + out.SecurityContext = (*corev1.SecurityContext)(unsafe.Pointer(in.SecurityContext)) return nil } @@ -239,6 +242,8 @@ func autoConvert_cluster_Bash_To_v1_Bash(in *cluster.Bash, out *Bash, s conversi out.Script = in.Script out.Image = in.Image out.ClusterRole = in.ClusterRole + out.PodSecurityContext = (*corev1.PodSecurityContext)(unsafe.Pointer(in.PodSecurityContext)) + out.SecurityContext = (*corev1.SecurityContext)(unsafe.Pointer(in.SecurityContext)) return nil } diff --git a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/zz_generated.deepcopy.go index b5eaa697..3376db0a 100644 --- a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1/zz_generated.deepcopy.go @@ -6,12 +6,23 @@ 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 *Bash) DeepCopyInto(out *Bash) { *out = *in + if in.PodSecurityContext != nil { + in, out := &in.PodSecurityContext, &out.PodSecurityContext + *out = new(corev1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(corev1.SecurityContext) + (*in).DeepCopyInto(*out) + } return } @@ -193,7 +204,7 @@ func (in *Feature) DeepCopyInto(out *Feature) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) + out.Status = in.Status return } @@ -267,7 +278,7 @@ func (in *FeatureSpec) DeepCopy() *FeatureSpec { // 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 - in.Feature.DeepCopyInto(&out.Feature) + out.Feature = in.Feature return } @@ -332,7 +343,7 @@ func (in *HelmReleaseConfig) DeepCopyInto(out *HelmReleaseConfig) { if in.Bash != nil { in, out := &in.Bash, &out.Bash *out = new(Bash) - **out = **in + (*in).DeepCopyInto(*out) } if in.Annotations != nil { in, out := &in.Annotations, &out.Annotations diff --git a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/zz_generated.api.register.go b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/zz_generated.api.register.go index 84774cd7..b98de8d6 100644 --- a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/zz_generated.api.register.go +++ b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/zz_generated.api.register.go @@ -8,6 +8,7 @@ import ( pkglicenseapi "github.com/loft-sh/admin-apis/pkg/licenseapi" "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" @@ -122,9 +123,11 @@ func Resource(resource string) schema.GroupResource { type Status string type Bash struct { - Script string `json:"script,omitempty"` - Image string `json:"image,omitempty"` - ClusterRole string `json:"clusterRole,omitempty"` + Script string `json:"script,omitempty"` + Image string `json:"image,omitempty"` + ClusterRole string `json:"clusterRole,omitempty"` + PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"` + SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"` } type Chart struct { diff --git a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/zz_generated.deepcopy.go index 6efcd70c..4840715b 100644 --- a/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/zz_generated.deepcopy.go +++ b/vendor/github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/zz_generated.deepcopy.go @@ -6,12 +6,23 @@ 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 *Bash) DeepCopyInto(out *Bash) { *out = *in + if in.PodSecurityContext != nil { + in, out := &in.PodSecurityContext, &out.PodSecurityContext + *out = new(v1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(v1.SecurityContext) + (*in).DeepCopyInto(*out) + } return } @@ -177,7 +188,7 @@ func (in *Feature) DeepCopyInto(out *Feature) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) + out.Status = in.Status return } @@ -251,7 +262,7 @@ func (in *FeatureSpec) DeepCopy() *FeatureSpec { // 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 - in.Feature.DeepCopyInto(&out.Feature) + out.Feature = in.Feature return } @@ -300,7 +311,7 @@ func (in *HelmReleaseConfig) DeepCopyInto(out *HelmReleaseConfig) { if in.Bash != nil { in, out := &in.Bash, &out.Bash *out = new(Bash) - **out = **in + (*in).DeepCopyInto(*out) } if in.Annotations != nil { in, out := &in.Annotations, &out.Annotations diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/cluster_agentconfig_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/cluster_agentconfig_types.go index 05ad1f11..a3a742a8 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/cluster_agentconfig_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/cluster_agentconfig_types.go @@ -47,6 +47,9 @@ type ClusterAgentConfigCommon struct { // AnalyticsSpec holds info needed for the agent to send analytics data to the analytics backend. AnalyticsSpec AgentAnalyticsSpec `json:"analyticsSpec"` + + // CostControl holds the settings related to the Cost Control ROI dashboard and its metrics gathering infrastructure + CostControl *AgentCostControlConfig `json:"costControl,omitempty"` } type AgentAuditConfig struct { @@ -100,3 +103,13 @@ type AgentAuditConfig struct { type AgentAnalyticsSpec struct { AnalyticsEndpoint string `json:"analyticsEndpoint,omitempty"` } + +type AgentCostControlConfig struct { + // Enabled specifies whether the ROI dashboard should be available in the UI, and if the metrics infrastructure + // that provides dashboard data is deployed + Enabled *bool `json:"enabled,omitempty"` + + // CostControlClusterConfig are settings for each cluster's managed components. These settings apply to all connected clusters + // unless overridden by modifying the Cluster's spec + CostControlClusterConfig `json:",inline"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/cluster_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/cluster_types.go index af314867..228c2f20 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/cluster_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/cluster_types.go @@ -1,6 +1,7 @@ package v1 import ( + agentstoragev1 "github.com/loft-sh/agentapi/v4/pkg/apis/loft/storage/v1" storagev1 "github.com/loft-sh/api/v4/pkg/apis/storage/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -16,7 +17,7 @@ import ( // Cluster holds the cluster information // +k8s:openapi-gen=true -// +resource:path=clusters,rest=ClusterREST +// +resource:path=clusters,rest=ClusterREST,statusRest=ClusterStatusREST // +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 @@ -63,3 +64,11 @@ func (a *Cluster) GetAccess() []storagev1.Access { func (a *Cluster) SetAccess(access []storagev1.Access) { a.Spec.Access = access } + +func (a *Cluster) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *Cluster) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/config_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/config_types.go index 6871a499..8803d82f 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/config_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/config_types.go @@ -35,7 +35,7 @@ type ConfigStatus struct { // +optional Authentication Authentication `json:"auth,omitempty"` - // OIDC holds oidc provider relevant information + // DEPRECATED: Configure the OIDC clients using either the OIDC Client UI or a secret. By default, vCluster Platform as an OIDC Provider is enabled but does not function without OIDC clients. // +optional OIDC *OIDC `json:"oidc,omitempty"` @@ -66,6 +66,16 @@ type ConfigStatus struct { // VaultIntegration holds the vault integration configuration // +optional VaultIntegration *storagev1.VaultIntegrationSpec `json:"vault,omitempty"` + + // DisableLoftConfigEndpoint will disable setting config via the UI and config.management.loft.sh endpoint + DisableConfigEndpoint bool `json:"disableConfigEndpoint,omitempty"` + + // Cloud holds the settings to be used exclusively in vCluster Cloud based + // environments and deployments. + Cloud *Cloud `json:"cloud,omitempty"` + + // CostControl holds the settings related to the Cost Control ROI dashboard and its metrics gathering infrastructure + CostControl *CostControl `json:"costControl,omitempty"` } // Audit holds the audit configuration options for loft. Changing any options will require a loft restart @@ -288,23 +298,7 @@ type OIDC struct { 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"` + Clients []OIDCClientSpec `json:"clients,omitempty"` } // Authentication holds authentication relevant information @@ -328,6 +322,12 @@ type Authentication struct { // +optional DisableTeamCreation bool `json:"disableTeamCreation,omitempty"` + // DisableUserCreation prevents the SSO connectors from creating a new user on a users initial signin through sso. + // Default behaviour is false, this means that a new user object will be created once a user without + // a Kubernetes user object logs in. + // +optional + DisableUserCreation bool `json:"disableUserCreation,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. @@ -345,6 +345,9 @@ type Authentication struct { // CustomHttpHeaders are additional headers that should be set for the authentication endpoints // +optional CustomHttpHeaders map[string]string `json:"customHttpHeaders,omitempty"` + + // GroupsFilters is a regex expression to only save matching sso groups into the user resource + GroupsFilters []string `json:"groupsFilters,omitempty"` } type AuthenticationRancher struct { @@ -696,3 +699,87 @@ type AuthenticationOIDC struct { // +optional Type string `json:"type,omitempty"` } + +type Cloud struct { + // ReleaseChannel specifies the release channel for the cloud configuration. + // This can be used to determine which updates or versions are applied. + ReleaseChannel string `json:"releaseChannel,omitempty"` + + // MaintenanceWindow specifies the maintenance window for the cloud configuration. + // This is a structured representation of the time window during which maintenance can occur. + MaintenanceWindow MaintenanceWindow `json:"maintenanceWindow,omitempty"` +} + +type MaintenanceWindow struct { + // DayOfWeek specifies the day of the week for the maintenance window. + // It should be a string representing the day, e.g., "Monday", "Tuesday", etc. + DayOfWeek string `json:"dayOfWeek,omitempty"` + + // TimeWindow specifies the time window for the maintenance. + // It should be a string representing the time range in 24-hour format, in UTC, e.g., "02:00-03:00". + TimeWindow string `json:"timeWindow,omitempty"` +} + +type CostControl struct { + // Enabled specifies whether the ROI dashboard should be available in the UI, and if the metrics infrastructure + // that provides dashboard data is deployed + Enabled *bool `json:"enabled,omitempty"` + + // Global are settings for globally managed components + Global CostControlGlobalConfig `json:"global,omitempty"` + + // Cluster are settings for each cluster's managed components. These settings apply to all connected clusters + // unless overridden by modifying the Cluster's spec + Cluster CostControlClusterConfig `json:"cluster,omitempty"` + + // Settings specify price-related settings that are taken into account for the ROI dashboard calculations. + Settings *CostControlSettings `json:"settings,omitempty"` +} + +type CostControlGlobalConfig struct { + // Metrics these settings apply to metric infrastructure used to aggregate metrics across all connected clusters + Metrics *storagev1.Metrics `json:"metrics,omitempty"` +} + +type CostControlClusterConfig struct { + // Metrics are settings applied to metric infrastructure in each connected cluster. These can be overridden in + // individual clusters by modifying the Cluster's spec + Metrics *storagev1.Metrics `json:"metrics,omitempty"` + + // OpenCost are settings applied to OpenCost deployments in each connected cluster. These can be overridden in + // individual clusters by modifying the Cluster's spec + OpenCost *storagev1.OpenCost `json:"opencost,omitempty"` +} + +type CostControlSettings struct { + // PriceCurrency specifies the currency. + PriceCurrency string `json:"priceCurrency,omitempty"` + + // AvgCPUPricePerNode specifies the average CPU price per node. + AvgCPUPricePerNode *CostControlResourcePrice `json:"averageCPUPricePerNode,omitempty"` + + // AvgRAMPricePerNode specifies the average RAM price per node. + AvgRAMPricePerNode *CostControlResourcePrice `json:"averageRAMPricePerNode,omitempty"` + + // GPUSettings specifies GPU related settings. + GPUSettings *CostControlGPUSettings `json:"gpuSettings,omitempty"` + + // ControlPlanePricePerCluster specifies the price of one physical cluster. + ControlPlanePricePerCluster *CostControlResourcePrice `json:"controlPlanePricePerCluster,omitempty"` +} + +type CostControlGPUSettings struct { + // Enabled specifies whether GPU settings should be available in the UI. + Enabled bool `json:"enabled,omitempty"` + + // AvgGPUPrice specifies the average GPU price. + AvgGPUPrice *CostControlResourcePrice `json:"averageGPUPrice,omitempty"` +} + +type CostControlResourcePrice struct { + // Price specifies the price. + Price float64 `json:"price,omitempty"` + + // TimePeriod specifies the time period for the price. + TimePeriod string `json:"timePeriod,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/database_connector_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/database_connector_types.go new file mode 100644 index 00000000..34a75354 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/database_connector_types.go @@ -0,0 +1,32 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DatabaseConnector represents a connector that can be used to provision and manage a backingstore +// for a vCluster +// +k8s:openapi-gen=true +// +resource:path=databaseconnectors,rest=DatabaseConnectorREST +type DatabaseConnector struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DatabaseConnectorSpec `json:"spec,omitempty"` + Status DatabaseConnectorStatus `json:"status,omitempty"` +} + +// DatabaseConnectorSpec holds the specification +type DatabaseConnectorSpec struct { + // The client id of the client + Type string `json:"type,omitempty"` + DisplayName string `json:"displayName,omitempty"` +} + +// DatabaseConnectorStatus holds the status +type DatabaseConnectorStatus struct { +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodenvironmenttemplate_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodenvironmenttemplate_types.go new file mode 100644 index 00000000..b22464aa --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodenvironmenttemplate_types.go @@ -0,0 +1,56 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v4/pkg/apis/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevPodEnvironmentTemplate holds the DevPodEnvironmentTemplate information +// +k8s:openapi-gen=true +// +resource:path=devpodenvironmenttemplates,rest=DevPodEnvironmentTemplateREST +type DevPodEnvironmentTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DevPodEnvironmentTemplateSpec `json:"spec,omitempty"` + Status DevPodEnvironmentTemplateStatus `json:"status,omitempty"` +} + +// DevPodEnvironmentTemplateSpec holds the specification +type DevPodEnvironmentTemplateSpec struct { + storagev1.DevPodEnvironmentTemplateSpec `json:",inline"` +} + +// DevPodEnvironmentTemplateStatus holds the status +type DevPodEnvironmentTemplateStatus struct{} + +func (a *DevPodEnvironmentTemplate) GetVersions() []storagev1.VersionAccessor { + var retVersions []storagev1.VersionAccessor + for _, v := range a.Spec.Versions { + b := v + retVersions = append(retVersions, &b) + } + + return retVersions +} + +func (a *DevPodEnvironmentTemplate) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *DevPodEnvironmentTemplate) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *DevPodEnvironmentTemplate) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *DevPodEnvironmentTemplate) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodworkspaceinstance_troubleshoot_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodworkspaceinstance_troubleshoot_types.go new file mode 100644 index 00000000..33edb58a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodworkspaceinstance_troubleshoot_types.go @@ -0,0 +1,41 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v4/pkg/apis/storage/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type DevPodWorkspaceInstanceTroubleshoot struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // State holds the workspaces state as given by 'devpod export' + // +optional + State string `json:"state,omitempty"` + + // Workspace holds the workspace's instance object data + // +optional + Workspace *DevPodWorkspaceInstance `json:"workspace,omitempty"` + + // Template holds the workspace instance's template used to create it. + // This is the raw template, not the rendered one. + // +optional + Template *storagev1.DevPodWorkspaceTemplate `json:"template,omitempty"` + + // Pods is a list of pod objects that are linked to the workspace. + // +optional + Pods []corev1.Pod `json:"pods,omitempty"` + + // PVCs is a list of PVC objects that are linked to the workspace. + // +optional + PVCs []corev1.PersistentVolumeClaim `json:"pvcs,omitempty"` + + // Errors is a list of errors that occurred while trying to collect + // informations for troubleshooting. + // +optional + Errors []string `json:"errors,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodworkspaceinstance_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodworkspaceinstance_types.go index a77b5498..08db551b 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodworkspaceinstance_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodworkspaceinstance_types.go @@ -11,6 +11,7 @@ import ( // +genclient:noStatus // +genclient:method=GetState,verb=get,subresource=state,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.DevPodWorkspaceInstanceState // +genclient:method=SetState,verb=create,subresource=state,input=github.com/loft-sh/api/v4/pkg/apis/management/v1.DevPodWorkspaceInstanceState,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.DevPodWorkspaceInstanceState +// +genclient:method=Troubleshoot,verb=get,subresource=troubleshoot,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.DevPodWorkspaceInstanceTroubleshoot // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // DevPodWorkspaceInstance holds the DevPodWorkspaceInstance information @@ -22,6 +23,7 @@ import ( // +subresource:request=DevPodStopOptions,path=stop,kind=DevPodStopOptions,rest=DevPodStopOptionsREST // +subresource:request=DevPodStatusOptions,path=getstatus,kind=DevPodStatusOptions,rest=DevPodStatusOptionsREST // +subresource:request=DevPodWorkspaceInstanceState,path=state,kind=DevPodWorkspaceInstanceState,rest=DevPodWorkspaceInstanceStateREST +// +subresource:request=DevPodWorkspaceInstanceTroubleshoot,path=troubleshoot,kind=DevPodWorkspaceInstanceTroubleshoot,rest=DevPodWorkspaceInstanceTroubleshootREST type DevPodWorkspaceInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodworkspacepreset_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodworkspacepreset_types.go new file mode 100644 index 00000000..45b1f912 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/devpodworkspacepreset_types.go @@ -0,0 +1,51 @@ +package v1 + +import ( + storagev1 "github.com/loft-sh/api/v4/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 + +// DevPodWorkspacePreset +// +k8s:openapi-gen=true +// +resource:path=devpodworkspacepresets,rest=DevPodWorkspacePresetREST +type DevPodWorkspacePreset struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DevPodWorkspacePresetSpec `json:"spec,omitempty"` + Status DevPodWorkspacePresetStatus `json:"status,omitempty"` +} + +// DevPodWorkspacePresetSpec holds the specification +type DevPodWorkspacePresetSpec struct { + storagev1.DevPodWorkspacePresetSpec `json:",inline"` +} + +// DevPodWorkspacePresetSource +// +k8s:openapi-gen=true +type DevPodWorkspacePresetSource struct { + storagev1.DevPodWorkspacePresetSource `json:",inline"` +} + +func (a *DevPodWorkspacePreset) GetOwner() *storagev1.UserOrTeam { + return a.Spec.Owner +} + +func (a *DevPodWorkspacePreset) SetOwner(userOrTeam *storagev1.UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *DevPodWorkspacePreset) GetAccess() []storagev1.Access { + return a.Spec.Access +} + +func (a *DevPodWorkspacePreset) SetAccess(access []storagev1.Access) { + a.Spec.Access = access +} + +// DevPodWorkspacePresetStatus holds the status +type DevPodWorkspacePresetStatus struct{} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/oidc_client_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/oidc_client_types.go new file mode 100644 index 00000000..182c4b88 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/oidc_client_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 + +// OIDCClient represents an OIDC client to use with Loft as an OIDC provider +// +k8s:openapi-gen=true +// +resource:path=oidcclients,rest=OIDCClientREST +type OIDCClient struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec OIDCClientSpec `json:"spec,omitempty"` + Status OIDCClientStatus `json:"status,omitempty"` +} + +// OIDCClientSpec holds the specification +type OIDCClientSpec 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"` +} + +// OIDCClientStatus holds the status +type OIDCClientStatus struct { +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_runners_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_runners_types.go new file mode 100644 index 00000000..5e08ca00 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_runners_types.go @@ -0,0 +1,16 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type ProjectRunners struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Runners holds all the allowed runners + Runners []Runner `json:"runners,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_templates_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_templates_types.go index b9d4f81a..6ea1539d 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_templates_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_templates_types.go @@ -28,4 +28,13 @@ type ProjectTemplates struct { // DevPodWorkspaceTemplates holds all the allowed space templates DevPodWorkspaceTemplates []DevPodWorkspaceTemplate `json:"devPodWorkspaceTemplates,omitempty"` + + // DevPodEnvironmentTemplates holds all the allowed environment templates + DevPodEnvironmentTemplates []DevPodEnvironmentTemplate `json:"devPodEnvironmentTemplates,omitempty"` + + // DevPodWorkspacePresets holds all the allowed workspace presets + DevPodWorkspacePresets []DevPodWorkspacePreset `json:"devPodWorkspacePresets,omitempty"` + + // DefaultDevPodEnvironmentTemplate + DefaultDevPodEnvironmentTemplate string `json:"defaultDevPodEnvironmentTemplate,omitempty"` } diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_types.go index 6503839e..00ff81be 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/project_types.go @@ -9,6 +9,7 @@ import ( // +genclient:nonNamespaced // +genclient:method=ListMembers,verb=get,subresource=members,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.ProjectMembers // +genclient:method=ListTemplates,verb=get,subresource=templates,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.ProjectTemplates +// +genclient:method=ListRunners,verb=get,subresource=runners,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.ProjectRunners // +genclient:method=ListClusters,verb=get,subresource=clusters,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.ProjectClusters // +genclient:method=MigrateVirtualClusterInstance,verb=create,subresource=migratevirtualclusterinstance,input=github.com/loft-sh/api/v4/pkg/apis/management/v1.ProjectMigrateVirtualClusterInstance,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.ProjectMigrateVirtualClusterInstance // +genclient:method=ImportSpace,verb=create,subresource=importspace,input=github.com/loft-sh/api/v4/pkg/apis/management/v1.ProjectImportSpace,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.ProjectImportSpace @@ -20,6 +21,7 @@ import ( // +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=ProjectRunners,path=runners,kind=ProjectRunners,rest=ProjectRunnersREST // +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 diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/team_object_permissions_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/team_object_permissions_types.go new file mode 100644 index 00000000..65807d46 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/team_object_permissions_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 TeamObjectPermissions struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + ObjectPermissions []ObjectPermission `json:"objectPermissions,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/team_permissions_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/team_permissions_types.go new file mode 100644 index 00000000..9e74482e --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/team_permissions_types.go @@ -0,0 +1,27 @@ +package v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type TeamPermissions struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Members gives users that are team members + // +optional + Members []ObjectName `json:"members,omitempty"` + + // ProjectMemberships gives information about the team's project membership + ProjectMemberships []ProjectMembership `json:"projectMemberships,omitempty"` + + // ManagementRoles gives information about the team's assigned management roles + ManagementRoles []ManagementRole `json:"managementRoles,omitempty"` + + // ClustersAccessRoles gives information about the team's assigned cluster roles and the clusters they apply to + ClusterAccessRoles []ClusterAccessRole `json:"clusterAccessRoles,omitempty"` + + // VirtualClusterRoles give information about the team's cluster role within the virtual cluster + VirtualClusterRoles []VirtualClusterRole `json:"virtualClusterRoles,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/team_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/team_types.go index 131a1400..44a0fa61 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/team_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/team_types.go @@ -16,6 +16,8 @@ import ( // +resource:path=teams,rest=TeamREST // +subresource:request=TeamClusters,path=clusters,kind=TeamClusters,rest=TeamClustersREST // +subresource:request=TeamAccessKeys,path=accesskeys,kind=TeamAccessKeys,rest=TeamAccessKeysREST +// +subresource:request=TeamPermissions,path=permissions,kind=TeamPermissions,rest=TeamPermissionsREST +// +subresource:request=TeamObjectPermissions,path=object-permissions,kind=TeamObjectPermissions,rest=TeamObjectPermissionsREST type Team struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/translateresourcename_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/translateresourcename_types.go new file mode 100644 index 00000000..265c8f3a --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/translateresourcename_types.go @@ -0,0 +1,39 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TranslateVClusterResourceName holds rename request and response data for given resource +// +k8s:openapi-gen=true +// +resource:path=translatevclusterresourcenames,rest=TranslateVClusterResourceNameREST +type TranslateVClusterResourceName struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TranslateVClusterResourceNameSpec `json:"spec,omitempty"` + Status TranslateVClusterResourceNameStatus `json:"status,omitempty"` +} + +// TranslateVClusterResourceNameSpec holds the specification +type TranslateVClusterResourceNameSpec struct { + // Name is the name of resource we want to rename + Name string `json:"name"` + + // Namespace is the name of namespace in which this resource is running + Namespace string `json:"namespace"` + + // VClusterName is the name of vCluster in which this resource is running + VClusterName string `json:"vclusterName"` +} + +// TranslateVClusterResourceNameStatus holds the status +type TranslateVClusterResourceNameStatus struct { + // Name is the converted name of resource + // +optional + Name string `json:"name,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_object_permissions_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_object_permissions_types.go new file mode 100644 index 00000000..683cff56 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_object_permissions_types.go @@ -0,0 +1,22 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +subresource-request +type UserObjectPermissions struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + ObjectPermissions []ObjectPermission `json:"objectPermissions,omitempty"` +} + +type ObjectPermission struct { + ObjectName `json:",inline"` + + // Verbs is a list of actions allowed by the user on the object. '*' represents all verbs + Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_permissions_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_permissions_types.go index 47787906..71ba7c08 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_permissions_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_permissions_types.go @@ -19,6 +19,22 @@ type UserPermissions struct { // NamespaceRoles that apply to the user. Can be either regular roles or cluster roles that are namespace scoped. // +optional NamespaceRoles []UserPermissionsRole `json:"namespaceRoles,omitempty"` + + // TeamMemberships gives information about the user's team membership + // +optional + TeamMemberships []ObjectName `json:"teamMemberships,omitempty"` + + // ProjectMemberships gives information about the user's project membership + ProjectMemberships []ProjectMembership `json:"projectMemberships,omitempty"` + + // ManagementRoles gives information about the user's assigned management roles + ManagementRoles []ManagementRole `json:"managementRoles,omitempty"` + + // ClustersAccessRoles gives information about the user's assigned cluster roles and the clusters they apply to + ClusterAccessRoles []ClusterAccessRole `json:"clusterAccessRoles,omitempty"` + + // VirtualClusterRoles give information about the user's cluster role within the virtual cluster + VirtualClusterRoles []VirtualClusterRole `json:"virtualClusterRoles,omitempty"` } type UserPermissionsRole struct { @@ -39,3 +55,85 @@ type UserPermissionsRole struct { // +optional Rules []rbacv1.PolicyRule `json:"rules,omitempty"` } + +type ObjectName struct { + // Namespace of the referenced object + // +optional + Namespace string `json:"namespace,omitempty"` + + // Name of the referenced object + // +optional + Name string `json:"name,omitempty"` + + // DisplayName is the name of the object to display in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` +} + +type ProjectMembership struct { + // ObjectName describes the project + ObjectName `json:",inline"` + + // Role is the role given to the member + // +optional + Role ProjectRole `json:"role,omitempty"` + + // AssignedVia describes the resource that establishes the project membership + // +optional + AssignedVia AssignedVia `json:"assignedVia,omitempty"` +} + +type ProjectRole struct { + // ObjectName describes the role + ObjectName `json:",inline"` + + // IsAdmin describes whether this is an admin project role + // +optional + IsAdmin bool `json:"isAdmin,omitempty"` +} + +type ManagementRole struct { + // ObjectName describes the role + ObjectName `json:",inline"` + + // AssignedVia describes the resource that establishes the project membership + // +optional + AssignedVia AssignedVia `json:"assignedVia,omitempty"` +} + +type ClusterAccessRole struct { + // ObjectName describes the role + ObjectName `json:",inline"` + + // Clusters are the clusters that this assigned role applies + Clusters []ObjectName `json:"clusters,omitempty"` + + // AssignedVia describes the resource that establishes the project membership + // +optional + AssignedVia AssignedVia `json:"assignedVia,omitempty"` +} + +type VirtualClusterRole struct { + // ObjectName describes the virtual cluster + ObjectName `json:",inline"` + + // Role is the cluster role inside the virtual cluster. One of cluster-admin, admin, edit, or view + Role string `json:"role,omitempty"` + + // AssignedVia describes the resource that establishes the project membership + // +optional + AssignedVia AssignedVia `json:"assignedVia,omitempty"` +} + +type AssignedVia struct { + // ObjectName describes the name of the resource used to establish the assignment. + ObjectName `json:",inline"` + + // Kind is the type of resource used to establish the assignment. + // One of `User`, `Team`, or `ClusterAccess` + // +optional + Kind string `json:"kind,omitempty"` + + // Owner indicates if the + Owner bool `json:"owner,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_profile_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_profile_types.go index 4a314ccb..04b15900 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_profile_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_profile_types.go @@ -32,4 +32,16 @@ type UserProfile struct { // Custom is custom information that should be saved of the user // +optional Custom string `json:"custom,omitempty"` + // Secrets is a map of secret names to secret data + // +optional + Secrets *map[string]*UserProfileSecret `json:"secrets,omitempty"` +} + +type UserProfileSecret struct { + // Type is the type of the secret + // +optional + Type string `json:"type,omitempty"` + // Data is the data of the secret + // +optional + Data string `json:"data,omitempty"` } diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_types.go index 727fc142..82a82278 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/user_types.go @@ -19,6 +19,7 @@ import ( // +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 +// +subresource:request=UserObjectPermissions,path=object-permissions,kind=UserObjectPermissions,rest=UserObjectPermissionsREST type User struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_convertconfig_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_convertconfig_types.go index f1a892be..50bcb1b3 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_convertconfig_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_convertconfig_types.go @@ -21,6 +21,10 @@ type ConvertVirtualClusterConfig struct { // ConvertVirtualClusterConfigSpec holds the specification type ConvertVirtualClusterConfigSpec struct { + // Annotations are annotations on the virtual cluster + // +optional + Annotations map[string]string `json:"annotations,omitempty"` + // Distro is the distro to be used for the config // +optional Distro string `json:"distro,omitempty"` diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_register_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_register_types.go index 0734cf8c..1c489f90 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_register_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_register_types.go @@ -10,7 +10,7 @@ import ( // RegisterVirtualCluster holds config request and response data for virtual clusters // +k8s:openapi-gen=true -// +resource:path=registervirtualcluster,rest=RegisterVirtualClusterREST +// +resource:path=registervirtualclusters,rest=RegisterVirtualClusterREST type RegisterVirtualCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_schema.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_schema.go new file mode 100644 index 00000000..a85c9eaf --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualcluster_schema.go @@ -0,0 +1,35 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterSchema holds config request and response data for virtual clusters +// +k8s:openapi-gen=true +// +resource:path=virtualclusterschemas,rest=VirtualClusterSchemaREST +type VirtualClusterSchema struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualClusterSchemaSpec `json:"spec,omitempty"` + Status VirtualClusterSchemaStatus `json:"status,omitempty"` +} + +// VirtualClusterSchemaSpec holds the specification +type VirtualClusterSchemaSpec struct { + // Version is the version of the virtual cluster + Version string `json:"version,omitempty"` +} + +// VirtualClusterSchemaStatus holds the status +type VirtualClusterSchemaStatus struct { + // Schema is the schema of the virtual cluster + Schema string `json:"schema,omitempty"` + + // DefaultValues are the default values of the virtual cluster + DefaultValues string `json:"defaultValues,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualclusterinstance_externaldatabase_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualclusterinstance_externaldatabase_types.go new file mode 100644 index 00000000..1fd3701f --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualclusterinstance_externaldatabase_types.go @@ -0,0 +1,34 @@ +package v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VirtualClusterExternalDatabase holds kube config request and response data for virtual clusters +// +subresource-request +type VirtualClusterExternalDatabase struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualClusterExternalDatabaseSpec `json:"spec,omitempty"` + Status VirtualClusterExternalDatabaseStatus `json:"status,omitempty"` +} + +type VirtualClusterExternalDatabaseSpec struct { + // Connector specifies the secret that should be used to connect to an external database server. The connection is + // used to manage a user and database for the vCluster. A data source endpoint constructed from the created user and + // database is returned on status. The secret specified by connector should contain the following fields: + // endpoint - the endpoint where the database server can be accessed + // user - the database username + // password - the password for the database username + // port - the port to be used in conjunction with the endpoint to connect to the databse server. This is commonly + // 3306 + // +optional + Connector string `json:"connector,omitempty"` +} + +type VirtualClusterExternalDatabaseStatus struct { + // DataSource holds a datasource endpoint constructed from the vCluster's designated user and database. The user and + // database are created from the given connector. + DataSource string `json:"dataSource,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualclusterinstance_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualclusterinstance_types.go index 3dc28a2f..c0b87f1a 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualclusterinstance_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/virtualclusterinstance_types.go @@ -11,6 +11,7 @@ import ( // +genclient:noStatus // +genclient:method=GetKubeConfig,verb=create,subresource=kubeconfig,input=github.com/loft-sh/api/v4/pkg/apis/management/v1.VirtualClusterInstanceKubeConfig,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.VirtualClusterInstanceKubeConfig // +genclient:method=GetAccessKey,verb=get,subresource=accesskey,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.VirtualClusterAccessKey +// +genclient:method=GetExternalDatabase,verb=create,subresource=externaldatabase,input=github.com/loft-sh/api/v4/pkg/apis/management/v1.VirtualClusterExternalDatabase,result=github.com/loft-sh/api/v4/pkg/apis/management/v1.VirtualClusterExternalDatabase // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // VirtualClusterInstance holds the VirtualClusterInstance information @@ -19,6 +20,7 @@ import ( // +subresource:request=VirtualClusterInstanceLog,path=log,kind=VirtualClusterInstanceLog,rest=VirtualClusterInstanceLogREST // +subresource:request=VirtualClusterInstanceKubeConfig,path=kubeconfig,kind=VirtualClusterInstanceKubeConfig,rest=VirtualClusterInstanceKubeConfigREST // +subresource:request=VirtualClusterAccessKey,path=accesskey,kind=VirtualClusterAccessKey,rest=VirtualClusterAccessKeyREST +// +subresource:request=VirtualClusterExternalDatabase,path=externaldatabase,kind=VirtualClusterExternalDatabase,rest=VirtualClusterExternalDatabaseREST type VirtualClusterInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.api.register.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.api.register.go index 0a14bf48..3e8db311 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.api.register.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.api.register.go @@ -41,6 +41,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ConfigList{}, &ConvertVirtualClusterConfig{}, &ConvertVirtualClusterConfigList{}, + &DatabaseConnector{}, + &DatabaseConnectorList{}, + &DevPodEnvironmentTemplate{}, + &DevPodEnvironmentTemplateList{}, &DevPodWorkspaceInstance{}, &DevPodWorkspaceInstanceList{}, &DevPodDeleteOptions{}, @@ -48,7 +52,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &DevPodSshOptions{}, &DevPodWorkspaceInstanceState{}, &DevPodStopOptions{}, + &DevPodWorkspaceInstanceTroubleshoot{}, &DevPodUpOptions{}, + &DevPodWorkspacePreset{}, + &DevPodWorkspacePresetList{}, &DevPodWorkspaceTemplate{}, &DevPodWorkspaceTemplateList{}, &DirectClusterEndpointToken{}, @@ -68,6 +75,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &LicenseTokenList{}, &LoftUpgrade{}, &LoftUpgradeList{}, + &OIDCClient{}, + &OIDCClientList{}, &OwnedAccessKey{}, &OwnedAccessKeyList{}, &Project{}, @@ -79,6 +88,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ProjectMembers{}, &ProjectMigrateSpaceInstance{}, &ProjectMigrateVirtualClusterInstance{}, + &ProjectRunners{}, &ProjectTemplates{}, &ProjectSecret{}, &ProjectSecretList{}, @@ -111,17 +121,25 @@ func addKnownTypes(scheme *runtime.Scheme) error { &TeamList{}, &TeamAccessKeys{}, &TeamClusters{}, + &TeamObjectPermissions{}, + &TeamPermissions{}, + &TranslateVClusterResourceName{}, + &TranslateVClusterResourceNameList{}, &User{}, &UserList{}, &UserAccessKeys{}, &UserClusters{}, + &UserObjectPermissions{}, &UserPermissions{}, &UserProfile{}, &VirtualClusterInstance{}, &VirtualClusterInstanceList{}, &VirtualClusterAccessKey{}, + &VirtualClusterExternalDatabase{}, &VirtualClusterInstanceKubeConfig{}, &VirtualClusterInstanceLog{}, + &VirtualClusterSchema{}, + &VirtualClusterSchemaList{}, &VirtualClusterTemplate{}, &VirtualClusterTemplateList{}, ) @@ -137,89 +155,119 @@ var ( management.InternalAppCredentialsREST, func() runtime.Object { return &AppCredentials{} }, // Register versioned resource nil, - management.NewAppCredentialsREST), + management.NewAppCredentialsREST, + ), management.ManagementBackupStorage, builders.NewApiResourceWithStorage( management.InternalBackupApplyREST, func() runtime.Object { return &BackupApply{} }, // Register versioned resource nil, - management.NewBackupApplyREST), + management.NewBackupApplyREST, + ), management.ManagementClusterStorage, + builders.NewApiResourceWithStorage( + management.InternalClusterStatus, + func() runtime.Object { return &Cluster{} }, // Register versioned resource + func() runtime.Object { return &ClusterList{} }, // Register versioned resource list + management.NewClusterStatusREST), builders.NewApiResourceWithStorage( management.InternalClusterAccessKeyREST, func() runtime.Object { return &ClusterAccessKey{} }, // Register versioned resource nil, - management.NewClusterAccessKeyREST), + management.NewClusterAccessKeyREST, + ), builders.NewApiResourceWithStorage( management.InternalClusterAgentConfigREST, func() runtime.Object { return &ClusterAgentConfig{} }, // Register versioned resource nil, - management.NewClusterAgentConfigREST), + management.NewClusterAgentConfigREST, + ), builders.NewApiResourceWithStorage( management.InternalClusterChartsREST, func() runtime.Object { return &ClusterCharts{} }, // Register versioned resource nil, - management.NewClusterChartsREST), + management.NewClusterChartsREST, + ), builders.NewApiResourceWithStorage( management.InternalClusterDomainREST, func() runtime.Object { return &ClusterDomain{} }, // Register versioned resource nil, - management.NewClusterDomainREST), + management.NewClusterDomainREST, + ), builders.NewApiResourceWithStorage( management.InternalClusterMemberAccessREST, func() runtime.Object { return &ClusterMemberAccess{} }, // Register versioned resource nil, - management.NewClusterMemberAccessREST), + management.NewClusterMemberAccessREST, + ), builders.NewApiResourceWithStorage( management.InternalClusterMembersREST, func() runtime.Object { return &ClusterMembers{} }, // Register versioned resource nil, - management.NewClusterMembersREST), + management.NewClusterMembersREST, + ), builders.NewApiResourceWithStorage( management.InternalClusterResetREST, func() runtime.Object { return &ClusterReset{} }, // Register versioned resource nil, - management.NewClusterResetREST), + management.NewClusterResetREST, + ), builders.NewApiResourceWithStorage( management.InternalClusterVirtualClusterDefaultsREST, func() runtime.Object { return &ClusterVirtualClusterDefaults{} }, // Register versioned resource nil, - management.NewClusterVirtualClusterDefaultsREST), + management.NewClusterVirtualClusterDefaultsREST, + ), management.ManagementClusterAccessStorage, management.ManagementClusterRoleTemplateStorage, management.ManagementConfigStorage, management.ManagementConvertVirtualClusterConfigStorage, + management.ManagementDatabaseConnectorStorage, + management.ManagementDevPodEnvironmentTemplateStorage, management.ManagementDevPodWorkspaceInstanceStorage, builders.NewApiResourceWithStorage( management.InternalDevPodDeleteOptionsREST, func() runtime.Object { return &DevPodDeleteOptions{} }, // Register versioned resource nil, - management.NewDevPodDeleteOptionsREST), + management.NewDevPodDeleteOptionsREST, + ), builders.NewApiResourceWithStorage( management.InternalDevPodStatusOptionsREST, func() runtime.Object { return &DevPodStatusOptions{} }, // Register versioned resource nil, - management.NewDevPodStatusOptionsREST), + management.NewDevPodStatusOptionsREST, + ), builders.NewApiResourceWithStorage( management.InternalDevPodSshOptionsREST, func() runtime.Object { return &DevPodSshOptions{} }, // Register versioned resource nil, - management.NewDevPodSshOptionsREST), + management.NewDevPodSshOptionsREST, + ), builders.NewApiResourceWithStorage( management.InternalDevPodWorkspaceInstanceStateREST, func() runtime.Object { return &DevPodWorkspaceInstanceState{} }, // Register versioned resource nil, - management.NewDevPodWorkspaceInstanceStateREST), + management.NewDevPodWorkspaceInstanceStateREST, + ), builders.NewApiResourceWithStorage( management.InternalDevPodStopOptionsREST, func() runtime.Object { return &DevPodStopOptions{} }, // Register versioned resource nil, - management.NewDevPodStopOptionsREST), + management.NewDevPodStopOptionsREST, + ), + builders.NewApiResourceWithStorage( + management.InternalDevPodWorkspaceInstanceTroubleshootREST, + func() runtime.Object { return &DevPodWorkspaceInstanceTroubleshoot{} }, // Register versioned resource + nil, + management.NewDevPodWorkspaceInstanceTroubleshootREST, + ), builders.NewApiResourceWithStorage( management.InternalDevPodUpOptionsREST, func() runtime.Object { return &DevPodUpOptions{} }, // Register versioned resource nil, - management.NewDevPodUpOptionsREST), + management.NewDevPodUpOptionsREST, + ), + management.ManagementDevPodWorkspacePresetStorage, management.ManagementDevPodWorkspaceTemplateStorage, management.ManagementDirectClusterEndpointTokenStorage, management.ManagementEventStorage, @@ -236,9 +284,11 @@ var ( management.InternalLicenseRequestREST, func() runtime.Object { return &LicenseRequest{} }, // Register versioned resource nil, - management.NewLicenseRequestREST), + management.NewLicenseRequestREST, + ), management.ManagementLicenseTokenStorage, management.ManagementLoftUpgradeStorage, + management.ManagementOIDCClientStorage, management.ManagementOwnedAccessKeyStorage, management.ManagementProjectStorage, builders.NewApiResourceWithStorage( @@ -250,42 +300,56 @@ var ( management.InternalProjectChartInfoREST, func() runtime.Object { return &ProjectChartInfo{} }, // Register versioned resource nil, - management.NewProjectChartInfoREST), + management.NewProjectChartInfoREST, + ), builders.NewApiResourceWithStorage( management.InternalProjectChartsREST, func() runtime.Object { return &ProjectCharts{} }, // Register versioned resource nil, - management.NewProjectChartsREST), + management.NewProjectChartsREST, + ), builders.NewApiResourceWithStorage( management.InternalProjectClustersREST, func() runtime.Object { return &ProjectClusters{} }, // Register versioned resource nil, - management.NewProjectClustersREST), + management.NewProjectClustersREST, + ), builders.NewApiResourceWithStorage( management.InternalProjectImportSpaceREST, func() runtime.Object { return &ProjectImportSpace{} }, // Register versioned resource nil, - management.NewProjectImportSpaceREST), + management.NewProjectImportSpaceREST, + ), builders.NewApiResourceWithStorage( management.InternalProjectMembersREST, func() runtime.Object { return &ProjectMembers{} }, // Register versioned resource nil, - management.NewProjectMembersREST), + management.NewProjectMembersREST, + ), builders.NewApiResourceWithStorage( management.InternalProjectMigrateSpaceInstanceREST, func() runtime.Object { return &ProjectMigrateSpaceInstance{} }, // Register versioned resource nil, - management.NewProjectMigrateSpaceInstanceREST), + management.NewProjectMigrateSpaceInstanceREST, + ), builders.NewApiResourceWithStorage( management.InternalProjectMigrateVirtualClusterInstanceREST, func() runtime.Object { return &ProjectMigrateVirtualClusterInstance{} }, // Register versioned resource nil, - management.NewProjectMigrateVirtualClusterInstanceREST), + management.NewProjectMigrateVirtualClusterInstanceREST, + ), + builders.NewApiResourceWithStorage( + management.InternalProjectRunnersREST, + func() runtime.Object { return &ProjectRunners{} }, // Register versioned resource + nil, + management.NewProjectRunnersREST, + ), builders.NewApiResourceWithStorage( management.InternalProjectTemplatesREST, func() runtime.Object { return &ProjectTemplates{} }, // Register versioned resource nil, - management.NewProjectTemplatesREST), + management.NewProjectTemplatesREST, + ), management.ManagementProjectSecretStorage, management.ManagementRedirectTokenStorage, management.ManagementRegisterVirtualClusterStorage, @@ -300,12 +364,14 @@ var ( management.InternalRunnerAccessKeyREST, func() runtime.Object { return &RunnerAccessKey{} }, // Register versioned resource nil, - management.NewRunnerAccessKeyREST), + management.NewRunnerAccessKeyREST, + ), builders.NewApiResourceWithStorage( management.InternalRunnerConfigREST, func() runtime.Object { return &RunnerConfig{} }, // Register versioned resource nil, - management.NewRunnerConfigREST), + management.NewRunnerConfigREST, + ), management.ManagementSelfStorage, management.ManagementSelfSubjectAccessReviewStorage, management.ManagementSharedSecretStorage, @@ -317,55 +383,91 @@ var ( management.InternalTaskLogREST, func() runtime.Object { return &TaskLog{} }, // Register versioned resource nil, - management.NewTaskLogREST), + management.NewTaskLogREST, + ), management.ManagementTeamStorage, builders.NewApiResourceWithStorage( management.InternalTeamAccessKeysREST, func() runtime.Object { return &TeamAccessKeys{} }, // Register versioned resource nil, - management.NewTeamAccessKeysREST), + management.NewTeamAccessKeysREST, + ), builders.NewApiResourceWithStorage( management.InternalTeamClustersREST, func() runtime.Object { return &TeamClusters{} }, // Register versioned resource nil, - management.NewTeamClustersREST), + management.NewTeamClustersREST, + ), + builders.NewApiResourceWithStorage( + management.InternalTeamObjectPermissionsREST, + func() runtime.Object { return &TeamObjectPermissions{} }, // Register versioned resource + nil, + management.NewTeamObjectPermissionsREST, + ), + builders.NewApiResourceWithStorage( + management.InternalTeamPermissionsREST, + func() runtime.Object { return &TeamPermissions{} }, // Register versioned resource + nil, + management.NewTeamPermissionsREST, + ), + management.ManagementTranslateVClusterResourceNameStorage, management.ManagementUserStorage, builders.NewApiResourceWithStorage( management.InternalUserAccessKeysREST, func() runtime.Object { return &UserAccessKeys{} }, // Register versioned resource nil, - management.NewUserAccessKeysREST), + management.NewUserAccessKeysREST, + ), builders.NewApiResourceWithStorage( management.InternalUserClustersREST, func() runtime.Object { return &UserClusters{} }, // Register versioned resource nil, - management.NewUserClustersREST), + management.NewUserClustersREST, + ), + builders.NewApiResourceWithStorage( + management.InternalUserObjectPermissionsREST, + func() runtime.Object { return &UserObjectPermissions{} }, // Register versioned resource + nil, + management.NewUserObjectPermissionsREST, + ), builders.NewApiResourceWithStorage( management.InternalUserPermissionsREST, func() runtime.Object { return &UserPermissions{} }, // Register versioned resource nil, - management.NewUserPermissionsREST), + management.NewUserPermissionsREST, + ), builders.NewApiResourceWithStorage( management.InternalUserProfileREST, func() runtime.Object { return &UserProfile{} }, // Register versioned resource nil, - management.NewUserProfileREST), + management.NewUserProfileREST, + ), management.ManagementVirtualClusterInstanceStorage, builders.NewApiResourceWithStorage( management.InternalVirtualClusterAccessKeyREST, func() runtime.Object { return &VirtualClusterAccessKey{} }, // Register versioned resource nil, - management.NewVirtualClusterAccessKeyREST), + management.NewVirtualClusterAccessKeyREST, + ), + builders.NewApiResourceWithStorage( + management.InternalVirtualClusterExternalDatabaseREST, + func() runtime.Object { return &VirtualClusterExternalDatabase{} }, // Register versioned resource + nil, + management.NewVirtualClusterExternalDatabaseREST, + ), builders.NewApiResourceWithStorage( management.InternalVirtualClusterInstanceKubeConfigREST, func() runtime.Object { return &VirtualClusterInstanceKubeConfig{} }, // Register versioned resource nil, - management.NewVirtualClusterInstanceKubeConfigREST), + management.NewVirtualClusterInstanceKubeConfigREST, + ), builders.NewApiResourceWithStorage( management.InternalVirtualClusterInstanceLogREST, func() runtime.Object { return &VirtualClusterInstanceLog{} }, // Register versioned resource nil, - management.NewVirtualClusterInstanceLogREST), + management.NewVirtualClusterInstanceLogREST, + ), + management.ManagementVirtualClusterSchemaStorage, management.ManagementVirtualClusterTemplateStorage, ) @@ -552,6 +654,22 @@ type ConvertVirtualClusterConfigList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type DatabaseConnectorList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DatabaseConnector `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodEnvironmentTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodEnvironmentTemplate `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type DevPodWorkspaceInstanceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -600,6 +718,14 @@ type DevPodStopOptionsList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type DevPodWorkspaceInstanceTroubleshootList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstanceTroubleshoot `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type DevPodUpOptionsList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -608,6 +734,14 @@ type DevPodUpOptionsList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type DevPodWorkspacePresetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspacePreset `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type DevPodWorkspaceTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -688,6 +822,14 @@ type LoftUpgradeList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OIDCClient `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type OwnedAccessKeyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -760,6 +902,14 @@ type ProjectMigrateVirtualClusterInstanceList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type ProjectRunnersList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectRunners `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type ProjectTemplatesList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -912,6 +1062,30 @@ type TeamClustersList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type TeamObjectPermissionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TeamObjectPermissions `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamPermissionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TeamPermissions `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TranslateVClusterResourceNameList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TranslateVClusterResourceName `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type UserList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -936,6 +1110,14 @@ type UserClustersList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type UserObjectPermissionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []UserObjectPermissions `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type UserPermissionsList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -968,6 +1150,14 @@ type VirtualClusterAccessKeyList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualClusterExternalDatabaseList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterExternalDatabase `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type VirtualClusterInstanceKubeConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -984,6 +1174,14 @@ type VirtualClusterInstanceLogList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualClusterSchemaList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterSchema `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type VirtualClusterTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.conversion.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.conversion.go index 006752aa..d8dfa056 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.conversion.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.conversion.go @@ -16,6 +16,7 @@ import ( management "github.com/loft-sh/api/v4/pkg/apis/management" storagev1 "github.com/loft-sh/api/v4/pkg/apis/storage/v1" uiv1 "github.com/loft-sh/api/v4/pkg/apis/ui/v1" + corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" @@ -89,6 +90,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*AgentCostControlConfig)(nil), (*management.AgentCostControlConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AgentCostControlConfig_To_management_AgentCostControlConfig(a.(*AgentCostControlConfig), b.(*management.AgentCostControlConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AgentCostControlConfig)(nil), (*AgentCostControlConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AgentCostControlConfig_To_v1_AgentCostControlConfig(a.(*management.AgentCostControlConfig), b.(*AgentCostControlConfig), 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 { @@ -199,6 +210,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*AssignedVia)(nil), (*management.AssignedVia)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_AssignedVia_To_management_AssignedVia(a.(*AssignedVia), b.(*management.AssignedVia), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.AssignedVia)(nil), (*AssignedVia)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_AssignedVia_To_v1_AssignedVia(a.(*management.AssignedVia), b.(*AssignedVia), 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 { @@ -399,6 +420,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*Cloud)(nil), (*management.Cloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Cloud_To_management_Cloud(a.(*Cloud), b.(*management.Cloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.Cloud)(nil), (*Cloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_Cloud_To_v1_Cloud(a.(*management.Cloud), b.(*Cloud), 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 { @@ -449,6 +480,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*ClusterAccessRole)(nil), (*management.ClusterAccessRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ClusterAccessRole_To_management_ClusterAccessRole(a.(*ClusterAccessRole), b.(*management.ClusterAccessRole), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ClusterAccessRole)(nil), (*ClusterAccessRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ClusterAccessRole_To_v1_ClusterAccessRole(a.(*management.ClusterAccessRole), b.(*ClusterAccessRole), 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 { @@ -809,6 +850,106 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*CostControl)(nil), (*management.CostControl)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CostControl_To_management_CostControl(a.(*CostControl), b.(*management.CostControl), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.CostControl)(nil), (*CostControl)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_CostControl_To_v1_CostControl(a.(*management.CostControl), b.(*CostControl), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CostControlClusterConfig)(nil), (*management.CostControlClusterConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CostControlClusterConfig_To_management_CostControlClusterConfig(a.(*CostControlClusterConfig), b.(*management.CostControlClusterConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.CostControlClusterConfig)(nil), (*CostControlClusterConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_CostControlClusterConfig_To_v1_CostControlClusterConfig(a.(*management.CostControlClusterConfig), b.(*CostControlClusterConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CostControlGPUSettings)(nil), (*management.CostControlGPUSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CostControlGPUSettings_To_management_CostControlGPUSettings(a.(*CostControlGPUSettings), b.(*management.CostControlGPUSettings), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.CostControlGPUSettings)(nil), (*CostControlGPUSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_CostControlGPUSettings_To_v1_CostControlGPUSettings(a.(*management.CostControlGPUSettings), b.(*CostControlGPUSettings), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CostControlGlobalConfig)(nil), (*management.CostControlGlobalConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CostControlGlobalConfig_To_management_CostControlGlobalConfig(a.(*CostControlGlobalConfig), b.(*management.CostControlGlobalConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.CostControlGlobalConfig)(nil), (*CostControlGlobalConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_CostControlGlobalConfig_To_v1_CostControlGlobalConfig(a.(*management.CostControlGlobalConfig), b.(*CostControlGlobalConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CostControlResourcePrice)(nil), (*management.CostControlResourcePrice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CostControlResourcePrice_To_management_CostControlResourcePrice(a.(*CostControlResourcePrice), b.(*management.CostControlResourcePrice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.CostControlResourcePrice)(nil), (*CostControlResourcePrice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_CostControlResourcePrice_To_v1_CostControlResourcePrice(a.(*management.CostControlResourcePrice), b.(*CostControlResourcePrice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CostControlSettings)(nil), (*management.CostControlSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CostControlSettings_To_management_CostControlSettings(a.(*CostControlSettings), b.(*management.CostControlSettings), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.CostControlSettings)(nil), (*CostControlSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_CostControlSettings_To_v1_CostControlSettings(a.(*management.CostControlSettings), b.(*CostControlSettings), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DatabaseConnector)(nil), (*management.DatabaseConnector)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DatabaseConnector_To_management_DatabaseConnector(a.(*DatabaseConnector), b.(*management.DatabaseConnector), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DatabaseConnector)(nil), (*DatabaseConnector)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DatabaseConnector_To_v1_DatabaseConnector(a.(*management.DatabaseConnector), b.(*DatabaseConnector), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DatabaseConnectorList)(nil), (*management.DatabaseConnectorList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DatabaseConnectorList_To_management_DatabaseConnectorList(a.(*DatabaseConnectorList), b.(*management.DatabaseConnectorList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DatabaseConnectorList)(nil), (*DatabaseConnectorList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DatabaseConnectorList_To_v1_DatabaseConnectorList(a.(*management.DatabaseConnectorList), b.(*DatabaseConnectorList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DatabaseConnectorSpec)(nil), (*management.DatabaseConnectorSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DatabaseConnectorSpec_To_management_DatabaseConnectorSpec(a.(*DatabaseConnectorSpec), b.(*management.DatabaseConnectorSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DatabaseConnectorSpec)(nil), (*DatabaseConnectorSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DatabaseConnectorSpec_To_v1_DatabaseConnectorSpec(a.(*management.DatabaseConnectorSpec), b.(*DatabaseConnectorSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DatabaseConnectorStatus)(nil), (*management.DatabaseConnectorStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DatabaseConnectorStatus_To_management_DatabaseConnectorStatus(a.(*DatabaseConnectorStatus), b.(*management.DatabaseConnectorStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DatabaseConnectorStatus)(nil), (*DatabaseConnectorStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DatabaseConnectorStatus_To_v1_DatabaseConnectorStatus(a.(*management.DatabaseConnectorStatus), b.(*DatabaseConnectorStatus), 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 { @@ -829,6 +970,46 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*DevPodEnvironmentTemplate)(nil), (*management.DevPodEnvironmentTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodEnvironmentTemplate_To_management_DevPodEnvironmentTemplate(a.(*DevPodEnvironmentTemplate), b.(*management.DevPodEnvironmentTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodEnvironmentTemplate)(nil), (*DevPodEnvironmentTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodEnvironmentTemplate_To_v1_DevPodEnvironmentTemplate(a.(*management.DevPodEnvironmentTemplate), b.(*DevPodEnvironmentTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodEnvironmentTemplateList)(nil), (*management.DevPodEnvironmentTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodEnvironmentTemplateList_To_management_DevPodEnvironmentTemplateList(a.(*DevPodEnvironmentTemplateList), b.(*management.DevPodEnvironmentTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodEnvironmentTemplateList)(nil), (*DevPodEnvironmentTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodEnvironmentTemplateList_To_v1_DevPodEnvironmentTemplateList(a.(*management.DevPodEnvironmentTemplateList), b.(*DevPodEnvironmentTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodEnvironmentTemplateSpec)(nil), (*management.DevPodEnvironmentTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodEnvironmentTemplateSpec_To_management_DevPodEnvironmentTemplateSpec(a.(*DevPodEnvironmentTemplateSpec), b.(*management.DevPodEnvironmentTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodEnvironmentTemplateSpec)(nil), (*DevPodEnvironmentTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodEnvironmentTemplateSpec_To_v1_DevPodEnvironmentTemplateSpec(a.(*management.DevPodEnvironmentTemplateSpec), b.(*DevPodEnvironmentTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodEnvironmentTemplateStatus)(nil), (*management.DevPodEnvironmentTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodEnvironmentTemplateStatus_To_management_DevPodEnvironmentTemplateStatus(a.(*DevPodEnvironmentTemplateStatus), b.(*management.DevPodEnvironmentTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodEnvironmentTemplateStatus)(nil), (*DevPodEnvironmentTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodEnvironmentTemplateStatus_To_v1_DevPodEnvironmentTemplateStatus(a.(*management.DevPodEnvironmentTemplateStatus), b.(*DevPodEnvironmentTemplateStatus), 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 { @@ -969,6 +1150,66 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceTroubleshoot)(nil), (*management.DevPodWorkspaceInstanceTroubleshoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceTroubleshoot_To_management_DevPodWorkspaceInstanceTroubleshoot(a.(*DevPodWorkspaceInstanceTroubleshoot), b.(*management.DevPodWorkspaceInstanceTroubleshoot), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceTroubleshoot)(nil), (*DevPodWorkspaceInstanceTroubleshoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceTroubleshoot_To_v1_DevPodWorkspaceInstanceTroubleshoot(a.(*management.DevPodWorkspaceInstanceTroubleshoot), b.(*DevPodWorkspaceInstanceTroubleshoot), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspaceInstanceTroubleshootList)(nil), (*management.DevPodWorkspaceInstanceTroubleshootList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspaceInstanceTroubleshootList_To_management_DevPodWorkspaceInstanceTroubleshootList(a.(*DevPodWorkspaceInstanceTroubleshootList), b.(*management.DevPodWorkspaceInstanceTroubleshootList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspaceInstanceTroubleshootList)(nil), (*DevPodWorkspaceInstanceTroubleshootList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspaceInstanceTroubleshootList_To_v1_DevPodWorkspaceInstanceTroubleshootList(a.(*management.DevPodWorkspaceInstanceTroubleshootList), b.(*DevPodWorkspaceInstanceTroubleshootList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspacePreset)(nil), (*management.DevPodWorkspacePreset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspacePreset_To_management_DevPodWorkspacePreset(a.(*DevPodWorkspacePreset), b.(*management.DevPodWorkspacePreset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspacePreset)(nil), (*DevPodWorkspacePreset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspacePreset_To_v1_DevPodWorkspacePreset(a.(*management.DevPodWorkspacePreset), b.(*DevPodWorkspacePreset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspacePresetList)(nil), (*management.DevPodWorkspacePresetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspacePresetList_To_management_DevPodWorkspacePresetList(a.(*DevPodWorkspacePresetList), b.(*management.DevPodWorkspacePresetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspacePresetList)(nil), (*DevPodWorkspacePresetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspacePresetList_To_v1_DevPodWorkspacePresetList(a.(*management.DevPodWorkspacePresetList), b.(*DevPodWorkspacePresetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspacePresetSpec)(nil), (*management.DevPodWorkspacePresetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspacePresetSpec_To_management_DevPodWorkspacePresetSpec(a.(*DevPodWorkspacePresetSpec), b.(*management.DevPodWorkspacePresetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspacePresetSpec)(nil), (*DevPodWorkspacePresetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspacePresetSpec_To_v1_DevPodWorkspacePresetSpec(a.(*management.DevPodWorkspacePresetSpec), b.(*DevPodWorkspacePresetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DevPodWorkspacePresetStatus)(nil), (*management.DevPodWorkspacePresetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_DevPodWorkspacePresetStatus_To_management_DevPodWorkspacePresetStatus(a.(*DevPodWorkspacePresetStatus), b.(*management.DevPodWorkspacePresetStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.DevPodWorkspacePresetStatus)(nil), (*DevPodWorkspacePresetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_DevPodWorkspacePresetStatus_To_v1_DevPodWorkspacePresetStatus(a.(*management.DevPodWorkspacePresetStatus), b.(*DevPodWorkspacePresetStatus), 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 { @@ -1379,6 +1620,26 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*MaintenanceWindow)(nil), (*management.MaintenanceWindow)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_MaintenanceWindow_To_management_MaintenanceWindow(a.(*MaintenanceWindow), b.(*management.MaintenanceWindow), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.MaintenanceWindow)(nil), (*MaintenanceWindow)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_MaintenanceWindow_To_v1_MaintenanceWindow(a.(*management.MaintenanceWindow), b.(*MaintenanceWindow), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagementRole)(nil), (*management.ManagementRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ManagementRole_To_management_ManagementRole(a.(*ManagementRole), b.(*management.ManagementRole), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ManagementRole)(nil), (*ManagementRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ManagementRole_To_v1_ManagementRole(a.(*management.ManagementRole), b.(*ManagementRole), 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 { @@ -1399,6 +1660,56 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*OIDCClientList)(nil), (*management.OIDCClientList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_OIDCClientList_To_management_OIDCClientList(a.(*OIDCClientList), b.(*management.OIDCClientList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.OIDCClientList)(nil), (*OIDCClientList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_OIDCClientList_To_v1_OIDCClientList(a.(*management.OIDCClientList), b.(*OIDCClientList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSpec)(nil), (*management.OIDCClientSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_OIDCClientSpec_To_management_OIDCClientSpec(a.(*OIDCClientSpec), b.(*management.OIDCClientSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.OIDCClientSpec)(nil), (*OIDCClientSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_OIDCClientSpec_To_v1_OIDCClientSpec(a.(*management.OIDCClientSpec), b.(*OIDCClientSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientStatus)(nil), (*management.OIDCClientStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_OIDCClientStatus_To_management_OIDCClientStatus(a.(*OIDCClientStatus), b.(*management.OIDCClientStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.OIDCClientStatus)(nil), (*OIDCClientStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_OIDCClientStatus_To_v1_OIDCClientStatus(a.(*management.OIDCClientStatus), b.(*OIDCClientStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ObjectName)(nil), (*management.ObjectName)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ObjectName_To_management_ObjectName(a.(*ObjectName), b.(*management.ObjectName), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ObjectName)(nil), (*ObjectName)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ObjectName_To_v1_ObjectName(a.(*management.ObjectName), b.(*ObjectName), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ObjectPermission)(nil), (*management.ObjectPermission)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ObjectPermission_To_management_ObjectPermission(a.(*ObjectPermission), b.(*management.ObjectPermission), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ObjectPermission)(nil), (*ObjectPermission)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ObjectPermission_To_v1_ObjectPermission(a.(*management.ObjectPermission), b.(*ObjectPermission), 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 { @@ -1609,6 +1920,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*ProjectMembership)(nil), (*management.ProjectMembership)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectMembership_To_management_ProjectMembership(a.(*ProjectMembership), b.(*management.ProjectMembership), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectMembership)(nil), (*ProjectMembership)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectMembership_To_v1_ProjectMembership(a.(*management.ProjectMembership), b.(*ProjectMembership), 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 { @@ -1669,6 +1990,36 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*ProjectRole)(nil), (*management.ProjectRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectRole_To_management_ProjectRole(a.(*ProjectRole), b.(*management.ProjectRole), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectRole)(nil), (*ProjectRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectRole_To_v1_ProjectRole(a.(*management.ProjectRole), b.(*ProjectRole), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectRunners)(nil), (*management.ProjectRunners)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectRunners_To_management_ProjectRunners(a.(*ProjectRunners), b.(*management.ProjectRunners), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectRunners)(nil), (*ProjectRunners)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectRunners_To_v1_ProjectRunners(a.(*management.ProjectRunners), b.(*ProjectRunners), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectRunnersList)(nil), (*management.ProjectRunnersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ProjectRunnersList_To_management_ProjectRunnersList(a.(*ProjectRunnersList), b.(*management.ProjectRunnersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.ProjectRunnersList)(nil), (*ProjectRunnersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_ProjectRunnersList_To_v1_ProjectRunnersList(a.(*management.ProjectRunnersList), b.(*ProjectRunnersList), 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 { @@ -2319,98 +2670,198 @@ func RegisterConversions(s *runtime.Scheme) error { }); 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) + if err := s.AddGeneratedConversionFunc((*TeamObjectPermissions)(nil), (*management.TeamObjectPermissions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamObjectPermissions_To_management_TeamObjectPermissions(a.(*TeamObjectPermissions), b.(*management.TeamObjectPermissions), 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) + if err := s.AddGeneratedConversionFunc((*management.TeamObjectPermissions)(nil), (*TeamObjectPermissions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamObjectPermissions_To_v1_TeamObjectPermissions(a.(*management.TeamObjectPermissions), b.(*TeamObjectPermissions), 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) + if err := s.AddGeneratedConversionFunc((*TeamObjectPermissionsList)(nil), (*management.TeamObjectPermissionsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamObjectPermissionsList_To_management_TeamObjectPermissionsList(a.(*TeamObjectPermissionsList), b.(*management.TeamObjectPermissionsList), 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) + if err := s.AddGeneratedConversionFunc((*management.TeamObjectPermissionsList)(nil), (*TeamObjectPermissionsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamObjectPermissionsList_To_v1_TeamObjectPermissionsList(a.(*management.TeamObjectPermissionsList), b.(*TeamObjectPermissionsList), 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) + if err := s.AddGeneratedConversionFunc((*TeamPermissions)(nil), (*management.TeamPermissions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamPermissions_To_management_TeamPermissions(a.(*TeamPermissions), b.(*management.TeamPermissions), 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) + if err := s.AddGeneratedConversionFunc((*management.TeamPermissions)(nil), (*TeamPermissions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamPermissions_To_v1_TeamPermissions(a.(*management.TeamPermissions), b.(*TeamPermissions), 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) + if err := s.AddGeneratedConversionFunc((*TeamPermissionsList)(nil), (*management.TeamPermissionsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TeamPermissionsList_To_management_TeamPermissionsList(a.(*TeamPermissionsList), b.(*management.TeamPermissionsList), 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) + if err := s.AddGeneratedConversionFunc((*management.TeamPermissionsList)(nil), (*TeamPermissionsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TeamPermissionsList_To_v1_TeamPermissionsList(a.(*management.TeamPermissionsList), b.(*TeamPermissionsList), 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) + 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.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) + 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((*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) + 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.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) + 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((*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) + if err := s.AddGeneratedConversionFunc((*TranslateVClusterResourceName)(nil), (*management.TranslateVClusterResourceName)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TranslateVClusterResourceName_To_management_TranslateVClusterResourceName(a.(*TranslateVClusterResourceName), b.(*management.TranslateVClusterResourceName), 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) + if err := s.AddGeneratedConversionFunc((*management.TranslateVClusterResourceName)(nil), (*TranslateVClusterResourceName)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TranslateVClusterResourceName_To_v1_TranslateVClusterResourceName(a.(*management.TranslateVClusterResourceName), b.(*TranslateVClusterResourceName), 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) + if err := s.AddGeneratedConversionFunc((*TranslateVClusterResourceNameList)(nil), (*management.TranslateVClusterResourceNameList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TranslateVClusterResourceNameList_To_management_TranslateVClusterResourceNameList(a.(*TranslateVClusterResourceNameList), b.(*management.TranslateVClusterResourceNameList), 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) + if err := s.AddGeneratedConversionFunc((*management.TranslateVClusterResourceNameList)(nil), (*TranslateVClusterResourceNameList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TranslateVClusterResourceNameList_To_v1_TranslateVClusterResourceNameList(a.(*management.TranslateVClusterResourceNameList), b.(*TranslateVClusterResourceNameList), 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) + if err := s.AddGeneratedConversionFunc((*TranslateVClusterResourceNameSpec)(nil), (*management.TranslateVClusterResourceNameSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TranslateVClusterResourceNameSpec_To_management_TranslateVClusterResourceNameSpec(a.(*TranslateVClusterResourceNameSpec), b.(*management.TranslateVClusterResourceNameSpec), 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) + if err := s.AddGeneratedConversionFunc((*management.TranslateVClusterResourceNameSpec)(nil), (*TranslateVClusterResourceNameSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TranslateVClusterResourceNameSpec_To_v1_TranslateVClusterResourceNameSpec(a.(*management.TranslateVClusterResourceNameSpec), b.(*TranslateVClusterResourceNameSpec), 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) + if err := s.AddGeneratedConversionFunc((*TranslateVClusterResourceNameStatus)(nil), (*management.TranslateVClusterResourceNameStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TranslateVClusterResourceNameStatus_To_management_TranslateVClusterResourceNameStatus(a.(*TranslateVClusterResourceNameStatus), b.(*management.TranslateVClusterResourceNameStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.TranslateVClusterResourceNameStatus)(nil), (*TranslateVClusterResourceNameStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_TranslateVClusterResourceNameStatus_To_v1_TranslateVClusterResourceNameStatus(a.(*management.TranslateVClusterResourceNameStatus), b.(*TranslateVClusterResourceNameStatus), 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((*UserObjectPermissions)(nil), (*management.UserObjectPermissions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserObjectPermissions_To_management_UserObjectPermissions(a.(*UserObjectPermissions), b.(*management.UserObjectPermissions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserObjectPermissions)(nil), (*UserObjectPermissions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserObjectPermissions_To_v1_UserObjectPermissions(a.(*management.UserObjectPermissions), b.(*UserObjectPermissions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UserObjectPermissionsList)(nil), (*management.UserObjectPermissionsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserObjectPermissionsList_To_management_UserObjectPermissionsList(a.(*UserObjectPermissionsList), b.(*management.UserObjectPermissionsList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserObjectPermissionsList)(nil), (*UserObjectPermissionsList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserObjectPermissionsList_To_v1_UserObjectPermissionsList(a.(*management.UserObjectPermissionsList), b.(*UserObjectPermissionsList), 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 } @@ -2459,6 +2910,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*UserProfileSecret)(nil), (*management.UserProfileSecret)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_UserProfileSecret_To_management_UserProfileSecret(a.(*UserProfileSecret), b.(*management.UserProfileSecret), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.UserProfileSecret)(nil), (*UserProfileSecret)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_UserProfileSecret_To_v1_UserProfileSecret(a.(*management.UserProfileSecret), b.(*UserProfileSecret), 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 { @@ -2529,6 +2990,46 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*VirtualClusterExternalDatabase)(nil), (*management.VirtualClusterExternalDatabase)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterExternalDatabase_To_management_VirtualClusterExternalDatabase(a.(*VirtualClusterExternalDatabase), b.(*management.VirtualClusterExternalDatabase), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterExternalDatabase)(nil), (*VirtualClusterExternalDatabase)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterExternalDatabase_To_v1_VirtualClusterExternalDatabase(a.(*management.VirtualClusterExternalDatabase), b.(*VirtualClusterExternalDatabase), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterExternalDatabaseList)(nil), (*management.VirtualClusterExternalDatabaseList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterExternalDatabaseList_To_management_VirtualClusterExternalDatabaseList(a.(*VirtualClusterExternalDatabaseList), b.(*management.VirtualClusterExternalDatabaseList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterExternalDatabaseList)(nil), (*VirtualClusterExternalDatabaseList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterExternalDatabaseList_To_v1_VirtualClusterExternalDatabaseList(a.(*management.VirtualClusterExternalDatabaseList), b.(*VirtualClusterExternalDatabaseList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterExternalDatabaseSpec)(nil), (*management.VirtualClusterExternalDatabaseSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterExternalDatabaseSpec_To_management_VirtualClusterExternalDatabaseSpec(a.(*VirtualClusterExternalDatabaseSpec), b.(*management.VirtualClusterExternalDatabaseSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterExternalDatabaseSpec)(nil), (*VirtualClusterExternalDatabaseSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterExternalDatabaseSpec_To_v1_VirtualClusterExternalDatabaseSpec(a.(*management.VirtualClusterExternalDatabaseSpec), b.(*VirtualClusterExternalDatabaseSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterExternalDatabaseStatus)(nil), (*management.VirtualClusterExternalDatabaseStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterExternalDatabaseStatus_To_management_VirtualClusterExternalDatabaseStatus(a.(*VirtualClusterExternalDatabaseStatus), b.(*management.VirtualClusterExternalDatabaseStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterExternalDatabaseStatus)(nil), (*VirtualClusterExternalDatabaseStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterExternalDatabaseStatus_To_v1_VirtualClusterExternalDatabaseStatus(a.(*management.VirtualClusterExternalDatabaseStatus), b.(*VirtualClusterExternalDatabaseStatus), 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 { @@ -2639,6 +3140,56 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*VirtualClusterRole)(nil), (*management.VirtualClusterRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterRole_To_management_VirtualClusterRole(a.(*VirtualClusterRole), b.(*management.VirtualClusterRole), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterRole)(nil), (*VirtualClusterRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterRole_To_v1_VirtualClusterRole(a.(*management.VirtualClusterRole), b.(*VirtualClusterRole), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterSchema)(nil), (*management.VirtualClusterSchema)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterSchema_To_management_VirtualClusterSchema(a.(*VirtualClusterSchema), b.(*management.VirtualClusterSchema), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterSchema)(nil), (*VirtualClusterSchema)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterSchema_To_v1_VirtualClusterSchema(a.(*management.VirtualClusterSchema), b.(*VirtualClusterSchema), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterSchemaList)(nil), (*management.VirtualClusterSchemaList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterSchemaList_To_management_VirtualClusterSchemaList(a.(*VirtualClusterSchemaList), b.(*management.VirtualClusterSchemaList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterSchemaList)(nil), (*VirtualClusterSchemaList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterSchemaList_To_v1_VirtualClusterSchemaList(a.(*management.VirtualClusterSchemaList), b.(*VirtualClusterSchemaList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterSchemaSpec)(nil), (*management.VirtualClusterSchemaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterSchemaSpec_To_management_VirtualClusterSchemaSpec(a.(*VirtualClusterSchemaSpec), b.(*management.VirtualClusterSchemaSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterSchemaSpec)(nil), (*VirtualClusterSchemaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterSchemaSpec_To_v1_VirtualClusterSchemaSpec(a.(*management.VirtualClusterSchemaSpec), b.(*VirtualClusterSchemaSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VirtualClusterSchemaStatus)(nil), (*management.VirtualClusterSchemaStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VirtualClusterSchemaStatus_To_management_VirtualClusterSchemaStatus(a.(*VirtualClusterSchemaStatus), b.(*management.VirtualClusterSchemaStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*management.VirtualClusterSchemaStatus)(nil), (*VirtualClusterSchemaStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_management_VirtualClusterSchemaStatus_To_v1_VirtualClusterSchemaStatus(a.(*management.VirtualClusterSchemaStatus), b.(*VirtualClusterSchemaStatus), 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 { @@ -2889,6 +3440,32 @@ func Convert_management_AgentAuditEventStatus_To_v1_AgentAuditEventStatus(in *ma return autoConvert_management_AgentAuditEventStatus_To_v1_AgentAuditEventStatus(in, out, s) } +func autoConvert_v1_AgentCostControlConfig_To_management_AgentCostControlConfig(in *AgentCostControlConfig, out *management.AgentCostControlConfig, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + if err := Convert_v1_CostControlClusterConfig_To_management_CostControlClusterConfig(&in.CostControlClusterConfig, &out.CostControlClusterConfig, s); err != nil { + return err + } + return nil +} + +// Convert_v1_AgentCostControlConfig_To_management_AgentCostControlConfig is an autogenerated conversion function. +func Convert_v1_AgentCostControlConfig_To_management_AgentCostControlConfig(in *AgentCostControlConfig, out *management.AgentCostControlConfig, s conversion.Scope) error { + return autoConvert_v1_AgentCostControlConfig_To_management_AgentCostControlConfig(in, out, s) +} + +func autoConvert_management_AgentCostControlConfig_To_v1_AgentCostControlConfig(in *management.AgentCostControlConfig, out *AgentCostControlConfig, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + if err := Convert_management_CostControlClusterConfig_To_v1_CostControlClusterConfig(&in.CostControlClusterConfig, &out.CostControlClusterConfig, s); err != nil { + return err + } + return nil +} + +// Convert_management_AgentCostControlConfig_To_v1_AgentCostControlConfig is an autogenerated conversion function. +func Convert_management_AgentCostControlConfig_To_v1_AgentCostControlConfig(in *management.AgentCostControlConfig, out *AgentCostControlConfig, s conversion.Scope) error { + return autoConvert_management_AgentCostControlConfig_To_v1_AgentCostControlConfig(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 { @@ -3143,6 +3720,34 @@ func Convert_management_Apps_To_v1_Apps(in *management.Apps, out *Apps, s conver return autoConvert_management_Apps_To_v1_Apps(in, out, s) } +func autoConvert_v1_AssignedVia_To_management_AssignedVia(in *AssignedVia, out *management.AssignedVia, s conversion.Scope) error { + if err := Convert_v1_ObjectName_To_management_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + out.Kind = in.Kind + out.Owner = in.Owner + return nil +} + +// Convert_v1_AssignedVia_To_management_AssignedVia is an autogenerated conversion function. +func Convert_v1_AssignedVia_To_management_AssignedVia(in *AssignedVia, out *management.AssignedVia, s conversion.Scope) error { + return autoConvert_v1_AssignedVia_To_management_AssignedVia(in, out, s) +} + +func autoConvert_management_AssignedVia_To_v1_AssignedVia(in *management.AssignedVia, out *AssignedVia, s conversion.Scope) error { + if err := Convert_management_ObjectName_To_v1_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + out.Kind = in.Kind + out.Owner = in.Owner + return nil +} + +// Convert_management_AssignedVia_To_v1_AssignedVia is an autogenerated conversion function. +func Convert_management_AssignedVia_To_v1_AssignedVia(in *management.AssignedVia, out *AssignedVia, s conversion.Scope) error { + return autoConvert_management_AssignedVia_To_v1_AssignedVia(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 @@ -3255,9 +3860,11 @@ func autoConvert_v1_Authentication_To_management_Authentication(in *Authenticati out.Password = (*management.AuthenticationPassword)(unsafe.Pointer(in.Password)) out.Connectors = *(*[]management.ConnectorWithName)(unsafe.Pointer(&in.Connectors)) out.DisableTeamCreation = in.DisableTeamCreation + out.DisableUserCreation = in.DisableUserCreation out.AccessKeyMaxTTLSeconds = in.AccessKeyMaxTTLSeconds out.LoginAccessKeyTTLSeconds = (*int64)(unsafe.Pointer(in.LoginAccessKeyTTLSeconds)) out.CustomHttpHeaders = *(*map[string]string)(unsafe.Pointer(&in.CustomHttpHeaders)) + out.GroupsFilters = *(*[]string)(unsafe.Pointer(&in.GroupsFilters)) return nil } @@ -3274,9 +3881,11 @@ func autoConvert_management_Authentication_To_v1_Authentication(in *management.A out.Password = (*AuthenticationPassword)(unsafe.Pointer(in.Password)) out.Connectors = *(*[]ConnectorWithName)(unsafe.Pointer(&in.Connectors)) out.DisableTeamCreation = in.DisableTeamCreation + out.DisableUserCreation = in.DisableUserCreation out.AccessKeyMaxTTLSeconds = in.AccessKeyMaxTTLSeconds out.LoginAccessKeyTTLSeconds = (*int64)(unsafe.Pointer(in.LoginAccessKeyTTLSeconds)) out.CustomHttpHeaders = *(*map[string]string)(unsafe.Pointer(&in.CustomHttpHeaders)) + out.GroupsFilters = *(*[]string)(unsafe.Pointer(&in.GroupsFilters)) return nil } @@ -3746,6 +4355,32 @@ func Convert_management_BackupStatus_To_v1_BackupStatus(in *management.BackupSta return autoConvert_management_BackupStatus_To_v1_BackupStatus(in, out, s) } +func autoConvert_v1_Cloud_To_management_Cloud(in *Cloud, out *management.Cloud, s conversion.Scope) error { + out.ReleaseChannel = in.ReleaseChannel + if err := Convert_v1_MaintenanceWindow_To_management_MaintenanceWindow(&in.MaintenanceWindow, &out.MaintenanceWindow, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Cloud_To_management_Cloud is an autogenerated conversion function. +func Convert_v1_Cloud_To_management_Cloud(in *Cloud, out *management.Cloud, s conversion.Scope) error { + return autoConvert_v1_Cloud_To_management_Cloud(in, out, s) +} + +func autoConvert_management_Cloud_To_v1_Cloud(in *management.Cloud, out *Cloud, s conversion.Scope) error { + out.ReleaseChannel = in.ReleaseChannel + if err := Convert_management_MaintenanceWindow_To_v1_MaintenanceWindow(&in.MaintenanceWindow, &out.MaintenanceWindow, s); err != nil { + return err + } + return nil +} + +// Convert_management_Cloud_To_v1_Cloud is an autogenerated conversion function. +func Convert_management_Cloud_To_v1_Cloud(in *management.Cloud, out *Cloud, s conversion.Scope) error { + return autoConvert_management_Cloud_To_v1_Cloud(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 { @@ -3882,6 +4517,38 @@ func Convert_management_ClusterAccessList_To_v1_ClusterAccessList(in *management return autoConvert_management_ClusterAccessList_To_v1_ClusterAccessList(in, out, s) } +func autoConvert_v1_ClusterAccessRole_To_management_ClusterAccessRole(in *ClusterAccessRole, out *management.ClusterAccessRole, s conversion.Scope) error { + if err := Convert_v1_ObjectName_To_management_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + out.Clusters = *(*[]management.ObjectName)(unsafe.Pointer(&in.Clusters)) + if err := Convert_v1_AssignedVia_To_management_AssignedVia(&in.AssignedVia, &out.AssignedVia, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ClusterAccessRole_To_management_ClusterAccessRole is an autogenerated conversion function. +func Convert_v1_ClusterAccessRole_To_management_ClusterAccessRole(in *ClusterAccessRole, out *management.ClusterAccessRole, s conversion.Scope) error { + return autoConvert_v1_ClusterAccessRole_To_management_ClusterAccessRole(in, out, s) +} + +func autoConvert_management_ClusterAccessRole_To_v1_ClusterAccessRole(in *management.ClusterAccessRole, out *ClusterAccessRole, s conversion.Scope) error { + if err := Convert_management_ObjectName_To_v1_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + out.Clusters = *(*[]ObjectName)(unsafe.Pointer(&in.Clusters)) + if err := Convert_management_AssignedVia_To_v1_AssignedVia(&in.AssignedVia, &out.AssignedVia, s); err != nil { + return err + } + return nil +} + +// Convert_management_ClusterAccessRole_To_v1_ClusterAccessRole is an autogenerated conversion function. +func Convert_management_ClusterAccessRole_To_v1_ClusterAccessRole(in *management.ClusterAccessRole, out *ClusterAccessRole, s conversion.Scope) error { + return autoConvert_management_ClusterAccessRole_To_v1_ClusterAccessRole(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 @@ -3987,6 +4654,7 @@ func autoConvert_v1_ClusterAgentConfigCommon_To_management_ClusterAgentConfigCom if err := Convert_v1_AgentAnalyticsSpec_To_management_AgentAnalyticsSpec(&in.AnalyticsSpec, &out.AnalyticsSpec, s); err != nil { return err } + out.CostControl = (*management.AgentCostControlConfig)(unsafe.Pointer(in.CostControl)) return nil } @@ -4006,6 +4674,7 @@ func autoConvert_management_ClusterAgentConfigCommon_To_v1_ClusterAgentConfigCom if err := Convert_management_AgentAnalyticsSpec_To_v1_AgentAnalyticsSpec(&in.AnalyticsSpec, &out.AnalyticsSpec, s); err != nil { return err } + out.CostControl = (*AgentCostControlConfig)(unsafe.Pointer(in.CostControl)) return nil } @@ -4582,6 +5251,9 @@ func autoConvert_v1_ConfigStatus_To_management_ConfigStatus(in *ConfigStatus, ou out.DevPodSubDomain = in.DevPodSubDomain out.UISettings = (*uiv1.UISettingsConfig)(unsafe.Pointer(in.UISettings)) out.VaultIntegration = (*storagev1.VaultIntegrationSpec)(unsafe.Pointer(in.VaultIntegration)) + out.DisableConfigEndpoint = in.DisableConfigEndpoint + out.Cloud = (*management.Cloud)(unsafe.Pointer(in.Cloud)) + out.CostControl = (*management.CostControl)(unsafe.Pointer(in.CostControl)) return nil } @@ -4602,6 +5274,9 @@ func autoConvert_management_ConfigStatus_To_v1_ConfigStatus(in *management.Confi out.DevPodSubDomain = in.DevPodSubDomain out.UISettings = (*uiv1.UISettingsConfig)(unsafe.Pointer(in.UISettings)) out.VaultIntegration = (*storagev1.VaultIntegrationSpec)(unsafe.Pointer(in.VaultIntegration)) + out.DisableConfigEndpoint = in.DisableConfigEndpoint + out.Cloud = (*Cloud)(unsafe.Pointer(in.Cloud)) + out.CostControl = (*CostControl)(unsafe.Pointer(in.CostControl)) return nil } @@ -4723,6 +5398,7 @@ func Convert_management_ConvertVirtualClusterConfigList_To_v1_ConvertVirtualClus } func autoConvert_v1_ConvertVirtualClusterConfigSpec_To_management_ConvertVirtualClusterConfigSpec(in *ConvertVirtualClusterConfigSpec, out *management.ConvertVirtualClusterConfigSpec, s conversion.Scope) error { + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) out.Distro = in.Distro out.Values = in.Values return nil @@ -4734,6 +5410,7 @@ func Convert_v1_ConvertVirtualClusterConfigSpec_To_management_ConvertVirtualClus } func autoConvert_management_ConvertVirtualClusterConfigSpec_To_v1_ConvertVirtualClusterConfigSpec(in *management.ConvertVirtualClusterConfigSpec, out *ConvertVirtualClusterConfigSpec, s conversion.Scope) error { + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) out.Distro = in.Distro out.Values = in.Values return nil @@ -4766,68 +5443,402 @@ func Convert_management_ConvertVirtualClusterConfigStatus_To_v1_ConvertVirtualCl return autoConvert_management_ConvertVirtualClusterConfigStatus_To_v1_ConvertVirtualClusterConfigStatus(in, out, s) } -func autoConvert_v1_DevPodDeleteOptions_To_management_DevPodDeleteOptions(in *DevPodDeleteOptions, out *management.DevPodDeleteOptions, s conversion.Scope) error { - out.Options = in.Options +func autoConvert_v1_CostControl_To_management_CostControl(in *CostControl, out *management.CostControl, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + if err := Convert_v1_CostControlGlobalConfig_To_management_CostControlGlobalConfig(&in.Global, &out.Global, s); err != nil { + return err + } + if err := Convert_v1_CostControlClusterConfig_To_management_CostControlClusterConfig(&in.Cluster, &out.Cluster, s); err != nil { + return err + } + out.Settings = (*management.CostControlSettings)(unsafe.Pointer(in.Settings)) 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) +// Convert_v1_CostControl_To_management_CostControl is an autogenerated conversion function. +func Convert_v1_CostControl_To_management_CostControl(in *CostControl, out *management.CostControl, s conversion.Scope) error { + return autoConvert_v1_CostControl_To_management_CostControl(in, out, s) } -func autoConvert_management_DevPodDeleteOptions_To_v1_DevPodDeleteOptions(in *management.DevPodDeleteOptions, out *DevPodDeleteOptions, s conversion.Scope) error { - out.Options = in.Options +func autoConvert_management_CostControl_To_v1_CostControl(in *management.CostControl, out *CostControl, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + if err := Convert_management_CostControlGlobalConfig_To_v1_CostControlGlobalConfig(&in.Global, &out.Global, s); err != nil { + return err + } + if err := Convert_management_CostControlClusterConfig_To_v1_CostControlClusterConfig(&in.Cluster, &out.Cluster, s); err != nil { + return err + } + out.Settings = (*CostControlSettings)(unsafe.Pointer(in.Settings)) 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) +// Convert_management_CostControl_To_v1_CostControl is an autogenerated conversion function. +func Convert_management_CostControl_To_v1_CostControl(in *management.CostControl, out *CostControl, s conversion.Scope) error { + return autoConvert_management_CostControl_To_v1_CostControl(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 = "" - } +func autoConvert_v1_CostControlClusterConfig_To_management_CostControlClusterConfig(in *CostControlClusterConfig, out *management.CostControlClusterConfig, s conversion.Scope) error { + out.Metrics = (*storagev1.Metrics)(unsafe.Pointer(in.Metrics)) + out.OpenCost = (*storagev1.OpenCost)(unsafe.Pointer(in.OpenCost)) 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) +// Convert_v1_CostControlClusterConfig_To_management_CostControlClusterConfig is an autogenerated conversion function. +func Convert_v1_CostControlClusterConfig_To_management_CostControlClusterConfig(in *CostControlClusterConfig, out *management.CostControlClusterConfig, s conversion.Scope) error { + return autoConvert_v1_CostControlClusterConfig_To_management_CostControlClusterConfig(in, out, s) } -func autoConvert_v1_DevPodDeleteOptionsList_To_management_DevPodDeleteOptionsList(in *DevPodDeleteOptionsList, out *management.DevPodDeleteOptionsList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]management.DevPodDeleteOptions)(unsafe.Pointer(&in.Items)) +func autoConvert_management_CostControlClusterConfig_To_v1_CostControlClusterConfig(in *management.CostControlClusterConfig, out *CostControlClusterConfig, s conversion.Scope) error { + out.Metrics = (*storagev1.Metrics)(unsafe.Pointer(in.Metrics)) + out.OpenCost = (*storagev1.OpenCost)(unsafe.Pointer(in.OpenCost)) return nil } -// Convert_v1_DevPodDeleteOptionsList_To_management_DevPodDeleteOptionsList is an autogenerated conversion function. -func Convert_v1_DevPodDeleteOptionsList_To_management_DevPodDeleteOptionsList(in *DevPodDeleteOptionsList, out *management.DevPodDeleteOptionsList, s conversion.Scope) error { - return autoConvert_v1_DevPodDeleteOptionsList_To_management_DevPodDeleteOptionsList(in, out, s) +// Convert_management_CostControlClusterConfig_To_v1_CostControlClusterConfig is an autogenerated conversion function. +func Convert_management_CostControlClusterConfig_To_v1_CostControlClusterConfig(in *management.CostControlClusterConfig, out *CostControlClusterConfig, s conversion.Scope) error { + return autoConvert_management_CostControlClusterConfig_To_v1_CostControlClusterConfig(in, out, s) } -func autoConvert_management_DevPodDeleteOptionsList_To_v1_DevPodDeleteOptionsList(in *management.DevPodDeleteOptionsList, out *DevPodDeleteOptionsList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]DevPodDeleteOptions)(unsafe.Pointer(&in.Items)) +func autoConvert_v1_CostControlGPUSettings_To_management_CostControlGPUSettings(in *CostControlGPUSettings, out *management.CostControlGPUSettings, s conversion.Scope) error { + out.Enabled = in.Enabled + out.AvgGPUPrice = (*management.CostControlResourcePrice)(unsafe.Pointer(in.AvgGPUPrice)) return nil } -// Convert_management_DevPodDeleteOptionsList_To_v1_DevPodDeleteOptionsList is an autogenerated conversion function. -func Convert_management_DevPodDeleteOptionsList_To_v1_DevPodDeleteOptionsList(in *management.DevPodDeleteOptionsList, out *DevPodDeleteOptionsList, s conversion.Scope) error { - return autoConvert_management_DevPodDeleteOptionsList_To_v1_DevPodDeleteOptionsList(in, out, s) +// Convert_v1_CostControlGPUSettings_To_management_CostControlGPUSettings is an autogenerated conversion function. +func Convert_v1_CostControlGPUSettings_To_management_CostControlGPUSettings(in *CostControlGPUSettings, out *management.CostControlGPUSettings, s conversion.Scope) error { + return autoConvert_v1_CostControlGPUSettings_To_management_CostControlGPUSettings(in, out, s) } -func autoConvert_v1_DevPodSshOptions_To_management_DevPodSshOptions(in *DevPodSshOptions, out *management.DevPodSshOptions, s conversion.Scope) error { - out.Options = in.Options +func autoConvert_management_CostControlGPUSettings_To_v1_CostControlGPUSettings(in *management.CostControlGPUSettings, out *CostControlGPUSettings, s conversion.Scope) error { + out.Enabled = in.Enabled + out.AvgGPUPrice = (*CostControlResourcePrice)(unsafe.Pointer(in.AvgGPUPrice)) + return nil +} + +// Convert_management_CostControlGPUSettings_To_v1_CostControlGPUSettings is an autogenerated conversion function. +func Convert_management_CostControlGPUSettings_To_v1_CostControlGPUSettings(in *management.CostControlGPUSettings, out *CostControlGPUSettings, s conversion.Scope) error { + return autoConvert_management_CostControlGPUSettings_To_v1_CostControlGPUSettings(in, out, s) +} + +func autoConvert_v1_CostControlGlobalConfig_To_management_CostControlGlobalConfig(in *CostControlGlobalConfig, out *management.CostControlGlobalConfig, s conversion.Scope) error { + out.Metrics = (*storagev1.Metrics)(unsafe.Pointer(in.Metrics)) + return nil +} + +// Convert_v1_CostControlGlobalConfig_To_management_CostControlGlobalConfig is an autogenerated conversion function. +func Convert_v1_CostControlGlobalConfig_To_management_CostControlGlobalConfig(in *CostControlGlobalConfig, out *management.CostControlGlobalConfig, s conversion.Scope) error { + return autoConvert_v1_CostControlGlobalConfig_To_management_CostControlGlobalConfig(in, out, s) +} + +func autoConvert_management_CostControlGlobalConfig_To_v1_CostControlGlobalConfig(in *management.CostControlGlobalConfig, out *CostControlGlobalConfig, s conversion.Scope) error { + out.Metrics = (*storagev1.Metrics)(unsafe.Pointer(in.Metrics)) + return nil +} + +// Convert_management_CostControlGlobalConfig_To_v1_CostControlGlobalConfig is an autogenerated conversion function. +func Convert_management_CostControlGlobalConfig_To_v1_CostControlGlobalConfig(in *management.CostControlGlobalConfig, out *CostControlGlobalConfig, s conversion.Scope) error { + return autoConvert_management_CostControlGlobalConfig_To_v1_CostControlGlobalConfig(in, out, s) +} + +func autoConvert_v1_CostControlResourcePrice_To_management_CostControlResourcePrice(in *CostControlResourcePrice, out *management.CostControlResourcePrice, s conversion.Scope) error { + out.Price = in.Price + out.TimePeriod = in.TimePeriod + return nil +} + +// Convert_v1_CostControlResourcePrice_To_management_CostControlResourcePrice is an autogenerated conversion function. +func Convert_v1_CostControlResourcePrice_To_management_CostControlResourcePrice(in *CostControlResourcePrice, out *management.CostControlResourcePrice, s conversion.Scope) error { + return autoConvert_v1_CostControlResourcePrice_To_management_CostControlResourcePrice(in, out, s) +} + +func autoConvert_management_CostControlResourcePrice_To_v1_CostControlResourcePrice(in *management.CostControlResourcePrice, out *CostControlResourcePrice, s conversion.Scope) error { + out.Price = in.Price + out.TimePeriod = in.TimePeriod + return nil +} + +// Convert_management_CostControlResourcePrice_To_v1_CostControlResourcePrice is an autogenerated conversion function. +func Convert_management_CostControlResourcePrice_To_v1_CostControlResourcePrice(in *management.CostControlResourcePrice, out *CostControlResourcePrice, s conversion.Scope) error { + return autoConvert_management_CostControlResourcePrice_To_v1_CostControlResourcePrice(in, out, s) +} + +func autoConvert_v1_CostControlSettings_To_management_CostControlSettings(in *CostControlSettings, out *management.CostControlSettings, s conversion.Scope) error { + out.PriceCurrency = in.PriceCurrency + out.AvgCPUPricePerNode = (*management.CostControlResourcePrice)(unsafe.Pointer(in.AvgCPUPricePerNode)) + out.AvgRAMPricePerNode = (*management.CostControlResourcePrice)(unsafe.Pointer(in.AvgRAMPricePerNode)) + out.GPUSettings = (*management.CostControlGPUSettings)(unsafe.Pointer(in.GPUSettings)) + out.ControlPlanePricePerCluster = (*management.CostControlResourcePrice)(unsafe.Pointer(in.ControlPlanePricePerCluster)) + return nil +} + +// Convert_v1_CostControlSettings_To_management_CostControlSettings is an autogenerated conversion function. +func Convert_v1_CostControlSettings_To_management_CostControlSettings(in *CostControlSettings, out *management.CostControlSettings, s conversion.Scope) error { + return autoConvert_v1_CostControlSettings_To_management_CostControlSettings(in, out, s) +} + +func autoConvert_management_CostControlSettings_To_v1_CostControlSettings(in *management.CostControlSettings, out *CostControlSettings, s conversion.Scope) error { + out.PriceCurrency = in.PriceCurrency + out.AvgCPUPricePerNode = (*CostControlResourcePrice)(unsafe.Pointer(in.AvgCPUPricePerNode)) + out.AvgRAMPricePerNode = (*CostControlResourcePrice)(unsafe.Pointer(in.AvgRAMPricePerNode)) + out.GPUSettings = (*CostControlGPUSettings)(unsafe.Pointer(in.GPUSettings)) + out.ControlPlanePricePerCluster = (*CostControlResourcePrice)(unsafe.Pointer(in.ControlPlanePricePerCluster)) + return nil +} + +// Convert_management_CostControlSettings_To_v1_CostControlSettings is an autogenerated conversion function. +func Convert_management_CostControlSettings_To_v1_CostControlSettings(in *management.CostControlSettings, out *CostControlSettings, s conversion.Scope) error { + return autoConvert_management_CostControlSettings_To_v1_CostControlSettings(in, out, s) +} + +func autoConvert_v1_DatabaseConnector_To_management_DatabaseConnector(in *DatabaseConnector, out *management.DatabaseConnector, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_DatabaseConnectorSpec_To_management_DatabaseConnectorSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_DatabaseConnectorStatus_To_management_DatabaseConnectorStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_DatabaseConnector_To_management_DatabaseConnector is an autogenerated conversion function. +func Convert_v1_DatabaseConnector_To_management_DatabaseConnector(in *DatabaseConnector, out *management.DatabaseConnector, s conversion.Scope) error { + return autoConvert_v1_DatabaseConnector_To_management_DatabaseConnector(in, out, s) +} + +func autoConvert_management_DatabaseConnector_To_v1_DatabaseConnector(in *management.DatabaseConnector, out *DatabaseConnector, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_DatabaseConnectorSpec_To_v1_DatabaseConnectorSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_DatabaseConnectorStatus_To_v1_DatabaseConnectorStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_DatabaseConnector_To_v1_DatabaseConnector is an autogenerated conversion function. +func Convert_management_DatabaseConnector_To_v1_DatabaseConnector(in *management.DatabaseConnector, out *DatabaseConnector, s conversion.Scope) error { + return autoConvert_management_DatabaseConnector_To_v1_DatabaseConnector(in, out, s) +} + +func autoConvert_v1_DatabaseConnectorList_To_management_DatabaseConnectorList(in *DatabaseConnectorList, out *management.DatabaseConnectorList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DatabaseConnector)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DatabaseConnectorList_To_management_DatabaseConnectorList is an autogenerated conversion function. +func Convert_v1_DatabaseConnectorList_To_management_DatabaseConnectorList(in *DatabaseConnectorList, out *management.DatabaseConnectorList, s conversion.Scope) error { + return autoConvert_v1_DatabaseConnectorList_To_management_DatabaseConnectorList(in, out, s) +} + +func autoConvert_management_DatabaseConnectorList_To_v1_DatabaseConnectorList(in *management.DatabaseConnectorList, out *DatabaseConnectorList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DatabaseConnector)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DatabaseConnectorList_To_v1_DatabaseConnectorList is an autogenerated conversion function. +func Convert_management_DatabaseConnectorList_To_v1_DatabaseConnectorList(in *management.DatabaseConnectorList, out *DatabaseConnectorList, s conversion.Scope) error { + return autoConvert_management_DatabaseConnectorList_To_v1_DatabaseConnectorList(in, out, s) +} + +func autoConvert_v1_DatabaseConnectorSpec_To_management_DatabaseConnectorSpec(in *DatabaseConnectorSpec, out *management.DatabaseConnectorSpec, s conversion.Scope) error { + out.Type = in.Type + out.DisplayName = in.DisplayName + return nil +} + +// Convert_v1_DatabaseConnectorSpec_To_management_DatabaseConnectorSpec is an autogenerated conversion function. +func Convert_v1_DatabaseConnectorSpec_To_management_DatabaseConnectorSpec(in *DatabaseConnectorSpec, out *management.DatabaseConnectorSpec, s conversion.Scope) error { + return autoConvert_v1_DatabaseConnectorSpec_To_management_DatabaseConnectorSpec(in, out, s) +} + +func autoConvert_management_DatabaseConnectorSpec_To_v1_DatabaseConnectorSpec(in *management.DatabaseConnectorSpec, out *DatabaseConnectorSpec, s conversion.Scope) error { + out.Type = in.Type + out.DisplayName = in.DisplayName + return nil +} + +// Convert_management_DatabaseConnectorSpec_To_v1_DatabaseConnectorSpec is an autogenerated conversion function. +func Convert_management_DatabaseConnectorSpec_To_v1_DatabaseConnectorSpec(in *management.DatabaseConnectorSpec, out *DatabaseConnectorSpec, s conversion.Scope) error { + return autoConvert_management_DatabaseConnectorSpec_To_v1_DatabaseConnectorSpec(in, out, s) +} + +func autoConvert_v1_DatabaseConnectorStatus_To_management_DatabaseConnectorStatus(in *DatabaseConnectorStatus, out *management.DatabaseConnectorStatus, s conversion.Scope) error { + return nil +} + +// Convert_v1_DatabaseConnectorStatus_To_management_DatabaseConnectorStatus is an autogenerated conversion function. +func Convert_v1_DatabaseConnectorStatus_To_management_DatabaseConnectorStatus(in *DatabaseConnectorStatus, out *management.DatabaseConnectorStatus, s conversion.Scope) error { + return autoConvert_v1_DatabaseConnectorStatus_To_management_DatabaseConnectorStatus(in, out, s) +} + +func autoConvert_management_DatabaseConnectorStatus_To_v1_DatabaseConnectorStatus(in *management.DatabaseConnectorStatus, out *DatabaseConnectorStatus, s conversion.Scope) error { + return nil +} + +// Convert_management_DatabaseConnectorStatus_To_v1_DatabaseConnectorStatus is an autogenerated conversion function. +func Convert_management_DatabaseConnectorStatus_To_v1_DatabaseConnectorStatus(in *management.DatabaseConnectorStatus, out *DatabaseConnectorStatus, s conversion.Scope) error { + return autoConvert_management_DatabaseConnectorStatus_To_v1_DatabaseConnectorStatus(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_DevPodDeleteOptionsList_To_management_DevPodDeleteOptionsList(in *DevPodDeleteOptionsList, out *management.DevPodDeleteOptionsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodDeleteOptions)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodDeleteOptionsList_To_management_DevPodDeleteOptionsList is an autogenerated conversion function. +func Convert_v1_DevPodDeleteOptionsList_To_management_DevPodDeleteOptionsList(in *DevPodDeleteOptionsList, out *management.DevPodDeleteOptionsList, s conversion.Scope) error { + return autoConvert_v1_DevPodDeleteOptionsList_To_management_DevPodDeleteOptionsList(in, out, s) +} + +func autoConvert_management_DevPodDeleteOptionsList_To_v1_DevPodDeleteOptionsList(in *management.DevPodDeleteOptionsList, out *DevPodDeleteOptionsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodDeleteOptions)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodDeleteOptionsList_To_v1_DevPodDeleteOptionsList is an autogenerated conversion function. +func Convert_management_DevPodDeleteOptionsList_To_v1_DevPodDeleteOptionsList(in *management.DevPodDeleteOptionsList, out *DevPodDeleteOptionsList, s conversion.Scope) error { + return autoConvert_management_DevPodDeleteOptionsList_To_v1_DevPodDeleteOptionsList(in, out, s) +} + +func autoConvert_v1_DevPodEnvironmentTemplate_To_management_DevPodEnvironmentTemplate(in *DevPodEnvironmentTemplate, out *management.DevPodEnvironmentTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_DevPodEnvironmentTemplateSpec_To_management_DevPodEnvironmentTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_DevPodEnvironmentTemplateStatus_To_management_DevPodEnvironmentTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_DevPodEnvironmentTemplate_To_management_DevPodEnvironmentTemplate is an autogenerated conversion function. +func Convert_v1_DevPodEnvironmentTemplate_To_management_DevPodEnvironmentTemplate(in *DevPodEnvironmentTemplate, out *management.DevPodEnvironmentTemplate, s conversion.Scope) error { + return autoConvert_v1_DevPodEnvironmentTemplate_To_management_DevPodEnvironmentTemplate(in, out, s) +} + +func autoConvert_management_DevPodEnvironmentTemplate_To_v1_DevPodEnvironmentTemplate(in *management.DevPodEnvironmentTemplate, out *DevPodEnvironmentTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_DevPodEnvironmentTemplateSpec_To_v1_DevPodEnvironmentTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_DevPodEnvironmentTemplateStatus_To_v1_DevPodEnvironmentTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_DevPodEnvironmentTemplate_To_v1_DevPodEnvironmentTemplate is an autogenerated conversion function. +func Convert_management_DevPodEnvironmentTemplate_To_v1_DevPodEnvironmentTemplate(in *management.DevPodEnvironmentTemplate, out *DevPodEnvironmentTemplate, s conversion.Scope) error { + return autoConvert_management_DevPodEnvironmentTemplate_To_v1_DevPodEnvironmentTemplate(in, out, s) +} + +func autoConvert_v1_DevPodEnvironmentTemplateList_To_management_DevPodEnvironmentTemplateList(in *DevPodEnvironmentTemplateList, out *management.DevPodEnvironmentTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodEnvironmentTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodEnvironmentTemplateList_To_management_DevPodEnvironmentTemplateList is an autogenerated conversion function. +func Convert_v1_DevPodEnvironmentTemplateList_To_management_DevPodEnvironmentTemplateList(in *DevPodEnvironmentTemplateList, out *management.DevPodEnvironmentTemplateList, s conversion.Scope) error { + return autoConvert_v1_DevPodEnvironmentTemplateList_To_management_DevPodEnvironmentTemplateList(in, out, s) +} + +func autoConvert_management_DevPodEnvironmentTemplateList_To_v1_DevPodEnvironmentTemplateList(in *management.DevPodEnvironmentTemplateList, out *DevPodEnvironmentTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodEnvironmentTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodEnvironmentTemplateList_To_v1_DevPodEnvironmentTemplateList is an autogenerated conversion function. +func Convert_management_DevPodEnvironmentTemplateList_To_v1_DevPodEnvironmentTemplateList(in *management.DevPodEnvironmentTemplateList, out *DevPodEnvironmentTemplateList, s conversion.Scope) error { + return autoConvert_management_DevPodEnvironmentTemplateList_To_v1_DevPodEnvironmentTemplateList(in, out, s) +} + +func autoConvert_v1_DevPodEnvironmentTemplateSpec_To_management_DevPodEnvironmentTemplateSpec(in *DevPodEnvironmentTemplateSpec, out *management.DevPodEnvironmentTemplateSpec, s conversion.Scope) error { + out.DevPodEnvironmentTemplateSpec = in.DevPodEnvironmentTemplateSpec + return nil +} + +// Convert_v1_DevPodEnvironmentTemplateSpec_To_management_DevPodEnvironmentTemplateSpec is an autogenerated conversion function. +func Convert_v1_DevPodEnvironmentTemplateSpec_To_management_DevPodEnvironmentTemplateSpec(in *DevPodEnvironmentTemplateSpec, out *management.DevPodEnvironmentTemplateSpec, s conversion.Scope) error { + return autoConvert_v1_DevPodEnvironmentTemplateSpec_To_management_DevPodEnvironmentTemplateSpec(in, out, s) +} + +func autoConvert_management_DevPodEnvironmentTemplateSpec_To_v1_DevPodEnvironmentTemplateSpec(in *management.DevPodEnvironmentTemplateSpec, out *DevPodEnvironmentTemplateSpec, s conversion.Scope) error { + out.DevPodEnvironmentTemplateSpec = in.DevPodEnvironmentTemplateSpec + return nil +} + +// Convert_management_DevPodEnvironmentTemplateSpec_To_v1_DevPodEnvironmentTemplateSpec is an autogenerated conversion function. +func Convert_management_DevPodEnvironmentTemplateSpec_To_v1_DevPodEnvironmentTemplateSpec(in *management.DevPodEnvironmentTemplateSpec, out *DevPodEnvironmentTemplateSpec, s conversion.Scope) error { + return autoConvert_management_DevPodEnvironmentTemplateSpec_To_v1_DevPodEnvironmentTemplateSpec(in, out, s) +} + +func autoConvert_v1_DevPodEnvironmentTemplateStatus_To_management_DevPodEnvironmentTemplateStatus(in *DevPodEnvironmentTemplateStatus, out *management.DevPodEnvironmentTemplateStatus, s conversion.Scope) error { + return nil +} + +// Convert_v1_DevPodEnvironmentTemplateStatus_To_management_DevPodEnvironmentTemplateStatus is an autogenerated conversion function. +func Convert_v1_DevPodEnvironmentTemplateStatus_To_management_DevPodEnvironmentTemplateStatus(in *DevPodEnvironmentTemplateStatus, out *management.DevPodEnvironmentTemplateStatus, s conversion.Scope) error { + return autoConvert_v1_DevPodEnvironmentTemplateStatus_To_management_DevPodEnvironmentTemplateStatus(in, out, s) +} + +func autoConvert_management_DevPodEnvironmentTemplateStatus_To_v1_DevPodEnvironmentTemplateStatus(in *management.DevPodEnvironmentTemplateStatus, out *DevPodEnvironmentTemplateStatus, s conversion.Scope) error { + return nil +} + +// Convert_management_DevPodEnvironmentTemplateStatus_To_v1_DevPodEnvironmentTemplateStatus is an autogenerated conversion function. +func Convert_management_DevPodEnvironmentTemplateStatus_To_v1_DevPodEnvironmentTemplateStatus(in *management.DevPodEnvironmentTemplateStatus, out *DevPodEnvironmentTemplateStatus, s conversion.Scope) error { + return autoConvert_management_DevPodEnvironmentTemplateStatus_To_v1_DevPodEnvironmentTemplateStatus(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 } @@ -5228,9 +6239,155 @@ func autoConvert_management_DevPodWorkspaceInstanceStatus_To_v1_DevPodWorkspaceI 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) +// 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_DevPodWorkspaceInstanceTroubleshoot_To_management_DevPodWorkspaceInstanceTroubleshoot(in *DevPodWorkspaceInstanceTroubleshoot, out *management.DevPodWorkspaceInstanceTroubleshoot, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.State = in.State + out.Workspace = (*management.DevPodWorkspaceInstance)(unsafe.Pointer(in.Workspace)) + out.Template = (*storagev1.DevPodWorkspaceTemplate)(unsafe.Pointer(in.Template)) + out.Pods = *(*[]corev1.Pod)(unsafe.Pointer(&in.Pods)) + out.PVCs = *(*[]corev1.PersistentVolumeClaim)(unsafe.Pointer(&in.PVCs)) + out.Errors = *(*[]string)(unsafe.Pointer(&in.Errors)) + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceTroubleshoot_To_management_DevPodWorkspaceInstanceTroubleshoot is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceTroubleshoot_To_management_DevPodWorkspaceInstanceTroubleshoot(in *DevPodWorkspaceInstanceTroubleshoot, out *management.DevPodWorkspaceInstanceTroubleshoot, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceTroubleshoot_To_management_DevPodWorkspaceInstanceTroubleshoot(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceTroubleshoot_To_v1_DevPodWorkspaceInstanceTroubleshoot(in *management.DevPodWorkspaceInstanceTroubleshoot, out *DevPodWorkspaceInstanceTroubleshoot, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.State = in.State + out.Workspace = (*DevPodWorkspaceInstance)(unsafe.Pointer(in.Workspace)) + out.Template = (*storagev1.DevPodWorkspaceTemplate)(unsafe.Pointer(in.Template)) + out.Pods = *(*[]corev1.Pod)(unsafe.Pointer(&in.Pods)) + out.PVCs = *(*[]corev1.PersistentVolumeClaim)(unsafe.Pointer(&in.PVCs)) + out.Errors = *(*[]string)(unsafe.Pointer(&in.Errors)) + return nil +} + +// Convert_management_DevPodWorkspaceInstanceTroubleshoot_To_v1_DevPodWorkspaceInstanceTroubleshoot is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceTroubleshoot_To_v1_DevPodWorkspaceInstanceTroubleshoot(in *management.DevPodWorkspaceInstanceTroubleshoot, out *DevPodWorkspaceInstanceTroubleshoot, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceTroubleshoot_To_v1_DevPodWorkspaceInstanceTroubleshoot(in, out, s) +} + +func autoConvert_v1_DevPodWorkspaceInstanceTroubleshootList_To_management_DevPodWorkspaceInstanceTroubleshootList(in *DevPodWorkspaceInstanceTroubleshootList, out *management.DevPodWorkspaceInstanceTroubleshootList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodWorkspaceInstanceTroubleshoot)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodWorkspaceInstanceTroubleshootList_To_management_DevPodWorkspaceInstanceTroubleshootList is an autogenerated conversion function. +func Convert_v1_DevPodWorkspaceInstanceTroubleshootList_To_management_DevPodWorkspaceInstanceTroubleshootList(in *DevPodWorkspaceInstanceTroubleshootList, out *management.DevPodWorkspaceInstanceTroubleshootList, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspaceInstanceTroubleshootList_To_management_DevPodWorkspaceInstanceTroubleshootList(in, out, s) +} + +func autoConvert_management_DevPodWorkspaceInstanceTroubleshootList_To_v1_DevPodWorkspaceInstanceTroubleshootList(in *management.DevPodWorkspaceInstanceTroubleshootList, out *DevPodWorkspaceInstanceTroubleshootList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodWorkspaceInstanceTroubleshoot)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodWorkspaceInstanceTroubleshootList_To_v1_DevPodWorkspaceInstanceTroubleshootList is an autogenerated conversion function. +func Convert_management_DevPodWorkspaceInstanceTroubleshootList_To_v1_DevPodWorkspaceInstanceTroubleshootList(in *management.DevPodWorkspaceInstanceTroubleshootList, out *DevPodWorkspaceInstanceTroubleshootList, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspaceInstanceTroubleshootList_To_v1_DevPodWorkspaceInstanceTroubleshootList(in, out, s) +} + +func autoConvert_v1_DevPodWorkspacePreset_To_management_DevPodWorkspacePreset(in *DevPodWorkspacePreset, out *management.DevPodWorkspacePreset, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_DevPodWorkspacePresetSpec_To_management_DevPodWorkspacePresetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_DevPodWorkspacePresetStatus_To_management_DevPodWorkspacePresetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_DevPodWorkspacePreset_To_management_DevPodWorkspacePreset is an autogenerated conversion function. +func Convert_v1_DevPodWorkspacePreset_To_management_DevPodWorkspacePreset(in *DevPodWorkspacePreset, out *management.DevPodWorkspacePreset, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspacePreset_To_management_DevPodWorkspacePreset(in, out, s) +} + +func autoConvert_management_DevPodWorkspacePreset_To_v1_DevPodWorkspacePreset(in *management.DevPodWorkspacePreset, out *DevPodWorkspacePreset, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_DevPodWorkspacePresetSpec_To_v1_DevPodWorkspacePresetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_DevPodWorkspacePresetStatus_To_v1_DevPodWorkspacePresetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_DevPodWorkspacePreset_To_v1_DevPodWorkspacePreset is an autogenerated conversion function. +func Convert_management_DevPodWorkspacePreset_To_v1_DevPodWorkspacePreset(in *management.DevPodWorkspacePreset, out *DevPodWorkspacePreset, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspacePreset_To_v1_DevPodWorkspacePreset(in, out, s) +} + +func autoConvert_v1_DevPodWorkspacePresetList_To_management_DevPodWorkspacePresetList(in *DevPodWorkspacePresetList, out *management.DevPodWorkspacePresetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.DevPodWorkspacePreset)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_DevPodWorkspacePresetList_To_management_DevPodWorkspacePresetList is an autogenerated conversion function. +func Convert_v1_DevPodWorkspacePresetList_To_management_DevPodWorkspacePresetList(in *DevPodWorkspacePresetList, out *management.DevPodWorkspacePresetList, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspacePresetList_To_management_DevPodWorkspacePresetList(in, out, s) +} + +func autoConvert_management_DevPodWorkspacePresetList_To_v1_DevPodWorkspacePresetList(in *management.DevPodWorkspacePresetList, out *DevPodWorkspacePresetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DevPodWorkspacePreset)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_DevPodWorkspacePresetList_To_v1_DevPodWorkspacePresetList is an autogenerated conversion function. +func Convert_management_DevPodWorkspacePresetList_To_v1_DevPodWorkspacePresetList(in *management.DevPodWorkspacePresetList, out *DevPodWorkspacePresetList, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspacePresetList_To_v1_DevPodWorkspacePresetList(in, out, s) +} + +func autoConvert_v1_DevPodWorkspacePresetSpec_To_management_DevPodWorkspacePresetSpec(in *DevPodWorkspacePresetSpec, out *management.DevPodWorkspacePresetSpec, s conversion.Scope) error { + out.DevPodWorkspacePresetSpec = in.DevPodWorkspacePresetSpec + return nil +} + +// Convert_v1_DevPodWorkspacePresetSpec_To_management_DevPodWorkspacePresetSpec is an autogenerated conversion function. +func Convert_v1_DevPodWorkspacePresetSpec_To_management_DevPodWorkspacePresetSpec(in *DevPodWorkspacePresetSpec, out *management.DevPodWorkspacePresetSpec, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspacePresetSpec_To_management_DevPodWorkspacePresetSpec(in, out, s) +} + +func autoConvert_management_DevPodWorkspacePresetSpec_To_v1_DevPodWorkspacePresetSpec(in *management.DevPodWorkspacePresetSpec, out *DevPodWorkspacePresetSpec, s conversion.Scope) error { + out.DevPodWorkspacePresetSpec = in.DevPodWorkspacePresetSpec + return nil +} + +// Convert_management_DevPodWorkspacePresetSpec_To_v1_DevPodWorkspacePresetSpec is an autogenerated conversion function. +func Convert_management_DevPodWorkspacePresetSpec_To_v1_DevPodWorkspacePresetSpec(in *management.DevPodWorkspacePresetSpec, out *DevPodWorkspacePresetSpec, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspacePresetSpec_To_v1_DevPodWorkspacePresetSpec(in, out, s) +} + +func autoConvert_v1_DevPodWorkspacePresetStatus_To_management_DevPodWorkspacePresetStatus(in *DevPodWorkspacePresetStatus, out *management.DevPodWorkspacePresetStatus, s conversion.Scope) error { + return nil +} + +// Convert_v1_DevPodWorkspacePresetStatus_To_management_DevPodWorkspacePresetStatus is an autogenerated conversion function. +func Convert_v1_DevPodWorkspacePresetStatus_To_management_DevPodWorkspacePresetStatus(in *DevPodWorkspacePresetStatus, out *management.DevPodWorkspacePresetStatus, s conversion.Scope) error { + return autoConvert_v1_DevPodWorkspacePresetStatus_To_management_DevPodWorkspacePresetStatus(in, out, s) +} + +func autoConvert_management_DevPodWorkspacePresetStatus_To_v1_DevPodWorkspacePresetStatus(in *management.DevPodWorkspacePresetStatus, out *DevPodWorkspacePresetStatus, s conversion.Scope) error { + return nil +} + +// Convert_management_DevPodWorkspacePresetStatus_To_v1_DevPodWorkspacePresetStatus is an autogenerated conversion function. +func Convert_management_DevPodWorkspacePresetStatus_To_v1_DevPodWorkspacePresetStatus(in *management.DevPodWorkspacePresetStatus, out *DevPodWorkspacePresetStatus, s conversion.Scope) error { + return autoConvert_management_DevPodWorkspacePresetStatus_To_v1_DevPodWorkspacePresetStatus(in, out, s) } func autoConvert_v1_DevPodWorkspaceTemplate_To_management_DevPodWorkspaceTemplate(in *DevPodWorkspaceTemplate, out *management.DevPodWorkspaceTemplate, s conversion.Scope) error { @@ -6219,10 +7376,62 @@ func Convert_management_LoftUpgradeStatus_To_v1_LoftUpgradeStatus(in *management return autoConvert_management_LoftUpgradeStatus_To_v1_LoftUpgradeStatus(in, out, s) } +func autoConvert_v1_MaintenanceWindow_To_management_MaintenanceWindow(in *MaintenanceWindow, out *management.MaintenanceWindow, s conversion.Scope) error { + out.DayOfWeek = in.DayOfWeek + out.TimeWindow = in.TimeWindow + return nil +} + +// Convert_v1_MaintenanceWindow_To_management_MaintenanceWindow is an autogenerated conversion function. +func Convert_v1_MaintenanceWindow_To_management_MaintenanceWindow(in *MaintenanceWindow, out *management.MaintenanceWindow, s conversion.Scope) error { + return autoConvert_v1_MaintenanceWindow_To_management_MaintenanceWindow(in, out, s) +} + +func autoConvert_management_MaintenanceWindow_To_v1_MaintenanceWindow(in *management.MaintenanceWindow, out *MaintenanceWindow, s conversion.Scope) error { + out.DayOfWeek = in.DayOfWeek + out.TimeWindow = in.TimeWindow + return nil +} + +// Convert_management_MaintenanceWindow_To_v1_MaintenanceWindow is an autogenerated conversion function. +func Convert_management_MaintenanceWindow_To_v1_MaintenanceWindow(in *management.MaintenanceWindow, out *MaintenanceWindow, s conversion.Scope) error { + return autoConvert_management_MaintenanceWindow_To_v1_MaintenanceWindow(in, out, s) +} + +func autoConvert_v1_ManagementRole_To_management_ManagementRole(in *ManagementRole, out *management.ManagementRole, s conversion.Scope) error { + if err := Convert_v1_ObjectName_To_management_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + if err := Convert_v1_AssignedVia_To_management_AssignedVia(&in.AssignedVia, &out.AssignedVia, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ManagementRole_To_management_ManagementRole is an autogenerated conversion function. +func Convert_v1_ManagementRole_To_management_ManagementRole(in *ManagementRole, out *management.ManagementRole, s conversion.Scope) error { + return autoConvert_v1_ManagementRole_To_management_ManagementRole(in, out, s) +} + +func autoConvert_management_ManagementRole_To_v1_ManagementRole(in *management.ManagementRole, out *ManagementRole, s conversion.Scope) error { + if err := Convert_management_ObjectName_To_v1_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + if err := Convert_management_AssignedVia_To_v1_AssignedVia(&in.AssignedVia, &out.AssignedVia, s); err != nil { + return err + } + return nil +} + +// Convert_management_ManagementRole_To_v1_ManagementRole is an autogenerated conversion function. +func Convert_management_ManagementRole_To_v1_ManagementRole(in *management.ManagementRole, out *ManagementRole, s conversion.Scope) error { + return autoConvert_management_ManagementRole_To_v1_ManagementRole(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)) + out.Clients = *(*[]management.OIDCClientSpec)(unsafe.Pointer(&in.Clients)) return nil } @@ -6234,7 +7443,7 @@ func Convert_v1_OIDC_To_management_OIDC(in *OIDC, out *management.OIDC, s conver 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)) + out.Clients = *(*[]OIDCClientSpec)(unsafe.Pointer(&in.Clients)) return nil } @@ -6244,10 +7453,13 @@ func Convert_management_OIDC_To_v1_OIDC(in *management.OIDC, out *OIDC, s conver } 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)) + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_OIDCClientSpec_To_management_OIDCClientSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_OIDCClientStatus_To_management_OIDCClientStatus(&in.Status, &out.Status, s); err != nil { + return err + } return nil } @@ -6257,6 +7469,44 @@ func Convert_v1_OIDCClient_To_management_OIDCClient(in *OIDCClient, out *managem } func autoConvert_management_OIDCClient_To_v1_OIDCClient(in *management.OIDCClient, out *OIDCClient, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_OIDCClientSpec_To_v1_OIDCClientSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_OIDCClientStatus_To_v1_OIDCClientStatus(&in.Status, &out.Status, s); err != nil { + return err + } + 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_OIDCClientList_To_management_OIDCClientList(in *OIDCClientList, out *management.OIDCClientList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.OIDCClient)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_OIDCClientList_To_management_OIDCClientList is an autogenerated conversion function. +func Convert_v1_OIDCClientList_To_management_OIDCClientList(in *OIDCClientList, out *management.OIDCClientList, s conversion.Scope) error { + return autoConvert_v1_OIDCClientList_To_management_OIDCClientList(in, out, s) +} + +func autoConvert_management_OIDCClientList_To_v1_OIDCClientList(in *management.OIDCClientList, out *OIDCClientList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OIDCClient)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_OIDCClientList_To_v1_OIDCClientList is an autogenerated conversion function. +func Convert_management_OIDCClientList_To_v1_OIDCClientList(in *management.OIDCClientList, out *OIDCClientList, s conversion.Scope) error { + return autoConvert_management_OIDCClientList_To_v1_OIDCClientList(in, out, s) +} + +func autoConvert_v1_OIDCClientSpec_To_management_OIDCClientSpec(in *OIDCClientSpec, out *management.OIDCClientSpec, s conversion.Scope) error { out.Name = in.Name out.ClientID = in.ClientID out.ClientSecret = in.ClientSecret @@ -6264,9 +7514,90 @@ func autoConvert_management_OIDCClient_To_v1_OIDCClient(in *management.OIDCClien 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) +// Convert_v1_OIDCClientSpec_To_management_OIDCClientSpec is an autogenerated conversion function. +func Convert_v1_OIDCClientSpec_To_management_OIDCClientSpec(in *OIDCClientSpec, out *management.OIDCClientSpec, s conversion.Scope) error { + return autoConvert_v1_OIDCClientSpec_To_management_OIDCClientSpec(in, out, s) +} + +func autoConvert_management_OIDCClientSpec_To_v1_OIDCClientSpec(in *management.OIDCClientSpec, out *OIDCClientSpec, 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_OIDCClientSpec_To_v1_OIDCClientSpec is an autogenerated conversion function. +func Convert_management_OIDCClientSpec_To_v1_OIDCClientSpec(in *management.OIDCClientSpec, out *OIDCClientSpec, s conversion.Scope) error { + return autoConvert_management_OIDCClientSpec_To_v1_OIDCClientSpec(in, out, s) +} + +func autoConvert_v1_OIDCClientStatus_To_management_OIDCClientStatus(in *OIDCClientStatus, out *management.OIDCClientStatus, s conversion.Scope) error { + return nil +} + +// Convert_v1_OIDCClientStatus_To_management_OIDCClientStatus is an autogenerated conversion function. +func Convert_v1_OIDCClientStatus_To_management_OIDCClientStatus(in *OIDCClientStatus, out *management.OIDCClientStatus, s conversion.Scope) error { + return autoConvert_v1_OIDCClientStatus_To_management_OIDCClientStatus(in, out, s) +} + +func autoConvert_management_OIDCClientStatus_To_v1_OIDCClientStatus(in *management.OIDCClientStatus, out *OIDCClientStatus, s conversion.Scope) error { + return nil +} + +// Convert_management_OIDCClientStatus_To_v1_OIDCClientStatus is an autogenerated conversion function. +func Convert_management_OIDCClientStatus_To_v1_OIDCClientStatus(in *management.OIDCClientStatus, out *OIDCClientStatus, s conversion.Scope) error { + return autoConvert_management_OIDCClientStatus_To_v1_OIDCClientStatus(in, out, s) +} + +func autoConvert_v1_ObjectName_To_management_ObjectName(in *ObjectName, out *management.ObjectName, s conversion.Scope) error { + out.Namespace = in.Namespace + out.Name = in.Name + out.DisplayName = in.DisplayName + return nil +} + +// Convert_v1_ObjectName_To_management_ObjectName is an autogenerated conversion function. +func Convert_v1_ObjectName_To_management_ObjectName(in *ObjectName, out *management.ObjectName, s conversion.Scope) error { + return autoConvert_v1_ObjectName_To_management_ObjectName(in, out, s) +} + +func autoConvert_management_ObjectName_To_v1_ObjectName(in *management.ObjectName, out *ObjectName, s conversion.Scope) error { + out.Namespace = in.Namespace + out.Name = in.Name + out.DisplayName = in.DisplayName + return nil +} + +// Convert_management_ObjectName_To_v1_ObjectName is an autogenerated conversion function. +func Convert_management_ObjectName_To_v1_ObjectName(in *management.ObjectName, out *ObjectName, s conversion.Scope) error { + return autoConvert_management_ObjectName_To_v1_ObjectName(in, out, s) +} + +func autoConvert_v1_ObjectPermission_To_management_ObjectPermission(in *ObjectPermission, out *management.ObjectPermission, s conversion.Scope) error { + if err := Convert_v1_ObjectName_To_management_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + return nil +} + +// Convert_v1_ObjectPermission_To_management_ObjectPermission is an autogenerated conversion function. +func Convert_v1_ObjectPermission_To_management_ObjectPermission(in *ObjectPermission, out *management.ObjectPermission, s conversion.Scope) error { + return autoConvert_v1_ObjectPermission_To_management_ObjectPermission(in, out, s) +} + +func autoConvert_management_ObjectPermission_To_v1_ObjectPermission(in *management.ObjectPermission, out *ObjectPermission, s conversion.Scope) error { + if err := Convert_management_ObjectName_To_v1_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + return nil +} + +// Convert_management_ObjectPermission_To_v1_ObjectPermission is an autogenerated conversion function. +func Convert_management_ObjectPermission_To_v1_ObjectPermission(in *management.ObjectPermission, out *ObjectPermission, s conversion.Scope) error { + return autoConvert_management_ObjectPermission_To_v1_ObjectPermission(in, out, s) } func autoConvert_v1_OwnedAccessKey_To_management_OwnedAccessKey(in *OwnedAccessKey, out *management.OwnedAccessKey, s conversion.Scope) error { @@ -6773,6 +8104,42 @@ func Convert_management_ProjectMembersList_To_v1_ProjectMembersList(in *manageme return autoConvert_management_ProjectMembersList_To_v1_ProjectMembersList(in, out, s) } +func autoConvert_v1_ProjectMembership_To_management_ProjectMembership(in *ProjectMembership, out *management.ProjectMembership, s conversion.Scope) error { + if err := Convert_v1_ObjectName_To_management_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + if err := Convert_v1_ProjectRole_To_management_ProjectRole(&in.Role, &out.Role, s); err != nil { + return err + } + if err := Convert_v1_AssignedVia_To_management_AssignedVia(&in.AssignedVia, &out.AssignedVia, s); err != nil { + return err + } + return nil +} + +// Convert_v1_ProjectMembership_To_management_ProjectMembership is an autogenerated conversion function. +func Convert_v1_ProjectMembership_To_management_ProjectMembership(in *ProjectMembership, out *management.ProjectMembership, s conversion.Scope) error { + return autoConvert_v1_ProjectMembership_To_management_ProjectMembership(in, out, s) +} + +func autoConvert_management_ProjectMembership_To_v1_ProjectMembership(in *management.ProjectMembership, out *ProjectMembership, s conversion.Scope) error { + if err := Convert_management_ObjectName_To_v1_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + if err := Convert_management_ProjectRole_To_v1_ProjectRole(&in.Role, &out.Role, s); err != nil { + return err + } + if err := Convert_management_AssignedVia_To_v1_AssignedVia(&in.AssignedVia, &out.AssignedVia, s); err != nil { + return err + } + return nil +} + +// Convert_management_ProjectMembership_To_v1_ProjectMembership is an autogenerated conversion function. +func Convert_management_ProjectMembership_To_v1_ProjectMembership(in *management.ProjectMembership, out *ProjectMembership, s conversion.Scope) error { + return autoConvert_management_ProjectMembership_To_v1_ProjectMembership(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 { @@ -6913,6 +8280,76 @@ func Convert_management_ProjectMigrateVirtualClusterInstanceSource_To_v1_Project return autoConvert_management_ProjectMigrateVirtualClusterInstanceSource_To_v1_ProjectMigrateVirtualClusterInstanceSource(in, out, s) } +func autoConvert_v1_ProjectRole_To_management_ProjectRole(in *ProjectRole, out *management.ProjectRole, s conversion.Scope) error { + if err := Convert_v1_ObjectName_To_management_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + out.IsAdmin = in.IsAdmin + return nil +} + +// Convert_v1_ProjectRole_To_management_ProjectRole is an autogenerated conversion function. +func Convert_v1_ProjectRole_To_management_ProjectRole(in *ProjectRole, out *management.ProjectRole, s conversion.Scope) error { + return autoConvert_v1_ProjectRole_To_management_ProjectRole(in, out, s) +} + +func autoConvert_management_ProjectRole_To_v1_ProjectRole(in *management.ProjectRole, out *ProjectRole, s conversion.Scope) error { + if err := Convert_management_ObjectName_To_v1_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + out.IsAdmin = in.IsAdmin + return nil +} + +// Convert_management_ProjectRole_To_v1_ProjectRole is an autogenerated conversion function. +func Convert_management_ProjectRole_To_v1_ProjectRole(in *management.ProjectRole, out *ProjectRole, s conversion.Scope) error { + return autoConvert_management_ProjectRole_To_v1_ProjectRole(in, out, s) +} + +func autoConvert_v1_ProjectRunners_To_management_ProjectRunners(in *ProjectRunners, out *management.ProjectRunners, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Runners = *(*[]management.Runner)(unsafe.Pointer(&in.Runners)) + return nil +} + +// Convert_v1_ProjectRunners_To_management_ProjectRunners is an autogenerated conversion function. +func Convert_v1_ProjectRunners_To_management_ProjectRunners(in *ProjectRunners, out *management.ProjectRunners, s conversion.Scope) error { + return autoConvert_v1_ProjectRunners_To_management_ProjectRunners(in, out, s) +} + +func autoConvert_management_ProjectRunners_To_v1_ProjectRunners(in *management.ProjectRunners, out *ProjectRunners, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Runners = *(*[]Runner)(unsafe.Pointer(&in.Runners)) + return nil +} + +// Convert_management_ProjectRunners_To_v1_ProjectRunners is an autogenerated conversion function. +func Convert_management_ProjectRunners_To_v1_ProjectRunners(in *management.ProjectRunners, out *ProjectRunners, s conversion.Scope) error { + return autoConvert_management_ProjectRunners_To_v1_ProjectRunners(in, out, s) +} + +func autoConvert_v1_ProjectRunnersList_To_management_ProjectRunnersList(in *ProjectRunnersList, out *management.ProjectRunnersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.ProjectRunners)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_ProjectRunnersList_To_management_ProjectRunnersList is an autogenerated conversion function. +func Convert_v1_ProjectRunnersList_To_management_ProjectRunnersList(in *ProjectRunnersList, out *management.ProjectRunnersList, s conversion.Scope) error { + return autoConvert_v1_ProjectRunnersList_To_management_ProjectRunnersList(in, out, s) +} + +func autoConvert_management_ProjectRunnersList_To_v1_ProjectRunnersList(in *management.ProjectRunnersList, out *ProjectRunnersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ProjectRunners)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_ProjectRunnersList_To_v1_ProjectRunnersList is an autogenerated conversion function. +func Convert_management_ProjectRunnersList_To_v1_ProjectRunnersList(in *management.ProjectRunnersList, out *ProjectRunnersList, s conversion.Scope) error { + return autoConvert_management_ProjectRunnersList_To_v1_ProjectRunnersList(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 { @@ -7063,6 +8500,9 @@ func autoConvert_v1_ProjectTemplates_To_management_ProjectTemplates(in *ProjectT out.SpaceTemplates = *(*[]management.SpaceTemplate)(unsafe.Pointer(&in.SpaceTemplates)) out.DefaultDevPodWorkspaceTemplate = in.DefaultDevPodWorkspaceTemplate out.DevPodWorkspaceTemplates = *(*[]management.DevPodWorkspaceTemplate)(unsafe.Pointer(&in.DevPodWorkspaceTemplates)) + out.DevPodEnvironmentTemplates = *(*[]management.DevPodEnvironmentTemplate)(unsafe.Pointer(&in.DevPodEnvironmentTemplates)) + out.DevPodWorkspacePresets = *(*[]management.DevPodWorkspacePreset)(unsafe.Pointer(&in.DevPodWorkspacePresets)) + out.DefaultDevPodEnvironmentTemplate = in.DefaultDevPodEnvironmentTemplate return nil } @@ -7079,6 +8519,9 @@ func autoConvert_management_ProjectTemplates_To_v1_ProjectTemplates(in *manageme out.SpaceTemplates = *(*[]SpaceTemplate)(unsafe.Pointer(&in.SpaceTemplates)) out.DefaultDevPodWorkspaceTemplate = in.DefaultDevPodWorkspaceTemplate out.DevPodWorkspaceTemplates = *(*[]DevPodWorkspaceTemplate)(unsafe.Pointer(&in.DevPodWorkspaceTemplates)) + out.DevPodEnvironmentTemplates = *(*[]DevPodEnvironmentTemplate)(unsafe.Pointer(&in.DevPodEnvironmentTemplates)) + out.DevPodWorkspacePresets = *(*[]DevPodWorkspacePreset)(unsafe.Pointer(&in.DevPodWorkspacePresets)) + out.DefaultDevPodEnvironmentTemplate = in.DefaultDevPodEnvironmentTemplate return nil } @@ -8500,64 +9943,160 @@ func autoConvert_v1_TeamClusters_To_management_TeamClusters(in *TeamClusters, ou 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) +// 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_TeamObjectPermissions_To_management_TeamObjectPermissions(in *TeamObjectPermissions, out *management.TeamObjectPermissions, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ObjectPermissions = *(*[]management.ObjectPermission)(unsafe.Pointer(&in.ObjectPermissions)) + return nil +} + +// Convert_v1_TeamObjectPermissions_To_management_TeamObjectPermissions is an autogenerated conversion function. +func Convert_v1_TeamObjectPermissions_To_management_TeamObjectPermissions(in *TeamObjectPermissions, out *management.TeamObjectPermissions, s conversion.Scope) error { + return autoConvert_v1_TeamObjectPermissions_To_management_TeamObjectPermissions(in, out, s) +} + +func autoConvert_management_TeamObjectPermissions_To_v1_TeamObjectPermissions(in *management.TeamObjectPermissions, out *TeamObjectPermissions, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ObjectPermissions = *(*[]ObjectPermission)(unsafe.Pointer(&in.ObjectPermissions)) + return nil +} + +// Convert_management_TeamObjectPermissions_To_v1_TeamObjectPermissions is an autogenerated conversion function. +func Convert_management_TeamObjectPermissions_To_v1_TeamObjectPermissions(in *management.TeamObjectPermissions, out *TeamObjectPermissions, s conversion.Scope) error { + return autoConvert_management_TeamObjectPermissions_To_v1_TeamObjectPermissions(in, out, s) +} + +func autoConvert_v1_TeamObjectPermissionsList_To_management_TeamObjectPermissionsList(in *TeamObjectPermissionsList, out *management.TeamObjectPermissionsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.TeamObjectPermissions)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_TeamObjectPermissionsList_To_management_TeamObjectPermissionsList is an autogenerated conversion function. +func Convert_v1_TeamObjectPermissionsList_To_management_TeamObjectPermissionsList(in *TeamObjectPermissionsList, out *management.TeamObjectPermissionsList, s conversion.Scope) error { + return autoConvert_v1_TeamObjectPermissionsList_To_management_TeamObjectPermissionsList(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)) +func autoConvert_management_TeamObjectPermissionsList_To_v1_TeamObjectPermissionsList(in *management.TeamObjectPermissionsList, out *TeamObjectPermissionsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]TeamObjectPermissions)(unsafe.Pointer(&in.Items)) 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) +// Convert_management_TeamObjectPermissionsList_To_v1_TeamObjectPermissionsList is an autogenerated conversion function. +func Convert_management_TeamObjectPermissionsList_To_v1_TeamObjectPermissionsList(in *management.TeamObjectPermissionsList, out *TeamObjectPermissionsList, s conversion.Scope) error { + return autoConvert_management_TeamObjectPermissionsList_To_v1_TeamObjectPermissionsList(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)) +func autoConvert_v1_TeamPermissions_To_management_TeamPermissions(in *TeamPermissions, out *management.TeamPermissions, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Members = *(*[]management.ObjectName)(unsafe.Pointer(&in.Members)) + out.ProjectMemberships = *(*[]management.ProjectMembership)(unsafe.Pointer(&in.ProjectMemberships)) + out.ManagementRoles = *(*[]management.ManagementRole)(unsafe.Pointer(&in.ManagementRoles)) + out.ClusterAccessRoles = *(*[]management.ClusterAccessRole)(unsafe.Pointer(&in.ClusterAccessRoles)) + out.VirtualClusterRoles = *(*[]management.VirtualClusterRole)(unsafe.Pointer(&in.VirtualClusterRoles)) 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) +// Convert_v1_TeamPermissions_To_management_TeamPermissions is an autogenerated conversion function. +func Convert_v1_TeamPermissions_To_management_TeamPermissions(in *TeamPermissions, out *management.TeamPermissions, s conversion.Scope) error { + return autoConvert_v1_TeamPermissions_To_management_TeamPermissions(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)) +func autoConvert_management_TeamPermissions_To_v1_TeamPermissions(in *management.TeamPermissions, out *TeamPermissions, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Members = *(*[]ObjectName)(unsafe.Pointer(&in.Members)) + out.ProjectMemberships = *(*[]ProjectMembership)(unsafe.Pointer(&in.ProjectMemberships)) + out.ManagementRoles = *(*[]ManagementRole)(unsafe.Pointer(&in.ManagementRoles)) + out.ClusterAccessRoles = *(*[]ClusterAccessRole)(unsafe.Pointer(&in.ClusterAccessRoles)) + out.VirtualClusterRoles = *(*[]VirtualClusterRole)(unsafe.Pointer(&in.VirtualClusterRoles)) 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) +// Convert_management_TeamPermissions_To_v1_TeamPermissions is an autogenerated conversion function. +func Convert_management_TeamPermissions_To_v1_TeamPermissions(in *management.TeamPermissions, out *TeamPermissions, s conversion.Scope) error { + return autoConvert_management_TeamPermissions_To_v1_TeamPermissions(in, out, s) } -func autoConvert_v1_TeamList_To_management_TeamList(in *TeamList, out *management.TeamList, s conversion.Scope) error { +func autoConvert_v1_TeamPermissionsList_To_management_TeamPermissionsList(in *TeamPermissionsList, out *management.TeamPermissionsList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]management.Team)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]management.TeamPermissions)(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) +// Convert_v1_TeamPermissionsList_To_management_TeamPermissionsList is an autogenerated conversion function. +func Convert_v1_TeamPermissionsList_To_management_TeamPermissionsList(in *TeamPermissionsList, out *management.TeamPermissionsList, s conversion.Scope) error { + return autoConvert_v1_TeamPermissionsList_To_management_TeamPermissionsList(in, out, s) } -func autoConvert_management_TeamList_To_v1_TeamList(in *management.TeamList, out *TeamList, s conversion.Scope) error { +func autoConvert_management_TeamPermissionsList_To_v1_TeamPermissionsList(in *management.TeamPermissionsList, out *TeamPermissionsList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]Team)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]TeamPermissions)(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) +// Convert_management_TeamPermissionsList_To_v1_TeamPermissionsList is an autogenerated conversion function. +func Convert_management_TeamPermissionsList_To_v1_TeamPermissionsList(in *management.TeamPermissionsList, out *TeamPermissionsList, s conversion.Scope) error { + return autoConvert_management_TeamPermissionsList_To_v1_TeamPermissionsList(in, out, s) } func autoConvert_v1_TeamSpec_To_management_TeamSpec(in *TeamSpec, out *management.TeamSpec, s conversion.Scope) error { @@ -8600,6 +10139,104 @@ func Convert_management_TeamStatus_To_v1_TeamStatus(in *management.TeamStatus, o return autoConvert_management_TeamStatus_To_v1_TeamStatus(in, out, s) } +func autoConvert_v1_TranslateVClusterResourceName_To_management_TranslateVClusterResourceName(in *TranslateVClusterResourceName, out *management.TranslateVClusterResourceName, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_TranslateVClusterResourceNameSpec_To_management_TranslateVClusterResourceNameSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_TranslateVClusterResourceNameStatus_To_management_TranslateVClusterResourceNameStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_TranslateVClusterResourceName_To_management_TranslateVClusterResourceName is an autogenerated conversion function. +func Convert_v1_TranslateVClusterResourceName_To_management_TranslateVClusterResourceName(in *TranslateVClusterResourceName, out *management.TranslateVClusterResourceName, s conversion.Scope) error { + return autoConvert_v1_TranslateVClusterResourceName_To_management_TranslateVClusterResourceName(in, out, s) +} + +func autoConvert_management_TranslateVClusterResourceName_To_v1_TranslateVClusterResourceName(in *management.TranslateVClusterResourceName, out *TranslateVClusterResourceName, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_TranslateVClusterResourceNameSpec_To_v1_TranslateVClusterResourceNameSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_TranslateVClusterResourceNameStatus_To_v1_TranslateVClusterResourceNameStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_TranslateVClusterResourceName_To_v1_TranslateVClusterResourceName is an autogenerated conversion function. +func Convert_management_TranslateVClusterResourceName_To_v1_TranslateVClusterResourceName(in *management.TranslateVClusterResourceName, out *TranslateVClusterResourceName, s conversion.Scope) error { + return autoConvert_management_TranslateVClusterResourceName_To_v1_TranslateVClusterResourceName(in, out, s) +} + +func autoConvert_v1_TranslateVClusterResourceNameList_To_management_TranslateVClusterResourceNameList(in *TranslateVClusterResourceNameList, out *management.TranslateVClusterResourceNameList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.TranslateVClusterResourceName)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_TranslateVClusterResourceNameList_To_management_TranslateVClusterResourceNameList is an autogenerated conversion function. +func Convert_v1_TranslateVClusterResourceNameList_To_management_TranslateVClusterResourceNameList(in *TranslateVClusterResourceNameList, out *management.TranslateVClusterResourceNameList, s conversion.Scope) error { + return autoConvert_v1_TranslateVClusterResourceNameList_To_management_TranslateVClusterResourceNameList(in, out, s) +} + +func autoConvert_management_TranslateVClusterResourceNameList_To_v1_TranslateVClusterResourceNameList(in *management.TranslateVClusterResourceNameList, out *TranslateVClusterResourceNameList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]TranslateVClusterResourceName)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_TranslateVClusterResourceNameList_To_v1_TranslateVClusterResourceNameList is an autogenerated conversion function. +func Convert_management_TranslateVClusterResourceNameList_To_v1_TranslateVClusterResourceNameList(in *management.TranslateVClusterResourceNameList, out *TranslateVClusterResourceNameList, s conversion.Scope) error { + return autoConvert_management_TranslateVClusterResourceNameList_To_v1_TranslateVClusterResourceNameList(in, out, s) +} + +func autoConvert_v1_TranslateVClusterResourceNameSpec_To_management_TranslateVClusterResourceNameSpec(in *TranslateVClusterResourceNameSpec, out *management.TranslateVClusterResourceNameSpec, s conversion.Scope) error { + out.Name = in.Name + out.Namespace = in.Namespace + out.VClusterName = in.VClusterName + return nil +} + +// Convert_v1_TranslateVClusterResourceNameSpec_To_management_TranslateVClusterResourceNameSpec is an autogenerated conversion function. +func Convert_v1_TranslateVClusterResourceNameSpec_To_management_TranslateVClusterResourceNameSpec(in *TranslateVClusterResourceNameSpec, out *management.TranslateVClusterResourceNameSpec, s conversion.Scope) error { + return autoConvert_v1_TranslateVClusterResourceNameSpec_To_management_TranslateVClusterResourceNameSpec(in, out, s) +} + +func autoConvert_management_TranslateVClusterResourceNameSpec_To_v1_TranslateVClusterResourceNameSpec(in *management.TranslateVClusterResourceNameSpec, out *TranslateVClusterResourceNameSpec, s conversion.Scope) error { + out.Name = in.Name + out.Namespace = in.Namespace + out.VClusterName = in.VClusterName + return nil +} + +// Convert_management_TranslateVClusterResourceNameSpec_To_v1_TranslateVClusterResourceNameSpec is an autogenerated conversion function. +func Convert_management_TranslateVClusterResourceNameSpec_To_v1_TranslateVClusterResourceNameSpec(in *management.TranslateVClusterResourceNameSpec, out *TranslateVClusterResourceNameSpec, s conversion.Scope) error { + return autoConvert_management_TranslateVClusterResourceNameSpec_To_v1_TranslateVClusterResourceNameSpec(in, out, s) +} + +func autoConvert_v1_TranslateVClusterResourceNameStatus_To_management_TranslateVClusterResourceNameStatus(in *TranslateVClusterResourceNameStatus, out *management.TranslateVClusterResourceNameStatus, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_v1_TranslateVClusterResourceNameStatus_To_management_TranslateVClusterResourceNameStatus is an autogenerated conversion function. +func Convert_v1_TranslateVClusterResourceNameStatus_To_management_TranslateVClusterResourceNameStatus(in *TranslateVClusterResourceNameStatus, out *management.TranslateVClusterResourceNameStatus, s conversion.Scope) error { + return autoConvert_v1_TranslateVClusterResourceNameStatus_To_management_TranslateVClusterResourceNameStatus(in, out, s) +} + +func autoConvert_management_TranslateVClusterResourceNameStatus_To_v1_TranslateVClusterResourceNameStatus(in *management.TranslateVClusterResourceNameStatus, out *TranslateVClusterResourceNameStatus, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_management_TranslateVClusterResourceNameStatus_To_v1_TranslateVClusterResourceNameStatus is an autogenerated conversion function. +func Convert_management_TranslateVClusterResourceNameStatus_To_v1_TranslateVClusterResourceNameStatus(in *management.TranslateVClusterResourceNameStatus, out *TranslateVClusterResourceNameStatus, s conversion.Scope) error { + return autoConvert_management_TranslateVClusterResourceNameStatus_To_v1_TranslateVClusterResourceNameStatus(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 { @@ -8764,10 +10401,59 @@ func Convert_management_UserList_To_v1_UserList(in *management.UserList, out *Us return autoConvert_management_UserList_To_v1_UserList(in, out, s) } +func autoConvert_v1_UserObjectPermissions_To_management_UserObjectPermissions(in *UserObjectPermissions, out *management.UserObjectPermissions, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ObjectPermissions = *(*[]management.ObjectPermission)(unsafe.Pointer(&in.ObjectPermissions)) + return nil +} + +// Convert_v1_UserObjectPermissions_To_management_UserObjectPermissions is an autogenerated conversion function. +func Convert_v1_UserObjectPermissions_To_management_UserObjectPermissions(in *UserObjectPermissions, out *management.UserObjectPermissions, s conversion.Scope) error { + return autoConvert_v1_UserObjectPermissions_To_management_UserObjectPermissions(in, out, s) +} + +func autoConvert_management_UserObjectPermissions_To_v1_UserObjectPermissions(in *management.UserObjectPermissions, out *UserObjectPermissions, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ObjectPermissions = *(*[]ObjectPermission)(unsafe.Pointer(&in.ObjectPermissions)) + return nil +} + +// Convert_management_UserObjectPermissions_To_v1_UserObjectPermissions is an autogenerated conversion function. +func Convert_management_UserObjectPermissions_To_v1_UserObjectPermissions(in *management.UserObjectPermissions, out *UserObjectPermissions, s conversion.Scope) error { + return autoConvert_management_UserObjectPermissions_To_v1_UserObjectPermissions(in, out, s) +} + +func autoConvert_v1_UserObjectPermissionsList_To_management_UserObjectPermissionsList(in *UserObjectPermissionsList, out *management.UserObjectPermissionsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.UserObjectPermissions)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_UserObjectPermissionsList_To_management_UserObjectPermissionsList is an autogenerated conversion function. +func Convert_v1_UserObjectPermissionsList_To_management_UserObjectPermissionsList(in *UserObjectPermissionsList, out *management.UserObjectPermissionsList, s conversion.Scope) error { + return autoConvert_v1_UserObjectPermissionsList_To_management_UserObjectPermissionsList(in, out, s) +} + +func autoConvert_management_UserObjectPermissionsList_To_v1_UserObjectPermissionsList(in *management.UserObjectPermissionsList, out *UserObjectPermissionsList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]UserObjectPermissions)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_UserObjectPermissionsList_To_v1_UserObjectPermissionsList is an autogenerated conversion function. +func Convert_management_UserObjectPermissionsList_To_v1_UserObjectPermissionsList(in *management.UserObjectPermissionsList, out *UserObjectPermissionsList, s conversion.Scope) error { + return autoConvert_management_UserObjectPermissionsList_To_v1_UserObjectPermissionsList(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)) + out.TeamMemberships = *(*[]management.ObjectName)(unsafe.Pointer(&in.TeamMemberships)) + out.ProjectMemberships = *(*[]management.ProjectMembership)(unsafe.Pointer(&in.ProjectMemberships)) + out.ManagementRoles = *(*[]management.ManagementRole)(unsafe.Pointer(&in.ManagementRoles)) + out.ClusterAccessRoles = *(*[]management.ClusterAccessRole)(unsafe.Pointer(&in.ClusterAccessRoles)) + out.VirtualClusterRoles = *(*[]management.VirtualClusterRole)(unsafe.Pointer(&in.VirtualClusterRoles)) return nil } @@ -8780,6 +10466,11 @@ func autoConvert_management_UserPermissions_To_v1_UserPermissions(in *management out.ObjectMeta = in.ObjectMeta out.ClusterRoles = *(*[]UserPermissionsRole)(unsafe.Pointer(&in.ClusterRoles)) out.NamespaceRoles = *(*[]UserPermissionsRole)(unsafe.Pointer(&in.NamespaceRoles)) + out.TeamMemberships = *(*[]ObjectName)(unsafe.Pointer(&in.TeamMemberships)) + out.ProjectMemberships = *(*[]ProjectMembership)(unsafe.Pointer(&in.ProjectMemberships)) + out.ManagementRoles = *(*[]ManagementRole)(unsafe.Pointer(&in.ManagementRoles)) + out.ClusterAccessRoles = *(*[]ClusterAccessRole)(unsafe.Pointer(&in.ClusterAccessRoles)) + out.VirtualClusterRoles = *(*[]VirtualClusterRole)(unsafe.Pointer(&in.VirtualClusterRoles)) return nil } @@ -8845,6 +10536,7 @@ func autoConvert_v1_UserProfile_To_management_UserProfile(in *UserProfile, out * out.Email = in.Email out.Icon = (*string)(unsafe.Pointer(in.Icon)) out.Custom = in.Custom + out.Secrets = (*map[string]*management.UserProfileSecret)(unsafe.Pointer(in.Secrets)) return nil } @@ -8862,6 +10554,7 @@ func autoConvert_management_UserProfile_To_v1_UserProfile(in *management.UserPro out.Email = in.Email out.Icon = (*string)(unsafe.Pointer(in.Icon)) out.Custom = in.Custom + out.Secrets = (*map[string]*UserProfileSecret)(unsafe.Pointer(in.Secrets)) return nil } @@ -8892,6 +10585,28 @@ func Convert_management_UserProfileList_To_v1_UserProfileList(in *management.Use return autoConvert_management_UserProfileList_To_v1_UserProfileList(in, out, s) } +func autoConvert_v1_UserProfileSecret_To_management_UserProfileSecret(in *UserProfileSecret, out *management.UserProfileSecret, s conversion.Scope) error { + out.Type = in.Type + out.Data = in.Data + return nil +} + +// Convert_v1_UserProfileSecret_To_management_UserProfileSecret is an autogenerated conversion function. +func Convert_v1_UserProfileSecret_To_management_UserProfileSecret(in *UserProfileSecret, out *management.UserProfileSecret, s conversion.Scope) error { + return autoConvert_v1_UserProfileSecret_To_management_UserProfileSecret(in, out, s) +} + +func autoConvert_management_UserProfileSecret_To_v1_UserProfileSecret(in *management.UserProfileSecret, out *UserProfileSecret, s conversion.Scope) error { + out.Type = in.Type + out.Data = in.Data + return nil +} + +// Convert_management_UserProfileSecret_To_v1_UserProfileSecret is an autogenerated conversion function. +func Convert_management_UserProfileSecret_To_v1_UserProfileSecret(in *management.UserProfileSecret, out *UserProfileSecret, s conversion.Scope) error { + return autoConvert_management_UserProfileSecret_To_v1_UserProfileSecret(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 @@ -9084,6 +10799,100 @@ func Convert_management_VirtualClusterAccessKeyList_To_v1_VirtualClusterAccessKe return autoConvert_management_VirtualClusterAccessKeyList_To_v1_VirtualClusterAccessKeyList(in, out, s) } +func autoConvert_v1_VirtualClusterExternalDatabase_To_management_VirtualClusterExternalDatabase(in *VirtualClusterExternalDatabase, out *management.VirtualClusterExternalDatabase, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_VirtualClusterExternalDatabaseSpec_To_management_VirtualClusterExternalDatabaseSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_VirtualClusterExternalDatabaseStatus_To_management_VirtualClusterExternalDatabaseStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_VirtualClusterExternalDatabase_To_management_VirtualClusterExternalDatabase is an autogenerated conversion function. +func Convert_v1_VirtualClusterExternalDatabase_To_management_VirtualClusterExternalDatabase(in *VirtualClusterExternalDatabase, out *management.VirtualClusterExternalDatabase, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterExternalDatabase_To_management_VirtualClusterExternalDatabase(in, out, s) +} + +func autoConvert_management_VirtualClusterExternalDatabase_To_v1_VirtualClusterExternalDatabase(in *management.VirtualClusterExternalDatabase, out *VirtualClusterExternalDatabase, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_VirtualClusterExternalDatabaseSpec_To_v1_VirtualClusterExternalDatabaseSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_VirtualClusterExternalDatabaseStatus_To_v1_VirtualClusterExternalDatabaseStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_VirtualClusterExternalDatabase_To_v1_VirtualClusterExternalDatabase is an autogenerated conversion function. +func Convert_management_VirtualClusterExternalDatabase_To_v1_VirtualClusterExternalDatabase(in *management.VirtualClusterExternalDatabase, out *VirtualClusterExternalDatabase, s conversion.Scope) error { + return autoConvert_management_VirtualClusterExternalDatabase_To_v1_VirtualClusterExternalDatabase(in, out, s) +} + +func autoConvert_v1_VirtualClusterExternalDatabaseList_To_management_VirtualClusterExternalDatabaseList(in *VirtualClusterExternalDatabaseList, out *management.VirtualClusterExternalDatabaseList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.VirtualClusterExternalDatabase)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_VirtualClusterExternalDatabaseList_To_management_VirtualClusterExternalDatabaseList is an autogenerated conversion function. +func Convert_v1_VirtualClusterExternalDatabaseList_To_management_VirtualClusterExternalDatabaseList(in *VirtualClusterExternalDatabaseList, out *management.VirtualClusterExternalDatabaseList, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterExternalDatabaseList_To_management_VirtualClusterExternalDatabaseList(in, out, s) +} + +func autoConvert_management_VirtualClusterExternalDatabaseList_To_v1_VirtualClusterExternalDatabaseList(in *management.VirtualClusterExternalDatabaseList, out *VirtualClusterExternalDatabaseList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]VirtualClusterExternalDatabase)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_VirtualClusterExternalDatabaseList_To_v1_VirtualClusterExternalDatabaseList is an autogenerated conversion function. +func Convert_management_VirtualClusterExternalDatabaseList_To_v1_VirtualClusterExternalDatabaseList(in *management.VirtualClusterExternalDatabaseList, out *VirtualClusterExternalDatabaseList, s conversion.Scope) error { + return autoConvert_management_VirtualClusterExternalDatabaseList_To_v1_VirtualClusterExternalDatabaseList(in, out, s) +} + +func autoConvert_v1_VirtualClusterExternalDatabaseSpec_To_management_VirtualClusterExternalDatabaseSpec(in *VirtualClusterExternalDatabaseSpec, out *management.VirtualClusterExternalDatabaseSpec, s conversion.Scope) error { + out.Connector = in.Connector + return nil +} + +// Convert_v1_VirtualClusterExternalDatabaseSpec_To_management_VirtualClusterExternalDatabaseSpec is an autogenerated conversion function. +func Convert_v1_VirtualClusterExternalDatabaseSpec_To_management_VirtualClusterExternalDatabaseSpec(in *VirtualClusterExternalDatabaseSpec, out *management.VirtualClusterExternalDatabaseSpec, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterExternalDatabaseSpec_To_management_VirtualClusterExternalDatabaseSpec(in, out, s) +} + +func autoConvert_management_VirtualClusterExternalDatabaseSpec_To_v1_VirtualClusterExternalDatabaseSpec(in *management.VirtualClusterExternalDatabaseSpec, out *VirtualClusterExternalDatabaseSpec, s conversion.Scope) error { + out.Connector = in.Connector + return nil +} + +// Convert_management_VirtualClusterExternalDatabaseSpec_To_v1_VirtualClusterExternalDatabaseSpec is an autogenerated conversion function. +func Convert_management_VirtualClusterExternalDatabaseSpec_To_v1_VirtualClusterExternalDatabaseSpec(in *management.VirtualClusterExternalDatabaseSpec, out *VirtualClusterExternalDatabaseSpec, s conversion.Scope) error { + return autoConvert_management_VirtualClusterExternalDatabaseSpec_To_v1_VirtualClusterExternalDatabaseSpec(in, out, s) +} + +func autoConvert_v1_VirtualClusterExternalDatabaseStatus_To_management_VirtualClusterExternalDatabaseStatus(in *VirtualClusterExternalDatabaseStatus, out *management.VirtualClusterExternalDatabaseStatus, s conversion.Scope) error { + out.DataSource = in.DataSource + return nil +} + +// Convert_v1_VirtualClusterExternalDatabaseStatus_To_management_VirtualClusterExternalDatabaseStatus is an autogenerated conversion function. +func Convert_v1_VirtualClusterExternalDatabaseStatus_To_management_VirtualClusterExternalDatabaseStatus(in *VirtualClusterExternalDatabaseStatus, out *management.VirtualClusterExternalDatabaseStatus, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterExternalDatabaseStatus_To_management_VirtualClusterExternalDatabaseStatus(in, out, s) +} + +func autoConvert_management_VirtualClusterExternalDatabaseStatus_To_v1_VirtualClusterExternalDatabaseStatus(in *management.VirtualClusterExternalDatabaseStatus, out *VirtualClusterExternalDatabaseStatus, s conversion.Scope) error { + out.DataSource = in.DataSource + return nil +} + +// Convert_management_VirtualClusterExternalDatabaseStatus_To_v1_VirtualClusterExternalDatabaseStatus is an autogenerated conversion function. +func Convert_management_VirtualClusterExternalDatabaseStatus_To_v1_VirtualClusterExternalDatabaseStatus(in *management.VirtualClusterExternalDatabaseStatus, out *VirtualClusterExternalDatabaseStatus, s conversion.Scope) error { + return autoConvert_management_VirtualClusterExternalDatabaseStatus_To_v1_VirtualClusterExternalDatabaseStatus(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 { @@ -9432,6 +11241,134 @@ func Convert_management_VirtualClusterInstanceStatus_To_v1_VirtualClusterInstanc return autoConvert_management_VirtualClusterInstanceStatus_To_v1_VirtualClusterInstanceStatus(in, out, s) } +func autoConvert_v1_VirtualClusterRole_To_management_VirtualClusterRole(in *VirtualClusterRole, out *management.VirtualClusterRole, s conversion.Scope) error { + if err := Convert_v1_ObjectName_To_management_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + out.Role = in.Role + if err := Convert_v1_AssignedVia_To_management_AssignedVia(&in.AssignedVia, &out.AssignedVia, s); err != nil { + return err + } + return nil +} + +// Convert_v1_VirtualClusterRole_To_management_VirtualClusterRole is an autogenerated conversion function. +func Convert_v1_VirtualClusterRole_To_management_VirtualClusterRole(in *VirtualClusterRole, out *management.VirtualClusterRole, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterRole_To_management_VirtualClusterRole(in, out, s) +} + +func autoConvert_management_VirtualClusterRole_To_v1_VirtualClusterRole(in *management.VirtualClusterRole, out *VirtualClusterRole, s conversion.Scope) error { + if err := Convert_management_ObjectName_To_v1_ObjectName(&in.ObjectName, &out.ObjectName, s); err != nil { + return err + } + out.Role = in.Role + if err := Convert_management_AssignedVia_To_v1_AssignedVia(&in.AssignedVia, &out.AssignedVia, s); err != nil { + return err + } + return nil +} + +// Convert_management_VirtualClusterRole_To_v1_VirtualClusterRole is an autogenerated conversion function. +func Convert_management_VirtualClusterRole_To_v1_VirtualClusterRole(in *management.VirtualClusterRole, out *VirtualClusterRole, s conversion.Scope) error { + return autoConvert_management_VirtualClusterRole_To_v1_VirtualClusterRole(in, out, s) +} + +func autoConvert_v1_VirtualClusterSchema_To_management_VirtualClusterSchema(in *VirtualClusterSchema, out *management.VirtualClusterSchema, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_VirtualClusterSchemaSpec_To_management_VirtualClusterSchemaSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_VirtualClusterSchemaStatus_To_management_VirtualClusterSchemaStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_VirtualClusterSchema_To_management_VirtualClusterSchema is an autogenerated conversion function. +func Convert_v1_VirtualClusterSchema_To_management_VirtualClusterSchema(in *VirtualClusterSchema, out *management.VirtualClusterSchema, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterSchema_To_management_VirtualClusterSchema(in, out, s) +} + +func autoConvert_management_VirtualClusterSchema_To_v1_VirtualClusterSchema(in *management.VirtualClusterSchema, out *VirtualClusterSchema, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_management_VirtualClusterSchemaSpec_To_v1_VirtualClusterSchemaSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_management_VirtualClusterSchemaStatus_To_v1_VirtualClusterSchemaStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_management_VirtualClusterSchema_To_v1_VirtualClusterSchema is an autogenerated conversion function. +func Convert_management_VirtualClusterSchema_To_v1_VirtualClusterSchema(in *management.VirtualClusterSchema, out *VirtualClusterSchema, s conversion.Scope) error { + return autoConvert_management_VirtualClusterSchema_To_v1_VirtualClusterSchema(in, out, s) +} + +func autoConvert_v1_VirtualClusterSchemaList_To_management_VirtualClusterSchemaList(in *VirtualClusterSchemaList, out *management.VirtualClusterSchemaList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]management.VirtualClusterSchema)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_VirtualClusterSchemaList_To_management_VirtualClusterSchemaList is an autogenerated conversion function. +func Convert_v1_VirtualClusterSchemaList_To_management_VirtualClusterSchemaList(in *VirtualClusterSchemaList, out *management.VirtualClusterSchemaList, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterSchemaList_To_management_VirtualClusterSchemaList(in, out, s) +} + +func autoConvert_management_VirtualClusterSchemaList_To_v1_VirtualClusterSchemaList(in *management.VirtualClusterSchemaList, out *VirtualClusterSchemaList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]VirtualClusterSchema)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_management_VirtualClusterSchemaList_To_v1_VirtualClusterSchemaList is an autogenerated conversion function. +func Convert_management_VirtualClusterSchemaList_To_v1_VirtualClusterSchemaList(in *management.VirtualClusterSchemaList, out *VirtualClusterSchemaList, s conversion.Scope) error { + return autoConvert_management_VirtualClusterSchemaList_To_v1_VirtualClusterSchemaList(in, out, s) +} + +func autoConvert_v1_VirtualClusterSchemaSpec_To_management_VirtualClusterSchemaSpec(in *VirtualClusterSchemaSpec, out *management.VirtualClusterSchemaSpec, s conversion.Scope) error { + out.Version = in.Version + return nil +} + +// Convert_v1_VirtualClusterSchemaSpec_To_management_VirtualClusterSchemaSpec is an autogenerated conversion function. +func Convert_v1_VirtualClusterSchemaSpec_To_management_VirtualClusterSchemaSpec(in *VirtualClusterSchemaSpec, out *management.VirtualClusterSchemaSpec, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterSchemaSpec_To_management_VirtualClusterSchemaSpec(in, out, s) +} + +func autoConvert_management_VirtualClusterSchemaSpec_To_v1_VirtualClusterSchemaSpec(in *management.VirtualClusterSchemaSpec, out *VirtualClusterSchemaSpec, s conversion.Scope) error { + out.Version = in.Version + return nil +} + +// Convert_management_VirtualClusterSchemaSpec_To_v1_VirtualClusterSchemaSpec is an autogenerated conversion function. +func Convert_management_VirtualClusterSchemaSpec_To_v1_VirtualClusterSchemaSpec(in *management.VirtualClusterSchemaSpec, out *VirtualClusterSchemaSpec, s conversion.Scope) error { + return autoConvert_management_VirtualClusterSchemaSpec_To_v1_VirtualClusterSchemaSpec(in, out, s) +} + +func autoConvert_v1_VirtualClusterSchemaStatus_To_management_VirtualClusterSchemaStatus(in *VirtualClusterSchemaStatus, out *management.VirtualClusterSchemaStatus, s conversion.Scope) error { + out.Schema = in.Schema + out.DefaultValues = in.DefaultValues + return nil +} + +// Convert_v1_VirtualClusterSchemaStatus_To_management_VirtualClusterSchemaStatus is an autogenerated conversion function. +func Convert_v1_VirtualClusterSchemaStatus_To_management_VirtualClusterSchemaStatus(in *VirtualClusterSchemaStatus, out *management.VirtualClusterSchemaStatus, s conversion.Scope) error { + return autoConvert_v1_VirtualClusterSchemaStatus_To_management_VirtualClusterSchemaStatus(in, out, s) +} + +func autoConvert_management_VirtualClusterSchemaStatus_To_v1_VirtualClusterSchemaStatus(in *management.VirtualClusterSchemaStatus, out *VirtualClusterSchemaStatus, s conversion.Scope) error { + out.Schema = in.Schema + out.DefaultValues = in.DefaultValues + return nil +} + +// Convert_management_VirtualClusterSchemaStatus_To_v1_VirtualClusterSchemaStatus is an autogenerated conversion function. +func Convert_management_VirtualClusterSchemaStatus_To_v1_VirtualClusterSchemaStatus(in *management.VirtualClusterSchemaStatus, out *VirtualClusterSchemaStatus, s conversion.Scope) error { + return autoConvert_management_VirtualClusterSchemaStatus_To_v1_VirtualClusterSchemaStatus(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 { diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.deepcopy.go index e3d7217d..49ee978d 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.deepcopy.go @@ -12,6 +12,7 @@ import ( auditv1 "github.com/loft-sh/api/v4/pkg/apis/audit/v1" storagev1 "github.com/loft-sh/api/v4/pkg/apis/storage/v1" uiv1 "github.com/loft-sh/api/v4/pkg/apis/ui/v1" + corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -153,6 +154,28 @@ func (in *AgentAuditEventStatus) DeepCopy() *AgentAuditEventStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentCostControlConfig) DeepCopyInto(out *AgentCostControlConfig) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + in.CostControlClusterConfig.DeepCopyInto(&out.CostControlClusterConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentCostControlConfig. +func (in *AgentCostControlConfig) DeepCopy() *AgentCostControlConfig { + if in == nil { + return nil + } + out := new(AgentCostControlConfig) + 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 @@ -436,6 +459,23 @@ func (in *Apps) DeepCopy() *Apps { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AssignedVia) DeepCopyInto(out *AssignedVia) { + *out = *in + out.ObjectName = in.ObjectName + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssignedVia. +func (in *AssignedVia) DeepCopy() *AssignedVia { + if in == nil { + return nil + } + out := new(AssignedVia) + 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 @@ -582,6 +622,11 @@ func (in *Authentication) DeepCopyInto(out *Authentication) { (*out)[key] = val } } + if in.GroupsFilters != nil { + in, out := &in.GroupsFilters, &out.GroupsFilters + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -990,13 +1035,30 @@ func (in *BackupStatus) DeepCopy() *BackupStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Cloud) DeepCopyInto(out *Cloud) { + *out = *in + out.MaintenanceWindow = in.MaintenanceWindow + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cloud. +func (in *Cloud) DeepCopy() *Cloud { + if in == nil { + return nil + } + out := new(Cloud) + 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 + in.Status.DeepCopyInto(&out.Status) return } @@ -1138,6 +1200,29 @@ func (in *ClusterAccessList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessRole) DeepCopyInto(out *ClusterAccessRole) { + *out = *in + out.ObjectName = in.ObjectName + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]ObjectName, len(*in)) + copy(*out, *in) + } + out.AssignedVia = in.AssignedVia + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessRole. +func (in *ClusterAccessRole) DeepCopy() *ClusterAccessRole { + if in == nil { + return nil + } + out := new(ClusterAccessRole) + in.DeepCopyInto(out) + return out +} + // 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 @@ -1268,6 +1353,11 @@ func (in *ClusterAgentConfigCommon) DeepCopyInto(out *ClusterAgentConfigCommon) copy(*out, *in) } out.AnalyticsSpec = in.AnalyticsSpec + if in.CostControl != nil { + in, out := &in.CostControl, &out.CostControl + *out = new(AgentCostControlConfig) + (*in).DeepCopyInto(*out) + } return } @@ -1812,7 +1902,7 @@ func (in *ClusterSpec) DeepCopy() *ClusterSpec { // 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 + in.ClusterStatus.DeepCopyInto(&out.ClusterStatus) return } @@ -2006,6 +2096,16 @@ func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus) { *out = new(storagev1.VaultIntegrationSpec) (*in).DeepCopyInto(*out) } + if in.Cloud != nil { + in, out := &in.Cloud, &out.Cloud + *out = new(Cloud) + **out = **in + } + if in.CostControl != nil { + in, out := &in.CostControl, &out.CostControl + *out = new(CostControl) + (*in).DeepCopyInto(*out) + } return } @@ -2087,7 +2187,7 @@ func (in *ConvertVirtualClusterConfig) DeepCopyInto(out *ConvertVirtualClusterCo *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status return } @@ -2146,6 +2246,13 @@ func (in *ConvertVirtualClusterConfigList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConvertVirtualClusterConfigSpec) DeepCopyInto(out *ConvertVirtualClusterConfigSpec) { *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 } @@ -2176,136 +2283,175 @@ func (in *ConvertVirtualClusterConfigStatus) DeepCopy() *ConvertVirtualClusterCo } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodDeleteOptions) DeepCopyInto(out *DevPodDeleteOptions) { +func (in *CostControl) DeepCopyInto(out *CostControl) { *out = *in - out.TypeMeta = in.TypeMeta + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + in.Global.DeepCopyInto(&out.Global) + in.Cluster.DeepCopyInto(&out.Cluster) + if in.Settings != nil { + in, out := &in.Settings, &out.Settings + *out = new(CostControlSettings) + (*in).DeepCopyInto(*out) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodDeleteOptions. -func (in *DevPodDeleteOptions) DeepCopy() *DevPodDeleteOptions { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControl. +func (in *CostControl) DeepCopy() *CostControl { if in == nil { return nil } - out := new(DevPodDeleteOptions) + out := new(CostControl) 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 *DevPodDeleteOptionsList) DeepCopyInto(out *DevPodDeleteOptionsList) { +func (in *CostControlClusterConfig) DeepCopyInto(out *CostControlClusterConfig) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DevPodDeleteOptions, len(*in)) - copy(*out, *in) + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = new(storagev1.Metrics) + (*in).DeepCopyInto(*out) + } + if in.OpenCost != nil { + in, out := &in.OpenCost, &out.OpenCost + *out = new(storagev1.OpenCost) + (*in).DeepCopyInto(*out) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodDeleteOptionsList. -func (in *DevPodDeleteOptionsList) DeepCopy() *DevPodDeleteOptionsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControlClusterConfig. +func (in *CostControlClusterConfig) DeepCopy() *CostControlClusterConfig { if in == nil { return nil } - out := new(DevPodDeleteOptionsList) + out := new(CostControlClusterConfig) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodDeleteOptionsList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CostControlGPUSettings) DeepCopyInto(out *CostControlGPUSettings) { + *out = *in + if in.AvgGPUPrice != nil { + in, out := &in.AvgGPUPrice, &out.AvgGPUPrice + *out = new(CostControlResourcePrice) + **out = **in } - return nil + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControlGPUSettings. +func (in *CostControlGPUSettings) DeepCopy() *CostControlGPUSettings { + if in == nil { + return nil + } + out := new(CostControlGPUSettings) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodSshOptions) DeepCopyInto(out *DevPodSshOptions) { +func (in *CostControlGlobalConfig) DeepCopyInto(out *CostControlGlobalConfig) { *out = *in - out.TypeMeta = in.TypeMeta + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = new(storagev1.Metrics) + (*in).DeepCopyInto(*out) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodSshOptions. -func (in *DevPodSshOptions) DeepCopy() *DevPodSshOptions { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControlGlobalConfig. +func (in *CostControlGlobalConfig) DeepCopy() *CostControlGlobalConfig { if in == nil { return nil } - out := new(DevPodSshOptions) + out := new(CostControlGlobalConfig) 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 +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CostControlResourcePrice) DeepCopyInto(out *CostControlResourcePrice) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControlResourcePrice. +func (in *CostControlResourcePrice) DeepCopy() *CostControlResourcePrice { + if in == nil { + return nil } - return nil + out := new(CostControlResourcePrice) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodSshOptionsList) DeepCopyInto(out *DevPodSshOptionsList) { +func (in *CostControlSettings) DeepCopyInto(out *CostControlSettings) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DevPodSshOptions, len(*in)) - copy(*out, *in) + if in.AvgCPUPricePerNode != nil { + in, out := &in.AvgCPUPricePerNode, &out.AvgCPUPricePerNode + *out = new(CostControlResourcePrice) + **out = **in + } + if in.AvgRAMPricePerNode != nil { + in, out := &in.AvgRAMPricePerNode, &out.AvgRAMPricePerNode + *out = new(CostControlResourcePrice) + **out = **in + } + if in.GPUSettings != nil { + in, out := &in.GPUSettings, &out.GPUSettings + *out = new(CostControlGPUSettings) + (*in).DeepCopyInto(*out) + } + if in.ControlPlanePricePerCluster != nil { + in, out := &in.ControlPlanePricePerCluster, &out.ControlPlanePricePerCluster + *out = new(CostControlResourcePrice) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodSshOptionsList. -func (in *DevPodSshOptionsList) DeepCopy() *DevPodSshOptionsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControlSettings. +func (in *CostControlSettings) DeepCopy() *CostControlSettings { if in == nil { return nil } - out := new(DevPodSshOptionsList) + out := new(CostControlSettings) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodSshOptionsList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != 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) { +func (in *DatabaseConnector) DeepCopyInto(out *DatabaseConnector) { *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 DevPodStatusOptions. -func (in *DevPodStatusOptions) DeepCopy() *DevPodStatusOptions { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseConnector. +func (in *DatabaseConnector) DeepCopy() *DatabaseConnector { if in == nil { return nil } - out := new(DevPodStatusOptions) + out := new(DatabaseConnector) 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 { +func (in *DatabaseConnector) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2313,30 +2459,32 @@ func (in *DevPodStatusOptions) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodStatusOptionsList) DeepCopyInto(out *DevPodStatusOptionsList) { +func (in *DatabaseConnectorList) DeepCopyInto(out *DatabaseConnectorList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]DevPodStatusOptions, len(*in)) - copy(*out, *in) + *out = make([]DatabaseConnector, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStatusOptionsList. -func (in *DevPodStatusOptionsList) DeepCopy() *DevPodStatusOptionsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseConnectorList. +func (in *DatabaseConnectorList) DeepCopy() *DatabaseConnectorList { if in == nil { return nil } - out := new(DevPodStatusOptionsList) + out := new(DatabaseConnectorList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodStatusOptionsList) DeepCopyObject() runtime.Object { +func (in *DatabaseConnectorList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2344,80 +2492,56 @@ func (in *DevPodStatusOptionsList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodStopOptions) DeepCopyInto(out *DevPodStopOptions) { +func (in *DatabaseConnectorSpec) DeepCopyInto(out *DatabaseConnectorSpec) { *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 { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseConnectorSpec. +func (in *DatabaseConnectorSpec) DeepCopy() *DatabaseConnectorSpec { if in == nil { return nil } - out := new(DevPodStopOptions) + out := new(DatabaseConnectorSpec) 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 *DevPodStopOptionsList) DeepCopyInto(out *DevPodStopOptionsList) { +func (in *DatabaseConnectorStatus) DeepCopyInto(out *DatabaseConnectorStatus) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DevPodStopOptions, len(*in)) - copy(*out, *in) - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStopOptionsList. -func (in *DevPodStopOptionsList) DeepCopy() *DevPodStopOptionsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseConnectorStatus. +func (in *DatabaseConnectorStatus) DeepCopy() *DatabaseConnectorStatus { if in == nil { return nil } - out := new(DevPodStopOptionsList) + out := new(DatabaseConnectorStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodStopOptionsList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != 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) { +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 DevPodUpOptions. -func (in *DevPodUpOptions) DeepCopy() *DevPodUpOptions { +// 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(DevPodUpOptions) + out := new(DevPodDeleteOptions) 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 { +func (in *DevPodDeleteOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2425,30 +2549,30 @@ func (in *DevPodUpOptions) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodUpOptionsList) DeepCopyInto(out *DevPodUpOptionsList) { +func (in *DevPodDeleteOptionsList) DeepCopyInto(out *DevPodDeleteOptionsList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]DevPodUpOptions, len(*in)) + *out = make([]DevPodDeleteOptions, len(*in)) copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodUpOptionsList. -func (in *DevPodUpOptionsList) DeepCopy() *DevPodUpOptionsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodDeleteOptionsList. +func (in *DevPodDeleteOptionsList) DeepCopy() *DevPodDeleteOptionsList { if in == nil { return nil } - out := new(DevPodUpOptionsList) + out := new(DevPodDeleteOptionsList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodUpOptionsList) DeepCopyObject() runtime.Object { +func (in *DevPodDeleteOptionsList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2456,27 +2580,27 @@ func (in *DevPodUpOptionsList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstance) DeepCopyInto(out *DevPodWorkspaceInstance) { +func (in *DevPodEnvironmentTemplate) DeepCopyInto(out *DevPodEnvironmentTemplate) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + out.Status = in.Status return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstance. -func (in *DevPodWorkspaceInstance) DeepCopy() *DevPodWorkspaceInstance { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplate. +func (in *DevPodEnvironmentTemplate) DeepCopy() *DevPodEnvironmentTemplate { if in == nil { return nil } - out := new(DevPodWorkspaceInstance) + out := new(DevPodEnvironmentTemplate) 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 { +func (in *DevPodEnvironmentTemplate) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2484,13 +2608,13 @@ func (in *DevPodWorkspaceInstance) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstanceList) DeepCopyInto(out *DevPodWorkspaceInstanceList) { +func (in *DevPodEnvironmentTemplateList) DeepCopyInto(out *DevPodEnvironmentTemplateList) { *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)) + *out = make([]DevPodEnvironmentTemplate, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -2498,18 +2622,18 @@ func (in *DevPodWorkspaceInstanceList) DeepCopyInto(out *DevPodWorkspaceInstance return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceList. -func (in *DevPodWorkspaceInstanceList) DeepCopy() *DevPodWorkspaceInstanceList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateList. +func (in *DevPodEnvironmentTemplateList) DeepCopy() *DevPodEnvironmentTemplateList { if in == nil { return nil } - out := new(DevPodWorkspaceInstanceList) + out := new(DevPodEnvironmentTemplateList) 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 { +func (in *DevPodEnvironmentTemplateList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2517,24 +2641,342 @@ func (in *DevPodWorkspaceInstanceList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstanceSpec) DeepCopyInto(out *DevPodWorkspaceInstanceSpec) { +func (in *DevPodEnvironmentTemplateSpec) DeepCopyInto(out *DevPodEnvironmentTemplateSpec) { *out = *in - in.DevPodWorkspaceInstanceSpec.DeepCopyInto(&out.DevPodWorkspaceInstanceSpec) + in.DevPodEnvironmentTemplateSpec.DeepCopyInto(&out.DevPodEnvironmentTemplateSpec) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceSpec. -func (in *DevPodWorkspaceInstanceSpec) DeepCopy() *DevPodWorkspaceInstanceSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateSpec. +func (in *DevPodEnvironmentTemplateSpec) DeepCopy() *DevPodEnvironmentTemplateSpec { if in == nil { return nil } - out := new(DevPodWorkspaceInstanceSpec) + out := new(DevPodEnvironmentTemplateSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstanceState) DeepCopyInto(out *DevPodWorkspaceInstanceState) { +func (in *DevPodEnvironmentTemplateStatus) DeepCopyInto(out *DevPodEnvironmentTemplateStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateStatus. +func (in *DevPodEnvironmentTemplateStatus) DeepCopy() *DevPodEnvironmentTemplateStatus { + if in == nil { + return nil + } + out := new(DevPodEnvironmentTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// 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 *DevPodSshOptionsList) DeepCopyInto(out *DevPodSshOptionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodSshOptions, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodSshOptionsList. +func (in *DevPodSshOptionsList) DeepCopy() *DevPodSshOptionsList { + if in == nil { + return nil + } + out := new(DevPodSshOptionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodSshOptionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 *DevPodStatusOptionsList) DeepCopyInto(out *DevPodStatusOptionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodStatusOptions, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStatusOptionsList. +func (in *DevPodStatusOptionsList) DeepCopy() *DevPodStatusOptionsList { + if in == nil { + return nil + } + out := new(DevPodStatusOptionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodStatusOptionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 *DevPodStopOptionsList) DeepCopyInto(out *DevPodStopOptionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodStopOptions, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStopOptionsList. +func (in *DevPodStopOptionsList) DeepCopy() *DevPodStopOptionsList { + if in == nil { + return nil + } + out := new(DevPodStopOptionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodStopOptionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 *DevPodUpOptionsList) DeepCopyInto(out *DevPodUpOptionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodUpOptions, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodUpOptionsList. +func (in *DevPodUpOptionsList) DeepCopy() *DevPodUpOptionsList { + if in == nil { + return nil + } + out := new(DevPodUpOptionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodUpOptionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 *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 *DevPodWorkspaceInstanceState) DeepCopyInto(out *DevPodWorkspaceInstanceState) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -2560,56 +3002,255 @@ func (in *DevPodWorkspaceInstanceState) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstanceStateList) DeepCopyInto(out *DevPodWorkspaceInstanceStateList) { +func (in *DevPodWorkspaceInstanceStateList) DeepCopyInto(out *DevPodWorkspaceInstanceStateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceState, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStateList. +func (in *DevPodWorkspaceInstanceStateList) DeepCopy() *DevPodWorkspaceInstanceStateList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceStateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceStateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 *DevPodWorkspaceInstanceTroubleshoot) DeepCopyInto(out *DevPodWorkspaceInstanceTroubleshoot) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Workspace != nil { + in, out := &in.Workspace, &out.Workspace + *out = new(DevPodWorkspaceInstance) + (*in).DeepCopyInto(*out) + } + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(storagev1.DevPodWorkspaceTemplate) + (*in).DeepCopyInto(*out) + } + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = make([]corev1.Pod, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PVCs != nil { + in, out := &in.PVCs, &out.PVCs + *out = make([]corev1.PersistentVolumeClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Errors != nil { + in, out := &in.Errors, &out.Errors + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceTroubleshoot. +func (in *DevPodWorkspaceInstanceTroubleshoot) DeepCopy() *DevPodWorkspaceInstanceTroubleshoot { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceTroubleshoot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceTroubleshoot) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceTroubleshootList) DeepCopyInto(out *DevPodWorkspaceInstanceTroubleshootList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceTroubleshoot, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceTroubleshootList. +func (in *DevPodWorkspaceInstanceTroubleshootList) DeepCopy() *DevPodWorkspaceInstanceTroubleshootList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceTroubleshootList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceTroubleshootList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePreset) DeepCopyInto(out *DevPodWorkspacePreset) { + *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 DevPodWorkspacePreset. +func (in *DevPodWorkspacePreset) DeepCopy() *DevPodWorkspacePreset { + if in == nil { + return nil + } + out := new(DevPodWorkspacePreset) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspacePreset) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePresetList) DeepCopyInto(out *DevPodWorkspacePresetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspacePreset, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetList. +func (in *DevPodWorkspacePresetList) DeepCopy() *DevPodWorkspacePresetList { + if in == nil { + return nil + } + out := new(DevPodWorkspacePresetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspacePresetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePresetSource) DeepCopyInto(out *DevPodWorkspacePresetSource) { + *out = *in + out.DevPodWorkspacePresetSource = in.DevPodWorkspacePresetSource + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetSource. +func (in *DevPodWorkspacePresetSource) DeepCopy() *DevPodWorkspacePresetSource { + if in == nil { + return nil + } + out := new(DevPodWorkspacePresetSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePresetSpec) DeepCopyInto(out *DevPodWorkspacePresetSpec) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DevPodWorkspaceInstanceState, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.DevPodWorkspacePresetSpec.DeepCopyInto(&out.DevPodWorkspacePresetSpec) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStateList. -func (in *DevPodWorkspaceInstanceStateList) DeepCopy() *DevPodWorkspaceInstanceStateList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetSpec. +func (in *DevPodWorkspacePresetSpec) DeepCopy() *DevPodWorkspacePresetSpec { if in == nil { return nil } - out := new(DevPodWorkspaceInstanceStateList) + out := new(DevPodWorkspacePresetSpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodWorkspaceInstanceStateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != 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) { +func (in *DevPodWorkspacePresetStatus) DeepCopyInto(out *DevPodWorkspacePresetStatus) { *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 { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetStatus. +func (in *DevPodWorkspacePresetStatus) DeepCopy() *DevPodWorkspacePresetStatus { if in == nil { return nil } - out := new(DevPodWorkspaceInstanceStatus) + out := new(DevPodWorkspacePresetStatus) in.DeepCopyInto(out) return out } @@ -2907,7 +3548,7 @@ func (in *Feature) DeepCopyInto(out *Feature) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) + out.Status = in.Status return } @@ -2981,7 +3622,7 @@ func (in *FeatureSpec) DeepCopy() *FeatureSpec { // 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 - in.Feature.DeepCopyInto(&out.Feature) + out.Feature = in.Feature return } @@ -3608,12 +4249,46 @@ func (in *LoftUpgradeStatus) DeepCopy() *LoftUpgradeStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MaintenanceWindow) DeepCopyInto(out *MaintenanceWindow) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceWindow. +func (in *MaintenanceWindow) DeepCopy() *MaintenanceWindow { + if in == nil { + return nil + } + out := new(MaintenanceWindow) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementRole) DeepCopyInto(out *ManagementRole) { + *out = *in + out.ObjectName = in.ObjectName + out.AssignedVia = in.AssignedVia + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementRole. +func (in *ManagementRole) DeepCopy() *ManagementRole { + if in == nil { + return nil + } + out := new(ManagementRole) + 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)) + *out = make([]OIDCClientSpec, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -3633,6 +4308,67 @@ func (in *OIDC) DeepCopy() *OIDC { // 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 + 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 OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *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 OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.RedirectURIs != nil { in, out := &in.RedirectURIs, &out.RedirectURIs @@ -3642,12 +4378,66 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { if in == nil { return nil } - out := new(OIDCClient) + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectName) DeepCopyInto(out *ObjectName) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectName. +func (in *ObjectName) DeepCopy() *ObjectName { + if in == nil { + return nil + } + out := new(ObjectName) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectPermission) DeepCopyInto(out *ObjectPermission) { + *out = *in + out.ObjectName = in.ObjectName + 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 ObjectPermission. +func (in *ObjectPermission) DeepCopy() *ObjectPermission { + if in == nil { + return nil + } + out := new(ObjectPermission) in.DeepCopyInto(out) return out } @@ -4225,6 +5015,25 @@ func (in *ProjectMembersList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMembership) DeepCopyInto(out *ProjectMembership) { + *out = *in + out.ObjectName = in.ObjectName + out.Role = in.Role + out.AssignedVia = in.AssignedVia + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMembership. +func (in *ProjectMembership) DeepCopy() *ProjectMembership { + if in == nil { + return nil + } + out := new(ProjectMembership) + in.DeepCopyInto(out) + return out +} + // 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 @@ -4282,46 +5091,145 @@ func (in *ProjectMigrateSpaceInstanceList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } - return nil + 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 *ProjectMigrateSpaceInstanceSource) DeepCopyInto(out *ProjectMigrateSpaceInstanceSource) { +func (in *ProjectRole) DeepCopyInto(out *ProjectRole) { *out = *in + out.ObjectName = in.ObjectName return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateSpaceInstanceSource. -func (in *ProjectMigrateSpaceInstanceSource) DeepCopy() *ProjectMigrateSpaceInstanceSource { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRole. +func (in *ProjectRole) DeepCopy() *ProjectRole { if in == nil { return nil } - out := new(ProjectMigrateSpaceInstanceSource) + out := new(ProjectRole) 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) { +func (in *ProjectRunners) DeepCopyInto(out *ProjectRunners) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.SourceVirtualClusterInstance = in.SourceVirtualClusterInstance + 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 ProjectMigrateVirtualClusterInstance. -func (in *ProjectMigrateVirtualClusterInstance) DeepCopy() *ProjectMigrateVirtualClusterInstance { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRunners. +func (in *ProjectRunners) DeepCopy() *ProjectRunners { if in == nil { return nil } - out := new(ProjectMigrateVirtualClusterInstance) + out := new(ProjectRunners) 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 { +func (in *ProjectRunners) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4329,13 +5237,13 @@ func (in *ProjectMigrateVirtualClusterInstance) DeepCopyObject() runtime.Object } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopyInto(out *ProjectMigrateVirtualClusterInstanceList) { +func (in *ProjectRunnersList) DeepCopyInto(out *ProjectRunnersList) { *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)) + *out = make([]ProjectRunners, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -4343,40 +5251,24 @@ func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopyInto(out *ProjectMig return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateVirtualClusterInstanceList. -func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopy() *ProjectMigrateVirtualClusterInstanceList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRunnersList. +func (in *ProjectRunnersList) DeepCopy() *ProjectRunnersList { if in == nil { return nil } - out := new(ProjectMigrateVirtualClusterInstanceList) + out := new(ProjectRunnersList) 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 { +func (in *ProjectRunnersList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != 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 @@ -4564,6 +5456,20 @@ func (in *ProjectTemplates) DeepCopyInto(out *ProjectTemplates) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DevPodEnvironmentTemplates != nil { + in, out := &in.DevPodEnvironmentTemplates, &out.DevPodEnvironmentTemplates + *out = make([]DevPodEnvironmentTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DevPodWorkspacePresets != nil { + in, out := &in.DevPodWorkspacePresets, &out.DevPodWorkspacePresets + *out = make([]DevPodWorkspacePreset, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -6103,7 +7009,254 @@ func (in *TeamClustersList) DeepCopy() *TeamClustersList { } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TeamClustersList) DeepCopyObject() 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 *TeamObjectPermissions) DeepCopyInto(out *TeamObjectPermissions) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.ObjectPermissions != nil { + in, out := &in.ObjectPermissions, &out.ObjectPermissions + *out = make([]ObjectPermission, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamObjectPermissions. +func (in *TeamObjectPermissions) DeepCopy() *TeamObjectPermissions { + if in == nil { + return nil + } + out := new(TeamObjectPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamObjectPermissions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamObjectPermissionsList) DeepCopyInto(out *TeamObjectPermissionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TeamObjectPermissions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamObjectPermissionsList. +func (in *TeamObjectPermissionsList) DeepCopy() *TeamObjectPermissionsList { + if in == nil { + return nil + } + out := new(TeamObjectPermissionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamObjectPermissionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamPermissions) DeepCopyInto(out *TeamPermissions) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Members != nil { + in, out := &in.Members, &out.Members + *out = make([]ObjectName, len(*in)) + copy(*out, *in) + } + if in.ProjectMemberships != nil { + in, out := &in.ProjectMemberships, &out.ProjectMemberships + *out = make([]ProjectMembership, len(*in)) + copy(*out, *in) + } + if in.ManagementRoles != nil { + in, out := &in.ManagementRoles, &out.ManagementRoles + *out = make([]ManagementRole, len(*in)) + copy(*out, *in) + } + if in.ClusterAccessRoles != nil { + in, out := &in.ClusterAccessRoles, &out.ClusterAccessRoles + *out = make([]ClusterAccessRole, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualClusterRoles != nil { + in, out := &in.VirtualClusterRoles, &out.VirtualClusterRoles + *out = make([]VirtualClusterRole, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamPermissions. +func (in *TeamPermissions) DeepCopy() *TeamPermissions { + if in == nil { + return nil + } + out := new(TeamPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamPermissions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamPermissionsList) DeepCopyInto(out *TeamPermissionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TeamPermissions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamPermissionsList. +func (in *TeamPermissionsList) DeepCopy() *TeamPermissionsList { + if in == nil { + return nil + } + out := new(TeamPermissionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamPermissionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 + out.TeamStatus = in.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 *TranslateVClusterResourceName) DeepCopyInto(out *TranslateVClusterResourceName) { + *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 TranslateVClusterResourceName. +func (in *TranslateVClusterResourceName) DeepCopy() *TranslateVClusterResourceName { + if in == nil { + return nil + } + out := new(TranslateVClusterResourceName) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TranslateVClusterResourceName) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6111,13 +7264,13 @@ func (in *TeamClustersList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TeamList) DeepCopyInto(out *TeamList) { +func (in *TranslateVClusterResourceNameList) DeepCopyInto(out *TranslateVClusterResourceNameList) { *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)) + *out = make([]TranslateVClusterResourceName, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -6125,18 +7278,18 @@ func (in *TeamList) DeepCopyInto(out *TeamList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamList. -func (in *TeamList) DeepCopy() *TeamList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TranslateVClusterResourceNameList. +func (in *TranslateVClusterResourceNameList) DeepCopy() *TranslateVClusterResourceNameList { if in == nil { return nil } - out := new(TeamList) + out := new(TranslateVClusterResourceNameList) 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 { +func (in *TranslateVClusterResourceNameList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6144,35 +7297,33 @@ func (in *TeamList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TeamSpec) DeepCopyInto(out *TeamSpec) { +func (in *TranslateVClusterResourceNameSpec) DeepCopyInto(out *TranslateVClusterResourceNameSpec) { *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 { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TranslateVClusterResourceNameSpec. +func (in *TranslateVClusterResourceNameSpec) DeepCopy() *TranslateVClusterResourceNameSpec { if in == nil { return nil } - out := new(TeamSpec) + out := new(TranslateVClusterResourceNameSpec) 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) { +func (in *TranslateVClusterResourceNameStatus) DeepCopyInto(out *TranslateVClusterResourceNameStatus) { *out = *in - out.TeamStatus = in.TeamStatus return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamStatus. -func (in *TeamStatus) DeepCopy() *TeamStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TranslateVClusterResourceNameStatus. +func (in *TranslateVClusterResourceNameStatus) DeepCopy() *TranslateVClusterResourceNameStatus { if in == nil { return nil } - out := new(TeamStatus) + out := new(TranslateVClusterResourceNameStatus) in.DeepCopyInto(out) return out } @@ -6398,6 +7549,72 @@ func (in *UserList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserObjectPermissions) DeepCopyInto(out *UserObjectPermissions) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.ObjectPermissions != nil { + in, out := &in.ObjectPermissions, &out.ObjectPermissions + *out = make([]ObjectPermission, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserObjectPermissions. +func (in *UserObjectPermissions) DeepCopy() *UserObjectPermissions { + if in == nil { + return nil + } + out := new(UserObjectPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserObjectPermissions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserObjectPermissionsList) DeepCopyInto(out *UserObjectPermissionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserObjectPermissions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserObjectPermissionsList. +func (in *UserObjectPermissionsList) DeepCopy() *UserObjectPermissionsList { + if in == nil { + return nil + } + out := new(UserObjectPermissionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserObjectPermissionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 @@ -6417,6 +7634,33 @@ func (in *UserPermissions) DeepCopyInto(out *UserPermissions) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.TeamMemberships != nil { + in, out := &in.TeamMemberships, &out.TeamMemberships + *out = make([]ObjectName, len(*in)) + copy(*out, *in) + } + if in.ProjectMemberships != nil { + in, out := &in.ProjectMemberships, &out.ProjectMemberships + *out = make([]ProjectMembership, len(*in)) + copy(*out, *in) + } + if in.ManagementRoles != nil { + in, out := &in.ManagementRoles, &out.ManagementRoles + *out = make([]ManagementRole, len(*in)) + copy(*out, *in) + } + if in.ClusterAccessRoles != nil { + in, out := &in.ClusterAccessRoles, &out.ClusterAccessRoles + *out = make([]ClusterAccessRole, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualClusterRoles != nil { + in, out := &in.VirtualClusterRoles, &out.VirtualClusterRoles + *out = make([]VirtualClusterRole, len(*in)) + copy(*out, *in) + } return } @@ -6504,6 +7748,25 @@ func (in *UserProfile) DeepCopyInto(out *UserProfile) { *out = new(string) **out = **in } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = new(map[string]*UserProfileSecret) + if **in != nil { + in, out := *in, *out + *out = make(map[string]*UserProfileSecret, len(*in)) + for key, val := range *in { + var outVal *UserProfileSecret + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(UserProfileSecret) + **out = **in + } + (*out)[key] = outVal + } + } + } return } @@ -6558,6 +7821,22 @@ func (in *UserProfileList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserProfileSecret) DeepCopyInto(out *UserProfileSecret) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserProfileSecret. +func (in *UserProfileSecret) DeepCopy() *UserProfileSecret { + if in == nil { + return nil + } + out := new(UserProfileSecret) + in.DeepCopyInto(out) + return out +} + // 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 @@ -6741,6 +8020,99 @@ func (in *VirtualClusterAccessKeyList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterExternalDatabase) DeepCopyInto(out *VirtualClusterExternalDatabase) { + *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 VirtualClusterExternalDatabase. +func (in *VirtualClusterExternalDatabase) DeepCopy() *VirtualClusterExternalDatabase { + if in == nil { + return nil + } + out := new(VirtualClusterExternalDatabase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterExternalDatabase) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterExternalDatabaseList) DeepCopyInto(out *VirtualClusterExternalDatabaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterExternalDatabase, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterExternalDatabaseList. +func (in *VirtualClusterExternalDatabaseList) DeepCopy() *VirtualClusterExternalDatabaseList { + if in == nil { + return nil + } + out := new(VirtualClusterExternalDatabaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterExternalDatabaseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterExternalDatabaseSpec) DeepCopyInto(out *VirtualClusterExternalDatabaseSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterExternalDatabaseSpec. +func (in *VirtualClusterExternalDatabaseSpec) DeepCopy() *VirtualClusterExternalDatabaseSpec { + if in == nil { + return nil + } + out := new(VirtualClusterExternalDatabaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterExternalDatabaseStatus) DeepCopyInto(out *VirtualClusterExternalDatabaseStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterExternalDatabaseStatus. +func (in *VirtualClusterExternalDatabaseStatus) DeepCopy() *VirtualClusterExternalDatabaseStatus { + if in == nil { + return nil + } + out := new(VirtualClusterExternalDatabaseStatus) + 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 @@ -7042,6 +8414,117 @@ func (in *VirtualClusterInstanceStatus) DeepCopy() *VirtualClusterInstanceStatus return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterRole) DeepCopyInto(out *VirtualClusterRole) { + *out = *in + out.ObjectName = in.ObjectName + out.AssignedVia = in.AssignedVia + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterRole. +func (in *VirtualClusterRole) DeepCopy() *VirtualClusterRole { + if in == nil { + return nil + } + out := new(VirtualClusterRole) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSchema) DeepCopyInto(out *VirtualClusterSchema) { + *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 VirtualClusterSchema. +func (in *VirtualClusterSchema) DeepCopy() *VirtualClusterSchema { + if in == nil { + return nil + } + out := new(VirtualClusterSchema) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterSchema) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSchemaList) DeepCopyInto(out *VirtualClusterSchemaList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterSchema, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterSchemaList. +func (in *VirtualClusterSchemaList) DeepCopy() *VirtualClusterSchemaList { + if in == nil { + return nil + } + out := new(VirtualClusterSchemaList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterSchemaList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSchemaSpec) DeepCopyInto(out *VirtualClusterSchemaSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterSchemaSpec. +func (in *VirtualClusterSchemaSpec) DeepCopy() *VirtualClusterSchemaSpec { + if in == nil { + return nil + } + out := new(VirtualClusterSchemaSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSchemaStatus) DeepCopyInto(out *VirtualClusterSchemaStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterSchemaStatus. +func (in *VirtualClusterSchemaStatus) DeepCopy() *VirtualClusterSchemaStatus { + if in == nil { + return nil + } + out := new(VirtualClusterSchemaStatus) + 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 diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.defaults.go index 542e0eb2..f56b6b60 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.defaults.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/v1/zz_generated.defaults.go @@ -6,6 +6,7 @@ package v1 import ( + corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -13,13 +14,178 @@ import ( // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&DevPodWorkspaceInstanceTroubleshoot{}, func(obj interface{}) { + SetObjectDefaults_DevPodWorkspaceInstanceTroubleshoot(obj.(*DevPodWorkspaceInstanceTroubleshoot)) + }) + scheme.AddTypeDefaultingFunc(&DevPodWorkspaceInstanceTroubleshootList{}, func(obj interface{}) { + SetObjectDefaults_DevPodWorkspaceInstanceTroubleshootList(obj.(*DevPodWorkspaceInstanceTroubleshootList)) + }) scheme.AddTypeDefaultingFunc(&ProjectClusters{}, func(obj interface{}) { SetObjectDefaults_ProjectClusters(obj.(*ProjectClusters)) }) scheme.AddTypeDefaultingFunc(&ProjectClustersList{}, func(obj interface{}) { SetObjectDefaults_ProjectClustersList(obj.(*ProjectClustersList)) }) + scheme.AddTypeDefaultingFunc(&ProjectRunners{}, func(obj interface{}) { SetObjectDefaults_ProjectRunners(obj.(*ProjectRunners)) }) + scheme.AddTypeDefaultingFunc(&ProjectRunnersList{}, func(obj interface{}) { SetObjectDefaults_ProjectRunnersList(obj.(*ProjectRunnersList)) }) scheme.AddTypeDefaultingFunc(&Runner{}, func(obj interface{}) { SetObjectDefaults_Runner(obj.(*Runner)) }) scheme.AddTypeDefaultingFunc(&RunnerList{}, func(obj interface{}) { SetObjectDefaults_RunnerList(obj.(*RunnerList)) }) return nil } +func SetObjectDefaults_DevPodWorkspaceInstanceTroubleshoot(in *DevPodWorkspaceInstanceTroubleshoot) { + for i := range in.Pods { + a := &in.Pods[i] + for j := range a.Spec.Volumes { + b := &a.Spec.Volumes[j] + if b.VolumeSource.ISCSI != nil { + if b.VolumeSource.ISCSI.ISCSIInterface == "" { + b.VolumeSource.ISCSI.ISCSIInterface = "default" + } + } + if b.VolumeSource.RBD != nil { + if b.VolumeSource.RBD.RBDPool == "" { + b.VolumeSource.RBD.RBDPool = "rbd" + } + if b.VolumeSource.RBD.RadosUser == "" { + b.VolumeSource.RBD.RadosUser = "admin" + } + if b.VolumeSource.RBD.Keyring == "" { + b.VolumeSource.RBD.Keyring = "/etc/ceph/keyring" + } + } + if b.VolumeSource.AzureDisk != nil { + if b.VolumeSource.AzureDisk.CachingMode == nil { + ptrVar1 := corev1.AzureDataDiskCachingMode(corev1.AzureDataDiskCachingReadWrite) + b.VolumeSource.AzureDisk.CachingMode = &ptrVar1 + } + if b.VolumeSource.AzureDisk.FSType == nil { + var ptrVar1 string = "ext4" + b.VolumeSource.AzureDisk.FSType = &ptrVar1 + } + if b.VolumeSource.AzureDisk.ReadOnly == nil { + var ptrVar1 bool = false + b.VolumeSource.AzureDisk.ReadOnly = &ptrVar1 + } + if b.VolumeSource.AzureDisk.Kind == nil { + ptrVar1 := corev1.AzureDataDiskKind(corev1.AzureSharedBlobDisk) + b.VolumeSource.AzureDisk.Kind = &ptrVar1 + } + } + if b.VolumeSource.ScaleIO != nil { + if b.VolumeSource.ScaleIO.StorageMode == "" { + b.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if b.VolumeSource.ScaleIO.FSType == "" { + b.VolumeSource.ScaleIO.FSType = "xfs" + } + } + } + for j := range a.Spec.InitContainers { + b := &a.Spec.InitContainers[j] + for k := range b.Ports { + c := &b.Ports[k] + if c.Protocol == "" { + c.Protocol = "TCP" + } + } + if b.LivenessProbe != nil { + if b.LivenessProbe.ProbeHandler.GRPC != nil { + if b.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.ReadinessProbe != nil { + if b.ReadinessProbe.ProbeHandler.GRPC != nil { + if b.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.StartupProbe != nil { + if b.StartupProbe.ProbeHandler.GRPC != nil { + if b.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for j := range a.Spec.Containers { + b := &a.Spec.Containers[j] + for k := range b.Ports { + c := &b.Ports[k] + if c.Protocol == "" { + c.Protocol = "TCP" + } + } + if b.LivenessProbe != nil { + if b.LivenessProbe.ProbeHandler.GRPC != nil { + if b.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.ReadinessProbe != nil { + if b.ReadinessProbe.ProbeHandler.GRPC != nil { + if b.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.StartupProbe != nil { + if b.StartupProbe.ProbeHandler.GRPC != nil { + if b.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for j := range a.Spec.EphemeralContainers { + b := &a.Spec.EphemeralContainers[j] + for k := range b.EphemeralContainerCommon.Ports { + c := &b.EphemeralContainerCommon.Ports[k] + if c.Protocol == "" { + c.Protocol = "TCP" + } + } + if b.EphemeralContainerCommon.LivenessProbe != nil { + if b.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC != nil { + if b.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.EphemeralContainerCommon.ReadinessProbe != nil { + if b.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC != nil { + if b.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.EphemeralContainerCommon.StartupProbe != nil { + if b.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC != nil { + if b.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + } +} + +func SetObjectDefaults_DevPodWorkspaceInstanceTroubleshootList(in *DevPodWorkspaceInstanceTroubleshootList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_DevPodWorkspaceInstanceTroubleshoot(a) + } +} + func SetObjectDefaults_ProjectClusters(in *ProjectClusters) { for i := range in.Runners { a := &in.Runners[i] @@ -34,9 +200,68 @@ func SetObjectDefaults_ProjectClustersList(in *ProjectClustersList) { } } +func SetObjectDefaults_ProjectRunners(in *ProjectRunners) { + for i := range in.Runners { + a := &in.Runners[i] + SetObjectDefaults_Runner(a) + } +} + +func SetObjectDefaults_ProjectRunnersList(in *ProjectRunnersList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ProjectRunners(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.Volumes { + a := &in.Spec.RunnerSpec.ClusterRef.PodTemplate.Spec.Volumes[i] + if a.VolumeSource.ISCSI != nil { + if a.VolumeSource.ISCSI.ISCSIInterface == "" { + a.VolumeSource.ISCSI.ISCSIInterface = "default" + } + } + if a.VolumeSource.RBD != nil { + if a.VolumeSource.RBD.RBDPool == "" { + a.VolumeSource.RBD.RBDPool = "rbd" + } + if a.VolumeSource.RBD.RadosUser == "" { + a.VolumeSource.RBD.RadosUser = "admin" + } + if a.VolumeSource.RBD.Keyring == "" { + a.VolumeSource.RBD.Keyring = "/etc/ceph/keyring" + } + } + if a.VolumeSource.AzureDisk != nil { + if a.VolumeSource.AzureDisk.CachingMode == nil { + ptrVar1 := corev1.AzureDataDiskCachingMode(corev1.AzureDataDiskCachingReadWrite) + a.VolumeSource.AzureDisk.CachingMode = &ptrVar1 + } + if a.VolumeSource.AzureDisk.FSType == nil { + var ptrVar1 string = "ext4" + a.VolumeSource.AzureDisk.FSType = &ptrVar1 + } + if a.VolumeSource.AzureDisk.ReadOnly == nil { + var ptrVar1 bool = false + a.VolumeSource.AzureDisk.ReadOnly = &ptrVar1 + } + if a.VolumeSource.AzureDisk.Kind == nil { + ptrVar1 := corev1.AzureDataDiskKind(corev1.AzureSharedBlobDisk) + a.VolumeSource.AzureDisk.Kind = &ptrVar1 + } + } + if a.VolumeSource.ScaleIO != nil { + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } + } + } for i := range in.Spec.RunnerSpec.ClusterRef.PodTemplate.Spec.InitContainers { a := &in.Spec.RunnerSpec.ClusterRef.PodTemplate.Spec.InitContainers[i] for j := range a.Ports { diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.api.register.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.api.register.go index 7adc5851..6a11627b 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.api.register.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.api.register.go @@ -15,6 +15,7 @@ import ( "github.com/loft-sh/api/v4/pkg/managerfactory" "github.com/loft-sh/apiserver/pkg/builders" authorizationv1 "k8s.io/api/authorization/v1" + corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -76,7 +77,11 @@ var ( NewClusterREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewClusterRESTFunc(Factory) } - NewClusterRESTFunc NewRESTFunc + NewClusterRESTFunc NewRESTFunc + NewClusterStatusREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewClusterStatusRESTFunc(Factory) + } + NewClusterStatusRESTFunc NewRESTFunc ManagementClusterAccessStorage = builders.NewApiResourceWithStorage( // Resource status endpoint InternalClusterAccess, func() runtime.Object { return &ClusterAccess{} }, // Register versioned resource @@ -116,7 +121,27 @@ var ( NewConvertVirtualClusterConfigREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewConvertVirtualClusterConfigRESTFunc(Factory) } - NewConvertVirtualClusterConfigRESTFunc NewRESTFunc + NewConvertVirtualClusterConfigRESTFunc NewRESTFunc + ManagementDatabaseConnectorStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalDatabaseConnector, + func() runtime.Object { return &DatabaseConnector{} }, // Register versioned resource + func() runtime.Object { return &DatabaseConnectorList{} }, // Register versioned resource list + NewDatabaseConnectorREST, + ) + NewDatabaseConnectorREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDatabaseConnectorRESTFunc(Factory) + } + NewDatabaseConnectorRESTFunc NewRESTFunc + ManagementDevPodEnvironmentTemplateStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalDevPodEnvironmentTemplate, + func() runtime.Object { return &DevPodEnvironmentTemplate{} }, // Register versioned resource + func() runtime.Object { return &DevPodEnvironmentTemplateList{} }, // Register versioned resource list + NewDevPodEnvironmentTemplateREST, + ) + NewDevPodEnvironmentTemplateREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDevPodEnvironmentTemplateRESTFunc(Factory) + } + NewDevPodEnvironmentTemplateRESTFunc NewRESTFunc ManagementDevPodWorkspaceInstanceStorage = builders.NewApiResourceWithStorage( // Resource status endpoint InternalDevPodWorkspaceInstance, func() runtime.Object { return &DevPodWorkspaceInstance{} }, // Register versioned resource @@ -126,7 +151,17 @@ var ( NewDevPodWorkspaceInstanceREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewDevPodWorkspaceInstanceRESTFunc(Factory) } - NewDevPodWorkspaceInstanceRESTFunc NewRESTFunc + NewDevPodWorkspaceInstanceRESTFunc NewRESTFunc + ManagementDevPodWorkspacePresetStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalDevPodWorkspacePreset, + func() runtime.Object { return &DevPodWorkspacePreset{} }, // Register versioned resource + func() runtime.Object { return &DevPodWorkspacePresetList{} }, // Register versioned resource list + NewDevPodWorkspacePresetREST, + ) + NewDevPodWorkspacePresetREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDevPodWorkspacePresetRESTFunc(Factory) + } + NewDevPodWorkspacePresetRESTFunc NewRESTFunc ManagementDevPodWorkspaceTemplateStorage = builders.NewApiResourceWithStorage( // Resource status endpoint InternalDevPodWorkspaceTemplate, func() runtime.Object { return &DevPodWorkspaceTemplate{} }, // Register versioned resource @@ -220,7 +255,17 @@ var ( NewLoftUpgradeREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewLoftUpgradeRESTFunc(Factory) } - NewLoftUpgradeRESTFunc NewRESTFunc + NewLoftUpgradeRESTFunc NewRESTFunc + ManagementOIDCClientStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalOIDCClient, + func() runtime.Object { return &OIDCClient{} }, // Register versioned resource + func() runtime.Object { return &OIDCClientList{} }, // Register versioned resource list + NewOIDCClientREST, + ) + NewOIDCClientREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewOIDCClientRESTFunc(Factory) + } + NewOIDCClientRESTFunc NewRESTFunc ManagementOwnedAccessKeyStorage = builders.NewApiResourceWithStorage( // Resource status endpoint InternalOwnedAccessKey, func() runtime.Object { return &OwnedAccessKey{} }, // Register versioned resource @@ -378,8 +423,18 @@ var ( NewTeamREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewTeamRESTFunc(Factory) } - NewTeamRESTFunc NewRESTFunc - ManagementUserStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + NewTeamRESTFunc NewRESTFunc + ManagementTranslateVClusterResourceNameStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalTranslateVClusterResourceName, + func() runtime.Object { return &TranslateVClusterResourceName{} }, // Register versioned resource + func() runtime.Object { return &TranslateVClusterResourceNameList{} }, // Register versioned resource list + NewTranslateVClusterResourceNameREST, + ) + NewTranslateVClusterResourceNameREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewTranslateVClusterResourceNameRESTFunc(Factory) + } + NewTranslateVClusterResourceNameRESTFunc 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 @@ -398,7 +453,17 @@ var ( NewVirtualClusterInstanceREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewVirtualClusterInstanceRESTFunc(Factory) } - NewVirtualClusterInstanceRESTFunc NewRESTFunc + NewVirtualClusterInstanceRESTFunc NewRESTFunc + ManagementVirtualClusterSchemaStorage = builders.NewApiResourceWithStorage( // Resource status endpoint + InternalVirtualClusterSchema, + func() runtime.Object { return &VirtualClusterSchema{} }, // Register versioned resource + func() runtime.Object { return &VirtualClusterSchemaList{} }, // Register versioned resource list + NewVirtualClusterSchemaREST, + ) + NewVirtualClusterSchemaREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewVirtualClusterSchemaRESTFunc(Factory) + } + NewVirtualClusterSchemaRESTFunc NewRESTFunc ManagementVirtualClusterTemplateStorage = builders.NewApiResourceWithStorage( // Resource status endpoint InternalVirtualClusterTemplate, func() runtime.Object { return &VirtualClusterTemplate{} }, // Register versioned resource @@ -597,6 +662,30 @@ var ( func() runtime.Object { return &ConvertVirtualClusterConfig{} }, func() runtime.Object { return &ConvertVirtualClusterConfigList{} }, ) + InternalDatabaseConnector = builders.NewInternalResource( + "databaseconnectors", + "DatabaseConnector", + func() runtime.Object { return &DatabaseConnector{} }, + func() runtime.Object { return &DatabaseConnectorList{} }, + ) + InternalDatabaseConnectorStatus = builders.NewInternalResourceStatus( + "databaseconnectors", + "DatabaseConnectorStatus", + func() runtime.Object { return &DatabaseConnector{} }, + func() runtime.Object { return &DatabaseConnectorList{} }, + ) + InternalDevPodEnvironmentTemplate = builders.NewInternalResource( + "devpodenvironmenttemplates", + "DevPodEnvironmentTemplate", + func() runtime.Object { return &DevPodEnvironmentTemplate{} }, + func() runtime.Object { return &DevPodEnvironmentTemplateList{} }, + ) + InternalDevPodEnvironmentTemplateStatus = builders.NewInternalResourceStatus( + "devpodenvironmenttemplates", + "DevPodEnvironmentTemplateStatus", + func() runtime.Object { return &DevPodEnvironmentTemplate{} }, + func() runtime.Object { return &DevPodEnvironmentTemplateList{} }, + ) InternalDevPodWorkspaceInstance = builders.NewInternalResource( "devpodworkspaceinstances", "DevPodWorkspaceInstance", @@ -648,15 +737,35 @@ var ( NewDevPodStopOptionsREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewDevPodStopOptionsRESTFunc(Factory) } - NewDevPodStopOptionsRESTFunc NewRESTFunc - InternalDevPodUpOptionsREST = builders.NewInternalSubresource( + NewDevPodStopOptionsRESTFunc NewRESTFunc + InternalDevPodWorkspaceInstanceTroubleshootREST = builders.NewInternalSubresource( + "devpodworkspaceinstances", "DevPodWorkspaceInstanceTroubleshoot", "troubleshoot", + func() runtime.Object { return &DevPodWorkspaceInstanceTroubleshoot{} }, + ) + NewDevPodWorkspaceInstanceTroubleshootREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewDevPodWorkspaceInstanceTroubleshootRESTFunc(Factory) + } + NewDevPodWorkspaceInstanceTroubleshootRESTFunc NewRESTFunc + InternalDevPodUpOptionsREST = builders.NewInternalSubresource( "devpodworkspaceinstances", "DevPodUpOptions", "up", func() runtime.Object { return &DevPodUpOptions{} }, ) NewDevPodUpOptionsREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewDevPodUpOptionsRESTFunc(Factory) } - NewDevPodUpOptionsRESTFunc NewRESTFunc + NewDevPodUpOptionsRESTFunc NewRESTFunc + InternalDevPodWorkspacePreset = builders.NewInternalResource( + "devpodworkspacepresets", + "DevPodWorkspacePreset", + func() runtime.Object { return &DevPodWorkspacePreset{} }, + func() runtime.Object { return &DevPodWorkspacePresetList{} }, + ) + InternalDevPodWorkspacePresetStatus = builders.NewInternalResourceStatus( + "devpodworkspacepresets", + "DevPodWorkspacePresetStatus", + func() runtime.Object { return &DevPodWorkspacePreset{} }, + func() runtime.Object { return &DevPodWorkspacePresetList{} }, + ) InternalDevPodWorkspaceTemplate = builders.NewInternalResource( "devpodworkspacetemplates", "DevPodWorkspaceTemplate", @@ -773,6 +882,18 @@ var ( func() runtime.Object { return &LoftUpgrade{} }, func() runtime.Object { return &LoftUpgradeList{} }, ) + InternalOIDCClient = builders.NewInternalResource( + "oidcclients", + "OIDCClient", + func() runtime.Object { return &OIDCClient{} }, + func() runtime.Object { return &OIDCClientList{} }, + ) + InternalOIDCClientStatus = builders.NewInternalResourceStatus( + "oidcclients", + "OIDCClientStatus", + func() runtime.Object { return &OIDCClient{} }, + func() runtime.Object { return &OIDCClientList{} }, + ) InternalOwnedAccessKey = builders.NewInternalResource( "ownedaccesskeys", "OwnedAccessKey", @@ -853,7 +974,15 @@ var ( return NewProjectMigrateVirtualClusterInstanceRESTFunc(Factory) } NewProjectMigrateVirtualClusterInstanceRESTFunc NewRESTFunc - InternalProjectTemplatesREST = builders.NewInternalSubresource( + InternalProjectRunnersREST = builders.NewInternalSubresource( + "projects", "ProjectRunners", "runners", + func() runtime.Object { return &ProjectRunners{} }, + ) + NewProjectRunnersREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewProjectRunnersRESTFunc(Factory) + } + NewProjectRunnersRESTFunc NewRESTFunc + InternalProjectTemplatesREST = builders.NewInternalSubresource( "projects", "ProjectTemplates", "templates", func() runtime.Object { return &ProjectTemplates{} }, ) @@ -886,13 +1015,13 @@ var ( func() runtime.Object { return &RedirectTokenList{} }, ) InternalRegisterVirtualCluster = builders.NewInternalResource( - "registervirtualcluster", + "registervirtualclusters", "RegisterVirtualCluster", func() runtime.Object { return &RegisterVirtualCluster{} }, func() runtime.Object { return &RegisterVirtualClusterList{} }, ) InternalRegisterVirtualClusterStatus = builders.NewInternalResourceStatus( - "registervirtualcluster", + "registervirtualclusters", "RegisterVirtualClusterStatus", func() runtime.Object { return &RegisterVirtualCluster{} }, func() runtime.Object { return &RegisterVirtualClusterList{} }, @@ -1056,8 +1185,36 @@ var ( NewTeamClustersREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewTeamClustersRESTFunc(Factory) } - NewTeamClustersRESTFunc NewRESTFunc - InternalUser = builders.NewInternalResource( + NewTeamClustersRESTFunc NewRESTFunc + InternalTeamObjectPermissionsREST = builders.NewInternalSubresource( + "teams", "TeamObjectPermissions", "object-permissions", + func() runtime.Object { return &TeamObjectPermissions{} }, + ) + NewTeamObjectPermissionsREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewTeamObjectPermissionsRESTFunc(Factory) + } + NewTeamObjectPermissionsRESTFunc NewRESTFunc + InternalTeamPermissionsREST = builders.NewInternalSubresource( + "teams", "TeamPermissions", "permissions", + func() runtime.Object { return &TeamPermissions{} }, + ) + NewTeamPermissionsREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewTeamPermissionsRESTFunc(Factory) + } + NewTeamPermissionsRESTFunc NewRESTFunc + InternalTranslateVClusterResourceName = builders.NewInternalResource( + "translatevclusterresourcenames", + "TranslateVClusterResourceName", + func() runtime.Object { return &TranslateVClusterResourceName{} }, + func() runtime.Object { return &TranslateVClusterResourceNameList{} }, + ) + InternalTranslateVClusterResourceNameStatus = builders.NewInternalResourceStatus( + "translatevclusterresourcenames", + "TranslateVClusterResourceNameStatus", + func() runtime.Object { return &TranslateVClusterResourceName{} }, + func() runtime.Object { return &TranslateVClusterResourceNameList{} }, + ) + InternalUser = builders.NewInternalResource( "users", "User", func() runtime.Object { return &User{} }, @@ -1084,8 +1241,16 @@ var ( NewUserClustersREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewUserClustersRESTFunc(Factory) } - NewUserClustersRESTFunc NewRESTFunc - InternalUserPermissionsREST = builders.NewInternalSubresource( + NewUserClustersRESTFunc NewRESTFunc + InternalUserObjectPermissionsREST = builders.NewInternalSubresource( + "users", "UserObjectPermissions", "object-permissions", + func() runtime.Object { return &UserObjectPermissions{} }, + ) + NewUserObjectPermissionsREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewUserObjectPermissionsRESTFunc(Factory) + } + NewUserObjectPermissionsRESTFunc NewRESTFunc + InternalUserPermissionsREST = builders.NewInternalSubresource( "users", "UserPermissions", "permissions", func() runtime.Object { return &UserPermissions{} }, ) @@ -1120,7 +1285,15 @@ var ( NewVirtualClusterAccessKeyREST = func(getter generic.RESTOptionsGetter) rest.Storage { return NewVirtualClusterAccessKeyRESTFunc(Factory) } - NewVirtualClusterAccessKeyRESTFunc NewRESTFunc + NewVirtualClusterAccessKeyRESTFunc NewRESTFunc + InternalVirtualClusterExternalDatabaseREST = builders.NewInternalSubresource( + "virtualclusterinstances", "VirtualClusterExternalDatabase", "externaldatabase", + func() runtime.Object { return &VirtualClusterExternalDatabase{} }, + ) + NewVirtualClusterExternalDatabaseREST = func(getter generic.RESTOptionsGetter) rest.Storage { + return NewVirtualClusterExternalDatabaseRESTFunc(Factory) + } + NewVirtualClusterExternalDatabaseRESTFunc NewRESTFunc InternalVirtualClusterInstanceKubeConfigREST = builders.NewInternalSubresource( "virtualclusterinstances", "VirtualClusterInstanceKubeConfig", "kubeconfig", func() runtime.Object { return &VirtualClusterInstanceKubeConfig{} }, @@ -1137,7 +1310,19 @@ var ( return NewVirtualClusterInstanceLogRESTFunc(Factory) } NewVirtualClusterInstanceLogRESTFunc NewRESTFunc - InternalVirtualClusterTemplate = builders.NewInternalResource( + InternalVirtualClusterSchema = builders.NewInternalResource( + "virtualclusterschemas", + "VirtualClusterSchema", + func() runtime.Object { return &VirtualClusterSchema{} }, + func() runtime.Object { return &VirtualClusterSchemaList{} }, + ) + InternalVirtualClusterSchemaStatus = builders.NewInternalResourceStatus( + "virtualclusterschemas", + "VirtualClusterSchemaStatus", + func() runtime.Object { return &VirtualClusterSchema{} }, + func() runtime.Object { return &VirtualClusterSchemaList{} }, + ) + InternalVirtualClusterTemplate = builders.NewInternalResource( "virtualclustertemplates", "VirtualClusterTemplate", func() runtime.Object { return &VirtualClusterTemplate{} }, @@ -1179,6 +1364,10 @@ var ( InternalConfigStatus, InternalConvertVirtualClusterConfig, InternalConvertVirtualClusterConfigStatus, + InternalDatabaseConnector, + InternalDatabaseConnectorStatus, + InternalDevPodEnvironmentTemplate, + InternalDevPodEnvironmentTemplateStatus, InternalDevPodWorkspaceInstance, InternalDevPodWorkspaceInstanceStatus, InternalDevPodDeleteOptionsREST, @@ -1186,7 +1375,10 @@ var ( InternalDevPodSshOptionsREST, InternalDevPodWorkspaceInstanceStateREST, InternalDevPodStopOptionsREST, + InternalDevPodWorkspaceInstanceTroubleshootREST, InternalDevPodUpOptionsREST, + InternalDevPodWorkspacePreset, + InternalDevPodWorkspacePresetStatus, InternalDevPodWorkspaceTemplate, InternalDevPodWorkspaceTemplateStatus, InternalDirectClusterEndpointToken, @@ -1206,6 +1398,8 @@ var ( InternalLicenseTokenStatus, InternalLoftUpgrade, InternalLoftUpgradeStatus, + InternalOIDCClient, + InternalOIDCClientStatus, InternalOwnedAccessKey, InternalOwnedAccessKeyStatus, InternalProject, @@ -1217,6 +1411,7 @@ var ( InternalProjectMembersREST, InternalProjectMigrateSpaceInstanceREST, InternalProjectMigrateVirtualClusterInstanceREST, + InternalProjectRunnersREST, InternalProjectTemplatesREST, InternalProjectSecret, InternalProjectSecretStatus, @@ -1249,17 +1444,25 @@ var ( InternalTeamStatus, InternalTeamAccessKeysREST, InternalTeamClustersREST, + InternalTeamObjectPermissionsREST, + InternalTeamPermissionsREST, + InternalTranslateVClusterResourceName, + InternalTranslateVClusterResourceNameStatus, InternalUser, InternalUserStatus, InternalUserAccessKeysREST, InternalUserClustersREST, + InternalUserObjectPermissionsREST, InternalUserPermissionsREST, InternalUserProfileREST, InternalVirtualClusterInstance, InternalVirtualClusterInstanceStatus, InternalVirtualClusterAccessKeyREST, + InternalVirtualClusterExternalDatabaseREST, InternalVirtualClusterInstanceKubeConfigREST, InternalVirtualClusterInstanceLogREST, + InternalVirtualClusterSchema, + InternalVirtualClusterSchemaStatus, InternalVirtualClusterTemplate, InternalVirtualClusterTemplateStatus, ) @@ -1325,6 +1528,11 @@ type AgentAuditEventSpec struct { type AgentAuditEventStatus struct { } +type AgentCostControlConfig struct { + Enabled *bool `json:"enabled,omitempty"` + CostControlClusterConfig `json:",inline"` +} + // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -1376,6 +1584,12 @@ type Apps struct { PredefinedApps []PredefinedApp `json:"predefinedApps,omitempty"` } +type AssignedVia struct { + ObjectName `json:",inline"` + Kind string `json:"kind,omitempty"` + Owner bool `json:"owner,omitempty"` +} + type Audit struct { Enabled bool `json:"enabled,omitempty"` DisableAgentSyncBack bool `json:"disableAgentSyncBack,omitempty"` @@ -1414,9 +1628,11 @@ type Authentication struct { Password *AuthenticationPassword `json:"password,omitempty"` Connectors []ConnectorWithName `json:"connectors,omitempty"` DisableTeamCreation bool `json:"disableTeamCreation,omitempty"` + DisableUserCreation bool `json:"disableUserCreation,omitempty"` AccessKeyMaxTTLSeconds int64 `json:"accessKeyMaxTTLSeconds,omitempty"` LoginAccessKeyTTLSeconds *int64 `json:"loginAccessKeyTTLSeconds,omitempty"` CustomHttpHeaders map[string]string `json:"customHttpHeaders,omitempty"` + GroupsFilters []string `json:"groupsFilters,omitempty"` } type AuthenticationGithub struct { @@ -1540,6 +1756,11 @@ type BackupStatus struct { RawBackup string `json:"rawBackup,omitempty"` } +type Cloud struct { + ReleaseChannel string `json:"releaseChannel,omitempty"` + MaintenanceWindow MaintenanceWindow `json:"maintenanceWindow,omitempty"` +} + // +genclient // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -1573,6 +1794,12 @@ type ClusterAccessKey struct { CaCert string `json:"caCert,omitempty"` } +type ClusterAccessRole struct { + ObjectName `json:",inline"` + Clusters []ObjectName `json:"clusters,omitempty"` + AssignedVia AssignedVia `json:"assignedVia,omitempty"` +} + type ClusterAccessSpec struct { storagev1.ClusterAccessSpec `json:",inline"` } @@ -1598,14 +1825,15 @@ type ClusterAgentConfig struct { } type ClusterAgentConfigCommon struct { - Cluster string `json:"cluster,omitempty"` - Audit *AgentAuditConfig `json:"audit,omitempty"` - DefaultImageRegistry string `json:"defaultImageRegistry,omitempty"` - TokenCaCert []byte `json:"tokenCaCert,omitempty"` - LoftHost string `json:"loftHost,omitempty"` - ProjectNamespacePrefix string `json:"projectNamespacePrefix,omitempty"` - LoftInstanceID string `json:"loftInstanceID,omitempty"` - AnalyticsSpec AgentAnalyticsSpec `json:"analyticsSpec"` + Cluster string `json:"cluster,omitempty"` + Audit *AgentAuditConfig `json:"audit,omitempty"` + DefaultImageRegistry string `json:"defaultImageRegistry,omitempty"` + TokenCaCert []byte `json:"tokenCaCert,omitempty"` + LoftHost string `json:"loftHost,omitempty"` + ProjectNamespacePrefix string `json:"projectNamespacePrefix,omitempty"` + LoftInstanceID string `json:"loftInstanceID,omitempty"` + AnalyticsSpec AgentAnalyticsSpec `json:"analyticsSpec"` + CostControl *AgentCostControlConfig `json:"costControl,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -1722,6 +1950,9 @@ type ConfigStatus struct { DevPodSubDomain string `json:"devPodSubDomain,omitempty"` UISettings *uiv1.UISettingsConfig `json:"uiSettings,omitempty"` VaultIntegration *storagev1.VaultIntegrationSpec `json:"vault,omitempty"` + DisableConfigEndpoint bool `json:"disableConfigEndpoint,omitempty"` + Cloud *Cloud `json:"cloud,omitempty"` + CostControl *CostControl `json:"costControl,omitempty"` } type Connector struct { @@ -1751,8 +1982,9 @@ type ConvertVirtualClusterConfig struct { } type ConvertVirtualClusterConfigSpec struct { - Distro string `json:"distro,omitempty"` - Values string `json:"values,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Distro string `json:"distro,omitempty"` + Values string `json:"values,omitempty"` } type ConvertVirtualClusterConfigStatus struct { @@ -1760,6 +1992,59 @@ type ConvertVirtualClusterConfigStatus struct { Converted bool `json:"converted"` } +type CostControl struct { + Enabled *bool `json:"enabled,omitempty"` + Global CostControlGlobalConfig `json:"global,omitempty"` + Cluster CostControlClusterConfig `json:"cluster,omitempty"` + Settings *CostControlSettings `json:"settings,omitempty"` +} + +type CostControlClusterConfig struct { + Metrics *storagev1.Metrics `json:"metrics,omitempty"` + OpenCost *storagev1.OpenCost `json:"opencost,omitempty"` +} + +type CostControlGPUSettings struct { + Enabled bool `json:"enabled,omitempty"` + AvgGPUPrice *CostControlResourcePrice `json:"averageGPUPrice,omitempty"` +} + +type CostControlGlobalConfig struct { + Metrics *storagev1.Metrics `json:"metrics,omitempty"` +} + +type CostControlResourcePrice struct { + Price float64 `json:"price,omitempty"` + TimePeriod string `json:"timePeriod,omitempty"` +} + +type CostControlSettings struct { + PriceCurrency string `json:"priceCurrency,omitempty"` + AvgCPUPricePerNode *CostControlResourcePrice `json:"averageCPUPricePerNode,omitempty"` + AvgRAMPricePerNode *CostControlResourcePrice `json:"averageRAMPricePerNode,omitempty"` + GPUSettings *CostControlGPUSettings `json:"gpuSettings,omitempty"` + ControlPlanePricePerCluster *CostControlResourcePrice `json:"controlPlanePricePerCluster,omitempty"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DatabaseConnector struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec DatabaseConnectorSpec `json:"spec,omitempty"` + Status DatabaseConnectorStatus `json:"status,omitempty"` +} + +type DatabaseConnectorSpec struct { + Type string `json:"type,omitempty"` + DisplayName string `json:"displayName,omitempty"` +} + +type DatabaseConnectorStatus struct { +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type DevPodDeleteOptions struct { @@ -1767,6 +2052,24 @@ type DevPodDeleteOptions struct { Options string `json:"options,omitempty"` } +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodEnvironmentTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec DevPodEnvironmentTemplateSpec `json:"spec,omitempty"` + Status DevPodEnvironmentTemplateStatus `json:"status,omitempty"` +} + +type DevPodEnvironmentTemplateSpec struct { + storagev1.DevPodEnvironmentTemplateSpec `json:",inline"` +} + +type DevPodEnvironmentTemplateStatus struct { +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type DevPodSshOptions struct { @@ -1826,6 +2129,37 @@ type DevPodWorkspaceInstanceStatus struct { SleepModeConfig *clusterv1.SleepModeConfig `json:"sleepModeConfig,omitempty"` } +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceTroubleshoot struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + State string `json:"state,omitempty"` + Workspace *DevPodWorkspaceInstance `json:"workspace,omitempty"` + Template *storagev1.DevPodWorkspaceTemplate `json:"template,omitempty"` + Pods []corev1.Pod `json:"pods,omitempty"` + PVCs []corev1.PersistentVolumeClaim `json:"pvcs,omitempty"` + Errors []string `json:"errors,omitempty"` +} + +// +genclient +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspacePreset struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec DevPodWorkspacePresetSpec `json:"spec,omitempty"` + Status DevPodWorkspacePresetStatus `json:"status,omitempty"` +} + +type DevPodWorkspacePresetSpec struct { + storagev1.DevPodWorkspacePresetSpec `json:",inline"` +} + +type DevPodWorkspacePresetStatus struct { +} + // +genclient // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -1953,7 +2287,7 @@ type KioskStatus struct { } // +genclient -// +genclient +// +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type License struct { @@ -2029,19 +2363,54 @@ type LoftUpgradeSpec struct { type LoftUpgradeStatus struct { } +type MaintenanceWindow struct { + DayOfWeek string `json:"dayOfWeek,omitempty"` + TimeWindow string `json:"timeWindow,omitempty"` +} + +type ManagementRole struct { + ObjectName `json:",inline"` + AssignedVia AssignedVia `json:"assignedVia,omitempty"` +} + type OIDC struct { - Enabled bool `json:"enabled,omitempty"` - WildcardRedirect bool `json:"wildcardRedirect,omitempty"` - Clients []OIDCClient `json:"clients,omitempty"` + Enabled bool `json:"enabled,omitempty"` + WildcardRedirect bool `json:"wildcardRedirect,omitempty"` + Clients []OIDCClientSpec `json:"clients,omitempty"` } +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type OIDCClient struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec OIDCClientSpec `json:"spec,omitempty"` + Status OIDCClientStatus `json:"status,omitempty"` +} + +type OIDCClientSpec struct { Name string `json:"name,omitempty"` ClientID string `json:"clientId,omitempty"` ClientSecret string `json:"clientSecret,omitempty"` RedirectURIs []string `json:"redirectURIs"` } +type OIDCClientStatus struct { +} + +type ObjectName struct { + Namespace string `json:"namespace,omitempty"` + Name string `json:"name,omitempty"` + DisplayName string `json:"displayName,omitempty"` +} + +type ObjectPermission struct { + ObjectName `json:",inline"` + Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` +} + // +genclient // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -2144,6 +2513,12 @@ type ProjectMembers struct { Users []ProjectMember `json:"users,omitempty"` } +type ProjectMembership struct { + ObjectName `json:",inline"` + Role ProjectRole `json:"role,omitempty"` + AssignedVia AssignedVia `json:"assignedVia,omitempty"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type ProjectMigrateSpaceInstance struct { @@ -2170,6 +2545,19 @@ type ProjectMigrateVirtualClusterInstanceSource struct { Namespace string `json:"namespace,omitempty"` } +type ProjectRole struct { + ObjectName `json:",inline"` + IsAdmin bool `json:"isAdmin,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProjectRunners struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Runners []Runner `json:"runners,omitempty"` +} + // +genclient // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -2204,14 +2592,17 @@ type ProjectStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type ProjectTemplates struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - DefaultVirtualClusterTemplate string `json:"defaultVirtualClusterTemplate,omitempty"` - VirtualClusterTemplates []VirtualClusterTemplate `json:"virtualClusterTemplates,omitempty"` - DefaultSpaceTemplate string `json:"defaultSpaceTemplate,omitempty"` - SpaceTemplates []SpaceTemplate `json:"spaceTemplates,omitempty"` - DefaultDevPodWorkspaceTemplate string `json:"defaultDevPodWorkspaceTemplate,omitempty"` - DevPodWorkspaceTemplates []DevPodWorkspaceTemplate `json:"devPodWorkspaceTemplates,omitempty"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + DefaultVirtualClusterTemplate string `json:"defaultVirtualClusterTemplate,omitempty"` + VirtualClusterTemplates []VirtualClusterTemplate `json:"virtualClusterTemplates,omitempty"` + DefaultSpaceTemplate string `json:"defaultSpaceTemplate,omitempty"` + SpaceTemplates []SpaceTemplate `json:"spaceTemplates,omitempty"` + DefaultDevPodWorkspaceTemplate string `json:"defaultDevPodWorkspaceTemplate,omitempty"` + DevPodWorkspaceTemplates []DevPodWorkspaceTemplate `json:"devPodWorkspaceTemplates,omitempty"` + DevPodEnvironmentTemplates []DevPodEnvironmentTemplate `json:"devPodEnvironmentTemplates,omitempty"` + DevPodWorkspacePresets []DevPodWorkspacePreset `json:"devPodWorkspacePresets,omitempty"` + DefaultDevPodEnvironmentTemplate string `json:"defaultDevPodEnvironmentTemplate,omitempty"` } // +genclient @@ -2495,6 +2886,26 @@ type TeamClusters struct { Clusters []ClusterAccounts `json:"clusters,omitempty"` } +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamObjectPermissions struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + ObjectPermissions []ObjectPermission `json:"objectPermissions,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamPermissions struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Members []ObjectName `json:"members,omitempty"` + ProjectMemberships []ProjectMembership `json:"projectMemberships,omitempty"` + ManagementRoles []ManagementRole `json:"managementRoles,omitempty"` + ClusterAccessRoles []ClusterAccessRole `json:"clusterAccessRoles,omitempty"` + VirtualClusterRoles []VirtualClusterRole `json:"virtualClusterRoles,omitempty"` +} + type TeamSpec struct { storagev1.TeamSpec `json:",inline"` } @@ -2507,6 +2918,27 @@ type TeamStatus struct { // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type TranslateVClusterResourceName struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec TranslateVClusterResourceNameSpec `json:"spec,omitempty"` + Status TranslateVClusterResourceNameStatus `json:"status,omitempty"` +} + +type TranslateVClusterResourceNameSpec struct { + Name string `json:"name"` + Namespace string `json:"namespace"` + VClusterName string `json:"vclusterName"` +} + +type TranslateVClusterResourceNameStatus struct { + Name string `json:"name,omitempty"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type User struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -2537,11 +2969,24 @@ type UserInfo struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type UserPermissions struct { +type UserObjectPermissions struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - ClusterRoles []UserPermissionsRole `json:"clusterRoles,omitempty"` - NamespaceRoles []UserPermissionsRole `json:"namespaceRoles,omitempty"` + ObjectPermissions []ObjectPermission `json:"objectPermissions,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type UserPermissions struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + ClusterRoles []UserPermissionsRole `json:"clusterRoles,omitempty"` + NamespaceRoles []UserPermissionsRole `json:"namespaceRoles,omitempty"` + TeamMemberships []ObjectName `json:"teamMemberships,omitempty"` + ProjectMemberships []ProjectMembership `json:"projectMemberships,omitempty"` + ManagementRoles []ManagementRole `json:"managementRoles,omitempty"` + ClusterAccessRoles []ClusterAccessRole `json:"clusterAccessRoles,omitempty"` + VirtualClusterRoles []VirtualClusterRole `json:"virtualClusterRoles,omitempty"` } type UserPermissionsRole struct { @@ -2556,13 +3001,19 @@ type UserPermissionsRole struct { type UserProfile struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - DisplayName string `json:"displayName,omitempty"` - Username string `json:"username,omitempty"` - Password string `json:"password,omitempty"` - CurrentPassword string `json:"currentPassword,omitempty"` - Email string `json:"email,omitempty"` - Icon *string `json:"icon,omitempty"` - Custom string `json:"custom,omitempty"` + DisplayName string `json:"displayName,omitempty"` + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` + CurrentPassword string `json:"currentPassword,omitempty"` + Email string `json:"email,omitempty"` + Icon *string `json:"icon,omitempty"` + Custom string `json:"custom,omitempty"` + Secrets *map[string]*UserProfileSecret `json:"secrets,omitempty"` +} + +type UserProfileSecret struct { + Type string `json:"type,omitempty"` + Data string `json:"data,omitempty"` } type UserSpec struct { @@ -2581,6 +3032,23 @@ type VirtualClusterAccessKey struct { AccessKey string `json:"accessKey,omitempty"` } +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterExternalDatabase struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec VirtualClusterExternalDatabaseSpec `json:"spec,omitempty"` + Status VirtualClusterExternalDatabaseStatus `json:"status,omitempty"` +} + +type VirtualClusterExternalDatabaseSpec struct { + Connector string `json:"connector,omitempty"` +} + +type VirtualClusterExternalDatabaseStatus struct { + DataSource string `json:"dataSource,omitempty"` +} + // +genclient // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -2628,6 +3096,32 @@ type VirtualClusterInstanceStatus struct { Online bool `json:"online,omitempty"` } +type VirtualClusterRole struct { + ObjectName `json:",inline"` + Role string `json:"role,omitempty"` + AssignedVia AssignedVia `json:"assignedVia,omitempty"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterSchema struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec VirtualClusterSchemaSpec `json:"spec,omitempty"` + Status VirtualClusterSchemaStatus `json:"status,omitempty"` +} + +type VirtualClusterSchemaSpec struct { + Version string `json:"version,omitempty"` +} + +type VirtualClusterSchemaStatus struct { + Schema string `json:"schema,omitempty"` + DefaultValues string `json:"defaultValues,omitempty"` +} + // +genclient // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -3799,114 +4293,360 @@ func (s *storageConvertVirtualClusterConfig) DeleteConvertVirtualClusterConfig(c return sync, err } -// DevPodWorkspaceInstance Functions and Structs +// DatabaseConnector Functions and Structs // // +k8s:deepcopy-gen=false -type DevPodWorkspaceInstanceStrategy struct { +type DatabaseConnectorStrategy struct { builders.DefaultStorageStrategy } // +k8s:deepcopy-gen=false -type DevPodWorkspaceInstanceStatusStrategy struct { +type DatabaseConnectorStatusStrategy struct { builders.DefaultStatusStorageStrategy } // +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 DevPodDeleteOptionsList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []DevPodDeleteOptions `json:"items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type DevPodStatusOptionsList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []DevPodStatusOptions `json:"items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type DevPodSshOptionsList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []DevPodSshOptions `json:"items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type DevPodWorkspaceInstanceStateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []DevPodWorkspaceInstanceState `json:"items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type DevPodStopOptionsList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []DevPodStopOptions `json:"items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type DevPodUpOptionsList struct { +type DatabaseConnectorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []DevPodUpOptions `json:"items"` + Items []DatabaseConnector `json:"items"` } -func (DevPodWorkspaceInstance) NewStatus() interface{} { - return DevPodWorkspaceInstanceStatus{} +func (DatabaseConnector) NewStatus() interface{} { + return DatabaseConnectorStatus{} } -func (pc *DevPodWorkspaceInstance) GetStatus() interface{} { +func (pc *DatabaseConnector) GetStatus() interface{} { return pc.Status } -func (pc *DevPodWorkspaceInstance) SetStatus(s interface{}) { - pc.Status = s.(DevPodWorkspaceInstanceStatus) +func (pc *DatabaseConnector) SetStatus(s interface{}) { + pc.Status = s.(DatabaseConnectorStatus) } -func (pc *DevPodWorkspaceInstance) GetSpec() interface{} { +func (pc *DatabaseConnector) GetSpec() interface{} { return pc.Spec } -func (pc *DevPodWorkspaceInstance) SetSpec(s interface{}) { - pc.Spec = s.(DevPodWorkspaceInstanceSpec) +func (pc *DatabaseConnector) SetSpec(s interface{}) { + pc.Spec = s.(DatabaseConnectorSpec) } -func (pc *DevPodWorkspaceInstance) GetObjectMeta() *metav1.ObjectMeta { +func (pc *DatabaseConnector) GetObjectMeta() *metav1.ObjectMeta { return &pc.ObjectMeta } -func (pc *DevPodWorkspaceInstance) SetGeneration(generation int64) { +func (pc *DatabaseConnector) SetGeneration(generation int64) { pc.ObjectMeta.Generation = generation } -func (pc DevPodWorkspaceInstance) GetGeneration() int64 { +func (pc DatabaseConnector) GetGeneration() int64 { return pc.ObjectMeta.Generation } -// Registry is an interface for things that know how to store DevPodWorkspaceInstance. +// Registry is an interface for things that know how to store DatabaseConnector. // +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) +type DatabaseConnectorRegistry interface { + ListDatabaseConnectors(ctx context.Context, options *internalversion.ListOptions) (*DatabaseConnectorList, error) + GetDatabaseConnector(ctx context.Context, id string, options *metav1.GetOptions) (*DatabaseConnector, error) + CreateDatabaseConnector(ctx context.Context, id *DatabaseConnector) (*DatabaseConnector, error) + UpdateDatabaseConnector(ctx context.Context, id *DatabaseConnector) (*DatabaseConnector, error) + DeleteDatabaseConnector(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewDatabaseConnectorRegistry(sp builders.StandardStorageProvider) DatabaseConnectorRegistry { + return &storageDatabaseConnector{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageDatabaseConnector struct { + builders.StandardStorageProvider +} + +func (s *storageDatabaseConnector) ListDatabaseConnectors(ctx context.Context, options *internalversion.ListOptions) (*DatabaseConnectorList, 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.(*DatabaseConnectorList), err +} + +func (s *storageDatabaseConnector) GetDatabaseConnector(ctx context.Context, id string, options *metav1.GetOptions) (*DatabaseConnector, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*DatabaseConnector), nil +} + +func (s *storageDatabaseConnector) CreateDatabaseConnector(ctx context.Context, object *DatabaseConnector) (*DatabaseConnector, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*DatabaseConnector), nil +} + +func (s *storageDatabaseConnector) UpdateDatabaseConnector(ctx context.Context, object *DatabaseConnector) (*DatabaseConnector, 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.(*DatabaseConnector), nil +} + +func (s *storageDatabaseConnector) DeleteDatabaseConnector(ctx context.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) + return sync, err +} + +// DevPodEnvironmentTemplate Functions and Structs +// +// +k8s:deepcopy-gen=false +type DevPodEnvironmentTemplateStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type DevPodEnvironmentTemplateStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodEnvironmentTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodEnvironmentTemplate `json:"items"` +} + +func (DevPodEnvironmentTemplate) NewStatus() interface{} { + return DevPodEnvironmentTemplateStatus{} +} + +func (pc *DevPodEnvironmentTemplate) GetStatus() interface{} { + return pc.Status +} + +func (pc *DevPodEnvironmentTemplate) SetStatus(s interface{}) { + pc.Status = s.(DevPodEnvironmentTemplateStatus) +} + +func (pc *DevPodEnvironmentTemplate) GetSpec() interface{} { + return pc.Spec +} + +func (pc *DevPodEnvironmentTemplate) SetSpec(s interface{}) { + pc.Spec = s.(DevPodEnvironmentTemplateSpec) +} + +func (pc *DevPodEnvironmentTemplate) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *DevPodEnvironmentTemplate) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc DevPodEnvironmentTemplate) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store DevPodEnvironmentTemplate. +// +k8s:deepcopy-gen=false +type DevPodEnvironmentTemplateRegistry interface { + ListDevPodEnvironmentTemplates(ctx context.Context, options *internalversion.ListOptions) (*DevPodEnvironmentTemplateList, error) + GetDevPodEnvironmentTemplate(ctx context.Context, id string, options *metav1.GetOptions) (*DevPodEnvironmentTemplate, error) + CreateDevPodEnvironmentTemplate(ctx context.Context, id *DevPodEnvironmentTemplate) (*DevPodEnvironmentTemplate, error) + UpdateDevPodEnvironmentTemplate(ctx context.Context, id *DevPodEnvironmentTemplate) (*DevPodEnvironmentTemplate, error) + DeleteDevPodEnvironmentTemplate(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewDevPodEnvironmentTemplateRegistry(sp builders.StandardStorageProvider) DevPodEnvironmentTemplateRegistry { + return &storageDevPodEnvironmentTemplate{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageDevPodEnvironmentTemplate struct { + builders.StandardStorageProvider +} + +func (s *storageDevPodEnvironmentTemplate) ListDevPodEnvironmentTemplates(ctx context.Context, options *internalversion.ListOptions) (*DevPodEnvironmentTemplateList, 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.(*DevPodEnvironmentTemplateList), err +} + +func (s *storageDevPodEnvironmentTemplate) GetDevPodEnvironmentTemplate(ctx context.Context, id string, options *metav1.GetOptions) (*DevPodEnvironmentTemplate, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*DevPodEnvironmentTemplate), nil +} + +func (s *storageDevPodEnvironmentTemplate) CreateDevPodEnvironmentTemplate(ctx context.Context, object *DevPodEnvironmentTemplate) (*DevPodEnvironmentTemplate, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*DevPodEnvironmentTemplate), nil +} + +func (s *storageDevPodEnvironmentTemplate) UpdateDevPodEnvironmentTemplate(ctx context.Context, object *DevPodEnvironmentTemplate) (*DevPodEnvironmentTemplate, 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.(*DevPodEnvironmentTemplate), nil +} + +func (s *storageDevPodEnvironmentTemplate) DeleteDevPodEnvironmentTemplate(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 `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstance `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodDeleteOptionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodDeleteOptions `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodStatusOptionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodStatusOptions `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodSshOptionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodSshOptions `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceStateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstanceState `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodStopOptionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodStopOptions `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspaceInstanceTroubleshootList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspaceInstanceTroubleshoot `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodUpOptionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodUpOptions `json:"items"` +} + +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. @@ -3966,6 +4706,125 @@ func (s *storageDevPodWorkspaceInstance) DeleteDevPodWorkspaceInstance(ctx conte return sync, err } +// DevPodWorkspacePreset Functions and Structs +// +// +k8s:deepcopy-gen=false +type DevPodWorkspacePresetStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type DevPodWorkspacePresetStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type DevPodWorkspacePresetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspacePreset `json:"items"` +} + +func (DevPodWorkspacePreset) NewStatus() interface{} { + return DevPodWorkspacePresetStatus{} +} + +func (pc *DevPodWorkspacePreset) GetStatus() interface{} { + return pc.Status +} + +func (pc *DevPodWorkspacePreset) SetStatus(s interface{}) { + pc.Status = s.(DevPodWorkspacePresetStatus) +} + +func (pc *DevPodWorkspacePreset) GetSpec() interface{} { + return pc.Spec +} + +func (pc *DevPodWorkspacePreset) SetSpec(s interface{}) { + pc.Spec = s.(DevPodWorkspacePresetSpec) +} + +func (pc *DevPodWorkspacePreset) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *DevPodWorkspacePreset) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc DevPodWorkspacePreset) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store DevPodWorkspacePreset. +// +k8s:deepcopy-gen=false +type DevPodWorkspacePresetRegistry interface { + ListDevPodWorkspacePresets(ctx context.Context, options *internalversion.ListOptions) (*DevPodWorkspacePresetList, error) + GetDevPodWorkspacePreset(ctx context.Context, id string, options *metav1.GetOptions) (*DevPodWorkspacePreset, error) + CreateDevPodWorkspacePreset(ctx context.Context, id *DevPodWorkspacePreset) (*DevPodWorkspacePreset, error) + UpdateDevPodWorkspacePreset(ctx context.Context, id *DevPodWorkspacePreset) (*DevPodWorkspacePreset, error) + DeleteDevPodWorkspacePreset(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewDevPodWorkspacePresetRegistry(sp builders.StandardStorageProvider) DevPodWorkspacePresetRegistry { + return &storageDevPodWorkspacePreset{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageDevPodWorkspacePreset struct { + builders.StandardStorageProvider +} + +func (s *storageDevPodWorkspacePreset) ListDevPodWorkspacePresets(ctx context.Context, options *internalversion.ListOptions) (*DevPodWorkspacePresetList, 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.(*DevPodWorkspacePresetList), err +} + +func (s *storageDevPodWorkspacePreset) GetDevPodWorkspacePreset(ctx context.Context, id string, options *metav1.GetOptions) (*DevPodWorkspacePreset, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*DevPodWorkspacePreset), nil +} + +func (s *storageDevPodWorkspacePreset) CreateDevPodWorkspacePreset(ctx context.Context, object *DevPodWorkspacePreset) (*DevPodWorkspacePreset, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*DevPodWorkspacePreset), nil +} + +func (s *storageDevPodWorkspacePreset) UpdateDevPodWorkspacePreset(ctx context.Context, object *DevPodWorkspacePreset) (*DevPodWorkspacePreset, 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.(*DevPodWorkspacePreset), nil +} + +func (s *storageDevPodWorkspacePreset) DeleteDevPodWorkspacePreset(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 @@ -4877,11 +5736,130 @@ func NewLicenseTokenRegistry(sp builders.StandardStorageProvider) LicenseTokenRe // Implement Registry // storage puts strong typing around storage calls // +k8s:deepcopy-gen=false -type storageLicenseToken struct { +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 `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []LoftUpgrade `json:"items"` +} + +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 *storageLicenseToken) ListLicenseTokens(ctx context.Context, options *internalversion.ListOptions) (*LicenseTokenList, error) { +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") } @@ -4890,117 +5868,117 @@ func (s *storageLicenseToken) ListLicenseTokens(ctx context.Context, options *in if err != nil { return nil, err } - return obj.(*LicenseTokenList), err + return obj.(*LoftUpgradeList), err } -func (s *storageLicenseToken) GetLicenseToken(ctx context.Context, id string, options *metav1.GetOptions) (*LicenseToken, error) { +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.(*LicenseToken), nil + return obj.(*LoftUpgrade), nil } -func (s *storageLicenseToken) CreateLicenseToken(ctx context.Context, object *LicenseToken) (*LicenseToken, error) { +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.(*LicenseToken), nil + return obj.(*LoftUpgrade), nil } -func (s *storageLicenseToken) UpdateLicenseToken(ctx context.Context, object *LicenseToken) (*LicenseToken, error) { +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.(*LicenseToken), nil + return obj.(*LoftUpgrade), nil } -func (s *storageLicenseToken) DeleteLicenseToken(ctx context.Context, id string) (bool, error) { +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 } -// LoftUpgrade Functions and Structs +// OIDCClient Functions and Structs // // +k8s:deepcopy-gen=false -type LoftUpgradeStrategy struct { +type OIDCClientStrategy struct { builders.DefaultStorageStrategy } // +k8s:deepcopy-gen=false -type LoftUpgradeStatusStrategy struct { +type OIDCClientStatusStrategy struct { builders.DefaultStatusStorageStrategy } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type LoftUpgradeList struct { +type OIDCClientList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []LoftUpgrade `json:"items"` + Items []OIDCClient `json:"items"` } -func (LoftUpgrade) NewStatus() interface{} { - return LoftUpgradeStatus{} +func (OIDCClient) NewStatus() interface{} { + return OIDCClientStatus{} } -func (pc *LoftUpgrade) GetStatus() interface{} { +func (pc *OIDCClient) GetStatus() interface{} { return pc.Status } -func (pc *LoftUpgrade) SetStatus(s interface{}) { - pc.Status = s.(LoftUpgradeStatus) +func (pc *OIDCClient) SetStatus(s interface{}) { + pc.Status = s.(OIDCClientStatus) } -func (pc *LoftUpgrade) GetSpec() interface{} { +func (pc *OIDCClient) GetSpec() interface{} { return pc.Spec } -func (pc *LoftUpgrade) SetSpec(s interface{}) { - pc.Spec = s.(LoftUpgradeSpec) +func (pc *OIDCClient) SetSpec(s interface{}) { + pc.Spec = s.(OIDCClientSpec) } -func (pc *LoftUpgrade) GetObjectMeta() *metav1.ObjectMeta { +func (pc *OIDCClient) GetObjectMeta() *metav1.ObjectMeta { return &pc.ObjectMeta } -func (pc *LoftUpgrade) SetGeneration(generation int64) { +func (pc *OIDCClient) SetGeneration(generation int64) { pc.ObjectMeta.Generation = generation } -func (pc LoftUpgrade) GetGeneration() int64 { +func (pc OIDCClient) GetGeneration() int64 { return pc.ObjectMeta.Generation } -// Registry is an interface for things that know how to store LoftUpgrade. +// Registry is an interface for things that know how to store OIDCClient. // +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) +type OIDCClientRegistry interface { + ListOIDCClients(ctx context.Context, options *internalversion.ListOptions) (*OIDCClientList, error) + GetOIDCClient(ctx context.Context, id string, options *metav1.GetOptions) (*OIDCClient, error) + CreateOIDCClient(ctx context.Context, id *OIDCClient) (*OIDCClient, error) + UpdateOIDCClient(ctx context.Context, id *OIDCClient) (*OIDCClient, error) + DeleteOIDCClient(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} +func NewOIDCClientRegistry(sp builders.StandardStorageProvider) OIDCClientRegistry { + return &storageOIDCClient{sp} } // Implement Registry // storage puts strong typing around storage calls // +k8s:deepcopy-gen=false -type storageLoftUpgrade struct { +type storageOIDCClient struct { builders.StandardStorageProvider } -func (s *storageLoftUpgrade) ListLoftUpgrades(ctx context.Context, options *internalversion.ListOptions) (*LoftUpgradeList, error) { +func (s *storageOIDCClient) ListOIDCClients(ctx context.Context, options *internalversion.ListOptions) (*OIDCClientList, error) { if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { return nil, fmt.Errorf("field selector not supported yet") } @@ -5009,37 +5987,37 @@ func (s *storageLoftUpgrade) ListLoftUpgrades(ctx context.Context, options *inte if err != nil { return nil, err } - return obj.(*LoftUpgradeList), err + return obj.(*OIDCClientList), err } -func (s *storageLoftUpgrade) GetLoftUpgrade(ctx context.Context, id string, options *metav1.GetOptions) (*LoftUpgrade, error) { +func (s *storageOIDCClient) GetOIDCClient(ctx context.Context, id string, options *metav1.GetOptions) (*OIDCClient, error) { st := s.GetStandardStorage() obj, err := st.Get(ctx, id, options) if err != nil { return nil, err } - return obj.(*LoftUpgrade), nil + return obj.(*OIDCClient), nil } -func (s *storageLoftUpgrade) CreateLoftUpgrade(ctx context.Context, object *LoftUpgrade) (*LoftUpgrade, error) { +func (s *storageOIDCClient) CreateOIDCClient(ctx context.Context, object *OIDCClient) (*OIDCClient, error) { st := s.GetStandardStorage() obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) if err != nil { return nil, err } - return obj.(*LoftUpgrade), nil + return obj.(*OIDCClient), nil } -func (s *storageLoftUpgrade) UpdateLoftUpgrade(ctx context.Context, object *LoftUpgrade) (*LoftUpgrade, error) { +func (s *storageOIDCClient) UpdateOIDCClient(ctx context.Context, object *OIDCClient) (*OIDCClient, 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 + return obj.(*OIDCClient), nil } -func (s *storageLoftUpgrade) DeleteLoftUpgrade(ctx context.Context, id string) (bool, error) { +func (s *storageOIDCClient) DeleteOIDCClient(ctx context.Context, id string) (bool, error) { st := s.GetStandardStorage() _, sync, err := st.Delete(ctx, id, nil, &metav1.DeleteOptions{}) return sync, err @@ -5242,6 +6220,14 @@ type ProjectMigrateVirtualClusterInstanceList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type ProjectRunnersList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProjectRunners `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type ProjectTemplatesList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -6835,6 +7821,22 @@ type TeamClustersList struct { Items []TeamClusters `json:"items"` } +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamObjectPermissionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TeamObjectPermissions `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TeamPermissionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TeamPermissions `json:"items"` +} + func (Team) NewStatus() interface{} { return TeamStatus{} } @@ -6934,6 +7936,125 @@ func (s *storageTeam) DeleteTeam(ctx context.Context, id string) (bool, error) { return sync, err } +// TranslateVClusterResourceName Functions and Structs +// +// +k8s:deepcopy-gen=false +type TranslateVClusterResourceNameStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type TranslateVClusterResourceNameStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TranslateVClusterResourceNameList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TranslateVClusterResourceName `json:"items"` +} + +func (TranslateVClusterResourceName) NewStatus() interface{} { + return TranslateVClusterResourceNameStatus{} +} + +func (pc *TranslateVClusterResourceName) GetStatus() interface{} { + return pc.Status +} + +func (pc *TranslateVClusterResourceName) SetStatus(s interface{}) { + pc.Status = s.(TranslateVClusterResourceNameStatus) +} + +func (pc *TranslateVClusterResourceName) GetSpec() interface{} { + return pc.Spec +} + +func (pc *TranslateVClusterResourceName) SetSpec(s interface{}) { + pc.Spec = s.(TranslateVClusterResourceNameSpec) +} + +func (pc *TranslateVClusterResourceName) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *TranslateVClusterResourceName) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc TranslateVClusterResourceName) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store TranslateVClusterResourceName. +// +k8s:deepcopy-gen=false +type TranslateVClusterResourceNameRegistry interface { + ListTranslateVClusterResourceNames(ctx context.Context, options *internalversion.ListOptions) (*TranslateVClusterResourceNameList, error) + GetTranslateVClusterResourceName(ctx context.Context, id string, options *metav1.GetOptions) (*TranslateVClusterResourceName, error) + CreateTranslateVClusterResourceName(ctx context.Context, id *TranslateVClusterResourceName) (*TranslateVClusterResourceName, error) + UpdateTranslateVClusterResourceName(ctx context.Context, id *TranslateVClusterResourceName) (*TranslateVClusterResourceName, error) + DeleteTranslateVClusterResourceName(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewTranslateVClusterResourceNameRegistry(sp builders.StandardStorageProvider) TranslateVClusterResourceNameRegistry { + return &storageTranslateVClusterResourceName{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageTranslateVClusterResourceName struct { + builders.StandardStorageProvider +} + +func (s *storageTranslateVClusterResourceName) ListTranslateVClusterResourceNames(ctx context.Context, options *internalversion.ListOptions) (*TranslateVClusterResourceNameList, 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.(*TranslateVClusterResourceNameList), err +} + +func (s *storageTranslateVClusterResourceName) GetTranslateVClusterResourceName(ctx context.Context, id string, options *metav1.GetOptions) (*TranslateVClusterResourceName, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*TranslateVClusterResourceName), nil +} + +func (s *storageTranslateVClusterResourceName) CreateTranslateVClusterResourceName(ctx context.Context, object *TranslateVClusterResourceName) (*TranslateVClusterResourceName, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*TranslateVClusterResourceName), nil +} + +func (s *storageTranslateVClusterResourceName) UpdateTranslateVClusterResourceName(ctx context.Context, object *TranslateVClusterResourceName) (*TranslateVClusterResourceName, 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.(*TranslateVClusterResourceName), nil +} + +func (s *storageTranslateVClusterResourceName) DeleteTranslateVClusterResourceName(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 @@ -6972,6 +8093,14 @@ type UserClustersList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type UserObjectPermissionsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []UserObjectPermissions `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type UserPermissionsList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -7115,6 +8244,14 @@ type VirtualClusterAccessKeyList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualClusterExternalDatabaseList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterExternalDatabase `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type VirtualClusterInstanceKubeConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -7228,6 +8365,125 @@ func (s *storageVirtualClusterInstance) DeleteVirtualClusterInstance(ctx context return sync, err } +// VirtualClusterSchema Functions and Structs +// +// +k8s:deepcopy-gen=false +type VirtualClusterSchemaStrategy struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type VirtualClusterSchemaStatusStrategy struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type VirtualClusterSchemaList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualClusterSchema `json:"items"` +} + +func (VirtualClusterSchema) NewStatus() interface{} { + return VirtualClusterSchemaStatus{} +} + +func (pc *VirtualClusterSchema) GetStatus() interface{} { + return pc.Status +} + +func (pc *VirtualClusterSchema) SetStatus(s interface{}) { + pc.Status = s.(VirtualClusterSchemaStatus) +} + +func (pc *VirtualClusterSchema) GetSpec() interface{} { + return pc.Spec +} + +func (pc *VirtualClusterSchema) SetSpec(s interface{}) { + pc.Spec = s.(VirtualClusterSchemaSpec) +} + +func (pc *VirtualClusterSchema) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *VirtualClusterSchema) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc VirtualClusterSchema) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store VirtualClusterSchema. +// +k8s:deepcopy-gen=false +type VirtualClusterSchemaRegistry interface { + ListVirtualClusterSchemas(ctx context.Context, options *internalversion.ListOptions) (*VirtualClusterSchemaList, error) + GetVirtualClusterSchema(ctx context.Context, id string, options *metav1.GetOptions) (*VirtualClusterSchema, error) + CreateVirtualClusterSchema(ctx context.Context, id *VirtualClusterSchema) (*VirtualClusterSchema, error) + UpdateVirtualClusterSchema(ctx context.Context, id *VirtualClusterSchema) (*VirtualClusterSchema, error) + DeleteVirtualClusterSchema(ctx context.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func NewVirtualClusterSchemaRegistry(sp builders.StandardStorageProvider) VirtualClusterSchemaRegistry { + return &storageVirtualClusterSchema{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storageVirtualClusterSchema struct { + builders.StandardStorageProvider +} + +func (s *storageVirtualClusterSchema) ListVirtualClusterSchemas(ctx context.Context, options *internalversion.ListOptions) (*VirtualClusterSchemaList, 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.(*VirtualClusterSchemaList), err +} + +func (s *storageVirtualClusterSchema) GetVirtualClusterSchema(ctx context.Context, id string, options *metav1.GetOptions) (*VirtualClusterSchema, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterSchema), nil +} + +func (s *storageVirtualClusterSchema) CreateVirtualClusterSchema(ctx context.Context, object *VirtualClusterSchema) (*VirtualClusterSchema, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, &metav1.CreateOptions{}) + if err != nil { + return nil, err + } + return obj.(*VirtualClusterSchema), nil +} + +func (s *storageVirtualClusterSchema) UpdateVirtualClusterSchema(ctx context.Context, object *VirtualClusterSchema) (*VirtualClusterSchema, 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.(*VirtualClusterSchema), nil +} + +func (s *storageVirtualClusterSchema) DeleteVirtualClusterSchema(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 diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.deepcopy.go index d9f450b8..6bd5c0f6 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.deepcopy.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.deepcopy.go @@ -12,6 +12,7 @@ import ( v1 "github.com/loft-sh/api/v4/pkg/apis/audit/v1" storagev1 "github.com/loft-sh/api/v4/pkg/apis/storage/v1" uiv1 "github.com/loft-sh/api/v4/pkg/apis/ui/v1" + corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -153,6 +154,28 @@ func (in *AgentAuditEventStatus) DeepCopy() *AgentAuditEventStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentCostControlConfig) DeepCopyInto(out *AgentCostControlConfig) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + in.CostControlClusterConfig.DeepCopyInto(&out.CostControlClusterConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentCostControlConfig. +func (in *AgentCostControlConfig) DeepCopy() *AgentCostControlConfig { + if in == nil { + return nil + } + out := new(AgentCostControlConfig) + 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 @@ -436,6 +459,23 @@ func (in *Apps) DeepCopy() *Apps { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AssignedVia) DeepCopyInto(out *AssignedVia) { + *out = *in + out.ObjectName = in.ObjectName + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssignedVia. +func (in *AssignedVia) DeepCopy() *AssignedVia { + if in == nil { + return nil + } + out := new(AssignedVia) + 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 @@ -582,6 +622,11 @@ func (in *Authentication) DeepCopyInto(out *Authentication) { (*out)[key] = val } } + if in.GroupsFilters != nil { + in, out := &in.GroupsFilters, &out.GroupsFilters + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -965,13 +1010,30 @@ func (in *BackupStatus) DeepCopy() *BackupStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Cloud) DeepCopyInto(out *Cloud) { + *out = *in + out.MaintenanceWindow = in.MaintenanceWindow + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cloud. +func (in *Cloud) DeepCopy() *Cloud { + if in == nil { + return nil + } + out := new(Cloud) + 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 + in.Status.DeepCopyInto(&out.Status) return } @@ -1113,6 +1175,29 @@ func (in *ClusterAccessList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAccessRole) DeepCopyInto(out *ClusterAccessRole) { + *out = *in + out.ObjectName = in.ObjectName + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]ObjectName, len(*in)) + copy(*out, *in) + } + out.AssignedVia = in.AssignedVia + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAccessRole. +func (in *ClusterAccessRole) DeepCopy() *ClusterAccessRole { + if in == nil { + return nil + } + out := new(ClusterAccessRole) + in.DeepCopyInto(out) + return out +} + // 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 @@ -1243,6 +1328,11 @@ func (in *ClusterAgentConfigCommon) DeepCopyInto(out *ClusterAgentConfigCommon) copy(*out, *in) } out.AnalyticsSpec = in.AnalyticsSpec + if in.CostControl != nil { + in, out := &in.CostControl, &out.CostControl + *out = new(AgentCostControlConfig) + (*in).DeepCopyInto(*out) + } return } @@ -1787,7 +1877,7 @@ func (in *ClusterSpec) DeepCopy() *ClusterSpec { // 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 + in.ClusterStatus.DeepCopyInto(&out.ClusterStatus) return } @@ -1981,6 +2071,16 @@ func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus) { *out = new(storagev1.VaultIntegrationSpec) (*in).DeepCopyInto(*out) } + if in.Cloud != nil { + in, out := &in.Cloud, &out.Cloud + *out = new(Cloud) + **out = **in + } + if in.CostControl != nil { + in, out := &in.CostControl, &out.CostControl + *out = new(CostControl) + (*in).DeepCopyInto(*out) + } return } @@ -2062,7 +2162,7 @@ func (in *ConvertVirtualClusterConfig) DeepCopyInto(out *ConvertVirtualClusterCo *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status return } @@ -2121,6 +2221,13 @@ func (in *ConvertVirtualClusterConfigList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConvertVirtualClusterConfigSpec) DeepCopyInto(out *ConvertVirtualClusterConfigSpec) { *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 } @@ -2151,136 +2258,175 @@ func (in *ConvertVirtualClusterConfigStatus) DeepCopy() *ConvertVirtualClusterCo } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodDeleteOptions) DeepCopyInto(out *DevPodDeleteOptions) { +func (in *CostControl) DeepCopyInto(out *CostControl) { *out = *in - out.TypeMeta = in.TypeMeta + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + in.Global.DeepCopyInto(&out.Global) + in.Cluster.DeepCopyInto(&out.Cluster) + if in.Settings != nil { + in, out := &in.Settings, &out.Settings + *out = new(CostControlSettings) + (*in).DeepCopyInto(*out) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodDeleteOptions. -func (in *DevPodDeleteOptions) DeepCopy() *DevPodDeleteOptions { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControl. +func (in *CostControl) DeepCopy() *CostControl { if in == nil { return nil } - out := new(DevPodDeleteOptions) + out := new(CostControl) 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 *DevPodDeleteOptionsList) DeepCopyInto(out *DevPodDeleteOptionsList) { +func (in *CostControlClusterConfig) DeepCopyInto(out *CostControlClusterConfig) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DevPodDeleteOptions, len(*in)) - copy(*out, *in) + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = new(storagev1.Metrics) + (*in).DeepCopyInto(*out) + } + if in.OpenCost != nil { + in, out := &in.OpenCost, &out.OpenCost + *out = new(storagev1.OpenCost) + (*in).DeepCopyInto(*out) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodDeleteOptionsList. -func (in *DevPodDeleteOptionsList) DeepCopy() *DevPodDeleteOptionsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControlClusterConfig. +func (in *CostControlClusterConfig) DeepCopy() *CostControlClusterConfig { if in == nil { return nil } - out := new(DevPodDeleteOptionsList) + out := new(CostControlClusterConfig) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodDeleteOptionsList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CostControlGPUSettings) DeepCopyInto(out *CostControlGPUSettings) { + *out = *in + if in.AvgGPUPrice != nil { + in, out := &in.AvgGPUPrice, &out.AvgGPUPrice + *out = new(CostControlResourcePrice) + **out = **in } - return nil + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControlGPUSettings. +func (in *CostControlGPUSettings) DeepCopy() *CostControlGPUSettings { + if in == nil { + return nil + } + out := new(CostControlGPUSettings) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodSshOptions) DeepCopyInto(out *DevPodSshOptions) { +func (in *CostControlGlobalConfig) DeepCopyInto(out *CostControlGlobalConfig) { *out = *in - out.TypeMeta = in.TypeMeta + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = new(storagev1.Metrics) + (*in).DeepCopyInto(*out) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodSshOptions. -func (in *DevPodSshOptions) DeepCopy() *DevPodSshOptions { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControlGlobalConfig. +func (in *CostControlGlobalConfig) DeepCopy() *CostControlGlobalConfig { if in == nil { return nil } - out := new(DevPodSshOptions) + out := new(CostControlGlobalConfig) 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 +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CostControlResourcePrice) DeepCopyInto(out *CostControlResourcePrice) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControlResourcePrice. +func (in *CostControlResourcePrice) DeepCopy() *CostControlResourcePrice { + if in == nil { + return nil } - return nil + out := new(CostControlResourcePrice) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodSshOptionsList) DeepCopyInto(out *DevPodSshOptionsList) { +func (in *CostControlSettings) DeepCopyInto(out *CostControlSettings) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DevPodSshOptions, len(*in)) - copy(*out, *in) + if in.AvgCPUPricePerNode != nil { + in, out := &in.AvgCPUPricePerNode, &out.AvgCPUPricePerNode + *out = new(CostControlResourcePrice) + **out = **in + } + if in.AvgRAMPricePerNode != nil { + in, out := &in.AvgRAMPricePerNode, &out.AvgRAMPricePerNode + *out = new(CostControlResourcePrice) + **out = **in + } + if in.GPUSettings != nil { + in, out := &in.GPUSettings, &out.GPUSettings + *out = new(CostControlGPUSettings) + (*in).DeepCopyInto(*out) + } + if in.ControlPlanePricePerCluster != nil { + in, out := &in.ControlPlanePricePerCluster, &out.ControlPlanePricePerCluster + *out = new(CostControlResourcePrice) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodSshOptionsList. -func (in *DevPodSshOptionsList) DeepCopy() *DevPodSshOptionsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostControlSettings. +func (in *CostControlSettings) DeepCopy() *CostControlSettings { if in == nil { return nil } - out := new(DevPodSshOptionsList) + out := new(CostControlSettings) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodSshOptionsList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != 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) { +func (in *DatabaseConnector) DeepCopyInto(out *DatabaseConnector) { *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 DevPodStatusOptions. -func (in *DevPodStatusOptions) DeepCopy() *DevPodStatusOptions { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseConnector. +func (in *DatabaseConnector) DeepCopy() *DatabaseConnector { if in == nil { return nil } - out := new(DevPodStatusOptions) + out := new(DatabaseConnector) 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 { +func (in *DatabaseConnector) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2288,30 +2434,32 @@ func (in *DevPodStatusOptions) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodStatusOptionsList) DeepCopyInto(out *DevPodStatusOptionsList) { +func (in *DatabaseConnectorList) DeepCopyInto(out *DatabaseConnectorList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]DevPodStatusOptions, len(*in)) - copy(*out, *in) + *out = make([]DatabaseConnector, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStatusOptionsList. -func (in *DevPodStatusOptionsList) DeepCopy() *DevPodStatusOptionsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseConnectorList. +func (in *DatabaseConnectorList) DeepCopy() *DatabaseConnectorList { if in == nil { return nil } - out := new(DevPodStatusOptionsList) + out := new(DatabaseConnectorList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodStatusOptionsList) DeepCopyObject() runtime.Object { +func (in *DatabaseConnectorList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2319,80 +2467,56 @@ func (in *DevPodStatusOptionsList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodStopOptions) DeepCopyInto(out *DevPodStopOptions) { +func (in *DatabaseConnectorSpec) DeepCopyInto(out *DatabaseConnectorSpec) { *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 { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseConnectorSpec. +func (in *DatabaseConnectorSpec) DeepCopy() *DatabaseConnectorSpec { if in == nil { return nil } - out := new(DevPodStopOptions) + out := new(DatabaseConnectorSpec) 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 *DevPodStopOptionsList) DeepCopyInto(out *DevPodStopOptionsList) { +func (in *DatabaseConnectorStatus) DeepCopyInto(out *DatabaseConnectorStatus) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DevPodStopOptions, len(*in)) - copy(*out, *in) - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStopOptionsList. -func (in *DevPodStopOptionsList) DeepCopy() *DevPodStopOptionsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseConnectorStatus. +func (in *DatabaseConnectorStatus) DeepCopy() *DatabaseConnectorStatus { if in == nil { return nil } - out := new(DevPodStopOptionsList) + out := new(DatabaseConnectorStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodStopOptionsList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != 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) { +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 DevPodUpOptions. -func (in *DevPodUpOptions) DeepCopy() *DevPodUpOptions { +// 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(DevPodUpOptions) + out := new(DevPodDeleteOptions) 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 { +func (in *DevPodDeleteOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2400,30 +2524,30 @@ func (in *DevPodUpOptions) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodUpOptionsList) DeepCopyInto(out *DevPodUpOptionsList) { +func (in *DevPodDeleteOptionsList) DeepCopyInto(out *DevPodDeleteOptionsList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]DevPodUpOptions, len(*in)) + *out = make([]DevPodDeleteOptions, len(*in)) copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodUpOptionsList. -func (in *DevPodUpOptionsList) DeepCopy() *DevPodUpOptionsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodDeleteOptionsList. +func (in *DevPodDeleteOptionsList) DeepCopy() *DevPodDeleteOptionsList { if in == nil { return nil } - out := new(DevPodUpOptionsList) + out := new(DevPodDeleteOptionsList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodUpOptionsList) DeepCopyObject() runtime.Object { +func (in *DevPodDeleteOptionsList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2431,27 +2555,27 @@ func (in *DevPodUpOptionsList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstance) DeepCopyInto(out *DevPodWorkspaceInstance) { +func (in *DevPodEnvironmentTemplate) DeepCopyInto(out *DevPodEnvironmentTemplate) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + out.Status = in.Status return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstance. -func (in *DevPodWorkspaceInstance) DeepCopy() *DevPodWorkspaceInstance { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplate. +func (in *DevPodEnvironmentTemplate) DeepCopy() *DevPodEnvironmentTemplate { if in == nil { return nil } - out := new(DevPodWorkspaceInstance) + out := new(DevPodEnvironmentTemplate) 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 { +func (in *DevPodEnvironmentTemplate) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2459,13 +2583,13 @@ func (in *DevPodWorkspaceInstance) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstanceList) DeepCopyInto(out *DevPodWorkspaceInstanceList) { +func (in *DevPodEnvironmentTemplateList) DeepCopyInto(out *DevPodEnvironmentTemplateList) { *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)) + *out = make([]DevPodEnvironmentTemplate, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -2473,18 +2597,18 @@ func (in *DevPodWorkspaceInstanceList) DeepCopyInto(out *DevPodWorkspaceInstance return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceList. -func (in *DevPodWorkspaceInstanceList) DeepCopy() *DevPodWorkspaceInstanceList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateList. +func (in *DevPodEnvironmentTemplateList) DeepCopy() *DevPodEnvironmentTemplateList { if in == nil { return nil } - out := new(DevPodWorkspaceInstanceList) + out := new(DevPodEnvironmentTemplateList) 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 { +func (in *DevPodEnvironmentTemplateList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2492,42 +2616,531 @@ func (in *DevPodWorkspaceInstanceList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstanceSpec) DeepCopyInto(out *DevPodWorkspaceInstanceSpec) { +func (in *DevPodEnvironmentTemplateSpec) DeepCopyInto(out *DevPodEnvironmentTemplateSpec) { *out = *in - in.DevPodWorkspaceInstanceSpec.DeepCopyInto(&out.DevPodWorkspaceInstanceSpec) + in.DevPodEnvironmentTemplateSpec.DeepCopyInto(&out.DevPodEnvironmentTemplateSpec) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceSpec. -func (in *DevPodWorkspaceInstanceSpec) DeepCopy() *DevPodWorkspaceInstanceSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateSpec. +func (in *DevPodEnvironmentTemplateSpec) DeepCopy() *DevPodEnvironmentTemplateSpec { if in == nil { return nil } - out := new(DevPodWorkspaceInstanceSpec) + out := new(DevPodEnvironmentTemplateSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstanceState) DeepCopyInto(out *DevPodWorkspaceInstanceState) { +func (in *DevPodEnvironmentTemplateStatus) DeepCopyInto(out *DevPodEnvironmentTemplateStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateStatus. +func (in *DevPodEnvironmentTemplateStatus) DeepCopy() *DevPodEnvironmentTemplateStatus { + if in == nil { + return nil + } + out := new(DevPodEnvironmentTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// 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 *DevPodSshOptionsList) DeepCopyInto(out *DevPodSshOptionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodSshOptions, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodSshOptionsList. +func (in *DevPodSshOptionsList) DeepCopy() *DevPodSshOptionsList { + if in == nil { + return nil + } + out := new(DevPodSshOptionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodSshOptionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 *DevPodStatusOptionsList) DeepCopyInto(out *DevPodStatusOptionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodStatusOptions, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStatusOptionsList. +func (in *DevPodStatusOptionsList) DeepCopy() *DevPodStatusOptionsList { + if in == nil { + return nil + } + out := new(DevPodStatusOptionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodStatusOptionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 *DevPodStopOptionsList) DeepCopyInto(out *DevPodStopOptionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodStopOptions, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodStopOptionsList. +func (in *DevPodStopOptionsList) DeepCopy() *DevPodStopOptionsList { + if in == nil { + return nil + } + out := new(DevPodStopOptionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodStopOptionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 *DevPodUpOptionsList) DeepCopyInto(out *DevPodUpOptionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodUpOptions, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodUpOptionsList. +func (in *DevPodUpOptionsList) DeepCopy() *DevPodUpOptionsList { + if in == nil { + return nil + } + out := new(DevPodUpOptionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodUpOptionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 *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 *DevPodWorkspaceInstanceState) DeepCopyInto(out *DevPodWorkspaceInstanceState) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceState. +func (in *DevPodWorkspaceInstanceState) DeepCopy() *DevPodWorkspaceInstanceState { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceState) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceState) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceStateList) DeepCopyInto(out *DevPodWorkspaceInstanceStateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceState, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStateList. +func (in *DevPodWorkspaceInstanceStateList) DeepCopy() *DevPodWorkspaceInstanceStateList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceStateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceStateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 *DevPodWorkspaceInstanceTroubleshoot) DeepCopyInto(out *DevPodWorkspaceInstanceTroubleshoot) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Workspace != nil { + in, out := &in.Workspace, &out.Workspace + *out = new(DevPodWorkspaceInstance) + (*in).DeepCopyInto(*out) + } + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(storagev1.DevPodWorkspaceTemplate) + (*in).DeepCopyInto(*out) + } + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = make([]corev1.Pod, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PVCs != nil { + in, out := &in.PVCs, &out.PVCs + *out = make([]corev1.PersistentVolumeClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Errors != nil { + in, out := &in.Errors, &out.Errors + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceTroubleshoot. +func (in *DevPodWorkspaceInstanceTroubleshoot) DeepCopy() *DevPodWorkspaceInstanceTroubleshoot { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceTroubleshoot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceTroubleshoot) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspaceInstanceTroubleshootList) DeepCopyInto(out *DevPodWorkspaceInstanceTroubleshootList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspaceInstanceTroubleshoot, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceTroubleshootList. +func (in *DevPodWorkspaceInstanceTroubleshootList) DeepCopy() *DevPodWorkspaceInstanceTroubleshootList { + if in == nil { + return nil + } + out := new(DevPodWorkspaceInstanceTroubleshootList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspaceInstanceTroubleshootList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePreset) DeepCopyInto(out *DevPodWorkspacePreset) { + *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 DevPodWorkspaceInstanceState. -func (in *DevPodWorkspaceInstanceState) DeepCopy() *DevPodWorkspaceInstanceState { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePreset. +func (in *DevPodWorkspacePreset) DeepCopy() *DevPodWorkspacePreset { if in == nil { return nil } - out := new(DevPodWorkspaceInstanceState) + out := new(DevPodWorkspacePreset) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodWorkspaceInstanceState) DeepCopyObject() runtime.Object { +func (in *DevPodWorkspacePreset) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2535,13 +3148,13 @@ func (in *DevPodWorkspaceInstanceState) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstanceStateList) DeepCopyInto(out *DevPodWorkspaceInstanceStateList) { +func (in *DevPodWorkspacePresetList) DeepCopyInto(out *DevPodWorkspacePresetList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]DevPodWorkspaceInstanceState, len(*in)) + *out = make([]DevPodWorkspacePreset, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -2549,18 +3162,18 @@ func (in *DevPodWorkspaceInstanceStateList) DeepCopyInto(out *DevPodWorkspaceIns return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStateList. -func (in *DevPodWorkspaceInstanceStateList) DeepCopy() *DevPodWorkspaceInstanceStateList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetList. +func (in *DevPodWorkspacePresetList) DeepCopy() *DevPodWorkspacePresetList { if in == nil { return nil } - out := new(DevPodWorkspaceInstanceStateList) + out := new(DevPodWorkspacePresetList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DevPodWorkspaceInstanceStateList) DeepCopyObject() runtime.Object { +func (in *DevPodWorkspacePresetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2568,23 +3181,34 @@ func (in *DevPodWorkspaceInstanceStateList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevPodWorkspaceInstanceStatus) DeepCopyInto(out *DevPodWorkspaceInstanceStatus) { +func (in *DevPodWorkspacePresetSpec) DeepCopyInto(out *DevPodWorkspacePresetSpec) { *out = *in - in.DevPodWorkspaceInstanceStatus.DeepCopyInto(&out.DevPodWorkspaceInstanceStatus) - if in.SleepModeConfig != nil { - in, out := &in.SleepModeConfig, &out.SleepModeConfig - *out = new(clusterv1.SleepModeConfig) - (*in).DeepCopyInto(*out) + in.DevPodWorkspacePresetSpec.DeepCopyInto(&out.DevPodWorkspacePresetSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetSpec. +func (in *DevPodWorkspacePresetSpec) DeepCopy() *DevPodWorkspacePresetSpec { + if in == nil { + return nil } + out := new(DevPodWorkspacePresetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePresetStatus) DeepCopyInto(out *DevPodWorkspacePresetStatus) { + *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspaceInstanceStatus. -func (in *DevPodWorkspaceInstanceStatus) DeepCopy() *DevPodWorkspaceInstanceStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetStatus. +func (in *DevPodWorkspacePresetStatus) DeepCopy() *DevPodWorkspacePresetStatus { if in == nil { return nil } - out := new(DevPodWorkspaceInstanceStatus) + out := new(DevPodWorkspacePresetStatus) in.DeepCopyInto(out) return out } @@ -2882,7 +3506,7 @@ func (in *Feature) DeepCopyInto(out *Feature) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) + out.Status = in.Status return } @@ -2956,7 +3580,7 @@ func (in *FeatureSpec) DeepCopy() *FeatureSpec { // 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 - in.Feature.DeepCopyInto(&out.Feature) + out.Feature = in.Feature return } @@ -3583,12 +4207,46 @@ func (in *LoftUpgradeStatus) DeepCopy() *LoftUpgradeStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MaintenanceWindow) DeepCopyInto(out *MaintenanceWindow) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceWindow. +func (in *MaintenanceWindow) DeepCopy() *MaintenanceWindow { + if in == nil { + return nil + } + out := new(MaintenanceWindow) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagementRole) DeepCopyInto(out *ManagementRole) { + *out = *in + out.ObjectName = in.ObjectName + out.AssignedVia = in.AssignedVia + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementRole. +func (in *ManagementRole) DeepCopy() *ManagementRole { + if in == nil { + return nil + } + out := new(ManagementRole) + 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)) + *out = make([]OIDCClientSpec, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -3608,6 +4266,67 @@ func (in *OIDC) DeepCopy() *OIDC { // 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 + 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 OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *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 OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.RedirectURIs != nil { in, out := &in.RedirectURIs, &out.RedirectURIs @@ -3617,12 +4336,66 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { if in == nil { return nil } - out := new(OIDCClient) + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectName) DeepCopyInto(out *ObjectName) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectName. +func (in *ObjectName) DeepCopy() *ObjectName { + if in == nil { + return nil + } + out := new(ObjectName) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectPermission) DeepCopyInto(out *ObjectPermission) { + *out = *in + out.ObjectName = in.ObjectName + 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 ObjectPermission. +func (in *ObjectPermission) DeepCopy() *ObjectPermission { + if in == nil { + return nil + } + out := new(ObjectPermission) in.DeepCopyInto(out) return out } @@ -4200,6 +4973,25 @@ func (in *ProjectMembersList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMembership) DeepCopyInto(out *ProjectMembership) { + *out = *in + out.ObjectName = in.ObjectName + out.Role = in.Role + out.AssignedVia = in.AssignedVia + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMembership. +func (in *ProjectMembership) DeepCopy() *ProjectMembership { + if in == nil { + return nil + } + out := new(ProjectMembership) + in.DeepCopyInto(out) + return out +} + // 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 @@ -4257,46 +5049,145 @@ func (in *ProjectMigrateSpaceInstanceList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } - return nil + 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 *ProjectMigrateSpaceInstanceSource) DeepCopyInto(out *ProjectMigrateSpaceInstanceSource) { +func (in *ProjectRole) DeepCopyInto(out *ProjectRole) { *out = *in + out.ObjectName = in.ObjectName return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateSpaceInstanceSource. -func (in *ProjectMigrateSpaceInstanceSource) DeepCopy() *ProjectMigrateSpaceInstanceSource { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRole. +func (in *ProjectRole) DeepCopy() *ProjectRole { if in == nil { return nil } - out := new(ProjectMigrateSpaceInstanceSource) + out := new(ProjectRole) 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) { +func (in *ProjectRunners) DeepCopyInto(out *ProjectRunners) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.SourceVirtualClusterInstance = in.SourceVirtualClusterInstance + 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 ProjectMigrateVirtualClusterInstance. -func (in *ProjectMigrateVirtualClusterInstance) DeepCopy() *ProjectMigrateVirtualClusterInstance { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRunners. +func (in *ProjectRunners) DeepCopy() *ProjectRunners { if in == nil { return nil } - out := new(ProjectMigrateVirtualClusterInstance) + out := new(ProjectRunners) 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 { +func (in *ProjectRunners) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4304,13 +5195,13 @@ func (in *ProjectMigrateVirtualClusterInstance) DeepCopyObject() runtime.Object } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopyInto(out *ProjectMigrateVirtualClusterInstanceList) { +func (in *ProjectRunnersList) DeepCopyInto(out *ProjectRunnersList) { *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)) + *out = make([]ProjectRunners, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -4318,40 +5209,24 @@ func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopyInto(out *ProjectMig return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMigrateVirtualClusterInstanceList. -func (in *ProjectMigrateVirtualClusterInstanceList) DeepCopy() *ProjectMigrateVirtualClusterInstanceList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRunnersList. +func (in *ProjectRunnersList) DeepCopy() *ProjectRunnersList { if in == nil { return nil } - out := new(ProjectMigrateVirtualClusterInstanceList) + out := new(ProjectRunnersList) 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 { +func (in *ProjectRunnersList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != 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 @@ -4539,6 +5414,20 @@ func (in *ProjectTemplates) DeepCopyInto(out *ProjectTemplates) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DevPodEnvironmentTemplates != nil { + in, out := &in.DevPodEnvironmentTemplates, &out.DevPodEnvironmentTemplates + *out = make([]DevPodEnvironmentTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DevPodWorkspacePresets != nil { + in, out := &in.DevPodWorkspacePresets, &out.DevPodWorkspacePresets + *out = make([]DevPodWorkspacePreset, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -6062,7 +6951,254 @@ func (in *TeamClustersList) DeepCopy() *TeamClustersList { } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TeamClustersList) DeepCopyObject() 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 *TeamObjectPermissions) DeepCopyInto(out *TeamObjectPermissions) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.ObjectPermissions != nil { + in, out := &in.ObjectPermissions, &out.ObjectPermissions + *out = make([]ObjectPermission, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamObjectPermissions. +func (in *TeamObjectPermissions) DeepCopy() *TeamObjectPermissions { + if in == nil { + return nil + } + out := new(TeamObjectPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamObjectPermissions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamObjectPermissionsList) DeepCopyInto(out *TeamObjectPermissionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TeamObjectPermissions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamObjectPermissionsList. +func (in *TeamObjectPermissionsList) DeepCopy() *TeamObjectPermissionsList { + if in == nil { + return nil + } + out := new(TeamObjectPermissionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamObjectPermissionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamPermissions) DeepCopyInto(out *TeamPermissions) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Members != nil { + in, out := &in.Members, &out.Members + *out = make([]ObjectName, len(*in)) + copy(*out, *in) + } + if in.ProjectMemberships != nil { + in, out := &in.ProjectMemberships, &out.ProjectMemberships + *out = make([]ProjectMembership, len(*in)) + copy(*out, *in) + } + if in.ManagementRoles != nil { + in, out := &in.ManagementRoles, &out.ManagementRoles + *out = make([]ManagementRole, len(*in)) + copy(*out, *in) + } + if in.ClusterAccessRoles != nil { + in, out := &in.ClusterAccessRoles, &out.ClusterAccessRoles + *out = make([]ClusterAccessRole, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualClusterRoles != nil { + in, out := &in.VirtualClusterRoles, &out.VirtualClusterRoles + *out = make([]VirtualClusterRole, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamPermissions. +func (in *TeamPermissions) DeepCopy() *TeamPermissions { + if in == nil { + return nil + } + out := new(TeamPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamPermissions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamPermissionsList) DeepCopyInto(out *TeamPermissionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TeamPermissions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamPermissionsList. +func (in *TeamPermissionsList) DeepCopy() *TeamPermissionsList { + if in == nil { + return nil + } + out := new(TeamPermissionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TeamPermissionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 + out.TeamStatus = in.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 *TranslateVClusterResourceName) DeepCopyInto(out *TranslateVClusterResourceName) { + *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 TranslateVClusterResourceName. +func (in *TranslateVClusterResourceName) DeepCopy() *TranslateVClusterResourceName { + if in == nil { + return nil + } + out := new(TranslateVClusterResourceName) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TranslateVClusterResourceName) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6070,13 +7206,13 @@ func (in *TeamClustersList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TeamList) DeepCopyInto(out *TeamList) { +func (in *TranslateVClusterResourceNameList) DeepCopyInto(out *TranslateVClusterResourceNameList) { *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)) + *out = make([]TranslateVClusterResourceName, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -6084,18 +7220,18 @@ func (in *TeamList) DeepCopyInto(out *TeamList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamList. -func (in *TeamList) DeepCopy() *TeamList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TranslateVClusterResourceNameList. +func (in *TranslateVClusterResourceNameList) DeepCopy() *TranslateVClusterResourceNameList { if in == nil { return nil } - out := new(TeamList) + out := new(TranslateVClusterResourceNameList) 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 { +func (in *TranslateVClusterResourceNameList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6103,35 +7239,33 @@ func (in *TeamList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TeamSpec) DeepCopyInto(out *TeamSpec) { +func (in *TranslateVClusterResourceNameSpec) DeepCopyInto(out *TranslateVClusterResourceNameSpec) { *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 { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TranslateVClusterResourceNameSpec. +func (in *TranslateVClusterResourceNameSpec) DeepCopy() *TranslateVClusterResourceNameSpec { if in == nil { return nil } - out := new(TeamSpec) + out := new(TranslateVClusterResourceNameSpec) 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) { +func (in *TranslateVClusterResourceNameStatus) DeepCopyInto(out *TranslateVClusterResourceNameStatus) { *out = *in - out.TeamStatus = in.TeamStatus return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamStatus. -func (in *TeamStatus) DeepCopy() *TeamStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TranslateVClusterResourceNameStatus. +func (in *TranslateVClusterResourceNameStatus) DeepCopy() *TranslateVClusterResourceNameStatus { if in == nil { return nil } - out := new(TeamStatus) + out := new(TranslateVClusterResourceNameStatus) in.DeepCopyInto(out) return out } @@ -6357,6 +7491,72 @@ func (in *UserList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserObjectPermissions) DeepCopyInto(out *UserObjectPermissions) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.ObjectPermissions != nil { + in, out := &in.ObjectPermissions, &out.ObjectPermissions + *out = make([]ObjectPermission, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserObjectPermissions. +func (in *UserObjectPermissions) DeepCopy() *UserObjectPermissions { + if in == nil { + return nil + } + out := new(UserObjectPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserObjectPermissions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserObjectPermissionsList) DeepCopyInto(out *UserObjectPermissionsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserObjectPermissions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserObjectPermissionsList. +func (in *UserObjectPermissionsList) DeepCopy() *UserObjectPermissionsList { + if in == nil { + return nil + } + out := new(UserObjectPermissionsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserObjectPermissionsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != 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 @@ -6376,6 +7576,33 @@ func (in *UserPermissions) DeepCopyInto(out *UserPermissions) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.TeamMemberships != nil { + in, out := &in.TeamMemberships, &out.TeamMemberships + *out = make([]ObjectName, len(*in)) + copy(*out, *in) + } + if in.ProjectMemberships != nil { + in, out := &in.ProjectMemberships, &out.ProjectMemberships + *out = make([]ProjectMembership, len(*in)) + copy(*out, *in) + } + if in.ManagementRoles != nil { + in, out := &in.ManagementRoles, &out.ManagementRoles + *out = make([]ManagementRole, len(*in)) + copy(*out, *in) + } + if in.ClusterAccessRoles != nil { + in, out := &in.ClusterAccessRoles, &out.ClusterAccessRoles + *out = make([]ClusterAccessRole, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VirtualClusterRoles != nil { + in, out := &in.VirtualClusterRoles, &out.VirtualClusterRoles + *out = make([]VirtualClusterRole, len(*in)) + copy(*out, *in) + } return } @@ -6463,6 +7690,25 @@ func (in *UserProfile) DeepCopyInto(out *UserProfile) { *out = new(string) **out = **in } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = new(map[string]*UserProfileSecret) + if **in != nil { + in, out := *in, *out + *out = make(map[string]*UserProfileSecret, len(*in)) + for key, val := range *in { + var outVal *UserProfileSecret + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(UserProfileSecret) + **out = **in + } + (*out)[key] = outVal + } + } + } return } @@ -6517,6 +7763,22 @@ func (in *UserProfileList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserProfileSecret) DeepCopyInto(out *UserProfileSecret) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserProfileSecret. +func (in *UserProfileSecret) DeepCopy() *UserProfileSecret { + if in == nil { + return nil + } + out := new(UserProfileSecret) + in.DeepCopyInto(out) + return out +} + // 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 @@ -6700,6 +7962,99 @@ func (in *VirtualClusterAccessKeyList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterExternalDatabase) DeepCopyInto(out *VirtualClusterExternalDatabase) { + *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 VirtualClusterExternalDatabase. +func (in *VirtualClusterExternalDatabase) DeepCopy() *VirtualClusterExternalDatabase { + if in == nil { + return nil + } + out := new(VirtualClusterExternalDatabase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterExternalDatabase) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterExternalDatabaseList) DeepCopyInto(out *VirtualClusterExternalDatabaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterExternalDatabase, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterExternalDatabaseList. +func (in *VirtualClusterExternalDatabaseList) DeepCopy() *VirtualClusterExternalDatabaseList { + if in == nil { + return nil + } + out := new(VirtualClusterExternalDatabaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterExternalDatabaseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterExternalDatabaseSpec) DeepCopyInto(out *VirtualClusterExternalDatabaseSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterExternalDatabaseSpec. +func (in *VirtualClusterExternalDatabaseSpec) DeepCopy() *VirtualClusterExternalDatabaseSpec { + if in == nil { + return nil + } + out := new(VirtualClusterExternalDatabaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterExternalDatabaseStatus) DeepCopyInto(out *VirtualClusterExternalDatabaseStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterExternalDatabaseStatus. +func (in *VirtualClusterExternalDatabaseStatus) DeepCopy() *VirtualClusterExternalDatabaseStatus { + if in == nil { + return nil + } + out := new(VirtualClusterExternalDatabaseStatus) + 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 @@ -7001,6 +8356,117 @@ func (in *VirtualClusterInstanceStatus) DeepCopy() *VirtualClusterInstanceStatus return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterRole) DeepCopyInto(out *VirtualClusterRole) { + *out = *in + out.ObjectName = in.ObjectName + out.AssignedVia = in.AssignedVia + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterRole. +func (in *VirtualClusterRole) DeepCopy() *VirtualClusterRole { + if in == nil { + return nil + } + out := new(VirtualClusterRole) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSchema) DeepCopyInto(out *VirtualClusterSchema) { + *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 VirtualClusterSchema. +func (in *VirtualClusterSchema) DeepCopy() *VirtualClusterSchema { + if in == nil { + return nil + } + out := new(VirtualClusterSchema) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterSchema) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSchemaList) DeepCopyInto(out *VirtualClusterSchemaList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualClusterSchema, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterSchemaList. +func (in *VirtualClusterSchemaList) DeepCopy() *VirtualClusterSchemaList { + if in == nil { + return nil + } + out := new(VirtualClusterSchemaList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualClusterSchemaList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSchemaSpec) DeepCopyInto(out *VirtualClusterSchemaSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterSchemaSpec. +func (in *VirtualClusterSchemaSpec) DeepCopy() *VirtualClusterSchemaSpec { + if in == nil { + return nil + } + out := new(VirtualClusterSchemaSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualClusterSchemaStatus) DeepCopyInto(out *VirtualClusterSchemaStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualClusterSchemaStatus. +func (in *VirtualClusterSchemaStatus) DeepCopy() *VirtualClusterSchemaStatus { + if in == nil { + return nil + } + out := new(VirtualClusterSchemaStatus) + 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 diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.defaults.go index ec1de1d5..228a30c3 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.defaults.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/management/zz_generated.defaults.go @@ -6,6 +6,7 @@ package management import ( + v1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -13,13 +14,178 @@ import ( // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&DevPodWorkspaceInstanceTroubleshoot{}, func(obj interface{}) { + SetObjectDefaults_DevPodWorkspaceInstanceTroubleshoot(obj.(*DevPodWorkspaceInstanceTroubleshoot)) + }) + scheme.AddTypeDefaultingFunc(&DevPodWorkspaceInstanceTroubleshootList{}, func(obj interface{}) { + SetObjectDefaults_DevPodWorkspaceInstanceTroubleshootList(obj.(*DevPodWorkspaceInstanceTroubleshootList)) + }) scheme.AddTypeDefaultingFunc(&ProjectClusters{}, func(obj interface{}) { SetObjectDefaults_ProjectClusters(obj.(*ProjectClusters)) }) scheme.AddTypeDefaultingFunc(&ProjectClustersList{}, func(obj interface{}) { SetObjectDefaults_ProjectClustersList(obj.(*ProjectClustersList)) }) + scheme.AddTypeDefaultingFunc(&ProjectRunners{}, func(obj interface{}) { SetObjectDefaults_ProjectRunners(obj.(*ProjectRunners)) }) + scheme.AddTypeDefaultingFunc(&ProjectRunnersList{}, func(obj interface{}) { SetObjectDefaults_ProjectRunnersList(obj.(*ProjectRunnersList)) }) scheme.AddTypeDefaultingFunc(&Runner{}, func(obj interface{}) { SetObjectDefaults_Runner(obj.(*Runner)) }) scheme.AddTypeDefaultingFunc(&RunnerList{}, func(obj interface{}) { SetObjectDefaults_RunnerList(obj.(*RunnerList)) }) return nil } +func SetObjectDefaults_DevPodWorkspaceInstanceTroubleshoot(in *DevPodWorkspaceInstanceTroubleshoot) { + for i := range in.Pods { + a := &in.Pods[i] + for j := range a.Spec.Volumes { + b := &a.Spec.Volumes[j] + if b.VolumeSource.ISCSI != nil { + if b.VolumeSource.ISCSI.ISCSIInterface == "" { + b.VolumeSource.ISCSI.ISCSIInterface = "default" + } + } + if b.VolumeSource.RBD != nil { + if b.VolumeSource.RBD.RBDPool == "" { + b.VolumeSource.RBD.RBDPool = "rbd" + } + if b.VolumeSource.RBD.RadosUser == "" { + b.VolumeSource.RBD.RadosUser = "admin" + } + if b.VolumeSource.RBD.Keyring == "" { + b.VolumeSource.RBD.Keyring = "/etc/ceph/keyring" + } + } + if b.VolumeSource.AzureDisk != nil { + if b.VolumeSource.AzureDisk.CachingMode == nil { + ptrVar1 := v1.AzureDataDiskCachingMode(v1.AzureDataDiskCachingReadWrite) + b.VolumeSource.AzureDisk.CachingMode = &ptrVar1 + } + if b.VolumeSource.AzureDisk.FSType == nil { + var ptrVar1 string = "ext4" + b.VolumeSource.AzureDisk.FSType = &ptrVar1 + } + if b.VolumeSource.AzureDisk.ReadOnly == nil { + var ptrVar1 bool = false + b.VolumeSource.AzureDisk.ReadOnly = &ptrVar1 + } + if b.VolumeSource.AzureDisk.Kind == nil { + ptrVar1 := v1.AzureDataDiskKind(v1.AzureSharedBlobDisk) + b.VolumeSource.AzureDisk.Kind = &ptrVar1 + } + } + if b.VolumeSource.ScaleIO != nil { + if b.VolumeSource.ScaleIO.StorageMode == "" { + b.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if b.VolumeSource.ScaleIO.FSType == "" { + b.VolumeSource.ScaleIO.FSType = "xfs" + } + } + } + for j := range a.Spec.InitContainers { + b := &a.Spec.InitContainers[j] + for k := range b.Ports { + c := &b.Ports[k] + if c.Protocol == "" { + c.Protocol = "TCP" + } + } + if b.LivenessProbe != nil { + if b.LivenessProbe.ProbeHandler.GRPC != nil { + if b.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.ReadinessProbe != nil { + if b.ReadinessProbe.ProbeHandler.GRPC != nil { + if b.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.StartupProbe != nil { + if b.StartupProbe.ProbeHandler.GRPC != nil { + if b.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for j := range a.Spec.Containers { + b := &a.Spec.Containers[j] + for k := range b.Ports { + c := &b.Ports[k] + if c.Protocol == "" { + c.Protocol = "TCP" + } + } + if b.LivenessProbe != nil { + if b.LivenessProbe.ProbeHandler.GRPC != nil { + if b.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.ReadinessProbe != nil { + if b.ReadinessProbe.ProbeHandler.GRPC != nil { + if b.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.StartupProbe != nil { + if b.StartupProbe.ProbeHandler.GRPC != nil { + if b.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + for j := range a.Spec.EphemeralContainers { + b := &a.Spec.EphemeralContainers[j] + for k := range b.EphemeralContainerCommon.Ports { + c := &b.EphemeralContainerCommon.Ports[k] + if c.Protocol == "" { + c.Protocol = "TCP" + } + } + if b.EphemeralContainerCommon.LivenessProbe != nil { + if b.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC != nil { + if b.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.EphemeralContainerCommon.LivenessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.EphemeralContainerCommon.ReadinessProbe != nil { + if b.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC != nil { + if b.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + if b.EphemeralContainerCommon.StartupProbe != nil { + if b.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC != nil { + if b.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service == nil { + var ptrVar1 string = "" + b.EphemeralContainerCommon.StartupProbe.ProbeHandler.GRPC.Service = &ptrVar1 + } + } + } + } + } +} + +func SetObjectDefaults_DevPodWorkspaceInstanceTroubleshootList(in *DevPodWorkspaceInstanceTroubleshootList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_DevPodWorkspaceInstanceTroubleshoot(a) + } +} + func SetObjectDefaults_ProjectClusters(in *ProjectClusters) { for i := range in.Runners { a := &in.Runners[i] @@ -34,9 +200,68 @@ func SetObjectDefaults_ProjectClustersList(in *ProjectClustersList) { } } +func SetObjectDefaults_ProjectRunners(in *ProjectRunners) { + for i := range in.Runners { + a := &in.Runners[i] + SetObjectDefaults_Runner(a) + } +} + +func SetObjectDefaults_ProjectRunnersList(in *ProjectRunnersList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ProjectRunners(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.Volumes { + a := &in.Spec.RunnerSpec.ClusterRef.PodTemplate.Spec.Volumes[i] + if a.VolumeSource.ISCSI != nil { + if a.VolumeSource.ISCSI.ISCSIInterface == "" { + a.VolumeSource.ISCSI.ISCSIInterface = "default" + } + } + if a.VolumeSource.RBD != nil { + if a.VolumeSource.RBD.RBDPool == "" { + a.VolumeSource.RBD.RBDPool = "rbd" + } + if a.VolumeSource.RBD.RadosUser == "" { + a.VolumeSource.RBD.RadosUser = "admin" + } + if a.VolumeSource.RBD.Keyring == "" { + a.VolumeSource.RBD.Keyring = "/etc/ceph/keyring" + } + } + if a.VolumeSource.AzureDisk != nil { + if a.VolumeSource.AzureDisk.CachingMode == nil { + ptrVar1 := v1.AzureDataDiskCachingMode(v1.AzureDataDiskCachingReadWrite) + a.VolumeSource.AzureDisk.CachingMode = &ptrVar1 + } + if a.VolumeSource.AzureDisk.FSType == nil { + var ptrVar1 string = "ext4" + a.VolumeSource.AzureDisk.FSType = &ptrVar1 + } + if a.VolumeSource.AzureDisk.ReadOnly == nil { + var ptrVar1 bool = false + a.VolumeSource.AzureDisk.ReadOnly = &ptrVar1 + } + if a.VolumeSource.AzureDisk.Kind == nil { + ptrVar1 := v1.AzureDataDiskKind(v1.AzureSharedBlobDisk) + a.VolumeSource.AzureDisk.Kind = &ptrVar1 + } + } + if a.VolumeSource.ScaleIO != nil { + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } + } + } for i := range in.Spec.RunnerSpec.ClusterRef.PodTemplate.Spec.InitContainers { a := &in.Spec.RunnerSpec.ClusterRef.PodTemplate.Spec.InitContainers[i] for j := range a.Ports { diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/accesskey_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/accesskey_types.go index eea61335..9c8d9fac 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/accesskey_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/accesskey_types.go @@ -170,6 +170,22 @@ func (a AccessKeyScope) ContainsRole(val AccessKeyScopeRoleName) bool { return false } +func (a AccessKeyScope) GetRole(name AccessKeyScopeRoleName) AccessKeyScopeRole { + for _, entry := range a.Roles { + if entry.Role == name { + return entry + } + } + + if a.ContainsRole(name) { + return AccessKeyScopeRole{ + Role: name, + } + } + + return AccessKeyScopeRole{} +} + type AccessKeyScopeRole struct { // Role is the name of the role to apply to the access key scope. // +optional diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/cluster_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/cluster_types.go index e814511f..4cf1d2a2 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/cluster_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/cluster_types.go @@ -2,9 +2,32 @@ package v1 import ( clusterv1 "github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1" + agentstoragev1 "github.com/loft-sh/agentapi/v4/pkg/apis/loft/storage/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +const ( + LoftCluster = "loft-cluster" + + MetricsFederationServiceNamespaceAnnotation = "loft.sh/metrics-federation-service-namespace" + MetricsFederationServiceNameAnnotation = "loft.sh/metrics-federation-service-name" + MetricsFederationServicePortAnnotation = "loft.sh/metrics-federation-service-port" + + PrometheusLastAppliedHashAnnotation = "loft.sh/prometheus-last-applied-hash" + PrometheusDeployed agentstoragev1.ConditionType = "PrometheusDeployed" + PrometheusAvailable agentstoragev1.ConditionType = "PrometheusAvailable" + + GlobalPrometheusServiceAddress = "loft.sh/global-prometheus-service-address" + GlobalPrometheusLastAppliedHashAnnotation = "loft.sh/global-prometheus-last-applied-hash" + GlobalPrometheusDeployed agentstoragev1.ConditionType = "GlobalPrometheusDeployed" + GlobalPrometheusAvailable agentstoragev1.ConditionType = "GlobalPrometheusAvailable" + + OpenCostLastAppliedHashAnnotation = "loft.sh/opencost-last-applied-hash" + OpenCostDeployed agentstoragev1.ConditionType = "OpenCostDeployed" + OpenCostAvailable agentstoragev1.ConditionType = "OpenCostAvailable" +) + // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -35,6 +58,14 @@ func (a *Cluster) SetAccess(access []Access) { a.Spec.Access = access } +func (a *Cluster) GetConditions() agentstoragev1.Conditions { + return a.Status.Conditions +} + +func (a *Cluster) SetConditions(conditions agentstoragev1.Conditions) { + a.Status.Conditions = conditions +} + // ClusterSpec holds the cluster specification type ClusterSpec struct { // If specified this name is displayed in the UI instead of the metadata name @@ -72,6 +103,12 @@ type ClusterSpec struct { // Access holds the access rights for users and teams // +optional Access []Access `json:"access,omitempty"` + + // Metrics holds the cluster's metrics backend configuration + Metrics *Metrics `json:"metrics,omitempty"` + + // OpenCost holds the cluster's OpenCost backend configuration + OpenCost *OpenCost `json:"opencost,omitempty"` } type AllowedClusterAccountTemplate struct { @@ -90,6 +127,10 @@ type ClusterStatus struct { // +optional Message string `json:"message,omitempty"` + + // Conditions holds several conditions the cluster might be in + // +optional + Conditions agentstoragev1.Conditions `json:"conditions,omitempty"` } // ClusterStatusPhase describes the phase of a cluster @@ -173,3 +214,34 @@ type Chart struct { // +optional Password string `json:"password,omitempty"` } +type Metrics struct { + // Replicas is the number of desired replicas. + Replicas *int32 `json:"replicas,omitempty"` + + // Resources are compute resource required by the metrics backend + Resources *corev1.ResourceRequirements `json:"resources,omitempty"` + + // Retention is the metrics data retention period. Default is 1y + Retention string `json:"retention,omitempty"` + + // Storage contains settings related to the metrics backend's persistent volume configuration + Storage `json:"storage,omitempty"` +} + +type Storage struct { + // StorageClass the storage class to use when provisioning the metrics backend's persistent volume + // If set to "-" or "" dynamic provisioning is disabled + // If set to undefined or null (the default), the cluster's default storage class is used for provisioning + StorageClass *string `json:"storageClass,omitempty"` + + // Size the size of the metrics backend's persistent volume + Size string `json:"size,omitempty"` +} + +type OpenCost struct { + // Replicas is the number of desired replicas. + Replicas *int32 `json:"replicas,omitempty"` + + // Resources are compute resource required by the OpenCost backend + Resources *corev1.ResourceRequirements `json:"resources,omitempty"` +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodenvironmenttemplate_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodenvironmenttemplate_types.go new file mode 100644 index 00000000..ed66c960 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodenvironmenttemplate_types.go @@ -0,0 +1,131 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevPodWorkspaceEnvironmentSource +// +k8s:openapi-gen=true +type DevPodEnvironmentTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DevPodEnvironmentTemplateSpec `json:"spec,omitempty"` + Status DevPodEnvironmentTemplateStatus `json:"status,omitempty"` +} + +// DevPodEnvironmentTemplateStatus holds the status +type DevPodEnvironmentTemplateStatus struct { +} + +func (a *DevPodEnvironmentTemplate) GetVersions() []VersionAccessor { + var retVersions []VersionAccessor + for _, v := range a.Spec.Versions { + b := v + retVersions = append(retVersions, &b) + } + + return retVersions +} + +func (a *DevPodEnvironmentTemplateVersion) GetVersion() string { + return a.Version +} + +func (a *DevPodEnvironmentTemplate) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *DevPodEnvironmentTemplate) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *DevPodEnvironmentTemplate) GetAccess() []Access { + return a.Spec.Access +} + +func (a *DevPodEnvironmentTemplate) SetAccess(access []Access) { + a.Spec.Access = access +} + +type DevPodEnvironmentTemplateSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Description describes the environment template + // +optional + Description string `json:"description,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Access to the DevPod machine instance object itself + // +optional + Access []Access `json:"access,omitempty"` + + // Template is the inline template to use for DevPod environments + // +optional + Template *DevPodEnvironmentTemplateDefinition `json:"template,omitempty"` + + // Versions are different versions of the template that can be referenced as well + // +optional + Versions []DevPodEnvironmentTemplateVersion `json:"versions,omitempty"` +} + +type DevPodEnvironmentTemplateDefinition struct { + // Git holds configuration for git environment spec source + // +optional + Git *GitEnvironmentTemplate `json:"git,omitempty"` + + // Inline holds an inline devcontainer.json definition + // +optional + Inline string `json:"inline,omitempty"` +} + +// GitEnvironmentTemplate stores configuration of Git environment template source +type GitEnvironmentTemplate struct { + // Repository stores repository URL for Git environment spec source + Repository string `json:"repository"` + + // Revision stores revision to checkout in repository + // +optional + Revision string `json:"revision,omitempty"` + + // SubPath stores subpath within Repositor where environment spec is + // +optional + SubPath string `json:"subpath,omitempty"` + + // UseProjectGitCredentials specifies if the project git credentials should be used instead of local ones for this environment + // +optional + UseProjectGitCredentials bool `json:"useProjectGitCredentials,omitempty"` +} + +type DevPodEnvironmentTemplateVersion struct { + // Template holds the environment template definition + // +optional + Template DevPodEnvironmentTemplateDefinition `json:"template,omitempty"` + + // Version is the version. Needs to be in X.X.X format. + // +optional + Version string `json:"version,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevPodEnvironmentTemplateList contains a list of DevPodEnvironmentTemplate objects +type DevPodEnvironmentTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodEnvironmentTemplate `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DevPodEnvironmentTemplate{}, &DevPodEnvironmentTemplateList{}) +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspaceinstance_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspaceinstance_types.go index b7b19e4b..c6e86c3f 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspaceinstance_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspaceinstance_types.go @@ -17,6 +17,10 @@ var ( // DevPodWorkspaceUIDLabel holds the actual workspace uid of the devpod workspace DevPodWorkspaceUIDLabel = "loft.sh/workspace-uid" + // DevPodKubernetesProviderWorkspaceUIDLabel holds the actual workspace uid of the devpod workspace on resources + // created by the DevPod Kubernetes provider. + DevPodKubernetesProviderWorkspaceUIDLabel = "devpod.sh/workspace-uid" + // DevPodWorkspacePictureAnnotation holds the workspace picture url of the devpod workspace DevPodWorkspacePictureAnnotation = "loft.sh/workspace-picture" @@ -24,7 +28,7 @@ var ( DevPodWorkspaceSourceAnnotation = "loft.sh/workspace-source" // DevPodWorkspaceRunnerNetworkPeerAnnotation holds the workspace runner network peer name of the devpod workspace - DevPodWorkspaceRunnerNetworkPeerAnnotation = "loft.sh/runner-network-peer-name" + DevPodWorkspaceRunnerEndpointAnnotation = "loft.sh/runner-endpoint" ) var ( @@ -86,10 +90,18 @@ type DevPodWorkspaceInstanceSpec struct { // +optional Owner *UserOrTeam `json:"owner,omitempty"` + // PresetRef holds the DevPodWorkspacePreset template reference + // +optional + PresetRef *PresetRef `json:"presetRef,omitempty"` + // TemplateRef holds the DevPod machine template reference // +optional TemplateRef *TemplateRef `json:"templateRef,omitempty"` + // EnvironmentRef is the reference to DevPodEnvironmentTemplate that should be used + // +optional + EnvironmentRef *EnvironmentRef `json:"environmentRef,omitempty"` + // Template is the inline template to use for DevPod machine creation. This is mutually // exclusive with templateRef. // +optional @@ -108,6 +120,22 @@ type DevPodWorkspaceInstanceSpec struct { // Access to the DevPod machine instance object itself // +optional Access []Access `json:"access,omitempty"` + + // PreventWakeUpOnConnection is used to prevent workspace that uses sleep mode from waking up on incomming ssh connection. + // +optional + PreventWakeUpOnConnection bool `json:"preventWakeUpOnConnection,omitempty"` +} + +type PresetRef struct { + // Name is the name of DevPodWorkspacePreset + Name string `json:"name"` + + // Version holds the preset 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"` } type RunnerRef struct { @@ -116,6 +144,15 @@ type RunnerRef struct { Runner string `json:"runner,omitempty"` } +type EnvironmentRef struct { + // Name is the name of DevPodEnvironmentTemplate this references + Name string `json:"name"` + + // Version is the version of DevPodEnvironmentTemplate this references + // +optional + Version string `json:"version,omitempty"` +} + type DevPodWorkspaceInstanceStatus struct { // LastWorkspaceStatus is the last workspace status reported by the runner. // +optional @@ -146,6 +183,10 @@ type DevPodWorkspaceInstanceStatus struct { // IgnoreReconciliation ignores reconciliation for this object // +optional IgnoreReconciliation bool `json:"ignoreReconciliation,omitempty"` + + // ClusterRef holds the runners cluster if the workspace is scheduled + // on kubernetes based runner + ClusterRef *ClusterRef `json:"clusterRef,omitempty"` } type WorkspaceStatusResult struct { diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspacepreset_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspacepreset_types.go new file mode 100644 index 00000000..4fff5fa1 --- /dev/null +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspacepreset_types.go @@ -0,0 +1,121 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevPodWorkspacePreset +// +k8s:openapi-gen=true +type DevPodWorkspacePreset struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DevPodWorkspacePresetSpec `json:"spec,omitempty"` + Status DevPodWorkspacePresetStatus `json:"status,omitempty"` +} + +func (a *DevPodWorkspacePreset) GetOwner() *UserOrTeam { + return a.Spec.Owner +} + +func (a *DevPodWorkspacePreset) SetOwner(userOrTeam *UserOrTeam) { + a.Spec.Owner = userOrTeam +} + +func (a *DevPodWorkspacePreset) GetAccess() []Access { + return a.Spec.Access +} + +func (a *DevPodWorkspacePreset) SetAccess(access []Access) { + a.Spec.Access = access +} + +type DevPodWorkspacePresetSpec struct { + // DisplayName is the name that should be displayed in the UI + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Source stores inline path of project source + Source *DevPodWorkspacePresetSource `json:"source"` + + // InfrastructureRef stores reference to DevPodWorkspaceTemplate to use + InfrastructureRef *TemplateRef `json:"infrastructureRef"` + + // EnvironmentRef stores reference to DevPodEnvironmentTemplate + // +optional + EnvironmentRef *EnvironmentRef `json:"environmentRef,omitempty"` + + // UseProjectGitCredentials specifies if the project git credentials should be used instead of local ones for this environment + // +optional + UseProjectGitCredentials bool `json:"useProjectGitCredentials,omitempty"` + + // Owner holds the owner of this object + // +optional + Owner *UserOrTeam `json:"owner,omitempty"` + + // Access to the DevPod machine instance object itself + // +optional + Access []Access `json:"access,omitempty"` + + // Versions are different versions of the template that can be referenced as well + // +optional + Versions []DevPodWorkspacePresetVersion `json:"versions,omitempty"` +} + +type DevPodWorkspacePresetSource struct { + // Git stores path to git repo to use as workspace source + // +optional + Git string `json:"git,omitempty"` + + // Image stores container image to use as workspace source + // +optional + Image string `json:"image,omitempty"` +} + +type DevPodWorkspacePresetVersion struct { + // Version is the version. Needs to be in X.X.X format. + // +optional + Version string `json:"version,omitempty"` + + // Source stores inline path of project source + // +optional + Source *DevPodWorkspacePresetSource `json:"source,omitempty"` + + // InfrastructureRef stores reference to DevPodWorkspaceTemplate to use + // +optional + InfrastructureRef *TemplateRef `json:"infrastructureRef,omitempty"` + + // EnvironmentRef stores reference to DevPodEnvironmentTemplate + // +optional + EnvironmentRef *EnvironmentRef `json:"environmentRef,omitempty"` + + // UseProjectGitCredentials specifies if the project git credentials should be used instead of local ones for this environment + // +optional + UseProjectGitCredentials bool `json:"useProjectGitCredentials,omitempty"` +} + +// DevPodWorkspacePresetStatus holds the status +type DevPodWorkspacePresetStatus struct { +} + +type WorkspaceRef struct { + // Name is the name of DevPodWorkspaceTemplate this references + Name string `json:"name"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// DevPodWorkspacePresetList contains a list of DevPodWorkspacePreset objects +type DevPodWorkspacePresetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevPodWorkspacePreset `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DevPodWorkspacePreset{}, &DevPodWorkspacePresetList{}) +} diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspacetemplate_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspacetemplate_types.go index 7aeacf0d..5d5bdb7b 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspacetemplate_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/devpodworkspacetemplate_types.go @@ -93,10 +93,24 @@ type DevPodWorkspaceTemplateDefinition struct { // +optional SpaceTemplate *SpaceTemplateDefinition `json:"spaceTemplate,omitempty"` + // VirtualClusterTemplateRef is a reference to the virtual cluster that should get created for this DevPod. + // If this is specified, the kubernetes provider will be selected automatically. + // +optional + VirtualClusterTemplateRef *TemplateRef `json:"virtualClusterTemplateRef,omitempty"` + + // VirtualClusterTemplate is the inline template for a virtual cluster that should get created for this DevPod. + // If this is specified, the kubernetes provider will be selected automatically. + // +optional + VirtualClusterTemplate *VirtualClusterTemplateDefinition `json:"virtualClusterTemplate,omitempty"` + // WorkspaceEnv are environment variables that should be available within the created workspace. // +optional WorkspaceEnv map[string]DevPodProviderOption `json:"workspaceEnv,omitempty"` + // InitEnv are environment variables that should be available during the initialization phase of the created workspace. + // +optional + InitEnv map[string]DevPodProviderOption `json:"initEnv,omitempty"` + // InstanceTemplate holds the workspace instance template // +optional InstanceTemplate DevPodWorkspaceInstanceTemplateDefinition `json:"instanceTemplate,omitempty"` @@ -112,6 +126,14 @@ type DevPodWorkspaceTemplateDefinition struct { // GitCloneStrategy specifies how git based workspace are being cloned. Can be "" (full, default), treeless, blobless or shallow // +optional GitCloneStrategy GitCloneStrategy `json:"gitCloneStrategy,omitempty"` + + // CredentialForwarding specifies controls for how workspaces created by this template forward credentials into the workspace + // +optional + CredentialForwarding *CredentialForwarding `json:"credentialForwarding,omitempty"` + + // PreventWakeUpOnConnection is used to prevent workspace that uses sleep mode from waking up on incomming ssh connection. + // +optional + PreventWakeUpOnConnection bool `json:"preventWakeUpOnConnection,omitempty"` } // +enum @@ -125,6 +147,28 @@ const ( ShallowCloneStrategy GitCloneStrategy = "shallow" ) +type CredentialForwarding struct { + // Docker specifies controls for how workspaces created by this template forward docker credentials + // +optional + Docker *DockerCredentialForwarding `json:"docker,omitempty"` + + // Git specifies controls for how workspaces created by this template forward git credentials + // +optional + Git *GitCredentialForwarding `json:"git,omitempty"` +} + +type DockerCredentialForwarding struct { + // Disabled prevents all workspaces created by this template from forwarding credentials into the workspace + // +optional + Disabled bool `json:"disabled,omitempty"` +} + +type GitCredentialForwarding struct { + // Disabled prevents all workspaces created by this template from forwarding credentials into the workspace + // +optional + Disabled bool `json:"disabled,omitempty"` +} + type DevPodWorkspaceProvider struct { // Name is the name of the provider. This can also be an url. Name string `json:"name"` diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/project_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/project_types.go index 2fec41e1..7a314206 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/project_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/project_types.go @@ -106,6 +106,10 @@ type ProjectSpec struct { // +optional RequireTemplate RequireTemplate `json:"requireTemplate,omitempty"` + // RequirePreset configures if a preset is required for instance creation. + // +optional + RequirePreset RequirePreset `json:"requirePreset,omitempty"` + // Members are the users and teams that are part of this project // +optional Members []Member `json:"members,omitempty"` @@ -142,6 +146,13 @@ type RequireTemplate struct { Disabled bool `json:"disabled,omitempty"` } +type RequirePreset struct { + // If true, all users within the project will not be allowed to create a new instance without a preset. + // By default, all users are allowed to create a new instance without a preset. + // +optional + Enabled bool `json:"disabled,omitempty"` +} + type NamespacePattern struct { // Space holds the namespace pattern to use for space instances // +optional @@ -165,6 +176,7 @@ var ( SpaceTemplateKind = "SpaceTemplate" VirtualClusterTemplateKind = "VirtualClusterTemplate" DevPodWorkspaceTemplateKind = "DevPodWorkspaceTemplate" + DevPodWorkspacePresetKind = "DevPodWorkspacePreset" ) type AllowedTemplate struct { @@ -199,7 +211,7 @@ type Member struct { Name string `json:"name,omitempty"` // ClusterRole is the assigned role for the above member - ClusterRole string `json:"clusterRole,omitempty"` + ClusterRole string `json:"clusterRole"` } type AllowedRunner struct { diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/runner_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/runner_types.go index 625f6f8e..ec9ae497 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/runner_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/runner_types.go @@ -12,6 +12,9 @@ var RunnerConditions = []agentstoragev1.ConditionType{ const ( RunnerDeployed agentstoragev1.ConditionType = "Deployed" + + // BuiltinRunnerName is the name for the control plane runner + BuiltinRunnerName = "local" ) // +genclient @@ -65,6 +68,10 @@ type RunnerSpec struct { // +optional NetworkPeerName string `json:"networkPeerName,omitempty"` + // Endpoint is the hostname used to connect directly to the runner + // +optional + Endpoint string `json:"endpoint,omitempty"` + // If ClusterRef is defined, Loft will schedule the runner on the given // cluster. // +optional @@ -99,6 +106,10 @@ type RunnerClusterRef struct { // PodTemplate holds additional options for the runner pod // +optional PodTemplate *RunnerPodTemplate `json:"podTemplate,omitempty"` + + // ServiceTemplate holds additional options for the service + // +optional + ServiceTemplate *RunnerServiceTemplate `json:"serviceTemplate,omitempty"` } type RunnerPodTemplate struct { @@ -189,6 +200,22 @@ type RunnerPersistentVolumeClaimTemplateSpec struct { StorageSize string `json:"storageSize,omitempty"` } +type RunnerServiceTemplate struct { + // Metadata holds the template metadata + // +optional + Metadata TemplateMetadata `json:"metadata,omitempty"` + + // Spec holds the template spec + // +optional + Spec RunnerServiceTemplateSpec `json:"spec,omitempty"` +} + +type RunnerServiceTemplateSpec struct { + // type determines how the Service is exposed. Defaults to ClusterIP + // +optional + Type corev1.ServiceType `json:"type,omitempty"` +} + type RunnerStatus struct { // Phase describes the current phase the space instance is in // +optional diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/virtualclusterinstance_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/virtualclusterinstance_types.go index ddcfe6b1..4fa87d9f 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/virtualclusterinstance_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/virtualclusterinstance_types.go @@ -19,6 +19,7 @@ const ( InstanceProjectsSecretsSynced agentstoragev1.ConditionType = "ProjectSecretsSynced" InstanceVirtualClusterAppsAndObjectsSynced agentstoragev1.ConditionType = "VirtualClusterAppsAndObjectsSynced" + InstanceVirtualClusterDBConnectorSynced agentstoragev1.ConditionType = "DBConnectorSynced" ) // +genclient diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/zz_generated.deepcopy.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/zz_generated.deepcopy.go index 7692f58d..f6c13ca6 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/zz_generated.deepcopy.go @@ -943,7 +943,7 @@ func (in *Cluster) DeepCopyInto(out *Cluster) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -1302,6 +1302,16 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = new(Metrics) + (*in).DeepCopyInto(*out) + } + if in.OpenCost != nil { + in, out := &in.OpenCost, &out.OpenCost + *out = new(OpenCost) + (*in).DeepCopyInto(*out) + } return } @@ -1318,6 +1328,13 @@ func (in *ClusterSpec) DeepCopy() *ClusterSpec { // 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 + 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 } @@ -1331,6 +1348,32 @@ func (in *ClusterStatus) DeepCopy() *ClusterStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CredentialForwarding) DeepCopyInto(out *CredentialForwarding) { + *out = *in + if in.Docker != nil { + in, out := &in.Docker, &out.Docker + *out = new(DockerCredentialForwarding) + **out = **in + } + if in.Git != nil { + in, out := &in.Git, &out.Git + *out = new(GitCredentialForwarding) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialForwarding. +func (in *CredentialForwarding) DeepCopy() *CredentialForwarding { + if in == nil { + return nil + } + out := new(CredentialForwarding) + 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 @@ -1415,6 +1458,161 @@ func (in *DevPodCommandUpOptions) DeepCopy() *DevPodCommandUpOptions { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodEnvironmentTemplate) DeepCopyInto(out *DevPodEnvironmentTemplate) { + *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 DevPodEnvironmentTemplate. +func (in *DevPodEnvironmentTemplate) DeepCopy() *DevPodEnvironmentTemplate { + if in == nil { + return nil + } + out := new(DevPodEnvironmentTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodEnvironmentTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodEnvironmentTemplateDefinition) DeepCopyInto(out *DevPodEnvironmentTemplateDefinition) { + *out = *in + if in.Git != nil { + in, out := &in.Git, &out.Git + *out = new(GitEnvironmentTemplate) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateDefinition. +func (in *DevPodEnvironmentTemplateDefinition) DeepCopy() *DevPodEnvironmentTemplateDefinition { + if in == nil { + return nil + } + out := new(DevPodEnvironmentTemplateDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodEnvironmentTemplateList) DeepCopyInto(out *DevPodEnvironmentTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodEnvironmentTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateList. +func (in *DevPodEnvironmentTemplateList) DeepCopy() *DevPodEnvironmentTemplateList { + if in == nil { + return nil + } + out := new(DevPodEnvironmentTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodEnvironmentTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodEnvironmentTemplateSpec) DeepCopyInto(out *DevPodEnvironmentTemplateSpec) { + *out = *in + 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]) + } + } + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(DevPodEnvironmentTemplateDefinition) + (*in).DeepCopyInto(*out) + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]DevPodEnvironmentTemplateVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateSpec. +func (in *DevPodEnvironmentTemplateSpec) DeepCopy() *DevPodEnvironmentTemplateSpec { + if in == nil { + return nil + } + out := new(DevPodEnvironmentTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodEnvironmentTemplateStatus) DeepCopyInto(out *DevPodEnvironmentTemplateStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateStatus. +func (in *DevPodEnvironmentTemplateStatus) DeepCopy() *DevPodEnvironmentTemplateStatus { + if in == nil { + return nil + } + out := new(DevPodEnvironmentTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodEnvironmentTemplateVersion) DeepCopyInto(out *DevPodEnvironmentTemplateVersion) { + *out = *in + in.Template.DeepCopyInto(&out.Template) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodEnvironmentTemplateVersion. +func (in *DevPodEnvironmentTemplateVersion) DeepCopy() *DevPodEnvironmentTemplateVersion { + if in == nil { + return nil + } + out := new(DevPodEnvironmentTemplateVersion) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DevPodProjectSpec) DeepCopyInto(out *DevPodProjectSpec) { *out = *in @@ -1573,11 +1771,21 @@ func (in *DevPodWorkspaceInstanceSpec) DeepCopyInto(out *DevPodWorkspaceInstance *out = new(UserOrTeam) **out = **in } + if in.PresetRef != nil { + in, out := &in.PresetRef, &out.PresetRef + *out = new(PresetRef) + **out = **in + } if in.TemplateRef != nil { in, out := &in.TemplateRef, &out.TemplateRef *out = new(TemplateRef) **out = **in } + if in.EnvironmentRef != nil { + in, out := &in.EnvironmentRef, &out.EnvironmentRef + *out = new(EnvironmentRef) + **out = **in + } if in.Template != nil { in, out := &in.Template, &out.Template *out = new(DevPodWorkspaceTemplateDefinition) @@ -1619,6 +1827,11 @@ func (in *DevPodWorkspaceInstanceStatus) DeepCopyInto(out *DevPodWorkspaceInstan *out = new(DevPodWorkspaceTemplateDefinition) (*in).DeepCopyInto(*out) } + if in.ClusterRef != nil { + in, out := &in.ClusterRef, &out.ClusterRef + *out = new(ClusterRef) + **out = **in + } return } @@ -1649,6 +1862,180 @@ func (in *DevPodWorkspaceInstanceTemplateDefinition) DeepCopy() *DevPodWorkspace return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePreset) DeepCopyInto(out *DevPodWorkspacePreset) { + *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 DevPodWorkspacePreset. +func (in *DevPodWorkspacePreset) DeepCopy() *DevPodWorkspacePreset { + if in == nil { + return nil + } + out := new(DevPodWorkspacePreset) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspacePreset) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePresetList) DeepCopyInto(out *DevPodWorkspacePresetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevPodWorkspacePreset, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetList. +func (in *DevPodWorkspacePresetList) DeepCopy() *DevPodWorkspacePresetList { + if in == nil { + return nil + } + out := new(DevPodWorkspacePresetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevPodWorkspacePresetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePresetSource) DeepCopyInto(out *DevPodWorkspacePresetSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetSource. +func (in *DevPodWorkspacePresetSource) DeepCopy() *DevPodWorkspacePresetSource { + if in == nil { + return nil + } + out := new(DevPodWorkspacePresetSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePresetSpec) DeepCopyInto(out *DevPodWorkspacePresetSpec) { + *out = *in + if in.Source != nil { + in, out := &in.Source, &out.Source + *out = new(DevPodWorkspacePresetSource) + **out = **in + } + if in.InfrastructureRef != nil { + in, out := &in.InfrastructureRef, &out.InfrastructureRef + *out = new(TemplateRef) + **out = **in + } + if in.EnvironmentRef != nil { + in, out := &in.EnvironmentRef, &out.EnvironmentRef + *out = new(EnvironmentRef) + **out = **in + } + 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]) + } + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]DevPodWorkspacePresetVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetSpec. +func (in *DevPodWorkspacePresetSpec) DeepCopy() *DevPodWorkspacePresetSpec { + if in == nil { + return nil + } + out := new(DevPodWorkspacePresetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePresetStatus) DeepCopyInto(out *DevPodWorkspacePresetStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetStatus. +func (in *DevPodWorkspacePresetStatus) DeepCopy() *DevPodWorkspacePresetStatus { + if in == nil { + return nil + } + out := new(DevPodWorkspacePresetStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevPodWorkspacePresetVersion) DeepCopyInto(out *DevPodWorkspacePresetVersion) { + *out = *in + if in.Source != nil { + in, out := &in.Source, &out.Source + *out = new(DevPodWorkspacePresetSource) + **out = **in + } + if in.InfrastructureRef != nil { + in, out := &in.InfrastructureRef, &out.InfrastructureRef + *out = new(TemplateRef) + **out = **in + } + if in.EnvironmentRef != nil { + in, out := &in.EnvironmentRef, &out.EnvironmentRef + *out = new(EnvironmentRef) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevPodWorkspacePresetVersion. +func (in *DevPodWorkspacePresetVersion) DeepCopy() *DevPodWorkspacePresetVersion { + if in == nil { + return nil + } + out := new(DevPodWorkspacePresetVersion) + 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 @@ -1721,6 +2108,16 @@ func (in *DevPodWorkspaceTemplateDefinition) DeepCopyInto(out *DevPodWorkspaceTe *out = new(SpaceTemplateDefinition) (*in).DeepCopyInto(*out) } + if in.VirtualClusterTemplateRef != nil { + in, out := &in.VirtualClusterTemplateRef, &out.VirtualClusterTemplateRef + *out = new(TemplateRef) + **out = **in + } + if in.VirtualClusterTemplate != nil { + in, out := &in.VirtualClusterTemplate, &out.VirtualClusterTemplate + *out = new(VirtualClusterTemplateDefinition) + (*in).DeepCopyInto(*out) + } if in.WorkspaceEnv != nil { in, out := &in.WorkspaceEnv, &out.WorkspaceEnv *out = make(map[string]DevPodProviderOption, len(*in)) @@ -1728,7 +2125,19 @@ func (in *DevPodWorkspaceTemplateDefinition) DeepCopyInto(out *DevPodWorkspaceTe (*out)[key] = *val.DeepCopy() } } + if in.InitEnv != nil { + in, out := &in.InitEnv, &out.InitEnv + *out = make(map[string]DevPodProviderOption, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } in.InstanceTemplate.DeepCopyInto(&out.InstanceTemplate) + if in.CredentialForwarding != nil { + in, out := &in.CredentialForwarding, &out.CredentialForwarding + *out = new(CredentialForwarding) + (*in).DeepCopyInto(*out) + } return } @@ -1858,6 +2267,22 @@ func (in *DevPodWorkspaceTemplateVersion) DeepCopy() *DevPodWorkspaceTemplateVer return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerCredentialForwarding) DeepCopyInto(out *DockerCredentialForwarding) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerCredentialForwarding. +func (in *DockerCredentialForwarding) DeepCopy() *DockerCredentialForwarding { + if in == nil { + return nil + } + out := new(DockerCredentialForwarding) + 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 @@ -1874,6 +2299,54 @@ func (in *EntityInfo) DeepCopy() *EntityInfo { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvironmentRef) DeepCopyInto(out *EnvironmentRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentRef. +func (in *EnvironmentRef) DeepCopy() *EnvironmentRef { + if in == nil { + return nil + } + out := new(EnvironmentRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GitCredentialForwarding) DeepCopyInto(out *GitCredentialForwarding) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitCredentialForwarding. +func (in *GitCredentialForwarding) DeepCopy() *GitCredentialForwarding { + if in == nil { + return nil + } + out := new(GitCredentialForwarding) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GitEnvironmentTemplate) DeepCopyInto(out *GitEnvironmentTemplate) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitEnvironmentTemplate. +func (in *GitEnvironmentTemplate) DeepCopy() *GitEnvironmentTemplate { + if in == nil { + return nil + } + out := new(GitEnvironmentTemplate) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GitProjectSpec) DeepCopyInto(out *GitProjectSpec) { *out = *in @@ -2221,6 +2694,33 @@ func (in *Member) DeepCopy() *Member { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Metrics) DeepCopyInto(out *Metrics) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(corev1.ResourceRequirements) + (*in).DeepCopyInto(*out) + } + in.Storage.DeepCopyInto(&out.Storage) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metrics. +func (in *Metrics) DeepCopy() *Metrics { + if in == nil { + return nil + } + out := new(Metrics) + 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 @@ -2371,6 +2871,32 @@ func (in *ObjectsStatus) DeepCopy() *ObjectsStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenCost) DeepCopyInto(out *OpenCost) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(corev1.ResourceRequirements) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenCost. +func (in *OpenCost) DeepCopy() *OpenCost { + if in == nil { + return nil + } + out := new(OpenCost) + 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 @@ -2393,6 +2919,22 @@ func (in *PodSelector) DeepCopy() *PodSelector { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PresetRef) DeepCopyInto(out *PresetRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PresetRef. +func (in *PresetRef) DeepCopy() *PresetRef { + if in == nil { + return nil + } + out := new(PresetRef) + 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 @@ -2479,6 +3021,7 @@ func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { copy(*out, *in) } out.RequireTemplate = in.RequireTemplate + out.RequirePreset = in.RequirePreset if in.Members != nil { in, out := &in.Members, &out.Members *out = make([]Member, len(*in)) @@ -2789,6 +3332,22 @@ func (in *RancherProjectRef) DeepCopy() *RancherProjectRef { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequirePreset) DeepCopyInto(out *RequirePreset) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequirePreset. +func (in *RequirePreset) DeepCopy() *RequirePreset { + if in == nil { + return nil + } + out := new(RequirePreset) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RequireTemplate) DeepCopyInto(out *RequireTemplate) { *out = *in @@ -2846,6 +3405,11 @@ func (in *RunnerClusterRef) DeepCopyInto(out *RunnerClusterRef) { *out = new(RunnerPodTemplate) (*in).DeepCopyInto(*out) } + if in.ServiceTemplate != nil { + in, out := &in.ServiceTemplate, &out.ServiceTemplate + *out = new(RunnerServiceTemplate) + (*in).DeepCopyInto(*out) + } return } @@ -3048,6 +3612,40 @@ func (in *RunnerRef) DeepCopy() *RunnerRef { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerServiceTemplate) DeepCopyInto(out *RunnerServiceTemplate) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + out.Spec = in.Spec + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerServiceTemplate. +func (in *RunnerServiceTemplate) DeepCopy() *RunnerServiceTemplate { + if in == nil { + return nil + } + out := new(RunnerServiceTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunnerServiceTemplateSpec) DeepCopyInto(out *RunnerServiceTemplateSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerServiceTemplateSpec. +func (in *RunnerServiceTemplateSpec) DeepCopy() *RunnerServiceTemplateSpec { + if in == nil { + return nil + } + out := new(RunnerServiceTemplateSpec) + 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 @@ -3604,6 +4202,27 @@ func (in *SpaceTemplateVersion) DeepCopy() *SpaceTemplateVersion { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Storage) DeepCopyInto(out *Storage) { + *out = *in + if in.StorageClass != nil { + in, out := &in.StorageClass, &out.StorageClass + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage. +func (in *Storage) DeepCopy() *Storage { + if in == nil { + return nil + } + out := new(Storage) + 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 @@ -4864,6 +5483,22 @@ func (in *VirtualClusterTemplateVersion) DeepCopy() *VirtualClusterTemplateVersi return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkspaceRef) DeepCopyInto(out *WorkspaceRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceRef. +func (in *WorkspaceRef) DeepCopy() *WorkspaceRef { + if in == nil { + return nil + } + out := new(WorkspaceRef) + 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 diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/zz_generated.defaults.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/zz_generated.defaults.go index ff69702e..659f5d1c 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/zz_generated.defaults.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/storage/v1/zz_generated.defaults.go @@ -6,6 +6,7 @@ package v1 import ( + corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -21,6 +22,51 @@ func RegisterDefaults(scheme *runtime.Scheme) error { func SetObjectDefaults_Runner(in *Runner) { if in.Spec.ClusterRef != nil { if in.Spec.ClusterRef.PodTemplate != nil { + for i := range in.Spec.ClusterRef.PodTemplate.Spec.Volumes { + a := &in.Spec.ClusterRef.PodTemplate.Spec.Volumes[i] + if a.VolumeSource.ISCSI != nil { + if a.VolumeSource.ISCSI.ISCSIInterface == "" { + a.VolumeSource.ISCSI.ISCSIInterface = "default" + } + } + if a.VolumeSource.RBD != nil { + if a.VolumeSource.RBD.RBDPool == "" { + a.VolumeSource.RBD.RBDPool = "rbd" + } + if a.VolumeSource.RBD.RadosUser == "" { + a.VolumeSource.RBD.RadosUser = "admin" + } + if a.VolumeSource.RBD.Keyring == "" { + a.VolumeSource.RBD.Keyring = "/etc/ceph/keyring" + } + } + if a.VolumeSource.AzureDisk != nil { + if a.VolumeSource.AzureDisk.CachingMode == nil { + ptrVar1 := corev1.AzureDataDiskCachingMode(corev1.AzureDataDiskCachingReadWrite) + a.VolumeSource.AzureDisk.CachingMode = &ptrVar1 + } + if a.VolumeSource.AzureDisk.FSType == nil { + var ptrVar1 string = "ext4" + a.VolumeSource.AzureDisk.FSType = &ptrVar1 + } + if a.VolumeSource.AzureDisk.ReadOnly == nil { + var ptrVar1 bool = false + a.VolumeSource.AzureDisk.ReadOnly = &ptrVar1 + } + if a.VolumeSource.AzureDisk.Kind == nil { + ptrVar1 := corev1.AzureDataDiskKind(corev1.AzureSharedBlobDisk) + a.VolumeSource.AzureDisk.Kind = &ptrVar1 + } + } + if a.VolumeSource.ScaleIO != nil { + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } + } + } for i := range in.Spec.ClusterRef.PodTemplate.Spec.InitContainers { a := &in.Spec.ClusterRef.PodTemplate.Spec.InitContainers[i] for j := range a.Ports { diff --git a/vendor/github.com/loft-sh/api/v4/pkg/apis/ui/v1/ui_types.go b/vendor/github.com/loft-sh/api/v4/pkg/apis/ui/v1/ui_types.go index b5cd94b1..acf26dec 100644 --- a/vendor/github.com/loft-sh/api/v4/pkg/apis/ui/v1/ui_types.go +++ b/vendor/github.com/loft-sh/api/v4/pkg/apis/ui/v1/ui_types.go @@ -34,11 +34,16 @@ type UISettingsSpec struct { // +optional Offline bool `json:"offline,omitempty"` - // HasHelmRelease indicates whether loft has been installed via Helm + // HasHelmRelease indicates whether the vCluster Platform instance + // has been installed via Helm HasHelmRelease bool `json:"hasHelmRelease,omitempty"` // DefaultVClusterVersion is the default version of vClusters DefaultVClusterVersion string `json:"defaultVClusterVersion,omitempty"` + + // LoftHosted indicates whether the vCluster Platform instance + // is hosted and operated by Loft Labs Inc. + LoftHosted bool `json:"loftHosted,omitempty"` } type UISettingsConfig struct { @@ -49,6 +54,10 @@ type UISettingsConfig struct { // the Loft UI! // +optional LogoURL string `json:"logoURL,omitempty"` + // SmallLogoURL is url pointing to the small logo to use in the Loft UI. This path must be accessible for clients accessing + // the Loft UI! + // +optional + SmallLogoURL string `json:"smallLogoURL,omitempty"` // LogoBackgroundColor is the color value (ex: "#12345") to use as the background color for the logo // +optional LogoBackgroundColor string `json:"logoBackgroundColor,omitempty"` diff --git a/vendor/github.com/loft-sh/vcluster/config/config.go b/vendor/github.com/loft-sh/vcluster/config/config.go index 045fbfb8..10231142 100644 --- a/vendor/github.com/loft-sh/vcluster/config/config.go +++ b/vendor/github.com/loft-sh/vcluster/config/config.go @@ -12,6 +12,9 @@ import ( "time" "github.com/invopop/jsonschema" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" ) @@ -45,6 +48,9 @@ type Config struct { // Integrations holds config for vCluster integrations with other operators or tools running on the host cluster Integrations Integrations `json:"integrations,omitempty"` + // Deploy holds configuration for the deployment of vCluster. + Deploy Deploy `json:"deploy,omitempty"` + // Networking options related to the virtual cluster. Networking Networking `json:"networking,omitempty"` @@ -54,6 +60,9 @@ type Config struct { // Configure vCluster's control plane components and deployment. ControlPlane ControlPlane `json:"controlPlane,omitempty"` + // PrivateNodes holds configuration for vCluster private nodes mode. + PrivateNodes PrivateNodes `json:"privateNodes,omitempty"` + // RBAC options for the virtual cluster. RBAC RBAC `json:"rbac,omitempty"` @@ -80,6 +89,366 @@ type Config struct { // SleepMode holds the native sleep mode configuration for Pro clusters SleepMode *SleepMode `json:"sleepMode,omitempty"` + + // Logging provides structured logging options + Logging *Logging `json:"logging,omitempty"` +} + +// PrivateNodes enables private nodes for vCluster. When turned on, vCluster will not sync resources to the host cluster +// and instead act as a hosted control plane into which actual worker nodes can be joined via kubeadm or cluster api. +type PrivateNodes struct { + // Enabled defines if dedicated nodes should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // ImportNodeBinaries defines to use the loft-sh/kubernetes:VERSION-full image to also copy the node binaries to the control plane. This allows upgrades and + // joining new nodes into the cluster without having to download the binaries from the internet. + ImportNodeBinaries bool `json:"importNodeBinaries,omitempty"` + + // Kubelet holds kubelet configuration that is used for all nodes. + Kubelet Kubelet `json:"kubelet,omitempty"` + + // AutoUpgrade holds configuration for auto upgrade. + AutoUpgrade AutoUpgrade `json:"autoUpgrade,omitempty"` + + // JoinNode holds configuration specifically used during joining the node (see "kubeadm join"). + JoinNode JoinConfiguration `json:"joinNode,omitempty"` +} + +type Deploy struct { + // KubeProxy holds dedicated kube proxy configuration. + KubeProxy KubeProxy `json:"kubeProxy,omitempty"` + + // Metallb holds dedicated metallb configuration. + Metallb Metallb `json:"metallb,omitempty"` + + // CNI holds dedicated CNI configuration. + CNI CNI `json:"cni,omitempty"` + + // LocalPathProvisioner holds dedicated local path provisioner configuration. + LocalPathProvisioner LocalPathProvisioner `json:"localPathProvisioner,omitempty"` + + // IngressNginx holds dedicated ingress-nginx configuration. + IngressNginx IngressNginx `json:"ingressNginx,omitempty"` + + // MetricsServer holds dedicated metrics server configuration. + MetricsServer DeployMetricsServer `json:"metricsServer,omitempty"` +} + +type DeployMetricsServer struct { + // Enabled defines if metrics server should be enabled. + Enabled bool `json:"enabled,omitempty"` +} + +type IngressNginx struct { + // Enabled defines if ingress-nginx should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // DefaultIngressClass defines if the deployed ingress class should be the default ingress class. + DefaultIngressClass bool `json:"defaultIngressClass,omitempty"` +} + +type Metallb struct { + // Enabled defines if metallb should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // ControllerImage is the image for metallb controller. + ControllerImage string `json:"controllerImage,omitempty"` + + // SpeakerImage is the image for metallb speaker. + SpeakerImage string `json:"speakerImage,omitempty"` + + // IPAddressPool is the IP address pool to use for metallb. + IPAddressPool MetallbIPAddressPool `json:"ipAddressPool,omitempty"` +} + +type MetallbIPAddressPool struct { + // Addresses is a list of IP addresses to use for the IP address pool. + Addresses []string `json:"addresses,omitempty"` + + // L2Advertisement defines if L2 advertisement should be enabled for the IP address pool. + L2Advertisement bool `json:"l2Advertisement,omitempty"` +} + +type Standalone struct { + // Enabled defines if standalone mode should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // DataDir defines the data directory for the standalone mode. + DataDir string `json:"dataDir,omitempty"` + + // BundleRepository is the repository to use for downloading the Kubernetes bundle. Defaults to https://github.com/loft-sh/kubernetes/releases/download + BundleRepository string `json:"bundleRepository,omitempty"` + + // Bundle is a path to a Kubernetes bundle to use for the standalone mode. If empty, will use the bundleRepository to download the bundle. + Bundle string `json:"bundle,omitempty"` + + // JoinNode holds configuration for the standalone control plane node. + JoinNode StandaloneJoinNode `json:"joinNode,omitempty"` +} + +type StandaloneJoinNode struct { + // Enabled defines if the standalone node should be joined into the cluster. If false, only the control plane binaries will be executed and no node will show up in the actual cluster. + Enabled bool `json:"enabled,omitempty"` + + // Name defines the name of the standalone node. If empty the node will get the hostname as name. + Name string `json:"name,omitempty"` + + JoinConfiguration `json:",inline"` +} + +type JoinConfiguration struct { + // PreJoinCommands are commands that will be executed before the join process starts. + PreJoinCommands []string `json:"preJoinCommands,omitempty"` + + // PostJoinCommands are commands that will be executed after the join process starts. + PostJoinCommands []string `json:"postJoinCommands,omitempty"` + + // Containerd holds configuration for the containerd join process. + Containerd ContainerdJoin `json:"containerd,omitempty"` + + // CACertPath is the path to the SSL certificate authority used to + // secure communications between node and control-plane. + // Defaults to "/etc/kubernetes/pki/ca.crt". + CACertPath string `json:"caCertPath,omitempty"` + + // SkipPhases is a list of phases to skip during command execution. + // The list of phases can be obtained with the "kubeadm join --help" command. + SkipPhases []string `json:"skipPhases,omitempty"` + + // NodeRegistration holds configuration for the node registration similar to the kubeadm node registration. + NodeRegistration NodeRegistration `json:"nodeRegistration,omitempty"` +} + +type ContainerdJoin struct { + // Enabled defines if containerd should be installed and configured by vCluster. + Enabled bool `json:"enabled,omitempty"` + + // Registry holds configuration for how containerd should be configured to use a registries. + Registry ContainerdRegistry `json:"registry,omitempty"` + + // ImportImages is a list of images to import into the containerd registry from local files. If the path is a folder, all files that end with .tar or .tar.gz in the folder will be imported. + ImportImages []string `json:"importImages,omitempty"` + + // PauseImage is the image for the pause container. + PauseImage string `json:"pauseImage,omitempty"` +} + +type ContainerdRegistry struct { + // ConfigPath is the path to the containerd registry config. + ConfigPath string `json:"configPath,omitempty"` + + // Mirrors holds configuration for the containerd registry mirrors. E.g. myregistry.io:5000 or docker.io. See https://github.com/containerd/containerd/blob/main/docs/hosts.md for more details. + Mirrors map[string]ContainerdMirror `json:"mirrors,omitempty"` +} + +type ContainerdMirror struct { + // Server is the fallback server to use for the containerd registry mirror. E.g. https://registry-1.docker.io. See https://github.com/containerd/containerd/blob/main/docs/hosts.md for more details. + Server string `json:"server,omitempty"` + + // CACert are paths to CA certificates to use for the containerd registry mirror. + CACert []string `json:"caCert,omitempty"` + + // SkipVerify is a boolean to skip the certificate verification for the containerd registry mirror and allows http connections. + SkipVerify bool `json:"skipVerify,omitempty"` + + // Capabilities is a list of capabilities to enable for the containerd registry mirror. If empty, will use pull and resolve capabilities. + Capabilities []string `json:"capabilities,omitempty"` + + // Hosts holds configuration for the containerd registry mirror hosts. See https://github.com/containerd/containerd/blob/main/docs/hosts.md for more details. + Hosts []ContainerdMirrorHost `json:"hosts,omitempty"` +} + +type ContainerdMirrorHost struct { + // Server is the server to use for the containerd registry mirror host. E.g. http://192.168.31.250:5000. + Server string `json:"server,omitempty"` + + // CACert are paths to CA certificates to use for the containerd registry mirror host. + CACert []string `json:"caCert,omitempty"` + + // SkipVerify is a boolean to skip the certificate verification for the containerd registry mirror and allows http connections. + SkipVerify bool `json:"skipVerify,omitempty"` + + // Capabilities is a list of capabilities to enable for the containerd registry mirror. If empty, will use pull and resolve capabilities. + Capabilities []string `json:"capabilities,omitempty"` +} + +type NodeRegistration struct { + // CRI socket is the socket for the CRI. + CRISocket string `json:"criSocket,omitempty"` + + // KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file + // kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config ConfigMap + // Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. + // An argument name in this list is the flag name as it appears on the command line except without leading dash(es). + // Extra arguments will override existing default arguments. Duplicate extra arguments are allowed. + KubeletExtraArgs []KubeletExtraArg `json:"kubeletExtraArgs,omitempty"` + + // Taints are additional taints to set for the kubelet. + Taints []KubeletJoinTaint `json:"taints,omitempty"` + + // IgnorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered, e.g. 'IsPrivilegedUser,Swap'. + // Value 'all' ignores errors from all checks. + IgnorePreflightErrors []string `json:"ignorePreflightErrors,omitempty"` + + // ImagePullPolicy specifies the policy for image pulling during kubeadm "init" and "join" operations. + // The value of this field must be one of "Always", "IfNotPresent" or "Never". + // If this field is unset kubeadm will default it to "IfNotPresent", or pull the required images if not present on the host. + ImagePullPolicy string `json:"imagePullPolicy,omitempty"` +} + +// KubeletExtraArg represents an argument with a name and a value. +type KubeletExtraArg struct { + // Name is the name of the argument. + Name string `json:"name"` + // Value is the value of the argument. + Value string `json:"value"` +} + +type KubeletJoinTaint struct { + // Required. The taint key to be applied to a node. + Key string `json:"key"` + // The taint value corresponding to the taint key. + // +optional + Value string `json:"value,omitempty"` + // Required. The effect of the taint on pods + // that do not tolerate the taint. + // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + Effect string `json:"effect"` +} + +type LocalPathProvisioner struct { + // Enabled defines if LocalPathProvisioner should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // Image is the image for local path provisioner. + Image string `json:"image,omitempty"` + + // ImagePullPolicy is the policy how to pull the image. + ImagePullPolicy string `json:"imagePullPolicy,omitempty"` + + // NodePath is the path on the node where to create the persistent volume directories. + NodePath string `json:"nodePath,omitempty"` +} + +type CNI struct { + // Flannel holds dedicated Flannel configuration. + Flannel CNIFlannel `json:"flannel,omitempty"` +} + +type CNIFlannel struct { + // Enabled defines if Flannel should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // Image is the image for Flannel main container. + Image string `json:"image,omitempty"` + + // InitImage is the image for Flannel init container. + InitImage string `json:"initImage,omitempty"` + + // ImagePullPolicy is the policy how to pull the image. + ImagePullPolicy string `json:"imagePullPolicy,omitempty"` +} + +type AutoUpgrade struct { + // Enabled defines if auto upgrade should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // Image is the image for the auto upgrade pod started by vCluster. If empty defaults to the controlPlane.statefulSet.image. + Image string `json:"image,omitempty"` + + // ImagePullPolicy is the policy how to pull the image. + ImagePullPolicy string `json:"imagePullPolicy,omitempty"` + + // NodeSelector is the node selector for the auto upgrade. If empty will select all worker nodes. + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + + // BundleRepository is the repository to use for downloading the Kubernetes bundle. Defaults to https://github.com/loft-sh/kubernetes/releases/download + BundleRepository string `json:"bundleRepository,omitempty"` + + // BinariesPath is the base path for the kubeadm binaries. Defaults to /usr/local/bin + BinariesPath string `json:"binariesPath,omitempty"` + + // CNIBinariesPath is the base path for the CNI binaries. Defaults to /opt/cni/bin + CNIBinariesPath string `json:"cniBinariesPath,omitempty"` + + // Concurrency is the number of nodes that can be upgraded at the same time. + Concurrency int `json:"concurrency,omitempty"` +} + +type Kubelet struct { + // CgroupDriver defines the cgroup driver to use for the kubelet. + CgroupDriver string `json:"cgroupDriver,omitempty"` +} + +type KubeProxy struct { + // Enabled defines if the kube proxy should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // Image is the image for the kube-proxy. + Image string `json:"image,omitempty"` + + // ImagePullPolicy is the policy how to pull the image. + ImagePullPolicy string `json:"imagePullPolicy,omitempty"` + + // NodeSelector is the node selector for the kube-proxy. + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + + // PriorityClassName is the priority class name for the kube-proxy. + PriorityClassName string `json:"priorityClassName,omitempty"` + + // Tolerations is the tolerations for the kube-proxy. + Tolerations []interface{} `json:"tolerations,omitempty"` + + // ExtraEnv is the extra environment variables for the kube-proxy. + ExtraEnv []interface{} `json:"extraEnv,omitempty"` + + // ExtraArgs are additional arguments to pass to the kube-proxy. + ExtraArgs []string `json:"extraArgs,omitempty"` +} + +type Konnectivity struct { + // Server holds configuration for the konnectivity server. + Server KonnectivityServer `json:"server,omitempty"` + + // Agent holds configuration for the konnectivity agent. + Agent KonnectivityAgent `json:"agent,omitempty"` +} + +type KonnectivityServer struct { + // Enabled defines if the konnectivity server should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // ExtraArgs are additional arguments to pass to the konnectivity server. + ExtraArgs []string `json:"extraArgs,omitempty"` +} + +type KonnectivityAgent struct { + // Enabled defines if the konnectivity agent should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // Replicas is the number of replicas for the konnectivity agent. + Replicas int `json:"replicas,omitempty"` + + // Image is the image for the konnectivity agent. + Image string `json:"image,omitempty"` + + // ImagePullPolicy is the policy how to pull the image. + ImagePullPolicy string `json:"imagePullPolicy,omitempty"` + + // NodeSelector is the node selector for the konnectivity agent. + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + + // PriorityClassName is the priority class name for the konnectivity agent. + PriorityClassName string `json:"priorityClassName,omitempty"` + + // Tolerations is the tolerations for the konnectivity agent. + Tolerations []interface{} `json:"tolerations,omitempty"` + + // ExtraEnv is the extra environment variables for the konnectivity agent. + ExtraEnv []interface{} `json:"extraEnv,omitempty"` + + // ExtraArgs are additional arguments to pass to the konnectivity agent. + ExtraArgs []string `json:"extraArgs,omitempty"` } // Integrations holds config for vCluster integrations with other operators or tools running on the host cluster @@ -317,8 +686,6 @@ func (c *Config) EmbeddedDatabase() bool { func (c *Config) Distro() string { if c.ControlPlane.Distro.K3S.Enabled { return K3SDistro - } else if c.ControlPlane.Distro.K0S.Enabled { - return K0SDistro } else if c.ControlPlane.Distro.K8S.Enabled { return K8SDistro } @@ -326,6 +693,11 @@ func (c *Config) Distro() string { return K8SDistro } +func (c *Config) IsVirtualSchedulerEnabled() bool { + return c.Distro() == K8SDistro && c.ControlPlane.Distro.K8S.Scheduler.Enabled || + c.ControlPlane.Advanced.VirtualScheduler.Enabled +} + func (c *Config) IsConfiguredForSleepMode() bool { if c != nil && c.External != nil && c.External["platform"] == nil { return false @@ -335,27 +707,74 @@ func (c *Config) IsConfiguredForSleepMode() bool { } // ValidateChanges checks for disallowed config changes. -// Currently only certain backingstore changes are allowed but no distro change. func ValidateChanges(oldCfg, newCfg *Config) error { - oldDistro, newDistro := oldCfg.Distro(), newCfg.Distro() - oldBackingStore, newBackingStore := oldCfg.BackingStoreType(), newCfg.BackingStoreType() + if err := ValidateDistroChanges(newCfg.Distro(), oldCfg.Distro()); err != nil { + return err + } + if err := ValidateStoreChanges(newCfg.BackingStoreType(), oldCfg.BackingStoreType()); err != nil { + return err + } - return ValidateStoreAndDistroChanges(newBackingStore, oldBackingStore, newDistro, oldDistro) + if err := ValidateNamespaceSyncChanges(oldCfg, newCfg); err != nil { //nolint:revive + return err + } + return nil } -// ValidateStoreAndDistroChanges checks whether migrating from one store to the other is allowed. -func ValidateStoreAndDistroChanges(currentStoreType, previousStoreType StoreType, currentDistro, previousDistro string) error { - if currentDistro != previousDistro && !(previousDistro == "eks" && currentDistro == K8SDistro) && !(previousDistro == K3SDistro && currentDistro == K8SDistro) { - return fmt.Errorf("seems like you were using %s as a distro before and now have switched to %s, please make sure to not switch between vCluster distros", previousDistro, currentDistro) +// ValidateStoreChanges checks whether migrating from one store to the other is allowed. +func ValidateStoreChanges(currentStoreType, previousStoreType StoreType) error { + if currentStoreType == previousStoreType { + return nil } - if currentStoreType != previousStoreType { - if currentStoreType != StoreTypeDeployedEtcd && currentStoreType != StoreTypeEmbeddedEtcd { - return fmt.Errorf("seems like you were using %s as a store before and now have switched to %s, please make sure to not switch between vCluster stores", previousStoreType, currentStoreType) + switch currentStoreType { + case StoreTypeDeployedEtcd: + fallthrough + case StoreTypeEmbeddedEtcd: + // switching from external ETCD, deploy ETCD, or embedded (SQLite) to deployed or embedded ETCD is valid + if previousStoreType == StoreTypeExternalEtcd || previousStoreType == StoreTypeDeployedEtcd || previousStoreType == StoreTypeEmbeddedDatabase { + return nil } - if previousStoreType != StoreTypeExternalEtcd && previousStoreType != StoreTypeDeployedEtcd && previousStoreType != StoreTypeEmbeddedDatabase { - return fmt.Errorf("seems like you were using %s as a store before and now have switched to %s, please make sure to not switch between vCluster stores", previousStoreType, currentStoreType) + case StoreTypeExternalDatabase: + // switching from embedded to external ETCD is allowed because of a bug that labeled store types as embedded but used + // external info if provided when the external "enabled" flag was not used. Now, using the "enabled" flag is required or + // SQLite is used. The exception to allow this switch is necessary so they can toggle the "enabled" flag if the cluster + // was previously using external. Otherwise, after upgrade the vCluster will start using a fresh SQLite database. + if previousStoreType == StoreTypeEmbeddedDatabase { + return nil } + default: + } + return fmt.Errorf("seems like you were using %s as a store before and now have switched to %s,"+ + " please make sure to not switch between vCluster stores", previousStoreType, currentStoreType) +} + +// ValidateDistroChanges checks whether migrating from one distro to the other is allowed. +func ValidateDistroChanges(currentDistro, previousDistro string) error { + if currentDistro != previousDistro && !(previousDistro == "eks" && currentDistro == K8SDistro) && !(previousDistro == K3SDistro && currentDistro == K8SDistro) { + return fmt.Errorf("seems like you were using %s as a distro before and now have switched to %s, please make sure to not switch between vCluster distros", previousDistro, currentDistro) + } + return nil +} + +func ValidateNamespaceSyncChanges(oldCfg, newCfg *Config) error { + oldNamespaceConf := oldCfg.Sync.ToHost.Namespaces + newNamespaceConf := newCfg.Sync.ToHost.Namespaces + + if oldNamespaceConf.Enabled != newNamespaceConf.Enabled { + return fmt.Errorf("sync.toHost.namespaces.enabled is not allowed to be changed") + } + + if oldNamespaceConf.MappingsOnly != newNamespaceConf.MappingsOnly { + return fmt.Errorf("sync.toHost.namespaces.mappingsOnly is not allowed to be changed") + } + + if !reflect.DeepEqual(oldNamespaceConf.Mappings.ByName, newNamespaceConf.Mappings.ByName) { + return fmt.Errorf("sync.toHost.namespaces.mappings.byName is not allowed to be changed") + } + + if !reflect.DeepEqual(oldNamespaceConf.Patches, newNamespaceConf.Patches) { + return fmt.Errorf("sync.toHost.namespaces.patches is not allowed to be changed") } return nil @@ -392,27 +811,27 @@ func (c *Config) IsProFeatureEnabled() bool { return true } - if c.Experimental.SyncSettings.DisableSync { + if c.Experimental.IsolatedControlPlane.Enabled { return true } - if c.Experimental.SyncSettings.RewriteKubernetesService { + if len(c.Experimental.DenyProxyRequests) > 0 { return true } - if c.Experimental.IsolatedControlPlane.Enabled { + if len(c.External["platform"]) > 0 { return true } - if len(c.Experimental.DenyProxyRequests) > 0 { + if len(c.Sync.ToHost.CustomResources) > 0 || len(c.Sync.FromHost.CustomResources) > 0 { return true } - if len(c.External["platform"]) > 0 { + if c.Sync.ToHost.Namespaces.Enabled { return true } - if len(c.Sync.ToHost.CustomResources) > 0 || len(c.Sync.FromHost.CustomResources) > 0 { + if c.Sync.ToHost.Pods.HybridScheduling.Enabled { return true } @@ -575,6 +994,9 @@ type SyncToHost struct { // CustomResources defines what custom resources should get synced from the virtual cluster to the host cluster. vCluster will copy the definition automatically from host cluster to virtual cluster on startup. // vCluster will also automatically add any required RBAC permissions to the vCluster role for this to work. CustomResources map[string]SyncToHostCustomResource `json:"customResources,omitempty"` + + // Namespaces defines if namespaces created within the virtual cluster should get synced to the host cluster. + Namespaces SyncToHostNamespaces `json:"namespaces,omitempty"` } type EnableSwitchWithPatches struct { @@ -625,16 +1047,16 @@ type SyncFromHost struct { Events EnableSwitchWithPatches `json:"events,omitempty"` // IngressClasses defines if ingress classes should get synced from the host cluster to the virtual cluster, but not back. - IngressClasses EnableSwitchWithPatches `json:"ingressClasses,omitempty"` + IngressClasses EnableSwitchWithPatchesAndSelector `json:"ingressClasses,omitempty"` // RuntimeClasses defines if runtime classes should get synced from the host cluster to the virtual cluster, but not back. - RuntimeClasses EnableSwitchWithPatches `json:"runtimeClasses,omitempty"` + RuntimeClasses EnableSwitchWithPatchesAndSelector `json:"runtimeClasses,omitempty"` // PriorityClasses defines if priority classes classes should get synced from the host cluster to the virtual cluster, but not back. - PriorityClasses EnableSwitchWithPatches `json:"priorityClasses,omitempty"` + PriorityClasses EnableSwitchWithPatchesAndSelector `json:"priorityClasses,omitempty"` // StorageClasses defines if storage classes should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled. - StorageClasses EnableAutoSwitchWithPatches `json:"storageClasses,omitempty"` + StorageClasses EnableAutoSwitchWithPatchesAndSelector `json:"storageClasses,omitempty"` // CSINodes defines if csi nodes should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled. CSINodes EnableAutoSwitchWithPatches `json:"csiNodes,omitempty"` @@ -658,6 +1080,58 @@ type SyncFromHost struct { Secrets EnableSwitchWithResourcesMappings `json:"secrets,omitempty"` } +type StandardLabelSelector v1.LabelSelector + +func (s StandardLabelSelector) Empty() bool { + selector, err := s.ToSelector() + return err == nil && selector.Empty() +} + +func (s StandardLabelSelector) Matches(obj client.Object) (bool, error) { + selector, err := s.ToSelector() + if err != nil { + return false, fmt.Errorf("failed to convert label selector: %w", err) + } + return selector.Matches(labels.Set(obj.GetLabels())), nil +} + +func (s StandardLabelSelector) ToSelector() (labels.Selector, error) { + ls := v1.LabelSelector(s) + return v1.LabelSelectorAsSelector(&ls) +} + +type EnableSwitchWithPatchesAndSelector struct { + EnableSwitchWithPatches + + // Selector defines the selector to use for the resource. If not set, all resources of that type will be synced. + Selector StandardLabelSelector `json:"selector,omitempty"` +} + +type EnableAutoSwitchWithPatchesAndSelector struct { + EnableAutoSwitchWithPatches + + // Selector defines the selector to use for the resource. If not set, all resources of that type will be synced. + Selector StandardLabelSelector `json:"selector,omitempty"` +} + +// SyncToHostNamespaces defines how namespaces should be synced from the virtual cluster to the host cluster. +type SyncToHostNamespaces struct { + // Enabled defines if this option should be enabled. + Enabled bool `json:"enabled,omitempty" jsonschema:"required"` + + // Patches patch the resource according to the provided specification. + Patches []TranslatePatch `json:"patches,omitempty"` + + // Mappings for Namespace and Object + Mappings FromHostMappings `json:"mappings,omitempty"` + + // MappingsOnly defines if creation of namespaces not matched by mappings should be allowed. + MappingsOnly bool `json:"mappingsOnly,omitempty"` + + // ExtraLabels are additional labels to add to the namespace in the host cluster. + ExtraLabels map[string]string `json:"extraLabels,omitempty"` +} + type SyncToHostCustomResource struct { // Enabled defines if this option should be enabled. Enabled bool `json:"enabled,omitempty" jsonschema:"required"` @@ -789,6 +1263,9 @@ type SyncPods struct { // Patches patch the resource according to the provided specification. Patches []TranslatePatch `json:"patches,omitempty"` + + // HybridScheduling is used to enable and configure hybrid scheduling for pods in the virtual cluster. + HybridScheduling HybridScheduling `json:"hybridScheduling,omitempty"` } type SyncRewriteHosts struct { @@ -807,6 +1284,14 @@ type SyncRewriteHostsInitContainer struct { Resources Resources `json:"resources,omitempty"` } +type HybridScheduling struct { + // Enabled specifies if hybrid scheduling is enabled. + Enabled bool `json:"enabled,omitempty"` + + // HostSchedulers is a list of schedulers that are deployed on the host cluster. + HostSchedulers []string `json:"hostSchedulers,omitempty"` +} + type SyncNodes struct { // Enabled specifies if syncing real nodes should be enabled. If this is disabled, vCluster will create fake nodes instead. Enabled bool `json:"enabled,omitempty"` @@ -844,6 +1329,12 @@ type ServiceMonitor struct { } type Networking struct { + // ServiceCIDR holds the service cidr for the virtual cluster. This should only be set if privateNodes.enabled is true or vCluster cannot detect the host service cidr. + ServiceCIDR string `json:"serviceCIDR,omitempty"` + + // PodCIDR holds the pod cidr for the virtual cluster. This should only be set if privateNodes.enabled is true. + PodCIDR string `json:"podCIDR,omitempty"` + // ReplicateServices allows replicating services from the host within the virtual cluster or the other way around. ReplicateServices ReplicateServices `json:"replicateServices,omitempty"` @@ -1011,9 +1502,16 @@ type RBACPolicyRule struct { } type ControlPlane struct { + // Endpoint is the endpoint of the virtual cluster. This is used to connect to the virtual cluster. + Endpoint string `json:"endpoint,omitempty"` + // Distro holds virtual cluster related distro options. A distro cannot be changed after vCluster is deployed. Distro Distro `json:"distro,omitempty"` + // Standalone holds configuration for standalone mode. Standalone mode is set automatically when no container is detected and + // also implies privateNodes.enabled. + Standalone Standalone `json:"standalone,omitempty"` + // BackingStore defines which backing store to use for virtual cluster. If not defined will use embedded database as a default backing store. BackingStore BackingStore `json:"backingStore,omitempty"` @@ -1104,9 +1602,6 @@ type Distro struct { // [Deprecated] K3S holds K3s relevant configuration. K3S DistroK3s `json:"k3s,omitempty"` - - // [Deprecated] K0S holds k0s relevant configuration. - K0S DistroK0s `json:"k0s,omitempty"` } type DistroK3s struct { @@ -1135,22 +1630,11 @@ type DistroK8s struct { ControllerManager DistroContainerEnabled `json:"controllerManager,omitempty"` // Scheduler holds configuration specific to starting the scheduler. Enable this via controlPlane.advanced.virtualScheduler.enabled - Scheduler DistroContainer `json:"scheduler,omitempty"` + Scheduler DistroContainerEnabled `json:"scheduler,omitempty"` DistroCommon `json:",inline"` } -type DistroK0s struct { - // Enabled specifies if the k0s distro should be enabled. Only one distro can be enabled at the same time. - Enabled bool `json:"enabled,omitempty"` - - // Config allows you to override the k0s config passed to the k0s binary. - Config string `json:"config,omitempty"` - - DistroCommon `json:",inline"` - DistroContainer `json:",inline"` -} - type DistroCommon struct { // Image is the distro image Image Image `json:"image,omitempty"` @@ -1278,6 +1762,9 @@ type DatabaseKine struct { // CaFile is the ca file to use for the database. This is optional. CaFile string `json:"caFile,omitempty"` + + // ExtraArgs are additional arguments to pass to Kine. + ExtraArgs []string `json:"extraArgs,omitempty"` } type Etcd struct { @@ -1327,6 +1814,9 @@ type EtcdEmbedded struct { // SnapshotCount defines the number of snapshots to keep for the embedded etcd. Defaults to 10000 if less than 1. SnapshotCount int `json:"snapshotCount,omitempty"` + + // ExtraArgs are additional arguments to pass to the embedded etcd. + ExtraArgs []string `json:"extraArgs,omitempty"` } func (e EtcdEmbedded) JSONSchemaExtend(base *jsonschema.Schema) { @@ -1428,6 +1918,9 @@ type CoreDNS struct { // Embedded defines if vCluster will start the embedded coredns service within the control-plane and not as a separate deployment. This is a PRO feature. Embedded bool `json:"embedded,omitempty" product:"pro"` + // Security defines pod or container security context. + Security ControlPlaneSecurity `json:"security,omitempty"` + // Service holds extra options for the coredns service deployed within the virtual cluster Service CoreDNSService `json:"service,omitempty"` @@ -1546,6 +2039,7 @@ type ControlPlaneAdvanced struct { DefaultImageRegistry string `json:"defaultImageRegistry,omitempty"` // VirtualScheduler defines if a scheduler should be used within the virtual cluster or the scheduling decision for workloads will be made by the host cluster. + // Deprecated: Use ControlPlane.Distro.K8S.Scheduler instead. VirtualScheduler EnableSwitch `json:"virtualScheduler,omitempty"` // ServiceAccount specifies options for the vCluster control plane service account. @@ -1557,10 +2051,27 @@ type ControlPlaneAdvanced struct { // HeadlessService specifies options for the headless service used for the vCluster StatefulSet. HeadlessService ControlPlaneHeadlessService `json:"headlessService,omitempty"` + // Konnectivity holds dedicated konnectivity configuration. This is only available when privateNodes.enabled is true. + Konnectivity Konnectivity `json:"konnectivity,omitempty"` + + // Registry allows enabling an embedded docker image registry in vCluster. This is useful for air-gapped environments or when you don't have a public registry available to distribute images. + Registry Registry `json:"registry,omitempty"` + // GlobalMetadata is metadata that will be added to all resources deployed by Helm. GlobalMetadata ControlPlaneGlobalMetadata `json:"globalMetadata,omitempty"` } +type Registry struct { + // Enabled defines if the embedded registry should be enabled. + Enabled bool `json:"enabled,omitempty"` + + // AnonymousPull allows enabling anonymous pull for the embedded registry. This allows anybody to pull images from the registry without authentication. + AnonymousPull bool `json:"anonymousPull,omitempty"` + + // Config is the regular docker registry config. See https://distribution.github.io/distribution/about/configuration/ for more details. + Config interface{} `json:"config,omitempty"` +} + type ControlPlaneHeadlessService struct { // Annotations are extra annotations for this resource. Annotations map[string]string `json:"annotations,omitempty"` @@ -1726,13 +2237,64 @@ type ControlPlaneWorkloadServiceAccount struct { type ControlPlaneProbes struct { // LivenessProbe specifies if the liveness probe for the container should be enabled - LivenessProbe EnableSwitch `json:"livenessProbe,omitempty"` + LivenessProbe LivenessProbe `json:"livenessProbe,omitempty"` // ReadinessProbe specifies if the readiness probe for the container should be enabled - ReadinessProbe EnableSwitch `json:"readinessProbe,omitempty"` + ReadinessProbe ReadinessProbe `json:"readinessProbe,omitempty"` // StartupProbe specifies if the startup probe for the container should be enabled - StartupProbe EnableSwitch `json:"startupProbe,omitempty"` + StartupProbe StartupProbe `json:"startupProbe,omitempty"` +} + +// LivenessProbe defines the configuration for the liveness probe. +// A liveness probe checks if the container is still running. +// If it fails, Kubernetes will restart the container. +type LivenessProbe struct { + EnableSwitch + + // Number of consecutive failures for the probe to be considered failed + FailureThreshold int `json:"failureThreshold,omitempty"` + + // Time (in seconds) to wait before starting the liveness probe + InitialDelaySeconds int `json:"initialDelaySeconds,omitempty"` + + // Maximum duration (in seconds) that the probe will wait for a response. + TimeoutSeconds int `json:"timeoutSeconds,omitempty"` + + // Frequency (in seconds) to perform the probe + PeriodSeconds int `json:"periodSeconds,omitempty"` +} + +// ReadinessProbe defines the configuration for the readiness probe. +// A readiness probe checks if the container is ready to accept traffic. +// If it fails, Kubernetes removes the pod from the Service endpoints. +type ReadinessProbe struct { + EnableSwitch + + // Number of consecutive failures for the probe to be considered failed + FailureThreshold int `json:"failureThreshold,omitempty"` + + // Maximum duration (in seconds) that the probe will wait for a response. + TimeoutSeconds int `json:"timeoutSeconds,omitempty"` + + // Frequency (in seconds) to perform the probe + PeriodSeconds int `json:"periodSeconds,omitempty"` +} + +// StartupProbe defines the configuration for the startup probe. +// A startup probe checks if the application within the container has started. +// While the startup probe is failing, other probes are disabled. +type StartupProbe struct { + EnableSwitch + + // Number of consecutive failures allowed before failing the pod + FailureThreshold int `json:"failureThreshold,omitempty"` + + // Maximum duration (in seconds) that the probe will wait for a response. + TimeoutSeconds int `json:"timeoutSeconds,omitempty"` + + // Frequency (in seconds) to perform the probe + PeriodSeconds int `json:"periodSeconds,omitempty"` } type ControlPlaneSecurity struct { @@ -2060,9 +2622,6 @@ type Experimental struct { // GenericSync holds options to generically sync resources from virtual cluster to host. GenericSync ExperimentalGenericSync `json:"genericSync,omitempty"` - // MultiNamespaceMode tells virtual cluster to sync to multiple namespaces instead of a single one. This will map each virtual cluster namespace to a single namespace in the host cluster. - MultiNamespaceMode ExperimentalMultiNamespaceMode `json:"multiNamespaceMode,omitempty"` - // IsolatedControlPlane is a feature to run the vCluster control plane in a different Kubernetes cluster than the workloads themselves. IsolatedControlPlane ExperimentalIsolatedControlPlane `json:"isolatedControlPlane,omitempty" product:"pro"` @@ -2077,14 +2636,6 @@ func (e Experimental) JSONSchemaExtend(base *jsonschema.Schema) { addProToJSONSchema(base, reflect.TypeOf(e)) } -type ExperimentalMultiNamespaceMode struct { - // Enabled specifies if multi namespace mode should get enabled - Enabled bool `json:"enabled,omitempty"` - - // NamespaceLabels are extra labels that will be added by vCluster to each created namespace. - NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"` -} - type ExperimentalIsolatedControlPlane struct { // Enabled specifies if the isolated control plane feature should be enabled. Enabled bool `json:"enabled,omitempty" product:"pro"` @@ -2103,12 +2654,6 @@ type ExperimentalIsolatedControlPlane struct { } type ExperimentalSyncSettings struct { - // DisableSync will not sync any resources and disable most control plane functionality. - DisableSync bool `json:"disableSync,omitempty" product:"pro"` - - // RewriteKubernetesService will rewrite the Kubernetes service to point to the vCluster service if disableSync is enabled - RewriteKubernetesService bool `json:"rewriteKubernetesService,omitempty" product:"pro"` - // TargetNamespace is the namespace where the workloads should get synced to. TargetNamespace string `json:"targetNamespace,omitempty"` @@ -2193,6 +2738,9 @@ type PlatformConfig struct { // * secret specified under external.platform.apiKey.secretName // * secret called "vcluster-platform-api-key" in the vCluster namespace APIKey PlatformAPIKey `json:"apiKey,omitempty"` + + // Project specifies which platform project the vcluster should be imported to + Project string `json:"project,omitempty"` } // PlatformAPIKey defines where to find the platform access key. The secret key name doesn't matter as long as the secret only contains a single key. @@ -2554,3 +3102,9 @@ type AutoWakeup struct { type AutoSleepExclusion struct { Selector LabelSelector `json:"selector,omitempty"` } + +// Logging holds the log encoding details +type Logging struct { + // Encoding specifies the format of vCluster logs, it can either be json or console. + Encoding string `json:"encoding,omitempty"` +} diff --git a/vendor/github.com/loft-sh/vcluster/config/default_extra_values.go b/vendor/github.com/loft-sh/vcluster/config/default_extra_values.go index 07511d83..c0de9d56 100644 --- a/vendor/github.com/loft-sh/vcluster/config/default_extra_values.go +++ b/vendor/github.com/loft-sh/vcluster/config/default_extra_values.go @@ -8,7 +8,6 @@ import ( const ( K3SDistro = "k3s" K8SDistro = "k8s" - K0SDistro = "k0s" Unknown = "unknown" ) @@ -24,21 +23,14 @@ const ( // K3SVersionMap holds the supported k3s versions var K3SVersionMap = map[string]string{ - "1.32": "rancher/k3s:v1.32.1-k3s1", + "1.32": "rancher/k3s:v1.32.7-k3s1", "1.31": "rancher/k3s:v1.31.1-k3s1", "1.30": "rancher/k3s:v1.30.2-k3s1", } -// K0SVersionMap holds the supported k0s versions -var K0SVersionMap = map[string]string{ - "1.32": "k0sproject/k0s:v1.30.2-k0s.0", - "1.31": "k0sproject/k0s:v1.30.2-k0s.0", - "1.30": "k0sproject/k0s:v1.30.2-k0s.0", -} - // K8SVersionMap holds the supported k8s api servers var K8SVersionMap = map[string]string{ - "1.32": "ghcr.io/loft-sh/kubernetes:v1.32.1", + "1.32": "ghcr.io/loft-sh/kubernetes:v1.32.8", "1.31": "ghcr.io/loft-sh/kubernetes:v1.31.1", "1.30": "ghcr.io/loft-sh/kubernetes:v1.30.2", } @@ -145,8 +137,6 @@ func addCommonReleaseValues(config *Config, options *ExtraValuesOptions) { switch options.Distro { case K3SDistro: config.ControlPlane.Distro.K3S.Enabled = true - case K0SDistro: - config.ControlPlane.Distro.K0S.Enabled = true case K8SDistro: } } diff --git a/vendor/github.com/loft-sh/vcluster/config/diff.go b/vendor/github.com/loft-sh/vcluster/config/diff.go index a38d2059..94c51db3 100644 --- a/vendor/github.com/loft-sh/vcluster/config/diff.go +++ b/vendor/github.com/loft-sh/vcluster/config/diff.go @@ -5,6 +5,7 @@ import ( "errors" "reflect" "strconv" + "strings" "sigs.k8s.io/yaml" ) @@ -166,3 +167,10 @@ func (f *StrBool) MarshalJSON() ([]byte, error) { return []byte("\"" + *f + "\""), nil } } + +func (f *StrBool) Bool() bool { + if f == nil { + return false + } + return strings.ToLower(string(*f)) == "true" +} diff --git a/vendor/github.com/loft-sh/vcluster/config/legacyconfig/config.go b/vendor/github.com/loft-sh/vcluster/config/legacyconfig/config.go index 6a404889..ade8117a 100644 --- a/vendor/github.com/loft-sh/vcluster/config/legacyconfig/config.go +++ b/vendor/github.com/loft-sh/vcluster/config/legacyconfig/config.go @@ -4,7 +4,7 @@ import ( "github.com/loft-sh/vcluster/config" ) -type LegacyK0sAndK3s struct { +type LegacyK3s struct { BaseHelm AutoDeletePersistentVolumeClaims bool `json:"autoDeletePersistentVolumeClaims,omitempty"` K3sToken string `json:"k3sToken,omitempty"` @@ -14,7 +14,7 @@ type LegacyK0sAndK3s struct { Storage Storage `json:"storage,omitempty"` } -func (c *LegacyK0sAndK3s) UnmarshalYAMLStrict(data []byte) error { +func (c *LegacyK3s) UnmarshalYAMLStrict(data []byte) error { return config.UnmarshalYAMLStrict(data, c) } diff --git a/vendor/github.com/loft-sh/vcluster/config/legacyconfig/migrate.go b/vendor/github.com/loft-sh/vcluster/config/legacyconfig/migrate.go index d42a30ec..9d0b3f39 100644 --- a/vendor/github.com/loft-sh/vcluster/config/legacyconfig/migrate.go +++ b/vendor/github.com/loft-sh/vcluster/config/legacyconfig/migrate.go @@ -30,8 +30,8 @@ func MigrateLegacyConfig(distro, oldValues string) (string, error) { } switch distro { - case config.K0SDistro, config.K3SDistro: - err = migrateK3sAndK0s(distro, oldValues, toConfig) + case config.K3SDistro: + err = migrateK3s(distro, oldValues, toConfig) if err != nil { return "", fmt.Errorf("migrate legacy %s values: %w", distro, err) } @@ -67,7 +67,7 @@ func migrateK8sAndEKS(oldValues string, newConfig *config.Config) error { } convertAPIValues(oldConfig.API, &newConfig.ControlPlane.Distro.K8S.APIServer) convertControllerValues(oldConfig.Controller, &newConfig.ControlPlane.Distro.K8S.ControllerManager) - convertSchedulerValues(oldConfig.Scheduler, &newConfig.ControlPlane.Distro.K8S.Scheduler) + convertSchedulerValues(oldConfig, &newConfig.ControlPlane.Distro.K8S.Scheduler) // convert etcd err = convertEtcd(oldConfig.Etcd, newConfig) @@ -82,7 +82,7 @@ func migrateK8sAndEKS(oldValues string, newConfig *config.Config) error { applyStorage(oldConfig.Storage, newConfig) // syncer config - err = convertK8sSyncerConfig(oldConfig.Syncer, newConfig) + err = convertK8sSyncerConfig(config.K8SDistro, oldConfig.Syncer, newConfig) if err != nil { return fmt.Errorf("error converting syncer config: %w", err) } @@ -104,9 +104,9 @@ func migrateK8sAndEKS(oldValues string, newConfig *config.Config) error { return nil } -func migrateK3sAndK0s(distro, oldValues string, newConfig *config.Config) error { +func migrateK3s(distro, oldValues string, newConfig *config.Config) error { // unmarshal legacy config - oldConfig := &LegacyK0sAndK3s{} + oldConfig := &LegacyK3s{} err := oldConfig.UnmarshalYAMLStrict([]byte(oldValues)) if err != nil { if err := errIfConfigIsAlreadyConverted(oldValues); err != nil { @@ -115,16 +115,7 @@ func migrateK3sAndK0s(distro, oldValues string, newConfig *config.Config) error return fmt.Errorf("unmarshal legacy config: %w", err) } - // distro specific - if distro == config.K0SDistro { - newConfig.ControlPlane.Distro.K0S.Enabled = true - - // vcluster config - err = convertVClusterConfig(oldConfig.VCluster, &newConfig.ControlPlane.Distro.K0S.DistroCommon, &newConfig.ControlPlane.Distro.K0S.DistroContainer, newConfig) - if err != nil { - return fmt.Errorf("error converting vcluster config: %w", err) - } - } else if distro == config.K3SDistro { + if distro == config.K3SDistro { newConfig.ControlPlane.Distro.K3S.Enabled = true newConfig.ControlPlane.Distro.K3S.Token = oldConfig.K3sToken @@ -145,7 +136,7 @@ func migrateK3sAndK0s(distro, oldValues string, newConfig *config.Config) error applyStorage(oldConfig.Storage, newConfig) // syncer config - err = convertSyncerConfig(oldConfig.Syncer, newConfig) + err = convertSyncerConfig(config.K3SDistro, oldConfig.Syncer, newConfig) if err != nil { return fmt.Errorf("error converting syncer config: %w", err) } @@ -153,6 +144,11 @@ func migrateK3sAndK0s(distro, oldValues string, newConfig *config.Config) error // migrate embedded etcd convertEmbeddedEtcd(oldConfig.EmbeddedEtcd, newConfig) + // migrate scheduler + if oldConfig.Sync.Nodes.EnableScheduler != nil { + newConfig.ControlPlane.Advanced.VirtualScheduler.Enabled = *oldConfig.Sync.Nodes.EnableScheduler + } + // convert the rest return convertBaseValues(oldConfig.BaseHelm, newConfig) } @@ -231,8 +227,11 @@ func convertControllerValues(oldConfig ControllerValues, newContainer *config.Di newContainer.ExtraArgs = oldConfig.ExtraArgs } -func convertSchedulerValues(oldConfig SchedulerValues, newContainer *config.DistroContainer) { - newContainer.ExtraArgs = oldConfig.ExtraArgs +func convertSchedulerValues(oldConfig *LegacyK8s, newContainer *config.DistroContainerEnabled) { + if oldConfig.Sync.Nodes.EnableScheduler != nil { + newContainer.Enabled = *oldConfig.Sync.Nodes.EnableScheduler + } + newContainer.ExtraArgs = oldConfig.Scheduler.ExtraArgs } func convertBaseValues(oldConfig BaseHelm, newConfig *config.Config) error { @@ -318,7 +317,7 @@ func convertBaseValues(oldConfig BaseHelm, newConfig *config.Config) error { } if oldConfig.MultiNamespaceMode.Enabled != nil { - newConfig.Experimental.MultiNamespaceMode.Enabled = *oldConfig.MultiNamespaceMode.Enabled + newConfig.Sync.ToHost.Namespaces.Enabled = *oldConfig.MultiNamespaceMode.Enabled } if len(oldConfig.SecurityContext) > 0 { @@ -365,26 +364,6 @@ func convertBaseValues(oldConfig BaseHelm, newConfig *config.Config) error { newConfig.RBAC.ClusterRole.Enabled = "true" } - if oldConfig.NoopSyncer.Enabled { - newConfig.Experimental.SyncSettings.DisableSync = true - if oldConfig.NoopSyncer.Secret.KubeConfig != "" { - newConfig.Experimental.VirtualClusterKubeConfig.KubeConfig = oldConfig.NoopSyncer.Secret.KubeConfig - } - if oldConfig.NoopSyncer.Secret.ClientCaCert != "" { - newConfig.Experimental.VirtualClusterKubeConfig.ClientCACert = oldConfig.NoopSyncer.Secret.ClientCaCert - } - if oldConfig.NoopSyncer.Secret.ServerCaKey != "" { - newConfig.Experimental.VirtualClusterKubeConfig.ServerCAKey = oldConfig.NoopSyncer.Secret.ServerCaKey - } - if oldConfig.NoopSyncer.Secret.ServerCaCert != "" { - newConfig.Experimental.VirtualClusterKubeConfig.ServerCACert = oldConfig.NoopSyncer.Secret.ServerCaCert - } - if oldConfig.NoopSyncer.Secret.RequestHeaderCaCert != "" { - newConfig.Experimental.VirtualClusterKubeConfig.RequestHeaderCACert = oldConfig.NoopSyncer.Secret.RequestHeaderCaCert - } - newConfig.Experimental.SyncSettings.RewriteKubernetesService = oldConfig.NoopSyncer.Synck8sService - } - newConfig.Experimental.Deploy.VCluster.Manifests = oldConfig.Init.Manifests newConfig.Experimental.Deploy.VCluster.ManifestsTemplate = oldConfig.Init.ManifestsTemplate newConfig.Experimental.Deploy.VCluster.Helm = oldConfig.Init.Helm @@ -604,9 +583,6 @@ func convertBaseValues(oldConfig BaseHelm, newConfig *config.Config) error { if oldConfig.Sync.Nodes.NodeSelector != "" { newConfig.Sync.FromHost.Nodes.Selector.Labels = mergeIntoMap(make(map[string]string), strings.Split(oldConfig.Sync.Nodes.NodeSelector, ",")) } - if oldConfig.Sync.Nodes.EnableScheduler != nil { - newConfig.ControlPlane.Advanced.VirtualScheduler.Enabled = *oldConfig.Sync.Nodes.EnableScheduler - } if oldConfig.Sync.Nodes.SyncNodeChanges != nil { newConfig.Sync.FromHost.Nodes.SyncBackChanges = *oldConfig.Sync.Nodes.SyncNodeChanges } @@ -669,7 +645,7 @@ func convertEmbeddedEtcd(oldConfig EmbeddedEtcdValues, newConfig *config.Config) } } -func convertK8sSyncerConfig(oldConfig K8sSyncerValues, newConfig *config.Config) error { +func convertK8sSyncerConfig(distro string, oldConfig K8sSyncerValues, newConfig *config.Config) error { newConfig.ControlPlane.StatefulSet.Persistence.AddVolumes = oldConfig.Volumes if oldConfig.PriorityClassName != "" { newConfig.ControlPlane.StatefulSet.Scheduling.PriorityClassName = oldConfig.PriorityClassName @@ -688,10 +664,10 @@ func convertK8sSyncerConfig(oldConfig K8sSyncerValues, newConfig *config.Config) newConfig.ControlPlane.StatefulSet.Security.ContainerSecurityContext = oldConfig.SecurityContext } - return convertSyncerConfig(oldConfig.SyncerValues, newConfig) + return convertSyncerConfig(distro, oldConfig.SyncerValues, newConfig) } -func convertSyncerConfig(oldConfig SyncerValues, newConfig *config.Config) error { +func convertSyncerConfig(distro string, oldConfig SyncerValues, newConfig *config.Config) error { convertStatefulSetImage(oldConfig.Image, &newConfig.ControlPlane.StatefulSet.Image) if oldConfig.ImagePullPolicy != "" { newConfig.ControlPlane.StatefulSet.ImagePullPolicy = oldConfig.ImagePullPolicy @@ -734,10 +710,10 @@ func convertSyncerConfig(oldConfig SyncerValues, newConfig *config.Config) error newConfig.ControlPlane.StatefulSet.Labels = oldConfig.Labels } - return convertSyncerExtraArgs(oldConfig.ExtraArgs, newConfig) + return convertSyncerExtraArgs(distro, oldConfig.ExtraArgs, newConfig) } -func convertSyncerExtraArgs(extraArgs []string, newConfig *config.Config) error { +func convertSyncerExtraArgs(distro string, extraArgs []string, newConfig *config.Config) error { var err error var flag, value string @@ -764,7 +740,7 @@ func convertSyncerExtraArgs(extraArgs []string, newConfig *config.Config) error continue } - err = migrateFlag(flag, value, newConfig) + err = migrateFlag(distro, flag, value, newConfig) if err != nil { return fmt.Errorf("migrate extra syncer flag --%s: %w", flag, err) } @@ -779,7 +755,7 @@ func convertSyncerExtraArgs(extraArgs []string, newConfig *config.Config) error return nil } -func migrateFlag(key, value string, newConfig *config.Config) error { +func migrateFlag(distro, key, value string, newConfig *config.Config) error { if newConfig == nil { return errors.New("newConfig is not set") } @@ -884,8 +860,13 @@ func migrateFlag(key, value string, newConfig *config.Config) error { } case "enable-scheduler": if value == "" || value == "true" { - newConfig.ControlPlane.Advanced.VirtualScheduler.Enabled = true + if distro == config.K8SDistro { + newConfig.ControlPlane.Distro.K8S.Scheduler.Enabled = true + } else if distro == config.K3SDistro { + newConfig.ControlPlane.Advanced.VirtualScheduler.Enabled = true + } } else if value == "false" { + newConfig.ControlPlane.Distro.K8S.Scheduler.Enabled = false newConfig.ControlPlane.Advanced.VirtualScheduler.Enabled = false } case "disable-fake-kubelets": @@ -1012,13 +993,13 @@ func migrateFlag(key, value string, newConfig *config.Config) error { } case "multi-namespace-mode": if value == "" || value == "true" { - newConfig.Experimental.MultiNamespaceMode.Enabled = true + newConfig.Sync.ToHost.Namespaces.Enabled = true } case "namespace-labels": if value == "" { return fmt.Errorf("value is missing") } - newConfig.Experimental.MultiNamespaceMode.NamespaceLabels = mergeIntoMap(newConfig.Experimental.MultiNamespaceMode.NamespaceLabels, strings.Split(value, ",")) + newConfig.Sync.ToHost.Namespaces.ExtraLabels = mergeIntoMap(newConfig.Sync.ToHost.Namespaces.ExtraLabels, strings.Split(value, ",")) case "sync-all-configmaps": if value == "" || value == "true" { newConfig.Sync.ToHost.ConfigMaps.All = true diff --git a/vendor/github.com/loft-sh/vcluster/config/values.yaml b/vendor/github.com/loft-sh/vcluster/config/values.yaml index 285fc7d8..8bd41e5d 100644 --- a/vendor/github.com/loft-sh/vcluster/config/values.yaml +++ b/vendor/github.com/loft-sh/vcluster/config/values.yaml @@ -19,6 +19,9 @@ sync: enabled: true translateImage: {} enforceTolerations: [] + hybridScheduling: + enabled: false + hostSchedulers: [] useSecretsForSATokens: false runtimeClassName: "" priorityClassName: "" @@ -51,6 +54,9 @@ sync: enabled: false persistentVolumes: enabled: false + namespaces: + enabled: false + mappingsOnly: false fromHost: events: @@ -96,7 +102,7 @@ controlPlane: image: registry: ghcr.io repository: "loft-sh/kubernetes" - tag: "v1.32.1" + tag: "v1.32.8" apiServer: enabled: true command: [] @@ -106,6 +112,7 @@ controlPlane: command: [] extraArgs: [] scheduler: + enabled: false command: [] extraArgs: [] env: [] @@ -126,26 +133,7 @@ controlPlane: image: registry: "" repository: "rancher/k3s" - tag: "v1.32.1-k3s1" - securityContext: {} - resources: - limits: - cpu: 100m - memory: 256Mi - requests: - cpu: 40m - memory: 64Mi - - k0s: - enabled: false - config: "" - command: [] - extraArgs: [] - imagePullPolicy: "" - image: - registry: "" - repository: "k0sproject/k0s" - tag: "v1.30.2-k0s.0" + tag: "v1.32.7-k3s1" securityContext: {} resources: limits: @@ -159,6 +147,7 @@ controlPlane: database: embedded: enabled: false + extraArgs: [] external: enabled: false dataSource: "" @@ -166,10 +155,12 @@ controlPlane: certFile: "" keyFile: "" caFile: "" + extraArgs: [] etcd: embedded: enabled: false migrateFromDeployedEtcd: false + extraArgs: [] external: enabled: false endpoint: "" @@ -237,6 +228,9 @@ controlPlane: overwriteManifests: "" overwriteConfig: "" priorityClassName: "" + security: + podSecurityContext: {} + containerSecurityContext: {} service: annotations: {} labels: {} @@ -289,6 +283,14 @@ controlPlane: spec: tls: [] + standalone: + dataDir: "/var/lib/vcluster" + bundleRepository: "https://github.com/loft-sh/kubernetes/releases/download" + joinNode: + enabled: true + containerd: + enabled: true + statefulSet: labels: {} annotations: {} @@ -357,10 +359,20 @@ controlPlane: probes: livenessProbe: enabled: true + failureThreshold: 60 + initialDelaySeconds: 60 + timeoutSeconds: 3 + periodSeconds: 2 readinessProbe: enabled: true + failureThreshold: 60 + timeoutSeconds: 3 + periodSeconds: 2 startupProbe: enabled: true + failureThreshold: 300 + timeoutSeconds: 3 + periodSeconds: 6 serviceMonitor: enabled: false @@ -391,9 +403,63 @@ controlPlane: labels: {} annotations: {} + konnectivity: + server: + enabled: true + extraArgs: [] + agent: + enabled: true + replicas: 1 + image: "" + imagePullPolicy: "" + nodeSelector: {} + tolerations: [] + extraEnv: [] + extraArgs: [] + + registry: + enabled: false + anonymousPull: true + config: {} + globalMetadata: annotations: {} +privateNodes: + enabled: false + importNodeBinaries: true + autoUpgrade: + enabled: true + concurrency: 1 + joinNode: + containerd: + enabled: true + +deploy: + localPathProvisioner: + enabled: true + cni: + flannel: + enabled: true + kubeProxy: + enabled: true + image: "" + imagePullPolicy: "" + nodeSelector: {} + tolerations: [] + extraEnv: [] + extraArgs: [] + metallb: + enabled: false + ipAddressPool: + addresses: [] + l2Advertisement: true + ingressNginx: + enabled: false + defaultIngressClass: true + metricsServer: + enabled: false + integrations: metricsServer: enabled: false @@ -464,6 +530,7 @@ rbac: extraRules: [] networking: + podCIDR: "10.244.0.0/16" replicateServices: toHost: [] fromHost: [] @@ -554,12 +621,7 @@ external: {} plugins: {} experimental: - multiNamespaceMode: - enabled: false - syncSettings: - disableSync: false - rewriteKubernetesService: false targetNamespace: "" setOwner: true @@ -583,3 +645,6 @@ experimental: telemetry: enabled: true + +logging: + encoding: console \ No newline at end of file diff --git a/vendor/github.com/loft-sh/vcluster/pkg/config/config.go b/vendor/github.com/loft-sh/vcluster/pkg/config/config.go index 3111262c..63a524c8 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/config/config.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/config/config.go @@ -5,6 +5,7 @@ import ( "github.com/loft-sh/vcluster/config" "github.com/loft-sh/vcluster/config/legacyconfig" + "github.com/loft-sh/vcluster/pkg/constants" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/discovery" @@ -64,21 +65,13 @@ func (v VirtualClusterConfig) VirtualClusterKubeConfig() config.VirtualClusterKu ClientCACert: "/data/server/tls/client-ca.crt", RequestHeaderCACert: "/data/server/tls/request-header-ca.crt", } - case config.K0SDistro: - distroConfig = config.VirtualClusterKubeConfig{ - KubeConfig: "/data/k0s/pki/admin.conf", - ServerCAKey: "/data/k0s/pki/ca.key", - ServerCACert: "/data/k0s/pki/ca.crt", - ClientCACert: "/data/k0s/pki/ca.crt", - RequestHeaderCACert: "/data/k0s/pki/front-proxy-ca.crt", - } case config.K8SDistro: distroConfig = config.VirtualClusterKubeConfig{ - KubeConfig: "/data/pki/admin.conf", - ServerCAKey: "/data/pki/server-ca.key", - ServerCACert: "/data/pki/server-ca.crt", - ClientCACert: "/data/pki/client-ca.crt", - RequestHeaderCACert: "/data/pki/front-proxy-ca.crt", + KubeConfig: constants.AdminKubeConfig, + ServerCAKey: constants.ServerCAKey, + ServerCACert: constants.ServerCACert, + ClientCACert: constants.ClientCACert, + RequestHeaderCACert: constants.RequestHeaderCACert, } } @@ -125,14 +118,12 @@ func (v VirtualClusterConfig) LegacyOptions() (*legacyconfig.LegacyVirtualCluste legacyOptions := &legacyconfig.LegacyVirtualClusterOptions{ ProOptions: legacyconfig.LegacyVirtualClusterProOptions{ - RemoteKubeConfig: v.Experimental.IsolatedControlPlane.KubeConfig, - RemoteNamespace: v.Experimental.IsolatedControlPlane.Namespace, - RemoteServiceName: v.Experimental.IsolatedControlPlane.Service, - IntegratedCoredns: v.ControlPlane.CoreDNS.Embedded, - EtcdReplicas: int(v.ControlPlane.StatefulSet.HighAvailability.Replicas), - EtcdEmbedded: v.ControlPlane.BackingStore.Etcd.Embedded.Enabled, - NoopSyncer: !v.Experimental.SyncSettings.DisableSync, - SyncKubernetesService: v.Experimental.SyncSettings.RewriteKubernetesService, + RemoteKubeConfig: v.Experimental.IsolatedControlPlane.KubeConfig, + RemoteNamespace: v.Experimental.IsolatedControlPlane.Namespace, + RemoteServiceName: v.Experimental.IsolatedControlPlane.Service, + IntegratedCoredns: v.ControlPlane.CoreDNS.Embedded, + EtcdReplicas: int(v.ControlPlane.StatefulSet.HighAvailability.Replicas), + EtcdEmbedded: v.ControlPlane.BackingStore.Etcd.Embedded.Enabled, }, ServerCaCert: v.VirtualClusterKubeConfig().ServerCACert, ServerCaKey: v.VirtualClusterKubeConfig().ServerCAKey, @@ -148,7 +139,7 @@ func (v VirtualClusterConfig) LegacyOptions() (*legacyconfig.LegacyVirtualCluste ServiceName: v.WorkloadService, SetOwner: v.Experimental.SyncSettings.SetOwner, SyncAllNodes: v.Sync.FromHost.Nodes.Selector.All, - EnableScheduler: v.ControlPlane.Advanced.VirtualScheduler.Enabled, + EnableScheduler: v.IsVirtualSchedulerEnabled(), DisableFakeKubelets: !v.Networking.Advanced.ProxyKubelets.ByIP && !v.Networking.Advanced.ProxyKubelets.ByHostname, FakeKubeletIPs: v.Networking.Advanced.ProxyKubelets.ByIP, ClearNodeImages: v.Sync.FromHost.Nodes.ClearImageStatus, @@ -170,7 +161,7 @@ func (v VirtualClusterConfig) LegacyOptions() (*legacyconfig.LegacyVirtualCluste MountPhysicalHostPaths: false, HostMetricsBindAddress: "0", VirtualMetricsBindAddress: "0", - MultiNamespaceMode: v.Experimental.MultiNamespaceMode.Enabled, + MultiNamespaceMode: v.Sync.ToHost.Namespaces.Enabled, SyncAllSecrets: v.Sync.ToHost.Secrets.All, SyncAllConfigMaps: v.Sync.ToHost.ConfigMaps.All, ProxyMetricsServer: v.Integrations.MetricsServer.Enabled, @@ -221,6 +212,11 @@ func (v VirtualClusterConfig) DisableMissingAPIs(discoveryClient discovery.Disco return nil } +// SchedulingInVirtualClusterEnabled returns true if the virtual scheduler or the hybrid scheduling is enabled. +func (v VirtualClusterConfig) SchedulingInVirtualClusterEnabled() bool { + return v.IsVirtualSchedulerEnabled() || v.Sync.ToHost.Pods.HybridScheduling.Enabled +} + func findResource(resources *metav1.APIResourceList, resourcePlural string) bool { if resources != nil { for _, r := range resources.APIResources { diff --git a/vendor/github.com/loft-sh/vcluster/pkg/config/lint.go b/vendor/github.com/loft-sh/vcluster/pkg/config/lint.go new file mode 100644 index 00000000..6cd2da58 --- /dev/null +++ b/vendor/github.com/loft-sh/vcluster/pkg/config/lint.go @@ -0,0 +1,28 @@ +package config + +import ( + "github.com/loft-sh/vcluster/config" +) + +const ( + // HybridSchedulingNoEffectWarning is displayed when both the virtual scheduler and the hybrid + // scheduling are enabled, but no host schedulers have been added. + HybridSchedulingNoEffectWarning = "You have enabled both the virtual scheduler and the hybrid scheduling, " + + "but you have not added any host scheduler to sync.toHost.pods.hybridScheduling.hostSchedulers config, " + + "so all the pods will be scheduled by the default scheduler in the virtual cluster. Enabling " + + "the hybrid scheduling does not have any effect here. Consider either adding at least one host " + + "scheduler to sync.toHost.pods.hybridScheduling.hostSchedulers, or disable the hybrid scheduling." +) + +// Lint checks the virtual cluster config and returns warnings for the parts of the config +// that should be probably corrected, but are not breaking any functionality in the cluster. +func Lint(config config.Config) []string { + var warnings []string + if config.IsVirtualSchedulerEnabled() && + config.Sync.ToHost.Pods.HybridScheduling.Enabled && + len(config.Sync.ToHost.Pods.HybridScheduling.HostSchedulers) == 0 { + warnings = append(warnings, HybridSchedulingNoEffectWarning) + } + + return warnings +} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/config/parse.go b/vendor/github.com/loft-sh/vcluster/pkg/config/parse.go index b0d7c0a1..100263ab 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/config/parse.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/config/parse.go @@ -8,6 +8,7 @@ import ( "github.com/loft-sh/vcluster/config" "github.com/loft-sh/vcluster/pkg/constants" "github.com/loft-sh/vcluster/pkg/strvals" + "github.com/loft-sh/vcluster/pkg/util/loghelper" "github.com/loft-sh/vcluster/pkg/util/stringutil" "github.com/pkg/errors" "sigs.k8s.io/controller-runtime/pkg/cache" @@ -53,6 +54,12 @@ func ParseConfig(path, name string, setValues []string) (*VirtualClusterConfig, return nil, err } + configLogger := loghelper.New("config") + warnings := Lint(retConfig.Config) + for _, warning := range warnings { + configLogger.Infof("Warning: %s", warning) + } + return retConfig, nil } diff --git a/vendor/github.com/loft-sh/vcluster/pkg/config/validation.go b/vendor/github.com/loft-sh/vcluster/pkg/config/validation.go index 88562a59..1da87ac1 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/config/validation.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/config/validation.go @@ -4,6 +4,7 @@ import ( "crypto/x509" "errors" "fmt" + "net" "net/url" "slices" "strings" @@ -14,6 +15,7 @@ import ( "github.com/loft-sh/vcluster/config" "github.com/loft-sh/vcluster/pkg/constants" + "github.com/loft-sh/vcluster/pkg/util/namespaces" "github.com/loft-sh/vcluster/pkg/util/toleration" ) @@ -40,12 +42,12 @@ func ValidateConfigAndSetDefaults(vConfig *VirtualClusterConfig) error { } // check if enable scheduler works correctly - if vConfig.ControlPlane.Advanced.VirtualScheduler.Enabled && !vConfig.Sync.FromHost.Nodes.Selector.All && len(vConfig.Sync.FromHost.Nodes.Selector.Labels) == 0 { + if vConfig.SchedulingInVirtualClusterEnabled() && !vConfig.Sync.FromHost.Nodes.Selector.All && len(vConfig.Sync.FromHost.Nodes.Selector.Labels) == 0 { vConfig.Sync.FromHost.Nodes.Selector.All = true } // enable additional controllers required for scheduling with storage - if vConfig.ControlPlane.Advanced.VirtualScheduler.Enabled && vConfig.Sync.ToHost.PersistentVolumeClaims.Enabled { + if vConfig.SchedulingInVirtualClusterEnabled() && vConfig.Sync.ToHost.PersistentVolumeClaims.Enabled { if vConfig.Sync.FromHost.CSINodes.Enabled == "auto" { vConfig.Sync.FromHost.CSINodes.Enabled = "true" } @@ -112,8 +114,8 @@ func ValidateConfigAndSetDefaults(vConfig *VirtualClusterConfig) error { } // check if nodes controller needs to be enabled - if vConfig.ControlPlane.Advanced.VirtualScheduler.Enabled && !vConfig.Sync.FromHost.Nodes.Enabled { - return errors.New("sync.fromHost.nodes.enabled is false, but required if using virtual scheduler") + if vConfig.SchedulingInVirtualClusterEnabled() && !vConfig.Sync.FromHost.Nodes.Enabled { + return errors.New("sync.fromHost.nodes.enabled is false, but required if using hybrid scheduling or virtual scheduler") } // check if storage classes and host storage classes are enabled at the same time @@ -151,11 +153,6 @@ func ValidateConfigAndSetDefaults(vConfig *VirtualClusterConfig) error { return err } - err = validateK0sAndNoExperimentalKubeconfig(vConfig) - if err != nil { - return err - } - // check deny proxy requests for _, c := range vConfig.Experimental.DenyProxyRequests { err := validateCheck(c) @@ -181,6 +178,23 @@ func ValidateConfigAndSetDefaults(vConfig *VirtualClusterConfig) error { return err } + if isUsingOldGenericSync(vConfig.Experimental.GenericSync) && vConfig.Sync.ToHost.Namespaces.Enabled { + return errors.New("experimental.genericSync.imports is not allowed when using sync.toHost.namespaces") + } + + // sync.toHost.namespaces validation + err = namespaces.ValidateNamespaceSyncConfig(&vConfig.Config, vConfig.Name, vConfig.ControlPlaneNamespace) + if err != nil { + return fmt.Errorf("namespace sync: %w", err) + } + + // if we're runnign in with namespace sync enabled, we want to sync all objects. + // otherwise, objects created on host in synced namespaces won't get imported into vCluster. + if vConfig.Sync.ToHost.Namespaces.Enabled { + vConfig.Sync.ToHost.Secrets.All = true + vConfig.Sync.ToHost.ConfigMaps.All = true + } + // set service name if vConfig.ControlPlane.Advanced.WorkloadServiceAccount.Name == "" { vConfig.ControlPlane.Advanced.WorkloadServiceAccount.Name = "vc-workload-" + vConfig.Name @@ -198,6 +212,18 @@ func ValidateConfigAndSetDefaults(vConfig *VirtualClusterConfig) error { return err } + // validate dedicated nodes mode + err = validatePrivatedNodesMode(vConfig) + if err != nil { + return err + } + + // validate sync.fromHost classes + err = ValidateSyncFromHostClasses(vConfig.Config.Sync.FromHost) + if err != nil { + return err + } + return nil } @@ -217,6 +243,7 @@ func ValidateAllSyncPatches(sync config.Sync) error { {"sync.toHost.pods", sync.ToHost.Pods.Patches}, {"sync.toHost.serviceAccounts", sync.ToHost.ServiceAccounts.Patches}, {"sync.toHost.ingresses", sync.ToHost.Ingresses.Patches}, + {"sync.toHost.namespaces", sync.ToHost.Namespaces.Patches}, {"sync.toHost.networkPolicies", sync.ToHost.NetworkPolicies.Patches}, {"sync.toHost.persistentVolumeClaims", sync.ToHost.PersistentVolumeClaims.Patches}, {"sync.toHost.persistentVolumes", sync.ToHost.PersistentVolumes.Patches}, @@ -271,14 +298,33 @@ func validatePatches(patchesValidation ...patchesValidation) error { return nil } +func ValidateSyncFromHostClasses(fromHost config.SyncFromHost) error { + errorFn := func(sls config.StandardLabelSelector, path string) error { + if _, err := sls.ToSelector(); err != nil { + return fmt.Errorf("invalid sync.fromHost.%s.selector: %w", path, err) + } + return nil + } + if err := errorFn(fromHost.RuntimeClasses.Selector, "runtimeClasses"); err != nil { + return err + } + if err := errorFn(fromHost.IngressClasses.Selector, "ingressClasses"); err != nil { + return err + } + if err := errorFn(fromHost.PriorityClasses.Selector, "priorityClasses"); err != nil { + return err + } + if err := errorFn(fromHost.StorageClasses.Selector, "storageClasses"); err != nil { + return err + } + return nil +} + func validateDistro(config *VirtualClusterConfig) error { enabledDistros := 0 if config.ControlPlane.Distro.K3S.Enabled { enabledDistros++ } - if config.ControlPlane.Distro.K0S.Enabled { - enabledDistros++ - } if config.ControlPlane.Distro.K8S.Enabled { enabledDistros++ } @@ -604,16 +650,9 @@ func validateWildcardOrAny(values []string) error { return nil } -func validateK0sAndNoExperimentalKubeconfig(c *VirtualClusterConfig) error { - if c.Distro() != config.K0SDistro { - return nil - } - virtualclusterconfig := c.Experimental.VirtualClusterKubeConfig - empty := config.VirtualClusterKubeConfig{} - if virtualclusterconfig != empty { - return errors.New("config.experimental.VirtualClusterConfig cannot be set for k0s") - } - return nil +func isUsingOldGenericSync(genericSync config.ExperimentalGenericSync) bool { + return len(genericSync.Exports) > 0 || len(genericSync.Imports) > 0 || + (genericSync.Hooks != nil && (len(genericSync.Hooks.HostToVirtual) > 0 || len(genericSync.Hooks.VirtualToHost) > 0)) } func validateFromHostSyncMappings(s config.EnableSwitchWithResourcesMappings, resourceNamePlural string) error { @@ -835,6 +874,68 @@ func isIn(crdName string, s ...string) bool { return slices.Contains(s, crdName) } +func validatePrivatedNodesMode(vConfig *VirtualClusterConfig) error { + if !vConfig.PrivateNodes.Enabled { + if vConfig.ControlPlane.Endpoint != "" { + return fmt.Errorf("endpoint is only supported in private nodes mode") + } + + return nil + } + + // validate endpoint + if vConfig.ControlPlane.Endpoint != "" { + _, _, err := net.SplitHostPort(vConfig.ControlPlane.Endpoint) + if err != nil { + return fmt.Errorf("invalid endpoint %s: %w", vConfig.ControlPlane.Endpoint, err) + } + } + + // integrations are not supported in private nodes mode + if vConfig.Integrations.MetricsServer.Enabled { + return fmt.Errorf("metrics-server integration is not supported in private nodes mode") + } + if vConfig.Integrations.CertManager.Enabled { + return fmt.Errorf("cert-manager integration is not supported in private nodes mode") + } + if vConfig.Integrations.ExternalSecrets.Enabled { + return fmt.Errorf("external-secrets integration is not supported in private nodes mode") + } + if vConfig.Integrations.Istio.Enabled { + return fmt.Errorf("istio integration is not supported in private nodes mode") + } + if vConfig.Integrations.KubeVirt.Enabled { + return fmt.Errorf("kubevirt integration is not supported in private nodes mode") + } + + // embedded coredns is not supported in private nodes mode + if vConfig.ControlPlane.CoreDNS.Embedded { + return fmt.Errorf("coredns is not supported in private nodes mode") + } + + // host path mapper is not supported in private nodes mode + if vConfig.ControlPlane.HostPathMapper.Enabled { + return fmt.Errorf("host path mapper is not supported in private nodes mode") + } + + // multi-namespace mode is not supported in private nodes mode + if vConfig.Sync.ToHost.Namespaces.Enabled { + return fmt.Errorf("multi-namespace mode is not supported in private nodes mode") + } + + // isolated control plane is not supported in dedicated mode + if vConfig.Experimental.IsolatedControlPlane.Enabled { + return fmt.Errorf("isolated control plane is not supported in private nodes mode") + } + + // dedicated mode is only supported for kubernetes distro + if vConfig.Distro() != config.K8SDistro { + return fmt.Errorf("private nodes mode is only supported for kubernetes") + } + + return nil +} + var ProValidateConfig = func(_ *VirtualClusterConfig) error { return nil } diff --git a/vendor/github.com/loft-sh/vcluster/pkg/constants/annotation.go b/vendor/github.com/loft-sh/vcluster/pkg/constants/annotation.go index 66c23f6e..9d65cd70 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/constants/annotation.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/constants/annotation.go @@ -16,6 +16,13 @@ const ( // KubeletPort is the port we pretend the kubelet is running under KubeletPort = int32(10250) + + // 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 specifies if we should use insecure connection for this cluster + LoftDirectClusterEndpointInsecure = "loft.sh/direct-cluster-endpoint-insecure" ) func PausedAnnotation(isRestore bool) string { diff --git a/vendor/github.com/loft-sh/vcluster/pkg/constants/cli.go b/vendor/github.com/loft-sh/vcluster/pkg/constants/cli.go new file mode 100644 index 00000000..6bd5981c --- /dev/null +++ b/vendor/github.com/loft-sh/vcluster/pkg/constants/cli.go @@ -0,0 +1,27 @@ +package constants + +import ( + "os" + + "github.com/loft-sh/vcluster/pkg/upgrade" +) + +const ( + TokenLabelKey = "vcluster.loft.sh/token" + TokenNodeTypeKey = "vcluster.loft.sh/token-node-type" + NodeTypeControlPlane = "control-plane" + NodeTypeWorker = "worker" +) + +func DefaultBackgroundProxyImage(version string) string { + envProxyImage := os.Getenv("VCLUSTER_BACKGROUND_PROXY_IMAGE") + if envProxyImage != "" { + return envProxyImage + } + + if version == upgrade.DevelopmentVersion { + return "ghcr.io/loft-sh/vcluster:dev-next" + } + + return "ghcr.io/loft-sh/vcluster-pro:" + version +} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/constants/constants.go b/vendor/github.com/loft-sh/vcluster/pkg/constants/constants.go index 9fe0d961..24ab3367 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/constants/constants.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/constants/constants.go @@ -1,17 +1,56 @@ package constants -const ( - K8sKineEndpoint = "unix:///data/kine.sock" - K3sKineEndpoint = "unix:///data/server/kine.sock" - K0sKineEndpoint = "unix:///run/k0s/kine/kine.sock:2379" +import "path/filepath" - K8sSqliteDatabase = "/data/state.db" +var ( + K3sKineEndpoint = "unix:///data/server/kine.sock" K3sSqliteDatabase = "/data/server/db/state.db" + DataDir = "/data" + PKIDir = filepath.Join(DataDir, "pki") + + K8sKineEndpoint = "unix://" + filepath.Join(DataDir, "kine.sock") + K8sSqliteDatabase = filepath.Join(DataDir, "state.db") + + EmbeddedEtcdData = filepath.Join(DataDir, "etcd") + EmbeddedCoreDNSAdminConf = filepath.Join(DataDir, "vcluster", "admin.conf") + + ServerCAKey = filepath.Join(PKIDir, "server-ca.key") + ServerCACert = filepath.Join(PKIDir, "server-ca.crt") + ClientCACert = filepath.Join(PKIDir, "client-ca.crt") + RequestHeaderCACert = filepath.Join(PKIDir, "front-proxy-ca.crt") + + FrontProxyClientCert = filepath.Join(PKIDir, "front-proxy-client.crt") + FrontProxyClientKey = filepath.Join(PKIDir, "front-proxy-client.key") + + SAKey = filepath.Join(PKIDir, "sa.key") + SACert = filepath.Join(PKIDir, "sa.pub") + + APIServerCert = filepath.Join(PKIDir, "apiserver.crt") + APIServerKey = filepath.Join(PKIDir, "apiserver.key") + + APIServerKubeletClientCert = filepath.Join(PKIDir, "apiserver-kubelet-client.crt") + APIServerKubeletClientKey = filepath.Join(PKIDir, "apiserver-kubelet-client.key") + + AdminKubeConfig = filepath.Join(PKIDir, "admin.conf") + ControllerManagerConf = filepath.Join(PKIDir, "controller-manager.conf") + SchedulerConf = filepath.Join(PKIDir, "scheduler.conf") + + BinariesDir = "/binaries" + K8sAPIServerBinary = filepath.Join(BinariesDir, "kube-apiserver") + K8sControllerManagerBinary = filepath.Join(BinariesDir, "kube-controller-manager") + K8sSchedulerBinary = filepath.Join(BinariesDir, "kube-scheduler") + KineBinary = "/usr/local/bin/kine" + // DefaultVClusterConfigLocation is the default location of the vCluster config within the container - DefaultVClusterConfigLocation = "/var/vcluster/config.yaml" + DefaultVClusterConfigLocation = "/var/lib/vcluster/config.yaml" // VClusterNamespaceInHostMappingSpecialCharacter is an empty string that mean vCluster host namespace // in the config.sync.fromHost.*.selector.mappings VClusterNamespaceInHostMappingSpecialCharacter = "" + + SystemPriorityClassesAllowList = []string{ + "system-node-critical", + "system-cluster-critical", + } ) diff --git a/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/namespaces/syncer.go b/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/namespaces/syncer.go deleted file mode 100644 index 42789ca5..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/namespaces/syncer.go +++ /dev/null @@ -1,115 +0,0 @@ -package namespaces - -import ( - "fmt" - - "github.com/loft-sh/vcluster/pkg/mappings" - "github.com/loft-sh/vcluster/pkg/patcher" - "github.com/loft-sh/vcluster/pkg/syncer" - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - "github.com/loft-sh/vcluster/pkg/syncer/translator" - syncertypes "github.com/loft-sh/vcluster/pkg/syncer/types" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - utilerrors "k8s.io/apimachinery/pkg/util/errors" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" -) - -// Unsafe annotations based on the docs here: -// https://kubernetes.io/docs/reference/labels-annotations-taints/ -var excludedAnnotations = []string{ - "scheduler.alpha.kubernetes.io/node-selector", - "scheduler.alpha.kubernetes.io/defaultTolerations", -} - -const ( - VClusterNameAnnotation = "vcluster.loft.sh/vcluster-name" - VClusterNamespaceAnnotation = "vcluster.loft.sh/vcluster-namespace" -) - -func New(ctx *synccontext.RegisterContext) (syncertypes.Object, error) { - mapper, err := ctx.Mappings.ByGVK(mappings.Namespaces()) - if err != nil { - return nil, err - } - - namespaceLabels := map[string]string{} - for k, v := range ctx.Config.Experimental.MultiNamespaceMode.NamespaceLabels { - namespaceLabels[k] = v - } - namespaceLabels[VClusterNameAnnotation] = ctx.Config.Name - namespaceLabels[VClusterNamespaceAnnotation] = ctx.CurrentNamespace - - return &namespaceSyncer{ - GenericTranslator: translator.NewGenericTranslator(ctx, "namespace", &corev1.Namespace{}, mapper), - workloadServiceAccountName: ctx.Config.ControlPlane.Advanced.WorkloadServiceAccount.Name, - - excludedAnnotations: excludedAnnotations, - - namespaceLabels: namespaceLabels, - }, nil -} - -type namespaceSyncer struct { - syncertypes.GenericTranslator - - namespaceLabels map[string]string - workloadServiceAccountName string - excludedAnnotations []string -} - -var _ syncertypes.Syncer = &namespaceSyncer{} - -func (s *namespaceSyncer) Syncer() syncertypes.Sync[client.Object] { - return syncer.ToGenericSyncer(s) -} - -func (s *namespaceSyncer) SyncToHost(ctx *synccontext.SyncContext, event *synccontext.SyncToHostEvent[*corev1.Namespace]) (ctrl.Result, error) { - newNamespace := s.translate(ctx, event.Virtual) - ctx.Log.Infof("create physical namespace %s", newNamespace.Name) - err := ctx.PhysicalClient.Create(ctx, newNamespace) - if err != nil { - ctx.Log.Infof("error syncing %s to physical cluster: %v", event.Virtual.Name, err) - return ctrl.Result{}, err - } - - return ctrl.Result{}, s.EnsureWorkloadServiceAccount(ctx, newNamespace.Name) -} - -func (s *namespaceSyncer) Sync(ctx *synccontext.SyncContext, event *synccontext.SyncEvent[*corev1.Namespace]) (_ ctrl.Result, retErr error) { - patch, err := patcher.NewSyncerPatcher(ctx, event.Host, event.Virtual) - if err != nil { - return ctrl.Result{}, fmt.Errorf("new syncer patcher: %w", err) - } - - defer func() { - if err := patch.Patch(ctx, event.Host, event.Virtual); err != nil { - retErr = utilerrors.NewAggregate([]error{retErr, err}) - } - }() - - s.translateUpdate(event.Host, event.Virtual) - return ctrl.Result{}, s.EnsureWorkloadServiceAccount(ctx, event.Host.Name) -} - -func (s *namespaceSyncer) SyncToVirtual(ctx *synccontext.SyncContext, event *synccontext.SyncToVirtualEvent[*corev1.Namespace]) (_ ctrl.Result, retErr error) { - // virtual object is not here anymore, so we delete - return patcher.DeleteHostObject(ctx, event.Host, nil, "virtual object was deleted") -} - -func (s *namespaceSyncer) EnsureWorkloadServiceAccount(ctx *synccontext.SyncContext, pNamespace string) error { - if s.workloadServiceAccountName == "" { - return nil - } - - svc := &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: pNamespace, - Name: s.workloadServiceAccountName, - }, - } - _, err := controllerutil.CreateOrPatch(ctx, ctx.PhysicalClient, svc, func() error { return nil }) - return err -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/namespaces/translate.go b/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/namespaces/translate.go deleted file mode 100644 index 1a551a24..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/namespaces/translate.go +++ /dev/null @@ -1,40 +0,0 @@ -package namespaces - -import ( - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - "github.com/loft-sh/vcluster/pkg/util/translate" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -func (s *namespaceSyncer) translate(ctx *synccontext.SyncContext, vObj client.Object) *corev1.Namespace { - newNamespace := translate.HostMetadata(vObj.(*corev1.Namespace), s.VirtualToHost(ctx, types.NamespacedName{Name: vObj.GetName()}, vObj), s.excludedAnnotations...) - if newNamespace.Labels == nil { - newNamespace.Labels = map[string]string{} - } - - // add user defined namespace labels - for k, v := range s.namespaceLabels { - newNamespace.Labels[k] = v - } - - return newNamespace -} - -func (s *namespaceSyncer) translateUpdate(pObj, vObj *corev1.Namespace) { - pObj.Annotations = translate.HostAnnotations(vObj, pObj, s.excludedAnnotations...) - updatedLabels := translate.HostLabels(vObj, pObj) - if updatedLabels == nil { - updatedLabels = map[string]string{} - } - - // add user defined namespace labels - for k, v := range s.namespaceLabels { - updatedLabels[k] = v - } - - // set the kubernetes.io/metadata.name label - updatedLabels[corev1.LabelMetadataName] = pObj.Name - pObj.Labels = updatedLabels -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/pods/scheduling/config.go b/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/pods/scheduling/config.go new file mode 100644 index 00000000..1eea6c19 --- /dev/null +++ b/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/pods/scheduling/config.go @@ -0,0 +1,34 @@ +package scheduling + +import ( + "github.com/loft-sh/admin-apis/pkg/licenseapi" + "github.com/loft-sh/vcluster/pkg/pro" +) + +type Config struct { + VirtualSchedulerEnabled bool + HybridSchedulingEnabled bool + HostSchedulers []string +} + +// NewConfig creates a new scheduling config with specified vCluster scheduling options. In the case of vcluster OSS +// when Hybrid Scheduling is enabled, this func returns an error, because Hybrid Scheduling is a Pro-only feature. +var NewConfig = func(virtualSchedulerEnabled, hybridSchedulingEnabled bool, _ []string) (Config, error) { + if hybridSchedulingEnabled { + return Config{}, pro.NewFeatureError(string(licenseapi.HybridScheduling)) + } + + return Config{ + VirtualSchedulerEnabled: virtualSchedulerEnabled, + }, nil +} + +// IsSchedulerFromVirtualCluster checks if the pod uses a scheduler from the virtual cluster. +func (c *Config) IsSchedulerFromVirtualCluster(schedulerName string) bool { + return IsSchedulerFromVirtualCluster(schedulerName, c.VirtualSchedulerEnabled, c.HybridSchedulingEnabled, c.HostSchedulers) +} + +// IsSchedulerFromVirtualCluster checks if the pod uses a scheduler from the virtual cluster. +var IsSchedulerFromVirtualCluster = func(_ string, virtualSchedulerEnabled, _ bool, _ []string) bool { + return virtualSchedulerEnabled +} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/pods/translate/translator.go b/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/pods/translate/translator.go index ae903efc..87b7708c 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/pods/translate/translator.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/controllers/resources/pods/translate/translator.go @@ -10,6 +10,7 @@ import ( "strconv" "strings" + "github.com/loft-sh/vcluster/pkg/controllers/resources/pods/scheduling" satoken "github.com/loft-sh/vcluster/pkg/controllers/resources/pods/token" "github.com/loft-sh/vcluster/pkg/mappings" "github.com/loft-sh/vcluster/pkg/syncer/synccontext" @@ -83,6 +84,14 @@ func NewTranslator(ctx *synccontext.RegisterContext, eventRecorder record.EventR return nil, fmt.Errorf("parse init container resource requests: %w", err) } + schedulingConfig, err := scheduling.NewConfig( + ctx.Config.IsVirtualSchedulerEnabled(), + ctx.Config.Sync.ToHost.Pods.HybridScheduling.Enabled, + ctx.Config.Sync.ToHost.Pods.HybridScheduling.HostSchedulers) + if err != nil { + return nil, fmt.Errorf("failed to create scheduling config: %w", err) + } + return &translator{ vClientConfig: ctx.VirtualManager.GetConfig(), vClient: ctx.VirtualManager.GetClient(), @@ -105,7 +114,7 @@ func NewTranslator(ctx *synccontext.RegisterContext, eventRecorder record.EventR serviceAccountsEnabled: ctx.Config.Sync.ToHost.ServiceAccounts.Enabled, hostPriorityClassesSyncEnabled: ctx.Config.Sync.FromHost.PriorityClasses.Enabled, priorityClassesSyncEnabled: ctx.Config.Sync.ToHost.PriorityClasses.Enabled, - enableScheduler: ctx.Config.ControlPlane.Advanced.VirtualScheduler.Enabled, + schedulingConfig: schedulingConfig, fakeKubeletIPs: ctx.Config.Networking.Advanced.ProxyKubelets.ByIP, mountPhysicalHostPaths: ctx.Config.ControlPlane.HostPathMapper.Enabled && !ctx.Config.ControlPlane.HostPathMapper.Central, @@ -138,7 +147,7 @@ type translator struct { overrideHostsResources corev1.ResourceRequirements hostPriorityClassesSyncEnabled bool priorityClassesSyncEnabled bool - enableScheduler bool + schedulingConfig scheduling.Config fakeKubeletIPs bool virtualLogsPath string @@ -350,7 +359,7 @@ func (t *translator) Translate(ctx *synccontext.SyncContext, vPod *corev1.Pod, s } // translate topology spread constraints - if t.enableScheduler { + if t.schedulingConfig.IsSchedulerFromVirtualCluster(pPod.Spec.SchedulerName) { pPod.Spec.TopologySpreadConstraints = nil pPod.Spec.Affinity = nil pPod.Spec.NodeSelector = nil @@ -429,7 +438,7 @@ func (t *translator) translateVolumes(ctx *synccontext.SyncContext, pPod *corev1 } if pPod.Spec.Volumes[i].DownwardAPI != nil { for j := range pPod.Spec.Volumes[i].DownwardAPI.Items { - translateFieldRef(pPod.Spec.Volumes[i].DownwardAPI.Items[j].FieldRef, t.fakeKubeletIPs, t.enableScheduler) + translateFieldRef(pPod.Spec.Volumes[i].DownwardAPI.Items[j].FieldRef, t.fakeKubeletIPs, t.schedulingConfig.IsSchedulerFromVirtualCluster(pPod.Spec.SchedulerName)) } } if pPod.Spec.Volumes[i].ISCSI != nil && pPod.Spec.Volumes[i].ISCSI.SecretRef != nil { @@ -495,7 +504,7 @@ func (t *translator) translateProjectedVolume( } if projectedVolume.Sources[i].DownwardAPI != nil { for j := range projectedVolume.Sources[i].DownwardAPI.Items { - translateFieldRef(projectedVolume.Sources[i].DownwardAPI.Items[j].FieldRef, t.fakeKubeletIPs, t.enableScheduler) + translateFieldRef(projectedVolume.Sources[i].DownwardAPI.Items[j].FieldRef, t.fakeKubeletIPs, t.schedulingConfig.IsSchedulerFromVirtualCluster(pPod.Spec.SchedulerName)) } } if projectedVolume.Sources[i].ServiceAccountToken != nil { @@ -632,7 +641,7 @@ func translateFieldRef(fieldSelector *corev1.ObjectFieldSelector, fakeKubeletIPs func (t *translator) TranslateContainerEnv(ctx *synccontext.SyncContext, envVar []corev1.EnvVar, envFrom []corev1.EnvFromSource, vPod *corev1.Pod, serviceEnvMap map[string]string) ([]corev1.EnvVar, []corev1.EnvFromSource, error) { envNameMap := make(map[string]struct{}) for j, env := range envVar { - translateDownwardAPI(&envVar[j], t.fakeKubeletIPs, t.enableScheduler) + translateDownwardAPI(&envVar[j], t.fakeKubeletIPs, t.schedulingConfig.IsSchedulerFromVirtualCluster(vPod.Spec.SchedulerName)) if env.ValueFrom != nil && env.ValueFrom.ConfigMapKeyRef != nil && env.ValueFrom.ConfigMapKeyRef.Name != "" { envVar[j].ValueFrom.ConfigMapKeyRef.Name = mappings.VirtualToHostName(ctx, envVar[j].ValueFrom.ConfigMapKeyRef.Name, vPod.Namespace, mappings.ConfigMaps()) } diff --git a/vendor/github.com/loft-sh/vcluster/pkg/coredns/coredns.go b/vendor/github.com/loft-sh/vcluster/pkg/coredns/coredns.go index 22d8a3fc..b2d158f1 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/coredns/coredns.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/coredns/coredns.go @@ -1,14 +1,12 @@ package coredns import ( - "bytes" "context" "fmt" "os" - "path" "strings" - "text/template" + "github.com/loft-sh/vcluster/config" "github.com/loft-sh/vcluster/pkg/constants" "github.com/loft-sh/vcluster/pkg/util/applier" "k8s.io/apimachinery/pkg/version" @@ -16,52 +14,36 @@ import ( ) const ( - DefaultImage = "coredns/coredns:1.11.3" - ManifestRelativePath = "coredns/coredns.yaml" - ManifestsOutputFolder = "/tmp/manifests-to-apply" - VarImage = "IMAGE" - VarHostDNS = "HOST_CLUSTER_DNS" - VarRunAsUser = "RUN_AS_USER" - VarRunAsNonRoot = "RUN_AS_NON_ROOT" - VarRunAsGroup = "RUN_AS_GROUP" - VarLogInDebug = "LOG_IN_DEBUG" - defaultUID = int64(1001) - defaultGID = int64(1001) + DefaultImage = "coredns/coredns:1.11.3" + VarImage = "IMAGE" + VarHostDNS = "HOST_CLUSTER_DNS" + VarRunAsUser = "RUN_AS_USER" + VarRunAsNonRoot = "RUN_AS_NON_ROOT" + VarRunAsGroup = "RUN_AS_GROUP" + VarLogInDebug = "LOG_IN_DEBUG" + defaultUID = int64(1001) + defaultGID = int64(1001) ) var ErrNoCoreDNSManifests = fmt.Errorf("no coredns manifests found") -func ApplyManifest(ctx context.Context, defaultImageRegistry string, inClusterConfig *rest.Config, serverVersion *version.Info) error { +func ApplyManifest(ctx context.Context, config *config.Config, defaultImageRegistry string, inClusterConfig *rest.Config, serverVersion *version.Info) error { + if !config.ControlPlane.CoreDNS.Enabled { + return nil + } + + // get the manifest variables vars := getManifestVariables(defaultImageRegistry, serverVersion) - output, err := processManifestTemplate(vars) + + // process the corefile and manifests + output, err := processManifests(vars, config) if err != nil { return err } - // write manifest into a file for easier debugging - if os.Getenv("DEBUG") == "true" { - // create a temporary directory and file to output processed manifest to - debugOutputFile, err := prepareManifestOutput() - if err != nil { - return err - } - defer debugOutputFile.Close() - - _, _ = debugOutputFile.Write(output) - } - return applier.ApplyManifest(ctx, inClusterConfig, output) } -func prepareManifestOutput() (*os.File, error) { - manifestOutputPath := path.Join(ManifestsOutputFolder, ManifestRelativePath) - err := os.MkdirAll(path.Dir(manifestOutputPath), 0755) - if err != nil { - return nil, err - } - return os.Create(manifestOutputPath) -} - func getManifestVariables(defaultImageRegistry string, serverVersion *version.Info) map[string]interface{} { var found bool vars := make(map[string]interface{}) @@ -118,21 +100,3 @@ func GetUserID() int64 { return int64(uid) } - -func processManifestTemplate(vars map[string]interface{}) ([]byte, error) { - manifestInputPath := path.Join("/manifests", ManifestRelativePath) - // check if the manifestInputPath exists - if _, err := os.Stat(manifestInputPath); os.IsNotExist(err) { - return nil, ErrNoCoreDNSManifests - } - manifestTemplate, err := template.ParseFiles(manifestInputPath) - if err != nil { - return nil, fmt.Errorf("unable to parse %s: %w", manifestInputPath, err) - } - buf := new(bytes.Buffer) - err = manifestTemplate.Execute(buf, vars) - if err != nil { - return nil, fmt.Errorf("manifestTemplate.Execute failed for manifest %s: %w", manifestInputPath, err) - } - return buf.Bytes(), nil -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/coredns/template.go b/vendor/github.com/loft-sh/vcluster/pkg/coredns/template.go new file mode 100644 index 00000000..5ca503c8 --- /dev/null +++ b/vendor/github.com/loft-sh/vcluster/pkg/coredns/template.go @@ -0,0 +1,425 @@ +package coredns + +import ( + "bytes" + "encoding/json" + "fmt" + "strings" + "text/template" + + "github.com/loft-sh/vcluster/config" + "sigs.k8s.io/yaml" +) + +const corednsCorefile = `{{- if .Values.controlPlane.coredns.overwriteConfig }} +{{ .Values.controlPlane.coredns.overwriteConfig }} +{{- else }} +.:1053 { + errors + health + ready + {{- if and .Values.controlPlane.coredns.embedded .Values.networking.resolveDNS }} + vcluster + {{- end }} + {{- if .Values.networking.advanced.proxyKubelets.byHostname }} + rewrite name regex .*\.nodes\.vcluster\.com kubernetes.default.svc.cluster.local + {{- end }} + kubernetes{{ if and (.Values.networking.advanced.clusterDomain) (ne .Values.networking.advanced.clusterDomain "cluster.local") }} {{ .Values.networking.advanced.clusterDomain }}{{ end }} cluster.local in-addr.arpa ip6.arpa { + {{- if .Values.controlPlane.coredns.embedded }} + kubeconfig /data/vcluster/admin.conf + {{- end }} + pods insecure + {{- if .Values.networking.advanced.fallbackHostCluster }} + fallthrough cluster.local in-addr.arpa ip6.arpa + {{- else }} + fallthrough in-addr.arpa ip6.arpa + {{- end }} + } + hosts /etc/coredns/NodeHosts { + ttl 60 + reload 15s + fallthrough + } + prometheus :9153 + {{- if .Values.networking.advanced.fallbackHostCluster }} + forward . {{ .HOST_CLUSTER_DNS }} + {{- else if .Values.policies.networkPolicy.enabled }} + forward . /etc/resolv.conf {{ .Values.policies.networkPolicy.fallbackDns }} { + policy sequential + } + {{- else }} + forward . /etc/resolv.conf + {{- end }} + cache 30 + loop + loadbalance +} + +import /etc/coredns/custom/*.server +{{- end }}` + +const corednsManifests = `{{- if .Values.controlPlane.coredns.overwriteManifests }} +{{ .Values.controlPlane.coredns.overwriteManifests }} +{{- else if .Values.controlPlane.coredns.embedded }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: coredns + namespace: kube-system +data: + NodeHosts: "" +--- +apiVersion: v1 +kind: Service +metadata: + name: kube-dns + namespace: kube-system + annotations: + prometheus.io/port: "9153" + prometheus.io/scrape: "true" + {{- if .Values.controlPlane.coredns.service.annotations }} +{{ toYaml .Values.controlPlane.coredns.service.annotations | indent 4 }} + {{- end }} + labels: + k8s-app: vcluster-kube-dns + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- if .Values.controlPlane.coredns.service.labels }} +{{ toYaml .Values.controlPlane.coredns.service.labels | indent 4 }} + {{- end }} +spec: +{{ toYaml .Values.controlPlane.coredns.service.spec | indent 2 }} +{{- if not .Values.controlPlane.coredns.service.spec.ports }} + ports: + - name: dns + port: 53 + targetPort: 1053 + protocol: UDP + - name: dns-tcp + port: 53 + targetPort: 1053 + protocol: TCP + - name: metrics + port: 9153 + protocol: TCP +{{- end }} +{{- else }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: coredns + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + kubernetes.io/bootstrapping: rbac-defaults + name: system:coredns +rules: + - apiGroups: + - "" + resources: + - endpoints + - services + - pods + - namespaces + verbs: + - list + - watch + - apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + annotations: + rbac.authorization.kubernetes.io/autoupdate: "true" + labels: + kubernetes.io/bootstrapping: rbac-defaults + name: system:coredns +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:coredns +subjects: + - kind: ServiceAccount + name: coredns + namespace: kube-system +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: coredns + namespace: kube-system +data: + Corefile: |- +{{ .Corefile | indent 4 }} + NodeHosts: "" +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: coredns + namespace: kube-system + {{- if .Values.controlPlane.coredns.deployment.annotations }} + annotations: +{{ toYaml .Values.controlPlane.coredns.deployment.annotations | indent 4 }} + {{- end }} + labels: + k8s-app: vcluster-kube-dns + kubernetes.io/name: "CoreDNS" + {{- if .Values.controlPlane.coredns.deployment.labels }} +{{ toYaml .Values.controlPlane.coredns.deployment.labels | indent 4 }} + {{- end }} +spec: + replicas: {{ .Values.controlPlane.coredns.deployment.replicas }} + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 + selector: + matchLabels: + k8s-app: vcluster-kube-dns + template: + metadata: + {{- if .Values.controlPlane.coredns.deployment.pods.annotations }} + annotations: +{{ toYaml .Values.controlPlane.coredns.deployment.pods.annotations | indent 8 }} + {{- end }} + labels: + k8s-app: vcluster-kube-dns + {{- if .Values.controlPlane.coredns.deployment.pods.labels }} +{{ toYaml .Values.controlPlane.coredns.deployment.pods.labels | indent 8 }} + {{- end }} + spec: + priorityClassName: "{{ .Values.controlPlane.coredns.priorityClassName }}" + serviceAccountName: coredns + nodeSelector: + kubernetes.io/os: linux + {{- if .Values.controlPlane.coredns.deployment.nodeSelector }} +{{ toYaml .Values.controlPlane.coredns.deployment.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.controlPlane.coredns.deployment.affinity }} + affinity: +{{ toYaml .Values.controlPlane.coredns.deployment.affinity | indent 8 }} + {{- end }} + {{- if .Values.controlPlane.coredns.deployment.tolerations }} + tolerations: +{{ toYaml .Values.controlPlane.coredns.deployment.tolerations | indent 8 }} + {{- end }} + {{- if .Values.controlPlane.coredns.deployment.topologySpreadConstraints }} + topologySpreadConstraints: +{{ toYaml .Values.controlPlane.coredns.deployment.topologySpreadConstraints | indent 8 }} + {{- end }} + {{- if .Values.controlPlane.coredns.security.podSecurityContext }} + securityContext: +{{ toYaml .Values.controlPlane.coredns.security.podSecurityContext | indent 8 }} + {{- else }} + {{- if .Values.policies.podSecurityStandard }} + securityContext: + seccompProfile: + type: RuntimeDefault + {{- end }} + {{- end }} + containers: + - name: coredns + {{- if .Values.controlPlane.coredns.deployment.image }} + {{- if .Values.controlPlane.advanced.defaultImageRegistry }} + image: {{ .Values.controlPlane.advanced.defaultImageRegistry }}/{{ .Values.controlPlane.coredns.deployment.image }} + {{- else }} + image: {{ .Values.controlPlane.coredns.deployment.image }} + {{- end }} + {{- else }} + image: {{ .IMAGE }} + {{- end }} + imagePullPolicy: IfNotPresent + {{- if .Values.controlPlane.coredns.deployment.resources }} + resources: +{{ toYaml .Values.controlPlane.coredns.deployment.resources | indent 12 }} + {{- end }} + args: [ "-conf", "/etc/coredns/Corefile" ] + volumeMounts: + - name: config-volume + mountPath: /etc/coredns + readOnly: true + - name: custom-config-volume + mountPath: /etc/coredns/custom + readOnly: true + {{- if .Values.controlPlane.coredns.security.containerSecurityContext }} + securityContext: +{{ toYaml .Values.controlPlane.coredns.security.containerSecurityContext | indent 12 }} + {{- else }} + securityContext: + runAsNonRoot: true + runAsUser: {{ .RUN_AS_USER }} + runAsGroup: {{ .RUN_AS_GROUP }} + allowPrivilegeEscalation: false + capabilities: + add: + - NET_BIND_SERVICE + drop: + - ALL + readOnlyRootFilesystem: true + {{- end }} + livenessProbe: + httpGet: + path: /health + port: 8080 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /ready + port: 8181 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 2 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + dnsPolicy: Default + volumes: + - name: config-volume + configMap: + name: coredns + items: + - key: Corefile + path: Corefile + - key: NodeHosts + path: NodeHosts + - name: custom-config-volume + configMap: + name: coredns-custom + optional: true +--- +apiVersion: v1 +kind: Service +metadata: + name: kube-dns + namespace: kube-system + annotations: + prometheus.io/port: "9153" + prometheus.io/scrape: "true" + {{- if .Values.controlPlane.coredns.service.annotations }} +{{ toYaml .Values.controlPlane.coredns.service.annotations | indent 4 }} + {{- end }} + labels: + k8s-app: vcluster-kube-dns + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- if .Values.controlPlane.coredns.service.labels }} +{{ toYaml .Values.controlPlane.coredns.service.labels | indent 4 }} + {{- end }} +spec: +{{ toYaml .Values.controlPlane.coredns.service.spec | indent 2 }} + {{- if not .Values.controlPlane.coredns.service.spec.selector }} + selector: + k8s-app: vcluster-kube-dns + {{- end }} + {{- if not .Values.controlPlane.coredns.service.spec.ports }} + ports: + - name: dns + port: 53 + targetPort: 1053 + protocol: UDP + - name: dns-tcp + port: 53 + targetPort: 1053 + protocol: TCP + - name: metrics + port: 9153 + protocol: TCP + {{- end }} +{{- end }}` + +func ProcessCorefile(vars map[string]interface{}, config *config.Config) (string, error) { + // add Values to the vars + out, err := json.Marshal(config) + if err != nil { + return "", fmt.Errorf("unable to marshal config: %w", err) + } + values := map[string]interface{}{} + err = json.Unmarshal(out, &values) + if err != nil { + return "", fmt.Errorf("unable to unmarshal config: %w", err) + } + vars["Values"] = values + + // template the corefile + corefileTemplate, err := template.New("corefile").Funcs(tmplFuncs).Option("missingkey=zero").Parse(corednsCorefile) + if err != nil { + return "", fmt.Errorf("unable to parse corefile template: %w", err) + } + buf := new(bytes.Buffer) + err = corefileTemplate.Funcs(tmplFuncs).Execute(buf, vars) + if err != nil { + return "", fmt.Errorf("unable to execute corefile template: %w", err) + } + return removeNoValue(strings.TrimSpace(buf.String())), nil +} + +func processManifests(vars map[string]interface{}, config *config.Config) ([]byte, error) { + // add Values to the vars + out, err := json.Marshal(config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + values := map[string]interface{}{} + err = json.Unmarshal(out, &values) + if err != nil { + return nil, fmt.Errorf("unable to unmarshal config: %w", err) + } + vars["Values"] = values + + // first template the Corefile + corefile, err := ProcessCorefile(vars, config) + if err != nil { + return nil, fmt.Errorf("unable to process corefile: %w", err) + } + vars["Corefile"] = corefile + + // then template the manifests + manifestTemplate, err := template.New("manifests").Funcs(tmplFuncs).Option("missingkey=zero").Parse(corednsManifests) + if err != nil { + return nil, fmt.Errorf("unable to parse manifests template: %w", err) + } + buf := new(bytes.Buffer) + err = manifestTemplate.Execute(buf, vars) + if err != nil { + return nil, fmt.Errorf("manifestTemplate.Execute failed for manifest %s: %w", corednsManifests, err) + } + return []byte(removeNoValue(strings.TrimSpace(buf.String()))), nil +} + +var tmplFuncs = template.FuncMap{ + "indent": indent, + "toYaml": toYAML, +} + +func removeNoValue(v string) string { + return strings.ReplaceAll(v, "", "") +} + +func indent(spaces int, v string) string { + pad := strings.Repeat(" ", spaces) + return pad + strings.Replace(v, "\n", "\n"+pad, -1) +} + +func toYAML(v interface{}) string { + data, err := yaml.Marshal(v) + if err != nil { + // Swallow errors inside of a template. + return "" + } + return strings.TrimSuffix(string(data), "\n") +} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/etcd/client.go b/vendor/github.com/loft-sh/vcluster/pkg/etcd/client.go index db4ebe1f..e75c8278 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/etcd/client.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/etcd/client.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "path/filepath" "strings" vconfig "github.com/loft-sh/vcluster/config" @@ -47,16 +48,9 @@ func GetEtcdEndpoint(vConfig *config.VirtualClusterConfig) (string, *Certificate if vConfig.ControlPlane.BackingStore.Etcd.Deploy.Enabled || vConfig.ControlPlane.BackingStore.Etcd.Embedded.Enabled { // embedded or deployed etcd etcdCertificates = &Certificates{ - CaCert: "/data/pki/etcd/ca.crt", - ServerCert: "/data/pki/apiserver-etcd-client.crt", - ServerKey: "/data/pki/apiserver-etcd-client.key", - } - if vConfig.Distro() == vconfig.K0SDistro { - etcdCertificates = &Certificates{ - CaCert: "/data/k0s/pki/etcd/ca.crt", - ServerCert: "/data/k0s/pki/apiserver-etcd-client.crt", - ServerKey: "/data/k0s/pki/apiserver-etcd-client.key", - } + CaCert: filepath.Join(constants.PKIDir, "etcd", "ca.crt"), + ServerCert: filepath.Join(constants.PKIDir, "apiserver-etcd-client.crt"), + ServerKey: filepath.Join(constants.PKIDir, "apiserver-etcd-client.key"), } if vConfig.ControlPlane.BackingStore.Etcd.Embedded.Enabled { @@ -77,18 +71,6 @@ func GetEtcdEndpoint(vConfig *config.VirtualClusterConfig) (string, *Certificate etcdEndpoints = constants.K8sKineEndpoint } else if vConfig.Distro() == vconfig.K3SDistro { etcdEndpoints = constants.K3sKineEndpoint - } else if vConfig.Distro() == vconfig.K0SDistro { - if (vConfig.ControlPlane.BackingStore.Database.Embedded.Enabled && vConfig.ControlPlane.BackingStore.Database.Embedded.DataSource != "") || - vConfig.ControlPlane.BackingStore.Database.External.Enabled { - etcdEndpoints = constants.K0sKineEndpoint - } else { - etcdEndpoints = "https://127.0.0.1:2379" - etcdCertificates = &Certificates{ - CaCert: "/data/k0s/pki/etcd/ca.crt", - ServerCert: "/data/k0s/pki/apiserver-etcd-client.crt", - ServerKey: "/data/k0s/pki/apiserver-etcd-client.key", - } - } } return etcdEndpoints, etcdCertificates diff --git a/vendor/github.com/loft-sh/vcluster/pkg/pro/embedded_etcd.go b/vendor/github.com/loft-sh/vcluster/pkg/pro/embedded_etcd.go index 9c5d0f35..d3c138ed 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/pro/embedded_etcd.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/pro/embedded_etcd.go @@ -1,7 +1,11 @@ package pro -import "context" +import ( + "context" -var StartEmbeddedEtcd = func(_ context.Context, _, _, _ string, _, _ int, _ string, _, _ bool) error { + "k8s.io/client-go/kubernetes" +) + +var StartEmbeddedEtcd = func(_ context.Context, _, _ string, _ kubernetes.Interface, _ string, _ int, _ string, _ bool, _ []string, _ bool) error { return NewFeatureError("embedded etcd") } diff --git a/vendor/github.com/loft-sh/vcluster/pkg/pro/error.go b/vendor/github.com/loft-sh/vcluster/pkg/pro/error.go index 0deb4acd..2cf16b70 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/pro/error.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/pro/error.go @@ -3,5 +3,5 @@ package pro import "fmt" func NewFeatureError(featureName string) error { - return fmt.Errorf("you are trying to use a vCluster pro feature '%s' that is not allowed by your current license. Please specify a license that allows using this feature or reach out to support@loft.sh", featureName) + return fmt.Errorf("you are trying to use a vCluster pro feature '%s' that is not part of the open-source build of vCluster. Please use the vCluster pro image and specify a license that allows using this feature or reach out to support@loft.sh", featureName) } diff --git a/vendor/github.com/loft-sh/vcluster/pkg/pro/namespace_sync.go b/vendor/github.com/loft-sh/vcluster/pkg/pro/namespace_sync.go new file mode 100644 index 00000000..9a41abe1 --- /dev/null +++ b/vendor/github.com/loft-sh/vcluster/pkg/pro/namespace_sync.go @@ -0,0 +1,15 @@ +package pro + +import ( + "github.com/loft-sh/vcluster/config" + "github.com/loft-sh/vcluster/pkg/syncer/synccontext" + "github.com/loft-sh/vcluster/pkg/util/translate" +) + +var GetNamespaceMapper = func(_ *synccontext.RegisterContext, _ synccontext.Mapper) (synccontext.Mapper, error) { + return nil, NewFeatureError("namespace toHost syncing") +} + +var GetWithSyncedNamespacesTranslator = func(_ string, _ config.FromHostMappings) (translate.Translator, error) { + return nil, NewFeatureError("namespace toHost syncing") +} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/pro/noop.go b/vendor/github.com/loft-sh/vcluster/pkg/pro/noop.go deleted file mode 100644 index 6ad25ef1..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/pro/noop.go +++ /dev/null @@ -1,11 +0,0 @@ -package pro - -import ( - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -var SyncNoopSyncerEndpoints = func(_ *synccontext.ControllerContext, _ types.NamespacedName, _ client.Client, _ types.NamespacedName, _ string) error { - return NewFeatureError("noop syncer") -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/pro/privatenodes.go b/vendor/github.com/loft-sh/vcluster/pkg/pro/privatenodes.go new file mode 100644 index 00000000..7e6dd921 --- /dev/null +++ b/vendor/github.com/loft-sh/vcluster/pkg/pro/privatenodes.go @@ -0,0 +1,58 @@ +package pro + +import ( + "context" + + "github.com/loft-sh/vcluster/pkg/config" + "github.com/loft-sh/vcluster/pkg/syncer/synccontext" +) + +var StartPrivateNodesMode = func(ctx *synccontext.ControllerContext) error { + // skip if we are not in dedicated mode + if !ctx.Config.PrivateNodes.Enabled { + return nil + } + + return NewFeatureError("private nodes") +} + +var SyncKubernetesServiceDedicated = func(ctx *synccontext.SyncContext) error { + // skip if we are not in dedicated mode + if !ctx.Config.PrivateNodes.Enabled { + return nil + } + + return NewFeatureError("private nodes") +} + +var StartKonnectivity = func(_ context.Context, vConfig *config.VirtualClusterConfig) error { + // skip if we are not in dedicated mode + if !vConfig.PrivateNodes.Enabled { + return nil + } + + return NewFeatureError("private nodes") +} + +var WriteKonnectivityEgressConfig = func() (string, error) { + return "", NewFeatureError("private nodes") +} + +type UpgradeOptions struct { + KubernetesVersion string + BinariesPath string + CNIBinariesPath string + BundleRepository string +} + +var UpgradeNode = func(_ context.Context, _ *UpgradeOptions) error { + return NewFeatureError("private nodes") +} + +type StandaloneOptions struct { + Config string +} + +var StartStandalone = func(_ context.Context, _ *StandaloneOptions) error { + return NewFeatureError("private nodes standalone") +} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/syncer/from_host_syncer.go b/vendor/github.com/loft-sh/vcluster/pkg/syncer/from_host_syncer.go deleted file mode 100644 index 40741fc4..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/syncer/from_host_syncer.go +++ /dev/null @@ -1,215 +0,0 @@ -package syncer - -import ( - "fmt" - "time" - - "github.com/loft-sh/vcluster/config" - vclusterconfig "github.com/loft-sh/vcluster/pkg/config" - "github.com/loft-sh/vcluster/pkg/patcher" - "github.com/loft-sh/vcluster/pkg/pro" - "github.com/loft-sh/vcluster/pkg/scheme" - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - "github.com/loft-sh/vcluster/pkg/syncer/translator" - syncertypes "github.com/loft-sh/vcluster/pkg/syncer/types" - "github.com/loft-sh/vcluster/pkg/util/translate" - 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" - utilerrors "k8s.io/apimachinery/pkg/util/errors" - toolscache "k8s.io/client-go/tools/cache" - "k8s.io/klog/v2" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/cache" - "sigs.k8s.io/controller-runtime/pkg/client" - metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" -) - -// FromHostSyncer encapsulates kind specific actions that need to happen in the from host sync. -type FromHostSyncer interface { - // CopyHostObjectToVirtual takes virtual and physical object and copies all needed fields from physical to virtual object. - // E.g. for Secrets and ConfigMaps, it will be labels, annotations and .data - CopyHostObjectToVirtual(vObj, pObj client.Object) - // GetProPatches returns pro patches from config for given kind. - GetProPatches(cfg config.Config) []config.TranslatePatch - // GetMappings returns mappings from config for given kind. - GetMappings(cfg config.Config) map[string]string -} - -func NewFromHost(_ *synccontext.RegisterContext, fromHost FromHostSyncer, translator syncertypes.GenericTranslator, skipFuncs ...translator.ShouldSkipHostObjectFunc) (syncertypes.Object, error) { - s := &genericFromHostSyncer{ - FromHostSyncer: fromHost, - GenericTranslator: translator, - skipFuncs: skipFuncs, - } - return s, nil -} - -type genericFromHostSyncer struct { - syncertypes.GenericTranslator - FromHostSyncer - skipFuncs []translator.ShouldSkipHostObjectFunc -} - -func (s *genericFromHostSyncer) Options() *syncertypes.Options { - return &syncertypes.Options{ - ObjectCaching: true, - } -} - -func (s *genericFromHostSyncer) SyncToHost(ctx *synccontext.SyncContext, event *synccontext.SyncToHostEvent[client.Object]) (ctrl.Result, error) { - if event.HostOld == nil { - return ctrl.Result{}, nil - } - klog.FromContext(ctx).V(1).Info("SyncToHost called") - return ctrl.Result{}, ctx.VirtualClient.Delete(ctx, event.Virtual) -} - -func (s *genericFromHostSyncer) Sync(ctx *synccontext.SyncContext, event *synccontext.SyncEvent[client.Object]) (_ ctrl.Result, retErr error) { - klog.FromContext(ctx).V(1).Info("Sync called") - - patchHelper, err := patcher.NewSyncerPatcher(ctx, event.Host, event.Virtual, patcher.TranslatePatches(s.GetProPatches(ctx.Config.Config), false), patcher.SkipHostPatch()) - if err != nil { - return ctrl.Result{}, fmt.Errorf("new syncer patcher: %w", err) - } - - defer func() { - if err := patchHelper.Patch(ctx, event.Host, event.Virtual); err != nil { - retErr = utilerrors.NewAggregate([]error{retErr, err}) - } - if retErr != nil { - s.EventRecorder().Eventf(event.Virtual, "Warning", "SyncError", "Error syncing: %v", retErr) - } - }() - - s.FromHostSyncer.CopyHostObjectToVirtual(event.Virtual, event.Host) - - return ctrl.Result{}, nil -} - -func (s *genericFromHostSyncer) SyncToVirtual(ctx *synccontext.SyncContext, event *synccontext.SyncToVirtualEvent[client.Object]) (ctrl.Result, error) { - klog.FromContext(ctx).V(1).Info("SyncToVirtual called") - if event.VirtualOld != nil && event.Host.GetDeletionTimestamp() != nil { - return patcher.DeleteVirtualObject(ctx, event.VirtualOld, event.Host, "host object was deleted") - } - - vObj := translate.VirtualMetadata(event.Host, s.HostToVirtual(ctx, types.NamespacedName{Name: event.Host.GetName(), Namespace: event.Host.GetNamespace()}, event.Host)) - - // make sure namespace exists - namespace := &corev1.Namespace{} - err := ctx.VirtualClient.Get(ctx, client.ObjectKey{Name: vObj.GetNamespace()}, namespace) - if err != nil { - if kerrors.IsNotFound(err) { - return ctrl.Result{Requeue: true}, - client.IgnoreAlreadyExists(ctx.VirtualClient.Create( - ctx, &corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{Name: vObj.GetNamespace()}, - }, - )) - } - return ctrl.Result{}, err - } else if namespace.DeletionTimestamp != nil { - // cannot create events in terminating namespaces, requeue to re-create namespaces later - return ctrl.Result{RequeueAfter: 5 * time.Second}, nil - } - - err = pro.ApplyPatchesVirtualObject(ctx, nil, vObj, event.Host, s.GetProPatches(ctx.Config.Config), false) - if err != nil { - return ctrl.Result{}, err - } - - return patcher.CreateVirtualObject(ctx, event.Host, vObj, s.EventRecorder(), false) -} - -func (s *genericFromHostSyncer) Syncer() syncertypes.Sync[client.Object] { - return ToGenericSyncer(s) -} - -var _ syncertypes.Syncer = &genericFromHostSyncer{} - -var _ syncertypes.OptionsProvider = &genericFromHostSyncer{} - -var _ syncertypes.ManagerProvider = &genericFromHostSyncer{} - -func (s *genericFromHostSyncer) ExcludeVirtual(_ client.Object) bool { - return false -} - -func (s *genericFromHostSyncer) ExcludePhysical(obj client.Object) bool { - _, ok := obj.GetLabels()[translate.MarkerLabel] - return ok -} - -func (s *genericFromHostSyncer) ConfigureAndStartManager(ctx *synccontext.RegisterContext) (*synccontext.RegisterContext, error) { - mappings := s.GetMappings(ctx.Config.Config) - localMultiNamespaceManager, skipCustomManagerCreation, err := ConfigureNewLocalManager(ctx, mappings, s.Name()) - if err != nil { - return nil, err - } - if skipCustomManagerCreation { - return ctx, nil - } - newCtx := *ctx - - go func() { - err := localMultiNamespaceManager.Start(newCtx) - if err != nil { - panic(err) - } - }() - - if synced := localMultiNamespaceManager.GetCache().WaitForCacheSync(newCtx); !synced { - return nil, fmt.Errorf("cache was not synced for custom physical manager for %s syncer", s.Name()) - } - - newCtx.PhysicalManager = localMultiNamespaceManager - return &newCtx, nil -} - -func ConfigureNewLocalManager(ctx *synccontext.RegisterContext, mappings map[string]string, syncerName string) (ctrl.Manager, bool, error) { - multiNsCacheConfig, customManagerNeeded := vclusterconfig.GetLocalCacheOptionsFromConfigMappings(mappings, ctx.Config.ControlPlaneNamespace) - if !customManagerNeeded { - return nil, true, nil - } - logNs := make([]string, 0, len(multiNsCacheConfig.DefaultNamespaces)) - for k := range multiNsCacheConfig.DefaultNamespaces { - logNs = append(logNs, k) - } - klog.FromContext(ctx).Info("Setting up custom physical multi-namespace manager for", "namespaces", logNs, "syncer", syncerName) - localMultiNamespaceManager, err := ctrl.NewManager(ctx.Config.WorkloadConfig, GetOptionsForMultiNamespaceManager(ctx, multiNsCacheConfig)) - if err != nil { - return nil, false, fmt.Errorf("unable to create custom physical manager for syncer %s: %w", syncerName, err) - } - return localMultiNamespaceManager, false, nil -} - -func GetOptionsForMultiNamespaceManager(ctx *synccontext.RegisterContext, options cache.Options) ctrl.Options { - return ctrl.Options{ - Scheme: scheme.Scheme, - Metrics: metricsserver.Options{ - BindAddress: "0", - }, - PprofBindAddress: "0", - LeaderElection: false, - NewClient: pro.NewVirtualClient(ctx.Config), - WebhookServer: nil, - Cache: cache.Options{ - Mapper: ctx.PhysicalManager.GetRESTMapper(), - DefaultNamespaces: options.DefaultNamespaces, - DefaultWatchErrorHandler: additionalPermissionMissingHandler(ctx), - }, - } -} - -func additionalPermissionMissingHandler(ctx *synccontext.RegisterContext) func(r *toolscache.Reflector, err error) { - return func(r *toolscache.Reflector, err error) { - if kerrors.IsForbidden(err) { - klog.FromContext(ctx).Error(err, - "trying to watch on a namespace that does not exists / have no permissions. "+ - "Please either re-create it or remove the namespace from mappings in the vcluster.yaml and restart vCluster.") - } else { - toolscache.DefaultWatchErrorHandler(r, err) - } - } -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/syncer/handler.go b/vendor/github.com/loft-sh/vcluster/pkg/syncer/handler.go deleted file mode 100644 index 566b731e..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/syncer/handler.go +++ /dev/null @@ -1,42 +0,0 @@ -package syncer - -import ( - "context" - - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/event" - "sigs.k8s.io/controller-runtime/pkg/handler" -) - -type enqueueFunc func(ctx context.Context, obj client.Object, q workqueue.TypedRateLimitingInterface[ctrl.Request], isDelete bool) - -func newEventHandler(enqueue enqueueFunc) handler.EventHandler { - return &eventHandler{enqueue: enqueue} -} - -type eventHandler struct { - enqueue enqueueFunc -} - -// Create is called in response to an create event - e.g. Pod Creation. -func (r *eventHandler) Create(ctx context.Context, evt event.CreateEvent, q workqueue.TypedRateLimitingInterface[ctrl.Request]) { - r.enqueue(ctx, evt.Object, q, false) -} - -// Update is called in response to an update event - e.g. Pod Updated. -func (r *eventHandler) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.TypedRateLimitingInterface[ctrl.Request]) { - r.enqueue(ctx, evt.ObjectNew, q, false) -} - -// Delete is called in response to a delete event - e.g. Pod Deleted. -func (r *eventHandler) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.TypedRateLimitingInterface[ctrl.Request]) { - r.enqueue(ctx, evt.Object, q, true) -} - -// Generic is called in response to an event of an unknown type or a synthetic event triggered as a cron or -// external trigger request - e.g. reconcile Autoscaling, or a Webhook. -func (r *eventHandler) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.TypedRateLimitingInterface[ctrl.Request]) { - r.enqueue(ctx, evt.Object, q, false) -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/syncer/importer.go b/vendor/github.com/loft-sh/vcluster/pkg/syncer/importer.go deleted file mode 100644 index 134caa62..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/syncer/importer.go +++ /dev/null @@ -1,21 +0,0 @@ -package syncer - -import ( - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - syncertypes "github.com/loft-sh/vcluster/pkg/syncer/types" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -func NewNoopImporter() syncertypes.Importer { - return &noopImporter{} -} - -type noopImporter struct{} - -func (n *noopImporter) Import(_ *synccontext.SyncContext, _ client.Object) (bool, error) { - return false, nil -} - -func (n *noopImporter) IgnoreHostObject(_ *synccontext.SyncContext, _ client.Object) bool { - return false -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/syncer/synccontext/context.go b/vendor/github.com/loft-sh/vcluster/pkg/syncer/synccontext/context.go index 2f0aeeaf..13d571dd 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/syncer/synccontext/context.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/syncer/synccontext/context.go @@ -5,6 +5,7 @@ import ( "net/http" "github.com/loft-sh/vcluster/pkg/config" + "github.com/loft-sh/vcluster/pkg/etcd" "github.com/loft-sh/vcluster/pkg/util/loghelper" "k8s.io/apimachinery/pkg/version" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" @@ -20,6 +21,8 @@ type ControllerContext struct { VirtualRawConfig *clientcmdapi.Config VirtualClusterVersion *version.Info + EtcdClient etcd.Client + WorkloadNamespaceClient client.Client Config *config.VirtualClusterConfig @@ -73,14 +76,19 @@ func (c *ControllerContext) ToRegisterContext() *RegisterContext { } func (r *RegisterContext) ToSyncContext(logName string) *SyncContext { - return &SyncContext{ + syncCtx := &SyncContext{ Context: r.Context, Config: r.Config, Log: loghelper.New(logName), - PhysicalClient: r.PhysicalManager.GetClient(), - VirtualClient: r.VirtualManager.GetClient(), CurrentNamespace: r.CurrentNamespace, CurrentNamespaceClient: r.CurrentNamespaceClient, Mappings: r.Mappings, } + if r.PhysicalManager != nil { + syncCtx.PhysicalClient = r.PhysicalManager.GetClient() + } + if r.VirtualManager != nil { + syncCtx.VirtualClient = r.VirtualManager.GetClient() + } + return syncCtx } diff --git a/vendor/github.com/loft-sh/vcluster/pkg/syncer/syncer.go b/vendor/github.com/loft-sh/vcluster/pkg/syncer/syncer.go deleted file mode 100644 index 8d5b161e..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/syncer/syncer.go +++ /dev/null @@ -1,538 +0,0 @@ -package syncer - -import ( - "context" - "errors" - "fmt" - "strconv" - "sync" - "time" - - "github.com/loft-sh/vcluster/pkg/config" - "github.com/loft-sh/vcluster/pkg/constants" - "github.com/loft-sh/vcluster/pkg/patcher" - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - syncertypes "github.com/loft-sh/vcluster/pkg/syncer/types" - "github.com/loft-sh/vcluster/pkg/util/translate" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/util/workqueue" - "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/controller" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - "sigs.k8s.io/controller-runtime/pkg/source" - - "github.com/loft-sh/vcluster/pkg/util/loghelper" - kerrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/client-go/tools/record" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -func NewSyncController(ctx *synccontext.RegisterContext, syncer syncertypes.Syncer) (*SyncController, error) { - options := &syncertypes.Options{} - optionsProvider, ok := syncer.(syncertypes.OptionsProvider) - if ok { - options = optionsProvider.Options() - } - - var objectCache *synccontext.BidirectionalObjectCache - if options.ObjectCaching { - objectCache = synccontext.NewBidirectionalObjectCache(syncer.Resource().DeepCopyObject().(client.Object), syncer) - } - - return &SyncController{ - syncer: syncer, - - objectCache: objectCache, - - genericSyncer: syncer.Syncer(), - - config: ctx.Config, - - mappings: ctx.Mappings, - - hostNameRequestLookup: map[ctrl.Request]ctrl.Request{}, - - log: loghelper.New(syncer.Name()), - vEventRecorder: ctx.VirtualManager.GetEventRecorderFor(syncer.Name() + "-syncer"), - physicalClient: ctx.PhysicalManager.GetClient(), - - currentNamespace: ctx.CurrentNamespace, - currentNamespaceClient: ctx.CurrentNamespaceClient, - - virtualClient: ctx.VirtualManager.GetClient(), - options: options, - }, nil -} - -func RegisterSyncer(ctx *synccontext.RegisterContext, syncer syncertypes.Syncer) error { - customManagerProvider, ok := syncer.(syncertypes.ManagerProvider) - if ok { - // if syncer needs a custom physical manager, ctx.PhysicalManager will get exchanged here - var err error - ctx, err = customManagerProvider.ConfigureAndStartManager(ctx) - if err != nil { - return err - } - } - - controller, err := NewSyncController(ctx, syncer) - if err != nil { - return err - } - - return controller.Register(ctx) -} - -type SyncController struct { - syncer syncertypes.Syncer - - genericSyncer syncertypes.Sync[client.Object] - - objectCache *synccontext.BidirectionalObjectCache - - config *config.VirtualClusterConfig - - mappings synccontext.MappingsRegistry - - hostNameRequestLookupLock sync.Mutex - hostNameRequestLookup map[ctrl.Request]ctrl.Request - - log loghelper.Logger - vEventRecorder record.EventRecorder - - physicalClient client.Client - - currentNamespace string - currentNamespaceClient client.Client - - virtualClient client.Client - options *syncertypes.Options -} - -func (r *SyncController) newSyncContext(ctx context.Context, logName string) *synccontext.SyncContext { - syncCtx := &synccontext.SyncContext{ - Context: ctx, - Config: r.config, - Log: loghelper.NewFromExisting(r.log.Base(), logName), - PhysicalClient: r.physicalClient, - ObjectCache: r.objectCache, - CurrentNamespace: r.currentNamespace, - CurrentNamespaceClient: r.currentNamespaceClient, - VirtualClient: r.virtualClient, - Mappings: r.mappings, - } - return syncCtx -} - -func (r *SyncController) Reconcile(ctx context.Context, vReq reconcile.Request) (res ctrl.Result, retErr error) { - // extract request - pReq, ok := r.getHostRequest(vReq) - if ok { - // put this into the cache again if we requeue - defer func() { - if res.Requeue || res.RequeueAfter > 0 || retErr != nil { - r.setHostRequest(vReq, pReq) - } - }() - } - - // create sync context - syncContext := r.newSyncContext(ctx, vReq.Name) - defer func() { - if err := syncContext.Close(); err != nil { - retErr = errors.Join(retErr, err) - } - }() - - // debug log request - klog.FromContext(ctx).V(1).Info("Reconcile started") - defer func() { - klog.FromContext(ctx).V(1).Info("Reconcile ended") - }() - - // check if we should skip reconcile - lifecycle, ok := r.syncer.(syncertypes.Starter) - if ok { - skip, err := lifecycle.ReconcileStart(syncContext, vReq) - defer lifecycle.ReconcileEnd() - if skip || err != nil { - return ctrl.Result{}, err - } - } - - // retrieve the objects - vObjOld, vObj, pObjOld, pObj, err := r.getObjects(syncContext, vReq, pReq) - if err != nil { - return ctrl.Result{}, err - } - defer func() { - if !res.Requeue && res.RequeueAfter == 0 && retErr == nil { - r.updateObjectCache(vObjOld, vObj, pObjOld, pObj) - } - }() - - // check if the resource version is correct - if pObjOld != nil && pObj != nil && newerResourceVersion(pObjOld, pObj) { - klog.FromContext(ctx).Info("Requeue because host object is outdated") - return ctrl.Result{Requeue: true}, nil - } else if vObjOld != nil && vObj != nil && newerResourceVersion(vObjOld, vObj) { - klog.FromContext(ctx).Info("Requeue because virtual object is outdated") - return ctrl.Result{Requeue: true}, nil - } - - // check if we should ignore object - if importer, ok := r.syncer.(syncertypes.Importer); ok && importer.IgnoreHostObject(syncContext, pObj) { - // this is re-queued because we ignore the object only for a limited amount of time, so - return ctrl.Result{Requeue: true}, nil - } - - // add mapping to context - if !r.options.SkipMappingsRecording { - syncContext.Context, err = synccontext.WithMappingFromObjects(syncContext.Context, pObj, vObj) - if err != nil { - return ctrl.Result{}, err - } - } - - // check what function we should call - if vObj != nil && pObj != nil { - // make sure the object uid matches - pAnnotations := pObj.GetAnnotations() - if !r.options.DisableUIDDeletion && pAnnotations[translate.UIDAnnotation] != "" && pAnnotations[translate.UIDAnnotation] != string(vObj.GetUID()) { - if pAnnotations[translate.KindAnnotation] == "" || pAnnotations[translate.KindAnnotation] == r.syncer.GroupVersionKind().String() { - // requeue if object is already being deleted - if pObj.GetDeletionTimestamp() != nil { - return ctrl.Result{RequeueAfter: time.Second}, nil - } - - // delete physical object - return patcher.DeleteHostObject(syncContext, pObj, vObjOld, "virtual object uid is different") - } - } - - result, err := r.genericSyncer.Sync(syncContext, &synccontext.SyncEvent[client.Object]{ - VirtualOld: vObjOld, - Virtual: vObj, - - HostOld: pObjOld, - Host: pObj, - }) - if err != nil { - return ctrl.Result{}, fmt.Errorf("sync: %w", err) - } - - return result, nil - } else if vObj != nil { - result, err := r.genericSyncer.SyncToHost(syncContext, &synccontext.SyncToHostEvent[client.Object]{ - HostOld: pObjOld, - - Virtual: vObj, - }) - if err != nil { - return ctrl.Result{}, fmt.Errorf("sync to host: %w", err) - } - - return result, nil - } else if pObj != nil { - if pObj.GetAnnotations() != nil { - if shouldSkip, ok := pObj.GetAnnotations()[translate.SkipBackSyncInMultiNamespaceMode]; ok && shouldSkip == "true" { - // do not delete - return ctrl.Result{}, nil - } - } - - result, err := r.genericSyncer.SyncToVirtual(syncContext, &synccontext.SyncToVirtualEvent[client.Object]{ - VirtualOld: vObjOld, - - Host: pObj, - }) - if err != nil { - return ctrl.Result{}, fmt.Errorf("sync to virtual: %w", err) - } - - return result, nil - } - - return ctrl.Result{}, nil -} - -func (r *SyncController) getObjects(ctx *synccontext.SyncContext, vReq, pReq ctrl.Request) (vObjOld, vObj, pObjOld, pObj client.Object, err error) { - // get virtual object - exclude, vObj, err := r.getVirtualObject(ctx, vReq.NamespacedName) - if err != nil { - return nil, nil, nil, nil, err - } else if exclude { - return nil, nil, nil, nil, nil - } - - // make sure physical name is there - if pReq.Name == "" { - pReq.NamespacedName = r.syncer.VirtualToHost(ctx, vReq.NamespacedName, vObj) - } - - // get physical object - exclude, pObj, err = r.getPhysicalObject(ctx, pReq.NamespacedName) - if err != nil { - return nil, nil, nil, nil, err - } else if exclude { - return nil, nil, nil, nil, nil - } - - // retrieve the old objects - if r.objectCache != nil { - var ok bool - vObjOld, ok = r.objectCache.Virtual().Get(vReq.NamespacedName) - if !ok && vObj != nil { - // for upgrading from pre-0.21 clusters we want to re-sync labels for the new objects initially once - // since we changed label prefixes so this is required to make sure all labels are initially synced - // from virtual to host correctly. - vObjOld = vObj.DeepCopyObject().(client.Object) - vObjOld.SetLabels(nil) - vObjOld.SetResourceVersion("1") - - // only add to cache if it's not deleting - if vObj.GetDeletionTimestamp() == nil { - r.objectCache.Virtual().Put(vObjOld) - } - } - - pObjOld, ok = r.objectCache.Host().Get(pReq.NamespacedName) - if !ok && pObj != nil { - // only add to cache if it's not deleting - if pObj.GetDeletionTimestamp() == nil { - r.objectCache.Host().Put(pObj) - } - pObjOld = pObj - } - } - - return vObjOld, vObj, pObjOld, pObj, nil -} - -func (r *SyncController) getVirtualObject(ctx context.Context, req types.NamespacedName) (bool, client.Object, error) { - // we don't have an object to retrieve - if req.Name == "" { - return true, nil, nil - } - - // get virtual resource - vObj := r.syncer.Resource() - err := r.virtualClient.Get(ctx, req, vObj) - if err != nil { - if !kerrors.IsNotFound(err) { - return false, nil, fmt.Errorf("get virtual object: %w", err) - } - - vObj = nil - } - - // check if we should skip resource - // this is to distinguish generic and plugin syncers with the core syncers - if vObj != nil && r.excludeVirtual(vObj) { - return true, nil, nil - } - - return false, vObj, nil -} - -func (r *SyncController) getPhysicalObject(ctx *synccontext.SyncContext, req types.NamespacedName) (bool, client.Object, error) { - // we don't have an object to retrieve - if req.Name == "" { - return true, nil, nil - } - - // get physical resource - pObj := r.syncer.Resource() - err := r.physicalClient.Get(ctx, req, pObj) - if err != nil { - if !kerrors.IsNotFound(err) { - return false, nil, fmt.Errorf("get physical object: %w", err) - } - - pObj = nil - } - - // check if we should skip resource - // this is to distinguish generic and plugin syncers with the core syncers - if pObj != nil { - excluded, err := r.excludePhysical(ctx, pObj) - if err != nil { - return false, nil, err - } else if excluded { - return true, nil, nil - } - } - - return false, pObj, nil -} - -func (r *SyncController) excludePhysical(ctx *synccontext.SyncContext, pObj client.Object) (bool, error) { - isManaged, err := r.syncer.IsManaged(ctx, pObj) - if err != nil { - return false, fmt.Errorf("failed to check if physical object is managed: %w", err) - } else if !isManaged { - return true, nil - } - - excluder, ok := r.syncer.(syncertypes.ObjectExcluder) - if ok { - return excluder.ExcludePhysical(pObj), nil - } - - if pObj.GetLabels() != nil && pObj.GetLabels()[translate.ControllerLabel] != "" { - return true, nil - } - if pObj.GetAnnotations() != nil && pObj.GetAnnotations()[translate.ControllerLabel] != "" && pObj.GetAnnotations()[translate.ControllerLabel] != r.syncer.Name() { - return true, nil - } - - return false, nil -} - -func (r *SyncController) excludeVirtual(vObj client.Object) bool { - excluder, ok := r.syncer.(syncertypes.ObjectExcluder) - if ok { - return excluder.ExcludeVirtual(vObj) - } - - if vObj.GetLabels() != nil && vObj.GetLabels()[translate.ControllerLabel] != "" { - return true - } - if vObj.GetAnnotations() != nil && vObj.GetAnnotations()[translate.ControllerLabel] != "" && vObj.GetAnnotations()[translate.ControllerLabel] != r.syncer.Name() { - return true - } - - return false -} - -func (r *SyncController) enqueueVirtual(_ context.Context, obj client.Object, q workqueue.TypedRateLimitingInterface[ctrl.Request], _ bool) { - if obj == nil { - return - } - - // build the request - q.Add(reconcile.Request{ - NamespacedName: client.ObjectKeyFromObject(obj), - }) -} - -func (r *SyncController) enqueuePhysical(ctx context.Context, obj client.Object, q workqueue.TypedRateLimitingInterface[ctrl.Request], isDelete bool) { - if obj == nil { - return - } - - // sync context - syncContext := r.newSyncContext(ctx, obj.GetName()) - - // we have a physical object here - managed, err := r.syncer.IsManaged(syncContext, obj) - if err != nil { - klog.Errorf("error checking object %v if managed: %v", obj, err) - return - } else if !managed { - // check if we should import - imported := false - if importer, ok := r.syncer.(syncertypes.Importer); ok && !isDelete && obj.GetDeletionTimestamp() == nil { - imported, err = importer.Import(syncContext, obj) - if err != nil { - klog.Errorf("error importing object %v: %v", obj, err) - return - } - } - - // if not imported we exit here - if !imported { - return - } - } - - // build the request - pReq := reconcile.Request{NamespacedName: client.ObjectKeyFromObject(obj)} - vReq := reconcile.Request{NamespacedName: r.syncer.HostToVirtual(syncContext, pReq.NamespacedName, obj)} - if vReq.Name != "" { - r.setHostRequest(vReq, pReq) - q.Add(vReq) - } -} - -func (r *SyncController) Build(ctx *synccontext.RegisterContext) (controller.Controller, error) { - // build the basic controller - controllerBuilder := ctrl.NewControllerManagedBy(ctx.VirtualManager). - WithOptions(controller.Options{ - MaxConcurrentReconciles: 10, - CacheSyncTimeout: constants.DefaultCacheSyncTimeout, - }). - Named(r.syncer.Name()). - Watches(r.syncer.Resource(), newEventHandler(r.enqueueVirtual)). - WatchesRawSource(source.Kind(ctx.PhysicalManager.GetCache(), r.syncer.Resource(), newEventHandler(r.enqueuePhysical))) - - // should add extra stuff? - modifier, isControllerModifier := r.syncer.(syncertypes.ControllerModifier) - if isControllerModifier { - var err error - controllerBuilder, err = modifier.ModifyController(ctx, controllerBuilder) - if err != nil { - return nil, err - } - } - - return controllerBuilder.Build(r) -} - -func (r *SyncController) Register(ctx *synccontext.RegisterContext) error { - if r.objectCache != nil { - err := r.objectCache.Start(ctx) - if err != nil { - return fmt.Errorf("start object cache: %w", err) - } - } - - _, err := r.Build(ctx) - return err -} - -func (r *SyncController) updateObjectCache(vObjOld, vObj, pObjOld, pObj client.Object) { - if r.objectCache == nil { - return - } - - if vObjOld != nil && vObj != nil && newerResourceVersion(vObj, vObjOld) { - newVObjOld, ok := r.objectCache.Virtual().Get(client.ObjectKeyFromObject(vObj)) - if ok && newVObjOld.GetResourceVersion() == vObjOld.GetResourceVersion() { - r.objectCache.Virtual().Put(vObj) - } - } - - if pObjOld != nil && pObj != nil && newerResourceVersion(pObj, pObjOld) { - newPObjOld, ok := r.objectCache.Host().Get(client.ObjectKeyFromObject(pObj)) - if ok && newPObjOld.GetResourceVersion() == pObjOld.GetResourceVersion() { - r.objectCache.Host().Put(pObj) - } - } -} - -func (r *SyncController) setHostRequest(vReq, pReq reconcile.Request) { - r.hostNameRequestLookupLock.Lock() - defer r.hostNameRequestLookupLock.Unlock() - - r.hostNameRequestLookup[vReq] = pReq -} - -func (r *SyncController) getHostRequest(vReq reconcile.Request) (reconcile.Request, bool) { - r.hostNameRequestLookupLock.Lock() - defer r.hostNameRequestLookupLock.Unlock() - - pReq, ok := r.hostNameRequestLookup[vReq] - if ok { - delete(r.hostNameRequestLookup, vReq) - } - - return pReq, ok -} - -func newerResourceVersion(oldObject, newObject client.Object) bool { - oldResourceVersion, _ := strconv.Atoi(oldObject.GetResourceVersion()) - newResourceVersion, _ := strconv.Atoi(newObject.GetResourceVersion()) - return oldResourceVersion > newResourceVersion -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/syncer/syncer_fake.go b/vendor/github.com/loft-sh/vcluster/pkg/syncer/syncer_fake.go deleted file mode 100644 index ef94e618..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/syncer/syncer_fake.go +++ /dev/null @@ -1,113 +0,0 @@ -package syncer - -import ( - "context" - - "github.com/loft-sh/vcluster/pkg/config" - "github.com/loft-sh/vcluster/pkg/constants" - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - syncertypes "github.com/loft-sh/vcluster/pkg/syncer/types" - "github.com/loft-sh/vcluster/pkg/util/loghelper" - "github.com/loft-sh/vcluster/pkg/util/translate" - kerrors "k8s.io/apimachinery/pkg/api/errors" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - controller2 "sigs.k8s.io/controller-runtime/pkg/controller" -) - -func RegisterFakeSyncer(ctx *synccontext.RegisterContext, syncer syncertypes.FakeSyncer) error { - controller := &fakeSyncer{ - syncer: syncer, - log: loghelper.New(syncer.Name()), - physicalClient: ctx.PhysicalManager.GetClient(), - - currentNamespace: ctx.CurrentNamespace, - currentNamespaceClient: ctx.CurrentNamespaceClient, - - mappings: ctx.Mappings, - - config: ctx.Config, - - virtualClient: ctx.VirtualManager.GetClient(), - } - - return controller.Register(ctx) -} - -type fakeSyncer struct { - syncer syncertypes.FakeSyncer - log loghelper.Logger - - physicalClient client.Client - - currentNamespace string - currentNamespaceClient client.Client - - mappings synccontext.MappingsRegistry - - config *config.VirtualClusterConfig - - virtualClient client.Client -} - -func (r *fakeSyncer) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - log := loghelper.NewFromExisting(r.log.Base(), req.Name) - syncContext := &synccontext.SyncContext{ - Context: ctx, - Log: log, - Config: r.config, - PhysicalClient: r.physicalClient, - CurrentNamespace: r.currentNamespace, - CurrentNamespaceClient: r.currentNamespaceClient, - VirtualClient: r.virtualClient, - Mappings: r.mappings, - } - - // check if we should skip reconcile - lifecycle, ok := r.syncer.(syncertypes.Starter) - if ok { - skip, err := lifecycle.ReconcileStart(syncContext, req) - defer lifecycle.ReconcileEnd() - if skip || err != nil { - return ctrl.Result{}, err - } - } - - // get virtual object - vObj := r.syncer.Resource() - err := r.virtualClient.Get(ctx, req.NamespacedName, vObj) - if err != nil { - if !kerrors.IsNotFound(err) { - return ctrl.Result{}, err - } - - return r.syncer.FakeSyncToVirtual(syncContext, req.NamespacedName) - } - - // check if we should skip resource - if vObj != nil && vObj.GetLabels() != nil && vObj.GetLabels()[translate.ControllerLabel] != "" { - return ctrl.Result{}, nil - } - - // update object - return r.syncer.FakeSync(syncContext, vObj) -} - -func (r *fakeSyncer) Register(ctx *synccontext.RegisterContext) error { - controller := ctrl.NewControllerManagedBy(ctx.VirtualManager). - WithOptions(controller2.Options{ - MaxConcurrentReconciles: 10, - CacheSyncTimeout: constants.DefaultCacheSyncTimeout, - }). - Named(r.syncer.Name()). - For(r.syncer.Resource()) - var err error - modifier, ok := r.syncer.(syncertypes.ControllerModifier) - if ok { - controller, err = modifier.ModifyController(ctx, controller) - if err != nil { - return err - } - } - return controller.Complete(r) -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/syncer/translator/from_config_translator.go b/vendor/github.com/loft-sh/vcluster/pkg/syncer/translator/from_config_translator.go deleted file mode 100644 index 0747f1e2..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/syncer/translator/from_config_translator.go +++ /dev/null @@ -1,193 +0,0 @@ -package translator - -import ( - "strings" - - "github.com/loft-sh/vcluster/pkg/constants" - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - syncer "github.com/loft-sh/vcluster/pkg/syncer/types" - "github.com/loft-sh/vcluster/pkg/util/translate" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -type fromHostTranslate struct { - gvk schema.GroupVersionKind - eventRecorder record.EventRecorder - virtualToHost map[string]string - hostToVirtual map[string]string - namespace string - translatorName string - skipFuncs []ShouldSkipHostObjectFunc -} - -// ShouldSkipHostObjectFunc takes object's host name and namespace -// and returns true if object should be skipped in the from host sync. -type ShouldSkipHostObjectFunc func(hostName, hostNamespace string) bool - -func NewFromHostTranslatorForGVK(ctx *synccontext.RegisterContext, gvk schema.GroupVersionKind, hostToVirtual map[string]string, skipFuncs ...ShouldSkipHostObjectFunc) (syncer.GenericTranslator, error) { - virtualToHost := make(map[string]string, len(hostToVirtual)) - for host, virtual := range hostToVirtual { - virtualToHost[virtual] = host - } - - return &fromHostTranslate{ - gvk: gvk, - eventRecorder: ctx.VirtualManager.GetEventRecorderFor("from-host-" + strings.ToLower(gvk.Kind) + "-syncer"), - virtualToHost: virtualToHost, - hostToVirtual: hostToVirtual, - namespace: ctx.Config.ControlPlaneNamespace, - translatorName: "from-host-" + strings.ToLower(gvk.Kind), - skipFuncs: skipFuncs, - }, nil -} - -func (c *fromHostTranslate) Name() string { - return c.translatorName -} - -func (c *fromHostTranslate) Resource() client.Object { - switch c.gvk.Kind { - case "ConfigMap": - return &corev1.ConfigMap{} - case "Secret": - return &corev1.Secret{} - default: - obj := &unstructured.Unstructured{} - obj.SetKind(c.gvk.Kind) - obj.SetAPIVersion(c.gvk.GroupVersion().String()) - return obj - } -} - -func (c *fromHostTranslate) Migrate(_ *synccontext.RegisterContext, _ synccontext.Mapper) error { - return nil -} - -func (c *fromHostTranslate) GroupVersionKind() schema.GroupVersionKind { - return c.gvk -} - -func (c *fromHostTranslate) VirtualToHost(_ *synccontext.SyncContext, req types.NamespacedName, _ client.Object) types.NamespacedName { - vName, vNs := req.Name, req.Namespace - nn, _ := matchesVirtualObject(vNs, vName, c.virtualToHost, c.namespace) - return nn -} - -func (c *fromHostTranslate) HostToVirtual(_ *synccontext.SyncContext, req types.NamespacedName, _ client.Object) types.NamespacedName { - nn, ok := matchesHostObject(req.Name, req.Namespace, c.hostToVirtual, c.namespace, c.skipFuncs...) - if !ok { - return types.NamespacedName{} - } - return nn -} - -func (c *fromHostTranslate) IsManaged(_ *synccontext.SyncContext, pObj client.Object) (bool, error) { - hostName, hostNs := pObj.GetName(), pObj.GetNamespace() - if _, ok := pObj.GetLabels()[translate.MarkerLabel]; ok { - return false, nil - } - _, managed := matchesHostObject(hostName, hostNs, c.hostToVirtual, c.namespace, c.skipFuncs...) - return managed, nil -} - -func (c *fromHostTranslate) EventRecorder() record.EventRecorder { - return c.eventRecorder -} - -func matchesHostObject(hostName, hostNamespace string, resourceMappings map[string]string, vClusterHostNamespace string, skippers ...ShouldSkipHostObjectFunc) (types.NamespacedName, bool) { - for _, skipFunc := range skippers { - if skipFunc(hostName, hostNamespace) { - return types.NamespacedName{}, false - } - } - - key := hostNamespace + "/" + hostName - matchesAllKeyInNamespaceKey := hostNamespace + "/*" - - // first, let's try matching by namespace/name - if virtual, ok := resourceMappings[key]; ok { - ns, name, found := strings.Cut(virtual, "/") - if found && name != "" { - if name == "*" { - name = hostName - } - return types.NamespacedName{Namespace: ns, Name: name}, true - } - } - - // second, by namespace/* - if virtual, ok := resourceMappings[matchesAllKeyInNamespaceKey]; ok { - ns, _, found := strings.Cut(virtual, "/") - if found { - return types.NamespacedName{Namespace: ns, Name: hostName}, true - } - } - - // third, by /object-name (then - if hostNamespace == vClusterHostNamespace { - if val, ok := resourceMappings["/"+hostName]; ok { - ns, name, found := strings.Cut(val, "/") - if !found { - // this should never happen - return types.NamespacedName{}, false - } - return types.NamespacedName{Namespace: ns, Name: name}, true - } - } - - // last chance, if user specified "": /* - if virtual, ok := resourceMappings[constants.VClusterNamespaceInHostMappingSpecialCharacter]; ok { - if vClusterHostNamespace == hostNamespace { - ns, name, found := strings.Cut(virtual, "/") - if found && name != "" { - return types.NamespacedName{Namespace: ns, Name: hostName}, true - } else if !strings.Contains(virtual, "/") { - // then the mapping is "": "virtual-namespace" where "" means vCluster host namespace - // in this case, we want to return virtual-namespace/hostName - return types.NamespacedName{Namespace: virtual, Name: hostName}, true - } - } - } - - return types.NamespacedName{}, false -} - -func matchesVirtualObject(virtualNs, virtualName string, virtualToHost map[string]string, vClusterHostNamespace string) (types.NamespacedName, bool) { - virtualKey := virtualNs + "/" + virtualName - virtualAllInNamespaceKey := virtualNs + "/*" - - // let's check if object is listed explicitly - if host, ok := virtualToHost[virtualKey]; ok { - if host == "*" { - return types.NamespacedName{Namespace: vClusterHostNamespace, Name: virtualName}, false - } - ns, name, found := strings.Cut(host, "/") - if found && name != "" { - if ns == "" { - ns = vClusterHostNamespace - } - return types.NamespacedName{Namespace: ns, Name: name}, true - } - } - - // check if object's namespace is listed - if host, ok := virtualToHost[virtualAllInNamespaceKey]; ok { - ns, _, found := strings.Cut(host, "/") - if found { - return types.NamespacedName{Namespace: ns, Name: virtualName}, true - } - } - - // check if object's namespace is a target namespace for vCluster host namespace, - // then return vCluster host namespace + object name - if host, ok := virtualToHost[virtualNs]; ok && host == constants.VClusterNamespaceInHostMappingSpecialCharacter { - return types.NamespacedName{Namespace: vClusterHostNamespace, Name: virtualName}, true - } - - return types.NamespacedName{}, false -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/syncer/translator/generic_translator.go b/vendor/github.com/loft-sh/vcluster/pkg/syncer/translator/generic_translator.go deleted file mode 100644 index 6cd307c8..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/syncer/translator/generic_translator.go +++ /dev/null @@ -1,42 +0,0 @@ -package translator - -import ( - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - syncertypes "github.com/loft-sh/vcluster/pkg/syncer/types" - "k8s.io/client-go/tools/record" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -func NewGenericTranslator(ctx *synccontext.RegisterContext, name string, obj client.Object, mapper synccontext.Mapper) syncertypes.GenericTranslator { - return &genericTranslator{ - Mapper: mapper, - - name: name, - - obj: obj, - - eventRecorder: ctx.VirtualManager.GetEventRecorderFor(name + "-syncer"), - } -} - -type genericTranslator struct { - synccontext.Mapper - - name string - - obj client.Object - - eventRecorder record.EventRecorder -} - -func (n *genericTranslator) EventRecorder() record.EventRecorder { - return n.eventRecorder -} - -func (n *genericTranslator) Name() string { - return n.name -} - -func (n *genericTranslator) Resource() client.Object { - return n.obj.DeepCopyObject().(client.Object) -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/syncer/wrapper.go b/vendor/github.com/loft-sh/vcluster/pkg/syncer/wrapper.go deleted file mode 100644 index 159162a1..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/syncer/wrapper.go +++ /dev/null @@ -1,60 +0,0 @@ -package syncer - -import ( - "errors" - - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - syncertypes "github.com/loft-sh/vcluster/pkg/syncer/types" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/reconcile" -) - -func ToGenericSyncer[T client.Object](syncer syncertypes.Sync[T]) syncertypes.Sync[client.Object] { - return &toSyncer[T]{ - syncer: syncer, - } -} - -type toSyncer[T client.Object] struct { - syncer syncertypes.Sync[T] -} - -func (t *toSyncer[T]) SyncToVirtual(ctx *synccontext.SyncContext, event *synccontext.SyncToVirtualEvent[client.Object]) (ctrl.Result, error) { - hostConverted, _ := event.Host.(T) - virtualOldConverted, _ := event.VirtualOld.(T) - return t.syncer.SyncToVirtual(ctx, &synccontext.SyncToVirtualEvent[T]{ - VirtualOld: virtualOldConverted, - Host: hostConverted, - }) -} - -func (t *toSyncer[T]) Sync(ctx *synccontext.SyncContext, event *synccontext.SyncEvent[client.Object]) (ctrl.Result, error) { - hostConverted, ok := event.Host.(T) - virtualConverted, ok2 := event.Virtual.(T) - if !ok || !ok2 { - return reconcile.Result{}, errors.New("syncer: type assertion failed") - } - - hostOldConverted, _ := event.HostOld.(T) - virtualOldConverted, _ := event.VirtualOld.(T) - return t.syncer.Sync(ctx, &synccontext.SyncEvent[T]{ - HostOld: hostOldConverted, - Host: hostConverted, - VirtualOld: virtualOldConverted, - Virtual: virtualConverted, - }) -} - -func (t *toSyncer[T]) SyncToHost(ctx *synccontext.SyncContext, event *synccontext.SyncToHostEvent[client.Object]) (ctrl.Result, error) { - virtualConverted, ok := event.Virtual.(T) - if !ok { - return reconcile.Result{}, errors.New("syncer: type assertion failed") - } - - hostOldConverted, _ := event.HostOld.(T) - return t.syncer.SyncToHost(ctx, &synccontext.SyncToHostEvent[T]{ - HostOld: hostOldConverted, - Virtual: virtualConverted, - }) -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/util/applier/direct.go b/vendor/github.com/loft-sh/vcluster/pkg/util/applier/direct.go index 58e1a066..4fcacd4b 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/util/applier/direct.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/util/applier/direct.go @@ -70,6 +70,7 @@ func (d *DirectApplier) Apply(_ context.Context, opt Options) error { } applyOpts.SetObjects(infos) + applyOpts.Overwrite = true applyOpts.DeleteOptions = &cmdDelete.DeleteOptions{ IOStreams: ioStreams, } diff --git a/vendor/github.com/loft-sh/vcluster/pkg/util/namespaces/util.go b/vendor/github.com/loft-sh/vcluster/pkg/util/namespaces/util.go new file mode 100644 index 00000000..eb39e3f9 --- /dev/null +++ b/vendor/github.com/loft-sh/vcluster/pkg/util/namespaces/util.go @@ -0,0 +1,74 @@ +package namespaces + +import ( + "strings" +) + +const ( + // Name placeholder will be replaced with this virtual cluster name + NamePlaceholder string = "${name}" + + // WildcardChar is used in pattern mappings. + WildcardChar string = "*" +) + +// IsPattern checks if a string contains a wildcard character '*'. +func IsPattern(val string) bool { + return strings.Contains(val, WildcardChar) +} + +// MatchAndExtractWildcard checks if a given name matches a pattern that contains a single wildcard. +// It returns the string captured by the wildcard and a boolean indicating if the match was successful. +// If the provided pattern string does not contain a wildcard, it's not considered a pattern by this function, +// and it will return matched = false. +func MatchAndExtractWildcard(name, pattern string) (wildcardValue string, matched bool) { + if !IsPattern(pattern) { + return "", false + } + + parts := strings.SplitN(pattern, WildcardChar, 2) + prefix := parts[0] + suffix := parts[1] + + if strings.HasPrefix(name, prefix) && strings.HasSuffix(name, suffix) && len(name) >= (len(prefix)+len(suffix)) { + wildcardValue = name[len(prefix) : len(name)-len(suffix)] + return wildcardValue, true + } + + return "", false +} + +// ProcessNamespaceName returns namespace name after applying all pre-processing to it +func ProcessNamespaceName(namespaceName string, vclusterName string) string { + return strings.ReplaceAll(namespaceName, NamePlaceholder, vclusterName) +} + +// TranslateHostNamespace returns virtual namespace name based on host namespace and mappings +func TranslateHostNamespace(vClusterName, hostNamespace string, mappings map[string]string) (string, bool) { + // Priority 1: Exact host name to exact virtual name match + for vName, hName := range mappings { + if !IsPattern(hName) && !IsPattern(vName) { + hNameProcessed := ProcessNamespaceName(hName, vClusterName) + if hNameProcessed == hostNamespace { + virtualNameProcessed := ProcessNamespaceName(vName, vClusterName) + return virtualNameProcessed, true + } + } + } + + // Priority 2: Pattern host name to pattern virtual name match + for vPattern, hPattern := range mappings { + if IsPattern(hPattern) && IsPattern(vPattern) { + hPatternProcessed := ProcessNamespaceName(hPattern, vClusterName) + wildcardValue, matched := MatchAndExtractWildcard(hostNamespace, hPatternProcessed) + if matched { + vPatternProcessed := ProcessNamespaceName(vPattern, vClusterName) + virtualName := strings.Replace(vPatternProcessed, WildcardChar, wildcardValue, 1) + return virtualName, true + } + } + } + + // No mapping rule was found for the given host namespace. + return "", false +} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/util/namespaces/validation.go b/vendor/github.com/loft-sh/vcluster/pkg/util/namespaces/validation.go new file mode 100644 index 00000000..7f6e337c --- /dev/null +++ b/vendor/github.com/loft-sh/vcluster/pkg/util/namespaces/validation.go @@ -0,0 +1,200 @@ +package namespaces + +import ( + "fmt" + "strings" + + "github.com/loft-sh/vcluster/config" + "k8s.io/apimachinery/pkg/api/validation" + "k8s.io/apimachinery/pkg/util/sets" // Ensure this import is present +) + +func ValidateNamespaceSyncConfig(c *config.Config, name, namespace string) error { + if !c.Sync.ToHost.Namespaces.Enabled { + return nil + } + + configPathIdentifier := "config.sync.toHost.namespaces.mappings.byName" + + if len(c.Sync.ToHost.Namespaces.Mappings.ByName) == 0 { + return fmt.Errorf("%s are empty", configPathIdentifier) + } + + virtualNamespaceSet := sets.NewString() + hostNamespaceSet := sets.NewString() + + // for each vnamespace:hostNamespace mapping + for vNS, hNS := range c.Sync.ToHost.Namespaces.Mappings.ByName { + // first check for duplicate entries + if virtualNamespaceSet.Has(vNS) { + return fmt.Errorf("%s: duplicate virtual namespace '%s' found in mappings", configPathIdentifier, vNS) + } + virtualNamespaceSet.Insert(vNS) + + if hostNamespaceSet.Has(hNS) { + return fmt.Errorf("%s: duplicate host namespace '%s' found in mappings", configPathIdentifier, hNS) + } + hostNamespaceSet.Insert(hNS) + + // then check for matching patterns + vIsPattern := IsPattern(vNS) + hIsPattern := IsPattern(hNS) + + if vIsPattern != hIsPattern { + return fmt.Errorf("%s: '%s':'%s' has mismatched wildcard '*' usage - pattern must always map to another pattern", configPathIdentifier, vNS, hNS) + } + + // check common rules for vns and hns sides + var errLoop error + if vIsPattern && hIsPattern { + // validate pattern mapping rule + errLoop = validateToHostPatternNamespaceMapping(vNS, hNS, name, configPathIdentifier) + } else { + // validate exact mapping rule + errLoop = validateToHostExactNamespaceMapping(vNS, hNS, name, configPathIdentifier) + } + if errLoop != nil { + return errLoop + } + + // validate hns rules + if err := validateHostMappingRules(hNS, hIsPattern, configPathIdentifier, name, namespace); err != nil { + return err + } + } + return nil +} + +func validateToHostExactNamespaceMapping(vNS, hNS, vclusterName, configPathIdentifier string) error { + if err := validateToHostExactNamespaceMappingPart(vNS, vclusterName, "virtual namespace", configPathIdentifier); err != nil { + return err + } + + if err := validateToHostExactNamespaceMappingPart(hNS, vclusterName, "host namespace", configPathIdentifier); err != nil { //nolint:revive + return err + } + return nil +} + +func validateToHostPatternNamespaceMapping(vNS, hNS, vclusterName, configPathIdentifier string) error { + if err := validateToHostPatternNamespaceMappingPart(vNS, vclusterName, "virtual namespace", configPathIdentifier); err != nil { + return err + } + + if err := validateToHostPatternNamespaceMappingPart(hNS, vclusterName, "host namespace", configPathIdentifier); err != nil { //nolint:revive + return err + } + return nil +} + +func validateToHostExactNamespaceMappingPart(name, vclusterName, partIdentifier, configPathIdentifier string) error { + if name == "" { + return fmt.Errorf("%s: %s cannot be empty", configPathIdentifier, partIdentifier) + } + if IsPattern(name) { + return fmt.Errorf("%s: %s '%s' is treated as exact but contains a wildcard '*'", configPathIdentifier, partIdentifier, name) + } + + if err := validateNamePlaceholderUsage(name, vclusterName, partIdentifier, configPathIdentifier); err != nil { + return err + } + + nameForValidation := name + if strings.Contains(name, NamePlaceholder) { + nameForValidation = strings.ReplaceAll(name, NamePlaceholder, vclusterName) + } + + errs := validation.ValidateNamespaceName(nameForValidation, false) + if len(errs) > 0 { + return fmt.Errorf("%s: invalid %s name '%s': %v", configPathIdentifier, partIdentifier, name, errs[0]) + } + return nil +} + +func validateToHostPatternNamespaceMappingPart(pattern, vclusterName, partIdentifier, configPathIdentifier string) error { + if !IsPattern(pattern) { + return fmt.Errorf("%s: %s '%s' is treated as a pattern but does not contain a wildcard '*'", configPathIdentifier, partIdentifier, pattern) + } + + if strings.Count(pattern, WildcardChar) != 1 { + return fmt.Errorf("%s: %s pattern '%s' must contain exactly one '*'", configPathIdentifier, partIdentifier, pattern) + } + + if !strings.HasSuffix(pattern, WildcardChar) { + return fmt.Errorf("%s: %s pattern '%s' must have the wildcard '*' at the end", configPathIdentifier, partIdentifier, pattern) + } + + prefix := strings.TrimSuffix(pattern, WildcardChar) + + if err := validateNamePlaceholderUsage(prefix, vclusterName, fmt.Sprintf("%s pattern prefix", partIdentifier), configPathIdentifier); err != nil { + return fmt.Errorf("%w (from pattern '%s')", err, pattern) + } + + literalPrefixForValidation := strings.ReplaceAll(prefix, NamePlaceholder, vclusterName) + + if len(literalPrefixForValidation) == 0 { + // This is a case where we're handling a catch-all '*' pattern - since we removed the wildcard suffix now we're working with empty string + return nil + } + + if len(literalPrefixForValidation) > 32 { + return fmt.Errorf("%s: literal parts of %s pattern prefix '%s' (from '%s') cannot be longer than 32 characters (literal length: %d)", configPathIdentifier, partIdentifier, prefix, pattern, len(literalPrefixForValidation)) + } + + errs := validation.ValidateNamespaceName(literalPrefixForValidation, true) + if len(errs) > 0 { + return fmt.Errorf("%s: invalid %s pattern '%s': %s", configPathIdentifier, partIdentifier, pattern, errs[0]) + } + + return nil +} + +func validateNamePlaceholderUsage(namePart, vclusterName, partTypeIdentifier, configPathIdentifier string) error { + if !strings.Contains(namePart, NamePlaceholder) { + if strings.Contains(namePart, "${") && strings.Contains(namePart, "}") { + return fmt.Errorf("%s: %s '%s' contains an unsupported placeholder; only '%s' is allowed", configPathIdentifier, partTypeIdentifier, namePart, NamePlaceholder) + } + return nil + } + + if strings.Count(namePart, NamePlaceholder) > 1 { + return fmt.Errorf("%s: %s '%s' contains placeholder '%s' multiple times", configPathIdentifier, partTypeIdentifier, namePart, NamePlaceholder) + } + + tempName := strings.ReplaceAll(namePart, NamePlaceholder, vclusterName) + if strings.Contains(tempName, "${") && strings.Contains(tempName, "}") { + return fmt.Errorf("%s: %s '%s' contains an unsupported placeholder; only a single '%s' is allowed", configPathIdentifier, partTypeIdentifier, namePart, NamePlaceholder) + } + + return nil +} + +func validateHostMappingRules(hNS string, hIsPattern bool, configPathIdentifier, vclusterName, vclusterNamespace string) error { + // explicitly check against wildcard "catch all" mapping + if hIsPattern && hNS == WildcardChar { + return fmt.Errorf("%s: host pattern mappings must use a prefix before wildcard: %s", configPathIdentifier, hNS) + } + + // validate we're not mapping to host namespace in which vcluster is running + if err := validateHostMappingNotControlPlane(hNS, hIsPattern, configPathIdentifier, vclusterName, vclusterNamespace); err != nil { + return err + } + + return nil +} + +func validateHostMappingNotControlPlane(hNS string, hIsPattern bool, configPathIdentifier, vclusterName, vclusterNamespace string) error { + if hIsPattern { + resolvedPatternString := ProcessNamespaceName(hNS, vclusterName) + _, matched := MatchAndExtractWildcard(vclusterNamespace, resolvedPatternString) + if matched { + return fmt.Errorf("%s: host namespace pattern '%s' conflicts with control plane namespace '%s'", configPathIdentifier, hNS, vclusterNamespace) + } + } else { + resolvedHNS := ProcessNamespaceName(hNS, vclusterName) + if resolvedHNS == vclusterNamespace { + return fmt.Errorf("%s: host namespace mapping '%s' conflicts with control plane namespace '%s'", configPathIdentifier, hNS, vclusterNamespace) + } + } + return nil +} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/util/translate/labels.go b/vendor/github.com/loft-sh/vcluster/pkg/util/translate/labels.go index 3c74c273..ac5202f7 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/util/translate/labels.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/util/translate/labels.go @@ -58,7 +58,7 @@ func HostLabelsMap(vLabels, pLabels map[string]string, vNamespace string, isMeta if isMetadata || pLabels == nil || pLabels[MarkerLabel] != "" { if vNamespace == "" { newLabels[MarkerLabel] = Default.MarkerLabelCluster() - } else if Default.SingleNamespaceTarget() { + } else { newLabels[MarkerLabel] = VClusterName newLabels[NamespaceLabel] = vNamespace } diff --git a/vendor/github.com/loft-sh/vcluster/pkg/util/translate/multi_namespace.go b/vendor/github.com/loft-sh/vcluster/pkg/util/translate/multi_namespace.go deleted file mode 100644 index 3947c839..00000000 --- a/vendor/github.com/loft-sh/vcluster/pkg/util/translate/multi_namespace.go +++ /dev/null @@ -1,118 +0,0 @@ -package translate - -import ( - "crypto/sha256" - "encoding/hex" - "fmt" - "strings" - - "github.com/loft-sh/vcluster/pkg/scheme" - "github.com/loft-sh/vcluster/pkg/syncer/synccontext" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/apiutil" -) - -var _ Translator = &multiNamespace{} - -func NewMultiNamespaceTranslator(currentNamespace string) Translator { - return &multiNamespace{ - currentNamespace: currentNamespace, - } -} - -type multiNamespace struct { - currentNamespace string -} - -func (s *multiNamespace) SingleNamespaceTarget() bool { - return false -} - -// HostName returns the physical name of the name / namespace resource -func (s *multiNamespace) HostName(ctx *synccontext.SyncContext, name, namespace string) types.NamespacedName { - return types.NamespacedName{ - Name: name, - Namespace: s.HostNamespace(ctx, namespace), - } -} - -// HostNameShort returns the short physical name of the name / namespace resource -func (s *multiNamespace) HostNameShort(ctx *synccontext.SyncContext, name, namespace string) types.NamespacedName { - return s.HostName(ctx, name, namespace) -} - -func (s *multiNamespace) HostNameCluster(name string) string { - if name == "" { - return "" - } - return SafeConcatName("vcluster", name, "x", s.currentNamespace, "x", VClusterName) -} - -func (s *multiNamespace) IsManaged(ctx *synccontext.SyncContext, pObj client.Object) bool { - // check if cluster scoped object - if pObj.GetNamespace() == "" { - return pObj.GetLabels()[MarkerLabel] == s.MarkerLabelCluster() - } - - // vcluster has not synced the object IF: - // If obj is not in the synced namespace OR - // If object-name annotation is not set OR - // If object-name annotation is different from actual name - if !s.IsTargetedNamespace(ctx, pObj.GetNamespace()) || pObj.GetAnnotations()[NameAnnotation] == "" { - return false - } else if pObj.GetAnnotations()[KindAnnotation] != "" { - gvk, err := apiutil.GVKForObject(pObj, scheme.Scheme) - if err == nil && gvk.String() != pObj.GetAnnotations()[KindAnnotation] { - return false - } - } - - // check if host name / namespace matches actual name / namespace - if pObj.GetAnnotations()[HostNameAnnotation] != "" && pObj.GetAnnotations()[HostNameAnnotation] != pObj.GetName() { - return false - } else if pObj.GetAnnotations()[HostNamespaceAnnotation] != "" && pObj.GetAnnotations()[HostNamespaceAnnotation] != pObj.GetNamespace() { - return false - } - - return true -} - -func (s *multiNamespace) LabelsToTranslate() map[string]bool { - return map[string]bool{ - // namespace, marker & controlled-by - NamespaceLabel: true, - MarkerLabel: true, - ControllerLabel: true, - } -} - -func (s *multiNamespace) IsTargetedNamespace(_ *synccontext.SyncContext, pNamespace string) bool { - return strings.HasPrefix(pNamespace, s.getNamespacePrefix()) && strings.HasSuffix(pNamespace, getNamespaceSuffix(s.currentNamespace, VClusterName)) -} - -func (s *multiNamespace) getNamespacePrefix() string { - return "vcluster" -} - -func (s *multiNamespace) HostNamespace(_ *synccontext.SyncContext, vNamespace string) string { - if vNamespace == "" { - return "" - } - - return hostNamespace(s.currentNamespace, vNamespace, s.getNamespacePrefix(), VClusterName) -} - -func hostNamespace(currentNamespace, vNamespace, prefix, suffix string) string { - sha := sha256.Sum256([]byte(vNamespace)) - return fmt.Sprintf("%s-%s-%s", prefix, hex.EncodeToString(sha[0:])[0:8], getNamespaceSuffix(currentNamespace, suffix)) -} - -func getNamespaceSuffix(currentNamespace, suffix string) string { - sha := sha256.Sum256([]byte(currentNamespace + "x" + suffix)) - return hex.EncodeToString(sha[0:])[0:8] -} - -func (s *multiNamespace) MarkerLabelCluster() string { - return SafeConcatName(s.currentNamespace, "x", VClusterName) -} diff --git a/vendor/github.com/loft-sh/vcluster/pkg/util/translate/types.go b/vendor/github.com/loft-sh/vcluster/pkg/util/translate/types.go index ab17d38e..cb88ef2f 100644 --- a/vendor/github.com/loft-sh/vcluster/pkg/util/translate/types.go +++ b/vendor/github.com/loft-sh/vcluster/pkg/util/translate/types.go @@ -7,12 +7,13 @@ import ( ) var ( - NamespaceAnnotation = "vcluster.loft.sh/object-namespace" - NameAnnotation = "vcluster.loft.sh/object-name" - UIDAnnotation = "vcluster.loft.sh/object-uid" - KindAnnotation = "vcluster.loft.sh/object-kind" - HostNameAnnotation = "vcluster.loft.sh/object-host-name" - HostNamespaceAnnotation = "vcluster.loft.sh/object-host-namespace" + NamespaceAnnotation = "vcluster.loft.sh/object-namespace" + NameAnnotation = "vcluster.loft.sh/object-name" + UIDAnnotation = "vcluster.loft.sh/object-uid" + KindAnnotation = "vcluster.loft.sh/object-kind" + HostNameAnnotation = "vcluster.loft.sh/object-host-name" + HostNamespaceAnnotation = "vcluster.loft.sh/object-host-namespace" + ImportedMarkerAnnotation = "vcluster.loft.sh/object-imported" ) var ( diff --git a/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go b/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go index e0ac3466..6f120018 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go @@ -158,6 +158,9 @@ func GatherAndCount(g prometheus.Gatherer, metricNames ...string) (int, error) { // ScrapeAndCompare calls a remote exporter's endpoint which is expected to return some metrics in // plain text format. Then it compares it with the results that the `expected` would return. // If the `metricNames` is not empty it would filter the comparison only to the given metric names. +// +// NOTE: Be mindful of accidental discrepancies between expected and metricNames; metricNames filter +// both expected and scraped metrics. See https://github.com/prometheus/client_golang/issues/1351. func ScrapeAndCompare(url string, expected io.Reader, metricNames ...string) error { resp, err := http.Get(url) if err != nil { @@ -185,6 +188,9 @@ func ScrapeAndCompare(url string, expected io.Reader, metricNames ...string) err // CollectAndCompare collects the metrics identified by `metricNames` and compares them in the Prometheus text // exposition format to the data read from expected. +// +// NOTE: Be mindful of accidental discrepancies between expected and metricNames; metricNames filter +// both expected and collected metrics. See https://github.com/prometheus/client_golang/issues/1351. func CollectAndCompare(c prometheus.Collector, expected io.Reader, metricNames ...string) error { reg := prometheus.NewPedanticRegistry() if err := reg.Register(c); err != nil { @@ -197,6 +203,9 @@ func CollectAndCompare(c prometheus.Collector, expected io.Reader, metricNames . // it to an expected output read from the provided Reader in the Prometheus text // exposition format. If any metricNames are provided, only metrics with those // names are compared. +// +// NOTE: Be mindful of accidental discrepancies between expected and metricNames; metricNames filter +// both expected and gathered metrics. See https://github.com/prometheus/client_golang/issues/1351. func GatherAndCompare(g prometheus.Gatherer, expected io.Reader, metricNames ...string) error { return TransactionalGatherAndCompare(prometheus.ToTransactionalGatherer(g), expected, metricNames...) } @@ -205,6 +214,9 @@ func GatherAndCompare(g prometheus.Gatherer, expected io.Reader, metricNames ... // it to an expected output read from the provided Reader in the Prometheus text // exposition format. If any metricNames are provided, only metrics with those // names are compared. +// +// NOTE: Be mindful of accidental discrepancies between expected and metricNames; metricNames filter +// both expected and gathered metrics. See https://github.com/prometheus/client_golang/issues/1351. func TransactionalGatherAndCompare(g prometheus.TransactionalGatherer, expected io.Reader, metricNames ...string) error { got, done, err := g.Gather() defer done() @@ -277,15 +289,6 @@ func compareMetricFamilies(got, expected []*dto.MetricFamily, metricNames ...str if metricNames != nil { got = filterMetrics(got, metricNames) expected = filterMetrics(expected, metricNames) - if len(metricNames) > len(got) { - var missingMetricNames []string - for _, name := range metricNames { - if ok := hasMetricByName(got, name); !ok { - missingMetricNames = append(missingMetricNames, name) - } - } - return fmt.Errorf("expected metric name(s) not found: %v", missingMetricNames) - } } return compare(got, expected) @@ -327,12 +330,3 @@ func filterMetrics(metrics []*dto.MetricFamily, names []string) []*dto.MetricFam } return filtered } - -func hasMetricByName(metrics []*dto.MetricFamily, name string) bool { - for _, mf := range metrics { - if mf.GetName() == name { - return true - } - } - return false -} diff --git a/vendor/golang.org/x/exp/constraints/constraints.go b/vendor/golang.org/x/exp/constraints/constraints.go index 2c033dff..a9392af7 100644 --- a/vendor/golang.org/x/exp/constraints/constraints.go +++ b/vendor/golang.org/x/exp/constraints/constraints.go @@ -45,6 +45,8 @@ type Complex interface { // that supports the operators < <= >= >. // If future releases of Go add new ordered types, // this constraint will be modified to include them. +// +// This type is redundant since Go 1.21 introduced [cmp.Ordered]. type Ordered interface { Integer | Float | ~string } diff --git a/vendor/golang.org/x/exp/slices/cmp.go b/vendor/golang.org/x/exp/slices/cmp.go deleted file mode 100644 index fbf1934a..00000000 --- a/vendor/golang.org/x/exp/slices/cmp.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2023 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 slices - -import "golang.org/x/exp/constraints" - -// min is a version of the predeclared function from the Go 1.21 release. -func min[T constraints.Ordered](a, b T) T { - if a < b || isNaN(a) { - return a - } - return b -} - -// max is a version of the predeclared function from the Go 1.21 release. -func max[T constraints.Ordered](a, b T) T { - if a > b || isNaN(a) { - return a - } - return b -} - -// cmpLess is a copy of cmp.Less from the Go 1.21 release. -func cmpLess[T constraints.Ordered](x, y T) bool { - return (isNaN(x) && !isNaN(y)) || x < y -} - -// cmpCompare is a copy of cmp.Compare from the Go 1.21 release. -func cmpCompare[T constraints.Ordered](x, y T) int { - xNaN := isNaN(x) - yNaN := isNaN(y) - if xNaN && yNaN { - return 0 - } - if xNaN || x < y { - return -1 - } - if yNaN || x > y { - return +1 - } - return 0 -} diff --git a/vendor/golang.org/x/exp/slices/slices.go b/vendor/golang.org/x/exp/slices/slices.go index 46ceac34..757383ea 100644 --- a/vendor/golang.org/x/exp/slices/slices.go +++ b/vendor/golang.org/x/exp/slices/slices.go @@ -6,26 +6,22 @@ package slices import ( - "unsafe" - - "golang.org/x/exp/constraints" + "cmp" + "slices" ) +// TODO(adonovan): when https://go.dev/issue/32816 is accepted, all of +// these functions should be annotated (provisionally with "//go:fix +// inline") so that tools can safely and automatically replace calls +// to exp/slices with calls to std slices by inlining them. + // Equal reports whether two slices are equal: the same length and all // elements equal. If the lengths are different, Equal returns false. // Otherwise, the elements are compared in increasing index order, and the // comparison stops at the first unequal pair. // Floating point NaNs are not considered equal. func Equal[S ~[]E, E comparable](s1, s2 S) bool { - if len(s1) != len(s2) { - return false - } - for i := range s1 { - if s1[i] != s2[i] { - return false - } - } - return true + return slices.Equal(s1, s2) } // EqualFunc reports whether two slices are equal using an equality @@ -34,16 +30,7 @@ func Equal[S ~[]E, E comparable](s1, s2 S) bool { // increasing index order, and the comparison stops at the first index // for which eq returns false. func EqualFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, eq func(E1, E2) bool) bool { - if len(s1) != len(s2) { - return false - } - for i, v1 := range s1 { - v2 := s2[i] - if !eq(v1, v2) { - return false - } - } - return true + return slices.EqualFunc(s1, s2, eq) } // Compare compares the elements of s1 and s2, using [cmp.Compare] on each pair @@ -53,20 +40,8 @@ func EqualFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, eq func(E1, E2) boo // If both slices are equal until one of them ends, the shorter slice is // considered less than the longer one. // The result is 0 if s1 == s2, -1 if s1 < s2, and +1 if s1 > s2. -func Compare[S ~[]E, E constraints.Ordered](s1, s2 S) int { - for i, v1 := range s1 { - if i >= len(s2) { - return +1 - } - v2 := s2[i] - if c := cmpCompare(v1, v2); c != 0 { - return c - } - } - if len(s1) < len(s2) { - return -1 - } - return 0 +func Compare[S ~[]E, E cmp.Ordered](s1, s2 S) int { + return slices.Compare(s1, s2) } // CompareFunc is like [Compare] but uses a custom comparison function on each @@ -75,52 +50,30 @@ func Compare[S ~[]E, E constraints.Ordered](s1, s2 S) int { // returns 0 the result is 0 if len(s1) == len(s2), -1 if len(s1) < len(s2), // and +1 if len(s1) > len(s2). func CompareFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, cmp func(E1, E2) int) int { - for i, v1 := range s1 { - if i >= len(s2) { - return +1 - } - v2 := s2[i] - if c := cmp(v1, v2); c != 0 { - return c - } - } - if len(s1) < len(s2) { - return -1 - } - return 0 + return slices.CompareFunc(s1, s2, cmp) } // Index returns the index of the first occurrence of v in s, // or -1 if not present. func Index[S ~[]E, E comparable](s S, v E) int { - for i := range s { - if v == s[i] { - return i - } - } - return -1 + return slices.Index(s, v) } // IndexFunc returns the first index i satisfying f(s[i]), // or -1 if none do. func IndexFunc[S ~[]E, E any](s S, f func(E) bool) int { - for i := range s { - if f(s[i]) { - return i - } - } - return -1 + return slices.IndexFunc(s, f) } // Contains reports whether v is present in s. func Contains[S ~[]E, E comparable](s S, v E) bool { - return Index(s, v) >= 0 + return slices.Contains(s, v) } // ContainsFunc reports whether at least one // element e of s satisfies f(e). func ContainsFunc[S ~[]E, E any](s S, f func(E) bool) bool { - return IndexFunc(s, f) >= 0 + return slices.ContainsFunc(s, f) } // Insert inserts the values v... into s at index i, @@ -131,92 +84,7 @@ func ContainsFunc[S ~[]E, E any](s S, f func(E) bool) bool { // Insert panics if i is out of range. // This function is O(len(s) + len(v)). func Insert[S ~[]E, E any](s S, i int, v ...E) S { - m := len(v) - if m == 0 { - return s - } - n := len(s) - if i == n { - return append(s, v...) - } - if n+m > cap(s) { - // Use append rather than make so that we bump the size of - // the slice up to the next storage class. - // This is what Grow does but we don't call Grow because - // that might copy the values twice. - s2 := append(s[:i], make(S, n+m-i)...) - copy(s2[i:], v) - copy(s2[i+m:], s[i:]) - return s2 - } - s = s[:n+m] - - // before: - // s: aaaaaaaabbbbccccccccdddd - // ^ ^ ^ ^ - // i i+m n n+m - // after: - // s: aaaaaaaavvvvbbbbcccccccc - // ^ ^ ^ ^ - // i i+m n n+m - // - // a are the values that don't move in s. - // v are the values copied in from v. - // b and c are the values from s that are shifted up in index. - // d are the values that get overwritten, never to be seen again. - - if !overlaps(v, s[i+m:]) { - // Easy case - v does not overlap either the c or d regions. - // (It might be in some of a or b, or elsewhere entirely.) - // The data we copy up doesn't write to v at all, so just do it. - - copy(s[i+m:], s[i:]) - - // Now we have - // s: aaaaaaaabbbbbbbbcccccccc - // ^ ^ ^ ^ - // i i+m n n+m - // Note the b values are duplicated. - - copy(s[i:], v) - - // Now we have - // s: aaaaaaaavvvvbbbbcccccccc - // ^ ^ ^ ^ - // i i+m n n+m - // That's the result we want. - return s - } - - // The hard case - v overlaps c or d. We can't just shift up - // the data because we'd move or clobber the values we're trying - // to insert. - // So instead, write v on top of d, then rotate. - copy(s[n:], v) - - // Now we have - // s: aaaaaaaabbbbccccccccvvvv - // ^ ^ ^ ^ - // i i+m n n+m - - rotateRight(s[i:], m) - - // Now we have - // s: aaaaaaaavvvvbbbbcccccccc - // ^ ^ ^ ^ - // i i+m n n+m - // That's the result we want. - return s -} - -// clearSlice sets all elements up to the length of s to the zero value of E. -// We may use the builtin clear func instead, and remove clearSlice, when upgrading -// to Go 1.21+. -func clearSlice[S ~[]E, E any](s S) { - var zero E - for i := range s { - s[i] = zero - } + return slices.Insert(s, i, v...) } // Delete removes the elements s[i:j] from s, returning the modified slice. @@ -225,135 +93,27 @@ func clearSlice[S ~[]E, E any](s S) { // make a single call deleting them all together than to delete one at a time. // Delete zeroes the elements s[len(s)-(j-i):len(s)]. func Delete[S ~[]E, E any](s S, i, j int) S { - _ = s[i:j:len(s)] // bounds check - - if i == j { - return s - } - - oldlen := len(s) - s = append(s[:i], s[j:]...) - clearSlice(s[len(s):oldlen]) // zero/nil out the obsolete elements, for GC - return s + return slices.Delete(s, i, j) } // DeleteFunc removes any elements from s for which del returns true, // returning the modified slice. // DeleteFunc zeroes the elements between the new length and the original length. func DeleteFunc[S ~[]E, E any](s S, del func(E) bool) S { - i := IndexFunc(s, del) - if i == -1 { - return s - } - // Don't start copying elements until we find one to delete. - for j := i + 1; j < len(s); j++ { - if v := s[j]; !del(v) { - s[i] = v - i++ - } - } - clearSlice(s[i:]) // zero/nil out the obsolete elements, for GC - return s[:i] + return slices.DeleteFunc(s, del) } // Replace replaces the elements s[i:j] by the given v, and returns the // modified slice. Replace panics if s[i:j] is not a valid slice of s. // When len(v) < (j-i), Replace zeroes the elements between the new length and the original length. func Replace[S ~[]E, E any](s S, i, j int, v ...E) S { - _ = s[i:j] // verify that i:j is a valid subslice - - if i == j { - return Insert(s, i, v...) - } - if j == len(s) { - return append(s[:i], v...) - } - - tot := len(s[:i]) + len(v) + len(s[j:]) - if tot > cap(s) { - // Too big to fit, allocate and copy over. - s2 := append(s[:i], make(S, tot-i)...) // See Insert - copy(s2[i:], v) - copy(s2[i+len(v):], s[j:]) - return s2 - } - - r := s[:tot] - - if i+len(v) <= j { - // Easy, as v fits in the deleted portion. - copy(r[i:], v) - if i+len(v) != j { - copy(r[i+len(v):], s[j:]) - } - clearSlice(s[tot:]) // zero/nil out the obsolete elements, for GC - return r - } - - // We are expanding (v is bigger than j-i). - // The situation is something like this: - // (example has i=4,j=8,len(s)=16,len(v)=6) - // s: aaaaxxxxbbbbbbbbyy - // ^ ^ ^ ^ - // i j len(s) tot - // a: prefix of s - // x: deleted range - // b: more of s - // y: area to expand into - - if !overlaps(r[i+len(v):], v) { - // Easy, as v is not clobbered by the first copy. - copy(r[i+len(v):], s[j:]) - copy(r[i:], v) - return r - } - - // This is a situation where we don't have a single place to which - // we can copy v. Parts of it need to go to two different places. - // We want to copy the prefix of v into y and the suffix into x, then - // rotate |y| spots to the right. - // - // v[2:] v[:2] - // | | - // s: aaaavvvvbbbbbbbbvv - // ^ ^ ^ ^ - // i j len(s) tot - // - // If either of those two destinations don't alias v, then we're good. - y := len(v) - (j - i) // length of y portion - - if !overlaps(r[i:j], v) { - copy(r[i:j], v[y:]) - copy(r[len(s):], v[:y]) - rotateRight(r[i:], y) - return r - } - if !overlaps(r[len(s):], v) { - copy(r[len(s):], v[:y]) - copy(r[i:j], v[y:]) - rotateRight(r[i:], y) - return r - } - - // Now we know that v overlaps both x and y. - // That means that the entirety of b is *inside* v. - // So we don't need to preserve b at all; instead we - // can copy v first, then copy the b part of v out of - // v to the right destination. - k := startIdx(v, s[j:]) - copy(r[i:], v) - copy(r[i+len(v):], r[i+k:]) - return r + return slices.Replace(s, i, j, v...) } // Clone returns a copy of the slice. // The elements are copied using assignment, so this is a shallow clone. func Clone[S ~[]E, E any](s S) S { - // Preserve nil in case it matters. - if s == nil { - return nil - } - return append(S([]E{}), s...) + return slices.Clone(s) } // Compact replaces consecutive runs of equal elements with a single copy. @@ -362,40 +122,14 @@ func Clone[S ~[]E, E any](s S) S { // which may have a smaller length. // Compact zeroes the elements between the new length and the original length. func Compact[S ~[]E, E comparable](s S) S { - if len(s) < 2 { - return s - } - i := 1 - for k := 1; k < len(s); k++ { - if s[k] != s[k-1] { - if i != k { - s[i] = s[k] - } - i++ - } - } - clearSlice(s[i:]) // zero/nil out the obsolete elements, for GC - return s[:i] + return slices.Compact(s) } // CompactFunc is like [Compact] but uses an equality function to compare elements. // For runs of elements that compare equal, CompactFunc keeps the first one. // CompactFunc zeroes the elements between the new length and the original length. func CompactFunc[S ~[]E, E any](s S, eq func(E, E) bool) S { - if len(s) < 2 { - return s - } - i := 1 - for k := 1; k < len(s); k++ { - if !eq(s[k], s[k-1]) { - if i != k { - s[i] = s[k] - } - i++ - } - } - clearSlice(s[i:]) // zero/nil out the obsolete elements, for GC - return s[:i] + return slices.CompactFunc(s, eq) } // Grow increases the slice's capacity, if necessary, to guarantee space for @@ -403,113 +137,15 @@ func CompactFunc[S ~[]E, E any](s S, eq func(E, E) bool) S { // to the slice without another allocation. If n is negative or too large to // allocate the memory, Grow panics. func Grow[S ~[]E, E any](s S, n int) S { - if n < 0 { - panic("cannot be negative") - } - if n -= cap(s) - len(s); n > 0 { - // TODO(https://go.dev/issue/53888): Make using []E instead of S - // to workaround a compiler bug where the runtime.growslice optimization - // does not take effect. Revert when the compiler is fixed. - s = append([]E(s)[:cap(s)], make([]E, n)...)[:len(s)] - } - return s + return slices.Grow(s, n) } // Clip removes unused capacity from the slice, returning s[:len(s):len(s)]. func Clip[S ~[]E, E any](s S) S { - return s[:len(s):len(s)] -} - -// Rotation algorithm explanation: -// -// rotate left by 2 -// start with -// 0123456789 -// split up like this -// 01 234567 89 -// swap first 2 and last 2 -// 89 234567 01 -// join first parts -// 89234567 01 -// recursively rotate first left part by 2 -// 23456789 01 -// join at the end -// 2345678901 -// -// rotate left by 8 -// start with -// 0123456789 -// split up like this -// 01 234567 89 -// swap first 2 and last 2 -// 89 234567 01 -// join last parts -// 89 23456701 -// recursively rotate second part left by 6 -// 89 01234567 -// join at the end -// 8901234567 - -// TODO: There are other rotate algorithms. -// This algorithm has the desirable property that it moves each element exactly twice. -// The triple-reverse algorithm is simpler and more cache friendly, but takes more writes. -// The follow-cycles algorithm can be 1-write but it is not very cache friendly. - -// rotateLeft rotates b left by n spaces. -// s_final[i] = s_orig[i+r], wrapping around. -func rotateLeft[E any](s []E, r int) { - for r != 0 && r != len(s) { - if r*2 <= len(s) { - swap(s[:r], s[len(s)-r:]) - s = s[:len(s)-r] - } else { - swap(s[:len(s)-r], s[r:]) - s, r = s[len(s)-r:], r*2-len(s) - } - } -} -func rotateRight[E any](s []E, r int) { - rotateLeft(s, len(s)-r) -} - -// swap swaps the contents of x and y. x and y must be equal length and disjoint. -func swap[E any](x, y []E) { - for i := 0; i < len(x); i++ { - x[i], y[i] = y[i], x[i] - } -} - -// overlaps reports whether the memory ranges a[0:len(a)] and b[0:len(b)] overlap. -func overlaps[E any](a, b []E) bool { - if len(a) == 0 || len(b) == 0 { - return false - } - elemSize := unsafe.Sizeof(a[0]) - if elemSize == 0 { - return false - } - // TODO: use a runtime/unsafe facility once one becomes available. See issue 12445. - // Also see crypto/internal/alias/alias.go:AnyOverlap - return uintptr(unsafe.Pointer(&a[0])) <= uintptr(unsafe.Pointer(&b[len(b)-1]))+(elemSize-1) && - uintptr(unsafe.Pointer(&b[0])) <= uintptr(unsafe.Pointer(&a[len(a)-1]))+(elemSize-1) -} - -// startIdx returns the index in haystack where the needle starts. -// prerequisite: the needle must be aliased entirely inside the haystack. -func startIdx[E any](haystack, needle []E) int { - p := &needle[0] - for i := range haystack { - if p == &haystack[i] { - return i - } - } - // TODO: what if the overlap is by a non-integral number of Es? - panic("needle not found") + return slices.Clip(s) } // Reverse reverses the elements of the slice in place. func Reverse[S ~[]E, E any](s S) { - for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { - s[i], s[j] = s[j], s[i] - } + slices.Reverse(s) } diff --git a/vendor/golang.org/x/exp/slices/sort.go b/vendor/golang.org/x/exp/slices/sort.go index f58bbc7b..e270a746 100644 --- a/vendor/golang.org/x/exp/slices/sort.go +++ b/vendor/golang.org/x/exp/slices/sort.go @@ -2,21 +2,20 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:generate go run $GOROOT/src/sort/gen_sort_variants.go -exp - package slices import ( - "math/bits" - - "golang.org/x/exp/constraints" + "cmp" + "slices" ) +// TODO(adonovan): add a "//go:fix inline" annotation to each function +// in this file; see https://go.dev/issue/32816. + // Sort sorts a slice of any ordered type in ascending order. // When sorting floating-point numbers, NaNs are ordered before other values. -func Sort[S ~[]E, E constraints.Ordered](x S) { - n := len(x) - pdqsortOrdered(x, 0, n, bits.Len(uint(n))) +func Sort[S ~[]E, E cmp.Ordered](x S) { + slices.Sort(x) } // SortFunc sorts the slice x in ascending order as determined by the cmp @@ -29,118 +28,60 @@ func Sort[S ~[]E, E constraints.Ordered](x S) { // See https://en.wikipedia.org/wiki/Weak_ordering#Strict_weak_orderings. // To indicate 'uncomparable', return 0 from the function. func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int) { - n := len(x) - pdqsortCmpFunc(x, 0, n, bits.Len(uint(n)), cmp) + slices.SortFunc(x, cmp) } // SortStableFunc sorts the slice x while keeping the original order of equal // elements, using cmp to compare elements in the same way as [SortFunc]. func SortStableFunc[S ~[]E, E any](x S, cmp func(a, b E) int) { - stableCmpFunc(x, len(x), cmp) + slices.SortStableFunc(x, cmp) } // IsSorted reports whether x is sorted in ascending order. -func IsSorted[S ~[]E, E constraints.Ordered](x S) bool { - for i := len(x) - 1; i > 0; i-- { - if cmpLess(x[i], x[i-1]) { - return false - } - } - return true +func IsSorted[S ~[]E, E cmp.Ordered](x S) bool { + return slices.IsSorted(x) } // IsSortedFunc reports whether x is sorted in ascending order, with cmp as the // comparison function as defined by [SortFunc]. func IsSortedFunc[S ~[]E, E any](x S, cmp func(a, b E) int) bool { - for i := len(x) - 1; i > 0; i-- { - if cmp(x[i], x[i-1]) < 0 { - return false - } - } - return true + return slices.IsSortedFunc(x, cmp) } // Min returns the minimal value in x. It panics if x is empty. // For floating-point numbers, Min propagates NaNs (any NaN value in x // forces the output to be NaN). -func Min[S ~[]E, E constraints.Ordered](x S) E { - if len(x) < 1 { - panic("slices.Min: empty list") - } - m := x[0] - for i := 1; i < len(x); i++ { - m = min(m, x[i]) - } - return m +func Min[S ~[]E, E cmp.Ordered](x S) E { + return slices.Min(x) } // MinFunc returns the minimal value in x, using cmp to compare elements. // It panics if x is empty. If there is more than one minimal element // according to the cmp function, MinFunc returns the first one. func MinFunc[S ~[]E, E any](x S, cmp func(a, b E) int) E { - if len(x) < 1 { - panic("slices.MinFunc: empty list") - } - m := x[0] - for i := 1; i < len(x); i++ { - if cmp(x[i], m) < 0 { - m = x[i] - } - } - return m + return slices.MinFunc(x, cmp) } // Max returns the maximal value in x. It panics if x is empty. // For floating-point E, Max propagates NaNs (any NaN value in x // forces the output to be NaN). -func Max[S ~[]E, E constraints.Ordered](x S) E { - if len(x) < 1 { - panic("slices.Max: empty list") - } - m := x[0] - for i := 1; i < len(x); i++ { - m = max(m, x[i]) - } - return m +func Max[S ~[]E, E cmp.Ordered](x S) E { + return slices.Max(x) } // MaxFunc returns the maximal value in x, using cmp to compare elements. // It panics if x is empty. If there is more than one maximal element // according to the cmp function, MaxFunc returns the first one. func MaxFunc[S ~[]E, E any](x S, cmp func(a, b E) int) E { - if len(x) < 1 { - panic("slices.MaxFunc: empty list") - } - m := x[0] - for i := 1; i < len(x); i++ { - if cmp(x[i], m) > 0 { - m = x[i] - } - } - return m + return slices.MaxFunc(x, cmp) } // BinarySearch searches for target in a sorted slice and returns the position // where target is found, or the position where target would appear in the // sort order; it also returns a bool saying whether the target is really found // in the slice. The slice must be sorted in increasing order. -func BinarySearch[S ~[]E, E constraints.Ordered](x S, target E) (int, bool) { - // Inlining is faster than calling BinarySearchFunc with a lambda. - n := len(x) - // Define x[-1] < target and x[n] >= target. - // Invariant: x[i-1] < target, x[j] >= target. - i, j := 0, n - for i < j { - h := int(uint(i+j) >> 1) // avoid overflow when computing h - // i ≤ h < j - if cmpLess(x[h], target) { - i = h + 1 // preserves x[i-1] < target - } else { - j = h // preserves x[j] >= target - } - } - // i == j, x[i-1] < target, and x[j] (= x[i]) >= target => answer is i. - return i, i < n && (x[i] == target || (isNaN(x[i]) && isNaN(target))) +func BinarySearch[S ~[]E, E cmp.Ordered](x S, target E) (int, bool) { + return slices.BinarySearch(x, target) } // BinarySearchFunc works like [BinarySearch], but uses a custom comparison @@ -151,47 +92,5 @@ func BinarySearch[S ~[]E, E constraints.Ordered](x S, target E) (int, bool) { // cmp must implement the same ordering as the slice, such that if // cmp(a, t) < 0 and cmp(b, t) >= 0, then a must precede b in the slice. func BinarySearchFunc[S ~[]E, E, T any](x S, target T, cmp func(E, T) int) (int, bool) { - n := len(x) - // Define cmp(x[-1], target) < 0 and cmp(x[n], target) >= 0 . - // Invariant: cmp(x[i - 1], target) < 0, cmp(x[j], target) >= 0. - i, j := 0, n - for i < j { - h := int(uint(i+j) >> 1) // avoid overflow when computing h - // i ≤ h < j - if cmp(x[h], target) < 0 { - i = h + 1 // preserves cmp(x[i - 1], target) < 0 - } else { - j = h // preserves cmp(x[j], target) >= 0 - } - } - // i == j, cmp(x[i-1], target) < 0, and cmp(x[j], target) (= cmp(x[i], target)) >= 0 => answer is i. - return i, i < n && cmp(x[i], target) == 0 -} - -type sortedHint int // hint for pdqsort when choosing the pivot - -const ( - unknownHint sortedHint = iota - increasingHint - decreasingHint -) - -// xorshift paper: https://www.jstatsoft.org/article/view/v008i14/xorshift.pdf -type xorshift uint64 - -func (r *xorshift) Next() uint64 { - *r ^= *r << 13 - *r ^= *r >> 17 - *r ^= *r << 5 - return uint64(*r) -} - -func nextPowerOfTwo(length int) uint { - return 1 << bits.Len(uint(length)) -} - -// isNaN reports whether x is a NaN without requiring the math package. -// This will always return false if T is not floating-point. -func isNaN[T constraints.Ordered](x T) bool { - return x != x + return slices.BinarySearchFunc(x, target, cmp) } diff --git a/vendor/golang.org/x/exp/slices/zsortanyfunc.go b/vendor/golang.org/x/exp/slices/zsortanyfunc.go deleted file mode 100644 index 06f2c7a2..00000000 --- a/vendor/golang.org/x/exp/slices/zsortanyfunc.go +++ /dev/null @@ -1,479 +0,0 @@ -// Code generated by gen_sort_variants.go; DO NOT EDIT. - -// 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. - -package slices - -// insertionSortCmpFunc sorts data[a:b] using insertion sort. -func insertionSortCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) { - for i := a + 1; i < b; i++ { - for j := i; j > a && (cmp(data[j], data[j-1]) < 0); j-- { - data[j], data[j-1] = data[j-1], data[j] - } - } -} - -// siftDownCmpFunc implements the heap property on data[lo:hi]. -// first is an offset into the array where the root of the heap lies. -func siftDownCmpFunc[E any](data []E, lo, hi, first int, cmp func(a, b E) int) { - root := lo - for { - child := 2*root + 1 - if child >= hi { - break - } - if child+1 < hi && (cmp(data[first+child], data[first+child+1]) < 0) { - child++ - } - if !(cmp(data[first+root], data[first+child]) < 0) { - return - } - data[first+root], data[first+child] = data[first+child], data[first+root] - root = child - } -} - -func heapSortCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) { - first := a - lo := 0 - hi := b - a - - // Build heap with greatest element at top. - for i := (hi - 1) / 2; i >= 0; i-- { - siftDownCmpFunc(data, i, hi, first, cmp) - } - - // Pop elements, largest first, into end of data. - for i := hi - 1; i >= 0; i-- { - data[first], data[first+i] = data[first+i], data[first] - siftDownCmpFunc(data, lo, i, first, cmp) - } -} - -// pdqsortCmpFunc sorts data[a:b]. -// The algorithm based on pattern-defeating quicksort(pdqsort), but without the optimizations from BlockQuicksort. -// pdqsort paper: https://arxiv.org/pdf/2106.05123.pdf -// C++ implementation: https://github.com/orlp/pdqsort -// Rust implementation: https://docs.rs/pdqsort/latest/pdqsort/ -// limit is the number of allowed bad (very unbalanced) pivots before falling back to heapsort. -func pdqsortCmpFunc[E any](data []E, a, b, limit int, cmp func(a, b E) int) { - const maxInsertion = 12 - - var ( - wasBalanced = true // whether the last partitioning was reasonably balanced - wasPartitioned = true // whether the slice was already partitioned - ) - - for { - length := b - a - - if length <= maxInsertion { - insertionSortCmpFunc(data, a, b, cmp) - return - } - - // Fall back to heapsort if too many bad choices were made. - if limit == 0 { - heapSortCmpFunc(data, a, b, cmp) - return - } - - // If the last partitioning was imbalanced, we need to breaking patterns. - if !wasBalanced { - breakPatternsCmpFunc(data, a, b, cmp) - limit-- - } - - pivot, hint := choosePivotCmpFunc(data, a, b, cmp) - if hint == decreasingHint { - reverseRangeCmpFunc(data, a, b, cmp) - // The chosen pivot was pivot-a elements after the start of the array. - // After reversing it is pivot-a elements before the end of the array. - // The idea came from Rust's implementation. - pivot = (b - 1) - (pivot - a) - hint = increasingHint - } - - // The slice is likely already sorted. - if wasBalanced && wasPartitioned && hint == increasingHint { - if partialInsertionSortCmpFunc(data, a, b, cmp) { - return - } - } - - // Probably the slice contains many duplicate elements, partition the slice into - // elements equal to and elements greater than the pivot. - if a > 0 && !(cmp(data[a-1], data[pivot]) < 0) { - mid := partitionEqualCmpFunc(data, a, b, pivot, cmp) - a = mid - continue - } - - mid, alreadyPartitioned := partitionCmpFunc(data, a, b, pivot, cmp) - wasPartitioned = alreadyPartitioned - - leftLen, rightLen := mid-a, b-mid - balanceThreshold := length / 8 - if leftLen < rightLen { - wasBalanced = leftLen >= balanceThreshold - pdqsortCmpFunc(data, a, mid, limit, cmp) - a = mid + 1 - } else { - wasBalanced = rightLen >= balanceThreshold - pdqsortCmpFunc(data, mid+1, b, limit, cmp) - b = mid - } - } -} - -// partitionCmpFunc does one quicksort partition. -// Let p = data[pivot] -// Moves elements in data[a:b] around, so that data[i]

=p for inewpivot. -// On return, data[newpivot] = p -func partitionCmpFunc[E any](data []E, a, b, pivot int, cmp func(a, b E) int) (newpivot int, alreadyPartitioned bool) { - data[a], data[pivot] = data[pivot], data[a] - i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned - - for i <= j && (cmp(data[i], data[a]) < 0) { - i++ - } - for i <= j && !(cmp(data[j], data[a]) < 0) { - j-- - } - if i > j { - data[j], data[a] = data[a], data[j] - return j, true - } - data[i], data[j] = data[j], data[i] - i++ - j-- - - for { - for i <= j && (cmp(data[i], data[a]) < 0) { - i++ - } - for i <= j && !(cmp(data[j], data[a]) < 0) { - j-- - } - if i > j { - break - } - data[i], data[j] = data[j], data[i] - i++ - j-- - } - data[j], data[a] = data[a], data[j] - return j, false -} - -// partitionEqualCmpFunc partitions data[a:b] into elements equal to data[pivot] followed by elements greater than data[pivot]. -// It assumed that data[a:b] does not contain elements smaller than the data[pivot]. -func partitionEqualCmpFunc[E any](data []E, a, b, pivot int, cmp func(a, b E) int) (newpivot int) { - data[a], data[pivot] = data[pivot], data[a] - i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned - - for { - for i <= j && !(cmp(data[a], data[i]) < 0) { - i++ - } - for i <= j && (cmp(data[a], data[j]) < 0) { - j-- - } - if i > j { - break - } - data[i], data[j] = data[j], data[i] - i++ - j-- - } - return i -} - -// partialInsertionSortCmpFunc partially sorts a slice, returns true if the slice is sorted at the end. -func partialInsertionSortCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) bool { - const ( - maxSteps = 5 // maximum number of adjacent out-of-order pairs that will get shifted - shortestShifting = 50 // don't shift any elements on short arrays - ) - i := a + 1 - for j := 0; j < maxSteps; j++ { - for i < b && !(cmp(data[i], data[i-1]) < 0) { - i++ - } - - if i == b { - return true - } - - if b-a < shortestShifting { - return false - } - - data[i], data[i-1] = data[i-1], data[i] - - // Shift the smaller one to the left. - if i-a >= 2 { - for j := i - 1; j >= 1; j-- { - if !(cmp(data[j], data[j-1]) < 0) { - break - } - data[j], data[j-1] = data[j-1], data[j] - } - } - // Shift the greater one to the right. - if b-i >= 2 { - for j := i + 1; j < b; j++ { - if !(cmp(data[j], data[j-1]) < 0) { - break - } - data[j], data[j-1] = data[j-1], data[j] - } - } - } - return false -} - -// breakPatternsCmpFunc scatters some elements around in an attempt to break some patterns -// that might cause imbalanced partitions in quicksort. -func breakPatternsCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) { - length := b - a - if length >= 8 { - random := xorshift(length) - modulus := nextPowerOfTwo(length) - - for idx := a + (length/4)*2 - 1; idx <= a+(length/4)*2+1; idx++ { - other := int(uint(random.Next()) & (modulus - 1)) - if other >= length { - other -= length - } - data[idx], data[a+other] = data[a+other], data[idx] - } - } -} - -// choosePivotCmpFunc chooses a pivot in data[a:b]. -// -// [0,8): chooses a static pivot. -// [8,shortestNinther): uses the simple median-of-three method. -// [shortestNinther,∞): uses the Tukey ninther method. -func choosePivotCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) (pivot int, hint sortedHint) { - const ( - shortestNinther = 50 - maxSwaps = 4 * 3 - ) - - l := b - a - - var ( - swaps int - i = a + l/4*1 - j = a + l/4*2 - k = a + l/4*3 - ) - - if l >= 8 { - if l >= shortestNinther { - // Tukey ninther method, the idea came from Rust's implementation. - i = medianAdjacentCmpFunc(data, i, &swaps, cmp) - j = medianAdjacentCmpFunc(data, j, &swaps, cmp) - k = medianAdjacentCmpFunc(data, k, &swaps, cmp) - } - // Find the median among i, j, k and stores it into j. - j = medianCmpFunc(data, i, j, k, &swaps, cmp) - } - - switch swaps { - case 0: - return j, increasingHint - case maxSwaps: - return j, decreasingHint - default: - return j, unknownHint - } -} - -// order2CmpFunc returns x,y where data[x] <= data[y], where x,y=a,b or x,y=b,a. -func order2CmpFunc[E any](data []E, a, b int, swaps *int, cmp func(a, b E) int) (int, int) { - if cmp(data[b], data[a]) < 0 { - *swaps++ - return b, a - } - return a, b -} - -// medianCmpFunc returns x where data[x] is the median of data[a],data[b],data[c], where x is a, b, or c. -func medianCmpFunc[E any](data []E, a, b, c int, swaps *int, cmp func(a, b E) int) int { - a, b = order2CmpFunc(data, a, b, swaps, cmp) - b, c = order2CmpFunc(data, b, c, swaps, cmp) - a, b = order2CmpFunc(data, a, b, swaps, cmp) - return b -} - -// medianAdjacentCmpFunc finds the median of data[a - 1], data[a], data[a + 1] and stores the index into a. -func medianAdjacentCmpFunc[E any](data []E, a int, swaps *int, cmp func(a, b E) int) int { - return medianCmpFunc(data, a-1, a, a+1, swaps, cmp) -} - -func reverseRangeCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) { - i := a - j := b - 1 - for i < j { - data[i], data[j] = data[j], data[i] - i++ - j-- - } -} - -func swapRangeCmpFunc[E any](data []E, a, b, n int, cmp func(a, b E) int) { - for i := 0; i < n; i++ { - data[a+i], data[b+i] = data[b+i], data[a+i] - } -} - -func stableCmpFunc[E any](data []E, n int, cmp func(a, b E) int) { - blockSize := 20 // must be > 0 - a, b := 0, blockSize - for b <= n { - insertionSortCmpFunc(data, a, b, cmp) - a = b - b += blockSize - } - insertionSortCmpFunc(data, a, n, cmp) - - for blockSize < n { - a, b = 0, 2*blockSize - for b <= n { - symMergeCmpFunc(data, a, a+blockSize, b, cmp) - a = b - b += 2 * blockSize - } - if m := a + blockSize; m < n { - symMergeCmpFunc(data, a, m, n, cmp) - } - blockSize *= 2 - } -} - -// symMergeCmpFunc merges the two sorted subsequences data[a:m] and data[m:b] using -// the SymMerge algorithm from Pok-Son Kim and Arne Kutzner, "Stable Minimum -// Storage Merging by Symmetric Comparisons", in Susanne Albers and Tomasz -// Radzik, editors, Algorithms - ESA 2004, volume 3221 of Lecture Notes in -// Computer Science, pages 714-723. Springer, 2004. -// -// Let M = m-a and N = b-n. Wolog M < N. -// The recursion depth is bound by ceil(log(N+M)). -// The algorithm needs O(M*log(N/M + 1)) calls to data.Less. -// The algorithm needs O((M+N)*log(M)) calls to data.Swap. -// -// The paper gives O((M+N)*log(M)) as the number of assignments assuming a -// rotation algorithm which uses O(M+N+gcd(M+N)) assignments. The argumentation -// in the paper carries through for Swap operations, especially as the block -// swapping rotate uses only O(M+N) Swaps. -// -// symMerge assumes non-degenerate arguments: a < m && m < b. -// Having the caller check this condition eliminates many leaf recursion calls, -// which improves performance. -func symMergeCmpFunc[E any](data []E, a, m, b int, cmp func(a, b E) int) { - // Avoid unnecessary recursions of symMerge - // by direct insertion of data[a] into data[m:b] - // if data[a:m] only contains one element. - if m-a == 1 { - // Use binary search to find the lowest index i - // such that data[i] >= data[a] for m <= i < b. - // Exit the search loop with i == b in case no such index exists. - i := m - j := b - for i < j { - h := int(uint(i+j) >> 1) - if cmp(data[h], data[a]) < 0 { - i = h + 1 - } else { - j = h - } - } - // Swap values until data[a] reaches the position before i. - for k := a; k < i-1; k++ { - data[k], data[k+1] = data[k+1], data[k] - } - return - } - - // Avoid unnecessary recursions of symMerge - // by direct insertion of data[m] into data[a:m] - // if data[m:b] only contains one element. - if b-m == 1 { - // Use binary search to find the lowest index i - // such that data[i] > data[m] for a <= i < m. - // Exit the search loop with i == m in case no such index exists. - i := a - j := m - for i < j { - h := int(uint(i+j) >> 1) - if !(cmp(data[m], data[h]) < 0) { - i = h + 1 - } else { - j = h - } - } - // Swap values until data[m] reaches the position i. - for k := m; k > i; k-- { - data[k], data[k-1] = data[k-1], data[k] - } - return - } - - mid := int(uint(a+b) >> 1) - n := mid + m - var start, r int - if m > mid { - start = n - b - r = mid - } else { - start = a - r = m - } - p := n - 1 - - for start < r { - c := int(uint(start+r) >> 1) - if !(cmp(data[p-c], data[c]) < 0) { - start = c + 1 - } else { - r = c - } - } - - end := n - start - if start < m && m < end { - rotateCmpFunc(data, start, m, end, cmp) - } - if a < start && start < mid { - symMergeCmpFunc(data, a, start, mid, cmp) - } - if mid < end && end < b { - symMergeCmpFunc(data, mid, end, b, cmp) - } -} - -// rotateCmpFunc rotates two consecutive blocks u = data[a:m] and v = data[m:b] in data: -// Data of the form 'x u v y' is changed to 'x v u y'. -// rotate performs at most b-a many calls to data.Swap, -// and it assumes non-degenerate arguments: a < m && m < b. -func rotateCmpFunc[E any](data []E, a, m, b int, cmp func(a, b E) int) { - i := m - a - j := b - m - - for i != j { - if i > j { - swapRangeCmpFunc(data, m-i, m, j, cmp) - i -= j - } else { - swapRangeCmpFunc(data, m-i, m+j-i, i, cmp) - j -= i - } - } - // i == j - swapRangeCmpFunc(data, m-i, m, i, cmp) -} diff --git a/vendor/golang.org/x/exp/slices/zsortordered.go b/vendor/golang.org/x/exp/slices/zsortordered.go deleted file mode 100644 index 99b47c39..00000000 --- a/vendor/golang.org/x/exp/slices/zsortordered.go +++ /dev/null @@ -1,481 +0,0 @@ -// Code generated by gen_sort_variants.go; DO NOT EDIT. - -// 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. - -package slices - -import "golang.org/x/exp/constraints" - -// insertionSortOrdered sorts data[a:b] using insertion sort. -func insertionSortOrdered[E constraints.Ordered](data []E, a, b int) { - for i := a + 1; i < b; i++ { - for j := i; j > a && cmpLess(data[j], data[j-1]); j-- { - data[j], data[j-1] = data[j-1], data[j] - } - } -} - -// siftDownOrdered implements the heap property on data[lo:hi]. -// first is an offset into the array where the root of the heap lies. -func siftDownOrdered[E constraints.Ordered](data []E, lo, hi, first int) { - root := lo - for { - child := 2*root + 1 - if child >= hi { - break - } - if child+1 < hi && cmpLess(data[first+child], data[first+child+1]) { - child++ - } - if !cmpLess(data[first+root], data[first+child]) { - return - } - data[first+root], data[first+child] = data[first+child], data[first+root] - root = child - } -} - -func heapSortOrdered[E constraints.Ordered](data []E, a, b int) { - first := a - lo := 0 - hi := b - a - - // Build heap with greatest element at top. - for i := (hi - 1) / 2; i >= 0; i-- { - siftDownOrdered(data, i, hi, first) - } - - // Pop elements, largest first, into end of data. - for i := hi - 1; i >= 0; i-- { - data[first], data[first+i] = data[first+i], data[first] - siftDownOrdered(data, lo, i, first) - } -} - -// pdqsortOrdered sorts data[a:b]. -// The algorithm based on pattern-defeating quicksort(pdqsort), but without the optimizations from BlockQuicksort. -// pdqsort paper: https://arxiv.org/pdf/2106.05123.pdf -// C++ implementation: https://github.com/orlp/pdqsort -// Rust implementation: https://docs.rs/pdqsort/latest/pdqsort/ -// limit is the number of allowed bad (very unbalanced) pivots before falling back to heapsort. -func pdqsortOrdered[E constraints.Ordered](data []E, a, b, limit int) { - const maxInsertion = 12 - - var ( - wasBalanced = true // whether the last partitioning was reasonably balanced - wasPartitioned = true // whether the slice was already partitioned - ) - - for { - length := b - a - - if length <= maxInsertion { - insertionSortOrdered(data, a, b) - return - } - - // Fall back to heapsort if too many bad choices were made. - if limit == 0 { - heapSortOrdered(data, a, b) - return - } - - // If the last partitioning was imbalanced, we need to breaking patterns. - if !wasBalanced { - breakPatternsOrdered(data, a, b) - limit-- - } - - pivot, hint := choosePivotOrdered(data, a, b) - if hint == decreasingHint { - reverseRangeOrdered(data, a, b) - // The chosen pivot was pivot-a elements after the start of the array. - // After reversing it is pivot-a elements before the end of the array. - // The idea came from Rust's implementation. - pivot = (b - 1) - (pivot - a) - hint = increasingHint - } - - // The slice is likely already sorted. - if wasBalanced && wasPartitioned && hint == increasingHint { - if partialInsertionSortOrdered(data, a, b) { - return - } - } - - // Probably the slice contains many duplicate elements, partition the slice into - // elements equal to and elements greater than the pivot. - if a > 0 && !cmpLess(data[a-1], data[pivot]) { - mid := partitionEqualOrdered(data, a, b, pivot) - a = mid - continue - } - - mid, alreadyPartitioned := partitionOrdered(data, a, b, pivot) - wasPartitioned = alreadyPartitioned - - leftLen, rightLen := mid-a, b-mid - balanceThreshold := length / 8 - if leftLen < rightLen { - wasBalanced = leftLen >= balanceThreshold - pdqsortOrdered(data, a, mid, limit) - a = mid + 1 - } else { - wasBalanced = rightLen >= balanceThreshold - pdqsortOrdered(data, mid+1, b, limit) - b = mid - } - } -} - -// partitionOrdered does one quicksort partition. -// Let p = data[pivot] -// Moves elements in data[a:b] around, so that data[i]

=p for inewpivot. -// On return, data[newpivot] = p -func partitionOrdered[E constraints.Ordered](data []E, a, b, pivot int) (newpivot int, alreadyPartitioned bool) { - data[a], data[pivot] = data[pivot], data[a] - i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned - - for i <= j && cmpLess(data[i], data[a]) { - i++ - } - for i <= j && !cmpLess(data[j], data[a]) { - j-- - } - if i > j { - data[j], data[a] = data[a], data[j] - return j, true - } - data[i], data[j] = data[j], data[i] - i++ - j-- - - for { - for i <= j && cmpLess(data[i], data[a]) { - i++ - } - for i <= j && !cmpLess(data[j], data[a]) { - j-- - } - if i > j { - break - } - data[i], data[j] = data[j], data[i] - i++ - j-- - } - data[j], data[a] = data[a], data[j] - return j, false -} - -// partitionEqualOrdered partitions data[a:b] into elements equal to data[pivot] followed by elements greater than data[pivot]. -// It assumed that data[a:b] does not contain elements smaller than the data[pivot]. -func partitionEqualOrdered[E constraints.Ordered](data []E, a, b, pivot int) (newpivot int) { - data[a], data[pivot] = data[pivot], data[a] - i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned - - for { - for i <= j && !cmpLess(data[a], data[i]) { - i++ - } - for i <= j && cmpLess(data[a], data[j]) { - j-- - } - if i > j { - break - } - data[i], data[j] = data[j], data[i] - i++ - j-- - } - return i -} - -// partialInsertionSortOrdered partially sorts a slice, returns true if the slice is sorted at the end. -func partialInsertionSortOrdered[E constraints.Ordered](data []E, a, b int) bool { - const ( - maxSteps = 5 // maximum number of adjacent out-of-order pairs that will get shifted - shortestShifting = 50 // don't shift any elements on short arrays - ) - i := a + 1 - for j := 0; j < maxSteps; j++ { - for i < b && !cmpLess(data[i], data[i-1]) { - i++ - } - - if i == b { - return true - } - - if b-a < shortestShifting { - return false - } - - data[i], data[i-1] = data[i-1], data[i] - - // Shift the smaller one to the left. - if i-a >= 2 { - for j := i - 1; j >= 1; j-- { - if !cmpLess(data[j], data[j-1]) { - break - } - data[j], data[j-1] = data[j-1], data[j] - } - } - // Shift the greater one to the right. - if b-i >= 2 { - for j := i + 1; j < b; j++ { - if !cmpLess(data[j], data[j-1]) { - break - } - data[j], data[j-1] = data[j-1], data[j] - } - } - } - return false -} - -// breakPatternsOrdered scatters some elements around in an attempt to break some patterns -// that might cause imbalanced partitions in quicksort. -func breakPatternsOrdered[E constraints.Ordered](data []E, a, b int) { - length := b - a - if length >= 8 { - random := xorshift(length) - modulus := nextPowerOfTwo(length) - - for idx := a + (length/4)*2 - 1; idx <= a+(length/4)*2+1; idx++ { - other := int(uint(random.Next()) & (modulus - 1)) - if other >= length { - other -= length - } - data[idx], data[a+other] = data[a+other], data[idx] - } - } -} - -// choosePivotOrdered chooses a pivot in data[a:b]. -// -// [0,8): chooses a static pivot. -// [8,shortestNinther): uses the simple median-of-three method. -// [shortestNinther,∞): uses the Tukey ninther method. -func choosePivotOrdered[E constraints.Ordered](data []E, a, b int) (pivot int, hint sortedHint) { - const ( - shortestNinther = 50 - maxSwaps = 4 * 3 - ) - - l := b - a - - var ( - swaps int - i = a + l/4*1 - j = a + l/4*2 - k = a + l/4*3 - ) - - if l >= 8 { - if l >= shortestNinther { - // Tukey ninther method, the idea came from Rust's implementation. - i = medianAdjacentOrdered(data, i, &swaps) - j = medianAdjacentOrdered(data, j, &swaps) - k = medianAdjacentOrdered(data, k, &swaps) - } - // Find the median among i, j, k and stores it into j. - j = medianOrdered(data, i, j, k, &swaps) - } - - switch swaps { - case 0: - return j, increasingHint - case maxSwaps: - return j, decreasingHint - default: - return j, unknownHint - } -} - -// order2Ordered returns x,y where data[x] <= data[y], where x,y=a,b or x,y=b,a. -func order2Ordered[E constraints.Ordered](data []E, a, b int, swaps *int) (int, int) { - if cmpLess(data[b], data[a]) { - *swaps++ - return b, a - } - return a, b -} - -// medianOrdered returns x where data[x] is the median of data[a],data[b],data[c], where x is a, b, or c. -func medianOrdered[E constraints.Ordered](data []E, a, b, c int, swaps *int) int { - a, b = order2Ordered(data, a, b, swaps) - b, c = order2Ordered(data, b, c, swaps) - a, b = order2Ordered(data, a, b, swaps) - return b -} - -// medianAdjacentOrdered finds the median of data[a - 1], data[a], data[a + 1] and stores the index into a. -func medianAdjacentOrdered[E constraints.Ordered](data []E, a int, swaps *int) int { - return medianOrdered(data, a-1, a, a+1, swaps) -} - -func reverseRangeOrdered[E constraints.Ordered](data []E, a, b int) { - i := a - j := b - 1 - for i < j { - data[i], data[j] = data[j], data[i] - i++ - j-- - } -} - -func swapRangeOrdered[E constraints.Ordered](data []E, a, b, n int) { - for i := 0; i < n; i++ { - data[a+i], data[b+i] = data[b+i], data[a+i] - } -} - -func stableOrdered[E constraints.Ordered](data []E, n int) { - blockSize := 20 // must be > 0 - a, b := 0, blockSize - for b <= n { - insertionSortOrdered(data, a, b) - a = b - b += blockSize - } - insertionSortOrdered(data, a, n) - - for blockSize < n { - a, b = 0, 2*blockSize - for b <= n { - symMergeOrdered(data, a, a+blockSize, b) - a = b - b += 2 * blockSize - } - if m := a + blockSize; m < n { - symMergeOrdered(data, a, m, n) - } - blockSize *= 2 - } -} - -// symMergeOrdered merges the two sorted subsequences data[a:m] and data[m:b] using -// the SymMerge algorithm from Pok-Son Kim and Arne Kutzner, "Stable Minimum -// Storage Merging by Symmetric Comparisons", in Susanne Albers and Tomasz -// Radzik, editors, Algorithms - ESA 2004, volume 3221 of Lecture Notes in -// Computer Science, pages 714-723. Springer, 2004. -// -// Let M = m-a and N = b-n. Wolog M < N. -// The recursion depth is bound by ceil(log(N+M)). -// The algorithm needs O(M*log(N/M + 1)) calls to data.Less. -// The algorithm needs O((M+N)*log(M)) calls to data.Swap. -// -// The paper gives O((M+N)*log(M)) as the number of assignments assuming a -// rotation algorithm which uses O(M+N+gcd(M+N)) assignments. The argumentation -// in the paper carries through for Swap operations, especially as the block -// swapping rotate uses only O(M+N) Swaps. -// -// symMerge assumes non-degenerate arguments: a < m && m < b. -// Having the caller check this condition eliminates many leaf recursion calls, -// which improves performance. -func symMergeOrdered[E constraints.Ordered](data []E, a, m, b int) { - // Avoid unnecessary recursions of symMerge - // by direct insertion of data[a] into data[m:b] - // if data[a:m] only contains one element. - if m-a == 1 { - // Use binary search to find the lowest index i - // such that data[i] >= data[a] for m <= i < b. - // Exit the search loop with i == b in case no such index exists. - i := m - j := b - for i < j { - h := int(uint(i+j) >> 1) - if cmpLess(data[h], data[a]) { - i = h + 1 - } else { - j = h - } - } - // Swap values until data[a] reaches the position before i. - for k := a; k < i-1; k++ { - data[k], data[k+1] = data[k+1], data[k] - } - return - } - - // Avoid unnecessary recursions of symMerge - // by direct insertion of data[m] into data[a:m] - // if data[m:b] only contains one element. - if b-m == 1 { - // Use binary search to find the lowest index i - // such that data[i] > data[m] for a <= i < m. - // Exit the search loop with i == m in case no such index exists. - i := a - j := m - for i < j { - h := int(uint(i+j) >> 1) - if !cmpLess(data[m], data[h]) { - i = h + 1 - } else { - j = h - } - } - // Swap values until data[m] reaches the position i. - for k := m; k > i; k-- { - data[k], data[k-1] = data[k-1], data[k] - } - return - } - - mid := int(uint(a+b) >> 1) - n := mid + m - var start, r int - if m > mid { - start = n - b - r = mid - } else { - start = a - r = m - } - p := n - 1 - - for start < r { - c := int(uint(start+r) >> 1) - if !cmpLess(data[p-c], data[c]) { - start = c + 1 - } else { - r = c - } - } - - end := n - start - if start < m && m < end { - rotateOrdered(data, start, m, end) - } - if a < start && start < mid { - symMergeOrdered(data, a, start, mid) - } - if mid < end && end < b { - symMergeOrdered(data, mid, end, b) - } -} - -// rotateOrdered rotates two consecutive blocks u = data[a:m] and v = data[m:b] in data: -// Data of the form 'x u v y' is changed to 'x v u y'. -// rotate performs at most b-a many calls to data.Swap, -// and it assumes non-degenerate arguments: a < m && m < b. -func rotateOrdered[E constraints.Ordered](data []E, a, m, b int) { - i := m - a - j := b - m - - for i != j { - if i > j { - swapRangeOrdered(data, m-i, m, j) - i -= j - } else { - swapRangeOrdered(data, m-i, m+j-i, i) - j -= i - } - } - // i == j - swapRangeOrdered(data, m-i, m, i) -} diff --git a/vendor/k8s.io/api/resource/v1alpha3/types.go b/vendor/k8s.io/api/resource/v1alpha3/types.go index fb4d7041..49d7c86d 100644 --- a/vendor/k8s.io/api/resource/v1alpha3/types.go +++ b/vendor/k8s.io/api/resource/v1alpha3/types.go @@ -145,6 +145,10 @@ type ResourceSliceSpec struct { Devices []Device `json:"devices" protobuf:"bytes,6,name=devices"` } +// DriverNameMaxLength is the maximum valid length of a driver name in the +// ResourceSliceSpec and other places. It's the same as for CSI driver names. +const DriverNameMaxLength = 63 + // ResourcePool describes the pool that ResourceSlices belong to. type ResourcePool struct { // Name is used to identify the pool. For node-local devices, this diff --git a/vendor/k8s.io/api/resource/v1beta1/types.go b/vendor/k8s.io/api/resource/v1beta1/types.go index ca79c5a6..fbdc35ca 100644 --- a/vendor/k8s.io/api/resource/v1beta1/types.go +++ b/vendor/k8s.io/api/resource/v1beta1/types.go @@ -144,6 +144,10 @@ type ResourceSliceSpec struct { Devices []Device `json:"devices" protobuf:"bytes,6,name=devices"` } +// DriverNameMaxLength is the maximum valid length of a driver name in the +// ResourceSliceSpec and other places. It's the same as for CSI driver names. +const DriverNameMaxLength = 63 + // ResourcePool describes the pool that ResourceSlices belong to. type ResourcePool struct { // Name is used to identify the pool. For node-local devices, this diff --git a/vendor/k8s.io/apiserver/pkg/cel/library/cidr.go b/vendor/k8s.io/apiserver/pkg/cel/library/cidr.go index 2992e99e..8ab444ca 100644 --- a/vendor/k8s.io/apiserver/pkg/cel/library/cidr.go +++ b/vendor/k8s.io/apiserver/pkg/cel/library/cidr.go @@ -231,8 +231,7 @@ func cidrContainsCIDR(arg ref.Val, other ref.Val) ref.Val { return types.MaybeNoSuchOverloadErr(other) } - equalMasked := cidr.Prefix.Masked() == netip.PrefixFrom(containsCIDR.Prefix.Addr(), cidr.Prefix.Bits()) - return types.Bool(equalMasked && cidr.Prefix.Bits() <= containsCIDR.Prefix.Bits()) + return types.Bool(cidr.Overlaps(containsCIDR.Prefix) && cidr.Prefix.Bits() <= containsCIDR.Prefix.Bits()) } func prefixLength(arg ref.Val) ref.Val { diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go index abb51b07..e2141395 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go @@ -438,7 +438,12 @@ func (wc *watchChan) serialProcessEvents(wg *sync.WaitGroup) { for { select { case e := <-wc.incomingEventChan: - res := wc.transform(e) + res, err := wc.transform(e) + if err != nil { + wc.sendError(err) + return + } + if res == nil { continue } @@ -461,10 +466,8 @@ func (wc *watchChan) serialProcessEvents(wg *sync.WaitGroup) { func (wc *watchChan) concurrentProcessEvents(wg *sync.WaitGroup) { p := concurrentOrderedEventProcessing{ - input: wc.incomingEventChan, - processFunc: wc.transform, - output: wc.resultChan, - processingQueue: make(chan chan *watch.Event, processEventConcurrency-1), + wc: wc, + processingQueue: make(chan chan *processingResult, processEventConcurrency-1), objectType: wc.watcher.objectType, groupResource: wc.watcher.groupResource, @@ -481,12 +484,15 @@ func (wc *watchChan) concurrentProcessEvents(wg *sync.WaitGroup) { }() } +type processingResult struct { + event *watch.Event + err error +} + type concurrentOrderedEventProcessing struct { - input chan *event - processFunc func(*event) *watch.Event - output chan watch.Event + wc *watchChan - processingQueue chan chan *watch.Event + processingQueue chan chan *processingResult // Metadata for logging objectType string groupResource schema.GroupResource @@ -498,28 +504,29 @@ func (p *concurrentOrderedEventProcessing) scheduleEventProcessing(ctx context.C select { case <-ctx.Done(): return - case e = <-p.input: + case e = <-p.wc.incomingEventChan: } - processingResponse := make(chan *watch.Event, 1) + processingResponse := make(chan *processingResult, 1) select { case <-ctx.Done(): return case p.processingQueue <- processingResponse: } wg.Add(1) - go func(e *event, response chan<- *watch.Event) { + go func(e *event, response chan<- *processingResult) { defer wg.Done() + responseEvent, err := p.wc.transform(e) select { case <-ctx.Done(): - case response <- p.processFunc(e): + case response <- &processingResult{event: responseEvent, err: err}: } }(e, processingResponse) } } func (p *concurrentOrderedEventProcessing) collectEventProcessing(ctx context.Context) { - var processingResponse chan *watch.Event - var e *watch.Event + var processingResponse chan *processingResult + var r *processingResult for { select { case <-ctx.Done(): @@ -529,21 +536,25 @@ func (p *concurrentOrderedEventProcessing) collectEventProcessing(ctx context.Co select { case <-ctx.Done(): return - case e = <-processingResponse: + case r = <-processingResponse: } - if e == nil { + if r.err != nil { + p.wc.sendError(r.err) + return + } + if r.event == nil { continue } - if len(p.output) == cap(p.output) { - klog.V(3).InfoS("Fast watcher, slow processing. Probably caused by slow dispatching events to watchers", "outgoingEvents", outgoingBufSize, "objectType", p.objectType, "groupResource", p.groupResource) + if len(p.wc.resultChan) == cap(p.wc.resultChan) { + klog.V(3).InfoS("Fast watcher, slow processing. Probably caused by slow dispatching events to watchers", "outgoingEvents", outgoingBufSize, "objectType", p.wc.watcher.objectType, "groupResource", p.wc.watcher.groupResource) } // If user couldn't receive results fast enough, we also block incoming events from watcher. // Because storing events in local will cause more memory usage. // The worst case would be closing the fast watcher. select { - case <-ctx.Done(): + case p.wc.resultChan <- *r.event: + case <-p.wc.ctx.Done(): return - case p.output <- *e: } } } @@ -561,12 +572,11 @@ func (wc *watchChan) acceptAll() bool { } // transform transforms an event into a result for user if not filtered. -func (wc *watchChan) transform(e *event) (res *watch.Event) { +func (wc *watchChan) transform(e *event) (res *watch.Event, err error) { curObj, oldObj, err := wc.prepareObjs(e) if err != nil { klog.Errorf("failed to prepare current and previous objects: %v", err) - wc.sendError(err) - return nil + return nil, err } switch { @@ -574,12 +584,11 @@ func (wc *watchChan) transform(e *event) (res *watch.Event) { object := wc.watcher.newFunc() if err := wc.watcher.versioner.UpdateObject(object, uint64(e.rev)); err != nil { klog.Errorf("failed to propagate object version: %v", err) - return nil + return nil, fmt.Errorf("failed to propagate object resource version: %w", err) } if e.isInitialEventsEndBookmark { if err := storage.AnnotateInitialEventsEndBookmark(object); err != nil { - wc.sendError(fmt.Errorf("error while accessing object's metadata gr: %v, type: %v, obj: %#v, err: %v", wc.watcher.groupResource, wc.watcher.objectType, object, err)) - return nil + return nil, fmt.Errorf("error while accessing object's metadata gr: %v, type: %v, obj: %#v, err: %w", wc.watcher.groupResource, wc.watcher.objectType, object, err) } } res = &watch.Event{ @@ -588,7 +597,7 @@ func (wc *watchChan) transform(e *event) (res *watch.Event) { } case e.isDeleted: if !wc.filter(oldObj) { - return nil + return nil, nil } res = &watch.Event{ Type: watch.Deleted, @@ -596,7 +605,7 @@ func (wc *watchChan) transform(e *event) (res *watch.Event) { } case e.isCreated: if !wc.filter(curObj) { - return nil + return nil, nil } res = &watch.Event{ Type: watch.Added, @@ -608,7 +617,7 @@ func (wc *watchChan) transform(e *event) (res *watch.Event) { Type: watch.Modified, Object: curObj, } - return res + return res, nil } curObjPasses := wc.filter(curObj) oldObjPasses := wc.filter(oldObj) @@ -630,7 +639,7 @@ func (wc *watchChan) transform(e *event) (res *watch.Event) { } } } - return res + return res, nil } func transformErrorToEvent(err error) *watch.Event { diff --git a/vendor/modules.txt b/vendor/modules.txt index 0d46970a..ffe178a1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -270,24 +270,24 @@ github.com/kylelemons/godebug/diff # github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de ## explicit github.com/liggitt/tabwriter -# github.com/loft-sh/admin-apis v0.0.0-20240203010124-3600c1c582a8 +# github.com/loft-sh/admin-apis v0.0.0-20250429193833-4e0a455c33dd ## explicit; go 1.21.1 github.com/loft-sh/admin-apis/pkg/licenseapi -# github.com/loft-sh/agentapi/v4 v4.0.0-alpha.6.0.20240614131646-3359da6a4818 -## explicit; go 1.22.4 +# github.com/loft-sh/agentapi/v4 v4.3.0-alpha.39 +## explicit; go 1.23.1 github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster github.com/loft-sh/agentapi/v4/pkg/apis/loft/cluster/v1 github.com/loft-sh/agentapi/v4/pkg/apis/loft/storage/v1 -# github.com/loft-sh/api/v4 v4.0.0-alpha.6.0.20240614134907-f9ecc1668e9e -## explicit; go 1.22.4 +# github.com/loft-sh/api/v4 v4.3.0-alpha.32 +## explicit; go 1.23.1 github.com/loft-sh/api/v4/pkg/apis/audit/v1 github.com/loft-sh/api/v4/pkg/apis/management github.com/loft-sh/api/v4/pkg/apis/management/v1 github.com/loft-sh/api/v4/pkg/apis/storage/v1 github.com/loft-sh/api/v4/pkg/apis/ui/v1 github.com/loft-sh/api/v4/pkg/managerfactory -# github.com/loft-sh/apiserver v0.0.0-20240607231110-634aeeab2b36 -## explicit; go 1.22.4 +# github.com/loft-sh/apiserver v0.0.0-20250206205835-422f1d472459 +## explicit; go 1.23.1 github.com/loft-sh/apiserver/pkg/builders # github.com/loft-sh/log v0.0.0-20240219160058-26d83ffb46ac ## explicit; go 1.20 @@ -296,14 +296,14 @@ github.com/loft-sh/log/hash github.com/loft-sh/log/scanner github.com/loft-sh/log/survey github.com/loft-sh/log/terminal -# github.com/loft-sh/vcluster v0.25.0 +# github.com/loft-sh/vcluster v0.26.1 ## explicit; go 1.24 github.com/loft-sh/vcluster/config github.com/loft-sh/vcluster/config/legacyconfig github.com/loft-sh/vcluster/pkg/apis github.com/loft-sh/vcluster/pkg/config github.com/loft-sh/vcluster/pkg/constants -github.com/loft-sh/vcluster/pkg/controllers/resources/namespaces +github.com/loft-sh/vcluster/pkg/controllers/resources/pods/scheduling github.com/loft-sh/vcluster/pkg/controllers/resources/pods/token github.com/loft-sh/vcluster/pkg/controllers/resources/pods/translate github.com/loft-sh/vcluster/pkg/coredns @@ -320,9 +320,7 @@ github.com/loft-sh/vcluster/pkg/pro github.com/loft-sh/vcluster/pkg/scheme github.com/loft-sh/vcluster/pkg/specialservices github.com/loft-sh/vcluster/pkg/strvals -github.com/loft-sh/vcluster/pkg/syncer github.com/loft-sh/vcluster/pkg/syncer/synccontext -github.com/loft-sh/vcluster/pkg/syncer/translator github.com/loft-sh/vcluster/pkg/syncer/types github.com/loft-sh/vcluster/pkg/upgrade github.com/loft-sh/vcluster/pkg/util/applier @@ -332,6 +330,7 @@ github.com/loft-sh/vcluster/pkg/util/clienthelper github.com/loft-sh/vcluster/pkg/util/kubeconfig github.com/loft-sh/vcluster/pkg/util/log github.com/loft-sh/vcluster/pkg/util/loghelper +github.com/loft-sh/vcluster/pkg/util/namespaces github.com/loft-sh/vcluster/pkg/util/patch github.com/loft-sh/vcluster/pkg/util/pluginhookclient github.com/loft-sh/vcluster/pkg/util/random @@ -396,7 +395,7 @@ github.com/peterbourgon/diskv # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors -# github.com/prometheus/client_golang v1.20.4 +# github.com/prometheus/client_golang v1.20.5 ## explicit; go 1.20 github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header @@ -582,7 +581,7 @@ golang.org/x/crypto/openpgp/elgamal golang.org/x/crypto/openpgp/errors golang.org/x/crypto/openpgp/packet golang.org/x/crypto/openpgp/s2k -# golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 +# golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 ## explicit; go 1.22.0 golang.org/x/exp/constraints golang.org/x/exp/slices @@ -647,7 +646,7 @@ golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm golang.org/x/text/width -# golang.org/x/time v0.7.0 +# golang.org/x/time v0.9.0 ## explicit; go 1.18 golang.org/x/time/rate # gomodules.xyz/jsonpatch/v2 v2.4.0 @@ -795,7 +794,7 @@ gotest.tools/assert/cmp gotest.tools/internal/difflib gotest.tools/internal/format gotest.tools/internal/source -# k8s.io/api v0.32.1 +# k8s.io/api v0.32.8 ## explicit; go 1.23.0 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 @@ -856,7 +855,7 @@ k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 k8s.io/api/storagemigration/v1alpha1 -# k8s.io/apiextensions-apiserver v0.32.1 +# k8s.io/apiextensions-apiserver v0.32.8 ## explicit; go 1.23.0 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 @@ -867,7 +866,7 @@ k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 -# k8s.io/apimachinery v0.32.1 +# k8s.io/apimachinery v0.32.8 ## explicit; go 1.23.0 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors @@ -938,7 +937,7 @@ k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/netutil k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/apiserver v0.32.1 +# k8s.io/apiserver v0.32.8 ## explicit; go 1.23.0 k8s.io/apiserver/pkg/admission k8s.io/apiserver/pkg/admission/configuration @@ -1067,13 +1066,13 @@ k8s.io/apiserver/pkg/util/webhook k8s.io/apiserver/pkg/util/x509metrics k8s.io/apiserver/pkg/warning k8s.io/apiserver/plugin/pkg/authenticator/token/webhook -# k8s.io/cli-runtime v0.32.1 +# k8s.io/cli-runtime v0.32.8 ## explicit; go 1.23.0 k8s.io/cli-runtime/pkg/genericclioptions k8s.io/cli-runtime/pkg/genericiooptions k8s.io/cli-runtime/pkg/printers k8s.io/cli-runtime/pkg/resource -# k8s.io/client-go v0.32.1 +# k8s.io/client-go v0.32.8 ## explicit; go 1.23.0 k8s.io/client-go/applyconfigurations k8s.io/client-go/applyconfigurations/admissionregistration/v1 @@ -1432,7 +1431,7 @@ k8s.io/client-go/util/jsonpath k8s.io/client-go/util/keyutil k8s.io/client-go/util/watchlist k8s.io/client-go/util/workqueue -# k8s.io/component-base v0.32.1 +# k8s.io/component-base v0.32.8 ## explicit; go 1.23.0 k8s.io/component-base/cli/flag k8s.io/component-base/featuregate @@ -1452,7 +1451,7 @@ k8s.io/component-base/tracing k8s.io/component-base/tracing/api/v1 k8s.io/component-base/version k8s.io/component-base/zpages/flagz -# k8s.io/component-helpers v0.32.1 +# k8s.io/component-helpers v0.32.8 ## explicit; go 1.23.0 k8s.io/component-helpers/storage/ephemeral # k8s.io/klog/v2 v2.130.1 @@ -1466,7 +1465,7 @@ k8s.io/klog/v2/internal/severity k8s.io/klog/v2/internal/sloghandler k8s.io/klog/v2/internal/verbosity k8s.io/klog/v2/textlogger -# k8s.io/kube-aggregator v0.32.1 +# k8s.io/kube-aggregator v0.32.8 ## explicit; go 1.23.0 k8s.io/kube-aggregator/pkg/apis/apiregistration k8s.io/kube-aggregator/pkg/apis/apiregistration/v1 @@ -1492,7 +1491,7 @@ k8s.io/kube-openapi/pkg/validation/errors k8s.io/kube-openapi/pkg/validation/spec k8s.io/kube-openapi/pkg/validation/strfmt k8s.io/kube-openapi/pkg/validation/strfmt/bson -# k8s.io/kubectl v0.32.1 +# k8s.io/kubectl v0.32.8 ## explicit; go 1.23.0 k8s.io/kubectl/pkg/apps k8s.io/kubectl/pkg/cmd/apiresources @@ -1527,7 +1526,7 @@ k8s.io/kubectl/pkg/util/storage k8s.io/kubectl/pkg/util/templates k8s.io/kubectl/pkg/util/term k8s.io/kubectl/pkg/validation -# k8s.io/metrics v0.32.1 +# k8s.io/metrics v0.32.8 ## explicit; go 1.23.0 k8s.io/metrics/pkg/apis/metrics k8s.io/metrics/pkg/apis/metrics/v1beta1