Documentation
¶
Index ¶
- Constants
- Variables
- func NewReleasePayloadControllerCommand(name string) *cobra.Command
- type Controller
- type JobStateController
- type LegacyJobStatusController
- type Options
- type PayloadAcceptedController
- type PayloadCreationController
- type PayloadRejectedController
- type PayloadVerificationController
- type ProwJobStatusController
- type ReleaseCreationJobController
- type ReleaseCreationStatusController
- type ReleasePayloadController
Constants ¶
const ( // ReleasePayloadAcceptedReason programmatic identifier indicating that the ReleasePayload was Accepted ReleasePayloadAcceptedReason string = "ReleasePayloadAccepted" // ReleasePayloadManuallyAcceptedReason programmatic identifier indicating that the ReleasePayload was manually Accepted ReleasePayloadManuallyAcceptedReason string = "ReleasePayloadManuallyAccepted" )
These are valid Reason values for the ReleasePayloadStatus Conditions
const ( // ReleasePayloadCreatedReason programmatic identifier indicating that the ReleasePayload created successfully ReleasePayloadCreatedReason string = "ReleasePayloadCreated" // ReleasePayloadFailedReason programmatic identifier indicating that the ReleasePayload creation failed ReleasePayloadFailedReason string = "ReleasePayloadFailed" )
These are valid Reason values for the ReleasePayloadStatus Conditions
const ( // ReleasePayloadRejectedReason programmatic identifier indicating that the ReleasePayload was Rejected ReleasePayloadRejectedReason string = "ReleasePayloadRejected" // ReleasePayloadManuallyRejectedReason programmatic identifier indicating that the ReleasePayload was manually Rejected ReleasePayloadManuallyRejectedReason string = "ReleasePayloadManuallyRejected" )
These are valid Reason values for the ReleasePayloadStatus Conditions
const ( // ReleaseCreationJobUnknownMessage release creation job unknown message ReleaseCreationJobUnknownMessage = "Release creation job unknown" // ReleaseCreationJobPendingMessage release creation job pending message ReleaseCreationJobPendingMessage = "Release creation job pending" // ReleaseCreationJobFailureMessage release creation job failure message ReleaseCreationJobFailureMessage = "Release creation Job failed" // ReleaseCreationJobSuccessMessage release creation job success message ReleaseCreationJobSuccessMessage = "Release creation Job completed" )
const ( // ReleasePayloadCreationFailedReason programmatic identifier indicating that the ReleasePayload was not created successfully ReleasePayloadCreationFailedReason string = "ReleasePayloadCreationFailed" )
Variables ¶
var ErrCoordinatesNotSet = errors.New("unable to lookup release creation job: coordinates not set")
Functions ¶
Types ¶
type Controller ¶
type Controller interface {
// contains filtered or unexported methods
}
type JobStateController ¶
type JobStateController struct {
*ReleasePayloadController
}
JobStateController is responsible for updating the JobState for every entry in the BlockingJobResults and InformingJobResults lists. The JobStateController reads the following pieces of information:
- .status.blockingJobResults[] | .results[]
- .status.informingJobResults[] | .results[]
- .status.upgradeJobResults[] | .results[]
and populates the following condition:
- .status.blockingJobResults[] | .state
- .status.informingJobResults[] | .state
- .status.upgradeJobResults[] | .state
func NewJobStateController ¶
func NewJobStateController( releasePayloadInformer releasepayloadinformer.ReleasePayloadInformer, releasePayloadClient releasepayloadclient.ReleaseV1alpha1Interface, eventRecorder events.Recorder, ) (*JobStateController, error)
type LegacyJobStatusController ¶
type LegacyJobStatusController struct { *ReleasePayloadController // contains filtered or unexported fields }
LegacyJobStatusController is responsible for handling the job results of releases that pre-date ReleasePayloads. These releases have their job results stored in the "release.openshift.io/verify" annotation of their respective imagestreamtag.
The results are a json encoded string of the VerificationStatusMap. The key represents the CIConfigurationName of the job. This is our only way of mapping the individual results back to their respective CIConfiguration.
The LegacyJobStatusController operates only on the ReleasePayloads that specify:
- .spec.payloadVerificationConfig.legacyResults = True
and writes to the following locations:
- .status.blockingJobResults[].results
- .status.informingJobResults[].results
The legacy results are very much married to the ReleaseConfig that's defined on the "Source" imagestream when the respective release is created. Processing of these results are only concerned with the Blocking and Informing jobs defined in the ReleaseConfig. Therefore, this controller will not process anything related to the automatic upgrade jobs produced by the release-controller.
func NewLegacyJobStatusController ¶
func NewLegacyJobStatusController( releasePayloadInformer releasepayloadinformer.ReleasePayloadInformer, releasePayloadClient releasepayloadclient.ReleaseV1alpha1Interface, imageStreamInformer imagev1informer.ImageStreamInformer, eventRecorder events.Recorder, ) (*LegacyJobStatusController, error)
type PayloadAcceptedController ¶
type PayloadAcceptedController struct {
*ReleasePayloadController
}
PayloadAcceptedController is responsible for Accepting ReleasePayloads when any of the following scenarios occur:
- all Blocking Jobs complete successfully
- the payload is manually accepted
The PayloadAcceptedController reads the following pieces of information:
- .spec.payloadOverride.override
- .status.blockingJobResults
- .status.releaseCreationJobResult.status
and populates the following condition:
- .status.conditions.PayloadAccepted
func NewPayloadAcceptedController ¶
func NewPayloadAcceptedController( releasePayloadInformer releasepayloadinformer.ReleasePayloadInformer, releasePayloadClient releasepayloadclient.ReleaseV1alpha1Interface, eventRecorder events.Recorder, ) (*PayloadAcceptedController, error)
type PayloadCreationController ¶
type PayloadCreationController struct {
*ReleasePayloadController
}
PayloadCreationController is responsible for setting the PayloadCreated and PayloadFailed conditions based on whether the release payload creation job completed successfully or not. The PayloadCreationController reads the following pieces of information:
- .status.releaseCreationJobResult.status
and populates the following conditions:
- .status.conditions.PayloadCreated
- .status.conditions.PayloadFailed
func NewPayloadCreationController ¶
func NewPayloadCreationController( releasePayloadInformer releasepayloadinformer.ReleasePayloadInformer, releasePayloadClient releasepayloadclient.ReleaseV1alpha1Interface, eventRecorder events.Recorder, ) (*PayloadCreationController, error)
type PayloadRejectedController ¶
type PayloadRejectedController struct {
*ReleasePayloadController
}
PayloadRejectedController is responsible for Rejecting ReleasePayloads when any of the following scenarios occur:
- any Blocking Job fails
- the payload is manually rejected
- the release creation job fails
The PayloadRejectedController reads the following pieces of information:
- .spec.payloadOverride.override
- .status.blockingJobResults
- .status.releaseCreationJobResult.status
and populates the following condition:
- .status.conditions.PayloadRejected
func NewPayloadRejectedController ¶
func NewPayloadRejectedController( releasePayloadInformer releasepayloadinformer.ReleasePayloadInformer, releasePayloadClient releasepayloadclient.ReleaseV1alpha1Interface, eventRecorder events.Recorder, ) (*PayloadRejectedController, error)
type PayloadVerificationController ¶
type PayloadVerificationController struct {
*ReleasePayloadController
}
PayloadVerificationController is responsible for the initial population of the following pieces of the ReleasePayload:
- .status.blockingJobResults
- .status.informingJobResults
- .status.upgradeJobResults
This information is obtained by reading `.spec.payloadVerification` and populating the respective JobResults accordingly.
func NewPayloadVerificationController ¶
func NewPayloadVerificationController( releasePayloadInformer releasepayloadinformer.ReleasePayloadInformer, releasePayloadClient releasepayloadclient.ReleaseV1alpha1Interface, eventRecorder events.Recorder, ) (*PayloadVerificationController, error)
type ProwJobStatusController ¶
type ProwJobStatusController struct { *ReleasePayloadController // contains filtered or unexported fields }
ProwJobStatusController is responsible for watching ProwJobs, in the prow-namespace, and updating the respective ReleasePayload with the status, of the job, when it completes. The ProwJobStatusController watches for changes to the following resources:
- ProwJob
and writes to the following locations:
- .status.blockingJobResults[].results
- .status.informingJobResults[].results
func NewProwJobStatusController ¶
func NewProwJobStatusController( releasePayloadInformer releasepayloadinformer.ReleasePayloadInformer, releasePayloadClient releasepayloadclient.ReleaseV1alpha1Interface, prowJobInformer prowjobinformer.ProwJobInformer, eventRecorder events.Recorder, ) (*ProwJobStatusController, error)
type ReleaseCreationJobController ¶
type ReleaseCreationJobController struct {
*ReleasePayloadController
}
ReleaseCreationJobController is responsible for writing the coordinates of the release creation job. The jobsNamespace is populated from a command-line parameter and contains the namespace where the release-controller creates the release creation batch/v1 jobs. The ReleaseCreationJobController writes the following pieces of information:
- .status.ReleaseCreationJobResult.ReleaseCreationJobCoordinates.Namespace
- .status.ReleaseCreationJobResult.ReleaseCreationJobCoordinates.Name
func NewReleaseCreationJobController ¶
func NewReleaseCreationJobController( releasePayloadInformer releasepayloadinformer.ReleasePayloadInformer, releasePayloadClient releasepayloadclient.ReleaseV1alpha1Interface, eventRecorder events.Recorder, ) (*ReleaseCreationJobController, error)
type ReleaseCreationStatusController ¶
type ReleaseCreationStatusController struct { *ReleasePayloadController // contains filtered or unexported fields }
ReleaseCreationStatusController is responsible for watching batchv1.Jobs, in the job-namespace, and updating the respective ReleasePayload with the status, of the job, when it completes. The ReleaseCreationStatusController watches for changes to the following resources:
- batchv1.Jobs
and write the following information:
- .status.releaseCreationJobResult.status
- .status.releaseCreationJobResult.message
func NewReleaseCreationStatusController ¶
func NewReleaseCreationStatusController( releasePayloadInformer releasepayloadinformer.ReleasePayloadInformer, releasePayloadClient releasepayloadclient.ReleaseV1alpha1Interface, batchJobInformer batchv1informers.JobInformer, eventRecorder events.Recorder, ) (*ReleaseCreationStatusController, error)
type ReleasePayloadController ¶
type ReleasePayloadController struct {
// contains filtered or unexported fields
}
func NewReleasePayloadController ¶
func NewReleasePayloadController( name string, releasePayloadInformer releasepayloadinformer.ReleasePayloadInformer, releasePayloadClient releasepayloadclient.ReleaseV1alpha1Interface, eventRecorder events.Recorder, queue workqueue.RateLimitingInterface) *ReleasePayloadController
func (*ReleasePayloadController) Enqueue ¶
func (c *ReleasePayloadController) Enqueue(obj interface{})
func (*ReleasePayloadController) RunWorkers ¶
func (c *ReleasePayloadController) RunWorkers(ctx context.Context, workers int)
Source Files
¶
- cmd.go
- config.go
- controller.go
- job_state_controller.go
- legacy_job_status_controller.go
- payload_accepted_controller.go
- payload_creation_controller.go
- payload_rejected_controller.go
- payload_verification_controller.go
- prowjob_controller.go
- release_creation_job_controller.go
- release_creation_status_controller.go