Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vsphere nodeip-configuration.service: run node-ip binary from container #1829

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 0 additions & 109 deletions templates/common/vsphere/files/nodeip-finder.yaml

This file was deleted.

239 changes: 0 additions & 239 deletions templates/common/vsphere/files/vsphere-non-virtual-ip.yaml

This file was deleted.

11 changes: 9 additions & 2 deletions templates/common/vsphere/units/nodeip-configuration.service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ contents: |
[Service]
# Need oneshot to delay kubelet
Type=oneshot
ExecStart=/usr/local/bin/nodeip-finder --retry-on-failure {{.Infra.Status.PlatformStatus.VSphere.APIServerInternalIP }}
ExecStart=/usr/bin/podman run --rm \
--authfile /var/lib/kubelet/config.json \
--net=host \
--volume /etc/systemd/system:/etc/systemd/system:z \
{{ .Images.baremetalRuntimeCfgImage }} \
node-ip \
set --retry-on-failure \
{{.Infra.Status.PlatformStatus.VSphere.APIServerInternalIP }}
ExecStart=/bin/systemctl daemon-reload

[Install]
WantedBy=multi-user.target
Expand All @@ -27,4 +35,3 @@ contents: |
{{ end -}}
{{ end -}}
{{ end -}}

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ contents:
# Ensure resolv.conf exists before we try to run podman
cp /var/run/NetworkManager/resolv.conf /etc/resolv.conf

NAMESERVER_IP=$(/usr/local/bin/non_virtual_ip \
NAMESERVER_IP=$(/usr/bin/podman run --rm \
--authfile /var/lib/kubelet/config.json \
--net=host \
{{ .Images.baremetalRuntimeCfgImage }} \
node-ip \
show \
"{{.Infra.Status.PlatformStatus.VSphere.APIServerInternalIP}}" \
"{{.Infra.Status.PlatformStatus.VSphere.IngressIP}}")
DOMAIN="{{.EtcdDiscoveryDomain}}"
Expand Down
Loading