Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1e409780d | ||
|
|
5a2d32ea84 | ||
|
|
e3fab0e151 | ||
|
|
a1867b18c8 | ||
|
|
71b0f3ce7d | ||
|
|
d0600b9153 |
No files matched your search
@@ -292,7 +292,15 @@ const k3sVms = nodeConfigs.map(
|
||||
{
|
||||
provider: node.host.provider,
|
||||
retainOnDelete: true,
|
||||
ignoreChanges: ["clone", "started"],
|
||||
protect: true,
|
||||
ignoreChanges: [
|
||||
"clone",
|
||||
"started",
|
||||
// Pulumi bridge bug: unset disk speed always shows a diff.
|
||||
// https://github.com/muhlba91/pulumi-proxmoxve/issues/664
|
||||
"disks[0].speed",
|
||||
...(node.longhornDiskSize == null ? [] : ["disks[1].speed"]),
|
||||
],
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
@@ -3,6 +3,20 @@ import * as command from "@pulumi/command";
|
||||
|
||||
const config = new pulumi.Config();
|
||||
|
||||
// Bootstrap commands run once, on a fresh install. Without this, a changed VM
|
||||
// ID or command would re-run the k3s installer on the live cluster. After
|
||||
// recreating a VM, re-run its commands explicitly with --target-replace.
|
||||
pulumi.runtime.registerResourceTransform((args) =>
|
||||
args.type.startsWith("command:")
|
||||
? {
|
||||
props: args.props,
|
||||
opts: pulumi.mergeOptions(args.opts, {
|
||||
ignoreChanges: ["create", "triggers"],
|
||||
}),
|
||||
}
|
||||
: undefined,
|
||||
);
|
||||
|
||||
const infraRef = new pulumi.StackReference(
|
||||
`${pulumi.getOrganization()}/proxmox-infra/dev`,
|
||||
);
|
||||
@@ -77,7 +91,7 @@ const startMaster1 = new command.local.Command("start-master-1", {
|
||||
interpreter: ["/bin/bash", "-c"],
|
||||
});
|
||||
const startMaster2 = new command.local.Command("start-master-2", {
|
||||
create: pulumi.interpolate`curl -sf -k -X POST -H "Authorization: PVEAPIToken=${pve1ApiToken}" "${pve1Endpoint}/api2/json/nodes/pve/qemu/${master2VmId}/status/start" 2>/dev/null || true`,
|
||||
create: pulumi.interpolate`curl -sf -k -X POST -H "Authorization: PVEAPIToken=${pve3ApiToken}" "${pve3Endpoint}/api2/json/nodes/pve/qemu/${master2VmId}/status/start" 2>/dev/null || true`,
|
||||
triggers: [master2VmId],
|
||||
interpreter: ["/bin/bash", "-c"],
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user