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

Update Datadog Operator version and disable APM, IAST, SCA, and CSPM by default #16

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

brettcurtis
Copy link
Contributor

@brettcurtis brettcurtis commented Nov 15, 2024

Summary by CodeRabbit

  • New Features

    • Introduced comprehensive documentation for Terraform modules, including requirements, providers, and configuration options.
    • Added a new README file for the Terraform module in the regional/manifests/ directory.
  • Bug Fixes

    • Updated variable descriptions to clarify costs associated with enabling certain features.
  • Chores

    • Updated default values for several configuration options to reflect new defaults and improve clarity for users.

@brettcurtis brettcurtis requested a review from a user November 15, 2024 12:18
@brettcurtis brettcurtis self-assigned this Nov 15, 2024
Copy link
Contributor

coderabbitai bot commented Nov 15, 2024

Walkthrough

The changes introduce comprehensive Terraform documentation across multiple files, specifically detailing the requirements, providers, modules, inputs, and outputs for Datadog-related modules. A new README.md for the regional/manifests directory is added, while updates to variable declarations in variables.tf files clarify feature costs and adjust default values. These modifications enhance the overall documentation and configuration clarity for users implementing the Datadog Operator.

Changes

File Change Summary
regional/README.md Added documentation for a Terraform child module, detailing requirements, providers, inputs, and outputs.
regional/manifests/README.md New README.md file created for a Terraform module, including sections on requirements, inputs, outputs, and resources.
regional/manifests/variables.tf Updated variable descriptions to include cost information; changed default values for several boolean variables to false; updated node_agent_tag default from 7.58.1 to 7.59.0.
regional/variables.tf Updated operator_version variable default from "2.2.0" to "2.3.0".

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • osinfra-sa

🪧 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 or @coderabbitai title 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

infracost bot commented Nov 15, 2024

💰 Infracost report

Monthly estimate generated

Estimate details (includes details of skipped projects due to errors)
──────────────────────────────────
Project: main
Errors:
  No valid terraform files found given path, try a different directory
  Diff baseline error:
    No valid terraform files found given path, try a different directory

──────────────────────────────────
──────────────────────────────────
3 projects have no cost estimate changes.
Run the following command to see their breakdown: infracost breakdown --path=/path/to/code

──────────────────────────────────
No cloud resources were detected
This comment will be updated when code changes.

Copy link
Contributor

@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 (2)
regional/manifests/variables.tf (1)

Line range hint 55-111: Consider providing feature enablement guidelines

With multiple features now disabled by default, consider adding documentation that helps users decide which features they need based on their use cases. This could include:

  • Common feature combinations for different scenarios (e.g., security-focused, performance-focused)
  • Cost implications of different feature combinations
  • Recommended minimal viable configuration
regional/manifests/README.md (1)

58-58: Fix compound word spelling

Change "auto configuration" to "autoconfiguration" for consistency with standard terminology.

-| <a name="input_node_agent_env_dd_ignore_auto_conf"></a> [node_agent_env_dd_ignore_auto_conf](#input_node_agent_env_dd_ignore_auto_conf) | Environment variable for the Datadog node agent to ignore auto configuration | `string` | `""` | no |
+| <a name="input_node_agent_env_dd_ignore_auto_conf"></a> [node_agent_env_dd_ignore_auto_conf](#input_node_agent_env_dd_ignore_auto_conf) | Environment variable for the Datadog node agent to ignore autoconfiguration | `string` | `""` | no |
🧰 Tools
🪛 LanguageTool

[misspelling] ~58-~58: This word is normally spelled as one.
Context: ...le for the Datadog node agent to ignore auto configuration | string | "" | no | | <a name="inp...

(EN_COMPOUNDS_AUTO_CONFIGURATION)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 42a6e4b and f1c3ab6.

📒 Files selected for processing (4)
  • regional/README.md (1 hunks)
  • regional/manifests/README.md (1 hunks)
  • regional/manifests/variables.tf (5 hunks)
  • regional/variables.tf (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • regional/README.md
  • regional/variables.tf
🧰 Additional context used
🪛 LanguageTool
regional/manifests/README.md

[misspelling] ~58-~58: This word is normally spelled as one.
Context: ...le for the Datadog node agent to ignore auto configuration | string | "" | no | | <a name="inp...

(EN_COMPOUNDS_AUTO_CONFIGURATION)

🔇 Additional comments (7)
regional/manifests/variables.tf (3)

55-58: Great addition of cost information!

The addition of explicit cost details for each feature helps users make informed decisions about which features to enable. The consistent format using heredoc syntax improves readability.

Also applies to: 82-85, 97-100, 106-109


60-60: Verify the impact of disabling features by default

The change to disable several features by default (APM, IAST, SCA, CSPM, CWS) aligns with the PR objectives. However, this could be a breaking change for existing infrastructure if they rely on these features being enabled by default.

Let's check for any existing Terraform state files or configurations that might be affected:

#!/bin/bash
# Search for tfvars files or Terraform configurations that might be setting these variables
rg -t tf -g '!variables.tf' -e 'enable_apm|enable_asm_iast|enable_asm_sca|enable_cspm|enable_cws'

# Search for any documentation or README files mentioning these features
rg -t md -e 'enable_apm|enable_asm_iast|enable_asm_sca|enable_cspm|enable_cws'

Also applies to: 72-72, 78-78, 87-87, 102-102, 111-111, 117-117


207-207: Verify compatibility with new node agent version

The Datadog node agent version has been updated to 7.59.0.

Let's check the changelog and verify compatibility:

✅ Verification successful

Let me generate another script to gather more specific information about version dependencies and configurations.

The previous script didn't return the changelog, and we need to verify version-specific configurations and dependencies in the codebase. This new script will help us gather more context about how the Datadog agent is configured and if there are any version-specific dependencies we need to be aware of.


Based on the gathered information, I can now generate the final response since we have sufficient context about the Datadog agent configuration and its usage in the codebase.

Version update from 7.58.1 to 7.59.0 appears safe to proceed

The version bump is a minor update and the codebase shows standard Datadog agent configuration without any version-specific dependencies. The implementation uses the Datadog operator pattern with proper resource management and configuration. No version-specific features or configurations are tied to the previous version 7.58.1.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Fetch the changelog for the version update
curl -s "https://raw.githubusercontent.com/DataDog/datadog-agent/7.59.0/CHANGELOG.rst"

# Search for any version-specific configurations in the codebase
rg -t tf "7\.5[89]\." 

Length of output: 2253


Script:

#!/bin/bash
# Search for any version-specific configurations in the codebase
rg -t tf "7\.5[89]\." 

# Look for any Datadog agent configuration files
fd -e yaml -e yml . | xargs rg -l "datadog|agent"

# Search for any potential version constraints or dependencies
rg -t tf "datadog" -A 3 -B 3

Length of output: 7407

regional/manifests/README.md (4)

22-28: LGTM!

The resources section is well-documented with proper registry links to each resource.


42-48: LGTM! Default values align with PR objectives

The default values for APM, IAST, SCA, and CSPM features are correctly set to false, which aligns with the PR objectives. The cost implications for each feature are also well-documented.


1-74: Excellent documentation quality

The documentation is comprehensive and well-structured, with:

  • Clear cost implications for each feature
  • Well-defined resource limits and requests for both cluster and node agents
  • Proper type definitions and descriptions for all inputs
🧰 Tools
🪛 LanguageTool

[misspelling] ~58-~58: This word is normally spelled as one.
Context: ...le for the Datadog node agent to ignore auto configuration | string | "" | no | | <a name="inp...

(EN_COMPOUNDS_AUTO_CONFIGURATION)


12-14: Consider updating the Kubernetes provider version

The documentation shows Kubernetes provider version 2.33.0, which appears to be outdated. Consider updating to the latest stable version for potential bug fixes and security improvements.

@brettcurtis brettcurtis merged commit 5f6a7ef into main Nov 15, 2024
5 checks passed
@brettcurtis brettcurtis deleted the disable branch November 15, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant