Documentation ¶
Index ¶
- Constants
- Variables
- func TranslateContainerEnv(envVar []corev1.EnvVar, envFrom []corev1.EnvFromSource, vPod *corev1.Pod, ...) ([]corev1.EnvVar, []corev1.EnvFromSource)
- func TranslateServicesToEnvironmentVariables(enableServiceLinks *bool, services []*corev1.Service, kubeIP string) map[string]string
- type ImageTranslator
- type Translator
Constants ¶
View Source
const ( DisableSubdomainRewriteAnnotation = "vcluster.loft.sh/disable-subdomain-rewrite" HostsRewrittenAnnotation = "vcluster.loft.sh/hosts-rewritten" HostsVolumeName = "vcluster-rewrite-hosts" HostsRewriteImage = "library/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" NamespaceLabelPrefix = "vcluster.loft.sh/ns-label" UIDAnnotation = "vcluster.loft.sh/uid" ClusterAutoScalerAnnotation = "cluster-autoscaler.kubernetes.io/safe-to-evict" ClusterAutoScalerDaemonSetAnnotation = "cluster-autoscaler.kubernetes.io/daemonset-pod" 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 ¶
func TranslateContainerEnv ¶ added in v0.11.0
Types ¶
type ImageTranslator ¶
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 *synccontext.RegisterContext, eventRecorder record.EventRecorder) (Translator, error)
Click to show internal directories.
Click to hide internal directories.