controllers

package
Version: v3.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2017 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceAccountTokenSecretNameKey = "openshift.io/token-secret.name"
	MaxRetriesBeforeResync           = 5

	// ServiceAccountTokenValueAnnotation stores the actual value of the token so that a dockercfg secret can be
	// made without having a value dockerURL
	ServiceAccountTokenValueAnnotation = "openshift.io/token-secret.value"

	// CreateDockercfgSecretsController is the name of this controller that should be
	// attached to all token secrets this controller create
	CreateDockercfgSecretsController = "openshift.io/create-dockercfg-secrets"

	// PendingTokenAnnotation contains the name of the token secret that is waiting for the
	// token data population
	PendingTokenAnnotation = "openshift.io/create-dockercfg-secrets.pending-token"
)
View Source
const NumServiceAccountUpdateRetries = 10

NumServiceAccountUpdateRetries controls the number of times we will retry on conflict errors. This happens when multiple service account controllers update at the same time.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerRegistryServiceController

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

DockerRegistryServiceController manages ServiceToken secrets for Service objects

func NewDockerRegistryServiceController

NewDockerRegistryServiceController returns a new *DockerRegistryServiceController.

func (*DockerRegistryServiceController) Run

func (e *DockerRegistryServiceController) Run(workers int, stopCh <-chan struct{})

Runs controller loops and returns immediately

type DockerRegistryServiceControllerOptions

type DockerRegistryServiceControllerOptions struct {
	// Resync is the time.Duration at which to fully re-list services.
	// If zero, re-list will be delayed as long as possible
	Resync time.Duration

	RegistryNamespace   string
	RegistryServiceName string

	DockercfgController *DockercfgController

	// DockerURLsInitialized is used to send a signal to the DockercfgController that it has the correct set of docker urls
	DockerURLsInitialized chan struct{}
}

DockerRegistryServiceControllerOptions contains options for the DockerRegistryServiceController

type DockercfgController

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

DockercfgController manages dockercfg secrets for ServiceAccount objects

func NewDockercfgController

NewDockercfgController returns a new *DockercfgController.

func (*DockercfgController) Run

func (e *DockercfgController) Run(workers int, stopCh <-chan struct{})

func (*DockercfgController) SetDockerURLs added in v1.3.0

func (e *DockercfgController) SetDockerURLs(newDockerURLs ...string)

type DockercfgControllerOptions

type DockercfgControllerOptions struct {
	// Resync is the time.Duration at which to fully re-list service accounts.
	// If zero, re-list will be delayed as long as possible
	Resync time.Duration

	// DockerURLsInitialized is used to send a signal to this controller that it has the correct set of docker urls
	// This is normally signaled from the DockerRegistryServiceController which watches for updates to the internal
	// docker registry service.
	DockerURLsInitialized chan struct{}
}

DockercfgControllerOptions contains options for the DockercfgController

type DockercfgDeletedController

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

The DockercfgDeletedController watches for service account dockercfg secrets to be deleted It removes the corresponding token secret and service account references.

func NewDockercfgDeletedController

NewDockercfgDeletedController returns a new *DockercfgDeletedController.

func (*DockercfgDeletedController) Run

func (e *DockercfgDeletedController) Run(stopCh <-chan struct{})

Run processes the queue.

type DockercfgDeletedControllerOptions

type DockercfgDeletedControllerOptions struct {
	// Resync is the time.Duration at which to fully re-list secrets.
	// If zero, re-list will be delayed as long as possible
	Resync time.Duration
}

DockercfgDeletedControllerOptions contains options for the DockercfgDeletedController

type DockercfgTokenDeletedController

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

The DockercfgTokenDeletedController watches for service account tokens to be deleted. On delete, it removes the associated dockercfg secret if it exists.

func NewDockercfgTokenDeletedController

NewDockercfgTokenDeletedController returns a new *DockercfgTokenDeletedController.

func (*DockercfgTokenDeletedController) Run

func (e *DockercfgTokenDeletedController) Run(stopCh <-chan struct{})

Runs controller loops and returns on shutdown

type DockercfgTokenDeletedControllerOptions

type DockercfgTokenDeletedControllerOptions struct {
	// Resync is the time.Duration at which to fully re-list secrets.
	// If zero, re-list will be delayed as long as possible
	Resync time.Duration
}

DockercfgTokenDeletedControllerOptions contains options for the DockercfgTokenDeletedController

type MutationCache added in v1.3.0

type MutationCache interface {
	GetByKey(key string) (interface{}, bool, error)
	Mutation(interface{})
}

MutationCache is able to take the result of update operations and stores them in an LRU that can be used to provide a more current view of a requested object. It requires interpretting resourceVersions for comparisons. Implementations must be thread-safe.

func NewEtcdMutationCache added in v1.3.0

func NewEtcdMutationCache(backingCache cache.Store) MutationCache

NewEtcdMutationCache gives back a MutationCache that understands how to deal with etcd backed objects

type ResourceVersionComparator added in v1.3.0

type ResourceVersionComparator interface {
	CompareResourceVersion(lhs, rhs runtime.Object) int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL