Compare commits

...
Author SHA1 Message Date
kasun 9b15ea5d33 enhancement(ci): deploy proxmox-infra on merge to main
Deploy Proxmox Infra / Pulumi Deploy (pull_request) Skipped
Deploy k8s Infra / Pulumi Deploy (pull_request) Skipped
Deploy k8s Apps / Pulumi Deploy (pull_request) Skipped
Deploy Monitoring / Pulumi Deploy (pull_request) Skipped
Deploy Proxmox Infra / Pulumi Preview (pull_request) Successful in 1m1s
Deploy k8s Infra / Pulumi Preview (pull_request) Successful in 54s
Deploy k8s Apps / Pulumi Preview (pull_request) Successful in 34s
Deploy Monitoring / Pulumi Preview (pull_request) Successful in 43s
Skip the refresh on automatic deploys. A refresh that finds a VM missing
drops it from state, and the following up would create a blank replacement.
2026-11-22 18:42:30 +01:00
kasun 344f748b84 enhancement(proxmox-infra): protect resources and stop update reboots
Prepare the stack for deploying on merge. Protect templates, DHCP mappings
and the Ansible container, and stop in-place updates from rebooting k3s VMs.
2026-11-22 18:42:30 +01:00
2 changed files with 16 additions and 5 deletions

No files matched your search

+11 -1
View File
@@ -3,6 +3,13 @@ name: Deploy Proxmox Infra
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "01-proxmox-infra/**"
- ".gitea/workflows/01-deploy-proxmox-infra.yaml"
pull_request:
branches:
- main
@@ -51,7 +58,7 @@ jobs:
deploy:
name: Pulumi Deploy
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout Code
uses: actions/checkout@v4
@@ -75,7 +82,10 @@ jobs:
run: pulumi package add terraform-provider marshallford/pfsense 0.22.0
working-directory: 01-proxmox-infra
# Manual runs only: a refresh that finds a VM missing drops it from state,
# and `up` would then create a blank replacement without review.
- name: Refresh State
if: github.event_name == 'workflow_dispatch'
run: |
pulumi login "$PULUMI_BACKEND_URL"
pulumi refresh --yes --stack dev \
+5 -4
View File
@@ -141,7 +141,7 @@ const pveNodes = pveNodeSeeds
},
],
},
{ provider: n.provider, ignoreChanges: ["disks"] },
{ provider: n.provider, protect: true, ignoreChanges: ["disks"] },
),
}));
@@ -291,7 +291,7 @@ const k3sVms = nodeConfigs.map(
agent: { enabled: true, timeout: "30s" },
cdrom: { fileId: "none" },
started: false,
stopOnDestroy: true,
rebootAfterUpdate: false,
},
{
provider: node.host.provider,
@@ -322,7 +322,7 @@ k3sVms.forEach((vmResource, i) => {
ipAddress: nodeConfigs[i].ip,
hostname: nodeConfigs[i].name,
},
{ dependsOn: vmResource, provider: pfSenseProvider },
{ dependsOn: vmResource, provider: pfSenseProvider, protect: true },
);
});
@@ -357,7 +357,7 @@ const ansibleDhcp = new pfsense.Dhcpv4Staticmapping(
ipAddress: ansibleIp,
hostname: "ansible",
},
{ provider: pfSenseProvider },
{ provider: pfSenseProvider, protect: true },
);
new proxmox.ContainerLegacy( // NOSONAR typescript:S1848
@@ -396,6 +396,7 @@ new proxmox.ContainerLegacy( // NOSONAR typescript:S1848
provider: ansibleHost.provider,
dependsOn: ansibleDhcp,
retainOnDelete: true,
protect: true,
},
);