Add statefulset for metrics generator#2533
Merged
zalegrala merged 14 commits intografana:mainfrom Jul 6, 2023
Merged
Conversation
mapno
requested changes
Jun 19, 2023
Contributor
mapno
left a comment
There was a problem hiding this comment.
The explanation sounds good to me, very detailed. The migration plan makes sense 👍
It's missing the new statefulset in jsonnet-compiled, no? Otherwise, it LGTM
Contributor
Author
|
Nice, thanks @mapno. I just needed to add that new file. I've pushed a commit for this. Let me know if you spot anything else I missed. |
mapno
approved these changes
Jun 21, 2023
mdisibio
reviewed
Jun 22, 2023
yvrhdn
approved these changes
Jul 6, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
Updates
microservicesjsonnet to support astatefulsetfor themetrics_generatorcomponent.BREAKING CHANGE:
To support a new
processor, the metrics generator has been converted from adeploymentinto astatefulsetwith a PVC. This will require manual intervention in order to migrate successfully and avoid downtime. Note that currently both adeploymentand astatefulsetwill be managed by the jsonnet for a period of time, after which we will delete thedeploymentfrom this repo and you will need to delete user-side references to thetempo_metrics_generator_deployment, as well as delete thedeploymentitself.First, just as with the
ingesterconfiguration, you will need to specify apvc_sizeand apvc_storage_classfor themetrics_generatorPVC configuration. For example:{ _config+:: { metrics_generator+: { pvc_size: '10Gi', pvc_storage_class: 'local-path', }, } }Any user-side overrides for the
tempo_metrics_generator_deploymentneed to be considered for thetempo_metrics_generator_statefulsetobject.Currently, the
deplymentreplicas are set to0by default in the jsonnet, while thestatefulsetinherits replica configuration from the$._configobject. To keep thedeploymentreplicas around and make the transition without an outage, you can keep the replicas by overriding the following key.This will maintain the same number of replicas you have specified in the configuration for the
statefulset. Note that this will be approximately double the resource requirements for a period of time while you stabilize the ring and prepare to scale down thedeployment.You can check memberlist either with the
tempo_memberlist_client_cluster_members_countmetric, or you can visit thehttp://tempo:3200/memberlistpage to see that metrics generator instances for both thestatefulsetanddeploymentare available.Once all instances are healthy, you can begin to scale down your
deploymentand delete the above reference to thetempo_metrics_generator_deployment.Without handling the above, a brief outage will be incurred for the metrics-generator, but everything should be functioning again once the
statefulsetfor the metrics-generator is up and available.Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]