-
Notifications
You must be signed in to change notification settings - Fork 72
OAS-11733 [Feature] Add scrape annotations for ArangoD pods #2000
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
Changes from all commits
fdc4d7d
5cd16b8
53036eb
9a04517
ddcd369
eafc0ee
3fc9b82
48b2d3d
3b7a6c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -714,6 +714,14 @@ func (testCase *testCaseStruct) createTestPodData(deployment *Deployment, group | |
| Finalizers: finalizers(group), | ||
| } | ||
|
|
||
| metrics := deployment.GetSpec().Metrics | ||
| if metrics.IsEnabled() { | ||
| testCase.ExpectedPod.ObjectMeta.Annotations = map[string]string{ | ||
| utilConstants.AnnotationMetricsScrapeLabel: "true", | ||
| utilConstants.AnnotationMetricsScrapePort: strconv.Itoa(shared.ArangoExporterPort), | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Test ignores deployment/group annotations when setting expected annotationsThe test creates expected annotations with only scrape annotations, completely ignoring any deployment-level or group-level annotations. The production code in |
||
| } | ||
|
|
||
| groupSpec := testCase.ArangoDeployment.Spec.GetServerGroupSpec(group) | ||
| testCase.ExpectedPod.Spec.Tolerations = deployment.resources.CreatePodTolerations(group, groupSpec) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Test uses hardcoded port instead of group spec value
The test sets the expected port annotation using
shared.ArangoExporterPortdirectly, but the implementation inpod_creator_arangod.gousesm.GroupSpec.GetExporterPort()which can return a custom port ifExporterPortis configured. ThegroupSpecis retrieved on line 725 but not used to set the expected port. This mismatch means tests with custom exporter ports would fail, or custom port functionality would go untested.