k8c.io/api/v3@v3.0.0-20230904060738-b0a93889c0b6/pkg/apis/ee.kubermatic/v1/configuration.go (about) 1 /* 2 Copyright 2023 The Kubermatic Kubernetes Platform contributors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package v1 18 19 import ( 20 kubermaticv1 "k8c.io/api/v3/pkg/apis/kubermatic/v1" 21 "k8c.io/api/v3/pkg/semver" 22 23 corev1 "k8s.io/api/core/v1" 24 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 25 ) 26 27 // +kubebuilder:validation:Enum=always;externalCloudProvider;inTreeProvider 28 29 // ConditionType is the type defining the cluster or datacenter condition that must be met to block a specific version. 30 type ConditionType string 31 32 const ( 33 // AlwaysCondition represent an always true matching condition used while checking provider incompatibilities. 34 ConditionAlways ConditionType = "always" 35 // ExternalCloudProviderCondition is an incompatibility condition that represents the usage of the external Cloud Provider. 36 ConditionExternalCloudProvider ConditionType = kubermaticv1.ClusterFeatureExternalCloudProvider 37 // InTreeCloudProviderCondition is an incompatibility condition that represents the usage of the in-tree Cloud Provider. 38 ConditionInTreeCloudProvider ConditionType = "inTreeProvider" 39 ) 40 41 // +kubebuilder:validation:Enum=CREATE;UPGRADE;SUPPORT 42 43 // OperationType is the type defining the operations triggering the compatibility check (CREATE or UPDATE). 44 type OperationType string 45 46 const ( 47 // CreateOperation represents the creation of a new cluster. 48 OperationCreate OperationType = "CREATE" 49 // UpdateOperation represents the update of an existing cluster. 50 OperationUpdate OperationType = "UPGRADE" 51 // SupportOperation represents the possibility to enable a new feature on an existing cluster. 52 OperationSupport OperationType = "SUPPORT" 53 ) 54 55 // +genclient 56 // +kubebuilder:object:generate=true 57 // +kubebuilder:object:root=true 58 // +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type="date" 59 60 // KubermaticConfiguration is the configuration required for running Kubermatic. 61 type KubermaticConfiguration struct { 62 metav1.TypeMeta `json:",inline"` 63 metav1.ObjectMeta `json:"metadata,omitempty"` 64 65 Spec KubermaticConfigurationSpec `json:"spec,omitempty"` 66 Status KubermaticConfigurationStatus `json:"status,omitempty"` 67 } 68 69 // KubermaticConfigurationStatus stores status information about a KubermaticConfiguration. 70 type KubermaticConfigurationStatus struct { 71 // KubermaticVersion current Kubermatic Version. 72 KubermaticVersion string `json:"kubermaticVersion,omitempty"` 73 // KubermaticEdition current Kubermatic Edition , i.e. Community Edition or Enterprise Edition. 74 KubermaticEdition string `json:"kubermaticEdition,omitempty"` 75 } 76 77 // KubermaticConfigurationSpec is the spec for a Kubermatic installation. 78 type KubermaticConfigurationSpec struct { 79 // CABundle references a ConfigMap in the same namespace as the KubermaticConfiguration. 80 // This ConfigMap must contain a ca-bundle.pem with PEM-encoded certificates. This bundle 81 // automatically synchronized into each seed and each usercluster. APIGroup and Kind are 82 // currently ignored. 83 CABundle corev1.TypedLocalObjectReference `json:"caBundle,omitempty"` 84 // ImagePullSecret is used to authenticate against Docker registries. 85 ImagePullSecret string `json:"imagePullSecret,omitempty"` 86 // Auth defines keys and URLs for Dex. These must be defined unless the HeadlessInstallation 87 // feature gate is set, which will disable the UI/API and its need for an OIDC provider entirely. 88 Auth *KubermaticAuthConfiguration `json:"auth,omitempty"` 89 // FeatureGates are used to optionally enable certain features. 90 FeatureGates map[string]bool `json:"featureGates,omitempty"` 91 // UI configures the dashboard. 92 UI *KubermaticUIConfiguration `json:"ui,omitempty"` 93 // API configures the frontend REST API used by the dashboard. 94 API *KubermaticAPIConfiguration `json:"api,omitempty"` 95 // SeedController configures the seed-controller-manager. 96 SeedController *KubermaticSeedControllerConfiguration `json:"seedController,omitempty"` 97 // MasterController configures the master-controller-manager. 98 MasterController *KubermaticMasterControllerConfiguration `json:"masterController,omitempty"` 99 // Webhook configures the webhook. 100 Webhook *KubermaticWebhookConfiguration `json:"webhook,omitempty"` 101 // UserCluster configures various aspects of the user-created clusters. 102 UserCluster *KubermaticUserClusterConfiguration `json:"userCluster,omitempty"` 103 // ExposeStrategy is the strategy to expose the cluster with. 104 // Note: The `seed_dns_overwrite` setting of a Seed's datacenter doesn't have any effect 105 // if this is set to LoadBalancerStrategy. 106 ExposeStrategy ExposeStrategy `json:"exposeStrategy,omitempty"` 107 // Ingress contains settings for making the API and UI accessible remotely. 108 Ingress KubermaticIngressConfiguration `json:"ingress,omitempty"` 109 // Versions configures the available and default Kubernetes versions and updates. 110 Versions KubermaticVersioningConfiguration `json:"versions,omitempty"` 111 // VerticalPodAutoscaler configures the Kubernetes VPA integration. 112 VerticalPodAutoscaler *KubermaticVPAConfiguration `json:"verticalPodAutoscaler,omitempty"` 113 // Proxy allows to configure Kubermatic to use proxies to talk to the 114 // world outside of its cluster. 115 Proxy *KubermaticProxyConfiguration `json:"proxy,omitempty"` 116 } 117 118 // KubermaticAuthConfiguration defines keys and URLs for Dex. 119 type KubermaticAuthConfiguration struct { 120 ClientID string `json:"clientID,omitempty"` 121 TokenIssuer string `json:"tokenIssuer,omitempty"` 122 IssuerRedirectURL string `json:"issuerRedirectURL,omitempty"` 123 IssuerClientID string `json:"issuerClientID,omitempty"` 124 IssuerClientSecret string `json:"issuerClientSecret,omitempty"` 125 IssuerCookieKey string `json:"issuerCookieKey,omitempty"` 126 ServiceAccountKey string `json:"serviceAccountKey,omitempty"` 127 SkipTokenIssuerTLSVerify bool `json:"skipTokenIssuerTLSVerify,omitempty"` 128 } 129 130 // KubermaticAPIConfiguration configures the dashboard. 131 type KubermaticAPIConfiguration struct { 132 // DockerRepository is the repository containing the Kubermatic REST API image. 133 DockerRepository string `json:"dockerRepository,omitempty"` 134 // AccessibleAddons is a list of addons that should be enabled in the API. 135 AccessibleAddons []string `json:"accessibleAddons,omitempty"` 136 // PProfEndpoint controls the port the API should listen on to provide pprof 137 // data. This port is never exposed from the container and only available via port-forwardings. 138 PProfEndpoint *string `json:"pprofEndpoint,omitempty"` 139 // Resources describes the requested and maximum allowed CPU/memory usage. 140 Resources *corev1.ResourceRequirements `json:"resources,omitempty"` 141 // DebugLog enables more verbose logging. 142 DebugLog bool `json:"debugLog,omitempty"` 143 // Replicas sets the number of pod replicas for the API deployment. 144 Replicas *int32 `json:"replicas,omitempty"` 145 } 146 147 // KubermaticUIConfiguration configures the dashboard. 148 type KubermaticUIConfiguration struct { 149 // DockerRepository is the repository containing the Kubermatic dashboard image. 150 DockerRepository string `json:"dockerRepository,omitempty"` 151 // DockerTag is used to overwrite the dashboard Docker image tag and is only for development 152 // purposes. This field must not be set in production environments. 153 // --- 154 //nolint:staticcheck 155 //lint:ignore SA5008 omitgenyaml is used by the example-yaml-generator 156 DockerTag string `json:"dockerTag,omitempty,omitgenyaml"` 157 // DockerTagSuffix is appended to the KKP version used for referring to the custom dashboard image. 158 // If left empty, either the `DockerTag` if specified or the original dashboard Docker image tag will be used. 159 // With DockerTagSuffix the tag becomes <KKP_VERSION:SUFFIX> i.e. "v3.15.0-SUFFIX". 160 DockerTagSuffix string `json:"dockerTagSuffix,omitempty"` 161 // Config sets flags for various dashboard features. 162 Config string `json:"config,omitempty"` 163 // Resources describes the requested and maximum allowed CPU/memory usage. 164 Resources *corev1.ResourceRequirements `json:"resources,omitempty"` 165 // Replicas sets the number of pod replicas for the UI deployment. 166 Replicas *int32 `json:"replicas,omitempty"` 167 } 168 169 // KubermaticSeedControllerConfiguration configures the Kubermatic seed controller-manager. 170 type KubermaticSeedControllerConfiguration struct { 171 // DockerRepository is the repository containing the Kubermatic seed-controller-manager image. 172 DockerRepository string `json:"dockerRepository,omitempty"` 173 // BackupStoreContainer is the container used for shipping etcd snapshots to a backup location. 174 BackupStoreContainer string `json:"backupStoreContainer,omitempty"` 175 // BackupDeleteContainer is the container used for deleting etcd snapshots from a backup location. 176 // This container is only relevant when the new backup/restore controllers are enabled. 177 BackupDeleteContainer string `json:"backupDeleteContainer,omitempty"` 178 // BackupCleanupContainer is the container used for removing expired backups from the storage location. 179 // This container is only relevant when the old, deprecated backup controllers are enabled. 180 BackupCleanupContainer string `json:"backupCleanupContainer,omitempty"` 181 // MaximumParallelReconciles limits the number of cluster reconciliations 182 // that are active at any given time. 183 MaximumParallelReconciles int `json:"maximumParallelReconciles,omitempty"` 184 // PProfEndpoint controls the port the seed-controller-manager should listen on to provide pprof 185 // data. This port is never exposed from the container and only available via port-forwardings. 186 PProfEndpoint *string `json:"pprofEndpoint,omitempty"` 187 // Resources describes the requested and maximum allowed CPU/memory usage. 188 Resources *corev1.ResourceRequirements `json:"resources,omitempty"` 189 // DebugLog enables more verbose logging. 190 DebugLog bool `json:"debugLog,omitempty"` 191 // Replicas sets the number of pod replicas for the seed-controller-manager. 192 Replicas *int32 `json:"replicas,omitempty"` 193 } 194 195 // KubermaticWebhookConfiguration configures the Kubermatic webhook. 196 type KubermaticWebhookConfiguration struct { 197 // DockerRepository is the repository containing the Kubermatic webhook image. 198 DockerRepository string `json:"dockerRepository,omitempty"` 199 // PProfEndpoint controls the port the webhook should listen on to provide pprof 200 // data. This port is never exposed from the container and only available via port-forwardings. 201 PProfEndpoint *string `json:"pprofEndpoint,omitempty"` 202 // Resources describes the requested and maximum allowed CPU/memory usage. 203 Resources *corev1.ResourceRequirements `json:"resources,omitempty"` 204 // DebugLog enables more verbose logging. 205 DebugLog bool `json:"debugLog,omitempty"` 206 // Replicas sets the number of pod replicas for the webhook. 207 Replicas *int32 `json:"replicas,omitempty"` 208 } 209 210 // KubermaticUserClusterConfiguration controls various aspects of the user-created clusters. 211 type KubermaticUserClusterConfiguration struct { 212 // KubermaticDockerRepository is the repository containing the Kubermatic user-cluster-controller-manager image. 213 KubermaticDockerRepository string `json:"kubermaticDockerRepository,omitempty"` 214 // DNATControllerDockerRepository is the repository containing the 215 // dnat-controller image. 216 DNATControllerDockerRepository string `json:"dnatControllerDockerRepository,omitempty"` 217 // EtcdLauncherDockerRepository is the repository containing the Kubermatic 218 // etcd-launcher image. 219 EtcdLauncherDockerRepository string `json:"etcdLauncherDockerRepository,omitempty"` 220 // OverwriteRegistry specifies a custom Docker registry which will be used for all images 221 // used for user clusters (user cluster control plane + addons). This also applies to 222 // the KubermaticDockerRepository and DNATControllerDockerRepository fields. 223 OverwriteRegistry string `json:"overwriteRegistry,omitempty"` 224 // Addons controls the optional additions installed into each user cluster. 225 Addons *KubermaticAddonsConfiguration `json:"addons,omitempty"` 226 // SystemApplications contains configuration for system Applications (such as CNI). 227 SystemApplications *SystemApplicationsConfiguration `json:"systemApplications,omitempty"` 228 // NodePortRange is the port range for user clusters - this must match the NodePort 229 // range of the seed cluster. 230 NodePortRange string `json:"nodePortRange,omitempty"` 231 // Monitoring can be used to fine-tune to in-cluster Prometheus. 232 Monitoring *KubermaticUserClusterMonitoringConfiguration `json:"monitoring,omitempty"` 233 // DisableAPIServerEndpointReconciling can be used to toggle the `--endpoint-reconciler-type` flag for 234 // the Kubernetes API server. 235 DisableAPIServerEndpointReconciling bool `json:"disableApiserverEndpointReconciling,omitempty"` 236 // EtcdVolumeSize configures the volume size to use for each etcd pod inside user clusters. 237 EtcdVolumeSize string `json:"etcdVolumeSize,omitempty"` 238 // APIServerReplicas configures the replica count for the API-Server deployment inside user clusters. 239 APIServerReplicas *int32 `json:"apiserverReplicas,omitempty"` 240 // MachineController configures the Machine Controller 241 MachineController *MachineControllerConfiguration `json:"machineController,omitempty"` 242 // OperatingSystemManager configures the image repo and the tag version for osm deployment. 243 OperatingSystemManager *OperatingSystemManager `json:"operatingSystemManager,omitempty"` 244 } 245 246 // KubermaticUserClusterMonitoringConfiguration can be used to fine-tune to in-cluster Prometheus. 247 type KubermaticUserClusterMonitoringConfiguration struct { 248 // DisableDefaultRules disables the recording and alerting rules. 249 DisableDefaultRules bool `json:"disableDefaultRules,omitempty"` 250 // DisableDefaultScrapingConfigs disables the default scraping targets. 251 DisableDefaultScrapingConfigs bool `json:"disableDefaultScrapingConfigs,omitempty"` 252 // CustomRules can be used to inject custom recording and alerting rules. This field 253 // must be a YAML-formatted string with a `group` element at its root, as documented 254 // on https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/. 255 // This value is treated as a Go template, which allows to inject dynamic values like 256 // the internal cluster address or the cluster ID. Refer to pkg/resources/prometheus 257 // and the documentation for more information on the available fields. 258 CustomRules string `json:"customRules,omitempty"` 259 // CustomScrapingConfigs can be used to inject custom scraping rules. This must be a 260 // YAML-formatted string containing an array of scrape configurations as documented 261 // on https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config. 262 // This value is treated as a Go template, which allows to inject dynamic values like 263 // the internal cluster address or the cluster ID. Refer to pkg/resources/prometheus 264 // and the documentation for more information on the available fields. 265 CustomScrapingConfigs string `json:"customScrapingConfigs,omitempty"` 266 // ScrapeAnnotationPrefix (if set) is used to make the in-cluster Prometheus scrape pods 267 // inside the user clusters. 268 ScrapeAnnotationPrefix string `json:"scrapeAnnotationPrefix,omitempty"` 269 } 270 271 // MachineControllerConfiguration configures Machine Controller. 272 type MachineControllerConfiguration struct { 273 // ImageRepository is used to override the Machine Controller image repository. 274 // It is only for development, tests and PoC purposes. This field must not be set in production environments. 275 ImageRepository string `json:"imageRepository,omitempty"` 276 // ImageTag is used to override the Machine Controller image. 277 // It is only for development, tests and PoC purposes. This field must not be set in production environments. 278 ImageTag string `json:"imageTag,omitempty"` 279 } 280 281 // OperatingSystemManager configures the image repo and the tag version for osm deployment. 282 type OperatingSystemManager struct { 283 // ImageRepository is used to override the OperatingSystemManager image repository. 284 // It is recommended to use this field only for development, tests and PoC purposes. For production environments. 285 // it is not recommended, to use this field due to compatibility with the overall KKP stack. 286 ImageRepository string `json:"imageRepository,omitempty"` 287 // ImageTag is used to override the OperatingSystemManager image. 288 // It is recommended to use this field only for development, tests and PoC purposes. For production environments. 289 // it is not recommended, to use this field due to compatibility with the overall KKP stack. 290 ImageTag string `json:"imageTag,omitempty"` 291 } 292 293 // KubermaticAddonConfiguration describes the addons for a given cluster runtime. 294 type KubermaticAddonsConfiguration struct { 295 // Default is the list of addons to be installed by default into each cluster. 296 // Mutually exclusive with "defaultManifests". 297 Default []string `json:"default,omitempty"` 298 // DefaultManifests is a list of addon manifests to install into all clusters. 299 // Mutually exclusive with "default". 300 DefaultManifests string `json:"defaultManifests,omitempty"` 301 // DockerRepository is the repository containing the Docker image containing 302 // the possible addon manifests. 303 DockerRepository string `json:"dockerRepository,omitempty"` 304 // DockerTagSuffix is appended to the tag used for referring to the addons image. 305 // If left empty, the tag will be the KKP version (e.g. "v3.15.0"), with a 306 // suffix it becomes "v3.15.0-SUFFIX". 307 DockerTagSuffix string `json:"dockerTagSuffix,omitempty"` 308 } 309 310 // SystemApplicationsConfiguration contains configuration for system Applications (e.g. CNI). 311 type SystemApplicationsConfiguration struct { 312 // HelmRepository specifies OCI repository containing Helm charts of system Applications. 313 HelmRepository string `json:"helmRepository,omitempty"` 314 // HelmRegistryConfigFile optionally holds the ref and key in the secret for the OCI registry credential file. 315 // The value is dockercfg file that follows the same format rules as ~/.docker/config.json 316 // The Secret must exist in the namespace where KKP is installed (default is "kubermatic"). 317 // The Secret must be annotated with `apps.kubermatic.k8c.io/secret-type:` set to "helm". 318 HelmRegistryConfigFile *corev1.SecretKeySelector `json:"helmRegistryConfigFile,omitempty"` 319 } 320 321 type KubermaticIngressConfiguration struct { 322 // Domain is the base domain where the dashboard shall be available. Even with 323 // a disabled Ingress, this must always be a valid hostname. 324 Domain string `json:"domain"` 325 326 // ClassName is the Ingress resource's class name, used for selecting the appropriate 327 // ingress controller. 328 ClassName string `json:"className,omitempty"` 329 330 // Disable will prevent an Ingress from being created at all. This is mostly useful 331 // during testing. If the Ingress is disabled, the CertificateIssuer setting can also 332 // be left empty, as no Certificate resource will be created. 333 Disable bool `json:"disable,omitempty"` 334 335 // CertificateIssuer is the name of a cert-manager Issuer or ClusterIssuer (default) 336 // that will be used to acquire the certificate for the configured domain. 337 // To use a namespaced Issuer, set the Kind to "Issuer" and manually create the 338 // matching Issuer in Kubermatic's namespace. 339 // Setting an empty name disables the automatic creation of certificates and disables 340 // the TLS settings on the Kubermatic Ingress. 341 CertificateIssuer *corev1.TypedLocalObjectReference `json:"certificateIssuer,omitempty"` 342 } 343 344 // KubermaticMasterControllerConfiguration configures the Kubermatic master controller-manager. 345 type KubermaticMasterControllerConfiguration struct { 346 // DockerRepository is the repository containing the Kubermatic master-controller-manager image. 347 DockerRepository string `json:"dockerRepository,omitempty"` 348 // ProjectsMigrator configures the migrator for user projects. 349 ProjectsMigrator *KubermaticProjectsMigratorConfiguration `json:"projectsMigrator,omitempty"` 350 // PProfEndpoint controls the port the master-controller-manager should listen on to provide pprof 351 // data. This port is never exposed from the container and only available via port-forwardings. 352 PProfEndpoint *string `json:"pprofEndpoint,omitempty"` 353 // Resources describes the requested and maximum allowed CPU/memory usage. 354 Resources *corev1.ResourceRequirements `json:"resources,omitempty"` 355 // DebugLog enables more verbose logging. 356 DebugLog bool `json:"debugLog,omitempty"` 357 // Replicas sets the number of pod replicas for the master-controller-manager. 358 Replicas *int32 `json:"replicas,omitempty"` 359 } 360 361 // KubermaticProjectsMigratorConfiguration configures the Kubermatic master controller-manager. 362 type KubermaticProjectsMigratorConfiguration struct { 363 // DryRun makes the migrator only log the actions it would take. 364 DryRun bool `json:"dryRun,omitempty"` 365 } 366 367 // KubermaticVersioningConfiguration configures the available and default Kubernetes versions. 368 type KubermaticVersioningConfiguration struct { 369 // Versions lists the available versions. 370 Versions []semver.Semver `json:"versions,omitempty"` 371 // Default is the default version to offer users. 372 Default *semver.Semver `json:"default,omitempty"` 373 374 // Updates is a list of available and automatic upgrades. 375 // All 'to' versions must be configured in the version list for this orchestrator. 376 // Each update may optionally be configured to be 'automatic: true', in which case the 377 // controlplane of all clusters whose version matches the 'from' directive will get 378 // updated to the 'to' version. If automatic is enabled, the 'to' version must be a 379 // version and not a version range. 380 // Also, updates may set 'automaticNodeUpdate: true', in which case Nodes will get 381 // updates as well. 'automaticNodeUpdate: true' implies 'automatic: true' as well, 382 // because Nodes may not have a newer version than the controlplane. 383 Updates []Update `json:"updates,omitempty"` 384 385 // ProviderIncompatibilities lists all the Kubernetes version incompatibilities 386 ProviderIncompatibilities []Incompatibility `json:"providerIncompatibilities,omitempty"` 387 388 // ExternalClusters contains the available and default Kubernetes versions and updates for ExternalClusters. 389 ExternalClusters map[kubermaticv1.ExternalClusterProvider]ExternalClusterProviderVersioningConfiguration `json:"externalClusters,omitempty"` 390 } 391 392 // ExternalClusterProviderVersioningConfiguration configures the available and default Kubernetes versions for ExternalCluster Providers. 393 type ExternalClusterProviderVersioningConfiguration struct { 394 // Versions lists the available versions. 395 Versions []semver.Semver `json:"versions,omitempty"` 396 // Default is the default version to offer users. 397 Default *semver.Semver `json:"default,omitempty"` 398 // Updates is a list of available upgrades. 399 Updates []semver.Semver `json:"updates,omitempty"` 400 } 401 402 // Update represents an update option for a user cluster. 403 type Update struct { 404 // From is the version from which an update is allowed. Wildcards are allowed, e.g. "1.18.*". 405 From string `json:"from,omitempty"` 406 // To is the version to which an update is allowed. 407 // Must be a valid version if `automatic` is set to true, e.g. "1.20.13". 408 // Can be a wildcard otherwise, e.g. "1.20.*". 409 To string `json:"to,omitempty"` 410 // Automatic controls whether this update is executed automatically 411 // for the control plane of all matching user clusters. 412 // --- 413 //nolint:staticcheck 414 //lint:ignore SA5008 omitgenyaml is used by the example-yaml-generator 415 Automatic *bool `json:"automatic,omitempty,omitgenyaml"` 416 // Automatic controls whether this update is executed automatically 417 // for the worker nodes of all matching user clusters. 418 // --- 419 //nolint:staticcheck 420 //lint:ignore SA5008 omitgenyaml is used by the example-yaml-generator 421 AutomaticNodeUpdate *bool `json:"automaticNodeUpdate,omitempty,omitgenyaml"` 422 } 423 424 // Incompatibility represents a version incompatibility for a user cluster. 425 type Incompatibility struct { 426 // Provider to which to apply the compatibility check. If this is not specified, the 427 // incompatibility is valid for all cloud providers. 428 Provider CloudProvider `json:"provider,omitempty"` 429 // Version is the Kubernetes version that must be checked. Wildcards are allowed, e.g. "1.25.*". 430 Version string `json:"version,omitempty"` 431 // Condition is the cluster or datacenter condition that must be met to block a specific version 432 Condition ConditionType `json:"condition,omitempty"` 433 // Operation is the operation triggering the compatibility check (CREATE or UPDATE) 434 Operation OperationType `json:"operation,omitempty"` 435 } 436 437 // KubermaticVPAConfiguration configures the Kubernetes VPA. 438 type KubermaticVPAConfiguration struct { 439 Recommender *KubermaticVPAComponent `json:"recommender,omitempty"` 440 Updater *KubermaticVPAComponent `json:"updater,omitempty"` 441 AdmissionController *KubermaticVPAComponent `json:"admissionController,omitempty"` 442 } 443 444 type KubermaticVPAComponent struct { 445 // DockerRepository is the repository containing the component's image. 446 DockerRepository string `json:"dockerRepository,omitempty"` 447 // Resources describes the requested and maximum allowed CPU/memory usage. 448 Resources *corev1.ResourceRequirements `json:"resources,omitempty"` 449 } 450 451 // KubermaticProxyConfiguration can be used to control how the various 452 // Kubermatic components reach external services / the Internet. These 453 // settings are reflected as environment variables for the Kubermatic 454 // pods. 455 type KubermaticProxyConfiguration struct { 456 // HTTP is the full URL to the proxy to use for plaintext HTTP 457 // connections, e.g. "http://internalproxy.example.com:8080". 458 HTTP string `json:"http,omitempty"` 459 // HTTPS is the full URL to the proxy to use for encrypted HTTPS 460 // connections, e.g. "http://secureinternalproxy.example.com:8080". 461 HTTPS string `json:"https,omitempty"` 462 // NoProxy is a comma-separated list of hostnames / network masks 463 // for which no proxy shall be used. If you make use of proxies, 464 // this list should contain all local and cluster-internal domains 465 // and networks, e.g. "10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,mydomain". 466 // The operator will always prepend the following elements to this 467 // list if proxying is configured (i.e. HTTP/HTTPS are not empty): 468 // "127.0.0.1/8", "localhost", ".local", ".local.", "kubernetes", ".default", ".svc" 469 NoProxy string `json:"noProxy,omitempty"` 470 } 471 472 // +kubebuilder:object:generate=true 473 // +kubebuilder:object:root=true 474 475 // KubermaticConfigurationList is a collection of KubermaticConfigurations. 476 type KubermaticConfigurationList struct { 477 metav1.TypeMeta `json:",inline"` 478 metav1.ListMeta `json:"metadata,omitempty"` 479 480 Items []KubermaticConfiguration `json:"items"` 481 }