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 TenantSpec
- 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" )
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 string `json:"repoUrl"` Revision string `json:"revision"` Path string `json:"relativePath"` // +optional RepoAuthSecret string `json:"repoAuthSecret"` }
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 *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"` // +optional Status PipelineStatus `json:"status"` Spec PipelineSpec `json:"spec"` }
PipelineRun is a K8s custom resource representing a singe pipeline run +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 which is instantiated by the run. JobName string `json:"jobName"` // SequenceNumber is a sequential number of the run SequenceNumber int `json:"sequenceNumber"` // Cause is the cause which triggered the run, e.g. a SCM change, an user action or a timer. Cause string `json:"cause"` }
PipelineRunDetails provies details of a pipeline run which are passed to 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 JenkinsFile `json:"jenkinsFile"` Args map[string]string `json:"args"` // +optional Secrets []string `json:"secrets"` // +optional ImagePullSecrets []string `json:"imagePullSecrets"` Intent Intent `json:"intent"` Logging *Logging `json:"logging"` // +optional RunDetails *PipelineRunDetails `json:"runDetails"` }
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" )
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"` }
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"` Spec TenantSpec `json:"spec"` }
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 TenantSpec ¶
TenantSpec is a spec of a Tenant
func (*TenantSpec) DeepCopy ¶
func (in *TenantSpec) DeepCopy() *TenantSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantSpec.
func (*TenantSpec) DeepCopyInto ¶
func (in *TenantSpec) DeepCopyInto(out *TenantSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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.