resources

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 CreateConfigMapsMapper

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

func CreateEndpointsMapper

func CreateEndpointsMapper(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 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 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 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 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