Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupClusterResource(client ctrlruntimeclient.Client, obj ctrlruntimeclient.Object, name string) error
- func DockercfgSecretCreator(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 ( // 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" // InstanceLabel is A unique name identifying the instance of an application InstanceLabel = "app.kubernetes.io/instance" // ComponentLabel is the label of the component within the architecture. ComponentLabel = "app.kubernetes.io/component" DockercfgSecretName = "dockercfg" 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" )
Variables ¶
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 DockercfgSecretCreator ¶
func DockercfgSecretCreator(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.