-
Notifications
You must be signed in to change notification settings - Fork 531
Fix for unmarshalling error for keepequal/dropequal #2794
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
Merged
jaronoff97
merged 20 commits into
open-telemetry:main
from
rashmichandrashekar:rashmi/keepequal-fix
Apr 11, 2024
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3542e28
fix
rashmichandrashekar bbc908f
Merge branch 'main' into rashmi/keepequal-fix
rashmichandrashekar 76cceab
add require
rashmichandrashekar 359bd30
Merge branch 'rashmi/keepequal-fix' of https://github.com/rashmichand…
rashmichandrashekar ee10c4c
Merge branch 'main' into rashmi/keepequal-fix
rashmichandrashekar 68514e3
fixing lint errors
rashmichandrashekar ded0d91
Merge branch 'rashmi/keepequal-fix' of https://github.com/rashmichand…
rashmichandrashekar 028f90a
adding unit tests
rashmichandrashekar 36e1a25
fixing some yaml
rashmichandrashekar e9ae63b
Merge branch 'main' into rashmi/keepequal-fix
rashmichandrashekar 91d2ebe
adding few more tests
rashmichandrashekar b72563b
Merge branch 'rashmi/keepequal-fix' of https://github.com/rashmichand…
rashmichandrashekar e3ef0f9
Merge branch 'main' into rashmi/keepequal-fix
rashmichandrashekar af8e992
fixing lint
rashmichandrashekar 9af2992
Merge branch 'main' into rashmi/keepequal-fix
rashmichandrashekar b9980e6
adding comment
rashmichandrashekar ceb1bd2
Merge branch 'rashmi/keepequal-fix' of https://github.com/rashmichand…
rashmichandrashekar bf11879
Update cmd/otel-allocator/server/server.go
rashmichandrashekar b8b4023
Merge branch 'main' into rashmi/keepequal-fix
rashmichandrashekar 5b4ff61
Merge branch 'main' into rashmi/keepequal-fix
rashmichandrashekar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: bug_fix | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) | ||
component: target allocator | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Fix for keepequal/dropequal action | ||
|
||
# One or more tracking issues related to the change | ||
issues: [2793] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: |
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
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
175 changes: 175 additions & 0 deletions
175
cmd/otel-allocator/server/testdata/prom-config-all-actions.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
collector_selector: | ||
matchlabels: | ||
app.kubernetes.io/instance: default.test | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
prometheus_cr: | ||
scrape_interval: 60s | ||
config: | ||
scrape_configs: | ||
- job_name: job-replace | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
- source_labels: [__meta_kubernetes_pod_label_test] | ||
action: replace | ||
regex: "test$1replacement" | ||
replacement: "myreplacement$$1" | ||
target_label: "mytarget" | ||
metric_relabel_configs: | ||
- action: replace | ||
source_labels: [city] | ||
separator: "," | ||
regex: (ci.*)(name$) | ||
replacement: "test_newest_1_$1" | ||
target_label: city | ||
- job_name: job-lowercase | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
- source_labels: [__meta_kubernetes_pod_label_test] | ||
action: lowercase | ||
target_label: "mytarget" | ||
metric_relabel_configs: | ||
- action: lowercase | ||
source_labels: [city] | ||
target_label: city | ||
- job_name: job-uppercase | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
- source_labels: [__meta_kubernetes_pod_label_test] | ||
action: uppercase | ||
target_label: "mytarget" | ||
metric_relabel_configs: | ||
- action: uppercase | ||
source_labels: [city] | ||
target_label: city | ||
- job_name: job-keep | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
metric_relabel_configs: | ||
- action: keep | ||
source_labels: [city] | ||
separator: "," | ||
regex: (ci.*)(name$) | ||
- job_name: job-drop | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
- source_labels: [__meta_kubernetes_pod_label_droplabel] | ||
action: drop | ||
regex: "prometheus-reference-app" | ||
metric_relabel_configs: | ||
- action: drop | ||
source_labels: [city] | ||
regex: (ci.*)(name$) | ||
- job_name: job-keepequal | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keepequal | ||
target_label: __meta_kubernetes_pod_label_mylabel | ||
metric_relabel_configs: | ||
- action: keepequal | ||
source_labels: [city] | ||
target_label: city | ||
- job_name: job-dropequal | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
- source_labels: [__meta_kubernetes_pod_label_dropequallabel] | ||
action: dropequal | ||
target_label: "test" | ||
metric_relabel_configs: | ||
- action: dropequal | ||
source_labels: [citytest] | ||
target_label: city | ||
- job_name: job-hashmod | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
- source_labels: [__meta_kubernetes_pod_label_hashmod] | ||
action: hashmod | ||
modulus: 5 | ||
regex: "prometheus-reference-app" | ||
target_label: city | ||
metric_relabel_configs: | ||
- action: hashmod | ||
modulus: 5 | ||
source_labels: [city] | ||
regex: (ci.*)(name$) | ||
target_label: city | ||
- job_name: job-labelmap | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
- source_labels: [__meta_kubernetes_pod_label_hashmod] | ||
action: labelmap | ||
regex: "prometheus-reference-app" | ||
target_label: city | ||
metric_relabel_configs: | ||
- action: labelmap | ||
source_labels: [city] | ||
regex: (ci.*)(name$) | ||
target_label: city | ||
- job_name: job-labeldrop | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
- action: labeldrop | ||
regex: "prometheus-reference-app" | ||
metric_relabel_configs: | ||
- action: labeldrop | ||
regex: (ci.*)(name$) | ||
- job_name: job-labelkeep | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
- action: labelkeep | ||
regex: "prometheus-reference-app" | ||
metric_relabel_configs: | ||
- action: labelkeep | ||
regex: (ci.*)(name$$) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
collector_selector: | ||
matchlabels: | ||
app.kubernetes.io/instance: default.test | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
prometheus_cr: | ||
scrape_interval: 60s | ||
config: | ||
scrape_configs: | ||
- job_name: job-no-target-relabel | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
metric_relabel_configs: | ||
- action: replace | ||
source_labels: [city] | ||
separator: "," | ||
regex: (ci.*)(name$) | ||
replacement: "test_newest_1_$1" | ||
target_label: city | ||
- job_name: job-no-metric-relabel | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "prometheus-reference-app" | ||
- source_labels: [__meta_kubernetes_pod_label_test] | ||
action: lowercase | ||
target_label: "mytarget" | ||
- job_name: job-no-relabel | ||
scheme: http | ||
kubernetes_sd_configs: | ||
- role: pod |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
collector_selector: | ||
matchlabels: | ||
app.kubernetes.io/instance: default.test | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
prometheus_cr: | ||
scrape_interval: 60s | ||
config: | ||
scrape_configs: |
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.
Uh oh!
There was an error while loading. Please reload this page.