GithubHelp home page GithubHelp logo

Comments (2)

Amper avatar Amper commented on June 16, 2024

Hey, @Sam-Sundar.

Each component of VM operator has [tolerations] and [affinity] fields in its spec (https://docs.victoriametrics.com/operator/resources/#high-availability).

You should place these fields inside the spec field of VM components (for cluster - inside the spec of subcomponent like select/insert/storage, see API docs), for instance:

# ...

vmagent:
  enabled: true
  annotations: {}
  # https://docs.victoriametrics.com/operator/api.html#vmagentremotewritespec
  # defined spec will be added to the remoteWrite configuration of VMAgent
  additionalRemoteWrites:
    []
    #- url: http://some-remote-write/api/v1/write
  # spec for VMAgent crd
  # https://docs.victoriametrics.com/operator/api.html#vmagentspec
  spec:
    selectAllByDefault: true
    image:
      tag: v1.94.0
    scrapeInterval: 20s
    externalLabels:
      cluster: TestApps
    extraArgs:
      promscrape.streamParse: "true"
    affinity:
      nodeAffinity:
        # ...
    tolerations:
    - key: teamname
      operator: Equal
      value: infra 
  ingress:
    enabled: false      

# ...

vmcluster:
  enabled: true
  annotations: {}
  # spec for VMCluster crd
  # https://docs.victoriametrics.com/operator/api.html#vmclusterspec
  spec:
    retentionPeriod: "1"
    replicationFactor: 2
    vmstorage:
      image:
        tag: v1.94.0-cluster
      replicaCount: 3
      storageDataPath: "/vm-data"
      storage:
        volumeClaimTemplate:
          spec:
            resources:
              requests:
                storage: 10Gi
      resources:
        requests:
          cpu: '500m'
          memory: '2000Mi'
        limits:
          cpu: '1500m'
          memory: '8000Mi'
      affinity:
        nodeAffinity:
          # ...
      tolerations:
      - key: teamname
        operator: Equal
        value: infra 
    vmselect:
      image:
        tag: v1.94.0-cluster
      replicaCount: 3
      cacheMountPath: "/select-cache"
      extraArgs: {}
      storage:
        volumeClaimTemplate:
          spec:
            resources:
              requests:
                storage: 2Gi
      resources:
        limits:
          cpu: "2"
          memory: "3000Mi"
        requests:
          cpu: "0.5"
          memory: "1000Mi"
      affinity:
        nodeAffinity:
          # ...
      tolerations:
      - key: teamname
        operator: Equal
        value: infra 
    vminsert:
      image:
        tag: v1.94.0-cluster
      replicaCount: 2
      extraArgs: {}
      resources:
        # {}
        limits:
          cpu: "1"
          memory: 1500Mi
        requests:
          cpu: "0.5"
          memory: "500Mi"
      affinity:
        nodeAffinity:
          # ...
      tolerations:
      - key: teamname
        operator: Equal
        value: infra 

# ...

In your values file i see tolerations and affinity only for vmagent and you placed it at the wrong level an mixed with the ingress field.

from helm-charts.

Sam-Sundar avatar Sam-Sundar commented on June 16, 2024

Thanks a lot @Amper. I've added tolerations and affinity now.

from helm-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.