This commit is contained in:
parent
5667510ae3
commit
1a040c92a1
2 changed files with 54 additions and 19 deletions
|
@ -111,23 +111,6 @@ data "helm_template" "proxmox-csi" {
|
|||
token_secret: "${split("=", proxmox_virtual_environment_user_token.csi.value)[1]}"
|
||||
region: "${var.proxmox.name}"
|
||||
|
||||
storageClass:
|
||||
- name: proxmox-local-nvme
|
||||
storage: local-nvme
|
||||
reclaimPolicy: Delete
|
||||
fstype: ext4
|
||||
cache: none
|
||||
- name: proxmox-local
|
||||
storage: local
|
||||
reclaimPolicy: Delete
|
||||
fstype: ext4
|
||||
cache: none
|
||||
- name: proxmox-local-nvme-lvm
|
||||
storage: local-nvme-lvm
|
||||
reclaimPolicy: Delete
|
||||
fstype: ext4
|
||||
cache: none
|
||||
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/control-plane: ""
|
||||
node.cloudprovider.kubernetes.io/platform: nocloud
|
||||
|
@ -145,6 +128,27 @@ data "helm_template" "proxmox-csi" {
|
|||
]
|
||||
}
|
||||
|
||||
data "helm_template" "hybrid-csi" {
|
||||
provider = helm.template
|
||||
|
||||
name = "hybrid-csi-plugin"
|
||||
chart = "hybrid-csi-plugin"
|
||||
repository = "oci://ghcr.io/sergelogvinov/charts"
|
||||
version = "0.1.5"
|
||||
namespace = "kube-system"
|
||||
|
||||
kube_version = var.talos.kubernetes
|
||||
|
||||
values = [<<-EOF
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/control-plane: ""
|
||||
tolerations:
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
effect: NoSchedule
|
||||
EOF
|
||||
]
|
||||
}
|
||||
|
||||
data "helm_template" "proxmox-ccm" {
|
||||
provider = helm.template
|
||||
name = "proxmox-cloud-controller-manager"
|
||||
|
|
|
@ -54,6 +54,10 @@ locals {
|
|||
name = "promxmox-csi-plugin"
|
||||
contents = data.helm_template.proxmox-csi.manifest
|
||||
},
|
||||
{
|
||||
name = "hubrid-csi-plugin"
|
||||
contents = data.helm_template.hybrid-csi.manifest
|
||||
},
|
||||
{
|
||||
name = "gateway-api-crds"
|
||||
contents = file("${path.module}/manifests/gateway-api.crds.yaml")
|
||||
|
@ -162,8 +166,35 @@ locals {
|
|||
peerConfigRef:
|
||||
name: "default"
|
||||
EOF
|
||||
}
|
||||
]
|
||||
}],
|
||||
[for name, attributes in var.hosts : {
|
||||
name = "proxmox-cni-storage-class-${name}"
|
||||
contents = <<-EOF
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: ${name}
|
||||
annotations:
|
||||
k8s.tjo.cloud/host: ${name}
|
||||
k8s.tjo.cloud/proxmox: ${var.proxmox.name}
|
||||
parameters:
|
||||
storage: ${attributes.storage}
|
||||
csi.storage.k8s.io/fstype: ext4
|
||||
cache: none
|
||||
provisioner: csi.proxmox.sinextra.dev
|
||||
allowVolumeExpansion: true
|
||||
reclaimPolicy: Delete
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
allowedTopologies:
|
||||
- matchLabelExpressions:
|
||||
- key: topology.kubernetes.io/region
|
||||
values:
|
||||
- ${var.proxmox.name}
|
||||
- key: topology.kubernetes.io/zone
|
||||
values:
|
||||
- ${name}
|
||||
EOF
|
||||
}],
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue