gvk

package
v0.0.0-...-ec8378c Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNamespacedGVRsForCluster

func GetNamespacedGVRsForCluster(cluster *migapi.MigCluster, c client.Client) (dynamic.Interface, []schema.GroupVersionResource, error)

GetNamespacedGVRsForCluster collects all namespace-scoped GVRs for the provided cluster compatible client

func MergeGVRMaps

func MergeGVRMaps(map1, map2 map[string][]schema.GroupVersionResource) map[string][]schema.GroupVersionResource

Merge the namespace/gvr mappings from the built-in and CRD validation results

func NewCohabitatingResources

func NewCohabitatingResources() map[string]*CohabitatingResource

func SortResources

func SortResources(resources []*metav1.APIResourceList)

SortResources sources resources by moving extensions to the end of the slice. The order of all the other resources is preserved.

Types

type CohabitatingResource

type CohabitatingResource struct {
	Seen bool
	// contains filtered or unexported fields
}

func NewCohabitatingResource

func NewCohabitatingResource(resource, group1, group2 string) *CohabitatingResource

type Compare

type Compare struct {
	Plan                  *migapi.MigPlan
	SrcDiscovery          discovery.DiscoveryInterface
	DstDiscovery          discovery.DiscoveryInterface
	SrcClient             dynamic.Interface
	DstClient             dynamic.Interface
	CohabitatingResources map[string]*CohabitatingResource
}

Compare is a store for discovery and dynamic clients to do GVK compare

func (*Compare) Compare

func (r *Compare) Compare() (map[string][]schema.GroupVersionResource, error)

Compare GVKs on both clusters, find incompatible GVKs and check each plan source namespace for existence of incompatible GVKs

func (*Compare) CompareCRDs

func (r *Compare) CompareCRDs() (map[string][]schema.GroupVersionResource, error)

Compare CRDs on both clusters, find incompatible ones and check each plan source namespace for existence of incompatible CRDs. CRDs will be incompatible if the apiextensions CRD APIs (i.e. v1beta1 from 3.11 vs. v1 from 4.9) are incompatible and there are CRs for the CRD in the source cluster and the CRD does not exist in the destination cluster.

Jump to

Keyboard shortcuts

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