matchers

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

This code re-implements private matcher for CAPI inline patch selector. See: https://github.com/kubernetes-sigs/cluster-api/blob/46412f0a4ea65d8f02478d2ad09ce12925485f56/api/v1beta1/clusterclass_types.go#L509-L523 See: https://github.com/kubernetes-sigs/cluster-api/blob/46412f0a4ea65d8f02478d2ad09ce12925485f56/internal/controllers/topology/cluster/patches/inline/json_patch_generator.go#L125

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchesControlPlane

func MatchesControlPlane(holderRef *runtimehooksv1.HolderReference) bool

MatchesControlPlane checks if the request is for a ControlPlane or the InfrastructureMachineTemplate of a ControlPlane.

func MatchesGVK

func MatchesGVK(apiVersion, kind string, obj runtime.Object) bool

MatchesGVK checks if the apiVersion and kind are matching.

func MatchesInfrastructure

func MatchesInfrastructure(holderRef *runtimehooksv1.HolderReference) bool

MatchesInfrastructure checks if the request is for an InfrastructureCluster. Cluster.spec.infrastructureRef holds the InfrastructureCluster.

func MatchesMachineDeploymentClass

func MatchesMachineDeploymentClass(
	holderRef *runtimehooksv1.HolderReference,
	names []string,
	templateVariables map[string]apiextensionsv1.JSON,
) bool

MatchesMachineDeploymentClass checks if the request is for a BootstrapConfigTemplate or an InfrastructureMachineTemplate of one of the configured MachineDeploymentClasses.

func MatchesSelector

func MatchesSelector(
	selector clusterv1.PatchSelector,
	obj runtime.Object,
	holderRef *runtimehooksv1.HolderReference,
	templateVariables map[string]apiextensionsv1.JSON,
) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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