controller

package
v0.0.0-...-913f1b1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 65 Imported by: 0

Documentation

Overview

Package controller provides deployment hooks for configuring TLS security profiles and proxy settings from OpenShift cluster configuration.

Package controller provides deployment hooks for configuring TLS security profiles and proxy settings from OpenShift cluster configuration.

Index

Constants

View Source
const (
	HTTPProxy  = "HTTP_PROXY"
	HTTPSProxy = "HTTPS_PROXY"
	NoProxy    = "NO_PROXY"
)

Proxy environment variable constants

Variables

This section is empty.

Functions

func NewDynamicRequiredManifestController

func NewDynamicRequiredManifestController(name string, manifest []byte, key types.NamespacedName, gvr schema.GroupVersionResource, operatorClient *clients.OperatorClient, dynamicClient dynamic.Interface, resourceClient ResourceClient, recorder events.Recorder) factory.Controller

func NewFeatureGate

func NewFeatureGate(enabled, disabled []configv1.FeatureGateName) featuregates.FeatureGate

TODO: Remove the featureGate stuff to use the real thing

func NewIncompatibleOperatorController

func NewIncompatibleOperatorController(name string, currentOCPMinorVersion *semver.Version, kubeclient kubernetes.Interface, clusterExtensionClient *clients.ClusterExtensionClient, operatorClient *clients.OperatorClient, eventRecorder events.Recorder) factory.Controller

func NewProxyController

func NewProxyController(name string, proxyClient *clients.ProxyClient, operatorClient *clients.OperatorClient, eventRecorder events.Recorder) factory.Controller

func NewStaticUpgradeableConditionController

func NewStaticUpgradeableConditionController(name string, operatorClient *clients.OperatorClient, eventRecorder events.Recorder, prefixes []string) factory.Controller

func TLSCipherSuitesPath

func TLSCipherSuitesPath() []string

TLSCipherSuitesPath returns the path for the observed TLS cipher suites.

func TLSMinVersionPath

func TLSMinVersionPath() []string

TLSMinVersionPath returns the path for the observed minimum TLS version.

func TLSSecurityProfileConfigPath

func TLSSecurityProfileConfigPath() []string

TLSSecurityProfileConfigPath returns the path for the observed TLS security profile configuration.

func UpdateDeploymentObservedConfigHook

func UpdateDeploymentObservedConfigHook(_ *clients.OperatorClient) deploymentcontroller.DeploymentHookFunc

UpdateDeploymentObservedConfigHook creates a deployment hook that reads observedConfig from the olms.operator.openshift.io resource and extracts TLS configuration

func UpdateProxyEnvironment

func UpdateProxyEnvironment(logger logr.Logger, pc clients.ProxyClientInterface) error

Types

type Builder

type Builder struct {
	Assets            string
	Clients           *clients.Clients
	ControllerContext *controllercmd.ControllerContext
	KnownRESTMappings map[schema.GroupVersionKind]*meta.RESTMapping
	FeatureGate       configv1.FeatureGate
}

func (*Builder) BuildControllers

func (b *Builder) BuildControllers(subDirectories ...string) (map[string]factory.Controller, map[string]factory.Controller, map[string]factory.Controller, []configv1.ObjectReference, error)

func (*Builder) CurrentFeatureGates

func (b *Builder) CurrentFeatureGates() (featuregates.FeatureGate, error)

func (*Builder) UseExperimentalFeatureSet

func (b *Builder) UseExperimentalFeatureSet() bool

type DocumentInfo

type DocumentInfo struct {
	Resource K8sResource
	Text     string
	Order    int
}

type K8sResource

type K8sResource struct {
	APIVersion string `yaml:"apiVersion"`
	Kind       string `yaml:"kind"`
	Metadata   struct {
		Name      string `yaml:"name"`
		Namespace string `yaml:"namespace,omitempty"`
	} `yaml:"metadata"`
}

type OLMConfigObserverListers

type OLMConfigObserverListers struct {
	APIServerListerImpl configlistersv1.APIServerLister
	ResourceSync        resourcesynccontroller.ResourceSyncer
	PreRunCachesSynced  []cache.InformerSynced
}

OLMConfigObserverListers implements the configobserver.Listers interface and apiserver.APIServerLister for use with the library-go ObserveTLSSecurityProfile

func (OLMConfigObserverListers) APIServerLister

func (OLMConfigObserverListers) PreRunHasSynced

func (l OLMConfigObserverListers) PreRunHasSynced() []cache.InformerSynced

func (OLMConfigObserverListers) ResourceSyncer

type ResourceClient

type ResourceClient interface {
	Get(types.NamespacedName) (runtime.Object, error)
	Informer() cache.SharedIndexInformer
}

type TLSObserverController

type TLSObserverController struct {
	factory.Controller
}

TLSObserverController creates a config observer controller that observes TLS security profiles using the library-go ObserveTLSSecurityProfile function

func NewTLSObserverController

func NewTLSObserverController(
	name string,
	operatorClient v1helpers.OperatorClient,
	configInformers configinformers.SharedInformerFactory,
	eventRecorder events.Recorder,
) *TLSObserverController

NewTLSObserverController returns a new TLS observer controller using library-go patterns

Jump to

Keyboard shortcuts

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