Repository navigation
Add BYOC resource generation - #3556
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd135749d0
ℹ️ 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".
dd13574 to
a4f135e
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4f135eb9f
ℹ️ 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".
a4f135e to
c1dee15
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1dee15341
ℹ️ 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".
3d3ccb7 to
c1dee15
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d3ccb7d63
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ecd03a4d3
ℹ️ 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".
0ecd03a to
d08cba0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d08cba072a
ℹ️ 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".
| func components(cluster *datadoghqv1alpha1.DatadogBYOCCluster) []component { | ||
| spec := cluster.Spec.Components | ||
| return []component{ | ||
| metastoreComponent(MetastoreComponentName, quickwitMetastoreServiceName, "QW_METASTORE_URI", spec.Metastore), |
There was a problem hiding this comment.
Env variable misnomers are hard to detect and keep aligned across different repos. I suggest to at least group all the env variables on top (or a dedicated env.go).
There was a problem hiding this comment.
I've grouped all the Pomsky configurations in pomsky.go 🙏
ba9f2d6
|
|
||
| config := map[string]any{ | ||
| "version": 0.8, | ||
| "listen_address": "0.0.0.0", |
There was a problem hiding this comment.
(not relevant to the PR) I dream of the day [::] becomes the default and IPv4 is dead. Long live IPv6 :)
| datadoghqv1alpha1 "github.com/DataDog/datadog-operator/api/datadoghq/v1alpha1" | ||
| ) | ||
|
|
||
| func newConfigMap(cluster *datadoghqv1alpha1.DatadogBYOCCluster) (*corev1.ConfigMap, error) { |
There was a problem hiding this comment.
IIUC here we create a new default ConfigMap. How to keep it aligned with Pomsky? What I'm after is to minimise having the same values defined multiples times across different repositories.
|
The code LGTM. However I have a general concern w.r.t. default config/values duplication between the Pomsky helm chart and the values included in this PR. Going forward keeping aligned default config/values across repos is going to be an additional burden to the release process. Before merging this PR, I'd like to have sketched out the workflow for updating config/values in Pomsky between helm chart and operator. As a first step I suggest to group all config values, env var names, etc. in a single file in this PR. |
QW_NUM_CPUS is read from the CPU request through the downward API, which resolves to 0 when neither a CPU request nor a CPU limit is set. Quickwit then uses 0 CPUs instead of falling back to another source. Reject custom resources without any CPU value on every Pomsky component.
Collect component names, environment variable names, ports, probe settings, fixed environment values and the static node configuration in one file so they are easier to keep aligned with the CloudPrem Helm chart. Rendered resources are unchanged.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba9f2d6233
ℹ️ 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".
| InitContainers: spec.InitContainers, | ||
| Containers: []corev1.Container{{ | ||
| Name: appName, | ||
| Image: in.image.GetImageReference(), |
There was a problem hiding this comment.
Reject empty digest overrides before rendering the image
When a release is present and spec.imageOverrides.byoc.digest is explicitly "", the CRD accepts it because digest has no MinLength, and runtime validation only rejects an empty digest when no release is provided. The resolver then treats the non-nil override as authoritative, clearing the release tag and producing a ResolvedImage with neither tag nor digest; this line consequently renders <repository>:, which Kubernetes rejects, so every BYOC workload fails to be created. Reject empty digest values regardless of whether a release is configured, or treat an empty digest as omitted.
Useful? React with 👍 / 👎.
|
So the plan is: in the short term, we’ll use the Pomsky Helm chart as the source of truth and pick up changes made there and apply the same changes to the Operator. In the mid term, I’d like to automate this process. In the long run, I’d like to sunset the Helm chart. |
What does this PR do?
Adds Kubernetes resource generation for
DatadogBYOCCluster:internal/controller/datadogbyoccluster/resources: Builders for the various resources required for a BYOC cluster, except for Observability Pipelines Workers.No reconciler calls these builders yet. The BYOC controller PR wires them in. Child Observability Pipelines Worker generation comes in a later PR. Adds
github.com/imdario/mergoas a direct dependency (already ingo.sum).Checklist
enhancementqa/skip-qalabel