objectwatcher

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ServiceKind indicates the target resource is a service
	ServiceKind = "Service"
	// ServiceAccountKind indicates the target resource is a serviceaccount
	ServiceAccountKind = "ServiceAccount"
	// SecretsField indicates the 'secrets' field of a service account
	SecretsField = "secrets"
)

Variables

This section is empty.

Functions

func RetainClusterFields

func RetainClusterFields(desiredObj, clusterObj *unstructured.Unstructured) error

RetainClusterFields updates the desired object with values retained from the cluster object.

Types

type ObjectWatcher

type ObjectWatcher interface {
	Create(clusterName string, desireObj *unstructured.Unstructured) error
	Update(clusterName string, desireObj, clusterObj *unstructured.Unstructured) error
	Delete(clusterName string, desireObj *unstructured.Unstructured) error
	NeedsUpdate(clusterName string, desiredObj, clusterObj *unstructured.Unstructured) (bool, error)
}

ObjectWatcher manages operations for object dispatched to member clusters.

func NewObjectWatcher

func NewObjectWatcher(client client.Client, kubeClientSet kubernetes.Interface, restMapper meta.RESTMapper) ObjectWatcher

NewObjectWatcher returns a instance of ObjectWatcher

Jump to

Keyboard shortcuts

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