deployer

package
v0.0.0-...-0597a29 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MasterNodeProvider

type MasterNodeProvider interface {
	// MasterNodeNames returns a list of nodes expected to run API server pods.
	MasterNodeNames() ([]string, error)

	// AddEventHandler registers handlers which are called whenever a resource
	// changes that can influence the result of Nodes.
	AddEventHandler(handler cache.ResourceEventHandler) []cache.InformerSynced
}

MasterNodeProvider provides master nodes.

type RevisionLabelPodDeployer

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

RevisionLabelPodDeployer is a deployer abstraction meant for the pods with a label storing the deployed encryption config revision, like the pods created by the staticpod controllers.

func NewRevisionLabelPodDeployer

func NewRevisionLabelPodDeployer(
	revisionLabel string,
	targetNamespace string,
	namespaceInformers operatorv1helpers.KubeInformersForNamespaces,
	resourceSyncer resourcesynccontroller.ResourceSyncer,
	podClient corev1client.PodsGetter,
	secretClient corev1client.SecretsGetter,
	nodeProvider MasterNodeProvider,
) (*RevisionLabelPodDeployer, error)

NewRevisionLabelPodDeployer creates a deployer abstraction meant for the pods with a label storing the deployed encryption config revision, like the pods created by the staticpod controllers.

It syns the encryption-config-<targetNamespace> from openshift-config-managed namespace to the target namespace as encryption-config. From there it is revisioned and deployed to the static pods. The last deployed encryption config is read from encryption-config-<revision>.

For testing, resourceSyncer might be nil.

func (*RevisionLabelPodDeployer) AddEventHandler

AddEventHandler registers a event handler whenever the backing resource change that might influence the result of DeployedEncryptionConfigSecret.

func (*RevisionLabelPodDeployer) DeployedEncryptionConfigSecret

func (d *RevisionLabelPodDeployer) DeployedEncryptionConfigSecret() (secret *corev1.Secret, converged bool, err error)

DeployedEncryptionConfigSecret returns the deployed encryption config and whether all instances of the operand have acknowledged it.

type StaticPodNodeProvider

type StaticPodNodeProvider struct {
	OperatorClient operatorv1helpers.StaticPodOperatorClient
}

StaticPodNodeProvider returns the node list from the node status in the static pod operator status.

func (StaticPodNodeProvider) AddEventHandler

func (StaticPodNodeProvider) MasterNodeNames

func (p StaticPodNodeProvider) MasterNodeNames() ([]string, error)

Jump to

Keyboard shortcuts

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