Documentation

Index

Constants

View Source
const (
	SystemCNIConfDir = "/etc/kubernetes/cni/net.d"
	MultusCNIConfDir = "/var/run/multus/cni/net.d"
	CNIBinDir        = "/var/lib/cni/bin"
)
View Source
const CLUSTER_CONFIG_NAME = "cluster-config-v1"
View Source
const CLUSTER_CONFIG_NAMESPACE = "kube-system"
View Source
const (
	OVNProvider = "ovn"
)
View Source
const OVN_CERT_CN = "ovn"
View Source
const OVN_MASTER_DISCOVERY_POLL = 5
View Source
const OVN_MASTER_DISCOVERY_TIMEOUT = 280
View Source
const OVN_NB_PORT = "9641"
View Source
const OVN_NB_RAFT_PORT = "9643"
View Source
const OVN_SB_PORT = "9642"
View Source
const OVN_SB_RAFT_PORT = "9644"

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(conf *operv1.NetworkSpec, client client.Client) (*bootstrap.BootstrapResult, error)

Bootstrap creates resources required by SDN on the cloud.

func DeprecatedCanonicalize

func DeprecatedCanonicalize(conf *operv1.NetworkSpec)

DeprecatedCanonicalize converts configuration to a canonical form for backward compatibility.

*** DO NOT ADD ANY NEW CANONICALIZATION TO THIS FUNCTION! ***

Altering the user-provided configuration from CNO causes problems when other components need to look at the configuration before CNO starts. Users should just write the configuration in the correct form to begin with.

However, we cannot remove any of the existing canonicalizations because this might break existing clusters.

func FillDefaults

func FillDefaults(conf, previous *operv1.NetworkSpec)

FillDefaults computes any default values and applies them to the configuration This is a mutating operation. It should be called after Validate.

Defaults are carried forward from previous if it is provided. This is so we can change defaults as we move forward, but won't disrupt existing clusters.

func IsChangeSafe

func IsChangeSafe(prev, next *operv1.NetworkSpec) error

IsChangeSafe checks to see if the change between prev and next are allowed FillDefaults and Validate should have been called, but beware that prev may be from an older version.

func MergeClusterConfig

func MergeClusterConfig(operConf *operv1.NetworkSpec, clusterConf configv1.NetworkSpec)

MergeClusterConfig merges the cluster configuration into the real CRD configuration.

func Render

func Render(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.BootstrapResult, manifestDir string) ([]*uns.Unstructured, error)

func StatusFromOperatorConfig

func StatusFromOperatorConfig(operConf *operv1.NetworkSpec, oldStatus *configv1.NetworkStatus) *configv1.NetworkStatus

StatusFromOperatorConfig generates the cluster NetworkStatus from the currently applied operator configuration.

func Validate

func Validate(conf *operv1.NetworkSpec) error

Validate checks that the supplied configuration is reasonable. This should be called after Canonicalize

func ValidateClusterConfig

func ValidateClusterConfig(clusterConfig configv1.NetworkSpec) error

ValidateClusterConfig ensures the cluster config is valid.

Types

This section is empty.