specialservices

package
v0.21.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultKubeDNSServiceName      = "kube-dns"
	DefaultKubeDNSServiceNamespace = "kube-system"
)
View Source
const (
	DefaultKubernetesSVCName      = "kubernetes"
	DefaultKubernetesSVCNamespace = "default"
)

Variables

View Source
var (
	DefaultKubernetesSvcKey = types.NamespacedName{
		Name:      DefaultKubernetesSVCName,
		Namespace: DefaultKubernetesSVCNamespace,
	}
)

Functions

func SyncKubernetesService

func SyncKubernetesService(
	ctx *synccontext.SyncContext,
	svcNamespace,
	svcName string,
	vSvcToSync types.NamespacedName,
	svcPortTranslator ServicePortTranslator,
) error

Types

type Interface

type Interface interface {
	SpecialServicesToSync() map[types.NamespacedName]SpecialServiceSyncer
	DNSNamespace(ctx *synccontext.SyncContext) (client.Client, string)
}
var Default Interface

func NewDefaultServiceSyncer added in v0.19.3

func NewDefaultServiceSyncer() Interface

type NameserverFinder

type NameserverFinder struct {
	SpecialServices map[types.NamespacedName]SpecialServiceSyncer
}

func (*NameserverFinder) DNSNamespace added in v0.16.0

func (f *NameserverFinder) DNSNamespace(ctx *synccontext.SyncContext) (client.Client, string)

func (*NameserverFinder) SpecialServicesToSync

func (f *NameserverFinder) SpecialServicesToSync() map[types.NamespacedName]SpecialServiceSyncer

type ServicePortTranslator

type ServicePortTranslator func(ports []corev1.ServicePort) []corev1.ServicePort

type SpecialServiceSyncer

type SpecialServiceSyncer func(
	ctx *synccontext.SyncContext,
	svcNamespace,
	svcName string,
	vSvcToSync types.NamespacedName,
	servicePortTranslator ServicePortTranslator,
) error

Jump to

Keyboard shortcuts

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