summaryrefslogtreecommitdiff
path: root/vendor/github.com/openshift/api/config/v1/types_network.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/openshift/api/config/v1/types_network.go')
-rw-r--r--vendor/github.com/openshift/api/config/v1/types_network.go27
1 files changed, 16 insertions, 11 deletions
diff --git a/vendor/github.com/openshift/api/config/v1/types_network.go b/vendor/github.com/openshift/api/config/v1/types_network.go
index a60c5f7dc..a09c5fe8e 100644
--- a/vendor/github.com/openshift/api/config/v1/types_network.go
+++ b/vendor/github.com/openshift/api/config/v1/types_network.go
@@ -6,14 +6,16 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// Network holds cluster-wide information about Network. The canonical name is `cluster`
-// TODO this object is an example of a possible grouping and is subject to change or removal
+// Network holds cluster-wide information about Network. The canonical name is `cluster`. It is used to configure the desired network configuration, such as: IP address pools for services/pod IPs, network plugin, etc.
+// Please view network.spec for an explanation on what applies when configuring this resource.
type Network struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
+ metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// spec holds user settable values for configuration.
+ // As a general rule, this SHOULD NOT be read directly. Instead, you should
+ // consume the NetworkStatus, as it indicates the currently deployed configuration.
+ // Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each.
// +kubebuilder:validation:Required
// +required
Spec NetworkSpec `json:"spec"`
@@ -25,14 +27,15 @@ type Network struct {
// NetworkSpec is the desired network configuration.
// As a general rule, this SHOULD NOT be read directly. Instead, you should
// consume the NetworkStatus, as it indicates the currently deployed configuration.
-// Currently, changing ClusterNetwork, ServiceNetwork, or NetworkType after
-// installation is not supported.
+// Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each.
type NetworkSpec struct {
// IP address pool to use for pod IPs.
+ // This field is immutable after installation.
ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork"`
// IP address pool for services.
// Currently, we only support a single entry here.
+ // This field is immutable after installation.
ServiceNetwork []string `json:"serviceNetwork"`
// NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN).
@@ -40,10 +43,12 @@ type NetworkSpec struct {
// or else no networking will be installed.
// Currently supported values are:
// - OpenShiftSDN
+ // This field is immutable after installation.
NetworkType string `json:"networkType"`
// externalIP defines configuration for controllers that
- // affect Service.ExternalIP
+ // affect Service.ExternalIP. If nil, then ExternalIP is
+ // not allowed to be set.
// +optional
ExternalIP *ExternalIPConfig `json:"externalIP,omitempty"`
}
@@ -71,6 +76,7 @@ type ClusterNetworkEntry struct {
CIDR string `json:"cidr"`
// The size (prefix) of block to allocate to each node.
+ // +kubebuilder:validation:Minimum=0
HostPrefix uint32 `json:"hostPrefix"`
}
@@ -78,8 +84,7 @@ type ClusterNetworkEntry struct {
// of a Service resource.
type ExternalIPConfig struct {
// policy is a set of restrictions applied to the ExternalIP field.
- // If nil, any value is allowed for an ExternalIP. If the empty/zero
- // policy is supplied, then ExternalIP is not allowed to be set.
+ // If nil or empty, then ExternalIP is not allowed to be set.
// +optional
Policy *ExternalIPPolicy `json:"policy,omitempty"`
@@ -111,7 +116,7 @@ type ExternalIPPolicy struct {
type NetworkList struct {
metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
metav1.ListMeta `json:"metadata"`
- Items []Network `json:"items"`
+
+ Items []Network `json:"items"`
}