Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupClusterResource(client ctrlruntimeclient.Client, obj runtime.Object, name 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 DexCASecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedSecretCreatorGetter
- 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 SeedWebhookServingCASecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedSecretCreatorGetter
- func SeedWebhookServingCertSecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) reconciling.NamedSecretCreatorGetter
- func StringifyFeatureGates(cfg *operatorv1alpha1.KubermaticConfiguration) string
- func VolumeRevisionLabelsModifierFactory(ctx context.Context, client ctrlruntimeclient.Client) reconciling.ObjectModifier
- type Versions
Constants ¶
const ( DefaultPProfEndpoint = ":6600" DefaultNodePortRange = "30000-32767" DefaultEtcdVolumeSize = "5Gi" DefaultAuthClientID = "kubermatic" DefaultIngressClass = "nginx" DefaultAPIReplicas = 2 DefaultUIReplicas = 2 DefaultSeedControllerMgrReplicas = 1 DefaultMasterControllerMgrReplicas = 1 DefaultAPIServerReplicas = 2 DefaultExposeStrategy = operatorv1alpha1.NodePortStrategy 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" // 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 and Openshift versions. VersionsFileName = "versions.yaml" // UpdatesFileName is the name of the YAML file containing the configured // cluster upgrade rules. UpdatesFileName = "updates.yaml" // OpenshiftAddonsFileName is the name of the openshift addons manifest file // in the master files. OpenshiftAddonsFileName = "openshift-addons.yaml" // KubernetesAddonsFileName is the name of the kubernetes addons manifest file // in the master files. KubernetesAddonsFileName = "kubernetes-addons.yaml" DockercfgSecretName = "dockercfg" DexCASecretName = "dex-ca" ExtraFilesSecretName = "extra-files" SeedWebhookServingCASecretName = "seed-webhook-ca" SeedWebhookServingCertSecretName = "seed-webhook-cert" IngressName = "kubermatic" MasterControllerManagerDeploymentName = "kubermatic-master-controller-manager" SeedControllerManagerDeploymentName = "kubermatic-seed-controller-manager" CleanupFinalizer = "operator.kubermatic.io/cleanup" )
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 = `` /* 755-byte string literal not displayed */
const DefaultBackupStoreContainer = `` /* 720-byte string literal not displayed */
const DefaultKubernetesAddons = `` /* 1411-byte string literal not displayed */
const (
DefaultNodeportProxyDockerRepository = "quay.io/kubermatic/nodeport-proxy"
)
const DefaultOpenshiftAddons = `` /* 829-byte string literal not displayed */
const DefaultUIConfig = `
{
"share_kubeconfig": false
}`
Variables ¶
var ( DefaultAccessibleAddons = []string{ "node-exporter", } 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("200m"), corev1.ResourceMemory: resource.MustParse("64Mi"), }, } 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.17.9"), Versions: []*semver.Version{ semver.MustParse("v1.15.5"), semver.MustParse("v1.15.6"), semver.MustParse("v1.15.7"), semver.MustParse("v1.15.9"), semver.MustParse("v1.15.10"), semver.MustParse("v1.15.11"), semver.MustParse("v1.16.13"), semver.MustParse("v1.17.9"), semver.MustParse("v1.18.6"), }, Updates: []operatorv1alpha1.Update{ { From: "1.14.*", To: "1.14.*", }, { From: "<= 1.14.7, >= 1.14.0", To: "1.14.8", Automatic: pointer.BoolPtr(true), }, { From: "1.14.*", To: "1.15.*", }, { From: "1.15.*", To: "1.15.*", }, { From: "<= 1.15.4, >= 1.15.0", To: "1.15.5", Automatic: pointer.BoolPtr(true), }, { From: "1.15.8", To: "1.15.9", Automatic: pointer.BoolPtr(true), }, { From: "1.15.*", To: "1.16.*", }, { From: "1.16.*", To: "1.16.*", }, { From: "<= 1.16.12, >= 1.16.0", To: "1.16.13", Automatic: pointer.BoolPtr(true), }, { From: "1.16.*", To: "1.17.*", }, { From: "1.17.*", To: "1.17.*", }, { From: "<= 1.17.8, >= 1.17.0", To: "1.17.9", Automatic: pointer.BoolPtr(true), }, { From: "1.17.*", To: "1.18.*", }, { From: "1.18.*", To: "1.18.*", }, { From: "<= 1.18.5, >= 1.18.0", To: "1.18.6", Automatic: pointer.BoolPtr(true), }, }, } // DefaultOpenshiftVersioning contains the supported versions for openshift clusters. The OpenShift 4 // minor release is: Kubernetes minor - 12, since we only support openshift v4.1.9 and v4.1.18 only // only cri-o 1.13.x is installed to the provisioned machines. DefaultOpenshiftVersioning = operatorv1alpha1.KubermaticVersioningConfiguration{ Default: semver.MustParse("v4.1.18"), Versions: []*semver.Version{ semver.MustParse("v4.1.9"), semver.MustParse("v4.1.18"), }, Updates: []operatorv1alpha1.Update{ { From: "4.1.*", To: "4.1.*", }, { From: "4.1.*", To: "2.2.*", }, }, } )
var ( // ManagedByOperatorPredicate is a predicate that matches all resources created by // the Kubermatic Operator, based on the ManagedBy label. ManagedByOperatorPredicate = predicate.Factory(func(m metav1.Object, _ runtime.Object) bool { for _, ref := range m.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}) )
var KUBERMATICDOCKERTAG string
KUBERMATICDOCKERTAG is a magic variable containing the tag / git commit hash of the kubermatic Docker image to deploy. It gets fed by the Makefile as an ldflag.
var UIDOCKERTAG string
UIDOCKERTAG is a magic variable containing the tag / git commit hash of the dashboard-v2 Docker image to deploy. It gets fed by the Makefile as an ldflag.
Functions ¶
func CleanupClusterResource ¶
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 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 DexCASecretCreator ¶
func DexCASecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedSecretCreatorGetter
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
func SeedAdmissionWebhookCreator ¶
func SeedAdmissionWebhookCreator(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) reconciling.NamedValidatingWebhookConfigurationCreatorGetter
func SeedAdmissionWebhookName ¶
func SeedAdmissionWebhookName(cfg *operatorv1alpha1.KubermaticConfiguration) string
func SeedWebhookServingCASecretCreator ¶
func SeedWebhookServingCASecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration) reconciling.NamedSecretCreatorGetter
func SeedWebhookServingCertSecretCreator ¶
func SeedWebhookServingCertSecretCreator(cfg *operatorv1alpha1.KubermaticConfiguration, client ctrlruntimeclient.Client) reconciling.NamedSecretCreatorGetter
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.