@@ -100,9 +100,6 @@ type Integrations struct {
100
100
// - Certificates and Issuers will be synced from the virtual cluster to the host cluster.
101
101
// - ClusterIssuers will be synced from the host cluster to the virtual cluster.
102
102
CertManager CertManager `json:"certManager,omitempty"`
103
-
104
- // Istio syncs DestinationRules, Gateways and VirtualServices from virtual cluster to the host.
105
- Istio Istio `json:"istio,omitempty"`
106
103
}
107
104
108
105
// CertManager reuses a host cert-manager and makes its CRDs from it available inside the vCluster
@@ -137,23 +134,6 @@ type ClusterIssuersSyncConfig struct {
137
134
Selector LabelSelector `json:"selector,omitempty"`
138
135
}
139
136
140
- type Istio struct {
141
- EnableSwitch
142
- Sync IstioSync `json:"sync,omitempty"`
143
- }
144
-
145
- type IstioSync struct {
146
- ToHost IstioSyncToHost `json:"toHost,omitempty"`
147
- }
148
-
149
- type IstioSyncToHost struct {
150
- DestinationRules EnableSwitch `json:"destinationRules,omitempty"`
151
-
152
- Gateways EnableSwitch `json:"gateways,omitempty"`
153
-
154
- VirtualServices EnableSwitch `json:"virtualServices,omitempty"`
155
- }
156
-
157
137
// ExternalSecrets reuses a host external secret operator and makes certain CRDs from it available inside the vCluster
158
138
type ExternalSecrets struct {
159
139
// Enabled defines whether the external secret integration is enabled or not
@@ -297,10 +277,8 @@ func (c *Config) BackingStoreType() StoreType {
297
277
switch {
298
278
case c .ControlPlane .BackingStore .Etcd .Embedded .Enabled :
299
279
return StoreTypeEmbeddedEtcd
300
- case c .ControlPlane .BackingStore .Etcd .External .Enabled :
301
- return StoreTypeExternalEtcd
302
280
case c .ControlPlane .BackingStore .Etcd .Deploy .Enabled :
303
- return StoreTypeDeployedEtcd
281
+ return StoreTypeExternalEtcd
304
282
case c .ControlPlane .BackingStore .Database .Embedded .Enabled :
305
283
return StoreTypeEmbeddedDatabase
306
284
case c .ControlPlane .BackingStore .Database .External .Enabled :
@@ -311,7 +289,7 @@ func (c *Config) BackingStoreType() StoreType {
311
289
}
312
290
313
291
func (c * Config ) EmbeddedDatabase () bool {
314
- return ! c .ControlPlane .BackingStore .Database .External .Enabled && ! c .ControlPlane .BackingStore .Etcd .Embedded .Enabled && ! c .ControlPlane .BackingStore .Etcd .Deploy .Enabled && ! c . ControlPlane . BackingStore . Etcd . External . Enabled
292
+ return ! c .ControlPlane .BackingStore .Database .External .Enabled && ! c .ControlPlane .BackingStore .Etcd .Embedded .Enabled && ! c .ControlPlane .BackingStore .Etcd .Deploy .Enabled
315
293
}
316
294
317
295
func (c * Config ) Distro () string {
@@ -352,11 +330,9 @@ func ValidateStoreChanges(currentStoreType, previousStoreType StoreType) error {
352
330
}
353
331
354
332
switch currentStoreType {
355
- case StoreTypeDeployedEtcd :
356
- fallthrough
357
333
case StoreTypeEmbeddedEtcd :
358
334
// switching from external ETCD, deploy ETCD, or embedded (SQLite) to deployed or embedded ETCD is valid
359
- if previousStoreType == StoreTypeExternalEtcd || previousStoreType == StoreTypeDeployedEtcd || previousStoreType == StoreTypeEmbeddedDatabase {
335
+ if previousStoreType == StoreTypeExternalEtcd || previousStoreType == StoreTypeEmbeddedDatabase {
360
336
return nil
361
337
}
362
338
case StoreTypeExternalDatabase :
@@ -375,7 +351,7 @@ func ValidateStoreChanges(currentStoreType, previousStoreType StoreType) error {
375
351
376
352
// ValidateDistroChanges checks whether migrating from one distro to the other is allowed.
377
353
func ValidateDistroChanges (currentDistro , previousDistro string ) error {
378
- if currentDistro != previousDistro && ! (previousDistro == "eks" && currentDistro == K8SDistro ) && ! ( previousDistro == K3SDistro && currentDistro == K8SDistro ) {
354
+ if currentDistro != previousDistro && ! (previousDistro == "eks" && currentDistro == K8SDistro ) {
379
355
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 )
380
356
}
381
357
return nil
@@ -1122,10 +1098,10 @@ type Distro struct {
1122
1098
// K8S holds K8s relevant configuration.
1123
1099
K8S DistroK8s `json:"k8s,omitempty"`
1124
1100
1125
- // [Deprecated] K3S holds K3s relevant configuration.
1101
+ // K3S holds K3s relevant configuration.
1126
1102
K3S DistroK3s `json:"k3s,omitempty"`
1127
1103
1128
- // [Deprecated] K0S holds k0s relevant configuration.
1104
+ // K0S holds k0s relevant configuration.
1129
1105
K0S DistroK0s `json:"k0s,omitempty"`
1130
1106
}
1131
1107
@@ -1144,8 +1120,16 @@ type DistroK8s struct {
1144
1120
// Enabled specifies if the K8s distro should be enabled. Only one distro can be enabled at the same time.
1145
1121
Enabled bool `json:"enabled,omitempty"`
1146
1122
1147
- // [Deprecated] Version field is deprecated.
1148
- // Use controlPlane.distro.k8s.image.tag to specify the Kubernetes version instead.
1123
+ // Version specifies k8s components (scheduler, kube-controller-manager & apiserver) version.
1124
+ // It is a shortcut for controlPlane.distro.k8s.apiServer.image.tag,
1125
+ // controlPlane.distro.k8s.controllerManager.image.tag and
1126
+ // controlPlane.distro.k8s.scheduler.image.tag
1127
+ // If e.g. controlPlane.distro.k8s.version is set to v1.30.1 and
1128
+ // controlPlane.distro.k8s.scheduler.image.tag
1129
+ //(or controlPlane.distro.k8s.controllerManager.image.tag or controlPlane.distro.k8s.apiServer.image.tag)
1130
+ // is set to v1.31.0,
1131
+ // value from controlPlane.distro.k8s.(controlPlane-component).image.tag will be used
1132
+ // (where controlPlane-component is apiServer, controllerManager and scheduler).
1149
1133
Version string `json:"version,omitempty"`
1150
1134
1151
1135
// APIServer holds configuration specific to starting the api server.
@@ -1172,12 +1156,6 @@ type DistroK0s struct {
1172
1156
}
1173
1157
1174
1158
type DistroCommon struct {
1175
- // Image is the distro image
1176
- Image Image `json:"image,omitempty"`
1177
-
1178
- // ImagePullPolicy is the pull policy for the distro image
1179
- ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
1180
-
1181
1159
// Env are extra environment variables to use for the main container and NOT the init container.
1182
1160
Env []map [string ]interface {} `json:"env,omitempty"`
1183
1161
@@ -1187,7 +1165,14 @@ type DistroCommon struct {
1187
1165
// Security options can be used for the distro init container
1188
1166
SecurityContext map [string ]interface {} `json:"securityContext,omitempty"`
1189
1167
}
1168
+
1190
1169
type DistroContainer struct {
1170
+ // Image is the distro image
1171
+ Image Image `json:"image,omitempty"`
1172
+
1173
+ // ImagePullPolicy is the pull policy for the distro image
1174
+ ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
1175
+
1191
1176
// Command is the command to start the distro binary. This will override the existing command.
1192
1177
Command []string `json:"command,omitempty"`
1193
1178
@@ -1199,6 +1184,12 @@ type DistroContainerEnabled struct {
1199
1184
// Enabled signals this container should be enabled.
1200
1185
Enabled bool `json:"enabled,omitempty"`
1201
1186
1187
+ // Image is the distro image
1188
+ Image Image `json:"image,omitempty"`
1189
+
1190
+ // ImagePullPolicy is the pull policy for the distro image
1191
+ ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
1192
+
1202
1193
// Command is the command to start the distro binary. This will override the existing command.
1203
1194
Command []string `json:"command,omitempty"`
1204
1195
@@ -1228,7 +1219,7 @@ type Image struct {
1228
1219
// Repository is the repository of the container image, e.g. my-repo/my-image
1229
1220
Repository string `json:"repository,omitempty"`
1230
1221
1231
- // Tag is the tag of the container image, e.g. latest. If set to the default, it will use the host Kubernetes version.
1222
+ // Tag is the tag of the container image, e.g. latest
1232
1223
Tag string `json:"tag,omitempty"`
1233
1224
}
1234
1225
@@ -1306,47 +1297,18 @@ type Etcd struct {
1306
1297
1307
1298
// Deploy defines to use an external etcd that is deployed by the helm chart
1308
1299
Deploy EtcdDeploy `json:"deploy,omitempty"`
1309
-
1310
- // External defines to use a self-hosted external etcd that is not deployed by the helm chart
1311
- External EtcdExternal `json:"external,omitempty"`
1312
1300
}
1313
1301
1314
1302
func (e Etcd ) JSONSchemaExtend (base * jsonschema.Schema ) {
1315
1303
addProToJSONSchema (base , reflect .TypeOf (e ))
1316
1304
}
1317
1305
1318
- type EtcdExternal struct {
1319
- // Enabled defines if the external etcd should be used.
1320
- Enabled bool `json:"enabled,omitempty"`
1321
-
1322
- // Endpoint holds the endpoint of the external etcd server, e.g. my-example-service:2379
1323
- Endpoint string `json:"endpoint,omitempty"`
1324
-
1325
- // TLS defines the tls configuration for the external etcd server
1326
- TLS EtcdExternalTLS `json:"tls,omitempty"`
1327
- }
1328
-
1329
- // EtcdExternalTLS defines tls for external etcd server
1330
- type EtcdExternalTLS struct {
1331
- // CaFile is the path to the ca file
1332
- CaFile string `json:"caFile,omitempty"`
1333
-
1334
- // CertFile is the path to the cert file
1335
- CertFile string `json:"certFile,omitempty"`
1336
-
1337
- // KeyFile is the path to the key file
1338
- KeyFile string `json:"keyFile,omitempty"`
1339
- }
1340
-
1341
1306
type EtcdEmbedded struct {
1342
1307
// Enabled defines if the embedded etcd should be used.
1343
1308
Enabled bool `json:"enabled,omitempty" product:"pro"`
1344
1309
1345
1310
// MigrateFromDeployedEtcd signals that vCluster should migrate from the deployed external etcd to embedded etcd.
1346
1311
MigrateFromDeployedEtcd bool `json:"migrateFromDeployedEtcd,omitempty"`
1347
-
1348
- // SnapshotCount defines the number of snapshots to keep for the embedded etcd. Defaults to 10000 if less than 1.
1349
- SnapshotCount int `json:"snapshotCount,omitempty"`
1350
1312
}
1351
1313
1352
1314
func (e EtcdEmbedded ) JSONSchemaExtend (base * jsonschema.Schema ) {
@@ -1838,18 +1800,9 @@ type NetworkPolicy struct {
1838
1800
// Enabled defines if the network policy should be deployed by vCluster.
1839
1801
Enabled bool `json:"enabled,omitempty"`
1840
1802
1841
- // FallbackDNS is the fallback DNS server to use if the virtual cluster does not have a DNS server.
1842
- FallbackDNS string `json:"fallbackDns,omitempty"`
1843
-
1844
- // OutgoingConnections are the outgoing connections options for the vCluster workloads.
1803
+ FallbackDNS string `json:"fallbackDns,omitempty"`
1845
1804
OutgoingConnections OutgoingConnections `json:"outgoingConnections,omitempty"`
1846
1805
1847
- // ExtraControlPlaneRules are extra allowed rules for the vCluster control plane.
1848
- ExtraControlPlaneRules []map [string ]interface {} `json:"extraControlPlaneRules,omitempty"`
1849
-
1850
- // ExtraWorkloadRules are extra allowed rules for the vCluster workloads.
1851
- ExtraWorkloadRules []map [string ]interface {} `json:"extraWorkloadRules,omitempty"`
1852
-
1853
1806
LabelsAndAnnotations `json:",inline"`
1854
1807
}
1855
1808
@@ -2091,6 +2044,10 @@ type Experimental struct {
2091
2044
2092
2045
// DenyProxyRequests denies certain requests in the vCluster proxy.
2093
2046
DenyProxyRequests []DenyRule `json:"denyProxyRequests,omitempty" product:"pro"`
2047
+
2048
+ // ReuseNamespace allows reusing the same namespace to create multiple vClusters.
2049
+ // This flag is deprecated, as this scenario will be removed entirely in upcoming releases.
2050
+ ReuseNamespace bool `json:"reuseNamespace,omitempty"`
2094
2051
}
2095
2052
2096
2053
func (e Experimental ) JSONSchemaExtend (base * jsonschema.Schema ) {
0 commit comments