translate

package
v0.4.5-beta.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DisableSubdomainRewriteAnnotation = "vcluster.loft.sh/disable-subdomain-rewrite"
	HostsRewrittenAnnotation          = "vcluster.loft.sh/hosts-rewritten"
	HostsVolumeName                   = "vcluster-rewrite-hosts"
	HostsRewriteImage                 = "alpine:3.13.1"
	HostsRewriteContainerName         = "vcluster-rewrite-hosts"
)
View Source
const (
	OwnerSetKind                  = "vcluster.loft.sh/owner-set-kind"
	NamespaceAnnotation           = "vcluster.loft.sh/namespace"
	NameAnnotation                = "vcluster.loft.sh/name"
	LabelsAnnotation              = "vcluster.loft.sh/labels"
	UIDAnnotation                 = "vcluster.loft.sh/uid"
	ClusterAutoScalerAnnotation   = "cluster-autoscaler.kubernetes.io/safe-to-evict"
	ServiceAccountNameAnnotation  = "vcluster.loft.sh/service-account-name"
	ServiceAccountTokenAnnotation = "vcluster.loft.sh/token-"
)

Variables

View Source
var (
	FieldPathLabelRegEx      = regexp.MustCompile("^metadata\\.labels\\['(.+)'\\]$")
	FieldPathAnnotationRegEx = regexp.MustCompile("^metadata\\.annotations\\['(.+)'\\]$")

	False = false
)

Functions

This section is empty.

Types

type ImageTranslator

type ImageTranslator interface {
	Translate(image string) string
}

func NewImageTranslator

func NewImageTranslator(translateImages []string) (ImageTranslator, error)

type Translator

type Translator interface {
	Translate(vPod *corev1.Pod, services []*corev1.Service, dnsIP string, kubeIP string) (*corev1.Pod, error)
	Diff(vPod, pPod *corev1.Pod) (*corev1.Pod, error)
}

func NewTranslator

func NewTranslator(ctx *context2.ControllerContext) (Translator, error)

Jump to

Keyboard shortcuts

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