feat: detect namespace kubevpn installed by helm (#498)

This commit is contained in:
naison
2025-03-30 11:54:40 +08:00
committed by GitHub
parent d191c927f4
commit 116a1f1983
15 changed files with 77 additions and 48 deletions

View File

@@ -60,13 +60,6 @@ iptables -t nat -A POSTROUTING ! -p icmp ! -s 127.0.0.1 ! -d ${CIDR4} -j MASQUER
ip6tables -t nat -A POSTROUTING ! -p icmp ! -s 0:0:0:0:0:0:0:1 ! -d ${CIDR6} -j MASQUERADE
kubevpn serve -L "tun:/localhost:8422?net=${TunIPv4}&route=${CIDR4}" -F "tcp://${TrafficManagerService}:10800"`,
},
EnvFrom: []v1.EnvFromSource{{
SecretRef: &v1.SecretEnvSource{
LocalObjectReference: v1.LocalObjectReference{
Name: config.ConfigMapPodTrafficManager,
},
},
}},
Env: []v1.EnvVar{
{
Name: "CIDR4",

View File

@@ -24,13 +24,6 @@ func AddContainer(spec *corev1.PodSpec, c util.PodRouteConfig) {
spec.Containers = append(spec.Containers, corev1.Container{
Name: config.ContainerSidecarVPN,
Image: config.Image,
EnvFrom: []corev1.EnvFromSource{{
SecretRef: &corev1.SecretEnvSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: config.ConfigMapPodTrafficManager,
},
},
}},
Env: []corev1.EnvVar{
{
Name: "LocalTunIPv4",