fix etcd topologySpreadConstraints (#1331)

<!-- Thank you for making a contribution! Here are some tips for you:
- Start the PR title with the [label] of Cozystack component:
- For system components: [platform], [system], [linstor], [cilium],
[kube-ovn], [dashboard], [cluster-api], etc.
- For managed apps: [apps], [tenant], [kubernetes], [postgres],
[virtual-machine] etc.
- For development and maintenance: [tests], [ci], [docs], [maintenance].
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Add the label `backport` if it's a bugfix that needs to be backported
to a previous version.
-->

## What this PR does


### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same [label] as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
- fix etcd topologySpreadConstraints
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* New Features
* Added optional cluster-level configuration to override topology spread
constraints for etcd pods, enabling custom scheduling rules. Defaults
remain unchanged when not configured.

* Chores
  * Bumped etcd chart version to 2.9.1 for release tracking.
* Updated versions mapping to include 2.9.1 and pinned the previous
2.9.0 entry to a specific commit for reproducibility.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
klinch0
2025-08-11 12:21:08 +03:00
committed by GitHub
3 changed files with 12 additions and 2 deletions

View File

@@ -3,4 +3,4 @@ name: etcd
description: Storage for Kubernetes clusters
icon: /logos/etcd.svg
type: application
version: 2.9.0
version: 2.9.1

View File

@@ -49,6 +49,14 @@ spec:
{{- with .Values.resources }}
resources: {{- include "cozy-lib.resources.sanitize" (list . $) | nindent 10 }}
{{- end }}
{{- $configMap := lookup "v1" "ConfigMap" "cozy-system" "cozystack-scheduling" }}
{{- $rawConstraints := "" }}
{{- if $configMap }}
{{- $rawConstraints = get $configMap.data "globalAppTopologySpreadConstraints" }}
{{- end }}
{{- if $rawConstraints }}
{{- $rawConstraints | fromYaml | toYaml | nindent 6 }}
{{- else }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
@@ -56,6 +64,7 @@ spec:
labelSelector:
matchLabels:
app.kubernetes.io/instance: etcd
{{- end }}
podDisruptionBudgetTemplate: {}
---
apiVersion: cert-manager.io/v1

View File

@@ -13,7 +13,8 @@ etcd 2.6.0 8c460528
etcd 2.6.1 45a7416c
etcd 2.7.0 632224a3
etcd 2.8.0 4369b031
etcd 2.9.0 HEAD
etcd 2.9.0 8ddbe32e
etcd 2.9.1 HEAD
info 1.0.0 93bdf411
info 1.0.1 632224a3
info 1.1.0 HEAD