From abb33acf9de1804b811f19b4c574bf80bb53cc61 Mon Sep 17 00:00:00 2001 From: Daniel Ferreira Date: Mon, 29 Mar 2021 12:15:39 +0100 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E2=9C=A8=20Add=20ability=20to=20de?= =?UTF-8?q?fine=20tolerations=20and=20affinity/nodeSelector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/deployment-compactor.yaml | 8 +++++++- .../templates/deployment-distributor.yaml | 8 +++++++- .../templates/deployment-querier.yaml | 8 +++++++- .../templates/deployment-query-frontend.yaml | 6 ++++++ .../templates/statefulset-ingester.yaml | 7 +++++++ .../templates/statefulset-memcached.yaml | 6 ++++++ operations/helm/tempo-microservices/values.yaml | 13 ++++++++++++- 7 files changed, 52 insertions(+), 4 deletions(-) diff --git a/operations/helm/tempo-microservices/templates/deployment-compactor.yaml b/operations/helm/tempo-microservices/templates/deployment-compactor.yaml index b27df00e7b7..cbeb6fc4605 100644 --- a/operations/helm/tempo-microservices/templates/deployment-compactor.yaml +++ b/operations/helm/tempo-microservices/templates/deployment-compactor.yaml @@ -39,4 +39,10 @@ spec: volumes: - configMap: name: tempo-compactor - name: tempo-conf \ No newline at end of file + name: tempo-conf + {{- with .Values.compactor.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- toYaml .Values.compactor.affinity | nindent 8 }} diff --git a/operations/helm/tempo-microservices/templates/deployment-distributor.yaml b/operations/helm/tempo-microservices/templates/deployment-distributor.yaml index 12d6aa0a24f..42a6ce49f25 100644 --- a/operations/helm/tempo-microservices/templates/deployment-distributor.yaml +++ b/operations/helm/tempo-microservices/templates/deployment-distributor.yaml @@ -41,4 +41,10 @@ spec: volumes: - configMap: name: tempo - name: tempo-conf \ No newline at end of file + name: tempo-conf + {{- with .Values.distributor.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- toYaml .Values.distributor.affinity | nindent 8 }} diff --git a/operations/helm/tempo-microservices/templates/deployment-querier.yaml b/operations/helm/tempo-microservices/templates/deployment-querier.yaml index a5160fb3d99..69c741dd04e 100644 --- a/operations/helm/tempo-microservices/templates/deployment-querier.yaml +++ b/operations/helm/tempo-microservices/templates/deployment-querier.yaml @@ -41,4 +41,10 @@ spec: volumes: - configMap: name: tempo-querier - name: tempo-conf \ No newline at end of file + name: tempo-conf + {{- with .Values.querier.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- toYaml .Values.querier.affinity | nindent 8 }} diff --git a/operations/helm/tempo-microservices/templates/deployment-query-frontend.yaml b/operations/helm/tempo-microservices/templates/deployment-query-frontend.yaml index 96b66d0ac3b..f542efa1d00 100644 --- a/operations/helm/tempo-microservices/templates/deployment-query-frontend.yaml +++ b/operations/helm/tempo-microservices/templates/deployment-query-frontend.yaml @@ -62,3 +62,9 @@ spec: - configMap: name: tempo name: tempo-conf + {{- with .Values.queryFrontend.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- toYaml .Values.queryFrontend.affinity | nindent 8 }} diff --git a/operations/helm/tempo-microservices/templates/statefulset-ingester.yaml b/operations/helm/tempo-microservices/templates/statefulset-ingester.yaml index c9717cbdb49..baea2b12d89 100644 --- a/operations/helm/tempo-microservices/templates/statefulset-ingester.yaml +++ b/operations/helm/tempo-microservices/templates/statefulset-ingester.yaml @@ -39,6 +39,13 @@ spec: - configMap: name: tempo name: tempo-conf + {{- with .Values.ingester.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- toYaml .Values.ingester.affinity | nindent 8 }} + updateStrategy: type: RollingUpdate volumeClaimTemplates: diff --git a/operations/helm/tempo-microservices/templates/statefulset-memcached.yaml b/operations/helm/tempo-microservices/templates/statefulset-memcached.yaml index 8bb15cb3d4d..4c2ace8df62 100644 --- a/operations/helm/tempo-microservices/templates/statefulset-memcached.yaml +++ b/operations/helm/tempo-microservices/templates/statefulset-memcached.yaml @@ -13,6 +13,12 @@ spec: labels: name: memcached spec: + {{- with .Values.memcached.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + nodeSelector: + {{- toYaml .Values.memcached.affinity | nindent 8 }} affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: diff --git a/operations/helm/tempo-microservices/values.yaml b/operations/helm/tempo-microservices/values.yaml index 87c6128ec73..323425cb987 100644 --- a/operations/helm/tempo-microservices/values.yaml +++ b/operations/helm/tempo-microservices/values.yaml @@ -21,6 +21,8 @@ distributor: jaeger: protocols: thrift_http: null + tolerations: [] + affinity: {} compactor: replicas: 1 image: grafana/tempo:latest @@ -28,6 +30,8 @@ compactor: requests: cpu: 250m memory: 1Gi + tolerations: [] + affinity: {} ingester: replicas: 3 image: grafana/tempo:latest @@ -35,6 +39,8 @@ ingester: requests: cpu: 1 memory: 1.5Gi + tolerations: [] + affinity: {} resources: image: grafana/tempo:latest resources: @@ -48,6 +54,8 @@ queryFrontend: requests: cpu: 250m memory: 500Mi + tolerations: [] + affinity: {} querier: replicas: 1 image: grafana/tempo:latest @@ -55,6 +63,8 @@ querier: requests: cpu: 250m memory: 500Mi + tolerations: [] + affinity: {} tempoQuery: image: grafana/tempo-query:latest resources: @@ -64,4 +74,5 @@ tempoQuery: memcached: image: memcached:1.5.17-alpine replicas: 0 - + tolerations: [] + nodeSelector: {} From 0495b332ead3e1dbdd5d0a38baf98f4a901ee1d2 Mon Sep 17 00:00:00 2001 From: Daniel Ferreira Date: Mon, 29 Mar 2021 12:15:39 +0100 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E2=9C=A8=20Add=20ability=20to=20de?= =?UTF-8?q?fine=20tolerations=20and=20affinity/nodeSelector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/deployment-compactor.yaml | 8 +++++++- .../templates/deployment-distributor.yaml | 7 +++++++ .../templates/deployment-querier.yaml | 8 +++++++- .../templates/deployment-query-frontend.yaml | 6 ++++++ .../templates/statefulset-ingester.yaml | 7 +++++++ .../templates/statefulset-memcached.yaml | 6 ++++++ operations/helm/tempo-microservices/values.yaml | 13 ++++++++++++- 7 files changed, 52 insertions(+), 3 deletions(-) diff --git a/operations/helm/tempo-microservices/templates/deployment-compactor.yaml b/operations/helm/tempo-microservices/templates/deployment-compactor.yaml index b27df00e7b7..cbeb6fc4605 100644 --- a/operations/helm/tempo-microservices/templates/deployment-compactor.yaml +++ b/operations/helm/tempo-microservices/templates/deployment-compactor.yaml @@ -39,4 +39,10 @@ spec: volumes: - configMap: name: tempo-compactor - name: tempo-conf \ No newline at end of file + name: tempo-conf + {{- with .Values.compactor.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- toYaml .Values.compactor.affinity | nindent 8 }} diff --git a/operations/helm/tempo-microservices/templates/deployment-distributor.yaml b/operations/helm/tempo-microservices/templates/deployment-distributor.yaml index f81d5606cc1..e11413f8e50 100644 --- a/operations/helm/tempo-microservices/templates/deployment-distributor.yaml +++ b/operations/helm/tempo-microservices/templates/deployment-distributor.yaml @@ -47,3 +47,10 @@ spec: - configMap: name: tempo name: tempo-conf + {{- with .Values.distributor.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- toYaml .Values.distributor.affinity | nindent 8 }} + diff --git a/operations/helm/tempo-microservices/templates/deployment-querier.yaml b/operations/helm/tempo-microservices/templates/deployment-querier.yaml index a5160fb3d99..69c741dd04e 100644 --- a/operations/helm/tempo-microservices/templates/deployment-querier.yaml +++ b/operations/helm/tempo-microservices/templates/deployment-querier.yaml @@ -41,4 +41,10 @@ spec: volumes: - configMap: name: tempo-querier - name: tempo-conf \ No newline at end of file + name: tempo-conf + {{- with .Values.querier.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- toYaml .Values.querier.affinity | nindent 8 }} diff --git a/operations/helm/tempo-microservices/templates/deployment-query-frontend.yaml b/operations/helm/tempo-microservices/templates/deployment-query-frontend.yaml index 4b3198c7f77..e432468f375 100644 --- a/operations/helm/tempo-microservices/templates/deployment-query-frontend.yaml +++ b/operations/helm/tempo-microservices/templates/deployment-query-frontend.yaml @@ -64,3 +64,9 @@ spec: - configMap: name: tempo name: tempo-conf + {{- with .Values.queryFrontend.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- toYaml .Values.queryFrontend.affinity | nindent 8 }} diff --git a/operations/helm/tempo-microservices/templates/statefulset-ingester.yaml b/operations/helm/tempo-microservices/templates/statefulset-ingester.yaml index 1cf5cf4fb8a..eaf01b82ad9 100644 --- a/operations/helm/tempo-microservices/templates/statefulset-ingester.yaml +++ b/operations/helm/tempo-microservices/templates/statefulset-ingester.yaml @@ -39,6 +39,13 @@ spec: - configMap: name: tempo name: tempo-conf + {{- with .Values.ingester.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- toYaml .Values.ingester.affinity | nindent 8 }} + updateStrategy: type: RollingUpdate volumeClaimTemplates: diff --git a/operations/helm/tempo-microservices/templates/statefulset-memcached.yaml b/operations/helm/tempo-microservices/templates/statefulset-memcached.yaml index 8bb15cb3d4d..4c2ace8df62 100644 --- a/operations/helm/tempo-microservices/templates/statefulset-memcached.yaml +++ b/operations/helm/tempo-microservices/templates/statefulset-memcached.yaml @@ -13,6 +13,12 @@ spec: labels: name: memcached spec: + {{- with .Values.memcached.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + nodeSelector: + {{- toYaml .Values.memcached.affinity | nindent 8 }} affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: diff --git a/operations/helm/tempo-microservices/values.yaml b/operations/helm/tempo-microservices/values.yaml index 62eb350fabf..5d068716bf9 100644 --- a/operations/helm/tempo-microservices/values.yaml +++ b/operations/helm/tempo-microservices/values.yaml @@ -21,6 +21,8 @@ distributor: jaeger: protocols: thrift_http: null + tolerations: [] + affinity: {} compactor: replicas: 1 image: grafana/tempo:latest @@ -28,6 +30,8 @@ compactor: requests: cpu: 250m memory: 1Gi + tolerations: [] + affinity: {} ingester: replicas: 3 image: grafana/tempo:latest @@ -35,6 +39,8 @@ ingester: requests: cpu: 1 memory: 1.5Gi + tolerations: [] + affinity: {} resources: image: grafana/tempo:latest resources: @@ -48,6 +54,8 @@ queryFrontend: requests: cpu: 250m memory: 500Mi + tolerations: [] + affinity: {} querier: replicas: 1 image: grafana/tempo:latest @@ -55,6 +63,8 @@ querier: requests: cpu: 250m memory: 500Mi + tolerations: [] + affinity: {} tempoQuery: image: grafana/tempo-query:latest resources: @@ -64,4 +74,5 @@ tempoQuery: memcached: image: memcached:1.5.17-alpine replicas: 0 - + tolerations: [] + nodeSelector: {}