Documentation ¶
Overview ¶
Package kubernetesversions implements kubernetes version functions.
Index ¶
- func GenerateCIArtifactsInjectedTemplateForDebian(input GenerateCIArtifactsInjectedTemplateForDebianInput) (string, error)
- func LatestCIRelease() (string, error)
- func LatestPatchRelease(searchVersion string) (string, error)
- func PreviousMinorRelease(searchVersion string) (string, error)
- func ResolveVersion(ctx context.Context, version string) (string, error)
- type GenerateCIArtifactsInjectedTemplateForDebianInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCIArtifactsInjectedTemplateForDebian ¶
func GenerateCIArtifactsInjectedTemplateForDebian(input GenerateCIArtifactsInjectedTemplateForDebianInput) (string, error)
GenerateCIArtifactsInjectedTemplateForDebian takes a source clusterctl template and a platform-specific Kustomize SMP patch and injects a bash script to download and install the debian packages for the given Kubernetes version, returning the location of the outputted file.
func LatestCIRelease ¶
LatestCIRelease fetches the latest main branch Kubernetes version.
func LatestPatchRelease ¶
LatestPatchRelease returns the latest patch release matching.
func PreviousMinorRelease ¶
PreviousMinorRelease returns the latest patch release for the previous version of Kubernetes, e.g. v1.19.1 returns v1.18.8 as of Sep 2020.
func ResolveVersion ¶ added in v1.6.1
ResolveVersion resolves Kubernetes versions. These are usually used to configure job in test-infra to test various upgrades. Versions can have the following formats: * v1.28.0 => will return the same version for convenience * stable-1.28 => will return the latest patch release for v1.28, e.g. v1.28.5 * ci/latest-1.28 => will return the latest built version from the release branch, e.g. v1.28.5-26+72feddd3acde14 This implementation mirrors what is implemented in ci-e2e-lib.sh k8s::resolveVersion().
Types ¶
type GenerateCIArtifactsInjectedTemplateForDebianInput ¶
type GenerateCIArtifactsInjectedTemplateForDebianInput struct { // ArtifactsDirectory is where conformance suite output will go. Defaults to _artifacts ArtifactsDirectory string // SourceTemplate is an input YAML clusterctl template which is to have // the CI artifact script injection SourceTemplate []byte // PlatformKustomization is an SMP (strategic-merge-style) patch for adding // platform specific kustomizations required for use with CI, such as // referencing a specific image PlatformKustomization []byte // KubeadmConfigTemplateName is the name of the KubeadmConfigTemplate resource // that needs to have the Debian install script injected. Defaults to "${CLUSTER_NAME}-md-0". KubeadmConfigTemplateName string // KubeadmControlPlaneName is the name of the KubeadmControlPlane resource // that needs to have the Debian install script injected. Defaults to "${CLUSTER_NAME}-control-plane". KubeadmControlPlaneName string // KubeadmConfigName is the name of a KubeadmConfig that needs kustomizing. To be used in conjunction with MachinePools. Optional. KubeadmConfigName string }