tlssetup

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tlssetup builds TLS options for controller-runtime servers from the OpenShift APIServer TLS profile.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSecurityProfileWatcher

func RegisterSecurityProfileWatcher(mgr manager.Manager, serverTLS ServerTLS, onCancel context.CancelFunc, log logr.Logger) error

RegisterSecurityProfileWatcher watches the APIServer TLS profile and adherence policy. Calls onCancel to trigger restart when either changes. No-op on non-OpenShift.

Types

type ServerTLS

type ServerTLS struct {
	TLSOpts                   []func(*tls.Config)
	InitialTLSProfileSpec     configv1.TLSProfileSpec
	InitialTLSAdherencePolicy configv1.TLSAdherencePolicy
}

ServerTLS holds TLS options and the initial APIServer profile/adherence policy for watching.

func BuildServerTLSOptions

func BuildServerTLSOptions(ctx context.Context, cfg *rest.Config, scheme *k8sruntime.Scheme, log logr.Logger) (ServerTLS, error)

BuildServerTLSOptions fetches TLS profile and adherence policy from cluster. Returns TLS config functions when adherence policy requires strict compliance. Falls back to the library-go default TLS profile on transient API server errors or when adherence policy does not require strict compliance. Returns empty ServerTLS on non-OpenShift clusters.

Jump to

Keyboard shortcuts

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