Documentation
¶
Overview ¶
Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group +k8s:deepcopy-gen=package,register +groupName=jenkins.io
Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group +k8s:deepcopy-gen=package,register +groupName=jenkins.io
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- type Backup
- type Build
- type BuildStatus
- type Container
- type Handler
- type Jenkins
- type JenkinsCredentialType
- type JenkinsList
- type JenkinsMaster
- type JenkinsSpec
- type JenkinsStatus
- type Plugin
- type Restore
- type SeedJob
- type Service
Constants ¶
const (
// Kind defines Jenkins CRD kind name
Kind = "Jenkins"
)
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "jenkins.io", Version: "v1alpha2"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
var AllowedJenkinsCredentialMap = map[string]string{ string(NoJenkinsCredentialCredentialType): "", string(BasicSSHCredentialType): "", string(UsernamePasswordCredentialType): "", }
AllowedJenkinsCredentialMap contains all allowed Jenkins credentials types
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
Types ¶
type Backup ¶
type Backup struct {
ContainerName string `json:"containerName"`
Action Handler `json:"action"`
Interval uint64 `json:"interval"`
MakeBackupBeforePodDeletion bool `json:"makeBackupBeforePodDeletion"`
}
Backup defines configuration of Jenkins backup
func (*Backup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backup.
func (*Backup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Build ¶
type Build struct {
JobName string `json:"jobName,omitempty"`
Hash string `json:"hash,omitempty"`
Number int64 `json:"number,omitempty"`
Status BuildStatus `json:"status,omitempty"`
Retires int `json:"retries,omitempty"`
CreateTime *metav1.Time `json:"createTime,omitempty"`
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
}
Build defines Jenkins Build status with corresponding metadata
func (*Build) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Build.
func (*Build) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BuildStatus ¶
type BuildStatus string
BuildStatus defines type of Jenkins build job status
const ( // BuildSuccessStatus - the build had no errors BuildSuccessStatus BuildStatus = "success" // BuildUnstableStatus - the build had some errors but they were not fatal. For example, some tests failed BuildUnstableStatus BuildStatus = "unstable" // BuildNotBuildStatus - this status code is used in a multi-stage build (like maven2) where a problem in earlier stage prevented later stages from building BuildNotBuildStatus BuildStatus = "not_build" // BuildFailureStatus - the build had a fatal error BuildFailureStatus BuildStatus = "failure" // BuildAbortedStatus - the build was manually aborted BuildAbortedStatus BuildStatus = "aborted" // BuildRunningStatus - this is custom build status for running build, not present in jenkins build result BuildRunningStatus BuildStatus = "running" // BuildExpiredStatus - this is custom build status for expired build, not present in jenkins build result BuildExpiredStatus BuildStatus = "expired" )
type Container ¶
type Container struct {
Name string `json:"name"`
Image string `json:"image"`
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
WorkingDir string `json:"workingDir,omitempty"`
Ports []corev1.ContainerPort `json:"ports,omitempty"`
EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
Env []corev1.EnvVar `json:"env,omitempty"`
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
Lifecycle *corev1.Lifecycle `json:"lifecycle,omitempty"`
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}
Container defines Kubernetes container attributes
func (*Container) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Container.
func (*Container) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Handler ¶
type Handler struct {
// Exec specifies the action to take.
Exec *corev1.ExecAction `json:"exec,omitempty"`
}
Handler defines a specific action that should be taken
func (*Handler) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Handler.
func (*Handler) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Jenkins ¶
type Jenkins struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec JenkinsSpec `json:"spec,omitempty"`
Status JenkinsStatus `json:"status,omitempty"`
}
Jenkins is the Schema for the jenkins API +k8s:openapi-gen=true +kubebuilder:subresource:status
func (*Jenkins) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Jenkins.
func (*Jenkins) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Jenkins) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Jenkins) GetObjectKind ¶
func (in *Jenkins) GetObjectKind() schema.ObjectKind
GetObjectKind returns Jenkins object kind
type JenkinsCredentialType ¶
type JenkinsCredentialType string
JenkinsCredentialType defines type of Jenkins credential used to seed job mechanisms
const ( // NoJenkinsCredentialCredentialType define none Jenkins credential type NoJenkinsCredentialCredentialType JenkinsCredentialType = "" // BasicSSHCredentialType define basic SSH Jenkins credential type BasicSSHCredentialType JenkinsCredentialType = "basicSSHUserPrivateKey" // UsernamePasswordCredentialType define username & password Jenkins credential type UsernamePasswordCredentialType JenkinsCredentialType = "usernamePassword" )
type JenkinsList ¶
type JenkinsList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Jenkins `json:"items"`
}
JenkinsList contains a list of Jenkins
func (*JenkinsList) DeepCopy ¶
func (in *JenkinsList) DeepCopy() *JenkinsList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsList.
func (*JenkinsList) DeepCopyInto ¶
func (in *JenkinsList) DeepCopyInto(out *JenkinsList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*JenkinsList) DeepCopyObject ¶
func (in *JenkinsList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type JenkinsMaster ¶
type JenkinsMaster struct {
// pod properties
Annotations map[string]string `json:"masterAnnotations,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Containers []Container `json:"containers,omitempty"`
Volumes []corev1.Volume `json:"volumes,omitempty"`
// BasePlugins contains plugins required by operator
BasePlugins []Plugin `json:"basePlugins,omitempty"`
// Plugins contains plugins required by user
Plugins []Plugin `json:"plugins,omitempty"`
}
JenkinsMaster defines the Jenkins master pod attributes and plugins, every single change requires Jenkins master pod restart
func (*JenkinsMaster) DeepCopy ¶
func (in *JenkinsMaster) DeepCopy() *JenkinsMaster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsMaster.
func (*JenkinsMaster) DeepCopyInto ¶
func (in *JenkinsMaster) DeepCopyInto(out *JenkinsMaster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JenkinsSpec ¶
type JenkinsSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
Master JenkinsMaster `json:"master,omitempty"`
SeedJobs []SeedJob `json:"seedJobs,omitempty"`
Service Service `json:"service,omitempty"`
SlaveService Service `json:"slaveService,omitempty"`
Backup Backup `json:"backup,omitempty"`
Restore Restore `json:"restore,omitempty"`
}
JenkinsSpec defines the desired state of Jenkins +k8s:openapi-gen=true
func (*JenkinsSpec) DeepCopy ¶
func (in *JenkinsSpec) DeepCopy() *JenkinsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsSpec.
func (*JenkinsSpec) DeepCopyInto ¶
func (in *JenkinsSpec) DeepCopyInto(out *JenkinsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JenkinsStatus ¶
type JenkinsStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
OperatorVersion string `json:"operatorVersion,omitempty"`
ProvisionStartTime *metav1.Time `json:"provisionStartTime,omitempty"`
BaseConfigurationCompletedTime *metav1.Time `json:"baseConfigurationCompletedTime,omitempty"`
UserConfigurationCompletedTime *metav1.Time `json:"userConfigurationCompletedTime,omitempty"`
Builds []Build `json:"builds,omitempty"`
RestoredBackup uint64 `json:"restoredBackup,omitempty"`
LastBackup uint64 `json:"lastBackup,omitempty"`
PendingBackup uint64 `json:"pendingBackup,omitempty"`
BackupDoneBeforePodDeletion bool `json:"backupDoneBeforePodDeletion,omitempty"`
}
JenkinsStatus defines the observed state of Jenkins +k8s:openapi-gen=true
func (*JenkinsStatus) DeepCopy ¶
func (in *JenkinsStatus) DeepCopy() *JenkinsStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsStatus.
func (*JenkinsStatus) DeepCopyInto ¶
func (in *JenkinsStatus) DeepCopyInto(out *JenkinsStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Plugin ¶
Plugin defines Jenkins plugin
func (*Plugin) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugin.
func (*Plugin) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Restore ¶
type Restore struct {
ContainerName string `json:"containerName"`
Action Handler `json:"action"`
RecoveryOnce uint64 `json:"recoveryOnce,omitempty"`
}
Restore defines configuration of Jenkins backup restore
func (*Restore) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Restore.
func (*Restore) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SeedJob ¶
type SeedJob struct {
ID string `json:"id,omitempty"`
CredentialID string `json:"credentialID,omitempty"`
Description string `json:"description,omitempty"`
Targets string `json:"targets,omitempty"`
RepositoryBranch string `json:"repositoryBranch,omitempty"`
RepositoryURL string `json:"repositoryUrl,omitempty"`
JenkinsCredentialType JenkinsCredentialType `json:"credentialType,omitempty"`
}
SeedJob defines configuration for seed jobs and deploy keys
func (*SeedJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedJob.
func (*SeedJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Service ¶
type Service struct {
Annotations map[string]string `json:"annotations,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Type corev1.ServiceType `json:"type,omitempty"`
Port int32 `json:"port,omitempty"`
NodePort int32 `json:"nodePort,omitempty"`
LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"`
LoadBalancerIP string `json:"loadBalancerIP,omitempty"`
}
Service defines Kubernetes service attributes which Operator will manage
func (*Service) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.
func (*Service) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.