influxdata-operator icon indicating copy to clipboard operation
influxdata-operator copied to clipboard

where do we specify NodeSelectors and taints and tolerations in infuxdb kind object?

Open tprakash17 opened this issue 5 years ago • 4 comments

where do we specify NodeSelectors and taints and tolerations in infuxdb kind object? I tried few combination of specifying node selector and PodAffinity for influxdb kind object, but none of them work.

Can you please add sample here?

tprakash17 avatar Jul 26 '19 11:07 tprakash17

Currently if you see the spec their isn't any, ill add PR for it. :)

AdheipSingh avatar Jul 26 '19 17:07 AdheipSingh

Also, define environment variables for influxdb statefulset in this influxdb kind crd.

---
apiVersion: influxdata.com/v1alpha1
kind: Influxdb
metadata:
  name: influxdb
  namespace: influxdb
spec:
  nodeSelector:
    app: monitoring
  tolerations:
    - effect: NoExecute
      key: app
      operator: Equal 
      value: monitoring    
  size: 1
  baseImage: influxdb:1.7.1 #defautl  influxdb:1.6.3-alpine
  imagePullPolicy: Always
  pod:
    resources:
      limits:
        cpu: 2
        memory: 4Gi
      requests:
        cpu: 0.2
        memory: 256Mi
    env:
      name: INFLUXDB_HTTP_AUTH_ENABLED
      value: true
      name: INFLUXDB_ADMIN_USER
      value: admin
      name: INFLUXDB_ADMIN_PASSWORD
      value: testpassword
      name: INFLUXDB_WRITE_USER
      value: testuser
      name: INFLUXDB_WRITE_USER_PASSWORD
      value: testpassword
      name: INFLUXDB_GRAPHITE_ENABLED
      value: true
      name: INFLUXDB_ADMIN_ENABLED
      value: true
      name: INFLUXDB_DB
      value: testdb
    persistentVolumeClaim:
      metadata:
        name: "influxdb-data-pvc"
      spec:
        accessModes: [ "ReadWriteOnce" ]
        storageClassName: performance-retain
        resources:
          requests:
            storage: 5Gi

Above doesn't work but it doesn't throw error as well. Once these variables start reflecting i can change them to use secrets.

tprakash17 avatar Jul 27 '19 05:07 tprakash17

Sure will add another PR to this, do you mind opening another issue for this so that I can refer it. :)

AdheipSingh avatar Jul 27 '19 06:07 AdheipSingh

@gunnaraasen if adding support for spec, the operator is should create sync handlers responsible for updating the specific object for the spec

AdheipSingh avatar Aug 10 '19 07:08 AdheipSingh