Documentation ¶
Index ¶
- Constants
- Variables
- func AddOwnerRefToObject(obj meta.Object, ownerRef *meta.OwnerReference)
- func AppendLifecycleEnv(in []core.EnvVar) []core.EnvVar
- func AppendTLSKeyfileSecretPostfix(name string) string
- func AppsV1DeploymentGVK() schema.GroupVersionKind
- func ArangodInitContainer(name, id, engine, executable, operatorImage string, requireUUID bool, ...) core.Container
- func ArangodVersionCheckInitContainer(name, executable, operatorImage string, version driver.Version, ...) core.Container
- func ArangodVolumeMount() core.VolumeMount
- func ArangodWaiterInitContainer(name, deploymentName, executable, operatorImage string, isSecured bool, ...) core.Container
- func AreContainersReady(pod *core.Pod, coreContainers utils.StringList) bool
- func BatchV1CronJobGVK() schema.GroupVersionKind
- func BatchV1JobGVK() schema.GroupVersionKind
- func BinaryPath() string
- func ClientAuthCACertificateVolumeMount() core.VolumeMount
- func ClusterJWTVolumeMount() core.VolumeMount
- func ContainerStopTime(container core.ContainerStatus) time.Time
- func ContainersRecentStopTime(containers []core.ContainerStatus) time.Time
- func ConvertImageID2Image(imageID string) string
- func CoreV1PodGVK() schema.GroupVersionKind
- func CreateAffinity(deploymentName, role string, required bool, affinityWithRole string) *core.Affinity
- func CreateAgentLeaderServiceName(deploymentName string) string
- func CreateBasicAuthSecret(ctx context.Context, secrets generic.ModClient[*core.Secret], ...) error
- func CreateCASecret(ctx context.Context, secrets generic.ModClient[*core.Secret], ...) error
- func CreateConfigMap(ctx context.Context, configMaps generic.ModClient[*core.ConfigMap], ...) error
- func CreateDatabaseClientService(ctx context.Context, svcs generic.ModClient[*core.Service], ...) (string, bool, error)
- func CreateDatabaseClientServiceDNSName(deployment meta.Object) string
- func CreateDatabaseClientServiceDNSNameWithDomain(deployment meta.Object, domain *string) string
- func CreateDatabaseClientServiceName(deploymentName string) string
- func CreateDatabaseExternalAccessServiceName(deploymentName string) string
- func CreateDefaultContainerTemplate(image *schedulerContainerResourcesApi.Image) *schedulerContainerApi.Container
- func CreateEncryptionKeySecret(secrets generic.ModClient[*core.Secret], secretName string, key []byte) error
- func CreateEnvFieldPath(name, fieldPath string) core.EnvVar
- func CreateEnvSecretKeySelector(name, SecretKeyName, secretKey string) core.EnvVar
- func CreateExporterClientServiceName(deploymentName string) string
- func CreateExporterService(ctx context.Context, cachedStatus inspector.Inspector, deployment meta.Object, ...) (string, bool, error)
- func CreateExternalAccessService(ctx context.Context, svcs generic.ModClient[*core.Service], svcName string, ...) (string, bool, error)
- func CreateHeadlessService(ctx context.Context, svcs generic.ModClient[*core.Service], ...) (string, bool, error)
- func CreateHeadlessServiceName(deploymentName string) string
- func CreateJWTFromSecret(ctx context.Context, cachedSecrets generic.ReadClient[*core.Secret], ...) error
- func CreatePersistentVolumeClaim(ctx context.Context, pvcs generic.ModClient[*core.PersistentVolumeClaim], ...) error
- func CreatePod(ctx context.Context, c generic.ModClient[*core.Pod], pod *core.Pod, ns string, ...) (string, types.UID, error)
- func CreatePodDNSName(deployment meta.Object, role, id string) string
- func CreatePodDNSNameWithDomain(deployment meta.Object, domain *string, role, id string) string
- func CreatePodName(deploymentName, role, id, suffix string) string
- func CreatePodSecurityContext(spec *api.ServerGroupSpecSecurityContext) *core.PodSecurityContext
- func CreateSecurityContext(spec *api.ServerGroupSpecSecurityContext) *core.SecurityContext
- func CreateServiceDNSName(svc *core.Service) string
- func CreateServiceDNSNameWithDomain(svc *core.Service, domain *string) string
- func CreateServiceURL(svc core.Service, scheme string, portPredicate func(core.ServicePort) bool, ...) (string, error)
- func CreateSyncMasterClientServiceDNSName(deployment meta.Object) string
- func CreateSyncMasterClientServiceDNSNameWithDomain(deployment meta.Object, domain *string) string
- func CreateSyncMasterClientServiceName(deploymentName string) string
- func CreateTLSKeyfileSecret(ctx context.Context, secrets generic.ModClient[*core.Secret], ...) (*core.Secret, error)
- func CreateTLSKeyfileSecretName(deploymentName, role, id string) string
- func CreateTokenSecret(ctx context.Context, secrets generic.ModClient[*core.Secret], ...) error
- func CreateVolumeEmptyDir(name string) core.Volume
- func CreateVolumeWithConfigMap(name, configMapName string) core.Volume
- func CreateVolumeWithPersitantVolumeClaim(name, claimName string) core.Volume
- func CreateVolumeWithSecret(name, secretName string) core.Volume
- func DatabaseClientDetails(deploymentName string, role string, withLeader bool) ([]core.ServicePort, map[string]string)
- func DeploymentListOpt(deploymentName string) meta.ListOptions
- func EnsureFinalizerAbsent(ctx context.Context, pods generic.ModClient[*core.Pod], pod *core.Pod, ...) error
- func EnsureFinalizerPresent(ctx context.Context, pods generic.ModClient[*core.Pod], pod *core.Pod, ...) error
- func EnsureFinalizers(in meta.Object, exists []string, missing []string) bool
- func EnvExists(a []core.EnvVar, name string) bool
- func ExporterJWTVolumeMount() core.VolumeMount
- func ExporterServiceDetails(deploymentName string) ([]core.ServicePort, map[string]string)
- func ExternalAccessDetails(port, nodePort int, deploymentName, role string, withLeader bool) ([]core.ServicePort, map[string]string)
- func GetAnyVolumeByName(volumes []core.Volume, name string) (core.Volume, bool)
- func GetAnyVolumeMountByName(volumes []core.VolumeMount, name string) (core.VolumeMount, bool)
- func GetArangoDBImageFromContainers(containers []core.Container, names ...string) (string, bool)
- func GetArangoDBImageIDFromContainerStatuses(containers []core.ContainerStatus, names ...string) (string, bool)
- func GetArangoDBImageIDFromPod(pod *core.Pod, names ...string) (string, error)
- func GetBasicAuthSecret(secrets generic.ReadClient[*core.Secret], secretName string) (string, string, error)
- func GetCACertficateSecret(ctx context.Context, secrets generic.ReadClient[*core.Secret], ...) (string, error)
- func GetCAFromSecret(s *core.Secret, ownerRef *meta.OwnerReference) (string, string, bool, error)
- func GetCASecret(ctx context.Context, secrets generic.ReadClient[*core.Secret], ...) (string, string, bool, error)
- func GetFinalizers(spec api.ServerGroupSpec, group api.ServerGroup) []string
- func GetImageDetails(images ...*schedulerContainerResourcesApi.Image) *schedulerContainerResourcesApi.Image
- func GetKeyCertFromSecret(secret *core.Secret, certName, keyName string) (crypto.Certificates, interface{}, error)
- func GetLifecycleEnv() []core.EnvVar
- func GetPodByName(pods []core.Pod, podName string) (core.Pod, bool)
- func GetPodOwner(kubecli kubernetes.Interface, pod *core.Pod, ns string) (*apps.ReplicaSet, error)
- func GetPodSpecChecksum(podSpec core.PodSpec) (string, error)
- func GetReplicaSetOwner(kubecli kubernetes.Interface, rSet *apps.ReplicaSet, ns string) (*apps.Deployment, error)
- func GetSecretAuthCredentials(secret *core.Secret) (string, string, error)
- func GetTLSKeyfileFromSecret(s *core.Secret) (string, error)
- func GetTLSKeyfileSecret(secrets generic.ReadClient[*core.Secret], secretName string) (string, error)
- func GetTokenFromSecret(s *core.Secret) (string, error)
- func GetTokenSecret(ctx context.Context, secrets generic.ReadClient[*core.Secret], ...) (string, error)
- func HeadlessServiceDetails(deploymentName string) ([]core.ServicePort, map[string]string)
- func InitLifecycleContainer(image, binaryPath string, resources *core.ResourceRequirements, ...) (core.Container, error)
- func IsAnyContainerAlive(containers []core.ContainerStatus) bool
- func IsContainerAlive(container core.ContainerStatus) bool
- func IsContainerRunning(pod *core.Pod, name string) bool
- func IsContainerStarted(pod *core.Pod, container string) bool
- func IsJSON(s []byte) bool
- func IsPersistentVolumeClaimFileSystemResizePending(pvc *core.PersistentVolumeClaim) bool
- func IsPersistentVolumeClaimMarkedForDeletion(pvc *core.PersistentVolumeClaim) bool
- func IsPersistentVolumeClaimResizing(pvc *core.PersistentVolumeClaim) bool
- func IsPodAlive(pod *core.Pod) bool
- func IsPodFailed(pod *core.Pod, coreContainers utils.StringList) bool
- func IsPodMarkedForDeletion(pod *core.Pod) bool
- func IsPodNotScheduledFor(pod *core.Pod, timeout time.Duration) bool
- func IsPodReady(pod *core.Pod) bool
- func IsPodScheduled(pod *core.Pod) bool
- func IsPodServerContainerRunning(pod *core.Pod) bool
- func IsPodSucceeded(pod *core.Pod, coreContainers utils.StringList) bool
- func IsPodTerminating(pod *core.Pod) bool
- func IsServiceRotationRequired(spec api.DeploymentSpec, svc *core.Service) bool
- func LabelsForActiveMember(deploymentName, role, id string) map[string]string
- func LabelsForDeployment(deploymentName, role string) map[string]string
- func LabelsForExporterService(deploymentName string) map[string]string
- func LabelsForExporterServiceSelector(deploymentName string) map[string]string
- func LabelsForLeaderMember(deploymentName, role, id string) map[string]string
- func LabelsForLocalStorage(localStorageName, role string) map[string]string
- func LabelsForMember(deploymentName, role, id string) map[string]string
- func LifecycleBinary() string
- func LifecycleVolume() core.Volume
- func LifecycleVolumeMount() core.VolumeMount
- func LocalStorageListOpt(localStorageName, role string) meta.ListOptions
- func MasterJWTVolumeMount() core.VolumeMount
- func NewContainer(containerCreator interfaces.ContainerCreator) (core.Container, error)
- func NewLifecycle(t string) (*core.Lifecycle, error)
- func NewLifecycleFinalizers() (*core.Lifecycle, error)
- func NewLifecycleFinalizersWithBinary(exePath string) (*core.Lifecycle, error)
- func NewLifecyclePort() (*core.Lifecycle, error)
- func NewLifecycleWithBinary(exePath string, t string) (*core.Lifecycle, error)
- func NewPod(deploymentName, role, id, podName string, podCreator interfaces.PodCreator) core.PodTemplateSpec
- func NewTime(t meta.Time) *meta.Time
- func PatchStorageClassIsDefault(cli storagev1.StorageV1Interface, name string, isDefault bool) error
- func PodStopTime(pod *core.Pod) time.Time
- func RemoveFinalizers[T meta.Object](ctx context.Context, getter generic.GetInterface[T], ...) (int, error)
- func RemoveOwnerRefToObjectIfNeeded(obj meta.Object, ownerRef *meta.OwnerReference) bool
- func RemoveSelectedFinalizers[T meta.Object](ctx context.Context, getter generic.GetInterface[T], ...) (int, error)
- func RenderTLSKeyfileSecret(secretName string, keyfile string, ownerRef *meta.OwnerReference) *core.Secret
- func RocksdbEncryptionReadOnlyVolumeMount() core.VolumeMount
- func RocksdbEncryptionVolumeMount() core.VolumeMount
- func SetBinaryPath(path string)
- func SetFinalizers(ctx context.Context, pods generic.ModClient[*core.Pod], pod *core.Pod, ...) error
- func StorageClassIsDefault(sc *storage.StorageClass) bool
- func TlsKeyfileVolumeMount() core.VolumeMount
- func UpdateJWTFromSecret(ctx context.Context, cachedSecrets generic.ReadClient[*core.Secret], ...) error
- func UpdateOwnerRefToObjectIfNeeded(obj meta.Object, ownerRef *meta.OwnerReference) bool
- func UpdateTokenSecret(ctx context.Context, secrets generic.ModClient[*core.Secret], ...) error
- func ValidateCACertificateSecret(ctx context.Context, secrets generic.ReadClient[*core.Secret], ...) error
- func ValidateEncryptionKeyFromSecret(s *core.Secret) error
- func ValidateEncryptionKeySecret(secrets generic.InspectorInterface[*core.Secret], secretName string) error
- func ValidateTokenFromSecret(s *core.Secret) error
- func ValidateTokenSecret(ctx context.Context, secrets generic.ReadClient[*core.Secret], ...) error
- func VolumeMountExists(vm []core.VolumeMount, name string) bool
- func WaitForInformers(stop <-chan struct{}, timeout time.Duration, informers ...Informer)
- type APIObject
- type DeepCopy
- type Event
- func NewAccessPackageCreatedEvent(apiObject APIObject, apSecretName string) *Event
- func NewAccessPackageDeletedEvent(apiObject APIObject, apSecretName string) *Event
- func NewCannotChangeStorageClassEvent(apiObject APIObject, memberID, role, subReason string) *Event
- func NewCannotSetArchitectureEvent(apiObject runtime.Object, arch, memberId string) *Event
- func NewCannotShrinkVolumeEvent(apiObject APIObject, pvcname string) *Event
- func NewDowntimeNotAllowedEvent(apiObject APIObject, operation string) *Event
- func NewErrorEvent(reason string, err error, apiObject APIObject) *Event
- func NewImmutableFieldEvent(fieldName string, apiObject APIObject) *Event
- func NewMemberAddEvent(memberName, role string, apiObject APIObject) *Event
- func NewMemberRemoveEvent(memberName, role string, apiObject APIObject) *Event
- func NewOperatorEngineOpsAlertEvent(reason string, apiObject APIObject) *Event
- func NewPVCResizedEvent(apiObject APIObject, pvcname string) *Event
- func NewPlanAbortedEvent(apiObject APIObject, itemType, memberID, role string) *Event
- func NewPlanAppendEvent(apiObject APIObject, itemType, memberID, role, reason string) *Event
- func NewPlanTimeoutEvent(apiObject APIObject, itemType, memberID, role string) *Event
- func NewPodCreatedEvent(podName, role string, apiObject APIObject) *Event
- func NewPodGoneEvent(podName, role string, apiObject APIObject) *Event
- func NewPodsSchedulingFailureEvent(unscheduledPodNames []string, apiObject APIObject) *Event
- func NewPodsSchedulingResolvedEvent(apiObject APIObject) *Event
- func NewSecretsChangedEvent(changedSecretNames []string, apiObject APIObject) *Event
- func NewSecretsRestoredEvent(apiObject APIObject) *Event
- func NewUpgradeNotAllowedEvent(apiObject APIObject, fromVersion, toVersion driver.Version, ...) *Event
- type Informer
- type K8SObject
- type License
- type LicenseSecret
- type OptionPair
- type OptionPairs
- func (o *OptionPairs) Add(key string, value interface{})
- func (o *OptionPairs) Addf(key, format string, i ...interface{})
- func (o *OptionPairs) Append(pairs ...OptionPair)
- func (o OptionPairs) AsArgs() []string
- func (o OptionPairs) AsArgsWithCommand(command string) []string
- func (o OptionPairs) AsSplittedArgs() []string
- func (o OptionPairs) Copy() OptionPairs
- func (o *OptionPairs) Merge(pairs ...OptionPairs)
- func (o OptionPairs) Sort() OptionPairs
- func (o OptionPairs) Unique() OptionPairs
- type Reconcile
- type RemoveFinalizersClient
- type ResourceWatcher
Constants ¶
const ( ServerContainerConditionContainersNotReady = "ContainersNotReady" ServerContainerConditionPrefix = "containers with unready status: " )
const ( // LabelKeyArangoDeployment is the key of the label used to store the ArangoDeployment name in LabelKeyArangoDeployment = "arango_deployment" // LabelKeyArangoLocalStorage is the key of the label used to store the ArangoLocalStorage name in LabelKeyArangoLocalStorage = "arango_local_storage" // LabelKeyApp is the key of the label used to store the application name in (fixed to AppName) LabelKeyApp = "app" // LabelKeyRole is the key of the label used to store the role of the resource in LabelKeyRole = "role" // LabelKeyArangoExporter is the key of the label used to indicate that an exporter is present LabelKeyArangoExporter = "arango_exporter" // LabelKeyArangoMember is the key of the label used to store the ArangoDeployment member ID in LabelKeyArangoMember = "deployment.arangodb.com/member" // LabelKeyArangoZone is the key of the label used to store the ArangoDeployment zone ID in LabelKeyArangoZone = "deployment.arangodb.com/zone" // LabelKeyArangoScheduled is the key of the label used to define that member is already scheduled LabelKeyArangoScheduled = "deployment.arangodb.com/scheduled" // LabelKeyArangoTopology is the key of the label used to store the ArangoDeployment topology ID in LabelKeyArangoTopology = "deployment.arangodb.com/topology" // LabelKeyArangoLeader is the key of the label used to store the current leader of a group instances. AF only. LabelKeyArangoLeader = "deployment.arangodb.com/leader" // LabelKeyArangoActive is the key of the label used to mark members as active. LabelKeyArangoActive = "deployment.arangodb.com/active" // LabelValueArangoActive is the value of the label used to mark members as active. LabelValueArangoActive = "true" // LabelKeyArangoMLStatefulSet is the key of the label used to define k8s StatefulSet for ML Extension LabelKeyArangoMLStatefulSet = "ml.arangodb.com/statefulset" // LabelKeyAnalyticsGAEStatefulSet is the key of the label used to define k8s StatefulSet for Analytics GAE LabelKeyAnalyticsGAEStatefulSet = "analytics.arangodb.com/statefulset" // AppName is the value for the "app" label AppName = "arangodb" // AppArangoML is the value for the "app" label AppArangoML = "arangoml" // AppAnalytics is the value for the "app" label AppAnalytics = "analytics" )
const (
LifecycleVolumeMountDir = "/lifecycle/tools"
)
Variables ¶
var ExtractStorageResourceRequirement = kresources.ExtractStorageResourceRequirement
ExtractStorageResourceRequirement filters resource requirements for Pods. Keep reference for backward compatibility
Functions ¶
func AddOwnerRefToObject ¶
func AddOwnerRefToObject(obj meta.Object, ownerRef *meta.OwnerReference)
AddOwnerRefToObject adds given owner reference to given object
func AppendTLSKeyfileSecretPostfix ¶
AppendTLSKeyfileSecretPostfix returns the name of the Secret extended with TLS keyfile postfix.
func AppsV1DeploymentGVK ¶
func AppsV1DeploymentGVK() schema.GroupVersionKind
func ArangodInitContainer ¶
func ArangodInitContainer(name, id, engine, executable, operatorImage string, requireUUID bool, securityContext *core.SecurityContext) core.Container
ArangodInitContainer creates a container configured to initialize a UUID file.
func ArangodVersionCheckInitContainer ¶
func ArangodVersionCheckInitContainer(name, executable, operatorImage string, version driver.Version, securityContext *core.SecurityContext) core.Container
ArangodVersionCheckInitContainer creates a container configured to check version.
func ArangodVolumeMount ¶
func ArangodVolumeMount() core.VolumeMount
ArangodVolumeMount creates a volume mount structure for arangod.
func ArangodWaiterInitContainer ¶
func ArangodWaiterInitContainer(name, deploymentName, executable, operatorImage string, isSecured bool, securityContext *core.SecurityContext) core.Container
ArangodWaiterInitContainer creates a container configured to wait for specific ArangoDeployment to be ready
func AreContainersReady ¶
func AreContainersReady(pod *core.Pod, coreContainers utils.StringList) bool
AreContainersReady checks whether Pod is considered as ready. Returns true if the PodReady condition on the given pod is set to true, or all provided containers' names are running and are not in the list of failed containers.
func BatchV1CronJobGVK ¶
func BatchV1CronJobGVK() schema.GroupVersionKind
func BatchV1JobGVK ¶
func BatchV1JobGVK() schema.GroupVersionKind
func BinaryPath ¶
func BinaryPath() string
func ClientAuthCACertificateVolumeMount ¶
func ClientAuthCACertificateVolumeMount() core.VolumeMount
ClientAuthCACertificateVolumeMount creates a volume mount structure for a client-auth CA certificate (ca.crt).
func ClusterJWTVolumeMount ¶
func ClusterJWTVolumeMount() core.VolumeMount
ClusterJWTVolumeMount creates a volume mount structure for a cluster JWT secret (token).
func ContainerStopTime ¶
func ContainerStopTime(container core.ContainerStatus) time.Time
ContainerStopTime returns time of the Container stop. If container is running, time.Zero is returned
func ContainersRecentStopTime ¶
func ContainersRecentStopTime(containers []core.ContainerStatus) time.Time
ContainersRecentStopTime returns most recent termination time of pods
func ConvertImageID2Image ¶
ConvertImageID2Image converts a ImageID from a ContainerStatus to an Image that can be used in a Container specification.
func CoreV1PodGVK ¶
func CoreV1PodGVK() schema.GroupVersionKind
func CreateAffinity ¶
func CreateAffinity(deploymentName, role string, required bool, affinityWithRole string) *core.Affinity
CreateAffinity creates pod anti-affinity for the given role. role contains the name of the role to configure any-affinity with. affinityWithRole contains the role to configure affinity with.
func CreateAgentLeaderServiceName ¶
CreateAgentLeaderServiceName returns the name of the service used to access a leader agent.
func CreateBasicAuthSecret ¶
func CreateBasicAuthSecret(ctx context.Context, secrets generic.ModClient[*core.Secret], secretName, username, password string, ownerRef *meta.OwnerReference) error
CreateBasicAuthSecret creates a secret with given name in given namespace with a given username and password as value.
func CreateCASecret ¶
func CreateCASecret(ctx context.Context, secrets generic.ModClient[*core.Secret], secretName string, certificate, key string, ownerRef *meta.OwnerReference) error
CreateCASecret creates a secret used to store a PEM encoded CA certificate & private key.
func CreateConfigMap ¶
func CreateDatabaseClientService ¶
func CreateDatabaseClientService(ctx context.Context, svcs generic.ModClient[*core.Service], deployment meta.Object, ports []core.ServicePort, selectors map[string]string, owner meta.OwnerReference) (string, bool, error)
CreateDatabaseClientService prepares and creates a service in k8s, used by database clients within the k8s cluster. If the service already exists, nil is returned. If another error occurs, that error is returned. The returned bool is true if the service is created, or false when the service already existed.
func CreateDatabaseClientServiceDNSName ¶
CreateDatabaseClientServiceDNSName returns the DNS of the database client service.
func CreateDatabaseClientServiceDNSNameWithDomain ¶
CreateDatabaseClientServiceDNSNameWithDomain returns the DNS of the database client service.
func CreateDatabaseClientServiceName ¶
CreateDatabaseClientServiceName returns the name of the service used by database clients for the given deployment name.
func CreateDatabaseExternalAccessServiceName ¶
CreateDatabaseExternalAccessServiceName returns the name of the service used to access the database from output the kubernetes cluster.
func CreateDefaultContainerTemplate ¶
func CreateDefaultContainerTemplate(image *schedulerContainerResourcesApi.Image) *schedulerContainerApi.Container
func CreateEncryptionKeySecret ¶
func CreateEncryptionKeySecret(secrets generic.ModClient[*core.Secret], secretName string, key []byte) error
CreateEncryptionKeySecret creates a secret used to store a RocksDB encryption key.
func CreateEnvFieldPath ¶
func CreateExporterClientServiceName ¶
CreateExporterClientServiceName returns the name of the service used by arangodb-exporter clients for the given deployment name.
func CreateExporterService ¶
func CreateExporterService(ctx context.Context, cachedStatus inspector.Inspector, deployment meta.Object, ports []core.ServicePort, selectors map[string]string, owner meta.OwnerReference) (string, bool, error)
CreateExporterService
func CreateExternalAccessService ¶
func CreateExternalAccessService(ctx context.Context, svcs generic.ModClient[*core.Service], svcName string, serviceType core.ServiceType, ports []core.ServicePort, selectors map[string]string, loadBalancerIP string, loadBalancerSourceRanges []string, owner meta.OwnerReference) (string, bool, error)
CreateExternalAccessService prepares and creates a service in k8s, used to access the database/sync from outside k8s cluster. If the service already exists, nil is returned. If another error occurs, that error is returned. The returned bool is true if the service is created, or false when the service already existed.
func CreateHeadlessService ¶
func CreateHeadlessService(ctx context.Context, svcs generic.ModClient[*core.Service], deployment meta.Object, ports []core.ServicePort, selectors map[string]string, owner meta.OwnerReference) (string, bool, error)
CreateHeadlessService prepares and creates a headless service in k8s, used to provide a stable DNS name for all pods. If the service already exists, nil is returned. If another error occurs, that error is returned. The returned bool is true if the service is created, or false when the service already existed.
func CreateHeadlessServiceName ¶
CreateHeadlessServiceName returns the name of the headless service for the given deployment name.
func CreateJWTFromSecret ¶
func CreateJWTFromSecret(ctx context.Context, cachedSecrets generic.ReadClient[*core.Secret], secrets generic.ModClient[*core.Secret], tokenSecretName, secretSecretName string, claims map[string]interface{}, ownerRef *meta.OwnerReference) error
CreateJWTFromSecret creates a JWT using the secret stored in secretSecretName and stores the result in a new secret called tokenSecretName
func CreatePersistentVolumeClaim ¶
func CreatePersistentVolumeClaim(ctx context.Context, pvcs generic.ModClient[*core.PersistentVolumeClaim], pvcName, deploymentName, storageClassName, role string, enforceAntiAffinity bool, resources core.ResourceRequirements, vct *core.PersistentVolumeClaim, finalizers []string, owner meta.OwnerReference) error
CreatePersistentVolumeClaim creates a persistent volume claim with given name and configuration. If the pvc already exists, nil is returned. If another error occurs, that error is returned.
func CreatePod ¶
func CreatePod(ctx context.Context, c generic.ModClient[*core.Pod], pod *core.Pod, ns string, owner meta.OwnerReference) (string, types.UID, error)
CreatePod adds an owner to the given pod and calls the k8s api-server to created it. If the pod already exists, nil is returned. If another error occurs, that error is returned.
func CreatePodDNSName ¶
CreatePodDNSName returns the DNS of a pod with a given role & id in a given deployment.
func CreatePodDNSNameWithDomain ¶
CreatePodDNSName returns the DNS of a pod with a given role & id in a given deployment.
func CreatePodName ¶
CreatePodName returns the name of the pod for a member with a given id in a deployment with a given name.
func CreatePodSecurityContext ¶
func CreatePodSecurityContext(spec *api.ServerGroupSpecSecurityContext) *core.PodSecurityContext
CreatePodSecurityContext creates pod's security context.
func CreateSecurityContext ¶
func CreateSecurityContext(spec *api.ServerGroupSpecSecurityContext) *core.SecurityContext
CreateSecurityContext returns security context. If secured container's feature is enabled then default values will set on nil fields.
func CreateServiceDNSName ¶
CreateServiceDNSName returns the DNS of a service.
func CreateServiceDNSNameWithDomain ¶
CreateServiceDNSNameWithDomain returns the DNS of a service extended with domain.
func CreateServiceURL ¶
func CreateServiceURL(svc core.Service, scheme string, portPredicate func(core.ServicePort) bool, nodeFetcher func() ([]*core.Node, error)) (string, error)
CreateServiceURL creates a URL used to reach the given service.
func CreateSyncMasterClientServiceDNSName ¶
CreateSyncMasterClientServiceDNSName returns the DNS of the syncmaster client service.
func CreateSyncMasterClientServiceDNSNameWithDomain ¶
CreateSyncMasterClientServiceDNSNameWithDomain returns the DNS of the syncmaster client service.
func CreateSyncMasterClientServiceName ¶
CreateSyncMasterClientServiceName returns the name of the service used by syncmaster clients for the given deployment name.
func CreateTLSKeyfileSecret ¶
func CreateTLSKeyfileSecret(ctx context.Context, secrets generic.ModClient[*core.Secret], secretName string, keyfile string, ownerRef *meta.OwnerReference) (*core.Secret, error)
CreateTLSKeyfileSecret creates a secret used to store a PEM encoded keyfile in the format ArangoDB accepts it for its `--ssl.keyfile` option.
func CreateTLSKeyfileSecretName ¶
CreateTLSKeyfileSecretName returns the name of the Secret that holds the TLS keyfile for a member with a given id in a deployment with a given name.
func CreateTokenSecret ¶
func CreateTokenSecret(ctx context.Context, secrets generic.ModClient[*core.Secret], secretName, token string, ownerRef *meta.OwnerReference) error
CreateTokenSecret creates a secret with given name in given namespace with a given token as value.
func CreateVolumeEmptyDir ¶
func CreateVolumeWithSecret ¶
func DatabaseClientDetails ¶
func DeploymentListOpt ¶
func DeploymentListOpt(deploymentName string) meta.ListOptions
DeploymentListOpt creates a ListOptions matching all labels for the given deployment name.
func EnsureFinalizerAbsent ¶
func EnsureFinalizerPresent ¶
func EnsureFinalizers ¶
func ExporterJWTVolumeMount ¶
func ExporterJWTVolumeMount() core.VolumeMount
func ExporterServiceDetails ¶
func ExporterServiceDetails(deploymentName string) ([]core.ServicePort, map[string]string)
func ExternalAccessDetails ¶
func GetAnyVolumeByName ¶
GetAnyVolumeByName returns the volume in the given volumes with the given name. Returns false if not found.
func GetAnyVolumeMountByName ¶
func GetAnyVolumeMountByName(volumes []core.VolumeMount, name string) (core.VolumeMount, bool)
GetAnyVolumeMountByName returns the volumemount in the given volumemountss with the given name. Returns false if not found.
func GetArangoDBImageFromContainers ¶
GetArangoDBImageFromContainers returns the ArangoDB specific image from a container specs
func GetArangoDBImageIDFromContainerStatuses ¶
func GetArangoDBImageIDFromContainerStatuses(containers []core.ContainerStatus, names ...string) (string, bool)
GetArangoDBImageIDFromContainerStatuses returns the ArangoDB specific image from a container statuses
func GetArangoDBImageIDFromPod ¶
GetArangoDBImageIDFromPod returns the ArangoDB specific image from a pod
func GetBasicAuthSecret ¶
func GetBasicAuthSecret(secrets generic.ReadClient[*core.Secret], secretName string) (string, string, error)
GetBasicAuthSecret loads a secret with given name in the given namespace and extracts the `username` & `password` field. If the secret does not exists or one of the fields is missing, an error is returned. Returns: username, password, error
func GetCACertficateSecret ¶
func GetCACertficateSecret(ctx context.Context, secrets generic.ReadClient[*core.Secret], secretName string) (string, error)
GetCACertficateSecret loads a secret with given name in the given namespace and extracts the `ca.crt` field. If the secret does not exists the field is missing, an error is returned. Returns: certificate, error
func GetCAFromSecret ¶
func GetCASecret ¶
func GetCASecret(ctx context.Context, secrets generic.ReadClient[*core.Secret], secretName string, ownerRef *meta.OwnerReference) (string, string, bool, error)
GetCASecret loads a secret with given name in the given namespace and extracts the `ca.crt` & `ca.key` field. If the secret does not exists or one of the fields is missing, an error is returned. Returns: certificate, private-key, isOwnedByDeployment, error
func GetFinalizers ¶
func GetFinalizers(spec api.ServerGroupSpec, group api.ServerGroup) []string
func GetImageDetails ¶
func GetImageDetails(images ...*schedulerContainerResourcesApi.Image) *schedulerContainerResourcesApi.Image
GetImageDetails Returns latest defined Image details
func GetKeyCertFromSecret ¶
func GetLifecycleEnv ¶
func GetPodByName ¶
GetPodByName returns pod if it exists among the pods' list Returns false if not found.
func GetPodOwner ¶
func GetPodOwner(kubecli kubernetes.Interface, pod *core.Pod, ns string) (*apps.ReplicaSet, error)
GetPodOwner returns the ReplicaSet that owns the given Pod. If the Pod has no owner of the owner is not a ReplicaSet, nil is returned.
func GetPodSpecChecksum ¶
GetPodSpecChecksum return checksum of requested pod spec based on deployment and group spec
func GetReplicaSetOwner ¶
func GetReplicaSetOwner(kubecli kubernetes.Interface, rSet *apps.ReplicaSet, ns string) (*apps.Deployment, error)
GetReplicaSetOwner returns the Deployment that owns the given ReplicaSet. If the ReplicaSet has no owner of the owner is not a Deployment, nil is returned.
func GetSecretAuthCredentials ¶
GetSecretAuthCredentials returns username and password from the secret
func GetTLSKeyfileSecret ¶
func GetTLSKeyfileSecret(secrets generic.ReadClient[*core.Secret], secretName string) (string, error)
GetTLSKeyfileSecret loads a secret used to store a PEM encoded keyfile in the format ArangoDB accepts it for its `--ssl.keyfile` option. Returns: keyfile (pem encoded), error
func GetTokenFromSecret ¶
GetTokenFromSecret loads the token secret from a Secret with given name.
func GetTokenSecret ¶
func GetTokenSecret(ctx context.Context, secrets generic.ReadClient[*core.Secret], secretName string) (string, error)
GetTokenSecret loads the token secret from a Secret with given name.
func HeadlessServiceDetails ¶
func HeadlessServiceDetails(deploymentName string) ([]core.ServicePort, map[string]string)
func InitLifecycleContainer ¶
func InitLifecycleContainer(image, binaryPath string, resources *core.ResourceRequirements, securityContext *core.SecurityContext) (core.Container, error)
InitLifecycleContainer creates an init-container to copy the lifecycle binary to a shared volume.
func IsAnyContainerAlive ¶
func IsAnyContainerAlive(containers []core.ContainerStatus) bool
IsAnyContainerAlive returns true if any of the containers is running
func IsContainerAlive ¶
func IsContainerAlive(container core.ContainerStatus) bool
IsContainerAlive returns true if container is running
func IsContainerRunning ¶
IsContainerRunning returns true if the container of the pod is still running
func IsPersistentVolumeClaimFileSystemResizePending ¶
func IsPersistentVolumeClaimFileSystemResizePending(pvc *core.PersistentVolumeClaim) bool
IsPersistentVolumeClaimFileSystemResizePending returns true if the pvc has FileSystemResizePending set to true
func IsPersistentVolumeClaimMarkedForDeletion ¶
func IsPersistentVolumeClaimMarkedForDeletion(pvc *core.PersistentVolumeClaim) bool
IsPersistentVolumeClaimMarkedForDeletion returns true if the pvc has been marked for deletion.
func IsPersistentVolumeClaimResizing ¶
func IsPersistentVolumeClaimResizing(pvc *core.PersistentVolumeClaim) bool
IsPersistentVolumeClaimResizing returns true if the pvc has Resizing set to true
func IsPodAlive ¶
IsPodAlive returns true if any of the containers within pod is running
func IsPodFailed ¶
func IsPodFailed(pod *core.Pod, coreContainers utils.StringList) bool
IsPodFailed returns true when one of the core containers is terminated wih a non-zero exit code, or the whole pod has been failed.
func IsPodMarkedForDeletion ¶
IsPodMarkedForDeletion returns true if the pod has been marked for deletion.
func IsPodNotScheduledFor ¶
IsPodNotScheduledFor returns true if the pod has not been scheduled for longer than the given duration.
func IsPodReady ¶
IsPodReady returns true if the PodReady condition on the given pod is set to true.
func IsPodScheduled ¶
IsPodScheduled returns true if the pod has been scheduled.
func IsPodServerContainerRunning ¶
IsPodServerContainerRunning returns true if the arangodb container of the pod is still running
func IsPodSucceeded ¶
func IsPodSucceeded(pod *core.Pod, coreContainers utils.StringList) bool
IsPodSucceeded returns true when all core containers are terminated wih a zero exit code, or the whole pod has been succeeded.
func IsPodTerminating ¶
IsPodTerminating returns true if the pod has been marked for deletion.
func IsServiceRotationRequired ¶
func IsServiceRotationRequired(spec api.DeploymentSpec, svc *core.Service) bool
func LabelsForActiveMember ¶
LabelsForActiveMember returns a map of labels, given to active members for given deployment name and member id
func LabelsForDeployment ¶
LabelsForDeployment returns a map of labels, given to all resources for given deployment name
func LabelsForExporterService ¶
LabelsForExporterService returns a map of labels, used to select the all arangodb-exporter containers
func LabelsForExporterServiceSelector ¶
LabelsForExporterServiceSelector returns a map of labels, used to select the all arangodb-exporter containers
func LabelsForLeaderMember ¶
LabelsForLeaderMember returns a map of labels for given deployment name and member id and role and leadership.
func LabelsForLocalStorage ¶
LabelsForLocalStorage returns a map of labels, given to all resources for given local storage name
func LabelsForMember ¶
LabelsForMember returns a map of labels, given to all resources for given deployment name and member id
func LifecycleBinary ¶
func LifecycleBinary() string
func LifecycleVolume ¶
LifecycleVolume creates a volume mount structure for shared lifecycle emptyDir.
func LifecycleVolumeMount ¶
func LifecycleVolumeMount() core.VolumeMount
LifecycleVolumeMount creates a volume mount structure for shared lifecycle emptyDir.
func LocalStorageListOpt ¶
func LocalStorageListOpt(localStorageName, role string) meta.ListOptions
LocalStorageListOpt creates a ListOptions matching all labels for the given local storage name.
func MasterJWTVolumeMount ¶
func MasterJWTVolumeMount() core.VolumeMount
MasterJWTVolumeMount creates a volume mount structure for a master JWT secret (token).
func NewContainer ¶
func NewContainer(containerCreator interfaces.ContainerCreator) (core.Container, error)
NewContainer creates a container for specified creator
func NewLifecycle ¶
NewLifecycle creates a lifecycle structure with preStop handler.
func NewLifecycleFinalizers ¶
NewLifecycleFinalizers creates a lifecycle structure with preStop handler which wait for finalizers to be removed.
func NewLifecycleFinalizersWithBinary ¶
NewLifecycleFinalizersWithBinary creates a lifecycle structure with preStop handler which wait for finalizers to be removed using specific binary path.
func NewLifecyclePort ¶
NewLifecyclePort creates a lifecycle structure with preStop handler which wait for port to be closed.
func NewLifecycleWithBinary ¶
NewLifecycleWithBinary creates a lifecycle structure with preStop handler using specific binary path.
func NewPod ¶
func NewPod(deploymentName, role, id, podName string, podCreator interfaces.PodCreator) core.PodTemplateSpec
NewPod creates a basic Pod for given settings.
func PatchStorageClassIsDefault ¶
func PatchStorageClassIsDefault(cli storagev1.StorageV1Interface, name string, isDefault bool) error
PatchStorageClassIsDefault changes the default flag of the given storage class.
func PodStopTime ¶
PodStopTime returns time when pod has been stopped
func RemoveFinalizers ¶
func RemoveFinalizers[T meta.Object](ctx context.Context, getter generic.GetInterface[T], p generic.PatchInterface[T], name string, finalizers []string, ignoreNotFound bool) (int, error)
RemoveFinalizers is a helper used to remove finalizers from an object. The functions tries to get the object using the provided get function, then remove the given finalizers and update the update using the given update function. In case of an update conflict, the functions tries again.
func RemoveOwnerRefToObjectIfNeeded ¶
func RemoveOwnerRefToObjectIfNeeded(obj meta.Object, ownerRef *meta.OwnerReference) bool
RemoveOwnerRefToObjectIfNeeded removes given owner reference to given object if it exists
func RemoveSelectedFinalizers ¶
func RemoveSelectedFinalizers[T meta.Object](ctx context.Context, getter generic.GetInterface[T], patcher generic.PatchInterface[T], p T, finalizers []string, ignoreNotFound bool) (int, error)
RemoveSelectedFinalizers removes the given finalizers from the given pod.
func RenderTLSKeyfileSecret ¶
func RenderTLSKeyfileSecret(secretName string, keyfile string, ownerRef *meta.OwnerReference) *core.Secret
RenderTLSKeyfileSecret renders a secret used to store a PEM encoded keyfile in the format ArangoDB accepts it for its `--ssl.keyfile` option.
func RocksdbEncryptionReadOnlyVolumeMount ¶
func RocksdbEncryptionReadOnlyVolumeMount() core.VolumeMount
RocksdbEncryptionReadOnlyVolumeMount creates a volume mount structure for a RocksDB encryption key.
func RocksdbEncryptionVolumeMount ¶
func RocksdbEncryptionVolumeMount() core.VolumeMount
RocksdbEncryptionVolumeMount creates a volume mount structure for a RocksDB encryption key.
func SetBinaryPath ¶
func SetBinaryPath(path string)
func SetFinalizers ¶
func StorageClassIsDefault ¶
func StorageClassIsDefault(sc *storage.StorageClass) bool
StorageClassIsDefault returns true if the given storage class is marked default, false otherwise.
func TlsKeyfileVolumeMount ¶
func TlsKeyfileVolumeMount() core.VolumeMount
TlsKeyfileVolumeMount creates a volume mount structure for a TLS keyfile.
func UpdateJWTFromSecret ¶
func UpdateJWTFromSecret(ctx context.Context, cachedSecrets generic.ReadClient[*core.Secret], secrets generic.ModClient[*core.Secret], tokenSecretName, secretSecretName string, claims map[string]interface{}) error
UpdateJWTFromSecret updates a JWT using the secret stored in secretSecretName and stores the result in a new secret called tokenSecretName
func UpdateOwnerRefToObjectIfNeeded ¶
func UpdateOwnerRefToObjectIfNeeded(obj meta.Object, ownerRef *meta.OwnerReference) bool
UpdateOwnerRefToObjectIfNeeded add given owner reference to given object if it does not exist yet
func UpdateTokenSecret ¶
func UpdateTokenSecret(ctx context.Context, secrets generic.ModClient[*core.Secret], secret *core.Secret, token string) error
UpdateTokenSecret updates a secret with given name in given namespace with a given token as value.
func ValidateCACertificateSecret ¶
func ValidateCACertificateSecret(ctx context.Context, secrets generic.ReadClient[*core.Secret], secretName string) error
ValidateCACertificateSecret checks that a secret with given name in given namespace exists and it contains a 'ca.crt' data field.
func ValidateEncryptionKeySecret ¶
func ValidateEncryptionKeySecret(secrets generic.InspectorInterface[*core.Secret], secretName string) error
ValidateEncryptionKeySecret checks that a secret with given name in given namespace exists and it contains a 'key' data field of exactly 32 bytes.
func ValidateTokenFromSecret ¶
func ValidateTokenSecret ¶
func ValidateTokenSecret(ctx context.Context, secrets generic.ReadClient[*core.Secret], secretName string) error
ValidateTokenSecret checks that a secret with given name in given namespace exists and it contains a 'token' data field.
func VolumeMountExists ¶
func VolumeMountExists(vm []core.VolumeMount, name string) bool
func WaitForInformers ¶
Types ¶
type Event ¶
Event is used to create events using an EventRecorder.
func NewAccessPackageCreatedEvent ¶
NewAccessPackageCreatedEvent creates an event indicating that a secret containing an access package has been created.
func NewAccessPackageDeletedEvent ¶
NewAccessPackageDeletedEvent creates an event indicating that a secret containing an access package has been deleted.
func NewCannotChangeStorageClassEvent ¶
NewCannotChangeStorageClassEvent creates an event indicating that an item would need to use a different StorageClass, but this is not possible for the given reason.
func NewCannotSetArchitectureEvent ¶
NewCannotSetArchitectureEvent creates an even of type CannotSetArchitectureEvent.
func NewCannotShrinkVolumeEvent ¶
NewCannotShrinkVolumeEvent creates an event indicating that the user tried to shrink a PVC
func NewDowntimeNotAllowedEvent ¶
NewDowntimeNotAllowedEvent creates an event indicating that an operation cannot be executed because downtime is currently not allowed.
func NewErrorEvent ¶
NewErrorEvent creates an even of type error.
func NewImmutableFieldEvent ¶
NewImmutableFieldEvent creates an event indicating that an attempt was made to change a field that is immutable.
func NewMemberAddEvent ¶
NewMemberAddEvent creates an event indicating that a member was added.
func NewMemberRemoveEvent ¶
NewMemberRemoveEvent creates an event indicating that an existing member was removed.
func NewOperatorEngineOpsAlertEvent ¶
NewOperatorEngineOpsAlertEvent creates an even of type OperatorEngineOpsAlert.
func NewPVCResizedEvent ¶
NewPVCResizedEvent creates an event indicating that a PVC has been resized
func NewPlanAbortedEvent ¶
NewPlanAbortedEvent creates an event indicating that an item on a reconciliation plan wants to abort the entire plan.
func NewPlanAppendEvent ¶
NewPlanAppendEvent creates an event indicating that an item on a reconciliation plan has been added
func NewPlanTimeoutEvent ¶
NewPlanTimeoutEvent creates an event indicating that an item on a reconciliation plan did not finish before its deadline.
func NewPodCreatedEvent ¶
NewPodCreatedEvent creates an event indicating that a pod has been created
func NewPodGoneEvent ¶
NewPodGoneEvent creates an event indicating that a pod is missing
func NewPodsSchedulingFailureEvent ¶
NewPodsSchedulingFailureEvent creates an event indicating that one of more cannot be scheduled.
func NewPodsSchedulingResolvedEvent ¶
NewPodsSchedulingResolvedEvent creates an event indicating that an earlier problem with pod scheduling has been resolved.
func NewSecretsChangedEvent ¶
NewSecretsChangedEvent creates an event indicating that one of more secrets have changed.
func NewSecretsRestoredEvent ¶
NewSecretsRestoredEvent creates an event indicating that all secrets have been restored to their original values.
func NewUpgradeNotAllowedEvent ¶
func NewUpgradeNotAllowedEvent(apiObject APIObject, fromVersion, toVersion driver.Version, fromLicense, toLicense upgraderules.License) *Event
NewUpgradeNotAllowedEvent creates an event indicating that an upgrade (or downgrade) is not allowed.
type K8SObject ¶
type K8SObject interface { meta.Object // AsOwner creates an OwnerReference for the given deployment AsOwner() meta.OwnerReference }
type LicenseSecret ¶
func GetLicenseFromSecret ¶
func GetLicenseFromSecret(secret secret.Inspector, name string) (LicenseSecret, error)
type OptionPair ¶
OptionPair key value pair builder
func ExtractStringToOptionPair ¶
func ExtractStringToOptionPair(arg string) OptionPair
ExtractStringToOptionPair extracts command line argument into the OptionPair.
func (OptionPair) CompareTo ¶
func (o OptionPair) CompareTo(other OptionPair) int
CompareTo returns -1 if o < other, 0 if o == other, 1 otherwise
func (OptionPair) String ¶
func (o OptionPair) String() string
type OptionPairs ¶
type OptionPairs []OptionPair
OptionPairs list of pair builder
func CreateOptionPairs ¶
func CreateOptionPairs(lens ...int) OptionPairs
func NewOptionPair ¶
func NewOptionPair(pairs ...OptionPair) OptionPairs
func (*OptionPairs) Add ¶
func (o *OptionPairs) Add(key string, value interface{})
func (*OptionPairs) Addf ¶
func (o *OptionPairs) Addf(key, format string, i ...interface{})
func (*OptionPairs) Append ¶
func (o *OptionPairs) Append(pairs ...OptionPair)
func (OptionPairs) AsArgs ¶
func (o OptionPairs) AsArgs() []string
func (OptionPairs) AsArgsWithCommand ¶
func (o OptionPairs) AsArgsWithCommand(command string) []string
func (OptionPairs) AsSplittedArgs ¶
func (o OptionPairs) AsSplittedArgs() []string
func (OptionPairs) Copy ¶
func (o OptionPairs) Copy() OptionPairs
func (*OptionPairs) Merge ¶
func (o *OptionPairs) Merge(pairs ...OptionPairs)
func (OptionPairs) Sort ¶
func (o OptionPairs) Sort() OptionPairs
func (OptionPairs) Unique ¶
func (o OptionPairs) Unique() OptionPairs
type Reconcile ¶
type Reconcile interface { Reconcile(ctx context.Context) error Required() IsRequired() bool WithError(err error) error ParallelAll(items int, executor func(id int) error) error Parallel(items, max int, executor func(id int) error) error }
func NewReconcile ¶
type RemoveFinalizersClient ¶
type RemoveFinalizersClient[T meta.Object] interface { generic.GetInterface[T] generic.PatchInterface[T] }
type ResourceWatcher ¶
type ResourceWatcher struct {
// contains filtered or unexported fields
}
ResourceWatcher is a helper to watch for events in a specific type of resource. The handler functions are protected from panics.
func NewResourceWatcher ¶
func NewResourceWatcher(getter cache.Getter, resource, namespace string, objType runtime.Object, h cache.ResourceEventHandlerFuncs) *ResourceWatcher
NewResourceWatcher creates a helper that watches for changes in a resource of a specific type. If wraps the given handler functions, such that panics are caught and logged.
func (*ResourceWatcher) Run ¶
func (rw *ResourceWatcher) Run(stopCh <-chan struct{})
Run continues to watch for events on the selected type of resource until the given channel is closed.