Skip to content

Commit

Permalink
Merge pull request openshift#1890 from kyrtapz/ssa_list
Browse files Browse the repository at this point in the history
NO-JIRA: Set listType for .status.serviceNetwork and .status.clusterNetwork in networks.config
  • Loading branch information
openshift-merge-bot[bot] authored May 16, 2024
2 parents 0f9dbca + ac55c2c commit a20192e
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 7 deletions.
7 changes: 7 additions & 0 deletions config/v1/types_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ type Network struct {
type NetworkSpec struct {
// IP address pool to use for pod IPs.
// This field is immutable after installation.
// +listType=atomic
ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork"`

// IP address pool for services.
// Currently, we only support a single entry here.
// This field is immutable after installation.
// +listType=atomic
ServiceNetwork []string `json:"serviceNetwork"`

// NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN).
Expand Down Expand Up @@ -90,10 +92,12 @@ type NetworkSpec struct {
// NetworkStatus is the current network configuration.
type NetworkStatus struct {
// IP address pool to use for pod IPs.
// +listType=atomic
ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork,omitempty"`

// IP address pool for services.
// Currently, we only support a single entry here.
// +listType=atomic
ServiceNetwork []string `json:"serviceNetwork,omitempty"`

// NetworkType is the plugin that is deployed (e.g. OpenShiftSDN).
Expand Down Expand Up @@ -148,6 +152,7 @@ type ExternalIPConfig struct {
// ExternalIPPolicy rules.
// Currently, only one entry may be provided.
// +optional
// +listType=atomic
AutoAssignCIDRs []string `json:"autoAssignCIDRs,omitempty"`
}

Expand All @@ -156,11 +161,13 @@ type ExternalIPConfig struct {
// The policy controller always allows automatically assigned external IPs.
type ExternalIPPolicy struct {
// allowedCIDRs is the list of allowed CIDRs.
// +listType=atomic
AllowedCIDRs []string `json:"allowedCIDRs,omitempty"`

// rejectedCIDRs is the list of disallowed CIDRs. These take precedence
// over allowedCIDRs.
// +optional
// +listType=atomic
RejectedCIDRs []string `json:"rejectedCIDRs,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ spec:
type: integer
type: object
type: array
x-kubernetes-list-type: atomic
externalIP:
description: externalIP defines configuration for controllers that
affect Service.ExternalIP. If nil, then ExternalIP is not allowed
Expand All @@ -80,6 +81,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
policy:
description: policy is a set of restrictions applied to the ExternalIP
field. If nil or empty, then ExternalIP is not allowed to be
Expand All @@ -90,12 +92,14 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
rejectedCIDRs:
description: rejectedCIDRs is the list of disallowed CIDRs.
These take precedence over allowedCIDRs.
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
type: object
networkDiagnostics:
Expand Down Expand Up @@ -254,6 +258,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
serviceNodePortRange:
description: The port range allowed for Services of type NodePort.
If not specified, the default of 30000-32767 will be used. Such
Expand Down Expand Up @@ -291,6 +296,7 @@ spec:
type: integer
type: object
type: array
x-kubernetes-list-type: atomic
clusterNetworkMTU:
description: ClusterNetworkMTU is the MTU for inter-pod networking.
type: integer
Expand Down Expand Up @@ -424,6 +430,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
required:
- spec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ spec:
type: integer
type: object
type: array
x-kubernetes-list-type: atomic
externalIP:
description: externalIP defines configuration for controllers that
affect Service.ExternalIP. If nil, then ExternalIP is not allowed
Expand All @@ -81,6 +82,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
policy:
description: policy is a set of restrictions applied to the ExternalIP
field. If nil or empty, then ExternalIP is not allowed to be
Expand All @@ -91,12 +93,14 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
rejectedCIDRs:
description: rejectedCIDRs is the list of disallowed CIDRs.
These take precedence over allowedCIDRs.
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
type: object
networkType:
Expand All @@ -112,6 +116,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
serviceNodePortRange:
description: The port range allowed for Services of type NodePort.
If not specified, the default of 30000-32767 will be used. Such
Expand Down Expand Up @@ -143,6 +148,7 @@ spec:
type: integer
type: object
type: array
x-kubernetes-list-type: atomic
clusterNetworkMTU:
description: ClusterNetworkMTU is the MTU for inter-pod networking.
type: integer
Expand Down Expand Up @@ -200,6 +206,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
required:
- spec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ spec:
type: integer
type: object
type: array
x-kubernetes-list-type: atomic
externalIP:
description: externalIP defines configuration for controllers that
affect Service.ExternalIP. If nil, then ExternalIP is not allowed
Expand All @@ -81,6 +82,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
policy:
description: policy is a set of restrictions applied to the ExternalIP
field. If nil or empty, then ExternalIP is not allowed to be
Expand All @@ -91,12 +93,14 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
rejectedCIDRs:
description: rejectedCIDRs is the list of disallowed CIDRs.
These take precedence over allowedCIDRs.
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
type: object
networkDiagnostics:
Expand Down Expand Up @@ -255,6 +259,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
serviceNodePortRange:
description: The port range allowed for Services of type NodePort.
If not specified, the default of 30000-32767 will be used. Such
Expand Down Expand Up @@ -292,6 +297,7 @@ spec:
type: integer
type: object
type: array
x-kubernetes-list-type: atomic
clusterNetworkMTU:
description: ClusterNetworkMTU is the MTU for inter-pod networking.
type: integer
Expand Down Expand Up @@ -349,6 +355,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
required:
- spec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ spec:
type: integer
type: object
type: array
x-kubernetes-list-type: atomic
externalIP:
description: externalIP defines configuration for controllers that
affect Service.ExternalIP. If nil, then ExternalIP is not allowed
Expand All @@ -81,6 +82,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
policy:
description: policy is a set of restrictions applied to the ExternalIP
field. If nil or empty, then ExternalIP is not allowed to be
Expand All @@ -91,12 +93,14 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
rejectedCIDRs:
description: rejectedCIDRs is the list of disallowed CIDRs.
These take precedence over allowedCIDRs.
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
type: object
networkType:
Expand All @@ -112,6 +116,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
serviceNodePortRange:
description: The port range allowed for Services of type NodePort.
If not specified, the default of 30000-32767 will be used. Such
Expand Down Expand Up @@ -143,6 +148,7 @@ spec:
type: integer
type: object
type: array
x-kubernetes-list-type: atomic
clusterNetworkMTU:
description: ClusterNetworkMTU is the MTU for inter-pod networking.
type: integer
Expand Down Expand Up @@ -276,6 +282,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
required:
- spec
Expand Down
35 changes: 35 additions & 0 deletions openapi/generated_openapi/zz_generated.openapi.go

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

Loading

0 comments on commit a20192e

Please sign in to comment.