-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#17239 from wallyworld/k8s-pod-affinity-fix
juju#17239 When creating the podspec for a k8s charm, if the node affinity value is empty, Juju was rendering an empty struct which was causing the pods not be be scheduled. ## QA steps See bug. bootstrap k8s `juju deploy snappass-test --constraints="tags=anti-pod.app.kubernetes.io/name=prom,anti-pod.topology-key=kubernetes.io/hostname"` Inspect the podspec: ``` spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - prom topologyKey: kubernetes.io/hostname ``` ## Links <!-- Link to all relevant specification, documentation, bug, issue or JIRA card. --> https://bugs.launchpad.net/bugs/2062934 **Jira card:** [JUJU-5906](https://warthogs.atlassian.net/browse/JUJU-5906) [JUJU-5906]: https://warthogs.atlassian.net/browse/JUJU-5906?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
- Loading branch information
Showing
2 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters