diff --git a/packages/core/platform/templates/bundles/system.yaml b/packages/core/platform/templates/bundles/system.yaml index be7b3c8f8..2686cac79 100644 --- a/packages/core/platform/templates/bundles/system.yaml +++ b/packages/core/platform/templates/bundles/system.yaml @@ -289,7 +289,13 @@ the tenant kinds have no CRDs at all. The CNI package ships only the LOCAL group's CRDs (local.sdn.cozystack.io — underlay IPAM, which must work before cert-manager, etcd and this server, all of which are pods). */ -}} -{{include "cozystack.platform.package.default" (list "cozystack.cozyplane-apiserver" $) }} +{{- /* local, not the chart's replicated default: a 3-member etcd already + replicates at the application level, and the local class exists before + any replication pool is configured. The EtcdCluster's storageClassName + is immutable post-create, so the default has to be right on the first + render. */ -}} +{{- $cozyplaneApiserverComponents := dict "cozyplane-apiserver" (dict "values" (dict "etcd" (dict "operator" (dict "storageClass" "local")))) -}} +{{include "cozystack.platform.package" (list "cozystack.cozyplane-apiserver" "default" $ $cozyplaneApiserverComponents) }} {{- end }} {{- /* The ClusterIssuers of cert-manager-issuers and the per-tenant Issuers rendered for TenantGateway both use an http01.gatewayHTTPRoute solver diff --git a/packages/core/platform/tests/bundles_networking_variant_test.yaml b/packages/core/platform/tests/bundles_networking_variant_test.yaml index ff44a568d..16f5ef273 100644 --- a/packages/core/platform/tests/bundles_networking_variant_test.yaml +++ b/packages/core/platform/tests/bundles_networking_variant_test.yaml @@ -254,6 +254,24 @@ tests: path: spec.components.cozyplane.values.egress.clusterDNS value: "fd00:10:96::a" + # storageClassName is immutable on the EtcdCluster, so the platform must set + # the right class on the first render; local, because a 3-member etcd already + # replicates at the application level and local exists before any pool setup. + - it: pins the apiserver etcd to the local storage class + set: + bundles: + system: + enabled: true + variant: isp-full + networkingVariant: cozyplane + asserts: + - documentSelector: + path: metadata.name + value: cozystack.cozyplane-apiserver + equal: + path: spec.components.cozyplane-apiserver.values.etcd.operator.storageClass + value: local + # The ciliumPool derivation requires a /20-or-shorter podCIDR — a kube-ovn # constraint: the last /21 is carved out for Cilium. cozyplane runs no # kube-ovn, so a small pod CIDR must render there.