mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 05:25:14 +09:00
## What this PR does Replace DaemonSet-based deployment of cozystack-api with a regular Deployment using Service `trafficDistribution: PreferClose`. Previously, cozystack-api ran as a DaemonSet on control-plane nodes with `internalTrafficPolicy: Local` and direct host kube-apiserver access, providing strict node-local routing with no fallback. The new approach prefers routing to the nearest pod but gracefully falls back to remote pods when the local one is unavailable. Key changes: - Always deploy as Deployment instead of conditional DaemonSet/Deployment - Use `trafficDistribution: PreferClose` on the Service (matching seaweedfs pattern) - Remove `KUBERNETES_SERVICE_HOST`/`KUBERNETES_SERVICE_PORT` override - Replace hard `nodeSelector` with soft node affinity for control-plane nodes - Simplify the migration hook to always clean up leftover DaemonSet ### Release note ```release-note [platform] Switch cozystack-api from DaemonSet to Deployment with trafficDistribution: PreferClose for improved resilience ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Breaking Changes** * Removed localK8sAPIEndpoint configuration option; existing deployments relying on this setting require reconfiguration. * **Infrastructure Updates** * Simplified deployment resource strategy and updated service traffic distribution behavior to fixed configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->