Comment 8 for bug 1993716

Revision history for this message
Ian Booth (wallyworld) wrote : Re: placement directives for k8s cloud not working

Ah, I just noticed you are looking at the operator statefuleset. This is not where the node/pod affinity is applied to. podspec charms deploy 2 stateful sets:

1. for the operator itself (the charm)
2. for the workload

The workload stateful set is created when the charm sets the podspec; this is where the affinity selectors are applied. There's no affinity rules that are applied to the operator pod.

With the transition to sidecar charms, the charm container and workload container all run in the same pod, so the affinity rules are applied to that single pod, that why the sidecar example I tried worked.

We're not doing any more work on podspec charms so will not be adding affinity support to the podspec charm operator pod.