Symptom
Basics fails to install when all three packages that create the monitoring namespace are disabled and root monitoring is left at its default. With monitoring.rootEnabled: true, putting cozystack.metrics-server, cozystack.monitoring-agents and cozystack.monitoring into bundles.disabledPackages makes cozystack-basics fail with namespaces "cozy-monitoring" not found. Every package that depends on basics then never installs.
Mechanism
Basics writes into a namespace it does not own. When _cluster.monitoring-enabled is true, monitoring-external-services.yaml renders three ExternalName Services into cozy-monitoring: vlinsert-generic, vminsert-shortterm and vminsert-longterm. The operator creates that namespace only while reconciling a Package with a component installed there, and only the three packages above have one. With all three disabled, the namespace never exists.
No dependency covers this. Basics has no dependsOn on any of the three packages, so the closure check proposed in #3389 would not catch it either.
E2E ran into it first. For narrow suite selections like vminstance or the Kubernetes suites, hack/select-install.sh --disabled drops all three packages. The E2E install now sets rootEnabled: false to match the root tenant, but a user's own disabledPackages list can still reach the same state.
Possible fixes
The simplest one is for basics to skip the redirects when none of the three packages is emitted. The platform chart knows the emitted set and could fold it into _cluster.monitoring-enabled.
The other option is to fail the platform render when monitoring.rootEnabled is true and all three packages are disabled. The error would then show up at render time and name the cause.
A lookup on the namespace won't work. Basics only re-renders on install, upgrade or a values change, so the result goes stale, and the template comment already says so.
Symptom
Basics fails to install when all three packages that create the monitoring namespace are disabled and root monitoring is left at its default. With
monitoring.rootEnabled: true, puttingcozystack.metrics-server,cozystack.monitoring-agentsandcozystack.monitoringintobundles.disabledPackagesmakescozystack-basicsfail withnamespaces "cozy-monitoring" not found. Every package that depends on basics then never installs.Mechanism
Basics writes into a namespace it does not own. When
_cluster.monitoring-enabledis true,monitoring-external-services.yamlrenders three ExternalName Services intocozy-monitoring:vlinsert-generic,vminsert-shorttermandvminsert-longterm. The operator creates that namespace only while reconciling a Package with a component installed there, and only the three packages above have one. With all three disabled, the namespace never exists.No dependency covers this. Basics has no
dependsOnon any of the three packages, so the closure check proposed in #3389 would not catch it either.E2E ran into it first. For narrow suite selections like
vminstanceor the Kubernetes suites,hack/select-install.sh --disableddrops all three packages. The E2E install now setsrootEnabled: falseto match the root tenant, but a user's owndisabledPackageslist can still reach the same state.Possible fixes
The simplest one is for basics to skip the redirects when none of the three packages is emitted. The platform chart knows the emitted set and could fold it into
_cluster.monitoring-enabled.The other option is to fail the platform render when
monitoring.rootEnabledis true and all three packages are disabled. The error would then show up at render time and name the cause.A
lookupon the namespace won't work. Basics only re-renders on install, upgrade or a values change, so the result goes stale, and the template comment already says so.