Merge "Add noteAffinity option to kafka/zookeeper"
authorBorislav Glozman <Borislav.Glozman@amdocs.com>
Wed, 20 Mar 2019 14:34:49 +0000 (14:34 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 20 Mar 2019 14:34:49 +0000 (14:34 +0000)
1  2 
kubernetes/dmaap/components/message-router/charts/message-router-kafka/templates/statefulset.yaml
kubernetes/dmaap/components/message-router/charts/message-router-kafka/values.yaml
kubernetes/dmaap/components/message-router/charts/message-router-zookeeper/templates/statefulset.yaml
kubernetes/dmaap/components/message-router/charts/message-router-zookeeper/values.yaml

@@@ -44,6 -44,10 +44,10 @@@ spec
                      values:
                      - {{ include "common.name" . }}
               topologyKey: "kubernetes.io/hostname"
+       {{- if .Values.nodeAffinity }}
+       nodeAffinity:
+         {{ toYaml .Values.nodeAffinity | indent 10 }}
+       {{- end }}
        initContainers:
        - name: {{ include "common.name" . }}-initcontainer
          image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
            name: docker-socket
          - mountPath: /kafka
            name: kafka-data
 +      {{- if .Values.tolerations }}
 +      tolerations:
 +        {{ toYaml .Values.tolerations | indent 10 }}
 +      {{- end }}
        volumes:
        - name: localtime
          hostPath:
@@@ -47,13 -47,12 +47,14 @@@ replicaCount: 
  # defult partitions
  defaultpartitions: 3
  
  nodeSelector: {}
  
+ nodeAffinity: {}
  affinity: {}
  
 +tolerations: {}
 +
  # probe configuration parameters
  liveness:
    initialDelaySeconds: 60
@@@ -48,6 -48,10 +48,10 @@@ spec
                      values:
                      - {{ include "common.name" . }}
               topologyKey: "kubernetes.io/hostname"
+       {{- if .Values.nodeAffinity }}
+       nodeAffinity:
+         {{ toYaml .Values.nodeAffinity | indent 10 }}
+       {{- end }}
        initContainers:
        - name: {{ include "common.name" . }}-seed-topics-apikeys
          command:
            readOnly: true
          - mountPath: /var/lib/zookeeper/data
            name: zookeeper-data
 +      {{- if .Values.tolerations }}
 +      tolerations:
 +        {{ toYaml .Values.tolerations | indent 10 }}
 +      {{- end }}
        volumes:
        - name: localtime
          hostPath:
@@@ -49,10 -49,10 +49,12 @@@ replicaCount: 
  
  nodeSelector: {}
  
+ nodeAffinity: {}
  affinity: {}
  
 +tolerations: {}
 +
  # probe configuration parameters
  liveness:
    initialDelaySeconds: 10