conversion

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package conversion provides implementation for CRD conversion webhook that implements handler for version conversion requests for types that are convertible.

See pkg/conversion for interface definitions required to ensure an API Type is convertible.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFrom

func ConvertFrom(src, dst runtime.Object) error

ConvertFrom (v1beta1) -> (v1alpha1)

func ConvertTo

func ConvertTo(src, dst runtime.Object) error

ConvertTo (v1alpha1) -> (v1beta1)

func Convert_AWSEndpointService_v1alpha1_to_v1beta1

func Convert_AWSEndpointService_v1alpha1_to_v1beta1(src *hyperv1alpha1.AWSEndpointService, dst *hyperv1beta1.AWSEndpointService) error

func Convert_AWSEndpointService_v1beta1_to_v1alpha1

func Convert_AWSEndpointService_v1beta1_to_v1alpha1(src *hyperv1beta1.AWSEndpointService, dst *hyperv1alpha1.AWSEndpointService) error

func Convert_HostedCluster_v1alpha1_to_v1beta1

func Convert_HostedCluster_v1alpha1_to_v1beta1(src *hyperv1alpha1.HostedCluster, dst *hyperv1beta1.HostedCluster) error

HostedCluster conversion

func Convert_HostedCluster_v1beta1_to_v1alpha1

func Convert_HostedCluster_v1beta1_to_v1alpha1(src *hyperv1beta1.HostedCluster, dst *hyperv1alpha1.HostedCluster) error

func Convert_HostedControlPlane_v1alpha1_to_v1beta1

func Convert_HostedControlPlane_v1alpha1_to_v1beta1(src *hyperv1alpha1.HostedControlPlane, dst *hyperv1beta1.HostedControlPlane) error

func Convert_HostedControlPlane_v1beta1_to_v1alpha1

func Convert_HostedControlPlane_v1beta1_to_v1alpha1(src *hyperv1beta1.HostedControlPlane, dst *hyperv1alpha1.HostedControlPlane) error

func Convert_NodePool_v1alpha1_to_v1beta1

func Convert_NodePool_v1alpha1_to_v1beta1(src *hyperv1alpha1.NodePool, dst *hyperv1beta1.NodePool) error

func Convert_NodePool_v1beta1_to_v1alpha1

func Convert_NodePool_v1beta1_to_v1alpha1(src *hyperv1beta1.NodePool, dst *hyperv1alpha1.NodePool) error

func FuzzTestFunc

func FuzzTestFunc(input FuzzTestFuncInput) func(*testing.T)

FuzzTestFunc returns a new testing function to be used in tests to make sure conversions between the Hub version of an object and an older version aren't lossy.

func GetFuzzer

func GetFuzzer(scheme *runtime.Scheme, funcs ...fuzzer.FuzzerFuncs) *fuzz.Fuzzer

GetFuzzer returns a new fuzzer to be used for testing.

func NewWebhookHandler

func NewWebhookHandler(scheme *runtime.Scheme) http.Handler

func ParseGlobalConfig

func ParseGlobalConfig(cfg *hyperv1alpha1.ClusterConfiguration) (globalConfig, error)

Types

type FuzzTestFuncInput

type FuzzTestFuncInput struct {
	Scheme *runtime.Scheme

	Hub              runtime.Object
	HubAfterMutation func(runtime.Object)

	Spoke                      runtime.Object
	SpokeAfterMutation         func(runtime.Object)
	SkipSpokeAnnotationCleanup bool

	FuzzerFuncs []fuzzer.FuzzerFuncs
}

FuzzTestFuncInput contains input parameters for the FuzzTestFunc function.

Jump to

Keyboard shortcuts

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