update

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

The update package manages logic related to automatic updates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLatestMicro

func GetLatestMicro(minor int) (tag string, ok bool)

GetLatestMicro returns the most recent image tag within a minor (the "y" in "x.y.z"). If the minor was not found or if we never managed to fetch any tags, the second return value is false.

func GetLatestMinor

func GetLatestMinor() (int, error)

GetLatestMinor returns the most recent minor (the "y" in "x.y.z"). If there were issues fetching the tags it returns an error.

func HandleUpdate

func HandleUpdate(nexus *v1alpha1.Nexus, deployed, required *appsv1.Deployment, scheme *runtime.Scheme, c client.Client) error

HandleUpdate constructs state from 'nexus.status.updateConditions' and, based on this state, it may:

  • mark an update as started
  • mark an update as finished

If an update fails automatic updates are disabled and the image is set to the previously deployed tag

This is a state machine with two states: "idle" and "updating". "idle" transitions into "updating" if isNewUpdate == true. "updating" transitions back to "idle" if automatic updates get disabled or if the update fails/succeeds. "updating" transitions to itself if isNewUpdate == true.

func HigherVersion

func HigherVersion(thisTag, otherTag string) (bool, error)

HigherVersion checks if thisTag is of a higher version than otherTag

Types

This section is empty.

Jump to

Keyboard shortcuts

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