You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add tolerations customization interface for service operators
Adds ability for service operators to customize pod tolerations similar
to how resource limits/requests are currently handled.
Features:
- Add Tolerations field to ContainerSpec API type
- Implement merge behavior: custom tolerations are merged with defaults,
overriding by key when same key exists
- Set global default tolerations (node.kubernetes.io/not-ready and
node.kubernetes.io/unreachable with 120s timeout) in controller
- Update deployment templates (managers.yaml, operator.yaml) to render
custom tolerations from Deployment struct
- Add test coverage for merge logic and override behavior
Example usage:
```yaml
operatorOverrides:
- name: "keystone"
controllerManager:
tolerations:
- key: "node.kubernetes.io/not-ready" # Override default timeout
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 600
- key: "node.example.com/gpu" # Add new toleration
operator: "Equal"
value: "nvidia"
effect: "NoSchedule"
```
The merge behavior ensures operators get both default tolerations
(unless overridden by matching key) plus any additional custom ones,
providing flexibility while maintaining safe defaults.
Jira: OSPRH-18693
Assisted-by: claude-4-sonnet
Signed-off-by: Martin Schuppert <[email protected]>
sed -i bindata/operator/operator.yaml -e "s|kube-rbac-proxy:replace_me.*|'{{ .OpenStackOperator.Deployment.KubeRbacProxy.Image }}'|"
159
+
sed -i bindata/operator/operator.yaml -e "/customTolerations/c\\ tolerations:\n{{- range .OpenStackOperator.Deployment.Tolerations }}\n - key: \"{{ .Key }}\"\n{{- if .Operator }}\n operator: \"{{ .Operator }}\"\n{{- end }}\n{{- if .Value }}\n value: \"{{ .Value }}\"\n{{- end }}\n{{- if .Effect }}\n effect: \"{{ .Effect }}\"\n{{- end }}\n{{- if .TolerationSeconds }}\n tolerationSeconds: {{ .TolerationSeconds }}\n{{- end }}\n{{- end }}"
0 commit comments