The pre-install Job approach (added in c0b76b16, b46151a4) hits a fatal
chicken-and-egg on Talos clusters that enforce PodSecurity baseline:latest
on bare namespaces:
pods "cozy-system-labeler-..." is forbidden:
violates PodSecurity "baseline:latest": host namespaces (hostNetwork=true)
The labeler needs hostNetwork=true (no CNI yet) which requires the namespace
to be PSA-privileged, but the labeler's whole job is to add that label.
Cannot work from inside the namespace it's labeling.
Drop the labeler Job + ServiceAccount + ClusterRole + ClusterRoleBinding.
The chart now only removes the chart-defined Namespace and assumes the
caller pre-creates cozy-system with the right labels — same pattern as
kube-prometheus-stack, argo-cd, cert-manager, and other mainstream charts.
Install procedure becomes two-step:
kubectl apply -f - <<EOF
apiVersion: v1
kind: Namespace
metadata:
name: cozy-system
labels:
cozystack.io/system: "true"
cozystack.io/deletion-protected: "true"
pod-security.kubernetes.io/enforce: privileged
EOF
helm upgrade installer packages/core/installer \
--install --namespace cozy-system ...
The cozystack-operator pod (hostNetwork=true) is then admitted because the
namespace already has enforce=privileged.
Verified end-to-end on a kind cluster — clean install in 0.1s, no hooks
involved, no PSA conflict, no retry needed.
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>