Skip to content

Add Observability Pipelines Worker CRD and named BYOC pipelines - #3531

Merged
shuheiktgw merged 4 commits into
mainfrom
add-byoc-named-pipelines
Oct 5, 2026
Merged

shuheiktgw merged 4 commits into
mainfrom
add-byoc-named-pipelines

Conversation

@shuheiktgw

@shuheiktgw shuheiktgw commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the namespaced DatadogObservabilityPipelinesWorker v1alpha1 CRD.
The diff is large, but most of it is autogenerated. The changes worth reviewing are:

  • api/datadoghq/v1alpha1/datadogbyoccluster_types.go
  • api/datadoghq/v1alpha1/datadogobservabilitypipelinesworker_types.go

Motivation

Defines the Worker API alongside the named BYOC pipelines that will create OP Workers. This completes the API refinements following #3501 and establishes the API needed by the upcoming BYOC and Worker implementation PRs.

Checklist

  • PR has at least one valid label: enhancement
  • PR has a milestone or the qa/skip-qa label
  • All commits are signed (see: signing commits)

@shuheiktgw shuheiktgw added enhancement New feature or request qa/skip-qa labels Sep 29, 2026
@shuheiktgw shuheiktgw changed the title Add named pipelines to DatadogBYOCCluster Add Observability Pipelines Worker CRD and named BYOC pipelines Sep 29, 2026
@datadog-datadog-prod-us1-2

This comment has been minimized.

@shuheiktgw
shuheiktgw force-pushed the add-byoc-named-pipelines branch from 58461bb to ecd7770 Compare September 29, 2026 13:40
@shuheiktgw
shuheiktgw marked this pull request as ready for review September 29, 2026 13:46
@shuheiktgw
shuheiktgw requested a review from a team September 29, 2026 13:46
@shuheiktgw
shuheiktgw requested a review from a team as a code owner September 29, 2026 13:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 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-05T08:56:03.216359Z e9d555d 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ecd7770fe7

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread api/datadoghq/v1alpha1/datadogobservabilitypipelinesworker_types.go
// Identity configures the Kubernetes identity used by the BYOC workloads.
// Identity configures an existing ServiceAccount used by the BYOC workloads, excluding the pipelines.
// When ServiceAccountName is omitted, the controller creates and owns a ServiceAccount named after the cluster.
// +optional

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.

I've slightly changed the interface so users can choose whether they want the operator to manage the SA or manage it themselves.

// +kubebuilder:validation:MinItems=1
// +listType=map
// +listMapKey=name
Pipelines []DatadogBYOCClusterPipelineSpec `json:"pipelines,omitempty"`

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.

It turns out a single BYOC cluster can have multiple OP workers, so I've extended the interface to support that.

@shuheiktgw
shuheiktgw force-pushed the add-byoc-named-pipelines branch from 1dce5f8 to cf5eb82 Compare September 29, 2026 14:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf5eb8275a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread api/datadoghq/v1alpha1/datadogobservabilitypipelinesworker_types.go
// +kubebuilder:validation:MinItems=1
// +listType=map
// +listMapKey=name
Pipelines []DatadogBYOCClusterPipelineSpec `json:"pipelines,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since each entry will materialize a DatadogObservabilityPipelinesWorker, could we document the intended ownership contract for BYOC-created Workers?

My expectation would be:

  • the BYOC cluster owns and reconciles the complete spec of generated Workers;
  • direct edits to those Workers are unsupported and reverted;
  • standalone Workers without a BYOC owner remain user-managed;
  • a same-name Worker not owned by this cluster is reported as a conflict rather than adopted or overwritten.

I don’t think this necessarily requires an API change for the first alpha, but making the rule explicit before implementing reconciliation would prevent the parent and child from becoming competing sources of truth.

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.

Documented the ownership contract on the Pipelines field in 7118354.

@Mallets Mallets left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

// Name identifies the pipeline within the cluster and is used in the worker resource name.
// Changing Name creates a new worker and deletes the previous one.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit - if this name is going to be used in other k8s resource names probably could be lower maxLength.

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.

Lowered it to 10 in e9d555d 🙏

// Identity configures an existing ServiceAccount used by the worker.
// When ServiceAccountName is omitted, the controller creates and owns a dedicated worker ServiceAccount.
// +optional
Identity *DatadogBYOCClusterIdentitySpec `json:"identity,omitempty"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit - not sure if it's intentional but types declared in two CRD files reference each other. autoscaling solves this by using common package, probably moving some of the types form cluster to pipelines is enough in this case.

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.

Let me handle that as a follow-up! 🙏

@shuheiktgw
shuheiktgw merged commit b152e10 into main Oct 5, 2026
30 of 40 checks passed
@shuheiktgw
shuheiktgw deleted the add-byoc-named-pipelines branch October 5, 2026 09:22
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.

3 participants