resources

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 28 Imported by: 2

Documentation

Index

Constants

View Source
const ForceSyncedEventNamespace = "default"

Variables

View Source
var (
	ErrNilPhysicalObject = errors.New("events: nil pObject")
	ErrKindNotAccepted   = errors.New("events: kind not accpted")
	ErrNotFound          = errors.New("events: not found")
)
View Source
var AcceptedKinds = map[schema.GroupVersionKind]bool{
	corev1.SchemeGroupVersion.WithKind("Pod"):       true,
	corev1.SchemeGroupVersion.WithKind("Service"):   true,
	corev1.SchemeGroupVersion.WithKind("Endpoint"):  true,
	corev1.SchemeGroupVersion.WithKind("Secret"):    true,
	corev1.SchemeGroupVersion.WithKind("ConfigMap"): true,
}
View Source
var ExtraMappers []BuildMapper

ExtraMappers that will be started as well

View Source
var TranslateAnnotations = map[string]bool{
	"nginx.ingress.kubernetes.io/auth-secret":      true,
	"nginx.ingress.kubernetes.io/auth-tls-secret":  true,
	"nginx.ingress.kubernetes.io/proxy-ssl-secret": true,
}

Functions

func CreateBackendTLSPolicyMapper added in v0.35.0

func CreateBackendTLSPolicyMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateConfigMapsMapper

func CreateConfigMapsMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateDeviceClassesMapper added in v0.32.0

func CreateDeviceClassesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateEndpointSlicesMapper added in v0.30.0

func CreateEndpointSlicesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateEndpointsMapper

func CreateEndpointsMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateGatewayMapper added in v0.35.0

func CreateGatewayMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateHTTPRouteMapper added in v0.35.0

func CreateHTTPRouteMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateIngressesMapper

func CreateIngressesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateNamespacesMapper

func CreateNamespacesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateNetworkPoliciesMapper added in v0.21.2

func CreateNetworkPoliciesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreatePersistentVolumeClaimsMapper

func CreatePersistentVolumeClaimsMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreatePersistentVolumesMapper

func CreatePersistentVolumesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreatePodsMapper

func CreatePodsMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreatePriorityClassesMapper

func CreatePriorityClassesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateReferenceGrantMapper added in v0.35.0

func CreateReferenceGrantMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateResourceClaimTemplatesMapper added in v0.32.0

func CreateResourceClaimTemplatesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateResourceClaimsMapper added in v0.32.0

func CreateResourceClaimsMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateSecretsMapper

func CreateSecretsMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateServiceAccountsMapper

func CreateServiceAccountsMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateServiceMapper

func CreateServiceMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateStorageClassesMapper

func CreateStorageClassesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateTLSRouteMapper added in v0.35.0

func CreateTLSRouteMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateVolumeSnapshotClassesMapper

func CreateVolumeSnapshotClassesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateVolumeSnapshotContentsMapper

func CreateVolumeSnapshotContentsMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func CreateVolumeSnapshotsMapper

func CreateVolumeSnapshotsMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

func EnsureGatewayCRD added in v0.35.0

func EnsureGatewayCRD(ctx *synccontext.RegisterContext) error

EnsureGatewayCRD installs the Gateway CRD in the virtual cluster. Route controllers watch virtual Gateways for cross-namespace authorization even when tenant Gateway sync is disabled, so route mappers ensure the CRD independently of sync.toHost.gatewayApi.gateways.enabled.

func EnsureGatewayClassCRD added in v0.35.0

func EnsureGatewayClassCRD(ctx *synccontext.RegisterContext) error

func EnsureHostGatewayClassCRD added in v0.35.0

func EnsureHostGatewayClassCRD(ctx *synccontext.RegisterContext) error

func EnsureReferenceGrantCRD added in v0.35.0

func EnsureReferenceGrantCRD(ctx *synccontext.RegisterContext) error

func GatewayHostCoveredByMapping added in v0.35.0

func GatewayHostCoveredByMapping(ctx *synccontext.SyncContext, host types.NamespacedName) bool

func GatewayHostExactMapped added in v0.35.0

func GatewayHostExactMapped(ctx *synccontext.SyncContext, host types.NamespacedName) bool

func GatewayHostToVirtual added in v0.35.0

func GatewayHostToVirtual(ctx *synccontext.SyncContext, host types.NamespacedName) (types.NamespacedName, bool)

func GatewayHostWildcardMapped added in v0.35.0

func GatewayHostWildcardMapped(ctx *synccontext.SyncContext, hostNamespace string) bool

func GatewayTenantTargetMapped added in v0.35.0

func GatewayTenantTargetMapped(ctx *synccontext.SyncContext, tenant types.NamespacedName) bool

func GatewayVirtualToHost added in v0.35.0

func GatewayVirtualToHost(ctx *synccontext.SyncContext, virtual types.NamespacedName) (types.NamespacedName, bool)

func GetInvolvedObject

func GetInvolvedObject(ctx *synccontext.SyncContext, pObj client.Object) (metav1.Object, error)

GetInvolvedObject returns the related object from the vCLuster. Alternatively returns a ErrNilPhysicalObject, ErrKindNotAccepted or ErrNotFound.

func HostEventNameToVirtual

func HostEventNameToVirtual(hostName string, hostInvolvedObjectName, virtualInvolvedObjectName string) string

func IgnoreAcceptableErrors

func IgnoreAcceptableErrors(err error) error

func MustRegisterMappings

func MustRegisterMappings(ctx *synccontext.RegisterContext)

func NewImportedGatewayMapper added in v0.35.0

func NewImportedGatewayMapper() synccontext.Mapper

func ParseGatewayNamespacedName added in v0.35.0

func ParseGatewayNamespacedName(value, wildcardName string) (types.NamespacedName, bool)

func RegisterMappings

func RegisterMappings(ctx *synccontext.RegisterContext) error

func TranslateIngressAnnotations

func TranslateIngressAnnotations(ctx *synccontext.SyncContext, annotations map[string]string, ingressNamespace string) (map[string]string, []types.NamespacedName)

Types

type BuildMapper

type BuildMapper func(ctx *synccontext.RegisterContext) (synccontext.Mapper, error)

BuildMapper is a function to build a new mapper

Jump to

Keyboard shortcuts

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