Skip to content

Commit

Permalink
Merge pull request #1829 from vrutkovs/vsphere-nodeipfinder-podman
Browse files Browse the repository at this point in the history
vsphere nodeip-configuration.service: run node-ip binary from container
  • Loading branch information
openshift-merge-robot committed Jun 18, 2020
2 parents 5f887bb + 74c7e36 commit da05f8b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 490 deletions.
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

0 comments on commit da05f8b

Please sign in to comment.