Documentation ¶
Index ¶
- Constants
- func DeprecatedGetAssignedSyncTarget(labels map[string]string) stringdeprecated
- func EnsureUpstreamFinalizerRemoved(ctx context.Context, gvr schema.GroupVersionResource, ...) error
- func PhysicalClusterNamespaceName(l NamespaceLocator) (string, error)
- type NamespaceLocator
- func LocatorFromAnnotations(annotations map[string]string) (*NamespaceLocator, bool, error)
- func NewNamespaceLocator(workspace, syncTargetWorkspace logicalcluster.Name, syncTargetUID types.UID, ...) NamespaceLocator
- func NewNamespaceLocatorV060(workspace, syncTargetWorkspace logicalcluster.Name, syncTargetUID types.UID, ...) NamespaceLocator
- type SyncTargetLocator
Constants ¶
View Source
const (
NamespaceLocatorAnnotation = "kcp.dev/namespace-locator"
)
View Source
const ( // SyncerFinalizerNamePrefix is the finalizer put onto resources by the syncer to claim ownership, // *before* a downstream object is created. It is only removed when the downstream object is deleted. SyncerFinalizerNamePrefix = "workload.kcp.dev/syncer-" )
Variables ¶
This section is empty.
Functions ¶
func DeprecatedGetAssignedSyncTarget
deprecated
func EnsureUpstreamFinalizerRemoved ¶
func EnsureUpstreamFinalizerRemoved(ctx context.Context, gvr schema.GroupVersionResource, upstreamInformers dynamicinformer.DynamicSharedInformerFactory, upstreamClient dynamic.ClusterInterface, upstreamNamespace, syncTargetKey string, logicalClusterName logicalcluster.Name, resourceName string) error
func PhysicalClusterNamespaceName ¶
func PhysicalClusterNamespaceName(l NamespaceLocator) (string, error)
PhysicalClusterNamespaceName encodes the NamespaceLocator into a new namespace name for use on a physical cluster. The encoding is repeatable.
Types ¶
type NamespaceLocator ¶
type NamespaceLocator struct { SyncTarget SyncTargetLocator `json:"syncTarget"` Workspace logicalcluster.Name `json:"workspace,omitempty"` Namespace string `json:"namespace"` }
NamespaceLocator stores a logical cluster and namespace and is used as the source for the mapped namespace name in a physical cluster.
func LocatorFromAnnotations ¶
func LocatorFromAnnotations(annotations map[string]string) (*NamespaceLocator, bool, error)
func NewNamespaceLocator ¶
func NewNamespaceLocator(workspace, syncTargetWorkspace logicalcluster.Name, syncTargetUID types.UID, syncTargetName, upstreamNamespace string) NamespaceLocator
func NewNamespaceLocatorV060 ¶ added in v0.6.1
func NewNamespaceLocatorV060(workspace, syncTargetWorkspace logicalcluster.Name, syncTargetUID types.UID, syncTargetName, upstreamNamespace string) NamespaceLocator
Click to show internal directories.
Click to hide internal directories.