@@ -77,9 +77,6 @@ type Config struct {
77
77
78
78
// Plugin specifies which vCluster plugins to enable. Use "plugins" instead. Do not use this option anymore.
79
79
Plugin map [string ]Plugin `json:"plugin,omitempty"`
80
-
81
- // SleepMode holds the native sleep mode configuration for Pro clusters
82
- SleepMode * SleepMode `json:"sleepMode,omitempty"`
83
80
}
84
81
85
82
// Integrations holds config for vCluster integrations with other operators or tools running on the host cluster
@@ -403,41 +400,6 @@ func UnmarshalYAMLStrict(data []byte, i any) error {
403
400
404
401
// ExportKubeConfig describes how vCluster should export the vCluster kubeconfig.
405
402
type ExportKubeConfig struct {
406
- ExportKubeConfigProperties
407
-
408
- // Declare in which host cluster secret vCluster should store the generated virtual cluster kubeconfig.
409
- // If this is not defined, vCluster will create it with `vc-NAME`. If you specify another name,
410
- // vCluster creates the config in this other secret.
411
- //
412
- // Deprecated: Use AdditionalSecrets instead.
413
- Secret ExportKubeConfigSecretReference `json:"secret,omitempty"`
414
-
415
- // AdditionalSecrets specifies the additional host cluster secrets in which vCluster will store the
416
- // generated virtual cluster kubeconfigs.
417
- AdditionalSecrets []ExportKubeConfigAdditionalSecretReference `json:"additionalSecrets,omitempty"`
418
- }
419
-
420
- // GetAdditionalSecrets returns optional additional kubeconfig Secrets.
421
- //
422
- // If the deprecated Secret property is set, GetAdditionalSecrets only returns that secret, and
423
- // AdditionalSecrets is ignored. On the other hand, if the AdditionalSecrets property is set,
424
- // GetAdditionalSecrets returns the secrets config from the AdditionalSecrets, and Secret property
425
- // is ignored.
426
- func (e * ExportKubeConfig ) GetAdditionalSecrets () []ExportKubeConfigAdditionalSecretReference {
427
- if e .Secret .IsSet () {
428
- return []ExportKubeConfigAdditionalSecretReference {
429
- {
430
- ExportKubeConfigProperties : e .ExportKubeConfigProperties ,
431
- Namespace : e .Secret .Namespace ,
432
- Name : e .Secret .Name ,
433
- },
434
- }
435
- }
436
-
437
- return e .AdditionalSecrets
438
- }
439
-
440
- type ExportKubeConfigProperties struct {
441
403
// Context is the name of the context within the generated kubeconfig to use.
442
404
Context string `json:"context,omitempty"`
443
405
@@ -449,6 +411,11 @@ type ExportKubeConfigProperties struct {
449
411
450
412
// ServiceAccount can be used to generate a service account token instead of the default certificates.
451
413
ServiceAccount ExportKubeConfigServiceAccount `json:"serviceAccount,omitempty"`
414
+
415
+ // Declare in which host cluster secret vCluster should store the generated virtual cluster kubeconfig.
416
+ // If this is not defined, vCluster will create it with `vc-NAME`. If you specify another name,
417
+ // vCluster creates the config in this other secret.
418
+ Secret ExportKubeConfigSecretReference `json:"secret,omitempty"`
452
419
}
453
420
454
421
type ExportKubeConfigServiceAccount struct {
@@ -475,24 +442,6 @@ type ExportKubeConfigSecretReference struct {
475
442
Namespace string `json:"namespace,omitempty"`
476
443
}
477
444
478
- // IsSet checks if at least one ExportKubeConfigSecretReference property is set.
479
- func (s * ExportKubeConfigSecretReference ) IsSet () bool {
480
- return * s != (ExportKubeConfigSecretReference {})
481
- }
482
-
483
- // ExportKubeConfigAdditionalSecretReference defines the additional host cluster secret in which
484
- // vCluster stores the generated virtual cluster kubeconfigs.
485
- type ExportKubeConfigAdditionalSecretReference struct {
486
- ExportKubeConfigProperties
487
-
488
- // Name is the name of the secret where the kubeconfig is stored.
489
- Name string `json:"name,omitempty"`
490
-
491
- // Namespace where vCluster stores the kubeconfig secret. If this is not equal to the namespace
492
- // where you deployed vCluster, you need to make sure vCluster has access to this other namespace.
493
- Namespace string `json:"namespace,omitempty"`
494
- }
495
-
496
445
type Sync struct {
497
446
// Configure resources to sync from the virtual cluster to the host cluster.
498
447
ToHost SyncToHost `json:"toHost,omitempty"`
@@ -560,38 +509,6 @@ type EnableSwitchWithPatches struct {
560
509
Patches []TranslatePatch `json:"patches,omitempty"`
561
510
}
562
511
563
- type EnableSwitchWithResourcesMappings struct {
564
- // Enabled defines if this option should be enabled.
565
- Enabled bool `json:"enabled,omitempty"`
566
-
567
- // Patches patch the resource according to the provided specification.
568
- Patches []TranslatePatch `json:"patches,omitempty"`
569
-
570
- // Mappings for Namespace and Object
571
- Mappings FromHostMappings `json:"mappings,omitempty"`
572
- }
573
-
574
- type FromHostMappings struct {
575
- // ByName is a map of host-object-namespace/host-object-name: virtual-object-namespace/virtual-object-name.
576
- // There are several wildcards supported:
577
- // 1. To match all objects in host namespace and sync them to different namespace in vCluster:
578
- // byName:
579
- // "foo/*": "foo-in-virtual/*"
580
- // 2. To match specific object in the host namespace and sync it to the same namespace with the same name:
581
- // byName:
582
- // "foo/my-object": "foo/my-object"
583
- // 3. To match specific object in the host namespace and sync it to the same namespace with different name:
584
- // byName:
585
- // "foo/my-object": "foo/my-virtual-object"
586
- // 4. To match all objects in the vCluster host namespace and sync them to a different namespace in vCluster:
587
- // byName:
588
- // "": "my-virtual-namespace/*"
589
- // 5. To match specific objects in the vCluster host namespace and sync them to a different namespace in vCluster:
590
- // byName:
591
- // "/my-object": "my-virtual-namespace/my-object"
592
- ByName map [string ]string `json:"byName,omitempty"`
593
- }
594
-
595
512
type SyncFromHost struct {
596
513
// Nodes defines if nodes should get synced from the host cluster to the virtual cluster, but not back.
597
514
Nodes SyncNodes `json:"nodes,omitempty"`
@@ -625,12 +542,6 @@ type SyncFromHost struct {
625
542
626
543
// VolumeSnapshotClasses defines if volume snapshot classes created within the virtual cluster should get synced to the host cluster.
627
544
VolumeSnapshotClasses EnableSwitchWithPatches `json:"volumeSnapshotClasses,omitempty"`
628
-
629
- // ConfigMaps defines if config maps in the host should get synced to the virtual cluster.
630
- ConfigMaps EnableSwitchWithResourcesMappings `json:"configMaps,omitempty"`
631
-
632
- // Secrets defines if secrets in the host should get synced to the virtual cluster.
633
- Secrets EnableSwitchWithResourcesMappings `json:"secrets,omitempty"`
634
545
}
635
546
636
547
type SyncToHostCustomResource struct {
@@ -702,9 +613,6 @@ type SyncFromHostCustomResource struct {
702
613
703
614
// Patches patch the resource according to the provided specification.
704
615
Patches []TranslatePatch `json:"patches,omitempty"`
705
-
706
- // Mappings for Namespace and Object
707
- Mappings FromHostMappings `json:"mappings,omitempty"`
708
616
}
709
617
710
618
type EnableAutoSwitch struct {
@@ -751,12 +659,6 @@ type SyncPods struct {
751
659
// pod annotation.
752
660
UseSecretsForSATokens bool `json:"useSecretsForSATokens,omitempty"`
753
661
754
- // RuntimeClassName is the runtime class to set for synced pods.
755
- RuntimeClassName string `json:"runtimeClassName,omitempty"`
756
-
757
- // PriorityClassName is the priority class to set for synced pods.
758
- PriorityClassName string `json:"priorityClassName,omitempty"`
759
-
760
662
// RewriteHosts is a special option needed to rewrite statefulset containers to allow the correct FQDN. virtual cluster will add
761
663
// a small container to each stateful set pod that will initially rewrite the /etc/hosts file to match the FQDN expected by
762
664
// the virtual cluster.
@@ -2024,9 +1926,8 @@ type Experimental struct {
2024
1926
// DenyProxyRequests denies certain requests in the vCluster proxy.
2025
1927
DenyProxyRequests []DenyRule `json:"denyProxyRequests,omitempty" product:"pro"`
2026
1928
2027
- // ReuseNamespace allows reusing the same namespace to create multiple vClusters.
2028
- // This flag is deprecated, as this scenario will be removed entirely in upcoming releases.
2029
- ReuseNamespace bool `json:"reuseNamespace,omitempty"`
1929
+ // SleepMode holds the native sleep mode configuration for Pro clusters
1930
+ SleepMode * SleepMode `json:"sleepMode,omitempty"`
2030
1931
}
2031
1932
2032
1933
func (e Experimental ) JSONSchemaExtend (base * jsonschema.Schema ) {
@@ -2452,8 +2353,6 @@ type SleepMode struct {
2452
2353
TimeZone string `json:"timeZone,omitempty"`
2453
2354
// AutoSleep holds autoSleep details
2454
2355
AutoSleep SleepModeAutoSleep `json:"autoSleep,omitempty"`
2455
- // AutoWakeup holds configuration for waking the vCluster on a schedule rather than waiting for some activity.
2456
- AutoWakeup AutoWakeup `json:"autoWakeup,omitempty"`
2457
2356
}
2458
2357
2459
2358
// SleepModeAutoSleep holds configuration for allowing a vCluster to sleep its workloads
@@ -2465,6 +2364,9 @@ type SleepModeAutoSleep struct {
2465
2364
// Schedule represents a cron schedule for when to sleep workloads
2466
2365
Schedule string `json:"schedule,omitempty"`
2467
2366
2367
+ // Wakeup holds configuration for waking the vCluster on a schedule rather than waiting for some activity.
2368
+ Wakeup AutoWakeup `json:"wakeup,omitempty"`
2369
+
2468
2370
// Exclude holds configuration for labels that, if present, will prevent a workload from going to sleep
2469
2371
Exclude AutoSleepExclusion `json:"exclude,omitempty"`
2470
2372
}
0 commit comments