targetconfigcontroller

package
v0.0.0-...-eb272c5 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerName = "runoncedurationoverride"
)
View Source
const (
	ServiceCAInjectBundle = "service.beta.openshift.io/inject-cabundle"
)

Variables

View Source
var (
	// DefaultCertValidFor is the default duration a cert will be valid for.
	DefaultCertValidFor = time.Hour * 24 * 365

	// DefaultCertRotateThreshold is the default threshold preceding the expiration date
	// the operator will make attempt(s) to rotate the certs.
	DefaultCertRotateThreshold = time.Hour * 48

	Organization = "Red Hat, Inc."
)

Functions

func GetConditionType

func GetConditionType(err error) string

GetConditionType extracts the condition type from an error

func GetReason

func GetReason(err error) string

GetReason extracts the reason from an error if it's a HandlerError, otherwise returns a default

func GetStatus

func GetStatus(err error) operatorv1.ConditionStatus

GetStatus extracts the status from an error if it's a HandlerError, otherwise returns True for Degraded

func NewAvailabilityHandler

func NewAvailabilityHandler(asset *asset.Asset, deploy deploy.Interface) *availabilityHandler

func NewAvailableError

func NewAvailableError(reason string, err error) error

NewAvailableError creates an error that sets Available=False condition This replaces the old NewAvailableError from internal/condition

func NewCertGenerationHandler

func NewCertGenerationHandler(client kubernetes.Interface, recorder events.Recorder, secretLister listerscorev1.SecretLister, configMapLister listerscorev1.ConfigMapLister, asset *asset.Asset) *certGenerationHandler

func NewCertReadyHandler

func NewCertReadyHandler(client kubernetes.Interface, secretLister listerscorev1.SecretLister, configMapLister listerscorev1.ConfigMapLister) *certReadyHandler

func NewConfigurationHandler

func NewConfigurationHandler(client kubernetes.Interface, recorder events.Recorder, configMapLister listerscorev1.ConfigMapLister, asset *asset.Asset) *configurationHandler

func NewDaemonSetHandler

func NewDaemonSetHandler(client kubernetes.Interface, recorder events.Recorder, asset *asset.Asset, deploy deploy.Interface) *daemonSetHandler

func NewDeploymentReadyHandler

func NewDeploymentReadyHandler(deploy deploy.Interface) *deploymentReadyHandler

func NewInstallReadinessError

func NewInstallReadinessError(reason string, err error) error

NewInstallReadinessError creates an error that sets InstallReadinessFailure=True condition This replaces the old NewInstallReadinessError from internal/condition

func NewServiceCAConfigMapHandler

func NewServiceCAConfigMapHandler(client kubernetes.Interface, recorder events.Recorder, configMapLister listerscorev1.ConfigMapLister, asset *asset.Asset) *serviceCAConfigMapHandler

func NewServiceCertSecretHandler

func NewServiceCertSecretHandler(client kubernetes.Interface, secretLister listerscorev1.SecretLister, asset *asset.Asset) *serviceCertSecretHandler

func NewTargetConfigController

func NewTargetConfigController(
	operatorClient *operatorclient.RunOnceDurationOverrideClient,
	kubeClient kubernetes.Interface,
	runtimeContext operatorruntime.OperandContext,
	informerFactory informers.SharedInformerFactory,
	operatorInformerFactory operatorinformers.SharedInformerFactory,
	recorder events.Recorder,
) factory.Controller

func NewValidationHandler

func NewValidationHandler() *validationHandler

func NewWebhookConfigurationHandlerHandler

func NewWebhookConfigurationHandlerHandler(client kubernetes.Interface, recorder events.Recorder, webhookLister admissionregistrationv1.MutatingWebhookConfigurationLister, asset *asset.Asset) *webhookConfigurationHandler

Types

type ConditionType

type ConditionType string

ConditionType represents the type of condition to set

const (
	// ConditionTypeInstallReadinessFailure maps to InstallReadinessFailure condition (for install readiness errors)
	ConditionTypeInstallReadinessFailure ConditionType = "InstallReadinessFailure"
	// ConditionTypeAvailable maps to Available condition (for availability errors)
	ConditionTypeAvailable ConditionType = "Available"
)

type Deployer

type Deployer interface {
	Exists(namespace, name string) (object metav1.Object, err error)
}

type Handler

Handler is an interface that wraps the Handle method

Handle handles a reconciliation request based on the original RunOnceDurationOverride object.

Handle may change the status block based on the operations it performs, it returns the modified object. It relies on the caller to update the status. Handle will not update the status block of the original object.

If an error happens while handling the the request, handleErr will be set. On an error the request key is expected to be requeued for further retries.

If result is set, the caller is expected to to requeue the request key for further retries. It indicates that no further processing of the request should be done, In this case the caller will abort and no other handler in the chain if any should be invoked.

type HandlerError

type HandlerError struct {
	ConditionType ConditionType
	Reason        string
	Status        operatorv1.ConditionStatus
	Err           error
}

HandlerError wraps an error with condition type, reason, and status for status conditions

func (*HandlerError) Error

func (e *HandlerError) Error() string

func (*HandlerError) Unwrap

func (e *HandlerError) Unwrap() error

type ReconcileRequestContext

type ReconcileRequestContext struct {
	operatorruntime.OperandContext
	// contains filtered or unexported fields
}

func (*ReconcileRequestContext) ControllerSetter

func (*ReconcileRequestContext) GetBundle

func (r *ReconcileRequestContext) GetBundle() *cert.Bundle

func (*ReconcileRequestContext) SetBundle

func (r *ReconcileRequestContext) SetBundle(bundle *cert.Bundle)

Jump to

Keyboard shortcuts

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