Skip to content

Commit 3957a6a

Browse files
committed
test(kubernetes): pin the two Proxmox CCM values a regression would silently undo
Both values read as preference in a values file and are not. Losing either leaves a tenant cluster that looks healthy — nodes Ready, workloads scheduling, PVCs binding — while CAPI never pairs a Machine with its Node, or a worker replacement deadlocks. Each cost a day to find, and nothing in the tree caught either. The suite is the first under packages/system, so the chart gains a test target; the repo-wide sweep already walks that directory and picks it up. Both assertions were shown to fail before being kept: reverting the provider mode reds the first, restoring the blanket toleration reds the second. Signed-off-by: Marian Koreniuk <[email protected]> Assisted-by: LLM
1 parent ac248de commit 3957a6a

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

‎packages/system/proxmox-ccm/Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ CHART_VERSION=0.2.30
55

66
include ../../../hack/package.mk
77

8+
test:
9+
helm unittest .
10+
811
update:
912
rm -rf charts
1013
mkdir -p charts
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
suite: proxmox-ccm values that a regression would silently undo
2+
# Both assertions here exist because the bug happened, cost a day to find, and
3+
# leaves the tenant cluster looking healthy while it is broken. Neither is
4+
# caught by anything else: the values they pin are two lines in a values file
5+
# that reads like preference and is not.
6+
templates:
7+
- charts/proxmox-cloud-controller-manager/templates/secrets.yaml
8+
- charts/proxmox-cloud-controller-manager/templates/deployment.yaml
9+
release:
10+
name: ccm
11+
namespace: kube-system
12+
tests:
13+
# capmox stamps proxmox://<SMBIOS UUID> on the ProxmoxMachine; this
14+
# controller's default mode writes proxmox://<region>/<vmid>. CAPI pairs
15+
# Machine with Node by matching providerID exactly, so the default leaves
16+
# every Machine at Provisioned with an empty nodeRef while the tenant cluster
17+
# runs perfectly well — which is what made it take a day to notice.
18+
- it: keeps the controller in capmox providerID mode
19+
template: charts/proxmox-cloud-controller-manager/templates/secrets.yaml
20+
set:
21+
proxmox-cloud-controller-manager.config.clusters:
22+
- url: https://pve.example:8006/api2/json
23+
region: test
24+
asserts:
25+
- matchRegex:
26+
path: data["config.yaml"]
27+
pattern: 'provider: capmox'
28+
decodeBase64: true
29+
30+
# A blanket `operator: Exists` reads as "run anywhere" and also matches
31+
# node.kubernetes.io/unreachable:NoExecute with no tolerationSeconds, which
32+
# stops admission adding the bounded 300s one. The Pod then outlives the Node
33+
# it runs on — and the controller that removes a departed Node is this one, so
34+
# a single-worker pool deadlocks on machine replacement until an operator
35+
# deletes the Node by hand.
36+
- it: refuses the blanket toleration that outlives a dead node
37+
template: charts/proxmox-cloud-controller-manager/templates/deployment.yaml
38+
asserts:
39+
- notContains:
40+
path: spec.template.spec.tolerations
41+
content:
42+
operator: Exists
43+
- contains:
44+
path: spec.template.spec.tolerations
45+
content:
46+
key: node.cloudprovider.kubernetes.io/uninitialized
47+
operator: Exists
48+
effect: NoSchedule

0 commit comments

Comments
 (0)