Skip to content

Split BYOC component workloads behind a workload interface - #3656

Open
shuheiktgw wants to merge 1 commit into
mainfrom
shuheiktgw/refactor_byoc_component_workload
Open

shuheiktgw wants to merge 1 commit into
mainfrom
shuheiktgw/refactor_byoc_component_workload

Conversation

@shuheiktgw

@shuheiktgw shuheiktgw commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Refactors how BYOC components are rendered in internal/controller/datadogbyoccluster/resources. There is no behavior change.

  • component no longer carries fields that only make sense for some components (stateful, strategy, database, databaseURIEnv, decommissionTimeoutEnv).
  • A new workload interface has two implementations: deploymentWorkload in deployment.go and statefulSetWorkload in stateful_set.go. They own the workload specific configurations.
  • components() now builds the component-specific environment variables (metastore database URI, decommission timeouts) up front into extraEnv. component.env() is gone.

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label
  • All commits are signed

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T14:26:18.101015Z d5b54d8 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Pipelines  Code Coverage

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 55.48% (+0.03%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d5b54d8 | Docs | View more details | Give us feedback!

@shuheiktgw
shuheiktgw force-pushed the shuheiktgw/refactor_byoc_component_workload branch from c6c6186 to 9280dc0 Compare October 23, 2026 13:08
Replace the Deployment/StatefulSet-specific fields of component with a
workload interface implemented by deploymentWorkload and
statefulSetWorkload, and precompute component-specific environment
variables into extraEnv.
@shuheiktgw
shuheiktgw force-pushed the shuheiktgw/refactor_byoc_component_workload branch from 9280dc0 to d5b54d8 Compare October 23, 2026 14:24
// decommissionTimeoutEnv is set to a fraction of the termination grace period.
decommissionTimeoutEnv string
// workload renders the controller running the pods of a component.
type workload interface {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The name workload is a bit awkward here since we already have workload.go, but I don't want to rename files as it would create too many diffs for this small improvement. I'll clean it up in a separate PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant