Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "Network"
crdName: networks.config.openshift.io
featureGates:
- NetworkObservabilityInstall
tests:
onCreate:
- name: Should be able to set NetworkObservability with empty string (default)
initial: |
apiVersion: config.openshift.io/v1
kind: Network
spec:
networkObservability:
installationPolicy: ""
expected: |
apiVersion: config.openshift.io/v1
kind: Network
spec:
networkObservability:
installationPolicy: ""
- name: Should be able to set NetworkObservability InstallAndEnable
initial: |
apiVersion: config.openshift.io/v1
kind: Network
spec:
networkObservability:
installationPolicy: InstallAndEnable
expected: |
apiVersion: config.openshift.io/v1
kind: Network
spec:
networkObservability:
installationPolicy: InstallAndEnable
- name: Should be able to set NetworkObservability DoNotInstall
initial: |
apiVersion: config.openshift.io/v1
kind: Network
spec:
networkObservability:
installationPolicy: DoNotInstall
expected: |
apiVersion: config.openshift.io/v1
kind: Network
spec:
networkObservability:
installationPolicy: DoNotInstall
35 changes: 35 additions & 0 deletions config/v1/types_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ type NetworkSpec struct {
//
// +optional
NetworkDiagnostics NetworkDiagnostics `json:"networkDiagnostics"`

// networkObservability is an optional field that configures network observability installation
// during cluster deployment (day-0).
// When omitted, network observability will be installed unless this is a SNO cluster.
// +openshift:enable:FeatureGate=NetworkObservabilityInstall
// +optional
NetworkObservability NetworkObservabilitySpec `json:"networkObservability,omitempty,omitzero"`
}

// NetworkStatus is the current network configuration.
Expand Down Expand Up @@ -304,3 +311,31 @@ type NetworkDiagnosticsTargetPlacement struct {
// +listType=atomic
Tolerations []corev1.Toleration `json:"tolerations"`
}

// NetworkObservabilityInstallationPolicy is an enumeration of the available network observability installation policies
// Valid values are "", "InstallAndEnable", "DoNotInstall".
// +kubebuilder:validation:Enum="";InstallAndEnable;DoNotInstall
type NetworkObservabilityInstallationPolicy string

const (
// NetworkObservabilityNoOpinion means that the user has no opinion and the platform is left
// to choose reasonable defaults. The current default is to install and enable network observability.
// This is subject to change over time.
NetworkObservabilityNoOpinion NetworkObservabilityInstallationPolicy = ""
// NetworkObservabilityInstallAndEnable means that network observability should be installed and enabled during cluster deployment
NetworkObservabilityInstallAndEnable NetworkObservabilityInstallationPolicy = "InstallAndEnable"
// NetworkObservabilityDoNotInstall means that network observability should not be installed
NetworkObservabilityDoNotInstall NetworkObservabilityInstallationPolicy = "DoNotInstall"
)

// NetworkObservabilitySpec defines the configuration for network observability installation
// +kubebuilder:validation:MinProperties=1
type NetworkObservabilitySpec struct {
// installationPolicy controls whether network observability is installed during cluster deployment.
// Valid values are "", "InstallAndEnable" and "DoNotInstall".
// When set to "", network observability will be installed unless this is a SNO cluster.
// When set to "InstallAndEnable", network observability will be installed and enabled.
// When set to "DoNotInstall", network observability will not be installed.
// +optional
InstallationPolicy *NetworkObservabilityInstallationPolicy `json:"installationPolicy,omitempty"`
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
release.openshift.io/bootstrap-required: "true"
release.openshift.io/feature-set: OKD
name: networks.config.openshift.io
spec:
group: config.openshift.io
Expand Down

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions config/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion config/v1/zz_generated.featuregated-crd-manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ networks.config.openshift.io:
CRDName: networks.config.openshift.io
Capability: ""
Category: ""
FeatureGates: []
FeatureGates:
- NetworkObservabilityInstall
FilenameOperatorName: config-operator
FilenameOperatorOrdering: "01"
FilenameRunLevel: "0000_10"
Expand Down
Loading