Documentation ¶
Index ¶
- func VersionMapToClusterVersions(versionMap map[string]string) []fedv1a1.ClusterObjectVersion
- type VersionAdapter
- type VersionManager
- func (m *VersionManager) Delete(qualifiedName util.QualifiedName)
- func (m *VersionManager) Get(template, override *unstructured.Unstructured) map[string]string
- func (m *VersionManager) HasSynced() bool
- func (m *VersionManager) Sync(stopChan <-chan struct{})
- func (m *VersionManager) Update(template, override *unstructured.Unstructured, selectedClusters []string, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VersionMapToClusterVersions ¶
func VersionMapToClusterVersions(versionMap map[string]string) []fedv1a1.ClusterObjectVersion
Types ¶
type VersionAdapter ¶
type VersionAdapter interface { TypeName() string // Create a new instance of the version type NewVersion(qualifiedName util.QualifiedName, ownerReference metav1.OwnerReference, status *fedv1a1.PropagatedVersionStatus) pkgruntime.Object // Type-agnostic access / mutation of the Status field of a version resource GetStatus(obj pkgruntime.Object) *fedv1a1.PropagatedVersionStatus SetStatus(obj pkgruntime.Object, status *fedv1a1.PropagatedVersionStatus) // Methods that interact with the API Create(obj pkgruntime.Object) (pkgruntime.Object, error) Get(qualifiedName util.QualifiedName) (pkgruntime.Object, error) List(namespace string) (pkgruntime.Object, error) UpdateStatus(obj pkgruntime.Object) (pkgruntime.Object, error) }
type VersionManager ¶
func NewNamespacedVersionManager ¶
func NewNamespacedVersionManager(client fedclientset.Interface, templateKind, targetKind, namespace string) *VersionManager
func (*VersionManager) Delete ¶
func (m *VersionManager) Delete(qualifiedName util.QualifiedName)
Delete removes the named propagated version from the manager. Versions are written to the API with an owner reference to the template, and they should be removed by the garbage collector on template removal.
func (*VersionManager) Get ¶
func (m *VersionManager) Get(template, override *unstructured.Unstructured) map[string]string
Get retrieves a mapping of cluster names to versions for the given template and override.
func (*VersionManager) HasSynced ¶
func (m *VersionManager) HasSynced() bool
HasSynced indicates whether the manager's in-memory state has been synced with the api.
func (*VersionManager) Sync ¶
func (m *VersionManager) Sync(stopChan <-chan struct{})
Sync retrieves propagated versions from the api and loads it into memory.
func (*VersionManager) Update ¶
func (m *VersionManager) Update(template, override *unstructured.Unstructured, selectedClusters []string, versionMap map[string]string)
Update ensures that the propagated version for the given template and override is recorded.
Click to show internal directories.
Click to hide internal directories.