Documentation ¶
Index ¶
- Constants
- Variables
- func AllControlPlanesMatchVersion(currentClusterVersion *version.Version) (bool, error)
- func AllControlPlanesMatchVersionWithVersioningInfo(allNodesVersioningInfo NodeVersionInfoMap, ...) bool
- func AllWorkerNodesTolerateVersion(clusterVersion *version.Version) (bool, error)
- func AvailableVersions() []*version.Version
- func AvailableVersionsForMap(versions KubernetesVersions) []*version.Version
- func ComponentVersionForClusterVersion(component Component, clusterVersion *version.Version) string
- func ComponentVersionWithAvailableVersions(component Component, clusterVersion *version.Version, ...) string
- func CreateAndWaitForJob(name string, spec batchv1.JobSpec) error
- func CreateJob(name string, spec batchv1.JobSpec) (*batchv1.Job, error)
- func CurrentAddonVersion(addon Addon) string
- func CurrentComponentVersion(component Component) string
- func DeleteJob(name string) error
- func DisarmKubelet(node *v1.Node) error
- func DrainNode(node *v1.Node, drainTimeout time.Duration) error
- func GetAdminClientSet() (*clientset.Clientset, error)
- func GetControlPlaneNodes() (*v1.NodeList, error)
- func GetNodeWithMachineId(machineId string) (*v1.Node, error)
- func HostMount(name, mount string) v1.Volume
- func IsControlPlane(node *v1.Node) bool
- func IsVersionAvailable(kubernetesVersion *version.Version) bool
- func LatestVersion() *version.Version
- func MajorMinorVersion(kubernetesVersion *version.Version) string
- func VolumeMount(name, mount string, mode VolumeMountMode) v1.VolumeMount
- type Addon
- type AddonsVersion
- type Component
- type ComponentsVersion
- type ControlPlaneComponentsVersion
- type KubernetesVersion
- type KubernetesVersions
- type NodeVersionInfo
- func (nvi NodeVersionInfo) DriftsFromClusterVersion(clusterVersion *version.Version) bool
- func (nvi NodeVersionInfo) EqualsClusterVersion(clusterVersion *version.Version) bool
- func (nvi NodeVersionInfo) IsControlPlane() bool
- func (nvi NodeVersionInfo) LessThanClusterVersion(clusterVersion *version.Version) bool
- func (nvi NodeVersionInfo) String() string
- func (nvi NodeVersionInfo) ToleratesClusterVersion(clusterVersion *version.Version) bool
- type NodeVersionInfoMap
- type StaticVersionInquirer
- type VersionInquirer
- type VolumeMountMode
Constants ¶
const ( Cilium Addon = "cilium" Tooling Addon = "tooling" Kured Addon = "kured" Dex Addon = "dex" Gangway Addon = "gangway" ContainerRuntime Component = "cri-o" Kubelet Component = "kubelet" Hyperkube Component = "hyperkube" Etcd Component = "etcd" CoreDNS Component = "coredns" Pause Component = "pause" )
Variables ¶
var ( Versions = KubernetesVersions{ "1.15.2": KubernetesVersion{ ControlPlaneComponentsVersion: ControlPlaneComponentsVersion{ HyperkubeVersion: "v1.15.2", EtcdVersion: "3.3.11", CoreDNSVersion: "1.3.1", PauseVersion: "3.1", }, ComponentsVersion: ComponentsVersion{ KubeletVersion: "1.15.2", ContainerRuntimeVersion: "1.15.2", }, AddonsVersion: AddonsVersion{ CiliumVersion: "1.5.3", ToolingVersion: "0.1.0", KuredVersion: "1.2.0", DexVersion: "2.16.0", GangwayVersion: "3.1.0", }, }, "1.15.0": KubernetesVersion{ ControlPlaneComponentsVersion: ControlPlaneComponentsVersion{ HyperkubeVersion: "v1.15.0", EtcdVersion: "3.3.11", CoreDNSVersion: "1.3.1", PauseVersion: "3.1", }, ComponentsVersion: ComponentsVersion{ KubeletVersion: "1.15.0", ContainerRuntimeVersion: "1.15.0", }, AddonsVersion: AddonsVersion{ CiliumVersion: "1.5.3", ToolingVersion: "0.1.0", KuredVersion: "1.2.0", DexVersion: "2.16.0", GangwayVersion: "3.1.0", }, }, "1.14.1": KubernetesVersion{ ControlPlaneComponentsVersion: ControlPlaneComponentsVersion{ HyperkubeVersion: "v1.14.1", EtcdVersion: "3.3.11", CoreDNSVersion: "1.2.6", PauseVersion: "3.1", }, ComponentsVersion: ComponentsVersion{ ContainerRuntimeVersion: "1.14.1", KubeletVersion: "1.14.1", }, AddonsVersion: AddonsVersion{ CiliumVersion: "1.5.3", ToolingVersion: "0.1.0", KuredVersion: "1.2.0", DexVersion: "2.16.0", GangwayVersion: "3.1.0", }, }, } )
Functions ¶
func AllControlPlanesMatchVersion ¶ added in v0.7.0
AllControlPlanesMatchVersion checks that all control planes are on the same version, and that they match the current cluster version
func AllControlPlanesMatchVersionWithVersioningInfo ¶ added in v0.7.0
func AllControlPlanesMatchVersionWithVersioningInfo(allNodesVersioningInfo NodeVersionInfoMap, currentClusterVersion *version.Version) bool
AllControlPlanesMatchVersionWithVersioningInfo checks that all control planes are on the same version, and that they match the current cluster version With the addition of passing in a NodeVersionInfoMap to make it easily testable
func AllWorkerNodesTolerateVersion ¶ added in v0.7.0
AllWorkerNodesTolerateVersion checks that all schedulable worker nodes tolerate the given cluster version
func AvailableVersions ¶ added in v0.7.0
AvailableVersions return the list of platform versions known to skuba
func AvailableVersionsForMap ¶ added in v0.7.0
func AvailableVersionsForMap(versions KubernetesVersions) []*version.Version
func ComponentVersionForClusterVersion ¶ added in v0.7.0
func ComponentVersionWithAvailableVersions ¶ added in v0.7.0
func ComponentVersionWithAvailableVersions(component Component, clusterVersion *version.Version, availableVersions KubernetesVersions) string
func CurrentAddonVersion ¶
func CurrentComponentVersion ¶
func DisarmKubelet ¶
func GetAdminClientSet ¶
func GetControlPlaneNodes ¶ added in v0.7.0
func GetNodeWithMachineId ¶ added in v0.7.0
func IsControlPlane ¶ added in v0.7.0
func IsVersionAvailable ¶ added in v0.8.0
IsVersionAvailable returns if a specific kubernetes version is available
func LatestVersion ¶ added in v0.7.0
LatestVersion return the latest Kubernetes supported version
func MajorMinorVersion ¶ added in v0.8.0
MajorMinorVersion returns a KubernetesVersion without the patch level
func VolumeMount ¶
func VolumeMount(name, mount string, mode VolumeMountMode) v1.VolumeMount
Types ¶
type AddonsVersion ¶
type ComponentsVersion ¶
type KubernetesVersion ¶
type KubernetesVersion struct { ControlPlaneComponentsVersion ControlPlaneComponentsVersion ComponentsVersion ComponentsVersion AddonsVersion AddonsVersion }
type KubernetesVersions ¶ added in v0.7.0
type KubernetesVersions map[string]KubernetesVersion
type NodeVersionInfo ¶ added in v0.7.0
type NodeVersionInfo struct { Nodename string ContainerRuntimeVersion *version.Version KubeletVersion *version.Version APIServerVersion *version.Version ControllerManagerVersion *version.Version SchedulerVersion *version.Version EtcdVersion *version.Version Unschedulable bool }
func NodeVersioningInfo ¶ added in v0.7.0
func NodeVersioningInfo(nodeName string) (NodeVersionInfo, error)
NodeVersioningInfo returns related versioning information about a node
func (NodeVersionInfo) DriftsFromClusterVersion ¶ added in v0.7.0
func (nvi NodeVersionInfo) DriftsFromClusterVersion(clusterVersion *version.Version) bool
func (NodeVersionInfo) EqualsClusterVersion ¶ added in v0.7.0
func (nvi NodeVersionInfo) EqualsClusterVersion(clusterVersion *version.Version) bool
func (NodeVersionInfo) IsControlPlane ¶ added in v0.7.0
func (nvi NodeVersionInfo) IsControlPlane() bool
func (NodeVersionInfo) LessThanClusterVersion ¶ added in v0.7.0
func (nvi NodeVersionInfo) LessThanClusterVersion(clusterVersion *version.Version) bool
func (NodeVersionInfo) String ¶ added in v0.7.0
func (nvi NodeVersionInfo) String() string
func (NodeVersionInfo) ToleratesClusterVersion ¶ added in v0.7.0
func (nvi NodeVersionInfo) ToleratesClusterVersion(clusterVersion *version.Version) bool
type NodeVersionInfoMap ¶ added in v0.7.0
type NodeVersionInfoMap map[string]NodeVersionInfo
func AllNodesVersioningInfo ¶ added in v0.7.0
func AllNodesVersioningInfo() (NodeVersionInfoMap, error)
AllNodesVersioningInfo returns the version info for all nodes in the cluster
type StaticVersionInquirer ¶ added in v0.7.0
type StaticVersionInquirer struct{}
func (StaticVersionInquirer) AvailablePlatformVersions ¶ added in v0.7.0
func (si StaticVersionInquirer) AvailablePlatformVersions() []*version.Version
func (StaticVersionInquirer) NodeVersionInfoForClusterVersion ¶ added in v0.7.0
func (si StaticVersionInquirer) NodeVersionInfoForClusterVersion(node *v1.Node, clusterVersion *version.Version) NodeVersionInfo
type VersionInquirer ¶ added in v0.7.0
type VolumeMountMode ¶
type VolumeMountMode uint
const ( VolumeMountReadOnly VolumeMountMode = iota VolumeMountReadWrite VolumeMountMode = iota )