generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
What would you like to be added?
Add scheduling fields (affinity, tolerations, nodeSelector) to the PodTemplate spec, as discussed in #175.
In #175, the decision was to start with PodTemplate.Metadata (labels/annotations) and expand later:
"Noting that later, we can add a new field
SpecunderPodTemplate, and allow the user to override items from the Pod Spec." — @ivanvc
I'd like to request adding at minimum:
affinity(for pod anti-affinity — spreading etcd members across nodes)tolerationsnodeSelector
Why is this needed?
For production etcd clusters, pod anti-affinity is essential to ensure etcd members run on different nodes. Without it, a single node failure can take down multiple etcd members and break quorum.
Example desired configuration:
apiVersion: operator.etcd.io/v1alpha1
kind: EtcdCluster
metadata:
name: etcd
namespace: ingress-apisix
spec:
size: 3
version: "v3.5.23"
podTemplate:
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- etcd
topologyKey: kubernetes.io/hostname
nodeSelector:
node-role: infra
storageSpec:
storageClassName: hcloud-volumes
volumeSizeRequest: 10Giresources would also be a valuable addition, but scheduling fields are the most critical for production reliability.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels