Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAlreadyExists ¶
IsAlreadyExists asserts alreadyExistsError.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type Interface ¶
Interface is some form of lock implementation like achieved for in process locking using sync.Mutex.
type KubeLockLocker ¶
type KubeLockLocker struct {
// contains filtered or unexported fields
}
func NewKubeLockLocker ¶
func NewKubeLockLocker(config KubeLockLockerConfig) (*KubeLockLocker, error)
NewKubeLockLocker implements a distributed lock mechanism mainly used for our IPAM management. You can inspect the lock annotations in the giantswarm namespace during Cluster or Node Pool creation in order to see the locking in action.
$ k get namespace -o json giantswarm --watch | jq '.metadata.annotations' "kubelock.giantswarm.io/ipam": "{\"owner\":\"aws-operator@8.6.1\",\"createdAt\":\"2020-06-18T10:22:12.211418934Z\",\"ttl\":30000000000}"
type KubeLockLockerConfig ¶
type KubeLockLockerConfig struct { Logger micrologger.Logger RestConfig *rest.Config }
type MutexLocker ¶
type MutexLocker struct {
// contains filtered or unexported fields
}
MutexLocker implements Interface using sync.Mutex. For now we use a shared instance of *MutexLocker for all IPAM related activity of network packages in the legacy controllers and ipam resources in the clusterapi controllers.
func NewMutexLocker ¶
func NewMutexLocker(config MutexLockerConfig) (*MutexLocker, error)
type MutexLockerConfig ¶
type MutexLockerConfig struct {
Logger micrologger.Logger
}