Skip to content

pod anti affinity #201

@ifelsefi

Description

@ifelsefi

Hi

I would like to enable pod anti affinity so cockroach does not run on the same node.

This does not work:

  # nodeSelector is the simplest way to limit which kubernetes nodes will run the database-related pods
  # Please refer to the top-level description of nodeSelector for an example
  nodeSelector: {}
  # tolerations allows the database-related pods to run on tainted kubernetes nodes
  # Please refer to the top-level description of tolerations for an example
  tolerations: []
  # affinity provides more granular control of which kubernetes nodes will run the database-related pods
  # Please refer to the top-level description of affinity for an example
  affinity:
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
        matchExpressions:
        - key: app
          operator: In
          values:
          - cockroachdb
        topologyKey: "kubernetes.io/hostname"

The error I get:

user@laptop[~/repos$ helm install pure-pso pure/pure-pso -n pure-pso -f values.yaml Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Deployment.spec.template.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[0]): unknown field "matchExpressions" in io.k8s.api.core.v1.PodAffinityTerm

Does the helm chart support this option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions