Documentation ¶
Index ¶
Constants ¶
View Source
const ( MountedCNINetDir = "mounted-cni-net-dir" CNINetDir = "cni-net-dir" CNIConfName = "cni-conf-name" ChainedCNIPlugin = "chained-cni-plugin" CNINetworkConfigFile = "cni-network-config-file" CNINetworkConfig = "cni-network-config" LogLevel = "log-level" KubeconfigFilename = "kubecfg-file-name" KubeconfigMode = "kubeconfig-mode" KubeCAFile = "kube-ca-file" SkipTLSVerify = "skip-tls-verify" SkipCNIBinaries = "skip-cni-binaries" UpdateCNIBinaries = "update-cni-binaries" )
Variables ¶
View Source
var ( CNIBinDir = "/opt/cni/bin" HostCNIBinDir = "/host/opt/cni/bin" SecondaryBinDir = "/host/secondary-bin-dir" ServiceAccountPath = "/var/run/secrets/kubernetes.io/serviceaccount" DefaultKubeconfigMode = 0o600 // K8s liveness and readiness endpoints LivenessEndpoint = "/healthz" ReadinessEndpoint = "/readyz" Port = "8000" )
Internal constants
Functions ¶
func GetCommand ¶
GetCommand returns the main cobra.Command object for this application
func StartServer ¶
StartServer initializes and starts a web server that exposes liveness and readiness endpoints at port 8000.
Types ¶
type Config ¶
type Config struct { // Location of the CNI config files in the host's filesystem CNINetDir string // Location of the CNI config files in the container's filesystem (mount location of the CNINetDir) MountedCNINetDir string // Name of the CNI config file CNIConfName string // Whether to install CNI plugin as a chained or standalone ChainedCNIPlugin bool // CNI config template file CNINetworkConfigFile string // CNI config template string CNINetworkConfig string // Logging level LogLevel string // Name of the kubeconfig file used by the CNI plugin KubeconfigFilename string // The file mode to set when creating the kubeconfig file KubeconfigMode int // CA file for kubeconfig KubeCAFile string // Whether to use insecure TLS in the kubeconfig file SkipTLSVerify bool // KUBERNETES_SERVICE_PROTOCOL K8sServiceProtocol string // KUBERNETES_SERVICE_HOST K8sServiceHost string // KUBERNETES_SERVICE_PORT K8sServicePort string // KUBERNETES_NODE_NAME K8sNodeName string // Directory from where the CNI binaries should be copied CNIBinSourceDir string // Directories into which to copy the CNI binaries CNIBinTargetDirs []string // Whether to override existing CNI binaries UpdateCNIBinaries bool // The names of binaries to skip when copying SkipCNIBinaries []string }
Config struct defines the MSM CNI installation options
Click to show internal directories.
Click to hide internal directories.