imageset

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ImagesetJobLabel is the label used for counting the number of imageset jobs in Hive
	ImagesetJobLabel = "hive.openshift.io/imageset"
)

Variables

This section is empty.

Functions

func GenerateImageSetJob

func GenerateImageSetJob(cd *hivev1.ClusterDeployment, releaseImage, serviceAccountName string, cli ImageSpec) *batchv1.Job

GenerateImageSetJob creates a job to determine the installer image for a ClusterImageSet given a release image

func GetImageSetJobName

func GetImageSetJobName(cdName string) string

GetImageSetJobName returns the expected name of the imageset job for a ClusterImageSet.

func NewUpdateInstallerImageCommand

func NewUpdateInstallerImageCommand() *cobra.Command

NewUpdateInstallerImageCommand returns a command to update the installer image on a cluster deployment.

Types

type ImageSpec

type ImageSpec struct {
	Image      string
	PullPolicy corev1.PullPolicy
}

ImageSpec specifies an image reference and associated pull policy

func AlwaysPullImage

func AlwaysPullImage(name string) ImageSpec

AlwaysPullImage returns an ImageSpec with a PullAlways pull policy

type UpdateInstallerImageOptions

type UpdateInstallerImageOptions struct {
	ClusterDeploymentName      string
	ClusterDeploymentNamespace string
	LogLevel                   string
	WorkDir                    string
	// contains filtered or unexported fields
}

UpdateInstallerImageOptions contains options for running the command to update the installer image

func (*UpdateInstallerImageOptions) Complete

func (o *UpdateInstallerImageOptions) Complete() error

Complete sets remaining fields on the UpdateInstallerImageOptions based on command options and arguments.

func (*UpdateInstallerImageOptions) Run

Run updates the given ClusterImageSet based on the results of the 'oc adm release info' This command does the following: 1. Wait for the existence of ${workdir}/success 2. Determine based on the contents of that file whether the command was successful or not 3. If successful, obtain install image from ${workdir}/installer-image.txt 4. If failed, obtain error log from ${workdir}/error.log 3. Update the status of the ClusterImageSet based on those results

func (*UpdateInstallerImageOptions) Validate

func (o *UpdateInstallerImageOptions) Validate() error

Validate ensures the given options and arguments are valid.

Jump to

Keyboard shortcuts

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