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

fix(k8s-infra): enable k8sattributes to match other information #488

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

grandwizard28
Copy link
Contributor

@grandwizard28 grandwizard28 commented Aug 23, 2024

Summary

New Features

  • Introduced a new k8snode detector to add k8s.node.uid for hostmetrics.
  • Updated logging configuration to the new streamlined container parser for better maintainability.

Fixes

  • The removal of k8s.pod.uid and k8s.pod.ip attributes and the inclusion of k8s.node.name attribute instead should resolve the interference issue with the k8sprocessor and improve its ability to match and enrich telemetry data accurately.

Chores

  • Incremented Helm chart version and OpenTelemetry collector image version for new features and improvements.

@grandwizard28 grandwizard28 requested a review from a team as a code owner August 23, 2024 16:19
@grandwizard28
Copy link
Contributor Author

grandwizard28 commented Aug 23, 2024

This should close #460

Copy link

coderabbitai bot commented Sep 19, 2024

Walkthrough

This pull request introduces updates to the k8s-infra Helm chart, including an increment in the version number from 0.11.11 to 0.11.12 and an application version update from 0.88.0 to 0.109.0. It adds a new k8snode detector configuration for Kubernetes nodes, modifies the OpenTelemetry agent's environment variable settings, and streamlines the logging configuration in values.yaml by consolidating parsers and expanding metadata fields.

Changes

Files Change Summary
charts/k8s-infra/Chart.yaml - Updated version from 0.11.11 to 0.11.12
- Updated appVersion from 0.88.0 to 0.109.0
charts/k8s-infra/templates/_config.tpl - Added k8snode configuration under processors: resourcedetection/internal
charts/k8s-infra/templates/otel-agent/daemonset.yaml - Modified OTEL_RESOURCE_ATTRIBUTES to include k8s.node.name instead of k8s.pod.uid and k8s.pod.ip
charts/k8s-infra/values.yaml - Updated otelAgent.image tag from 0.88.0 to 0.109.0
- Added multiple fields to extractMetadatas: k8s.deployment.name, k8s.statefulset.name, k8s.daemonset.name, k8s.cronjob.name, k8s.job.name, k8s.node.name, k8s.node.uid

Possibly related PRs

  • chore(k8s-infra): bump to 0.11.11 #501: The changes in this PR involve an update to the Chart.yaml file for the k8s-infra Helm chart, specifically modifying the version number, which is directly related to the version update in the main PR from 0.11.11 to 0.11.12.

Suggested reviewers

  • prashant-shahi

Poem

In the meadow where the code does play,
A new version hops in, hip-hip-hooray!
With nodes detected and logs refined,
Our Helm chart's ready, perfectly aligned.
So let’s celebrate with a joyful cheer,
For the changes made, we hold so dear! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range and nitpick comments (1)
charts/k8s-infra/values.yaml (1)

185-191: LGTM! Consider assessing the impact of additional metadata on performance and storage.

Extracting additional metadata fields will provide more comprehensive monitoring and observability of the Kubernetes environment. However, please assess the impact of this change on the system's performance and storage requirements, as it may increase the size of the collected telemetry data.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6510c14 and 3599313.

Files selected for processing (4)
  • charts/k8s-infra/Chart.yaml (1 hunks)
  • charts/k8s-infra/templates/_config.tpl (1 hunks)
  • charts/k8s-infra/templates/otel-agent/daemonset.yaml (1 hunks)
  • charts/k8s-infra/values.yaml (3 hunks)
Files skipped from review due to trivial changes (1)
  • charts/k8s-infra/Chart.yaml
Additional comments not posted (4)
charts/k8s-infra/templates/otel-agent/daemonset.yaml (1)

Line range hint 102-106: LGTM! The changes align with the PR objective and should enhance observability.

The removal of k8s.pod.uid and k8s.pod.ip attributes and the inclusion of k8s.node.name attribute instead should resolve the interference issue with the k8sprocessor and improve its ability to match and enrich telemetry data accurately.

Shifting the focus to node-specific attributes may provide a more stable and consistent view of the system, as nodes are less ephemeral compared to pods. This change should enhance the overall observability without negatively impacting the flexibility to append additional resource attributes based on user-defined presets.

charts/k8s-infra/templates/_config.tpl (1)

367-370: LGTM! The k8snode detector is a valuable addition.

The new k8snode detector in the resourcedetection/internal processor enables automatic detection and addition of Kubernetes node metadata to the collected telemetry data. This enhances the context and usefulness of the telemetry for analysis and troubleshooting.

The use of the K8S_NODE_NAME environment variable provides flexibility in specifying the node name, while the serviceAccount authentication type ensures secure communication with the Kubernetes API server.

charts/k8s-infra/values.yaml (2)

126-127: Verify compatibility of the container-parser with different logging formats.

The change to introduce a single container-parser aligns with the PR objective to streamline the logging configuration. However, please verify that this single parser can handle all the different container logging formats (Docker, CRI-O, Containerd) that were previously handled by separate parsers.


244-244: Review release notes and verify compatibility before deploying the OpenTelemetry collector image upgrade.

Upgrading to version 0.109.0 of the OpenTelemetry collector image is beneficial to leverage the latest features and bug fixes. However, please review the release notes of this version to understand the specific changes and their potential impact on the existing setup. Also, verify the compatibility of the new version with other components in the system before deploying this change.

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

Successfully merging this pull request may close these issues.

2 participants