Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupClusterResource(client ctrlruntimeclient.Client, obj ctrlruntimeclient.Object, name string) error
- func CreateProviderIncompatibilitiesYAML(config *operatorv1alpha1.KubermaticVersionsConfiguration) (string, error)
- func CreateUpdatesYAML(config *operatorv1alpha1.KubermaticVersionsConfiguration) (string, error)
- func CreateVersionsYAML(config *operatorv1alpha1.KubermaticVersionsConfiguration) (string, error)
- func DefaultConfiguration(config *operatorv1alpha1.KubermaticConfiguration, logger *zap.SugaredLogger) (*operatorv1alpha1.KubermaticConfiguration, error)
- func DefaultSeed(seed *kubermaticv1.Seed, logger *zap.SugaredLogger) (*kubermaticv1.Seed, error)
- func DockercfgSecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedSecretCreatorGetter
- func ExtraFilesSecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedSecretCreatorGetter
- func NamespaceCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedNamespaceCreatorGetter
- func OwnershipModifierFactory(owner metav1.Object, scheme *runtime.Scheme) reconciling.ObjectModifier
- func ProxyEnvironmentVars(cfg *operatorv1alpha1.KubermaticConfiguration) []corev1.EnvVar
- func SeedAdmissionServiceCreator(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) reconciling.NamedServiceCreatorGetter
- func SeedAdmissionWebhookCreator(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) reconciling.NamedValidatingWebhookConfigurationCreatorGetter
- func SeedAdmissionWebhookName(cfg *operatorv1alpha1.KubermaticConfiguration) string
- func StringifyFeatureGates(cfg *operatorv1alpha1.KubermaticConfiguration) string
- func VolumeRevisionLabelsModifierFactory(ctx context.Context, client ctrlruntimeclient.Client) reconciling.ObjectModifier
- func WebhookCABundle(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) ([]byte, error)
- func WebhookServingCASecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedSecretCreatorGetter
- func WebhookServingCertSecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) reconciling.NamedSecretCreatorGetter
Constants ¶
const ( DefaultPProfEndpoint = ":6600" DefaultNodePortRange = "30000-32767" DefaultEtcdVolumeSize = "5Gi" DefaultAuthClientID = "kubermatic" DefaultIngressClass = "nginx" DefaultCABundleConfigMapName = "ca-bundle" DefaultAPIReplicas = 2 DefaultUIReplicas = 2 DefaultSeedControllerMgrReplicas = 1 DefaultMasterControllerMgrReplicas = 1 DefaultAPIServerReplicas = 2 DefaultExposeStrategy = kubermaticv1.ExposeStrategyNodePort DefaultVPARecommenderDockerRepository = "gcr.io/google_containers/vpa-recommender" DefaultVPAUpdaterDockerRepository = "gcr.io/google_containers/vpa-updater" DefaultVPAAdmissionControllerDockerRepository = "gcr.io/google_containers/vpa-admission-controller" DefaultEnvoyDockerRepository = "docker.io/envoyproxy/envoy-alpine" DefaultMaximumParallelReconciles = 10 DefaultS3Endpoint = "s3.amazonaws.com" // DefaultNoProxy is a set of domains/networks that should never be // routed through a proxy. All user-supplied values are appended to // this constant. DefaultNoProxy = "127.0.0.1/8,localhost,.local,.local.,kubernetes,.default,.svc" )
const ( // NameLabel is the label containing the application's name. NameLabel = "app.kubernetes.io/name" // VersionLabel is the label containing the application's version. VersionLabel = "app.kubernetes.io/version" // VersionsFileName is the name of the YAML file containing the enabled and // default Kubernetes versions. VersionsFileName = "versions.yaml" // UpdatesFileName is the name of the YAML file containing the configured // cluster upgrade rules. UpdatesFileName = "updates.yaml" // ProviderIncompatibilitiesFileName is the name of the YAML file containing the configured // cluster provider incompatibility rules. ProviderIncompatibilitiesFileName = "provider-incompatibilities.yaml" // KubernetesAddonsFileName is the name of the kubernetes addons manifest file // in the master files. KubernetesAddonsFileName = "kubernetes-addons.yaml" DockercfgSecretName = "dockercfg" ExtraFilesSecretName = "extra-files" SeedWebhookServiceName = "seed-webhook" ClusterWebhookServiceName = "cluster-webhook" WebhookServingCASecretName = "webhook-ca" WebhookServingCertSecretName = "webhook-cert" IngressName = "kubermatic" MasterControllerManagerDeploymentName = "kubermatic-master-controller-manager" SeedControllerManagerDeploymentName = "kubermatic-seed-controller-manager" CleanupFinalizer = "operator.kubermatic.io/cleanup" // SkipReconcilingAnnotation can be used on Seed resources to make // the operator ignore them and not reconcile the seed components into // the cluster. This should only be used during cluster migrations. SkipReconcilingAnnotation = "operator.kubermatic.io/skip-reconciling" )
const ( // OperatorName is used as the value for ManagedBy labels to establish // a weak ownership to reconciled resources. OperatorName = "kubermatic-operator" // ManagedByLabel is the label used to identify the resources // created by this controller. ManagedByLabel = "app.kubernetes.io/managed-by" )
const DefaultBackupCleanupContainer = `` /* 891-byte string literal not displayed */
const DefaultBackupStoreContainer = `` /* 869-byte string literal not displayed */
const DefaultKubernetesAddons = `` /* 1301-byte string literal not displayed */
const DefaultNewBackupDeleteContainer = `` /* 934-byte string literal not displayed */
const DefaultNewBackupStoreContainer = `` /* 880-byte string literal not displayed */
const (
DefaultNodeportProxyDockerRepository = "quay.io/kubermatic/nodeport-proxy"
)
const DefaultUIConfig = `
{
"share_kubeconfig": false
}`
Variables ¶
var ( DefaultAccessibleAddons = []string{ "cluster-autoscaler", "node-exporter", "kube-state-metrics", "multus", } DefaultUIResources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("100m"), corev1.ResourceMemory: resource.MustParse("64Mi"), }, Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("250m"), corev1.ResourceMemory: resource.MustParse("128Mi"), }, } DefaultAPIResources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("100m"), corev1.ResourceMemory: resource.MustParse("512Mi"), }, Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("250m"), corev1.ResourceMemory: resource.MustParse("1Gi"), }, } DefaultMasterControllerMgrResources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("50m"), corev1.ResourceMemory: resource.MustParse("128Mi"), }, Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("100m"), corev1.ResourceMemory: resource.MustParse("256Mi"), }, } DefaultSeedControllerMgrResources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("200m"), corev1.ResourceMemory: resource.MustParse("512Mi"), }, Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("500m"), corev1.ResourceMemory: resource.MustParse("1Gi"), }, } DefaultVPARecommenderResources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("50m"), corev1.ResourceMemory: resource.MustParse("512Mi"), }, Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("200m"), corev1.ResourceMemory: resource.MustParse("3Gi"), }, } DefaultVPAUpdaterResources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("50m"), corev1.ResourceMemory: resource.MustParse("32Mi"), }, Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("200m"), corev1.ResourceMemory: resource.MustParse("128Mi"), }, } DefaultVPAAdmissionControllerResources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("50m"), corev1.ResourceMemory: resource.MustParse("32Mi"), }, Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("200m"), corev1.ResourceMemory: resource.MustParse("128Mi"), }, } DefaultNodeportProxyEnvoyResources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("50m"), corev1.ResourceMemory: resource.MustParse("32Mi"), }, Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("1"), corev1.ResourceMemory: resource.MustParse("128Mi"), }, } DefaultNodeportProxyEnvoyManagerResources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("50m"), corev1.ResourceMemory: resource.MustParse("32Mi"), }, Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("150m"), corev1.ResourceMemory: resource.MustParse("48Mi"), }, } DefaultNodeportProxyUpdaterResources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("50m"), corev1.ResourceMemory: resource.MustParse("32Mi"), }, Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("150m"), corev1.ResourceMemory: resource.MustParse("32Mi"), }, } DefaultNodeportProxyServiceAnnotations = map[string]string{ "service.beta.kubernetes.io/aws-load-balancer-type": "nlb", "service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout": "3600", } DefaultKubernetesVersioning = operatorv1alpha1.KubermaticVersioningConfiguration{ Default: semver.MustParse("v1.21.7"), Versions: []*semver.Version{ semver.MustParse("v1.19.15"), semver.MustParse("v1.20.13"), semver.MustParse("v1.21.7"), semver.MustParse("v1.22.4"), }, Updates: []operatorv1alpha1.Update{ { From: "1.18.*", To: "1.19.*", Automatic: pointer.BoolPtr(true), }, { From: "1.19.*", To: "1.19.*", }, { From: ">= 1.19.0, < 1.19.15", To: "1.19.15", Automatic: pointer.BoolPtr(true), }, { From: "1.19.*", To: "1.20.*", }, { From: "1.20.*", To: "1.20.*", }, { From: ">= 1.20.0, < 1.20.13", To: "1.20.13", Automatic: pointer.BoolPtr(true), }, { From: "1.20.*", To: "1.21.*", }, { From: "1.21.*", To: "1.21.*", }, { From: ">= 1.21.0, < 1.21.7", To: "1.21.7", Automatic: pointer.BoolPtr(true), }, { From: "1.21.*", To: "1.22.*", }, { From: "1.22.*", To: "1.22.*", }, { From: ">= 1.22.0, < 1.22.4", To: "1.22.4", Automatic: pointer.BoolPtr(true), }, }, ProviderIncompatibilities: []operatorv1alpha1.Incompatibility{ { Provider: kubermaticv1.ProviderVSphere, Version: "1.22.*", Condition: version.AlwaysCondition, Operation: version.CreateOperation, }, { Provider: kubermaticv1.ProviderVSphere, Version: "1.22.*", Condition: version.ExternalCloudProviderCondition, Operation: version.UpdateOperation, }, { Provider: kubermaticv1.ProviderVSphere, Version: "1.22.*", Condition: version.ExternalCloudProviderCondition, Operation: version.SupportOperation, }, }, } )
var ( // ManagedByOperatorPredicate is a predicate that matches all resources created by // the Kubermatic Operator, based on the ManagedBy label. ManagedByOperatorPredicate = predicate.Factory(func(o ctrlruntimeclient.Object) bool { for _, ref := range o.GetOwnerReferences() { if isKubermaticConfiguration(ref) || isSeed(ref) { return true } } return false }) // ManagedByOperatorSelector is a label selector that matches all resources created by // the Kubermatic Operator. ManagedByOperatorSelector, _ = labels.NewRequirement(ManagedByLabel, selection.Equals, []string{OperatorName}) )
Functions ¶
func CleanupClusterResource ¶
func CleanupClusterResource(client ctrlruntimeclient.Client, obj ctrlruntimeclient.Object, name string) error
CleanupClusterResource attempts to find a cluster-wide resource and deletes it if it was found. If no resource with the given name exists, nil is returned.
func CreateProviderIncompatibilitiesYAML ¶ added in v2.18.0
func CreateProviderIncompatibilitiesYAML(config *operatorv1alpha1.KubermaticVersionsConfiguration) (string, error)
func CreateUpdatesYAML ¶
func CreateUpdatesYAML(config *operatorv1alpha1.KubermaticVersionsConfiguration) (string, error)
func CreateVersionsYAML ¶
func CreateVersionsYAML(config *operatorv1alpha1.KubermaticVersionsConfiguration) (string, error)
func DefaultConfiguration ¶
func DefaultConfiguration(config *operatorv1alpha1.KubermaticConfiguration, logger *zap.SugaredLogger) (*operatorv1alpha1.KubermaticConfiguration, error)
func DefaultSeed ¶
func DefaultSeed(seed *kubermaticv1.Seed, logger *zap.SugaredLogger) (*kubermaticv1.Seed, error)
func DockercfgSecretCreator ¶
func DockercfgSecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedSecretCreatorGetter
func ExtraFilesSecretCreator ¶
func ExtraFilesSecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedSecretCreatorGetter
func NamespaceCreator ¶
func NamespaceCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedNamespaceCreatorGetter
func OwnershipModifierFactory ¶
func OwnershipModifierFactory(owner metav1.Object, scheme *runtime.Scheme) reconciling.ObjectModifier
OwnershipModifierFactory is generating a new ObjectModifier that wraps an ObjectCreator and takes care of applying the ownership and other labels for all managed objects.
func ProxyEnvironmentVars ¶
func ProxyEnvironmentVars(cfg *operatorv1alpha1.KubermaticConfiguration) []corev1.EnvVar
func SeedAdmissionServiceCreator ¶
func SeedAdmissionServiceCreator(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) reconciling.NamedServiceCreatorGetter
SeedAdmissionServiceCreator creates the Service for the Seed Admission webhook. This service is created on master and seed clusters, because on masters the original copy of a Seed is validated, and on seed clusters the synced copy is validated (synced by the seed-sync controller).
func SeedAdmissionWebhookCreator ¶
func SeedAdmissionWebhookCreator(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) reconciling.NamedValidatingWebhookConfigurationCreatorGetter
func SeedAdmissionWebhookName ¶
func SeedAdmissionWebhookName(cfg *operatorv1alpha1.KubermaticConfiguration) string
func StringifyFeatureGates ¶
func StringifyFeatureGates(cfg *operatorv1alpha1.KubermaticConfiguration) string
StringifyFeatureGates takes a set of enabled features and returns a comma-separated key=value list like "featureA=true,featureB=true,...".
func VolumeRevisionLabelsModifierFactory ¶
func VolumeRevisionLabelsModifierFactory(ctx context.Context, client ctrlruntimeclient.Client) reconciling.ObjectModifier
VolumeRevisionLabelsModifierFactory scans volume mounts for pod templates for ConfigMaps and Secrets and will then put new labels for these mounts onto the pod template, causing restarts when the volumes changed.
func WebhookCABundle ¶ added in v2.16.3
func WebhookCABundle(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) ([]byte, error)
func WebhookServingCASecretCreator ¶ added in v2.16.3
func WebhookServingCASecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedSecretCreatorGetter
func WebhookServingCertSecretCreator ¶ added in v2.16.3
func WebhookServingCertSecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) reconciling.NamedSecretCreatorGetter
Types ¶
This section is empty.