Skip to content

Commit

Permalink
Revert "packages/nixos: add IMDS setup script"
Browse files Browse the repository at this point in the history
This reverts commit 5f0f680.
  • Loading branch information
burgerdev committed Dec 11, 2024
1 parent 27e38a9 commit 066c727
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
19 changes: 0 additions & 19 deletions packages/by-name/cloud-api-adaptor/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
writeShellApplication,
gnugrep,
iptables,
iproute2,
sysctl,
gawk,
runCommand,
applyPatches,
makeWrapper,
Expand Down Expand Up @@ -106,22 +103,6 @@ buildGoModule rec {
"SC2153"
];
};

setup-nat-for-imds = writeShellApplication {
name = "setup-nat-for-imds";
runtimeInputs = [
iproute2
iptables
sysctl
gawk
];
# TODO(burgerdev): generalize for all link-local IPs and investigate routing simplification
text = builtins.readFile "${cloud-api-adaptor.src}/src/cloud-api-adaptor/podvm/files/usr/local/bin/setup-nat-for-imds.sh";
meta = {
mainProgram = "setup-nat-for-imds";
homepage = "https://github.com/confidential-containers/cloud-api-adaptor/blob/main/src/cloud-api-adaptor/podvm/files/usr/local/bin/setup-nat-for-imds.sh";
};
};
};

meta = {
Expand Down
20 changes: 0 additions & 20 deletions packages/nixos/azure.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,5 @@ in
ExecStart = "${lib.getExe pkgs.azure-no-agent}";
};
};

systemd.services.setup-nat-for-imds = {
wantedBy = [ "multi-user.target" ];
requires = [ "[email protected]" ];
wants = [ "network-online.target" ];
after = [
"network-online.target"
"[email protected]"
];
description = "Setup NAT for IMDS";
serviceConfig = {
Type = "oneshot";
RemainAfterExit = "yes";
# TODO(msanft): Find out why just ordering this after network-online.target
# isn't sufficient. (Errors with saying that the network is unreachable)
Restart = "on-failure";
RestartSec = "5s";
ExecStart = "${lib.getExe pkgs.cloud-api-adaptor.setup-nat-for-imds}";
};
};
};
}

0 comments on commit 066c727

Please sign in to comment.