mirror of
https://github.com/siderolabs/talos.git
synced 2026-05-04 20:06:18 +02:00
feat: provide POD_IP env var to scheduler and controller-manager
Fixes #9031 Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
parent
407347a7a0
commit
fd6ddd11ef
@ -646,7 +646,18 @@ func (ctrl *ControlPlaneStaticPodController) manageControllerManager(ctx context
|
||||
Name: k8s.ControllerManagerID,
|
||||
Image: cfg.Image,
|
||||
Command: args,
|
||||
Env: env,
|
||||
Env: append(
|
||||
[]v1.EnvVar{
|
||||
{
|
||||
Name: "POD_IP",
|
||||
ValueFrom: &v1.EnvVarSource{
|
||||
FieldRef: &v1.ObjectFieldSelector{
|
||||
FieldPath: "status.podIP",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
env...),
|
||||
VolumeMounts: append([]v1.VolumeMount{
|
||||
{
|
||||
Name: "secrets",
|
||||
@ -785,7 +796,18 @@ func (ctrl *ControlPlaneStaticPodController) manageScheduler(ctx context.Context
|
||||
Name: k8s.SchedulerID,
|
||||
Image: cfg.Image,
|
||||
Command: args,
|
||||
Env: env,
|
||||
Env: append(
|
||||
[]v1.EnvVar{
|
||||
{
|
||||
Name: "POD_IP",
|
||||
ValueFrom: &v1.EnvVarSource{
|
||||
FieldRef: &v1.ObjectFieldSelector{
|
||||
FieldPath: "status.podIP",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
env...),
|
||||
VolumeMounts: append([]v1.VolumeMount{
|
||||
{
|
||||
Name: "secrets",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user