0

I have a percona mysql cluster deployed in my kubernetes cluster and can't figure it out how to use "pxc.affinity.advanced" parameter to add tolerations. In the values.yaml file it looks like this:

affinity:
    antiAffinityTopologyKey: "kubernetes.io/hostname"
    # advanced:
    #   nodeAffinity:
    #     requiredDuringSchedulingIgnoredDuringExecution:
    #       nodeSelectorTerms:
    #       - matchExpressions:
    #         - key: kubernetes.io/e2e-az-name
    #           operator: In
    #           values:
    #           - e2e-az1
    #           - e2e-az2

I need to avoid pods being placed on some nodes. https://github.com/percona/percona-helm-charts/tree/main/charts/pxc-db#installing-the-chart I'm writing here as a last resort since I couldn't find any information anywhere

My only thought, since I found no documentation , was to try a json format and with my node label being app=pxc I tried --set pxc.affinity.advanced={"nodeAffinity": {"requiredDuringSchedulingIgnoredDuringExecution": {"nodeSelectorTerms": [{"matchExpressions": [{"key": "app","operator": "In","values": ["pxc"]}]}]}}}

and got an error:

install.go:192: [debug] Original chart version: "" Error: INSTALLATION FAILED: expected at most two arguments, unexpected arguments: {requiredDuringSchedulingIgnoredDuringExecution:, {nodeSelectorTerms:, [{matchExpressions:, [{key:, app,operator:, In,values:, [pxc]}]}]}}} helm.go:84: [debug] expected at most two arguments, unexpected arguments: {requiredDuringSchedulingIgnoredDuringExecution:, {nodeSelectorTerms:, [{matchExpressions:, [{key:, app,operator:, In,values:, [pxc]}]}]}}}

alex suru
  • 9
  • 2

0 Answers0