Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ServiceKind indicates the target resource is a service ServiceKind = "Service" // PodKind indicates the target resource is a pod PodKind = "Pod" // 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 ClientSetFunc ¶ added in v0.5.0
type ClientSetFunc func(c *v1alpha1.Cluster, client client.Client) (*util.DynamicClusterClient, error)
ClientSetFunc is used to generate client set of member cluster
type ObjectWatcher ¶
type ObjectWatcher interface {
Create(cluster *v1alpha1.Cluster, desireObj *unstructured.Unstructured) error
Update(cluster *v1alpha1.Cluster, desireObj, clusterObj *unstructured.Unstructured) error
Delete(cluster *v1alpha1.Cluster, desireObj *unstructured.Unstructured) error
NeedsUpdate(cluster *v1alpha1.Cluster, desiredObj, clusterObj *unstructured.Unstructured) (bool, error)
}
ObjectWatcher manages operations for object dispatched to member clusters.
func NewObjectWatcher ¶
func NewObjectWatcher(kubeClientSet client.Client, restMapper meta.RESTMapper, clusterClientSetFunc ClientSetFunc) ObjectWatcher
NewObjectWatcher returns a instance of ObjectWatcher
Click to show internal directories.
Click to hide internal directories.