From e982f8830ee54397ea59e0524828b1aa1faaacfd Mon Sep 17 00:00:00 2001 From: Sy Babayev Date: Mon, 29 Apr 2024 16:11:28 +0100 Subject: [PATCH 1/3] feat: added configuration option to set `maxUnavailable` for PDBs Signed-off-by: Sy Babayev --- charts/tempo-distributed/Chart.yaml | 2 +- charts/tempo-distributed/README.md | 11 ++++++++++- .../poddisruptionbudget-compactor.yaml | 2 +- .../poddisruptionbudget-distributor.yaml | 2 +- ...oddisruptionbudget-federation-frontend.yaml | 2 +- .../gateway/poddisruptionbudget-gateway.yaml | 2 +- .../ingester/poddisruptionbudget-ingester.yaml | 2 +- .../poddisruptionbudget-memcached.yaml | 2 +- .../poddisruptionbudget-metrics-generator.yaml | 2 +- .../querier/poddisruptionbudget-querier.yaml | 2 +- .../poddisruptionbudget-query-frontend.yaml | 2 +- charts/tempo-distributed/values.yaml | 18 ++++++++++++++++++ 12 files changed, 38 insertions(+), 11 deletions(-) diff --git a/charts/tempo-distributed/Chart.yaml b/charts/tempo-distributed/Chart.yaml index 498e9fa22d..6299f150b9 100644 --- a/charts/tempo-distributed/Chart.yaml +++ b/charts/tempo-distributed/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: tempo-distributed description: Grafana Tempo in MicroService mode type: application -version: 1.16.2 +version: 1.17.0 appVersion: 2.5.0 engine: gotpl home: https://grafana.com/docs/tempo/latest/ diff --git a/charts/tempo-distributed/README.md b/charts/tempo-distributed/README.md index 824a7b286c..4b81e40cb0 100755 --- a/charts/tempo-distributed/README.md +++ b/charts/tempo-distributed/README.md @@ -1,6 +1,6 @@ # tempo-distributed -![Version: 1.16.2](https://img.shields.io/badge/Version-1.16.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.5.0](https://img.shields.io/badge/AppVersion-2.5.0-informational?style=flat-square) +![Version: 1.17.0](https://img.shields.io/badge/Version-1.17.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.5.0](https://img.shields.io/badge/AppVersion-2.5.0-informational?style=flat-square) Grafana Tempo in MicroService mode @@ -295,6 +295,7 @@ The memcached default args are removed and should be provided manually. The sett | compactor.image.registry | string | `nil` | The Docker registry for the compactor image. Overrides `tempo.image.registry` | | compactor.image.repository | string | `nil` | Docker image repository for the compactor image. Overrides `tempo.image.repository` | | compactor.image.tag | string | `nil` | Docker image tag for the compactor image. Overrides `tempo.image.tag` | +| compactor.maxUnavailable | int | `1` | Pod Disruption Budget maxUnavailable | | compactor.nodeSelector | object | `{}` | Node selector for compactor pods | | compactor.podAnnotations | object | `{}` | Annotations for compactor pods | | compactor.podLabels | object | `{}` | Labels for compactor pods | @@ -328,6 +329,7 @@ The memcached default args are removed and should be provided manually. The sett | distributor.image.registry | string | `nil` | The Docker registry for the ingester image. Overrides `tempo.image.registry` | | distributor.image.repository | string | `nil` | Docker image repository for the ingester image. Overrides `tempo.image.repository` | | distributor.image.tag | string | `nil` | Docker image tag for the ingester image. Overrides `tempo.image.tag` | +| distributor.maxUnavailable | int | `1` | Pod Disruption Budget maxUnavailable | | distributor.nodeSelector | object | `{}` | Node selector for distributor pods | | distributor.podAnnotations | object | `{}` | Annotations for distributor pods | | distributor.podLabels | object | `{}` | Labels for distributor pods | @@ -365,6 +367,7 @@ The memcached default args are removed and should be provided manually. The sett | enterpriseFederationFrontend.image.registry | string | `nil` | The Docker registry for the federation-frontend image. Overrides `tempo.image.registry` | | enterpriseFederationFrontend.image.repository | string | `nil` | Docker image repository for the federation-frontend image. Overrides `tempo.image.repository` | | enterpriseFederationFrontend.image.tag | string | `nil` | Docker image tag for the federation-frontend image. Overrides `tempo.image.tag` | +| enterpriseFederationFrontend.maxUnavailable | int | `1` | Pod Disruption Budget maxUnavailable | | enterpriseFederationFrontend.nodeSelector | object | `{}` | Node selector for federation-frontend pods | | enterpriseFederationFrontend.podAnnotations | object | `{}` | Annotations for federation-frontend pods | | enterpriseFederationFrontend.podLabels | object | `{}` | Labels for enterpriseFederationFrontend pods | @@ -459,6 +462,7 @@ The memcached default args are removed and should be provided manually. The sett | gateway.ingress.hosts | list | `[{"host":"gateway.tempo.example.com","paths":[{"path":"/"}]}]` | Hosts configuration for the gateway ingress | | gateway.ingress.labels | object | `{}` | Labels for the gateway ingress | | gateway.ingress.tls | list | `[{"hosts":["gateway.tempo.example.com"],"secretName":"tempo-gateway-tls"}]` | TLS configuration for the gateway ingress | +| gateway.maxUnavailable | int | `1` | Pod Disruption Budget maxUnavailable | | gateway.nginxConfig.file | string | See values.yaml | Config file contents for Nginx. Passed through the `tpl` function to allow templating | | gateway.nginxConfig.httpSnippet | string | `""` | Allows appending custom configuration to the http block | | gateway.nginxConfig.logFormat | string | `"main '$remote_addr - $remote_user [$time_local] $status '\n '\"$request\" $body_bytes_sent \"$http_referer\" '\n '\"$http_user_agent\" \"$http_x_forwarded_for\"';"` | NGINX log format | @@ -521,6 +525,7 @@ The memcached default args are removed and should be provided manually. The sett | ingester.image.repository | string | `nil` | Docker image repository for the ingester image. Overrides `tempo.image.repository` | | ingester.image.tag | string | `nil` | Docker image tag for the ingester image. Overrides `tempo.image.tag` | | ingester.initContainers | list | `[]` | | +| ingester.maxUnavailable | string | `nil` | Override Pod Disruption Budget maxUnavailable with a static value | | ingester.nodeSelector | object | `{}` | Node selector for ingester pods | | ingester.persistence.annotations | object | `{}` | Annotations for ingester's persist volume claim | | ingester.persistence.enabled | bool | `false` | Enable creating PVCs which is required when using boltdb-shipper | @@ -568,6 +573,7 @@ The memcached default args are removed and should be provided manually. The sett | memcached.image.registry | string | `nil` | The Docker registry for the Memcached image. Overrides `global.image.registry` | | memcached.image.repository | string | `"memcached"` | Memcached Docker image repository | | memcached.image.tag | string | `"1.6.29-alpine"` | Memcached Docker image tag | +| memcached.maxUnavailable | int | `1` | Pod Disruption Budget maxUnavailable | | memcached.podAnnotations | object | `{}` | Annotations for memcached pods | | memcached.podLabels | object | `{}` | Labels for memcached pods | | memcached.replicas | int | `1` | | @@ -637,6 +643,7 @@ The memcached default args are removed and should be provided manually. The sett | metricsGenerator.image.tag | string | `nil` | Docker image tag for the metrics-generator image. Overrides `tempo.image.tag` | | metricsGenerator.initContainers | list | `[]` | | | metricsGenerator.kind | string | `"Deployment"` | Kind of deployment [StatefulSet/Deployment] | +| metricsGenerator.maxUnavailable | int | `1` | Pod Disruption Budget maxUnavailable | | metricsGenerator.nodeSelector | object | `{}` | Node selector for metrics-generator pods | | metricsGenerator.persistence | object | `{"annotations":{},"enabled":false,"size":"10Gi","storageClass":null}` | Persistence configuration for metrics-generator | | metricsGenerator.persistence.annotations | object | `{}` | Annotations for metrics generator PVCs | @@ -706,6 +713,7 @@ The memcached default args are removed and should be provided manually. The sett | querier.image.registry | string | `nil` | The Docker registry for the querier image. Overrides `tempo.image.registry` | | querier.image.repository | string | `nil` | Docker image repository for the querier image. Overrides `tempo.image.repository` | | querier.image.tag | string | `nil` | Docker image tag for the querier image. Overrides `tempo.image.tag` | +| querier.maxUnavailable | int | `1` | Pod Disruption Budget maxUnavailable | | querier.nodeSelector | object | `{}` | Node selector for querier pods | | querier.podAnnotations | object | `{}` | Annotations for querier pods | | querier.podLabels | object | `{}` | Labels for querier pods | @@ -745,6 +753,7 @@ The memcached default args are removed and should be provided manually. The sett | queryFrontend.ingress.enabled | bool | `false` | Specifies whether an ingress for the Jaeger should be created | | queryFrontend.ingress.hosts | list | `[{"host":"query.tempo.example.com","paths":[{"path":"/"}]}]` | Hosts configuration for the Jaeger ingress | | queryFrontend.ingress.tls | list | `[{"hosts":["query.tempo.example.com"],"secretName":"tempo-query-tls"}]` | TLS configuration for the Jaeger ingress | +| queryFrontend.maxUnavailable | int | `1` | Pod Disruption Budget maxUnavailable | | queryFrontend.nodeSelector | object | `{}` | Node selector for query-frontend pods | | queryFrontend.podAnnotations | object | `{}` | Annotations for query-frontend pods | | queryFrontend.podLabels | object | `{}` | Labels for queryFrontend pods | diff --git a/charts/tempo-distributed/templates/compactor/poddisruptionbudget-compactor.yaml b/charts/tempo-distributed/templates/compactor/poddisruptionbudget-compactor.yaml index 780caab89e..ed706deb2f 100644 --- a/charts/tempo-distributed/templates/compactor/poddisruptionbudget-compactor.yaml +++ b/charts/tempo-distributed/templates/compactor/poddisruptionbudget-compactor.yaml @@ -10,5 +10,5 @@ spec: selector: matchLabels: {{- include "tempo.selectorLabels" $dict | nindent 6 }} - maxUnavailable: 1 + maxUnavailable: {{ .Values.compactor.maxUnavailable }} {{- end }} diff --git a/charts/tempo-distributed/templates/distributor/poddisruptionbudget-distributor.yaml b/charts/tempo-distributed/templates/distributor/poddisruptionbudget-distributor.yaml index 30b542b809..a7ab8ae7ac 100644 --- a/charts/tempo-distributed/templates/distributor/poddisruptionbudget-distributor.yaml +++ b/charts/tempo-distributed/templates/distributor/poddisruptionbudget-distributor.yaml @@ -10,5 +10,5 @@ spec: selector: matchLabels: {{- include "tempo.selectorLabels" $dict | nindent 6 }} - maxUnavailable: 1 + maxUnavailable: {{ .Values.distributor.maxUnavailable }} {{- end }} diff --git a/charts/tempo-distributed/templates/enterprise-federation-frontend/poddisruptionbudget-federation-frontend.yaml b/charts/tempo-distributed/templates/enterprise-federation-frontend/poddisruptionbudget-federation-frontend.yaml index 08b9a8ff08..1855aa42aa 100644 --- a/charts/tempo-distributed/templates/enterprise-federation-frontend/poddisruptionbudget-federation-frontend.yaml +++ b/charts/tempo-distributed/templates/enterprise-federation-frontend/poddisruptionbudget-federation-frontend.yaml @@ -11,6 +11,6 @@ spec: selector: matchLabels: {{- include "tempo.selectorLabels" $dict | nindent 6 }} - maxUnavailable: 1 + maxUnavailable: {{ .Values.enterpriseFederationFrontend.maxUnavailable }} {{- end }} {{- end -}} \ No newline at end of file diff --git a/charts/tempo-distributed/templates/gateway/poddisruptionbudget-gateway.yaml b/charts/tempo-distributed/templates/gateway/poddisruptionbudget-gateway.yaml index 025584b929..22fa12fc31 100644 --- a/charts/tempo-distributed/templates/gateway/poddisruptionbudget-gateway.yaml +++ b/charts/tempo-distributed/templates/gateway/poddisruptionbudget-gateway.yaml @@ -11,5 +11,5 @@ spec: selector: matchLabels: {{- include "tempo.selectorLabels" $dict | nindent 6 }} - maxUnavailable: 1 + maxUnavailable: {{ .Values.gateway.maxUnavailable }} {{- end }} diff --git a/charts/tempo-distributed/templates/ingester/poddisruptionbudget-ingester.yaml b/charts/tempo-distributed/templates/ingester/poddisruptionbudget-ingester.yaml index 413c4778a3..ec8440ff23 100644 --- a/charts/tempo-distributed/templates/ingester/poddisruptionbudget-ingester.yaml +++ b/charts/tempo-distributed/templates/ingester/poddisruptionbudget-ingester.yaml @@ -10,5 +10,5 @@ spec: selector: matchLabels: {{- include "tempo.selectorLabels" $dict | nindent 6 }} - maxUnavailable: {{ sub (.Values.ingester.replicas) (add (div .Values.ingester.config.replication_factor 2) 1) }} + maxUnavailable: {{ default (sub (.Values.ingester.replicas) (add (div .Values.ingester.config.replication_factor 2) 1)) .Values.ingester.maxUnavailable }} {{- end }} diff --git a/charts/tempo-distributed/templates/memcached/poddisruptionbudget-memcached.yaml b/charts/tempo-distributed/templates/memcached/poddisruptionbudget-memcached.yaml index 1c5f6b13bc..58c31f5f4b 100644 --- a/charts/tempo-distributed/templates/memcached/poddisruptionbudget-memcached.yaml +++ b/charts/tempo-distributed/templates/memcached/poddisruptionbudget-memcached.yaml @@ -10,5 +10,5 @@ spec: selector: matchLabels: {{- include "tempo.selectorLabels" $dict | nindent 6 }} - maxUnavailable: 1 + maxUnavailable: {{ .Values.memcached.maxUnavailable }} {{- end }} diff --git a/charts/tempo-distributed/templates/metrics-generator/poddisruptionbudget-metrics-generator.yaml b/charts/tempo-distributed/templates/metrics-generator/poddisruptionbudget-metrics-generator.yaml index 34e0010692..786d101481 100644 --- a/charts/tempo-distributed/templates/metrics-generator/poddisruptionbudget-metrics-generator.yaml +++ b/charts/tempo-distributed/templates/metrics-generator/poddisruptionbudget-metrics-generator.yaml @@ -11,6 +11,6 @@ spec: selector: matchLabels: {{- include "tempo.selectorLabels" $dict | nindent 6 }} - maxUnavailable: 1 + maxUnavailable: {{ .Values.metricsGenerator.maxUnavailable }} {{- end }} {{- end }} diff --git a/charts/tempo-distributed/templates/querier/poddisruptionbudget-querier.yaml b/charts/tempo-distributed/templates/querier/poddisruptionbudget-querier.yaml index 1f7abd286f..1498dff2ea 100644 --- a/charts/tempo-distributed/templates/querier/poddisruptionbudget-querier.yaml +++ b/charts/tempo-distributed/templates/querier/poddisruptionbudget-querier.yaml @@ -10,5 +10,5 @@ spec: selector: matchLabels: {{- include "tempo.selectorLabels" $dict | nindent 6 }} - maxUnavailable: 1 + maxUnavailable: {{ .Values.querier.maxUnavailable }} {{- end }} diff --git a/charts/tempo-distributed/templates/query-frontend/poddisruptionbudget-query-frontend.yaml b/charts/tempo-distributed/templates/query-frontend/poddisruptionbudget-query-frontend.yaml index d3f0c23b3a..f406ed81ed 100644 --- a/charts/tempo-distributed/templates/query-frontend/poddisruptionbudget-query-frontend.yaml +++ b/charts/tempo-distributed/templates/query-frontend/poddisruptionbudget-query-frontend.yaml @@ -10,5 +10,5 @@ spec: selector: matchLabels: {{- include "tempo.selectorLabels" $dict | nindent 6 }} - maxUnavailable: 1 + maxUnavailable: {{ .Values.queryFrontend.maxUnavailable }} {{- end }} diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index cb546e1ca4..4cb1294963 100755 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -179,6 +179,8 @@ ingester: matchLabels: {{- include "tempo.selectorLabels" (dict "ctx" . "component" "ingester") | nindent 12 }} topologyKey: topology.kubernetes.io/zone + # -- Override Pod Disruption Budget maxUnavailable with a static value + maxUnavailable: null # -- Node selector for ingester pods nodeSelector: {} # -- Tolerations for ingester pods @@ -343,6 +345,8 @@ metricsGenerator: matchLabels: {{- include "tempo.selectorLabels" (dict "ctx" . "component" "metrics-generator") | nindent 12 }} topologyKey: topology.kubernetes.io/zone + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 # -- Node selector for metrics-generator pods nodeSelector: {} # -- Tolerations for metrics-generator pods @@ -513,6 +517,8 @@ distributor: matchLabels: {{- include "tempo.selectorLabels" (dict "ctx" . "component" "distributor") | nindent 12 }} topologyKey: topology.kubernetes.io/zone + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 # -- Node selector for distributor pods nodeSelector: {} # -- Tolerations for distributor pods @@ -607,6 +613,8 @@ compactor: resources: {} # -- Grace period to allow the compactor to shutdown before it is killed terminationGracePeriodSeconds: 30 + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 # -- Node selector for compactor pods nodeSelector: {} # -- Tolerations for compactor pods @@ -721,6 +729,8 @@ querier: matchLabels: {{- include "tempo.selectorLabels" (dict "ctx" . "component" "querier" "memberlist" true) | nindent 12 }} topologyKey: topology.kubernetes.io/zone + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 # -- Node selector for querier pods nodeSelector: {} # -- Tolerations for querier pods @@ -913,6 +923,8 @@ queryFrontend: matchLabels: {{- include "tempo.selectorLabels" (dict "ctx" . "component" "query-frontend") | nindent 12 }} topologyKey: topology.kubernetes.io/zone + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 # -- Node selector for query-frontend pods nodeSelector: {} # -- Tolerations for query-frontend pods @@ -1019,6 +1031,8 @@ enterpriseFederationFrontend: matchLabels: {{- include "tempo.selectorLabels" (dict "ctx" . "component" "federation-frontend") | nindent 12 }} topologyKey: failure-domain.beta.kubernetes.io/zone + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 # -- Node selector for federation-frontend pods nodeSelector: {} # -- Tolerations for federation-frontend pods @@ -1530,6 +1544,8 @@ memcached: matchLabels: {{- include "tempo.selectorLabels" (dict "ctx" . "component" "memcached") | nindent 12 }} topologyKey: topology.kubernetes.io/zone + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 service: # -- Annotations for memcached service annotations: {} @@ -1793,6 +1809,8 @@ gateway: matchLabels: {{- include "tempo.selectorLabels" (dict "ctx" . "component" "gateway") | nindent 12 }} topologyKey: topology.kubernetes.io/zone + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 # -- Node selector for gateway pods nodeSelector: {} # -- Tolerations for gateway pods From a50bc5cbb01e8e6a66e2f59e9b673c4bb492b911 Mon Sep 17 00:00:00 2001 From: Sy B Date: Mon, 19 Aug 2024 11:17:09 +0100 Subject: [PATCH 2/3] Update charts/tempo-distributed/values.yaml Co-authored-by: Sheikh-Abubaker Signed-off-by: Sy B --- charts/tempo-distributed/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index 4cb1294963..ccbb560de1 100755 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -180,7 +180,7 @@ ingester: {{- include "tempo.selectorLabels" (dict "ctx" . "component" "ingester") | nindent 12 }} topologyKey: topology.kubernetes.io/zone # -- Override Pod Disruption Budget maxUnavailable with a static value - maxUnavailable: null + # maxUnavailable: 1 # -- Node selector for ingester pods nodeSelector: {} # -- Tolerations for ingester pods From 68258aa6f66bf02e7cf153769fbc0389b4f1f6cc Mon Sep 17 00:00:00 2001 From: Sy Babayev Date: Mon, 19 Aug 2024 12:21:17 +0100 Subject: [PATCH 3/3] Updated docs Signed-off-by: Sy Babayev --- charts/tempo-distributed/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/tempo-distributed/README.md b/charts/tempo-distributed/README.md index 4b81e40cb0..a88d1a48f1 100755 --- a/charts/tempo-distributed/README.md +++ b/charts/tempo-distributed/README.md @@ -525,7 +525,6 @@ The memcached default args are removed and should be provided manually. The sett | ingester.image.repository | string | `nil` | Docker image repository for the ingester image. Overrides `tempo.image.repository` | | ingester.image.tag | string | `nil` | Docker image tag for the ingester image. Overrides `tempo.image.tag` | | ingester.initContainers | list | `[]` | | -| ingester.maxUnavailable | string | `nil` | Override Pod Disruption Budget maxUnavailable with a static value | | ingester.nodeSelector | object | `{}` | Node selector for ingester pods | | ingester.persistence.annotations | object | `{}` | Annotations for ingester's persist volume claim | | ingester.persistence.enabled | bool | `false` | Enable creating PVCs which is required when using boltdb-shipper |