Documentation ¶
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type CustomJSON
- type Elasticsearch
- type Intent
- type JenkinsFile
- type Logging
- type PipelineRun
- type PipelineRunDetails
- type PipelineRunList
- type PipelineSpec
- type PipelineStatus
- type Result
- type State
- type StateItem
- type Tenant
- type TenantList
- type TenantStatus
Constants ¶
const ( // AnnotationTenantNamespacePrefix is the key of the annotation // of a Steward client namespace defining the prefix of tenant namespaces // belonging to this client. AnnotationTenantNamespacePrefix = steward.GroupName + "/tenant-namespace-prefix" // AnnotationTenantNamespaceSuffixLength is the key of the annotation // of a Steward client namespace defining the number of characters used for // the random suffix of a tenant namespace name. AnnotationTenantNamespaceSuffixLength = steward.GroupName + "/tenant-namespace-suffix-length" // AnnotationTenantRole is the key of the annotation of a Steward client // namespace defining the name of the ClusterRole to be assigned to the // default service account of a tenant namespace. AnnotationTenantRole = steward.GroupName + "/tenant-role" // LabelSystemManaged is the key of the label whose presence indicates // that this resource is managed by the Steward system and should not be // modified otherwise. // The value of the label is ignored and should be empty. LabelSystemManaged = steward.GroupName + "/system-managed" // EventReasonPreparingFailed is the reason for a event occuring when the run controller // faces an intermittent error during preparing phase. EventReasonPreparingFailed = "PreparingFailed" // EventReasonWaitingFailed is the reason for a event occuring when the run controller // faces an intermittent error during wait phase. EventReasonWaitingFailed = "WaitingFailed" // EventReasonRunningFailed is the reason for a event occuring when the run controller // faces an intermittent error during running phase. EventReasonRunningFailed = "RunningFailed" )
const ( // StatusReasonFailed indicates that the reason for the status // is an unspecified failure. StatusReasonFailed = "Failed" // StatusReasonDependentResourceState indicates that the reason for the // status is the state of another resource controlled by this resource. StatusReasonDependentResourceState = "InvalidDependentResource" )
const GroupVersion = "v1alpha1"
GroupVersion is the version for the scheme
Variables ¶
var ( // SchemeBuilder builds the scheme SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme ... AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: x.GroupName, Version: GroupVersion}
SchemeGroupVersion ...
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type CustomJSON ¶
type CustomJSON struct {
Value interface{}
}
CustomJSON is used for fields where any JSON value is allowed. It exists only to provide deep copy methods. The zero value represents a JSON null value.
func (*CustomJSON) DeepCopy ¶
func (c *CustomJSON) DeepCopy() *CustomJSON
DeepCopy creates a new CustomJSON as a deep copy of the receiver.
func (*CustomJSON) DeepCopyInto ¶
func (c *CustomJSON) DeepCopyInto(out *CustomJSON)
DeepCopyInto writes a deep copy of the receiver into out. c must be non-nil.
func (*CustomJSON) MarshalJSON ¶
func (c *CustomJSON) MarshalJSON() ([]byte, error)
MarshalJSON fulfills interface encoding.json.Marshaler
func (*CustomJSON) UnmarshalJSON ¶
func (c *CustomJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON fulfills interface encoding.json.Unmarshaler
type Elasticsearch ¶
type Elasticsearch struct { // The identifier of this pipeline run, attached as // field `runid` to each log entry. // It can by any JSON value (object, array, string, // number, bool). RunID *CustomJSON `json:"runID"` }
Elasticsearch contains logging configuration for the Elasticsearch log implementation.
func (*Elasticsearch) DeepCopy ¶
func (in *Elasticsearch) DeepCopy() *Elasticsearch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Elasticsearch.
func (*Elasticsearch) DeepCopyInto ¶
func (in *Elasticsearch) DeepCopyInto(out *Elasticsearch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JenkinsFile ¶
type JenkinsFile struct { // URL is the URL of the Git repository containing the pipeline definition // (aka `Jenkinsfile`). URL string `json:"repoUrl"` // Revision is the revision of the pipeline Git repository to be used, e.g. // `master`. Revision string `json:"revision"` // Path is the relative pathname of the pipeline definition file in the // repository check-out, typically `Jenkinsfile`. Path string `json:"relativePath"` // RepoAuthSecret is the name of the Kubernetes `v1/Secret` resource object // of type `kubernetes.io/basic-auth` that contains the username and // password for authentication when cloning from `spec.jenkinsFile.repoUrl`. // +optional RepoAuthSecret string `json:"repoAuthSecret,omitempty"` }
JenkinsFile represents the location from where to get the pipeline
func (*JenkinsFile) DeepCopy ¶
func (in *JenkinsFile) DeepCopy() *JenkinsFile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsFile.
func (*JenkinsFile) DeepCopyInto ¶
func (in *JenkinsFile) DeepCopyInto(out *JenkinsFile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Logging ¶
type Logging struct { // Elasticsearch is the configuration for pipeline logging to Elasticsearch. // If not specified, logging to Elasticsearch is disabled and the default // Jenkins log implementation is used (stdout of Jenkinsfile Runner // container). // +optional Elasticsearch *Elasticsearch `json:"elasticsearch"` }
Logging contains all logging-specific configuration.
func (*Logging) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Logging.
func (*Logging) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipelineRun ¶
type PipelineRun struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` Spec PipelineSpec `json:"spec"` // +optional Status PipelineStatus `json:"status"` }
PipelineRun is a Kubernetes custom resource type representing the execution of a pipeline. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*PipelineRun) DeepCopy ¶
func (in *PipelineRun) DeepCopy() *PipelineRun
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRun.
func (*PipelineRun) DeepCopyInto ¶
func (in *PipelineRun) DeepCopyInto(out *PipelineRun)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PipelineRun) DeepCopyObject ¶
func (in *PipelineRun) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PipelineRunDetails ¶
type PipelineRunDetails struct { // JobName is the name of the job this pipeline run belongs to. It is used // as the name of the Jenkins job and therefore must be a valid Jenkins job // name. If empty, a default name will be used for the Jenkins job. // TODO: Regex in CRD to validate "valid Jenkins job names" // +optional JobName string `json:"jobName,omitempty"` // SequenceNumber is the sequence number of the pipeline run, which // translates into the build number of the Jenkins job. // +optional SequenceNumber int32 `json:"sequenceNumber,omitempty"` // Cause is a textual description of the cause of this pipeline run. Will be // set as cause of the Jenkins job. If empty, no cause information // will be available. // +optional Cause string `json:"cause,omitempty"` }
PipelineRunDetails provides metadata for a pipeline run which is evaluated by the Jenkinsfile Runner.
func (*PipelineRunDetails) DeepCopy ¶
func (in *PipelineRunDetails) DeepCopy() *PipelineRunDetails
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunDetails.
func (*PipelineRunDetails) DeepCopyInto ¶
func (in *PipelineRunDetails) DeepCopyInto(out *PipelineRunDetails)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipelineRunList ¶
type PipelineRunList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty"` Items []PipelineRun `json:"items"` }
PipelineRunList is a list of PipelineRun objects. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*PipelineRunList) DeepCopy ¶
func (in *PipelineRunList) DeepCopy() *PipelineRunList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunList.
func (*PipelineRunList) DeepCopyInto ¶
func (in *PipelineRunList) DeepCopyInto(out *PipelineRunList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PipelineRunList) DeepCopyObject ¶
func (in *PipelineRunList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PipelineSpec ¶
type PipelineSpec struct { // JenkinsFile contains the configuration of the Jenkins pipeline definition // to be executed. JenkinsFile JenkinsFile `json:"jenkinsFile"` // Args contains the key-value parameters to pass to the pipeline. // +optional Args map[string]string `json:"args,omitempty"` // Secrets is the list of secrets to be made available to the pipeline // execution. Each entry in the list is the name of a Kubernetes `v1/Secret` // resource object in the same namespace as the PipelineRun object itself. // +optional Secrets []string `json:"secrets,omitempty"` // ImagePullSecrets is the list of image pull secrets required by the // pipeline run to pull images of custom containers from private registries. // Each entry in the list is the name of a Kubernetes `v1/Secret` resource // object of type `kubernetes.io/dockerconfigjson` in the same namespace as // the PipelineRun object itself. // +optional ImagePullSecrets []string `json:"imagePullSecrets,omitempty"` // Intent is the intention of the client regarding the way this pipeline run // should be processed. The value `run` indicates that the pipeline should // run to completion, while the value `abort` indicates that the pipeline // processing should be stopped as soon as possible. An empty string value // is equivalent to value `run`. // TODO: Controller should set intent=run explicitely if not set // +optional Intent Intent `json:"intent,omitempty"` // Logging contains the logging configuration. // +optional Logging *Logging `json:"logging,omitempty"` // RunDetails provides metadata for a pipeline run which is evaluated by the // Jenkinsfile Runner. // +optional RunDetails *PipelineRunDetails `json:"runDetails,omitempty"` }
PipelineSpec is the spec of a PipelineRun
func (*PipelineSpec) DeepCopy ¶
func (in *PipelineSpec) DeepCopy() *PipelineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineSpec.
func (*PipelineSpec) DeepCopyInto ¶
func (in *PipelineSpec) DeepCopyInto(out *PipelineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipelineStatus ¶
type PipelineStatus struct { // StartedAt is the time the pipeline run has been started. // +optional StartedAt *metav1.Time `json:"startedAt,omitempty"` // FinishedAt is the time the pipeline run has been finished. // +optional FinishedAt *metav1.Time `json:"finishedAt,omitempty"` State State `json:"state"` StateDetails StateItem `json:"stateDetails"` StateHistory []StateItem `json:"stateHistory"` Result Result `json:"result"` Container corev1.ContainerState `json:"container,omitempty"` MessageShort string `json:"messageShort"` Message string `json:"message"` History []string `json:"history"` Namespace string `json:"namespace"` }
PipelineStatus represents the status of the pipeline
func (*PipelineStatus) DeepCopy ¶
func (in *PipelineStatus) DeepCopy() *PipelineStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineStatus.
func (*PipelineStatus) DeepCopyInto ¶
func (in *PipelineStatus) DeepCopyInto(out *PipelineStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Result ¶
type Result string
Result of the pipeline run
const ( // ResultUndefined - undefined result ResultUndefined Result = "" // ResultSuccess - the pipeline run was processed successfully ResultSuccess Result = "success" // ResultErrorInfra - the pipeline run failed due to an infrastructure problem ResultErrorInfra Result = "error_infra" // ResultErrorContent - the pipeline run failed due to an content problem ResultErrorContent Result = "error_content" // ResultAborted - the pipeline run has been aborted ResultAborted Result = "aborted" // ResultTimeout - the pipeline run timed out ResultTimeout Result = "timeout" // ResultDeleted - the pipeline run was deleted ResultDeleted Result = "deleted" )
type State ¶
type State string
State represents the state
const ( // StateUndefined - the state was not yet set StateUndefined State = "" // StateNew - pipeline run is first checked by the controller StateNew State = "new" // StatePreparing - the namespace for the execution is prepared StatePreparing State = "preparing" // StateWaiting - the pipeline run is waiting to be processed StateWaiting State = "waiting" // StateRunning - the pipeline is running StateRunning State = "running" // StateCleaning - cleanup is ongoing StateCleaning State = "cleaning" // StateFinished - the pipeline run has finished StateFinished State = "finished" )
type StateItem ¶
type StateItem struct { State State `json:"state"` StartedAt metav1.Time `json:"startedAt"` FinishedAt metav1.Time `json:"finishedAt,omitempty"` }
StateItem holds start and end time of a state in the history
func (*StateItem) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StateItem.
func (*StateItem) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Tenant ¶
type Tenant struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Status TenantStatus `json:"status"` }
Tenant is representing a Tenant and its status +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Tenant) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tenant.
func (*Tenant) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Tenant) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TenantList ¶
type TenantList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty"` Items []Tenant `json:"items"` }
TenantList is a list of Tenants +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*TenantList) DeepCopy ¶
func (in *TenantList) DeepCopy() *TenantList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantList.
func (*TenantList) DeepCopyInto ¶
func (in *TenantList) DeepCopyInto(out *TenantList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TenantList) DeepCopyObject ¶
func (in *TenantList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TenantStatus ¶
type TenantStatus struct { knativeduck.Status `json:",inline"` TenantNamespaceName string `json:"tenantNamespaceName,omitempty"` }
TenantStatus contains the status of a Tenant
func (*TenantStatus) DeepCopy ¶
func (in *TenantStatus) DeepCopy() *TenantStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantStatus.
func (*TenantStatus) DeepCopyInto ¶
func (in *TenantStatus) DeepCopyInto(out *TenantStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TenantStatus) GetCondition ¶
func (s *TenantStatus) GetCondition(condType knativeapis.ConditionType) *knativeapis.Condition
GetCondition returns the condition matching the given condition type.
func (*TenantStatus) SetCondition ¶
func (s *TenantStatus) SetCondition(cond *knativeapis.Condition)
SetCondition sets the given condition.