mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 22:13:18 +09:00
fix(kubernetes): make node group resources optional and prefer them over instanceType
A node group is sized either by instanceType or by explicit resources, but the
generated values schema required resources on every node group. A node group
with instanceType and no resources — or an empty resources dropped during
typed-CR to HelmRelease translation — failed schema validation with "missing
property 'resources'" even though sizing was fully specified.
Mark resources optional in the node group definition and regenerate the schema,
API types, README, and ApplicationDefinition. The chart template emits
domain.cpu/memory only when resources is present, so a node group sized purely
by instanceType now passes validation and installs.
When a node group sets both instanceType and explicit resources, explicit
resources take precedence: the instancetype is omitted from the rendered VM and
the per-group instancetype lookup is skipped, so KubeVirt accepts the explicit
domain.cpu/memory with no instancetype to conflict with. instanceType stays
required and defaulted (no schema change), so the console's required
instanceType dropdown keeps working — sending the default instanceType plus
explicit resources simply sizes the VM by resources. This replaces an earlier
render-time hard failure on the both-set case, which was unreachable to clear
from the dashboard (the required dropdown cannot be emptied).
Explicit resources are all-or-nothing alongside an instanceType: a partial spec
(only cpu, or only memory) on a group that carries a non-empty instanceType
would emit one domain override next to the instancetype — which KubeVirt rejects
— so it now fails at render time with a clear error. Partial resources on a
group without an instanceType (used to tune kubelet reservations) are unaffected.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
(cherry picked from commit a349c753ad)
This commit is contained in:
1 parent
a90bf20376
commit
6797e11eb2
7 files changed
+193
-33
No files matched your search
@@ -254,8 +254,8 @@ type NodeGroup struct {
|
||||
// Minimum number of replicas.
|
||||
// +kubebuilder:default:=0
|
||||
MinReplicas int `json:"minReplicas"`
|
||||
// CPU and memory resources for each worker node.
|
||||
Resources Resources `json:"resources"`
|
||||
// Explicit CPU and memory for each worker node, as an alternative to `instanceType` sizing. Optional: when omitted, the node is sized by `instanceType`. When both `cpu` and `memory` are set, they take precedence and `instanceType` is ignored for that node group (the instancetype is omitted from the VM, since KubeVirt cannot override an instancetype's CPU/memory). Set both `cpu` and `memory` together or neither; setting only one is rejected at render time.
|
||||
Resources Resources `json:"resources,omitempty"`
|
||||
// List of node roles.
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
// StorageClass for worker node persistent disks. When empty, uses the management cluster default StorageClass (the one annotated storageclass.kubernetes.io/is-default-class: true).
|
||||
|
||||
@@ -98,29 +98,29 @@ See the reference for components utilized in this service:
|
||||
|
||||
### Application-specific Parameters
|
||||
|
||||
| Name | Description | Type | Value |
|
||||
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----------- |
|
||||
| `nodeGroups` | Worker nodes configuration map. | `map[string]object` | `{...}` |
|
||||
| `nodeGroups[name].minReplicas` | Minimum number of replicas. | `int` | `0` |
|
||||
| `nodeGroups[name].maxReplicas` | Maximum number of replicas. | `int` | `10` |
|
||||
| `nodeGroups[name].instanceType` | Virtual machine instance type. | `string` | `u1.medium` |
|
||||
| `nodeGroups[name].diskSize` | Persistent disk size for kubelet and containerd data. | `quantity` | `20Gi` |
|
||||
| `nodeGroups[name].storageClass` | StorageClass for worker node persistent disks. When empty, uses the management cluster default StorageClass (the one annotated storageclass.kubernetes.io/is-default-class: true). | `string` | `""` |
|
||||
| `nodeGroups[name].roles` | List of node roles. | `[]string` | `[]` |
|
||||
| `nodeGroups[name].resources` | CPU and memory resources for each worker node. | `object` | `{}` |
|
||||
| `nodeGroups[name].resources.cpu` | CPU available. | `quantity` | `""` |
|
||||
| `nodeGroups[name].resources.memory` | Memory (RAM) available. | `quantity` | `""` |
|
||||
| `nodeGroups[name].gpus` | List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM). | `[]object` | `[]` |
|
||||
| `nodeGroups[name].gpus[i].name` | Name of GPU, such as "nvidia.com/AD102GL_L40S". | `string` | `""` |
|
||||
| `nodeGroups[name].kubelet` | Kubelet resource reservations for this node group. | `object` | `{}` |
|
||||
| `nodeGroups[name].kubelet.systemReservedMemory` | Memory reserved for host OS. Auto-computed from instanceType if empty. | `string` | `""` |
|
||||
| `nodeGroups[name].kubelet.kubeReservedMemory` | Memory reserved for kubelet and container runtime. Auto-computed from instanceType if empty. | `string` | `""` |
|
||||
| `nodeGroups[name].kubelet.systemReservedCpu` | CPU reserved for host OS. Auto-computed from instanceType if empty. | `string` | `""` |
|
||||
| `nodeGroups[name].kubelet.kubeReservedCpu` | CPU reserved for kubelet and container runtime. Auto-computed from instanceType if empty. | `string` | `""` |
|
||||
| `nodeGroups[name].kubelet.evictionHardMemory` | Hard eviction threshold for memory (absolute like 200Mi or percentage like 7%). | `string` | `7%` |
|
||||
| `nodeGroups[name].kubelet.evictionSoftMemory` | Soft eviction threshold for memory (absolute like 1Gi or percentage like 10%). | `string` | `10%` |
|
||||
| `version` | Kubernetes major.minor version to deploy | `string` | `v1.35` |
|
||||
| `host` | External hostname for Kubernetes cluster. Defaults to `<cluster-name>.<tenant-host>` if empty. | `string` | `""` |
|
||||
| Name | Description | Type | Value |
|
||||
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----------- |
|
||||
| `nodeGroups` | Worker nodes configuration map. | `map[string]object` | `{...}` |
|
||||
| `nodeGroups[name].minReplicas` | Minimum number of replicas. | `int` | `0` |
|
||||
| `nodeGroups[name].maxReplicas` | Maximum number of replicas. | `int` | `10` |
|
||||
| `nodeGroups[name].instanceType` | Virtual machine instance type. | `string` | `u1.medium` |
|
||||
| `nodeGroups[name].diskSize` | Persistent disk size for kubelet and containerd data. | `quantity` | `20Gi` |
|
||||
| `nodeGroups[name].storageClass` | StorageClass for worker node persistent disks. When empty, uses the management cluster default StorageClass (the one annotated storageclass.kubernetes.io/is-default-class: true). | `string` | `""` |
|
||||
| `nodeGroups[name].roles` | List of node roles. | `[]string` | `[]` |
|
||||
| `nodeGroups[name].resources` | Explicit CPU and memory for each worker node, as an alternative to `instanceType` sizing. Optional: when omitted, the node is sized by `instanceType`. When both `cpu` and `memory` are set, they take precedence and `instanceType` is ignored for that node group (the instancetype is omitted from the VM, since KubeVirt cannot override an instancetype's CPU/memory). Set both `cpu` and `memory` together or neither; setting only one is rejected at render time. | `object` | `{}` |
|
||||
| `nodeGroups[name].resources.cpu` | CPU available. | `quantity` | `""` |
|
||||
| `nodeGroups[name].resources.memory` | Memory (RAM) available. | `quantity` | `""` |
|
||||
| `nodeGroups[name].gpus` | List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM). | `[]object` | `[]` |
|
||||
| `nodeGroups[name].gpus[i].name` | Name of GPU, such as "nvidia.com/AD102GL_L40S". | `string` | `""` |
|
||||
| `nodeGroups[name].kubelet` | Kubelet resource reservations for this node group. | `object` | `{}` |
|
||||
| `nodeGroups[name].kubelet.systemReservedMemory` | Memory reserved for host OS. Auto-computed from instanceType if empty. | `string` | `""` |
|
||||
| `nodeGroups[name].kubelet.kubeReservedMemory` | Memory reserved for kubelet and container runtime. Auto-computed from instanceType if empty. | `string` | `""` |
|
||||
| `nodeGroups[name].kubelet.systemReservedCpu` | CPU reserved for host OS. Auto-computed from instanceType if empty. | `string` | `""` |
|
||||
| `nodeGroups[name].kubelet.kubeReservedCpu` | CPU reserved for kubelet and container runtime. Auto-computed from instanceType if empty. | `string` | `""` |
|
||||
| `nodeGroups[name].kubelet.evictionHardMemory` | Hard eviction threshold for memory (absolute like 200Mi or percentage like 7%). | `string` | `7%` |
|
||||
| `nodeGroups[name].kubelet.evictionSoftMemory` | Soft eviction threshold for memory (absolute like 1Gi or percentage like 10%). | `string` | `10%` |
|
||||
| `version` | Kubernetes major.minor version to deploy | `string` | `v1.35` |
|
||||
| `host` | External hostname for Kubernetes cluster. Defaults to `<cluster-name>.<tenant-host>` if empty. | `string` | `""` |
|
||||
|
||||
|
||||
### Cluster Addons
|
||||
|
||||
@@ -25,10 +25,16 @@ spec:
|
||||
node-role.kubernetes.io/{{ . }}: ""
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .group.instanceType }}
|
||||
{{- /* Explicit resources take precedence over instanceType. When a node
|
||||
group is sized by resources (both cpu and memory set), the
|
||||
instancetype is omitted from the VM: KubeVirt rejects a
|
||||
VirtualMachine that references an instancetype and also overrides
|
||||
either domain.cpu or domain.memory. */}}
|
||||
{{- $sizedByResources := and .group.resources .group.resources.cpu .group.resources.memory }}
|
||||
{{- if and .group.instanceType (not $sizedByResources) }}
|
||||
instancetype:
|
||||
kind: VirtualMachineClusterInstancetype
|
||||
name: {{ . }}
|
||||
name: {{ .group.instanceType }}
|
||||
{{- end }}
|
||||
runStrategy: Always
|
||||
dataVolumeTemplates:
|
||||
@@ -238,9 +244,24 @@ metadata:
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- range $groupName, $group := .Values.nodeGroups }}
|
||||
{{- /* instanceType and explicit resources are alternative sizing sources, and
|
||||
explicit resources win. KubeVirt rejects a VirtualMachine that references
|
||||
an instancetype while also overriding either domain.cpu or domain.memory,
|
||||
so when a group is sized by resources (both cpu and memory set) the
|
||||
instancetype is omitted from the VM (see the VM spec above) and the lookup
|
||||
below is skipped — a stale instancetype name cannot fail an otherwise
|
||||
valid, resource-sized group. Explicit resources are all-or-nothing: a
|
||||
partial spec (only one of cpu/memory) would emit one domain override
|
||||
alongside the instancetype, which KubeVirt rejects, so it fails here with
|
||||
a clear render-time error instead of a late admission rejection. */}}
|
||||
{{- $hasCpu := and $group.resources $group.resources.cpu }}
|
||||
{{- $hasMem := and $group.resources $group.resources.memory }}
|
||||
{{- if and $group.instanceType (or (and $hasCpu (not $hasMem)) (and $hasMem (not $hasCpu))) }}
|
||||
{{- fail (printf "nodeGroup %s: set both resources.cpu and resources.memory, or neither" $groupName) }}
|
||||
{{- end }}
|
||||
{{/* Resolve instanceType once per group — reused for kubelet reservations and capacity annotations. */}}
|
||||
{{- $instanceType := dict }}
|
||||
{{- if $group.instanceType }}
|
||||
{{- if and $group.instanceType (not (and $hasCpu $hasMem)) }}
|
||||
{{- $instanceType = (lookup "instancetype.kubevirt.io/v1beta1" "VirtualMachineClusterInstancetype" "" $group.instanceType) }}
|
||||
{{- if not $instanceType }}
|
||||
{{- fail (printf "nodeGroup %s: specified instanceType %q not found in cluster" $groupName $group.instanceType) }}
|
||||
|
||||
@@ -479,3 +479,143 @@ tests:
|
||||
path: spec.template.spec.virtualMachineTemplate.spec.template.metadata.labels["apps.cozystack.io/application.name"]
|
||||
value: foo
|
||||
documentIndex: 5
|
||||
|
||||
###############################################
|
||||
# resources is optional when instanceType set #
|
||||
###############################################
|
||||
|
||||
# A node group may be sized either by instanceType or by explicit resources.
|
||||
# When instanceType is the sizing source, resources may be omitted entirely.
|
||||
# helm-unittest enforces values.schema.json, so the render below only succeeds
|
||||
# if the schema does NOT require resources on each node group.
|
||||
#
|
||||
# instanceType is set to "" here only to bypass the live-cluster lookup() that
|
||||
# validates a real VirtualMachineClusterInstancetype; the schema acceptance of
|
||||
# an omitted resources key is independent of the instanceType value.
|
||||
#
|
||||
# The "worker" group sorts after "md0". On this release line each node group
|
||||
# renders a KubeadmConfigTemplate before its KubevirtMachineTemplate, so the
|
||||
# per-group document stride is 5 and worker's KubevirtMachineTemplate is
|
||||
# document index 10 (md0 → 5, worker → 10).
|
||||
|
||||
- it: accepts a node group that omits resources and renders no explicit cpu/memory
|
||||
release:
|
||||
name: test-k8s
|
||||
namespace: tenant-test
|
||||
set:
|
||||
nodeGroups:
|
||||
worker:
|
||||
minReplicas: 1
|
||||
maxReplicas: 3
|
||||
instanceType: ""
|
||||
diskSize: "20Gi"
|
||||
roles:
|
||||
- worker
|
||||
asserts:
|
||||
- isKind:
|
||||
of: KubevirtMachineTemplate
|
||||
documentIndex: 10
|
||||
- equal:
|
||||
path: spec.template.spec.virtualMachineTemplate.spec.template.metadata.labels["cluster.x-k8s.io/deployment-name"]
|
||||
value: test-k8s-worker
|
||||
documentIndex: 10
|
||||
- notExists:
|
||||
path: spec.template.spec.virtualMachineTemplate.spec.template.spec.domain.cpu
|
||||
documentIndex: 10
|
||||
- notExists:
|
||||
path: spec.template.spec.virtualMachineTemplate.spec.template.spec.domain.memory
|
||||
documentIndex: 10
|
||||
|
||||
# Complementary case: when explicit resources ARE provided (md0 in common.yaml
|
||||
# has cpu: 2 / memory: 4Gi), they take effect on the VM domain. Confirms the fix
|
||||
# only relaxes the schema requirement and does not drop honoured resources.
|
||||
- it: still renders explicit cpu and memory when resources are provided
|
||||
release:
|
||||
name: test-k8s
|
||||
namespace: tenant-test
|
||||
asserts:
|
||||
- isKind:
|
||||
of: KubevirtMachineTemplate
|
||||
documentIndex: 5
|
||||
- equal:
|
||||
path: spec.template.spec.virtualMachineTemplate.spec.template.spec.domain.cpu.cores
|
||||
value: 2
|
||||
documentIndex: 5
|
||||
- equal:
|
||||
path: spec.template.spec.virtualMachineTemplate.spec.template.spec.domain.memory.guest
|
||||
value: 4Gi
|
||||
documentIndex: 5
|
||||
|
||||
# instanceType and explicit resources are alternative sizing sources, and
|
||||
# explicit resources take precedence. When both are set the VM is sized by the
|
||||
# explicit resources and the instancetype is omitted, so KubeVirt does not
|
||||
# reject a VM that both references an instancetype and overrides domain.cpu/memory.
|
||||
# (md0 in common.yaml already carries cpu: 2 / memory: 4Gi; this only adds an
|
||||
# instanceType on top to exercise the both-set case.)
|
||||
- it: prefers explicit resources over instanceType when both are set
|
||||
release:
|
||||
name: test-k8s
|
||||
namespace: tenant-test
|
||||
set:
|
||||
nodeGroups.md0.instanceType: "u1.medium"
|
||||
asserts:
|
||||
- isKind:
|
||||
of: KubevirtMachineTemplate
|
||||
documentIndex: 5
|
||||
- equal:
|
||||
path: spec.template.spec.virtualMachineTemplate.spec.template.spec.domain.cpu.cores
|
||||
value: 2
|
||||
documentIndex: 5
|
||||
- equal:
|
||||
path: spec.template.spec.virtualMachineTemplate.spec.template.spec.domain.memory.guest
|
||||
value: 4Gi
|
||||
documentIndex: 5
|
||||
- notExists:
|
||||
path: spec.template.spec.virtualMachineTemplate.spec.instancetype
|
||||
documentIndex: 5
|
||||
|
||||
# Explicit resources are all-or-nothing when an instanceType is present. A
|
||||
# partial spec (only cpu, or only memory) on a group that also carries a
|
||||
# non-empty instanceType would emit one domain override alongside the
|
||||
# instancetype, which KubeVirt rejects. Fail fast with a clear render-time
|
||||
# error instead of shipping a VM the admission webhook rejects at apply time.
|
||||
# (Fresh group names are used so the partial spec is real — a `set` on md0
|
||||
# would deep-merge with common.yaml's md0, which already carries both cpu and
|
||||
# memory.)
|
||||
- it: fails when only resources.cpu is set without resources.memory
|
||||
release:
|
||||
name: test-k8s
|
||||
namespace: tenant-test
|
||||
set:
|
||||
nodeGroups:
|
||||
mdcpuonly:
|
||||
minReplicas: 0
|
||||
maxReplicas: 10
|
||||
instanceType: "u1.medium"
|
||||
diskSize: 20Gi
|
||||
roles:
|
||||
- worker
|
||||
resources:
|
||||
cpu: 2
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: "nodeGroup mdcpuonly: set both resources.cpu and resources.memory, or neither"
|
||||
|
||||
- it: fails when only resources.memory is set without resources.cpu
|
||||
release:
|
||||
name: test-k8s
|
||||
namespace: tenant-test
|
||||
set:
|
||||
nodeGroups:
|
||||
mdmemonly:
|
||||
minReplicas: 0
|
||||
maxReplicas: 10
|
||||
instanceType: "u1.medium"
|
||||
diskSize: 20Gi
|
||||
roles:
|
||||
- worker
|
||||
resources:
|
||||
memory: 4Gi
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: "nodeGroup mdmemonly: set both resources.cpu and resources.memory, or neither"
|
||||
@@ -31,8 +31,7 @@
|
||||
"diskSize",
|
||||
"instanceType",
|
||||
"maxReplicas",
|
||||
"minReplicas",
|
||||
"resources"
|
||||
"minReplicas"
|
||||
],
|
||||
"properties": {
|
||||
"diskSize": {
|
||||
@@ -113,7 +112,7 @@
|
||||
"default": 0
|
||||
},
|
||||
"resources": {
|
||||
"description": "CPU and memory resources for each worker node.",
|
||||
"description": "Explicit CPU and memory for each worker node, as an alternative to `instanceType` sizing. Optional: when omitted, the node is sized by `instanceType`. When both `cpu` and `memory` are set, they take precedence and `instanceType` is ignored for that node group (the instancetype is omitted from the VM, since KubeVirt cannot override an instancetype's CPU/memory). Set both `cpu` and `memory` together or neither; setting only one is rejected at render time.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cpu": {
|
||||
|
||||
@@ -80,7 +80,7 @@ storageClass: replicated
|
||||
## @field {quantity} diskSize="20Gi" - Persistent disk size for kubelet and containerd data.
|
||||
## @field {string} [storageClass] - StorageClass for worker node persistent disks. When empty, uses the management cluster default StorageClass (the one annotated storageclass.kubernetes.io/is-default-class: true).
|
||||
## @field {[]string} roles - List of node roles.
|
||||
## @field {Resources} resources - CPU and memory resources for each worker node.
|
||||
## @field {Resources} [resources] - Explicit CPU and memory for each worker node, as an alternative to `instanceType` sizing. Optional: when omitted, the node is sized by `instanceType`. When both `cpu` and `memory` are set, they take precedence and `instanceType` is ignored for that node group (the instancetype is omitted from the VM, since KubeVirt cannot override an instancetype's CPU/memory). Set both `cpu` and `memory` together or neither; setting only one is rejected at render time.
|
||||
## @field {[]GPU} gpus - List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM).
|
||||
## @field {Kubelet} [kubelet] - Kubelet resource reservations for this node group.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ spec:
|
||||
singular: kubernetes
|
||||
plural: kuberneteses
|
||||
openAPISchema: |-
|
||||
{"title":"Chart Values","type":"object","properties":{"storageClass":{"description":"StorageClass used to store the data.","type":"string","default":"replicated"},"nodeGroups":{"description":"Worker nodes configuration map.","type":"object","default":{"md0":{"diskSize":"20Gi","gpus":[],"instanceType":"u1.medium","kubelet":{},"maxReplicas":10,"minReplicas":0,"resources":{},"roles":["ingress-nginx"],"storageClass":""}},"additionalProperties":{"type":"object","required":["diskSize","instanceType","maxReplicas","minReplicas","resources"],"properties":{"diskSize":{"description":"Persistent disk size for kubelet and containerd data.","default":"20Gi","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true},"gpus":{"description":"List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM).","type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"description":"Name of GPU, such as \"nvidia.com/AD102GL_L40S\".","type":"string"}}}},"instanceType":{"description":"Virtual machine instance type.","type":"string","default":"u1.medium"},"kubelet":{"description":"Kubelet resource reservations for this node group.","type":"object","properties":{"evictionHardMemory":{"description":"Hard eviction threshold for memory (absolute like 200Mi or percentage like 7%).","type":"string","default":"7%"},"evictionSoftMemory":{"description":"Soft eviction threshold for memory (absolute like 1Gi or percentage like 10%).","type":"string","default":"10%"},"kubeReservedCpu":{"description":"CPU reserved for kubelet and container runtime. Auto-computed from instanceType if empty.","type":"string"},"kubeReservedMemory":{"description":"Memory reserved for kubelet and container runtime. Auto-computed from instanceType if empty.","type":"string"},"systemReservedCpu":{"description":"CPU reserved for host OS. Auto-computed from instanceType if empty.","type":"string"},"systemReservedMemory":{"description":"Memory reserved for host OS. Auto-computed from instanceType if empty.","type":"string"}}},"maxReplicas":{"description":"Maximum number of replicas.","type":"integer","default":10},"minReplicas":{"description":"Minimum number of replicas.","type":"integer","default":0},"resources":{"description":"CPU and memory resources for each worker node.","type":"object","properties":{"cpu":{"description":"CPU available.","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true},"memory":{"description":"Memory (RAM) available.","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true}}},"roles":{"description":"List of node roles.","type":"array","items":{"type":"string"}},"storageClass":{"description":"StorageClass for worker node persistent disks. When empty, uses the management cluster default StorageClass (the one annotated storageclass.kubernetes.io/is-default-class: true).","type":"string"}}}},"version":{"description":"Kubernetes major.minor version to deploy","type":"string","default":"v1.35","enum":["v1.35","v1.34","v1.33","v1.32","v1.31","v1.30"]},"host":{"description":"External hostname for Kubernetes cluster. Defaults to `<cluster-name>.<tenant-host>` if empty.","type":"string","default":""},"addons":{"description":"Cluster addons configuration.","type":"object","default":{},"required":["certManager","cilium","coredns","fluxcd","gatewayAPI","gpuOperator","hami","ingressNginx","monitoringAgents","ouroboros","velero","verticalPodAutoscaler"],"properties":{"certManager":{"description":"Cert-manager addon.","type":"object","default":{},"required":["enabled","valuesOverride"],"properties":{"enabled":{"description":"Enable cert-manager.","type":"boolean","default":false},"valuesOverride":{"description":"Custom Helm values overrides.","type":"object","default":{},"x-kubernetes-preserve-unknown-fields":true}}},"cilium":{"description":"Cilium CNI plugin.","type":"object","default":{},"required":["valuesOverride"],"properties":{"valuesOverride":{"description":"Custom Helm values overrides.","type":"object","default":{},"x-kubernetes-preserve-unknown-fields":true}}},"coredns":{"description":"CoreDNS addon.","type":"object","default":{},"required":["valuesOverride"],"properties":{"valuesOverride":{"description":"Custom Helm values overrides.","type":"object","default":{},"x-kubernetes-preserve-unknown-fields":true}}},"fluxcd":{"description":"FluxCD GitOps operator.","type":"object","default":{},"required":["enabled","valuesOverride"],"properties":{"enabled":{"description":"Enable FluxCD.","type":"boolean","default":false},"valuesOverride":{"description":"CustomLine truncated
|
||||
{"title":"Chart Values","type":"object","properties":{"storageClass":{"description":"StorageClass used to store the data.","type":"string","default":"replicated"},"nodeGroups":{"description":"Worker nodes configuration map.","type":"object","default":{"md0":{"diskSize":"20Gi","gpus":[],"instanceType":"u1.medium","kubelet":{},"maxReplicas":10,"minReplicas":0,"resources":{},"roles":["ingress-nginx"],"storageClass":""}},"additionalProperties":{"type":"object","required":["diskSize","instanceType","maxReplicas","minReplicas"],"properties":{"diskSize":{"description":"Persistent disk size for kubelet and containerd data.","default":"20Gi","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true},"gpus":{"description":"List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM).","type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"description":"Name of GPU, such as \"nvidia.com/AD102GL_L40S\".","type":"string"}}}},"instanceType":{"description":"Virtual machine instance type.","type":"string","default":"u1.medium"},"kubelet":{"description":"Kubelet resource reservations for this node group.","type":"object","properties":{"evictionHardMemory":{"description":"Hard eviction threshold for memory (absolute like 200Mi or percentage like 7%).","type":"string","default":"7%"},"evictionSoftMemory":{"description":"Soft eviction threshold for memory (absolute like 1Gi or percentage like 10%).","type":"string","default":"10%"},"kubeReservedCpu":{"description":"CPU reserved for kubelet and container runtime. Auto-computed from instanceType if empty.","type":"string"},"kubeReservedMemory":{"description":"Memory reserved for kubelet and container runtime. Auto-computed from instanceType if empty.","type":"string"},"systemReservedCpu":{"description":"CPU reserved for host OS. Auto-computed from instanceType if empty.","type":"string"},"systemReservedMemory":{"description":"Memory reserved for host OS. Auto-computed from instanceType if empty.","type":"string"}}},"maxReplicas":{"description":"Maximum number of replicas.","type":"integer","default":10},"minReplicas":{"description":"Minimum number of replicas.","type":"integer","default":0},"resources":{"description":"Explicit CPU and memory for each worker node, as an alternative to `instanceType` sizing. Optional: when omitted, the node is sized by `instanceType`. When both `cpu` and `memory` are set, they take precedence and `instanceType` is ignored for that node group (the instancetype is omitted from the VM, since KubeVirt cannot override an instancetype's CPU/memory). Set both `cpu` and `memory` together or neither; setting only one is rejected at render time.","type":"object","properties":{"cpu":{"description":"CPU available.","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true},"memory":{"description":"Memory (RAM) available.","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true}}},"roles":{"description":"List of node roles.","type":"array","items":{"type":"string"}},"storageClass":{"description":"StorageClass for worker node persistent disks. When empty, uses the management cluster default StorageClass (the one annotated storageclass.kubernetes.io/is-default-class: true).","type":"string"}}}},"version":{"description":"Kubernetes major.minor version to deploy","type":"string","default":"v1.35","enum":["v1.35","v1.34","v1.33","v1.32","v1.31","v1.30"]},"host":{"description":"External hostname for Kubernetes cluster. Defaults to `<cluster-name>.<tenant-host>` if empty.","type":"string","default":""},"addons":{"description":"Cluster addons configuration.","type":"object","default":{},"required":["certManager","cilium","coredns","fluxcd","gatewayAPI","gpuOperator","hami","ingressNginx","monitoringAgents","ouroboros","velero","verticalPodAutoscaler"],"properties":{"certManager":{"description":"Cert-manager addon.","type":"object","default":{},"required":["enabled","valuesOverride"],"properties":{"enabled":{"description":"Enable cert-manager.","type":"boolean","default":false},"valuesOverride":{"description":"Custom Helm values overrides.","type":"object","default":{},"x-kubernetes-preserve-unknown-fields":true}}},"cilium":{"description":"Cilium CNI plugin.","type":"object","default":{},"required":["valuesOverride"],"properties":{"valuesOverride":{"description":"Custom Helm values overrides.","type":"object","default":{},"x-kubernetes-preserve-unknown-fields":true}}},"coredns":{"description":"CoreDNS addon.","type":"object","default":{},"required":["valuesOverride"],"prLine truncated
|
||||
release:
|
||||
prefix: kubernetes-
|
||||
labels:
|
||||
|
||||
Reference in new issue
Block a user