deployer

package
v0.0.0-...-bb0df7c Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentNodeProvider

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

DeploymentNodeProvider returns the node list from nodes matching the node selector of a Deployment

func NewDeploymentNodeProvider

func NewDeploymentNodeProvider(targetNamespace string, kubeInformersForNamespaces operatorv1helpers.KubeInformersForNamespaces) *DeploymentNodeProvider

func (DeploymentNodeProvider) AddEventHandler

func (DeploymentNodeProvider) MasterNodeNames

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

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

func (d *RevisionLabelPodDeployer) AddEventHandler(handler cache.ResourceEventHandler)

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.

func (*RevisionLabelPodDeployer) HasSynced

func (d *RevisionLabelPodDeployer) HasSynced() bool

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)

type UnionRevisionLabelPodDeployer

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

UnionRevisionLabelPodDeployer provides unified state from multiple distinct deployers.

func NewUnionRevisionLabelPodDeployer

func NewUnionRevisionLabelPodDeployer(delegates ...statemachine.Deployer) *UnionRevisionLabelPodDeployer

NewUnionRevisionLabelPodDeployer creates a deployer that returns a unified state from multiple distinct deployers. That means:

  • none has reported an error
  • all have converged
  • all have observed exactly the same encryption configuration

func (*UnionRevisionLabelPodDeployer) AddEventHandler

func (d *UnionRevisionLabelPodDeployer) AddEventHandler(handler cache.ResourceEventHandler)

AddEventHandler registers a event handler that might influence the result of DeployedEncryptionConfigSecret for all configured deployers.

func (*UnionRevisionLabelPodDeployer) DeployedEncryptionConfigSecret

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

DeployedEncryptionConfigSecret returns the actual encryption configuration across multiple deployers

func (*UnionRevisionLabelPodDeployer) HasSynced

func (d *UnionRevisionLabelPodDeployer) HasSynced() bool

Jump to

Keyboard shortcuts

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