Documentation
¶
Index ¶
- Variables
- func Resource(resource string) schema.GroupResource
- type JobRunCoordinates
- type JobRunResult
- type JobRunState
- type JobState
- type JobStatus
- type PayloadCoordinates
- type ReleasePayload
- type ReleasePayloadList
- type ReleasePayloadOverride
- type ReleasePayloadOverrideType
- type ReleasePayloadSpec
- type ReleasePayloadStatus
- type ReleasePayloadStatusCondition
- type ReleasePayloadStatusConditionType
Constants ¶
This section is empty.
Variables ¶
var ( GroupName = "release.openshift.io" GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} // Install is a function which adds this version to a scheme Install = schemeBuilder.AddToScheme // SchemeGroupVersion generated code relies on this name // Deprecated SchemeGroupVersion = GroupVersion // AddToScheme exists solely to keep the old generators creating valid code // DEPRECATED AddToScheme = schemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource generated code relies on this being here, but it logically belongs to the group DEPRECATED
Types ¶
type JobRunCoordinates ¶
type JobRunCoordinates struct { Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` Cluster string `json:"cluster,omitempty"` }
JobRunCoordinates houses the information necessary to locate individual job executions
func (*JobRunCoordinates) DeepCopy ¶
func (in *JobRunCoordinates) DeepCopy() *JobRunCoordinates
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRunCoordinates.
func (*JobRunCoordinates) DeepCopyInto ¶
func (in *JobRunCoordinates) DeepCopyInto(out *JobRunCoordinates)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobRunResult ¶
type JobRunResult struct { // Coordinates the location of the job Coordinates JobRunCoordinates `json:"coordinates,omitempty"` // StartTime timestamp for when the prowjob was created StartTime metav1.Time `json:"startTime,omitempty"` // CompletionTime timestamp for when the prow pipeline controller observes the final state of the ProwJob // For instance, if a client Aborts a ProwJob, the Pipeline controller will receive notification of the change // and update the PtowJob's Status accordingly. CompletionTime *metav1.Time `json:"completionTime,omitempty"` // State the current state of the job run State JobRunState `json:"state"` // HumanProwResultsURL the html link to the prow results HumanProwResultsURL string `json:"humanProwResultsURL"` }
JobRunResult the results of a prowjob run The release-controller creates ProwJobs (prowv1.ProwJob) during the sync_ready control loop and relies on an informer to process jobs, that it created, as they are completed. The JobRunResults will be created, by the release-controller during the sync_ready loop and updated whenever any changes, to the respective job is received by the informer.
func (*JobRunResult) DeepCopy ¶
func (in *JobRunResult) DeepCopy() *JobRunResult
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRunResult.
func (*JobRunResult) DeepCopyInto ¶
func (in *JobRunResult) DeepCopyInto(out *JobRunResult)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobRunState ¶
type JobRunState string
JobRunState the status of a job
const ( // JobRunStateTriggered job has been created but not scheduled JobRunStateTriggered JobRunState = "Triggered" // JobRunStatePending job is running and awaiting completion JobRunStatePending JobRunState = "Pending" // JobRunStateFailure job completed with errors JobRunStateFailure JobRunState = "Failure" // JobRunStateSuccess job completed without errors JobRunStateSuccess JobRunState = "Success" // JobRunStateAborted job was terminated early JobRunStateAborted JobRunState = "Aborted" // JobRunStateError job could not be scheduled JobRunStateError JobRunState = "Error" // JobRunStateIgnored job that is submitted to the system but is not monitored for success/failure // This is specifically for Analysis jobs that are monitored by the JobRunAggregator. JobRunStateIgnored JobRunState = "Ignored" )
type JobState ¶
type JobState string
JobState the aggregate state of the job Supported values include Pending, Failed, Success, and Ignored.
const ( // JobStatePending not all job runs have completed // Transitions to Failed or Success JobStatePending JobState = "Pending" // JobStateFailed failed job aggregation JobStateFailed JobState = "Failed" // JobStateSuccess successful job aggregation JobStateSuccess JobState = "Success" // JobStateIgnored ignored job aggregation // This is specifically for Analysis jobs that are not being monitored directly. JobStateIgnored JobState = "Ignored" )
type JobStatus ¶
type JobStatus struct { // jobName is the name of the job JobName string `json:"name,omitempty"` // MaxRetries maximum times to retry a job MaxRetries int `json:"maxRetries,omitempty"` // AggregateState is the overall success/failure of all the executed jobs AggregateState JobState `json:"state,omitempty"` // JobRunResults contains the links for individual jobs JobRunResults []JobRunResult `json:"results,omitempty"` }
JobStatus encapsulates the name of the job, all the results of the jobs, and an aggregated result of all the jobs
func (*JobStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobStatus.
func (*JobStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PayloadCoordinates ¶
type PayloadCoordinates struct { // Namespace must match that of the ReleasePayload Namespace string `json:"namespace,omitempty"` // ImagestreamName is the location of the configured "release" imagestream // - This is a configurable parameter ("to") passed into the release-controller via the ReleaseConfig's defined here: // https://github.com/openshift/release/blob/master/core-services/release-controller/_releases ImagestreamName string `json:"imagestreamName,omitempty"` // ImagestreamTagName is the name of the actual release ImagestreamTagName string `json:"imagestreamTagName,omitempty"` }
PayloadCoordinates houses the information pointing to the location of the imagesteamtag that this ReleasePayload is verifying.
Example: For a ReleasePayload named: "4.9.0-0.nightly-2021-09-27-105859-<random-string>" in the "ocp" namespace, and configured to be written into the "release" imagestream, we expect:
- Namespace to equal "ocp
- ImagestreamName to equal "release"
- ImagestreamTagName to equal "4.9.0-0.nightly-2021-09-27-105859", which will also serves as the prefix of the ReleasePayload
These coordinates can then be used to get the release imagestreamtag itself:
# oc -n ocp get imagestreamtag release:4.9.0-0.nightly-2021-09-27-105859
func (*PayloadCoordinates) DeepCopy ¶
func (in *PayloadCoordinates) DeepCopy() *PayloadCoordinates
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PayloadCoordinates.
func (*PayloadCoordinates) DeepCopyInto ¶
func (in *PayloadCoordinates) DeepCopyInto(out *PayloadCoordinates)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReleasePayload ¶
type ReleasePayload struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec the inputs used to create the ReleasePayload Spec ReleasePayloadSpec `json:"spec,omitempty"` // Status is the current status of the ReleasePayload Status ReleasePayloadStatus `json:"status,omitempty"` }
ReleasePayload encapsulates the information for the creation of a ReleasePayload and aggregates the results of its respective verification tests.
The release-controller is configured to monitor imagestreams, in a specific namespace, that are annotated with a ReleaseConfig. The ReleaseConfig is a definition of how releases are calculated. When a ReleasePayload is generated, it will be generated in the same namespace as the imagstream that produced it. If/when an update occurs, to one of these imagestreams, the release-controller will:
- Create a point-in-time mirror of the updated imagestream
- Create a new Release from the mirror - Any errors before this point will cause the release to marked `Failed`
- Launches a set of release analysis jobs
- Launches an aggregation job
- Launches a set of release verification jobs - These can either be `Blocking Jobs` which will prevent release acceptance or `Informing Jobs` which will not prevent release acceptance.
- Monitors for job completions - If all `Blocking Jobs` complete successfully, then the release is `Accepted`. If any `Blocking Jobs` fail, the release will be marked `Rejected`
- Publishes all results to the respective webpage
Example: ART:
- Publishes an update to the `ocp/4.9-art-latest` imagestream
Release-controller:
- Creates a mirror named: `ocp/4.9-art-latest-2021-09-27-105859`
- Creates a ReleasePayload: `ocp/4.9.0-0.nightly-2021-09-27-105859-<random-string>` -Labels: release.openshift.io/imagestream=release release.openshift.io/imagestreamtag-name=4.9.0-0.nightly-2021-09-27-105859
- Creates an OpenShift Release: `ocp/release:4.9.0-0.nightly-2021-09-27-105859`
- Update ReleasePayload conditions with results of release creation job If the release was created successfully, the release-controller:
- Launches: 4.9.0-0.nightly-2021-09-27-105859-aggregated-<name>-analysis-<count>
- Launches: 4.9.0-0.nightly-2021-09-27-105859-aggregated-<name>-aggregator
- Launches: 4.9.0-0.nightly-2021-09-27-105859-<name>
Mapping from a Release to ReleasePayload: A ReleasePayload will always be named after the Release that it corresponds to, with the addition of a random string suffix. Both objects will reside in the same namespace.
For a release: `ocp/release:4.9.0-0.nightly-2021-09-27-105859` A corresponding ReleasePayload will exist: `ocp/4.9.0-0.nightly-2021-09-27-105859-<random-string>`
Mapping from ReleasePayload to Release: A ReleasePayload is decorated with a couple labels that will point back to the Release that it corresponds to:
- release.openshift.io/imagestream=release
- release.openshift.io/imagestreamtag-name=4.9.0-0.nightly-2021-09-27-105859
Because the ReleasePayload and the Release will both reside in the same namespace, the release that created the ReleasePayload will be located here:
<namespace>/<release.openshift.io/imagestream>:<release.openshift.io/imagestreamtag-name>
Similarly, the ReleasePayload object itself also has the PayloadCoordinates (.spec.payloadCoordinates) that point back to the Release as well:
spec: payloadCoordinates: imagestreamName: release imagestreamTagName: 4.9.0-0.nightly-2021-09-27-105859 namespace: ocp
The release that created the ReleasePayload will be located here:
<namespace>/<imagestreamName>:<imagestreamTagName>
Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +openshift:compatibility-gen:level=4
func (*ReleasePayload) DeepCopy ¶
func (in *ReleasePayload) DeepCopy() *ReleasePayload
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleasePayload.
func (*ReleasePayload) DeepCopyInto ¶
func (in *ReleasePayload) DeepCopyInto(out *ReleasePayload)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReleasePayload) DeepCopyObject ¶
func (in *ReleasePayload) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReleasePayloadList ¶
type ReleasePayloadList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty"` // List of ReleasePayloads Items []ReleasePayload `json:"items"` }
ReleasePayloadList is a list of ReleasePayloads
Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +openshift:compatibility-gen:level=4
func (*ReleasePayloadList) DeepCopy ¶
func (in *ReleasePayloadList) DeepCopy() *ReleasePayloadList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleasePayloadList.
func (*ReleasePayloadList) DeepCopyInto ¶
func (in *ReleasePayloadList) DeepCopyInto(out *ReleasePayloadList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReleasePayloadList) DeepCopyObject ¶
func (in *ReleasePayloadList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReleasePayloadOverride ¶
type ReleasePayloadOverride struct { // Override specifies the ReleasePayloadOverride to apply to the ReleasePayload Override ReleasePayloadOverrideType `json:"override"` // Reason is a human-readable string that specifies the reason for manually overriding the // Acceptance/Rejections of a ReleasePayload Reason string `json:"reason"` }
ReleasePayloadOverride provides the ability to manually Accept/Reject a ReleasePayload ART, occasionally, needs the ability to manually accept/reject a Release that, for some reason or another:
- won't pass one or more of it's blocking jobs.
- shouldn't proceed with the normal release verification processing
This would be the one scenario where another party, besides the release-controller, would update a ReleasePayload instance. Upon doing so, the release-controller should see that an update occurred and make all the necessary changes to formally accept/reject the respective release.
func (*ReleasePayloadOverride) DeepCopy ¶
func (in *ReleasePayloadOverride) DeepCopy() *ReleasePayloadOverride
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleasePayloadOverride.
func (*ReleasePayloadOverride) DeepCopyInto ¶
func (in *ReleasePayloadOverride) DeepCopyInto(out *ReleasePayloadOverride)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReleasePayloadOverrideType ¶
type ReleasePayloadOverrideType string
const ( // ReleasePayloadOverrideAccepted enables the manual Acceptance of a ReleasePayload. ReleasePayloadOverrideAccepted ReleasePayloadOverrideType = "Accepted" // ReleasePayloadOverrideRejected enables the manual Rejection of a ReleasePayload. ReleasePayloadOverrideRejected ReleasePayloadOverrideType = "Rejected" )
These are the supported ReleasePayloadOverride values.
type ReleasePayloadSpec ¶
type ReleasePayloadSpec struct { PayloadCoordinates PayloadCoordinates `json:"payloadCoordinates,omitempty"` PayloadOverride ReleasePayloadOverride `json:"payloadOverride,omitempty"` }
ReleasePayloadSpec has the information to represent a ReleasePayload
func (*ReleasePayloadSpec) DeepCopy ¶
func (in *ReleasePayloadSpec) DeepCopy() *ReleasePayloadSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleasePayloadSpec.
func (*ReleasePayloadSpec) DeepCopyInto ¶
func (in *ReleasePayloadSpec) DeepCopyInto(out *ReleasePayloadSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReleasePayloadStatus ¶
type ReleasePayloadStatus struct { // Conditions communicates the state of the ReleasePayload. // Supported conditions include PayloadCreated, PayloadFailed, PayloadAccepted, and PayloadRejected. Conditions []metav1.Condition `json:"conditions,omitempty"` // BlockingJobResults stores the results of all blocking jobs BlockingJobResults []JobStatus `json:"blockingJobResults,omitempty"` // InformingJobResults stores the results of all informing jobs InformingJobResults []JobStatus `json:"informingJobResults,omitempty"` // AnalysisJobResults stores the results of all analysis jobs AnalysisJobResults []JobStatus `json:"analysisJobResults,omitempty"` }
ReleasePayloadStatus the status of all the promotion test jobs
func (*ReleasePayloadStatus) DeepCopy ¶
func (in *ReleasePayloadStatus) DeepCopy() *ReleasePayloadStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleasePayloadStatus.
func (*ReleasePayloadStatus) DeepCopyInto ¶
func (in *ReleasePayloadStatus) DeepCopyInto(out *ReleasePayloadStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReleasePayloadStatusCondition ¶
type ReleasePayloadStatusCondition struct { // Type of release payload status condition Type ReleasePayloadStatusConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status"` // LastTransitionTIme is the time the condition transitioned from one status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // Reason is a brief machine readable explanation for the condition's last transition. Reason string `json:"reason,omitempty"` // Message is a human readable description of the details about last transition, complementing reason. Message string `json:"message,omitempty"` // Generation is the spec tag generation that this status corresponds to Generation int64 `json:"generation"` }
ReleasePayloadStatusCondition contains condition information for a tag event.
func (*ReleasePayloadStatusCondition) DeepCopy ¶
func (in *ReleasePayloadStatusCondition) DeepCopy() *ReleasePayloadStatusCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleasePayloadStatusCondition.
func (*ReleasePayloadStatusCondition) DeepCopyInto ¶
func (in *ReleasePayloadStatusCondition) DeepCopyInto(out *ReleasePayloadStatusCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReleasePayloadStatusConditionType ¶
type ReleasePayloadStatusConditionType string
const ( // PayloadCreated if false, the ReleasePayload is waiting for a release image to be created and pushed to the // TargetImageStream. If PayloadCreated is true, a release image has been created and pushed to the TargetImageStream. // Verification jobs should begin and will update the status as they complete. PayloadCreated ReleasePayloadStatusConditionType = "PayloadCreated" // PayloadFailed is true if a ReleasePayload image cannot be created for the given set of image mirrors // This condition is terminal PayloadFailed ReleasePayloadStatusConditionType = "PayloadFailed" // PayloadAccepted is true if the ReleasePayload has passed its verification criteria and can safely // be promoted to an external location // This condition is terminal PayloadAccepted ReleasePayloadStatusConditionType = "PayloadAccepted" // PayloadRejected is true if the ReleasePayload has failed one or more of its verification criteria // The release-controller will take no more action in this phase. PayloadRejected ReleasePayloadStatusConditionType = "PayloadRejected" )
These are valid conditions of ReleasePayloadStatus.