installer

package
v0.0.0-...-201d816 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 33 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Int32KeySet = sets.Int32KeySet[any]

Int32KeySet creates a Int32 from a keys of a map[int32](? extends interface{}). If the value passed in is not actually a map, this will panic. Deprecated: Use k8s sets instead.

View Source
var NewInt32 = sets.NewInt32

NewInt32 creates a Int32 from a list of values. Deprecated: Use k8s sets instead.

Functions

This section is empty.

Types

type InstallerController

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

InstallerController is a controller that watches the currentRevision and targetRevision fields for each node and spawn installer pods to update the static pods on the master nodes.

func NewInstallerController

func NewInstallerController(
	instanceName, targetNamespace, staticPodName string,
	configMaps []revision.RevisionResource,
	secrets []revision.RevisionResource,
	command []string,
	kubeInformersForTargetNamespace informers.SharedInformerFactory,
	operatorClient v1helpers.StaticPodOperatorClient,
	configMapsGetter corev1client.ConfigMapsGetter,
	secretsGetter corev1client.SecretsGetter,
	podsGetter corev1client.PodsGetter,
	eventRecorder events.Recorder,
) *InstallerController

NewInstallerController creates a new installer controller.

func (InstallerController) ControllerInstanceName

func (c InstallerController) ControllerInstanceName() string

ControllerInstanceName specifies the controller instance. Useful when the same controller is used multiple times.

func (InstallerController) Name

func (c InstallerController) Name() string

func (*InstallerController) Run

func (c *InstallerController) Run(ctx context.Context, workers int)

func (InstallerController) Sync

func (*InstallerController) WithCerts

func (c *InstallerController) WithCerts(certDir string, certConfigMaps, certSecrets []UnrevisionedResource) *InstallerController

func (*InstallerController) WithInstallerPodMutationFn

func (c *InstallerController) WithInstallerPodMutationFn(installerPodMutationFn InstallerPodMutationFunc) *InstallerController

func (*InstallerController) WithMinReadyDuration

func (c *InstallerController) WithMinReadyDuration(minReadyDuration time.Duration) *InstallerController

func (*InstallerController) WithStartupMonitorSupport

func (c *InstallerController) WithStartupMonitorSupport(startupMonitorEnabled func() (bool, error)) *InstallerController

WithStartupMonitorSupport sets the predicate startupMonitorEnabled called on every sync to know whether startup monitor is deployed together with the operand static pod manifest, and the state machine can expect that the startup-monitor acknowledges a ready operand.

type InstallerPodMutationFunc

type InstallerPodMutationFunc func(pod *corev1.Pod, nodeName string, operatorSpec *operatorv1.StaticPodOperatorSpec, revision int32) error

InstallerPodMutationFunc is a function that has a chance at changing the installer pod before it is created

type Int32

type Int32 = sets.Int32

sets.Int32 is a set of int32s, implemented via map[int32]struct{} for minimal memory consumption. Deprecated: Use k8s sets instead.

type UnrevisionedResource

type UnrevisionedResource struct {
	Name     string
	Optional bool
}

Jump to

Keyboard shortcuts

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