Documentation ¶
Index ¶
- Constants
- Variables
- func ContainerEnv(envVar []corev1.EnvVar, envFrom []corev1.EnvFromSource, vPod *corev1.Pod, ...) ([]corev1.EnvVar, []corev1.EnvFromSource)
- func GetSecretIfExists(ctx context.Context, pClient client.Client, vPodName, vNamespace string) (*corev1.Secret, error)
- func LabelsAnnotation(obj client.Object) string
- func SATokenSecret(ctx context.Context, pClient client.Client, vPod *corev1.Pod, ...) error
- func SecretNameFromPodName(podName, namespace string) string
- func ServicesToEnvironmentVariables(enableServiceLinks *bool, services []*corev1.Service, kubeIP string) map[string]string
- func SetPodAsOwner(ctx context.Context, pPod *corev1.Pod, pClient client.Client, ...) error
- type ImageTranslator
- type Translator
Constants ¶
View Source
const ( VirtualPathTemplate = "/tmp/vcluster/%s/%s" PodLoggingHostPath = "/var/log/pods" LogHostPath = "/var/log" KubeletPodPath = "/var/lib/kubelet/pods" PhysicalVolumeNameSuffix = "vcluster-physical" PhysicalLogVolumeMountPath = "/var/vcluster/physical/log" PhysicalPodLogVolumeMountPath = "/var/vcluster/physical/log/pods" PhysicalKubeletVolumeMountPath = "/var/vcluster/physical/kubelet/pods" )
View Source
const ( DisableSubdomainRewriteAnnotation = "vcluster.loft.sh/disable-subdomain-rewrite" HostsRewrittenAnnotation = "vcluster.loft.sh/hosts-rewritten" HostsVolumeName = "vcluster-rewrite-hosts" HostsRewriteContainerName = "vcluster-rewrite-hosts" )
View Source
const ( OwnerReferences = "vcluster.loft.sh/owner-references" OwnerSetKind = "vcluster.loft.sh/owner-set-kind" NamespaceAnnotation = "vcluster.loft.sh/namespace" NameAnnotation = "vcluster.loft.sh/name" VClusterLabelsAnnotation = "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-" )
View Source
const (
PodKind string = "Pod"
)
Variables ¶
View Source
var ( FieldPathLabelRegEx = regexp.MustCompile(`^metadata\.labels\['(.+)'\]$`) FieldPathAnnotationRegEx = regexp.MustCompile(`^metadata\.annotations\['(.+)'\]$`) False = false )
View Source
var PodServiceAccountTokenSecretName string
Functions ¶
func ContainerEnv ¶ added in v0.16.0
func GetSecretIfExists ¶ added in v0.15.1
func LabelsAnnotation ¶
func SATokenSecret ¶ added in v0.15.1
func SecretNameFromPodName ¶ added in v0.15.1
func ServicesToEnvironmentVariables ¶ added in v0.16.0
Types ¶
type ImageTranslator ¶
func NewImageTranslator ¶
func NewImageTranslator(translateImages []string) (ImageTranslator, error)
type Translator ¶
type Translator interface { Translate(ctx context.Context, vPod *corev1.Pod, services []*corev1.Service, dnsIP string, kubeIP string) (*corev1.Pod, error) Diff(ctx context.Context, 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.