Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/grafana-tempo] support new deployment mode: scaling-monolithic #31028

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

rim99
Copy link

@rim99 rim99 commented Dec 13, 2024

Description of the change

This change provides a new way of deployment: scaling-monolithic.

If toggle .Values.tempo.deploymentMode, which is "microservices" by default, is set as "scalingMonolithic", single statefulset will be created. Each pod conatins all functions of components: distributor, ingester, query-frontend, querier, metrics-generator and compactor.

Benefits

It helps to maintain a reasonable size of cluster handling small to medium volumes of incoming traces.

Possible drawbacks

Applicable issues


Additional information

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

@rim99 rim99 marked this pull request as draft December 13, 2024 02:52
@github-actions github-actions bot added the triage Triage is needed label Dec 13, 2024
@github-actions github-actions bot requested a review from carrodher December 13, 2024 02:52
@rim99 rim99 force-pushed the support-scaling-monolithic branch 4 times, most recently from 51d6560 to d8fc985 Compare December 13, 2024 05:07
@carrodher
Copy link
Member

Thank you for this significant contribution, @rim99! The PR is currently in draft status. Please inform us when it's ready for testing and review. Thanks once more!

@carrodher carrodher added verify Execute verification workflow for these changes in-progress labels Dec 13, 2024
@github-actions github-actions bot removed the triage Triage is needed label Dec 13, 2024
@github-actions github-actions bot removed the request for review from carrodher December 13, 2024 07:47
@github-actions github-actions bot requested a review from jotamartos December 13, 2024 07:47
@carrodher carrodher requested a review from migruiz4 December 13, 2024 07:48
@rim99 rim99 marked this pull request as ready for review December 13, 2024 08:05
@rim99
Copy link
Author

rim99 commented Dec 13, 2024

Hi @jotamartos @migruiz4 , I've tested my changes with minikube locally. New statefulset works fine as a cluster.

Regarding the VIB test, how to achieve 2 different sets of env for testing?

Since it should test both cases:

  • tempo.deploymentMode=microservices
  • tempo.deploymentMode=scalingMonolithic

Copy link

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label Dec 29, 2024
@rim99
Copy link
Author

rim99 commented Dec 29, 2024

Hello, just a reminder that this PR is ready for review
@jotamartos @migruiz4 @carrodher

@github-actions github-actions bot removed the stale 15 days without activity label Dec 30, 2024
@jotamartos
Copy link
Contributor

Hi @rim99,

Thanks for your contribution and sorry for the delay in getting back to you. We are going to start reviewing the changes and will provide feedback as soon as possible.

Copy link
Contributor

@jotamartos jotamartos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at my suggestions

kubectl port-forward svc/{{ template "grafana-tempo.scaling-monolithic.fullname" . }} {{ .Values.scalingMonolithic.service.ports.http }}:{{ .Values.scalingMonolithic.service.ports.http }} &
{{- end }}
{{- end }}

{{- end }}

{{- include "grafana-tempo.checkRollingTags" . }}
{{- include "grafana-tempo.validateValues" . }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd include a validation to ensure tempo.deploymentMode is set to the expected values.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 6 to 7
{{- if eq .Values.tempo.deploymentMode "microservices" }}
{{- if .Values.compactor.enabled }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use a single line for this

Suggested change
{{- if eq .Values.tempo.deploymentMode "microservices" }}
{{- if .Values.compactor.enabled }}
{{- if and (eq .Values.tempo.deploymentMode "microservices") .Values.compactor.enabled }}

Same for the rest of files unless there are multiple objects deployed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

kind: Service
metadata:
name: {{ template "grafana-tempo.scaling-monolithic.fullname" . }}-headless
namespace: {{ .Release.Namespace | quote }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be updated

Suggested change
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "common.names.namespace" . | quote }}

Can you update the other templates too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

port: {{ .Values.scalingMonolithic.service.ports.grpc }}
targetPort: grpc
protocol: TCP
## From here we use non-configurable, standard ports
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about having all these ports here. As far as I understand, the headless service should only have the Query Frontend's service ports as we currently have in the templates/query-frontend/headless-service.yaml file. Are the rest of ports needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was to keep align with the ClusterIP service, so extraPorts can affect both the ClusterIP service and the headless service.
I changed this, to keep minimal required ports. And added new variable in values.yaml, to allow to set extra ports for headless service specifically

@rim99 rim99 force-pushed the support-scaling-monolithic branch 2 times, most recently from 326ce34 to 3523936 Compare January 19, 2025 02:32
Signed-off-by: Zhang Xin <[email protected]>
@rim99 rim99 force-pushed the support-scaling-monolithic branch from 31e46cd to 0494f29 Compare January 19, 2025 02:43
@rim99 rim99 requested a review from jotamartos January 19, 2025 02:44
Signed-off-by: Bitnami Containers <[email protected]>
@carrodher carrodher removed the request for review from jotamartos January 22, 2025 17:24
carrodher and others added 2 commits January 31, 2025 08:46
Signed-off-by: Carlos Rodríguez Hernández <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grafana-tempo in-progress verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[grafana-tempo] Support of scaling single binary mode
5 participants