Skip to content

Commit af2c4a1

Browse files
authored
use TemplateSelector for matching the machine template
use TemplateSelector for matching the machine template
2 parents e2f2d6d + db1c99d commit af2c4a1

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

charts/capi-kamaji-proxmox/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ A Helm chart for deploying a Kamaji Tenant Cluster on Proxmox VE using Cluster A
7373
| nodePools[0].replicas | int | `1` | Number of worker VMs instances |
7474
| nodePools[0].sourceNode | string | `"pve"` | Proxmox VE node that hosts the VM template to be used to provision VMs |
7575
| nodePools[0].storage | string | `"local"` | Proxmox VE storage name for full clone |
76-
| nodePools[0].templateId | int | `100` | Proxmox VE template ID to clone |
76+
| nodePools[0].templateId | int | `100` | Proxmox VE template ID to clone (alternatively, use TemplateSelector) |
77+
| nodePools[0].templateSelector | object | `{"matchTags":["ubuntu-nobe-kube-1.31.4"]}` | Proxmox VE template selector (alternatively, use templateId) |
78+
| nodePools[0].templateSelector.matchTags | list | `["ubuntu-nobe-kube-1.31.4"]` | Proxmox VE template match tags |
7779
| nodePools[0].users | list | `[{"name":"clastix","sshAuthorizedKeys":[],"sudo":"ALL=(ALL) NOPASSWD:ALL"}]` | users to create on machines |
7880
| proxmox.secret | object | `{"name":"proxmox-secret","namespace":""}` | Proxmox VE credentials |
7981
| proxmox.secret.name | string | `"proxmox-secret"` | The name of an existing credentials secret for Proxmox VE. |

charts/capi-kamaji-proxmox/templates/_proxmox-machine-template.tpl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,16 @@ memoryMiB: {{ .nodePool.memoryMiB }}
2828
numCores: {{ .nodePool.numCores }}
2929
numSockets: {{ .nodePool.numSockets }}
3030
sourceNode: {{ .nodePool.sourceNode }}
31-
templateID: {{ .nodePool.templateId }}
3231
pool: {{ .nodePool.pool }}
32+
{{- if .nodePool.templateId }}
33+
templateID: {{ .nodePool.templateId }}
34+
{{- else }}
35+
templateSelector:
36+
matchTags:
37+
{{- range .nodePool.templateSelector.matchTags }}
38+
- {{ . }}
39+
{{- end }}
40+
{{- end -}}
3341
{{- end -}}
3442

3543
{{/*

charts/capi-kamaji-proxmox/values.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ nodePools:
110110
- labs
111111
# -- Proxmox VE resource pool to use
112112
pool: ""
113-
# -- Proxmox VE template ID to clone
113+
# -- Proxmox VE template ID to clone (alternatively, use TemplateSelector)
114114
templateId: 100
115-
# # -- Proxmox VE template selector
116-
# TemplateSelector:
117-
# # -- Proxmox VE template match tags
118-
# matchTags:
119-
# - "ubuntu-nobe-kube-1.31.4"
115+
# -- Proxmox VE template selector (alternatively, use templateId)
116+
templateSelector:
117+
# -- Proxmox VE template match tags
118+
matchTags:
119+
- "ubuntu-nobe-kube-1.31.4"
120120
# -- Proxmox VE default network for VMs
121121
network:
122122
# -- Proxmox VE network bridge to use

0 commit comments

Comments
 (0)