upgrade

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlanNameLabel      = "lifecycle.suse.com/upgrade-plan-name"
	PlanNamespaceLabel = "lifecycle.suse.com/upgrade-plan-namespace"

	ReleaseAnnotation = "lifecycle.suse.com/release"

	ControlPlaneLabel = "node-role.kubernetes.io/control-plane"

	KubeSystemNamespace = "kube-system"
	SUCNamespace        = "cattle-system"
)

Variables

This section is empty.

Functions

func ChartNamespacedName

func ChartNamespacedName(chart string) types.NamespacedName

func ContainsContainerImages added in v0.1.1

func ContainsContainerImages(containers []corev1.Container, contains map[string]string, strict bool) bool

ContainsContainerImages validates that a given map of "container: image" references exist in a slice of corev1.Containers.

Returns 'true' only if all the "container: image" references from the 'contains' map are present in the corev1.Containers slice.

If 'strict' is true, will require for the corev1.Container.Image to be exactly the same as the image string defined in the 'contains' map.

If 'strict' is false, will require for the corev1.Container.Image to contain the image string defined in the 'contains' map. Useful for use-cases where the image registry may change based on the environment (e.g. private registry).

func GenerateSuffix added in v0.1.0

func GenerateSuffix() (string, error)

func KubernetesControlPlanePlan

func KubernetesControlPlanePlan(nameSuffix, version string, drain bool, labels map[string]string) *upgradecattlev1.Plan

func KubernetesWorkerPlan

func KubernetesWorkerPlan(nameSuffix, version string, drain bool, labels map[string]string) *upgradecattlev1.Plan

func OSControlPlanePlan

func OSControlPlanePlan(nameSuffix, releaseVersion, secretName string, releaseOS *lifecyclev1alpha1.OperatingSystem, drain bool, labels map[string]string) *upgradecattlev1.Plan

func OSUpgradeSecret

func OSUpgradeSecret(nameSuffix string, releaseOS *lifecyclev1alpha1.OperatingSystem, labels map[string]string) (*corev1.Secret, error)

func OSWorkerPlan

func OSWorkerPlan(nameSuffix, releaseVersion, secretName string, releaseOS *lifecyclev1alpha1.OperatingSystem, drain bool, labels map[string]string) *upgradecattlev1.Plan

func PlanIdentifierLabels added in v0.1.1

func PlanIdentifierLabels(name, namespace string) map[string]string

func ReleaseManifestInstallJob added in v0.1.0

func ReleaseManifestInstallJob(releaseManifest, kubectl ContainerImage, serviceAccount, namespace string, labels map[string]string) (*batchv1.Job, error)

Types

type ContainerImage added in v0.1.0

type ContainerImage struct {
	Name    string
	Version string
}

func (ContainerImage) String added in v0.1.0

func (image ContainerImage) String() string

type HelmChartState

type HelmChartState int
const (
	ChartStateUnknown HelmChartState = iota
	ChartStateNotInstalled
	ChartStateVersionAlreadyInstalled
	ChartStateInProgress
	ChartStateFailed
	ChartStateSucceeded
)

func (HelmChartState) FormattedMessage

func (s HelmChartState) FormattedMessage(chart string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL