common

package
v1.43.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 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
)
View Source
const ShootDNSEntryLabelKey = "gardener.cloud/shoot-id"

ShootDNSEntryLabelKey is the label key for DNS entries managed for shoots

Variables

This section is empty.

Functions

func CopyMap

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

func FindExtension

func FindExtension(ctx context.Context, reader client.Reader, 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, mgr manager.Manager, config config.DNSServiceConfig) *Env

func (*Env) APIReader added in v1.13.0

func (e *Env) APIReader() client.Reader

func (*Env) Client

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

func (*Env) Config

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

func (*Env) CreateObject

func (e *Env) CreateObject(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

func (*Env) GetObject

func (e *Env) GetObject(ctx context.Context, key client.ObjectKey, obj client.Object) error

func (*Env) RestConfig

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

func (*Env) UpdateObject

func (e *Env) UpdateObject(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

type ShootDNSEntriesHelper added in v1.9.0

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

func NewShootDNSEntriesHelper added in v1.9.0

func NewShootDNSEntriesHelper(ctx context.Context, client client.Client, ext *v1alpha1.Extension) *ShootDNSEntriesHelper

func (*ShootDNSEntriesHelper) Context added in v1.9.0

func (h *ShootDNSEntriesHelper) Context() context.Context

func (*ShootDNSEntriesHelper) DeleteAll added in v1.9.0

func (h *ShootDNSEntriesHelper) DeleteAll() error

func (*ShootDNSEntriesHelper) Extension added in v1.9.0

func (h *ShootDNSEntriesHelper) Extension() *v1alpha1.Extension

func (*ShootDNSEntriesHelper) ForceDeleteAll added in v1.40.0

func (h *ShootDNSEntriesHelper) ForceDeleteAll() error

ForceDeleteAll forces deletion of DNSEntries by removing the finalizers first. Warning: calling this method can result in leaked DNS record sets in the infrastructure and should only be used as last resort.

func (*ShootDNSEntriesHelper) GetCluster added in v1.9.0

func (h *ShootDNSEntriesHelper) GetCluster() (*controller.Cluster, error)

func (*ShootDNSEntriesHelper) List added in v1.9.0

func (h *ShootDNSEntriesHelper) List() ([]dnsapi.DNSEntry, error)

func (*ShootDNSEntriesHelper) ShootDNSEntryMatchingLabel added in v1.9.0

func (h *ShootDNSEntriesHelper) ShootDNSEntryMatchingLabel() (client.MatchingLabels, error)

func (*ShootDNSEntriesHelper) ShootID added in v1.9.0

func (h *ShootDNSEntriesHelper) ShootID() (string, string, 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) Refresh

func (s *StateHandler) Refresh() (bool, error)

func (*StateHandler) ShootDNSEntriesHelper added in v1.9.0

func (s *StateHandler) ShootDNSEntriesHelper() *ShootDNSEntriesHelper

func (*StateHandler) StateItems

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

func (*StateHandler) Update

func (s *StateHandler) Update(reason string) error

Jump to

Keyboard shortcuts

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