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

Add example otel-collector configurations #1152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tiffanny29631
Copy link
Contributor

No description provided.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from tiffanny29631. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


# Available Configurations

_otel-collector-monarch.yaml_: Serves as a template for exporting metrics
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest bold instead of underline. underline usually implies a link.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or even inline code maybe?

Copy link
Contributor

Choose a reason for hiding this comment

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

This format is italic, not underline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which is the usual format when quoting a book name or doc name? I assume.

# Instructions

* **Apply ConfigMap**: Apply the desired ConfigMap to your cluster.
* **Restart otel-collector**: The otel-collector deployment should restart automatically. If it doesn't, execute:
Copy link
Contributor

Choose a reason for hiding this comment

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

How does it know to restart?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The controller looks for a change in annotation and restarts the pod.

@@ -0,0 +1,152 @@
# Copyright 2024 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

How will we know to update these when we change the gcloud template? Is there any way we can have a linter that produces this from that and then verify it matches without drift?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd prefer we migrate away from the manual templating asap before implementing too much scripts, i.e. having API for monitoring configuration and filtering. These samples exist as a intermediate solution.

//
// - workload identity:
// - e2e-test-metric-writer GSA with roles/monitoring.metricWriter IAM
// - roles/iam.workloadIdentityUser on config-management-monitoring/default for e2e-test-metric-writer
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need this anymore with BYOID, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Tweaking the setup now, the tests are passing on failure scenarios, still working on it.

it := listMetricInGCM(ctx, nt, client, startTime, descriptor)
if includGCM {
return validateMetricInGCM(nt, it, descriptor, nt.ClusterName)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

e2e/testcases/otel_collector_test.go:318:6: SA4004: the surrounding loop is unconditionally terminated (staticcheck)
					return nil
					^

Copy link

@tiffanny29631: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kpt-config-sync-presubmit 7dff4c0 link true /test kpt-config-sync-presubmit

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants