nsmap

package
v0.20.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

README

nsmap

Name

nsmap - performs rewriting of Kubernetes namespace in DNS name.

Description

Rewrite DNS names from <service>.<logical-namespace>.svc.<zone> to <service>.<physical-namespace>.svc.<zone>

Syntax

nsmap  

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigMapName is the name of the configmap containing logical to physical namespace mappings.
	ConfigMapName = "config-nsmap"
)

Functions

func StartWatcher

func StartWatcher(ctx context.Context, callback OnUpdateFn) error

StartWatcher starts watching for nsmap ConfigMap updates and notifies the given callback when an update occurs. This is a non-blocking function.

Types

type LogicalToPhysicalNamespaceMapper

type LogicalToPhysicalNamespaceMapper struct {
	Next plugin.Handler
	// contains filtered or unexported fields
}

LogicalToPhysicalNamespaceMapper is a CoreDNS plugin to map logical namespaces to physical namespaces.

func (LogicalToPhysicalNamespaceMapper) Name

Name implements the Handler interface.

func (LogicalToPhysicalNamespaceMapper) ServeDNS

ServeDNS implements the plugin.Handler interface.

type OnUpdateFn

type OnUpdateFn func(ctx context.Context, configMap *corev1.ConfigMap)

OnUpdateFn is the function signature for receiving ConfigMap updates.

Jump to

Keyboard shortcuts

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