Skip to content

CORS-4308: Enable Network Observability during installation - #10382

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
OlivierCazade:day0
Aug 19, 2026
Merged

CORS-4308: Enable Network Observability during installation#10382
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
OlivierCazade:day0

Conversation

@OlivierCazade

@OlivierCazade OlivierCazade commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

networking: Add day-0 installation support for Network Observability

Summary

This PR implements day-0 installation support for Network Observability as described in the enhancement proposal.

Network Observability is enabled by default except for Single Node OpenShift (SNO). If you do not want Network Observability, add the following in the install-config.yaml file.

spec:
  networkObservability:
    installationPolicy: NoAction

Please note that during Tech Preview, this feature is behind a feature gate called NetworkObservabilityInstall. Therefore, this feature is not active until you first enable the feature gate.

Summary by CodeRabbit

  • New Features

    • Added configuration options for network observability during cluster installation.
    • Users can choose to install and enable network observability, prevent installation, or use the default behavior.
    • Added schema validation and support for preserving these settings in configuration handling.
  • Bug Fixes

    • Ensured network observability settings are correctly included in generated cluster networking configuration.

@openshift-ci-robot

openshift-ci-robot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

@OlivierCazade: This pull request references CORS-4308 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

networking: Add day-0 installation support for Network Observability

⚠️ Temporary Dependency: This PR currently points to a temporary branch of github.com/openshift/api to include the installNetworkObservability field in the Network CR spec. This dependency must be updated to point to the official release before merging.

Summary

This PR implements day-0 installation support for Network Observability as described in the enhancement proposal.

Users can now enable Network Observability during cluster installation by setting the installNetworkObservability field in the install-config.yaml networking section. When enabled (or omitted, as it defaults to "Enable"), the installer will configure the cluster to deploy Network Observability on day-0.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 11, 2026
@coderabbitai

coderabbitai Bot commented Mar 11, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d5cce71-c567-4e63-8234-0eab9a0de840

📥 Commits

Reviewing files that changed from the base of the PR and between 4745066 and 441304f.

⛔ Files ignored due to path filters (2)
  • data/data/install.openshift.io_installconfigs.yaml is excluded by !data/data/install.openshift.io_installconfigs.yaml
  • pkg/types/zz_generated.deepcopy.go is excluded by !**/zz_generated*
📒 Files selected for processing (4)
  • pkg/asset/manifests/network.go
  • pkg/types/defaults/installconfig.go
  • pkg/types/defaults/installconfig_test.go
  • pkg/types/installconfig.go
💤 Files with no reviewable changes (1)
  • pkg/types/defaults/installconfig.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/types/defaults/installconfig_test.go
  • pkg/asset/manifests/network.go
  • pkg/types/installconfig.go

📝 Walkthrough

Walkthrough

The installer adds optional network observability settings to install-config, preserves explicit policies during defaulting, updates the generated install-config schema, deep-copies the new fields, and passes the policy to the generated Network manifest.

Changes

Network observability configuration

Layer / File(s) Summary
Configuration contract
pkg/types/installconfig.go, data/data/install.openshift.io_installconfigs.yaml, pkg/types/zz_generated.deepcopy.go
The install-config API and schema define optional network observability settings and installation policies. Deep-copy methods handle the new fields.
Default and explicit policy handling
pkg/types/defaults/installconfig.go, pkg/types/defaults/installconfig_test.go
Defaulting no longer sets a network observability policy. Tests cover omitted configuration and preservation of NoAction and InstallAndEnable.
Network manifest wiring
pkg/asset/manifests/network.go
Network manifest generation adds the configured installation policy to the network specification before assigning it to the Network object.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: enabling Network Observability during installation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR adds only static t.Run names: “NetworkObservability nil”, “NoAction”, and “InstallAndEnable”; no Ginkgo title APIs or dynamic values are introduced.
Test Structure And Quality ✅ Passed The PR changes only standard Go table-driven tests; no Ginkgo It blocks, cluster resources, Eventually calls, or indefinite waits were introduced.
Microshift Test Compatibility ✅ Passed The PR adds only standard Go unit-test cases in pkg/types/defaults/installconfig_test.go; it adds no Ginkgo e2e tests or MicroShift-incompatible test references.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds only standard Go table tests with testing.T and t.Run; no new Ginkgo It/Describe/Context/When e2e tests or multi-node assumptions exist.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only Network CR installation-policy plumbing and types. The diff adds no workload manifests or scheduling constraints such as affinity, spread, selectors, replicas, PDBs, or tolerati...
Ote Binary Stdout Contract ✅ Passed The complete PR diff changes only installer schemas, types, defaults, tests, and manifests; it adds no stdout/logging calls or OTE process-entrypoint code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The change adds only standard Go table tests in TestSetInstallConfigDefaults; no new Ginkgo e2e tests, IPv4 assumptions, or external connectivity are present.
No-Weak-Crypto ✅ Passed The cumulative PR diff adds only Network Observability configuration, manifest wiring, deepcopy code, tests, and schema. No MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons...
Container-Privileges ✅ Passed The commit adds only network-observability configuration and assignment logic. No changed line introduces privileged:true, host PID/network/IPC, SYS_ADMIN, root execution, or allowPrivilegeEscalati...
No-Sensitive-Data-In-Logs ✅ Passed The complete PR diff adds configuration and manifest generation only; no logging, print calls, or sensitive values appear in added lines.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from barbacbd and sadasu March 11, 2026 10:58
@openshift-ci-robot

openshift-ci-robot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

@OlivierCazade: This pull request references CORS-4308 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

networking: Add day-0 installation support for Network Observability

⚠️ Temporary Dependency: This PR currently points to a temporary branch of github.com/openshift/api to include the installNetworkObservability field in the Network CR spec. This dependency must be updated to point to the official release before merging.

Summary

This PR implements day-0 installation support for Network Observability as described in the enhancement proposal.

Users can now enable Network Observability during cluster installation by setting the installNetworkObservability field in the install-config.yaml networking section. When enabled (or omitted, as it defaults to "Enable"), the installer will configure the cluster to deploy Network Observability on day-0.

Summary by CodeRabbit

Release Notes

  • New Features

  • Added optional network observability configuration to cluster networking. The new setting supports "Enable" and "Disable" values, defaulting to "Enable" when not specified.

  • Tests

  • Added test coverage for the network observability configuration option and its default behavior.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🧹 Nitpick comments (1)
pkg/types/defaults/installconfig_test.go (1)

290-315: Add the explicit empty-string case too.

"" is part of the allowed enum, but the new table only exercises nil and "Disable". A case with InstallNetworkObservability: ptr("") would lock down whether defaults should preserve the empty string or normalize it to "Enable".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/types/defaults/installconfig_test.go` around lines 290 - 315, Add a third
table-driven test case exercising the explicit empty-string enum for
Networking.InstallNetworkObservability: create a new entry in the test slice
with name like "InstallNetworkObservability empty string", set config:
&types.InstallConfig{Networking: &types.Networking{InstallNetworkObservability:
func() *string { s := ""; return &s }()}}, and set expected to the result you
expect (either keep empty string or normalize to "Enable") by cloning
defaultInstallConfig() and adjusting c.Networking.InstallNetworkObservability
accordingly; this ensures the behavior of InstallNetworkObservability for "" is
locked down in the tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@data/data/install.openshift.io_installconfigs.yaml`:
- Around line 4799-4802: The enum currently allows an empty-string value ("")
alongside "Enable" and "Disable" but the schema description only documents
omitted, "Enable" and "Disable"; update the enum to remove the blank entry or
explicitly document the blank as equivalent to the intended behavior (e.g.,
treat "" as omitted or as "Enable") so there's no ambiguity—modify the enum list
(remove the line with - "") or add a sentence to the field description
clarifying how "" is interpreted.
- Around line 4794-4803: Add an explicit default for the
installNetworkObservability property in the CRD schema so schema-driven tooling
matches runtime behavior: update the installNetworkObservability property (the
block with description, enum, and type) to include a default: "Enable" entry
(ensuring the string value matches the enum entries), e.g., add default: Enable
under the same indentation as enum/type; keep the existing enum and type
unchanged.

In `@go.mod`:
- Line 393: Remove the temporary replace directive that points openshift/api to
the personal fork: delete the line "replace github.com/openshift/api
v0.0.0-20260228183123-9b2ee997d297 => github.com/OlivierCazade/api
v0.0.0-20260310172058-df85794acda8" from go.mod and, if needed, run `go get` or
`go mod tidy` to restore a proper official github.com/openshift/api revision so
all imports of github.com/openshift/api (e.g., config/v1, machine/v1,
machine/v1beta1, machineconfiguration/v1, operator/v1) resolve to the upstream
module rather than the fork.

In `@pkg/types/installconfig.go`:
- Around line 429-435: In validateNetworking(), add an explicit validation for
the InstallNetworkObservability field to reject any value other than the allowed
set ("", "Enable", "Disable"); locate the InstallNetworkObservability pointer on
the InstallConfig type and if non-nil check its value and append a field error
(using the same error accumulation approach used in validateNetworking) for the
json field "installNetworkObservability" when it is not one of the three allowed
strings so invalid values are rejected before manifest generation.

---

Nitpick comments:
In `@pkg/types/defaults/installconfig_test.go`:
- Around line 290-315: Add a third table-driven test case exercising the
explicit empty-string enum for Networking.InstallNetworkObservability: create a
new entry in the test slice with name like "InstallNetworkObservability empty
string", set config: &types.InstallConfig{Networking:
&types.Networking{InstallNetworkObservability: func() *string { s := ""; return
&s }()}}, and set expected to the result you expect (either keep empty string or
normalize to "Enable") by cloning defaultInstallConfig() and adjusting
c.Networking.InstallNetworkObservability accordingly; this ensures the behavior
of InstallNetworkObservability for "" is locked down in the tests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 87623f3e-7184-4fb6-99f7-4eb911b3e0bb

📥 Commits

Reviewing files that changed from the base of the PR and between dea68b7 and 79ef0ab.

⛔ Files ignored due to path filters (6)
  • go.sum is excluded by !**/*.sum
  • pkg/types/zz_generated.deepcopy.go is excluded by !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1/types_network.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (6)
  • data/data/install.openshift.io_installconfigs.yaml
  • go.mod
  • pkg/asset/manifests/network.go
  • pkg/types/defaults/installconfig.go
  • pkg/types/defaults/installconfig_test.go
  • pkg/types/installconfig.go

Comment on lines +4794 to +4803
installNetworkObservability:
description: |-
InstallNetworkObservability is an optional field that enables network observability
when omitted or set to "Enable". If the field is set to "Disable", it does nothing.
Valid values are "", "Enable", "Disable".
enum:
- ""
- Enable
- Disable
type: string

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Declare the default in the schema.

The PR defaults this field to "Enable" when it is omitted, but the CRD schema does not advertise that with a default: entry. That leaves schema-driven tooling and CRD defaulting out of sync with the documented behavior.

Suggested fix
               installNetworkObservability:
                 description: |-
                   InstallNetworkObservability is an optional field that enables network observability
                   when omitted or set to "Enable". If the field is set to "Disable", it does nothing.
                   Valid values are "", "Enable", "Disable".
+                default: Enable
                 enum:
                 - ""
                 - Enable
                 - Disable
                 type: string
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
installNetworkObservability:
description: |-
InstallNetworkObservability is an optional field that enables network observability
when omitted or set to "Enable". If the field is set to "Disable", it does nothing.
Valid values are "", "Enable", "Disable".
enum:
- ""
- Enable
- Disable
type: string
installNetworkObservability:
description: |-
InstallNetworkObservability is an optional field that enables network observability
when omitted or set to "Enable". If the field is set to "Disable", it does nothing.
Valid values are "", "Enable", "Disable".
default: Enable
enum:
- ""
- Enable
- Disable
type: string
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@data/data/install.openshift.io_installconfigs.yaml` around lines 4794 - 4803,
Add an explicit default for the installNetworkObservability property in the CRD
schema so schema-driven tooling matches runtime behavior: update the
installNetworkObservability property (the block with description, enum, and
type) to include a default: "Enable" entry (ensuring the string value matches
the enum entries), e.g., add default: Enable under the same indentation as
enum/type; keep the existing enum and type unchanged.

Comment thread data/data/install.openshift.io_installconfigs.yaml Outdated
Comment thread go.mod Outdated
sigs.k8s.io/cluster-api-provider-azure => github.com/mboersma/cluster-api-provider-azure v0.3.1-0.20251030205607-3161b9cc8d3e
)

replace github.com/openshift/api v0.0.0-20260228183123-9b2ee997d297 => github.com/OlivierCazade/api v0.0.0-20260310172058-df85794acda8 No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== replace directive =="
sed -n '390,394p' go.mod

echo
echo "== repo imports that still resolve through github.com/openshift/api =="
rg -n -C1 '"github\.com/openshift/api/' --type=go -g '!vendor/**'

Repository: openshift/installer

Length of output: 50375


Do not merge with the personal-fork openshift/api replace still in place.

This makes the branch depend on github.com/OlivierCazade/api instead of an official github.com/openshift/api revision. The codebase imports from github.com/openshift/api across numerous packages (config/v1, machine/v1, machine/v1beta1, machineconfiguration/v1, features, operator/v1, and more), all of which would be satisfied by the temporary fork if merged. This introduces a supply-chain and reproducibility risk to main and must be reverted before merge.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` at line 393, Remove the temporary replace directive that points
openshift/api to the personal fork: delete the line "replace
github.com/openshift/api v0.0.0-20260228183123-9b2ee997d297 =>
github.com/OlivierCazade/api v0.0.0-20260310172058-df85794acda8" from go.mod
and, if needed, run `go get` or `go mod tidy` to restore a proper official
github.com/openshift/api revision so all imports of github.com/openshift/api
(e.g., config/v1, machine/v1, machine/v1beta1, machineconfiguration/v1,
operator/v1) resolve to the upstream module rather than the fork.

Comment thread pkg/types/installconfig.go Outdated
Comment on lines +429 to +435
// InstallNetworkObservability is an optional field that enables network observability
// when omitted or set to "Enable". If the field is set to "Disable", it does nothing.
// Valid values are "", "Enable", "Disable".
//
// +kubebuilder:validation:Enum="";Enable;Disable
// +optional
InstallNetworkObservability *string `json:"installNetworkObservability,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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== validate install-config entry points =="
fd 'installconfig\.go$' pkg/types/validation -x sed -n '120,220p' {}

echo
echo "== references to the new field in validation code =="
rg -n -C3 'InstallNetworkObservability|validateNetworking\s*\(' pkg/types/validation

Repository: openshift/installer

Length of output: 6902


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Get the validateNetworking function starting from line 505
echo "=== validateNetworking function (full implementation) ==="
sed -n '505,700p' pkg/types/validation/installconfig.go

# Also check if InstallNetworkObservability is mentioned anywhere in the validation files
echo ""
echo "=== Search for InstallNetworkObservability in validation ==="
rg -n 'InstallNetworkObservability' pkg/types/validation/

Repository: openshift/installer

Length of output: 9479


Add enum validation for InstallNetworkObservability in the validation logic.

The validateNetworking() function in pkg/types/validation/installconfig.go does not validate the InstallNetworkObservability field. The kubebuilder tag documents the enum but does not enforce it at the installer level. Add an explicit check to reject values outside "", "Enable", and "Disable" to prevent invalid values from reaching manifest generation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/types/installconfig.go` around lines 429 - 435, In validateNetworking(),
add an explicit validation for the InstallNetworkObservability field to reject
any value other than the allowed set ("", "Enable", "Disable"); locate the
InstallNetworkObservability pointer on the InstallConfig type and if non-nil
check its value and append a field error (using the same error accumulation
approach used in validateNetworking) for the json field
"installNetworkObservability" when it is not one of the three allowed strings so
invalid values are rejected before manifest generation.

@barbacbd barbacbd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@OlivierCazade

  1. you should squash or remove multiple commits here. Your first three commits are all overwritting/renaming the same variable.
  2. We generally only add to the install-config when absolutely necessary so I will take a closer look to see if this is that case.
  3. If this is a new feature, we default to previous settings. In this case I believe that the default should be disabled (unless that is going to break something or that is not the equivalent to a previous setting).
  4. It does happen but very rare for us to merge something with a local version of a dependency. If you wish to merge this, the api change will probably need to be applied first then we can change the reference in your final commit.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 18, 2026
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 24, 2026
@openshift-ci-robot

openshift-ci-robot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

@OlivierCazade: This pull request references CORS-4308 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

networking: Add day-0 installation support for Network Observability

⚠️ Temporary Dependency: This PR currently points to a temporary branch of github.com/openshift/api to include the installNetworkObservability field in the Network CR spec. This dependency must be updated to point to the official release before merging.

Summary

This PR implements day-0 installation support for Network Observability as described in the enhancement proposal.

Users can now enable Network Observability during cluster installation by setting the installNetworkObservability field in the install-config.yaml networking section. When enabled (or omitted, as it defaults to "Enable"), the installer will configure the cluster to deploy Network Observability on day-0.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@OlivierCazade

Copy link
Copy Markdown
Contributor Author

@barbacbd thanks for your feedback.

  1. I squashed the commits together

  2. The goal of the Enhancement proposal is to have network observability enabled by default. This PR is more about providing providing a way for the user to disable it at the installation level and not after installation.
    You can find more information in the EP here : Enable Network Observability on Day 0 enhancements#1908

  3. The goal of the local dependency is not to be merged. It is to provide a working branch here while the API PR is getting reviewed. The PR is here : CORENET-6714: Enable Network Observability on Day 0 api#2752

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@data/data/install.openshift.io_installconfigs.yaml`:
- Around line 5009-5022: The schema allows an explicit empty
networkObservability object to bypass defaults and manifest emission; either
make installationPolicy required in the networkObservability schema (so
installationPolicy must be present) or change the defaulting logic so that when
networkObservability is present but has no installationPolicy (i.e.,
networkObservability: {}), the defaulting routine that sets installationPolicy
(see installconfig defaulting code) populates a value; after implementing the
schema or defaulting change, add a regression test that validates behavior for
networkObservability: {} to ensure installationPolicy is set and manifests are
emitted as expected.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 73a72032-3040-4194-8303-28237406c2b4

📥 Commits

Reviewing files that changed from the base of the PR and between 79ef0ab and 559f222.

⛔ Files ignored due to path filters (6)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/openshift/api/config/v1/types_network.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift/api/features/features.go is excluded by !vendor/**, !**/vendor/**
📒 Files selected for processing (9)
  • data/data/install.openshift.io_installconfigs.yaml
  • go.mod
  • pkg/asset/agent/installconfig_test.go
  • pkg/asset/installconfig/installconfig_test.go
  • pkg/asset/manifests/network.go
  • pkg/types/defaults/installconfig.go
  • pkg/types/defaults/installconfig_test.go
  • pkg/types/installconfig.go
  • pkg/types/zz_generated.deepcopy.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • pkg/types/defaults/installconfig.go
  • pkg/asset/manifests/network.go
  • go.mod
  • pkg/types/installconfig.go

Comment thread data/data/install.openshift.io_installconfigs.yaml

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
pkg/types/defaults/installconfig_test.go (1)

292-324: Add a regression case for NetworkObservability: {} with nil InstallationPolicy

The new tests cover NetworkObservability == nil and explicit DoNotInstall, but not the case where NetworkObservability exists and InstallationPolicy is omitted. That case is important for defaulting safety.

Suggested test case
+		{
+			name: "NetworkObservability present with nil InstallationPolicy",
+			config: &types.InstallConfig{
+				Networking: &types.Networking{
+					NetworkObservability: &types.NetworkObservability{},
+				},
+			},
+			expected: defaultInstallConfig(),
+		},

As per coding guidelines, Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/types/defaults/installconfig_test.go` around lines 292 - 324, Add a
regression test case that exercises an InstallConfig where
Networking.NetworkObservability is non-nil but its InstallationPolicy is nil:
create a test entry similar to the existing cases using config:
&types.InstallConfig{Networking: &types.Networking{NetworkObservability:
&types.NetworkObservability{ /* no InstallationPolicy set */ }}}, and set
expected to defaultInstallConfig() with NetworkObservability present and its
InstallationPolicy defaulted as the code under test should produce; reference
types.InstallConfig, types.Networking, types.NetworkObservability,
InstallationPolicy and defaultInstallConfig to locate where to add the new case.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/types/defaults/installconfig.go`:
- Around line 61-66: The current defaulting only sets
c.Networking.NetworkObservability when it's nil, so if
c.Networking.NetworkObservability exists but its InstallationPolicy is nil the
default is not applied; update the logic around
c.Networking.NetworkObservability to ensure that after ensuring the struct
exists (or creating it) you also check if
c.Networking.NetworkObservability.InstallationPolicy == nil and, if so, assign a
new variable set to types.NetworkObservabilityInstallAndEnable and assign its
address to InstallationPolicy; reference the existing symbols
c.Networking.NetworkObservability, InstallationPolicy, and
types.NetworkObservabilityInstallAndEnable when making this change.

---

Nitpick comments:
In `@pkg/types/defaults/installconfig_test.go`:
- Around line 292-324: Add a regression test case that exercises an
InstallConfig where Networking.NetworkObservability is non-nil but its
InstallationPolicy is nil: create a test entry similar to the existing cases
using config: &types.InstallConfig{Networking:
&types.Networking{NetworkObservability: &types.NetworkObservability{ /* no
InstallationPolicy set */ }}}, and set expected to defaultInstallConfig() with
NetworkObservability present and its InstallationPolicy defaulted as the code
under test should produce; reference types.InstallConfig, types.Networking,
types.NetworkObservability, InstallationPolicy and defaultInstallConfig to
locate where to add the new case.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 39f1f094-ddf3-4fc8-8190-15e509e670a3

📥 Commits

Reviewing files that changed from the base of the PR and between 559f222 and dda89f5.

⛔ Files ignored due to path filters (7)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/openshift/api/config/v1/types_network.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift/api/features/features.go is excluded by !vendor/**, !**/vendor/**
  • vendor/modules.txt is excluded by !vendor/**, !**/vendor/**
📒 Files selected for processing (9)
  • data/data/install.openshift.io_installconfigs.yaml
  • go.mod
  • pkg/asset/agent/installconfig_test.go
  • pkg/asset/installconfig/installconfig_test.go
  • pkg/asset/manifests/network.go
  • pkg/types/defaults/installconfig.go
  • pkg/types/defaults/installconfig_test.go
  • pkg/types/installconfig.go
  • pkg/types/zz_generated.deepcopy.go
✅ Files skipped from review due to trivial changes (3)
  • pkg/asset/installconfig/installconfig_test.go
  • pkg/asset/manifests/network.go
  • pkg/types/installconfig.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • go.mod
  • pkg/asset/agent/installconfig_test.go

Comment thread pkg/types/defaults/installconfig.go Outdated
Comment on lines +61 to +66
if c.Networking.NetworkObservability == nil {
installationPolicy := types.NetworkObservabilityInstallAndEnable
c.Networking.NetworkObservability = &types.NetworkObservability{
InstallationPolicy: &installationPolicy,
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Default policy is not applied when NetworkObservability exists but InstallationPolicy is omitted

Line 61 only defaults when NetworkObservability is nil. If a user sets networkObservability: {}, InstallationPolicy remains nil, so the “default Enable” behavior is skipped.

Proposed fix
-	if c.Networking.NetworkObservability == nil {
-		installationPolicy := types.NetworkObservabilityInstallAndEnable
-		c.Networking.NetworkObservability = &types.NetworkObservability{
-			InstallationPolicy: &installationPolicy,
-		}
-	}
+	if c.Networking.NetworkObservability == nil {
+		c.Networking.NetworkObservability = &types.NetworkObservability{}
+	}
+	if c.Networking.NetworkObservability.InstallationPolicy == nil {
+		installationPolicy := types.NetworkObservabilityInstallAndEnable
+		c.Networking.NetworkObservability.InstallationPolicy = &installationPolicy
+	}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if c.Networking.NetworkObservability == nil {
installationPolicy := types.NetworkObservabilityInstallAndEnable
c.Networking.NetworkObservability = &types.NetworkObservability{
InstallationPolicy: &installationPolicy,
}
}
if c.Networking.NetworkObservability == nil {
c.Networking.NetworkObservability = &types.NetworkObservability{}
}
if c.Networking.NetworkObservability.InstallationPolicy == nil {
installationPolicy := types.NetworkObservabilityInstallAndEnable
c.Networking.NetworkObservability.InstallationPolicy = &installationPolicy
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/types/defaults/installconfig.go` around lines 61 - 66, The current
defaulting only sets c.Networking.NetworkObservability when it's nil, so if
c.Networking.NetworkObservability exists but its InstallationPolicy is nil the
default is not applied; update the logic around
c.Networking.NetworkObservability to ensure that after ensuring the struct
exists (or creating it) you also check if
c.Networking.NetworkObservability.InstallationPolicy == nil and, if so, assign a
new variable set to types.NetworkObservabilityInstallAndEnable and assign its
address to InstallationPolicy; reference the existing symbols
c.Networking.NetworkObservability, InstallationPolicy, and
types.NetworkObservabilityInstallAndEnable when making this change.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 24, 2026
@mffiedler

Copy link
Copy Markdown

@OlivierCazade Can you rebase and re-test? @barbacbd Let us know if you have additional comments. Trying to get this one moving again.

Add support for controlling network observability installation via the
networkObservability field in the install config. This field contains
an installationPolicy that accepts "InstallAndEnable", "DoNotInstall",
or empty string values, and defaults to "InstallAndEnable" when omitted.

The field is propagated from the install config through to the cluster
Network resource spec during manifest generation, allowing network
observability to be installed by default with an opt-out mechanism.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@OlivierCazade: This pull request references CORS-4308 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

networking: Add day-0 installation support for Network Observability

⚠️ Temporary Dependency: This PR currently points to a temporary branch of github.com/openshift/api to include the installNetworkObservability field in the Network CR spec. This dependency must be updated to point to the official release before merging.

Summary

This PR implements day-0 installation support for Network Observability as described in the enhancement proposal.

Users can now enable Network Observability during cluster installation by setting the installNetworkObservability field in the install-config.yaml networking section. When enabled (or omitted, as it defaults to "Enable"), the installer will configure the cluster to deploy Network Observability on day-0.

Summary by CodeRabbit

  • New Features

  • Added network observability configuration to cluster installation settings.

  • Administrators can choose to install and enable network observability, or prevent its installation.

  • When unspecified, network observability is installed by default except on single-node clusters.

  • Bug Fixes

  • Ensured network observability settings are correctly included when generating cluster network configuration.

  • Tests

  • Added coverage for omitted, enabled, and disabled network observability policies.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/asset/installconfig/installconfig_test.go`:
- Line 132: Run the repository Go formatter via hack/go-fmt.sh . and ensure the
Networking composite literals around the affected test cases are formatted
consistently with surrounding fields.

In `@pkg/types/installconfig.go`:
- Around line 820-827: Update ValidateInstallConfig’s networking validation,
using the nested NetworkObservability.InstallationPolicy field, to accept only
the InstallAndEnable and NoAction constants before manifest generation; return a
validation error for any other value and add coverage for an invalid policy such
as “Bogus”.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 56806be7-6e55-450f-94c3-cd80b7d9e1e5

📥 Commits

Reviewing files that changed from the base of the PR and between 4745066 and ae6952c.

⛔ Files ignored due to path filters (2)
  • data/data/install.openshift.io_installconfigs.yaml is excluded by !data/data/install.openshift.io_installconfigs.yaml
  • pkg/types/zz_generated.deepcopy.go is excluded by !**/zz_generated*
📒 Files selected for processing (6)
  • pkg/asset/agent/installconfig_test.go
  • pkg/asset/installconfig/installconfig_test.go
  • pkg/asset/manifests/network.go
  • pkg/types/defaults/installconfig.go
  • pkg/types/defaults/installconfig_test.go
  • pkg/types/installconfig.go
💤 Files with no reviewable changes (1)
  • pkg/types/defaults/installconfig.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/types/defaults/installconfig_test.go
  • pkg/asset/manifests/network.go

},
},
},
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Run the repository Go formatter on these literals.

The closing Networking composite literals at Line 132, Line 233, and Line 289 are more indented than the surrounding fields. Run hack/go-fmt.sh . before merge.

As per coding guidelines, Go changes must use the repository formatting scripts.

Also applies to: 233-233, 289-289

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/asset/installconfig/installconfig_test.go` at line 132, Run the
repository Go formatter via hack/go-fmt.sh . and ensure the Networking composite
literals around the affected test cases are formatted consistently with
surrounding fields.

Source: Coding guidelines

Comment thread pkg/types/installconfig.go Outdated
Comment on lines +820 to +827
// NetworkObservability defines the configuration for network observability installation
type NetworkObservability struct {
// InstallationPolicy controls whether network observability is installed during cluster deployment.
// Valid values are "InstallAndEnable" and "NoAction".
// When set to "InstallAndEnable", network observability will be installed and enabled.
// When set to "NoAction", nothing will be done regarding network observability.
// +optional
InstallationPolicy *NetworkObservabilityInstallationPolicy `json:"installationPolicy,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.

🎯 Functional Correctness | 🟠 Major

Reject invalid InstallationPolicy values before manifest generation.

The change adds the enum marker, but the supplied code does not show an installer-side check in ValidateInstallConfig. pkg/asset/manifests/network.go casts the value directly to the API enum. If a value such as "Bogus" reaches that path, the installer can emit an invalid Network object and fail later. Validate Networking.NetworkObservability.InstallationPolicy against the two constants and test an invalid value.

This is the same validation gap raised in the previous review, updated for the nested field.

#!/bin/bash
set -euo pipefail

rg -n -C 8 \
  'validateNetworking|NetworkObservability|InstallationPolicy' \
  pkg/types/validation
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/types/installconfig.go` around lines 820 - 827, Update
ValidateInstallConfig’s networking validation, using the nested
NetworkObservability.InstallationPolicy field, to accept only the
InstallAndEnable and NoAction constants before manifest generation; return a
validation error for any other value and add coverage for an invalid policy such
as “Bogus”.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@stleerh

stleerh commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@barbacbd This has been rebased, updated, and ready to be merged. Please review.

The two other related PRs at openshift/api #2752 and openshift/cluster-network-operator#3087 are already merged.

@stleerh

stleerh commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

/retest

@stleerh

stleerh commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

/test e2e-aws-ovn

@sadasu sadasu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good overall. I have a couple of Nits that will not hold merging.

},
expected: func() *types.InstallConfig {
c := defaultInstallConfig()
doNotInstall := types.NetworkObservabilityDoNotInstall

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: This can be define along with installationPolicy at line 24 and used here and at line 312.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was outdated.

Comment thread pkg/types/installconfig.go
@sadasu

sadasu commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 18, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@stleerh

stleerh commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Who can /approve?

}
return c
}(),
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need a test here that add a value "Test value" to installationPolicy to see what error message is reported.

Comment thread pkg/types/installconfig.go
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 18, 2026
…ues.

If there is no `networkObservability` settings in install-config.yaml,
then it shouldn't set anything in the Network config CR instead of
setting it to InstallAndEnable. This is important since these two states
have slightly different meanings. InstallAndEnable will enable on SNO,
whereas the default (no setting) will not.

Valid values for `installationPolicy` are "InstallAndEnable" and
"NoAction".
@stleerh

stleerh commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

/retest

@openshift-ci

openshift-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

@OlivierCazade: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-agent-compact-ipv4-iso-no-registry dda89f5 link false /test e2e-agent-compact-ipv4-iso-no-registry

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@stleerh

stleerh commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

/retest

@stleerh

stleerh commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

/test e2e-aws-ovn

@sadasu

sadasu commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@sadasu

sadasu commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

/verified by @stleerh

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 19, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@openshift-ci

openshift-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sadasu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Aug 19, 2026
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 19, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@sadasu: This PR has been marked as verified by @stleerh.

Details

In response to this:

/verified by @stleerh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-merge-bot
openshift-merge-bot Bot merged commit a8f8c36 into openshift:main Aug 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants