Documentation
¶
Index ¶
Constants ¶
View Source
const ( // environment name definition MaxQueueSizeKey = "MAX_QSIZE" // daemon pod queue size TickerIntervalKey = "TICKER_INTERVAL" // synchronizer ticker interval NodeNameKey = "K8S_NODENAME" // common constant PodStatusField = "status.phase" PodStatusRunning = "Running" JoinLabelName = "multi-nicd-join" UnmanagedLabelName = "multi-nic-unmanaged" HostNameLabel = "hostname" DefNameLabel = "netname" TestModeLabel = "test-mode" DefaultDaemonPort = 11000 DeamonLabelKey = "app" DaemonLabelValue = "multi-nicd" ServiceAccountName = "multi-nic-cni-operator-controller-manager" DefaultOperatorNamespace = "multi-nic-cni-operator" DefaultCNIType = "multi-nic" DefaultIPAMType = "multi-nic-ipam" DefaultDaemonImage = "ghcr.io/foundation-model-stack/multi-nic-cni-daemon:v1.3.0" DefaultJoinPath = "/join" DefaultInterfacePath = "/interface" DefaultAddRoutePath = "/addl3" DefaultDeleteRoutePath = "/deletel3" DefaultUrgentReconcileTime time.Duration = 5 * time.Second DefaultNormalReconcileTime time.Duration = time.Minute DefaultLongReconcileTime time.Duration = 10 * time.Minute DefaultContextTimeout time.Duration = 2 * time.Minute DefaultLogLevel = 4 APIServerToleration = 5 // maximum retry if getting error from api server timeout APIServerTolerationWaitTime time.Duration = 2 * time.Second // multus-related constants MultusLabelKey = "app" MultusLabelValue = "multus" DefaultCNIHostPath = "/var/lib/cni/bin" CNIBinVolumeName = "cnibin" // errors ConnectionRefusedError = "connection refused" NotFoundError = "not found" ThrottlingError = "throttling" )
Variables ¶
View Source
var ( // var set from environment (cannot be changed on-the-fly by configmap) MaxQueueSize int = InitIntFromEnv(MaxQueueSizeKey, 100) TickerInterval time.Duration = time.Duration(InitIntFromEnv(TickerIntervalKey, 10)) * time.Minute // var overrided by config CR MultiNICIPAMType string = DefaultIPAMType TargetCNI string = DefaultCNIType DaemonPort int = DefaultDaemonPort UrgentReconcileTime time.Duration = DefaultUrgentReconcileTime NormalReconcileTime time.Duration = DefaultNormalReconcileTime LongReconcileTime time.Duration = DefaultLongReconcileTime ContextTimeout time.Duration = DefaultContextTimeout // logger options to change log level on the fly ZapOpts *zap.Options SetupLog logr.Logger DaemonLog logr.Logger DefLog logr.Logger CIDRLog logr.Logger HifLog logr.Logger IPPoolLog logr.Logger NetworkLog logr.Logger ConfigLog logr.Logger SyncLog logr.Logger )
Functions ¶
func InitIntFromEnv ¶
InitIntFromEnv initialize int value from environment key or set to default if not set or invalid
func IsUnmanaged ¶
func IsUnmanaged(metadata metav1.ObjectMeta) bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.