common

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: Apache-2.0, MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANNOTATION_OPERATION         = constants.GardenerOperation
	ANNOTATION_OPERATION_MIGRATE = constants.GardenerOperationMigrate
	ANNOTATION_OPERATION_RESTORE = constants.GardenerOperationRestore
)

Variables

This section is empty.

Functions

func CopyMap

func CopyMap(m map[string]string) map[string]string

func FindExtension

func FindExtension(ctx context.Context, c client.Client, namespace string) (*extapi.Extension, error)

func IsMigrating

func IsMigrating(ex *extensionsv1alpha1.Extension) bool

func IsRestoring

func IsRestoring(ex *extensionsv1alpha1.Extension) bool

func ShortenID

func ShortenID(id string, maxlen int) string

ShortenID shortens an identifier longer than maxlen characters by cutting the string and adding a hash suffix so that total length is maxlen. Identifiers are preserved if length < maxlen.

Types

type Env

type Env struct {
	logr.Logger
	// contains filtered or unexported fields
}

func NewEnv

func NewEnv(name string, config config.DNSServiceConfig) *Env

func (*Env) Client

func (e *Env) Client() client.Client

func (*Env) Config

func (e *Env) Config() *config.DNSServiceConfig

func (*Env) Context

func (e *Env) Context() context.Context

func (*Env) CreateObject

func (e *Env) CreateObject(obj runtime.Object, opts ...client.CreateOption) error

func (*Env) EntryLabel

func (e *Env) EntryLabel() string

EntryLabel returns the label key for DNS entries managed for shoots

func (*Env) GetObject

func (e *Env) GetObject(key client.ObjectKey, obj runtime.Object) error

func (*Env) Infof

func (e *Env) Infof(msg string, args ...interface{})

func (*Env) InjectConfig

func (e *Env) InjectConfig(config *rest.Config) error

func (*Env) InjectFunc

func (e *Env) InjectFunc(f inject.Func) error

InjectFunc enables dependency injection into the actuator.

func (*Env) InjectLogger

func (e *Env) InjectLogger(l logr.Logger) error

InjectLogger injects the controller runtime client into the reconciler.

func (*Env) ListObjects

func (e *Env) ListObjects(list runtime.Object, opts ...client.ListOption) error

func (*Env) RestConfig

func (e *Env) RestConfig() *rest.Config

func (*Env) UpdateObject

func (e *Env) UpdateObject(obj runtime.Object, opts ...client.UpdateOption) error

type StateHandler

type StateHandler struct {
	*Env
	// contains filtered or unexported fields
}

func NewStateHandler

func NewStateHandler(ctx context.Context, env *Env, ext *v1alpha1.Extension, refresh bool) (*StateHandler, error)

func (*StateHandler) Delete

func (s *StateHandler) Delete(name string) error

func (*StateHandler) EnsureEntries

func (s *StateHandler) EnsureEntries(entries []dnsapi.DNSEntry) bool

func (*StateHandler) EnsureEntryDeleted

func (s *StateHandler) EnsureEntryDeleted(name string) bool

func (*StateHandler) EnsureEntryFor

func (s *StateHandler) EnsureEntryFor(entry *dnsapi.DNSEntry) bool

func (*StateHandler) Infof

func (s *StateHandler) Infof(msg string, args ...interface{})

func (*StateHandler) List

func (s *StateHandler) List(cluster *controller.Cluster) ([]dnsapi.DNSEntry, error)

func (*StateHandler) Refresh

func (s *StateHandler) Refresh(cluster *controller.Cluster) (bool, error)

func (*StateHandler) ShootID

func (s *StateHandler) ShootID(cluster *controller.Cluster) (string, string, error)

func (*StateHandler) StateItems

func (s *StateHandler) StateItems() []*apis.DNSEntry

func (*StateHandler) Update

func (s *StateHandler) Update() error

Jump to

Keyboard shortcuts

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