Closed geerlingguy closed 4 years ago
Here's an anti affinity config from the kube-prometheus project: https://github.com/coreos/kube-prometheus/blob/master/jsonnet/kube-prometheus/kube-prometheus-anti-affinity.libsonnet
The withAffinity
function doesn't exist for the DaemonSet object in the API. I've built the jsonnet docs on https://ksonnetlib-docs-1-15.netlify.app/apps/v1/daemonset/. It's a little confusing and you need to get hang of it to understand.
Other than that, I'v pushed a commit to this PR with the alleged "correct" config. Can you test this out (I don't have a RPI cluster right now)?
Can you check if you gave permission to maintainer to add commits to this PR?
This works perfectly!
Ended up with the configuration block:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm
- arm64
Which works correctly.
@carlosedp - I've updated the branch, rebased on master. This is good to go!
Thanks!
Closes #39.
Note that this currently results in the following error when running
make
:I am not an expert at jsonnet, but I'm guessing there needs to be a new util added to
utils.libsonnet
?Ultimately, it needs to add the following
spec.affinity
inarmexporter-daemonset.yaml
: