Documentation ¶
Overview ¶
Package cni contains supported CNI version definitions and helpers for managing CNIs in KKP. The CNIs are managed either as addons (e.g. Canal, see the `addons` folder) or via the Applications infra (e.g. Cilium starting from version 1.13.0, see pkg/controller/seed-controller-manager/cni-application-installation-controller).
Index ¶
- Constants
- func GetAllowedCNIPluginVersions(cniPluginType kubermaticv1.CNIPluginType) (sets.Set[string], error)
- func GetDefaultCNIPluginVersion(cniPluginType kubermaticv1.CNIPluginType) string
- func GetSupportedCNIPluginVersions(cniPluginType kubermaticv1.CNIPluginType) (sets.Set[string], error)
- func GetSupportedCNIPlugins() sets.Set[string]
- func IsManagedByAppInfra(cniType kubermaticv1.CNIPluginType, cniVersion string) bool
- func IsSupportedCNIPluginTypeAndVersion(cni *kubermaticv1.CNIPluginSettings) bool
- type AllowedCNIVersionTransition
Constants ¶
const CanalCNILastUnspecifiedVersion = "v3.8"
CanalCNILastUnspecifiedVersion is the last Canal CNI version applied in KKP user-clusters started in KKP before v2.18 release. If cluster.spec.cniPlugin is not set, it means Canal of this version.
Variables ¶
This section is empty.
Functions ¶
func GetAllowedCNIPluginVersions ¶
func GetAllowedCNIPluginVersions(cniPluginType kubermaticv1.CNIPluginType) (sets.Set[string], error)
GetAllowedCNIPluginVersions returns all allowed CNI versions for a CNI type (supported + deprecated).
func GetDefaultCNIPluginVersion ¶
func GetDefaultCNIPluginVersion(cniPluginType kubermaticv1.CNIPluginType) string
GetDefaultCNIPluginVersion returns the default CNI versions for a CNI type, empty string if no default version set.
func GetSupportedCNIPluginVersions ¶
func GetSupportedCNIPluginVersions(cniPluginType kubermaticv1.CNIPluginType) (sets.Set[string], error)
GetSupportedCNIPluginVersions returns currently supported CNI versions for a CNI type.
func GetSupportedCNIPlugins ¶
GetSupportedCNIPlugins returns currently supported CNI Plugin types.
func IsManagedByAppInfra ¶
func IsManagedByAppInfra(cniType kubermaticv1.CNIPluginType, cniVersion string) bool
IsManagedByAppInfra returns true if the given CNI type and version is managed by KKP Applications infra, false if it is managed as a KKP Addon.
func IsSupportedCNIPluginTypeAndVersion ¶
func IsSupportedCNIPluginTypeAndVersion(cni *kubermaticv1.CNIPluginSettings) bool
IsSupportedCNIPluginTypeAndVersion returns true if the given CNI plugin is of supported type and version.
Types ¶
type AllowedCNIVersionTransition ¶
type AllowedCNIVersionTransition struct { K8sVersion string OldCNIVersion string NewCNIVersion string }
AllowedCNIVersionTransition defines conditions for an allowed CNI version transition. If one of the versions is not specified, it means that it is not checked (always satisfied).
func GetAllowedCNIVersionTransitions ¶
func GetAllowedCNIVersionTransitions(cniPluginType kubermaticv1.CNIPluginType) []AllowedCNIVersionTransition
GetAllowedCNIVersionTransitions returns a list of allowed CNI version transitions for the given CNI type. Apart from these, one minor version change is allowed for each CNI.