Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7548402542 | ||
|
|
9e0ce35712 | ||
|
|
c1e409780d | ||
|
|
5a2d32ea84 | ||
|
|
e3fab0e151 | ||
|
|
a1867b18c8 | ||
|
|
71b0f3ce7d | ||
|
|
d0600b9153 |
No files matched your search
@@ -33,6 +33,7 @@ const worker3Ip = config.requireSecret("worker3Ip");
|
|||||||
|
|
||||||
const templateSettings = {
|
const templateSettings = {
|
||||||
template: true,
|
template: true,
|
||||||
|
protection: true,
|
||||||
started: false,
|
started: false,
|
||||||
stopOnDestroy: true,
|
stopOnDestroy: true,
|
||||||
scsiHardware: "virtio-scsi-pci",
|
scsiHardware: "virtio-scsi-pci",
|
||||||
@@ -292,7 +293,15 @@ const k3sVms = nodeConfigs.map(
|
|||||||
{
|
{
|
||||||
provider: node.host.provider,
|
provider: node.host.provider,
|
||||||
retainOnDelete: true,
|
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();
|
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(
|
const infraRef = new pulumi.StackReference(
|
||||||
`${pulumi.getOrganization()}/proxmox-infra/dev`,
|
`${pulumi.getOrganization()}/proxmox-infra/dev`,
|
||||||
);
|
);
|
||||||
@@ -77,7 +91,7 @@ const startMaster1 = new command.local.Command("start-master-1", {
|
|||||||
interpreter: ["/bin/bash", "-c"],
|
interpreter: ["/bin/bash", "-c"],
|
||||||
});
|
});
|
||||||
const startMaster2 = new command.local.Command("start-master-2", {
|
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],
|
triggers: [master2VmId],
|
||||||
interpreter: ["/bin/bash", "-c"],
|
interpreter: ["/bin/bash", "-c"],
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user