apiservercontrollerset

package
v0.0.0-...-6018a90 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 35 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithStatusControllerPdbCompatibleHighInertia

func WithStatusControllerPdbCompatibleHighInertia(workloadConditionsPrefix string) func(s *status.StatusSyncer) *status.StatusSyncer

WithStatusControllerPdbCompatibleHighInertia sets a custom inertia for setup where PDB slow down deployment: the workload deployment degraded condition happens when the number of available replicas does not match the desired state. Assuming a PDB is present to ensure that we do not optionally dip below HA (not enforced here, but probably should be in the staticresourcecontroller check), we can safely allow being down a single replica for a considerable period of time. Doing it here allows the detailed operator state to be fully correct (degraded instantly), while allowing graceful resolution in the majority of cases.

Types

type APIServerControllerSet

type APIServerControllerSet struct {
	// contains filtered or unexported fields
}

APIServerControllerSet is a set of controllers that maintain a deployment of an API server and the namespace it's running in

func NewAPIServerControllerSet

func NewAPIServerControllerSet(
	name string,
	operatorClient v1helpers.OperatorClient,
	eventRecorder events.Recorder,
) *APIServerControllerSet

func (*APIServerControllerSet) PrepareRun

func (cs *APIServerControllerSet) PrepareRun() (preparedAPIServerControllerSet, error)

func (*APIServerControllerSet) WithAPIServiceController

func (cs *APIServerControllerSet) WithAPIServiceController(
	controllerName, targetNamespace string,
	getAPIServicesToManageFn apiservice.GetAPIServicesToMangeFunc,
	apiregistrationInformers apiregistrationinformers.SharedInformerFactory,
	apiregistrationv1Client apiregistrationv1client.ApiregistrationV1Interface,
	kubeInformersForNamespaces v1helpers.KubeInformersForNamespaces,
	kubeClient kubernetes.Interface,
	informers ...factory.Informer,
) *APIServerControllerSet

func (*APIServerControllerSet) WithAuditPolicyController

func (cs *APIServerControllerSet) WithAuditPolicyController(
	targetNamespace string,
	targetConfigMapName string,
	configInformers configinformers.SharedInformerFactory,
	kubeInformersForTargetNamesace kubeinformers.SharedInformerFactory,
	kubeClient kubernetes.Interface,
) *APIServerControllerSet

func (*APIServerControllerSet) WithClusterOperatorStatusController

func (cs *APIServerControllerSet) WithClusterOperatorStatusController(
	clusterOperatorName string,
	relatedObjects []configv1.ObjectReference,
	clusterOperatorClient configv1client.ClusterOperatorsGetter,
	clusterOperatorInformer configv1informers.ClusterOperatorInformer,
	versionRecorder status.VersionGetter,
	options ...func(*status.StatusSyncer) *status.StatusSyncer,
) *APIServerControllerSet

func (*APIServerControllerSet) WithConfigUpgradableController

func (cs *APIServerControllerSet) WithConfigUpgradableController() *APIServerControllerSet

WithConfigUpgradableController adds a controller for the operator to check for presence of unsupported configuration and to set the Upgradable condition to false if it finds any

func (*APIServerControllerSet) WithEncryptionControllers

func (cs *APIServerControllerSet) WithEncryptionControllers(
	component string,
	provider controllers.Provider,
	deployer statemachine.Deployer,
	migrator migrators.Migrator,
	secretsClient corev1.SecretsGetter,
	apiServerClient configv1client.APIServerInterface,
	apiServerInformer configv1informers.APIServerInformer,
	kubeInformersForNamespaces v1helpers.KubeInformersForNamespaces,
	resourceSyncer *resourcesynccontroller.ResourceSyncController,
) *APIServerControllerSet

func (*APIServerControllerSet) WithFinalizerController

func (cs *APIServerControllerSet) WithFinalizerController(
	targetNamespace string,
	kubeInformersForTargetNamespace kubeinformers.SharedInformerFactory,
	namespaceGetter corev1client.NamespacesGetter,
) *APIServerControllerSet

func (*APIServerControllerSet) WithLogLevelController

func (cs *APIServerControllerSet) WithLogLevelController() *APIServerControllerSet

WithLogLevelController adds a controller that configures logging for the operator

func (*APIServerControllerSet) WithRevisionController

func (cs *APIServerControllerSet) WithRevisionController(
	targetNamespace string,
	configMaps []revisioncontroller.RevisionResource,
	secrets []revisioncontroller.RevisionResource,
	kubeInformersForTargetNamespace kubeinformers.SharedInformerFactory,
	operatorClient v1helpers.OperatorClient,
	configMapGetter corev1client.ConfigMapsGetter,
	secretGetter corev1client.SecretsGetter,
) *APIServerControllerSet

func (*APIServerControllerSet) WithSecretRevisionPruneController

func (cs *APIServerControllerSet) WithSecretRevisionPruneController(
	targetNamespace string,
	secretPrefixes []string,
	secretGetter corev1client.SecretsGetter,
	podGetter corev1.PodsGetter,
	kubeInformersForTargetNamesace v1helpers.KubeInformersForNamespaces,
) *APIServerControllerSet

func (*APIServerControllerSet) WithStaticResourcesController

func (cs *APIServerControllerSet) WithStaticResourcesController(
	controllerName string,
	manifests resourceapply.AssetFunc,
	conditionalFiles []ConditionalFiles,
	kubeInformersForNamespaces v1helpers.KubeInformersForNamespaces,
	kubeClient kubernetes.Interface,
) *APIServerControllerSet

func (*APIServerControllerSet) WithUnsupportedConfigPrefixForEncryptionControllers

func (cs *APIServerControllerSet) WithUnsupportedConfigPrefixForEncryptionControllers(prefix ...string) *APIServerControllerSet

func (*APIServerControllerSet) WithWorkloadController

func (cs *APIServerControllerSet) WithWorkloadController(
	name, operatorNamespace, targetNamespace, targetOperandVersion, operandNamePrefix, conditionsPrefix string,
	kubeClient kubernetes.Interface,
	delegate workload.Delegate,
	openshiftClusterConfigClient openshiftconfigclientv1.ClusterOperatorInterface,
	versionRecorder status.VersionGetter,
	kubeInformersForNamespaces v1helpers.KubeInformersForNamespaces,
	informers ...factory.Informer) *APIServerControllerSet

func (*APIServerControllerSet) WithoutAPIServiceController

func (cs *APIServerControllerSet) WithoutAPIServiceController() *APIServerControllerSet

func (*APIServerControllerSet) WithoutAuditPolicyController

func (cs *APIServerControllerSet) WithoutAuditPolicyController() *APIServerControllerSet

func (*APIServerControllerSet) WithoutClusterOperatorStatusController

func (cs *APIServerControllerSet) WithoutClusterOperatorStatusController() *APIServerControllerSet

func (*APIServerControllerSet) WithoutConfigUpgradableController

func (cs *APIServerControllerSet) WithoutConfigUpgradableController() *APIServerControllerSet

func (*APIServerControllerSet) WithoutEncryptionControllers

func (cs *APIServerControllerSet) WithoutEncryptionControllers() *APIServerControllerSet

func (*APIServerControllerSet) WithoutFinalizerController

func (cs *APIServerControllerSet) WithoutFinalizerController() *APIServerControllerSet

func (*APIServerControllerSet) WithoutLogLevelController

func (cs *APIServerControllerSet) WithoutLogLevelController() *APIServerControllerSet

func (*APIServerControllerSet) WithoutPruneController

func (cs *APIServerControllerSet) WithoutPruneController() *APIServerControllerSet

func (*APIServerControllerSet) WithoutRevisionController

func (cs *APIServerControllerSet) WithoutRevisionController() *APIServerControllerSet

func (*APIServerControllerSet) WithoutStaticResourcesController

func (cs *APIServerControllerSet) WithoutStaticResourcesController() *APIServerControllerSet

func (*APIServerControllerSet) WithoutWorkloadController

func (cs *APIServerControllerSet) WithoutWorkloadController() *APIServerControllerSet

type ConditionalFiles

type ConditionalFiles struct {
	Files                          []string
	ShouldCreateFn, ShouldDeleteFn resourceapply.ConditionalFunction
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL