Documentation ¶
Index ¶
Constants ¶
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 ¶
GetImageSetJobName returns the expected name of the imageset job for a ClusterImageSet.
func NewUpdateInstallerImageCommand ¶
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 ¶
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 ¶
func (o *UpdateInstallerImageOptions) Run() error
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.