v1alpha1

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the jenkins.io v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=jenkins.io

Package v1alpha1 contains API Schema definitions for the jenkins.io v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=jenkins.io

Index

Constants

View Source
const (
	// Kind defines Jenkins CRD kind name
	Kind = "Jenkins"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "jenkins.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)

AllowedJenkinsCredentialMap contains all allowed Jenkins credentials types

Functions

This section is empty.

Types

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

func (in *Build) DeepCopy() *Build

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Build.

func (*Build) DeepCopyInto

func (in *Build) DeepCopyInto(out *Build)

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 added in v0.0.10

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

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

func (*Jenkins) DeepCopy

func (in *Jenkins) DeepCopy() *Jenkins

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Jenkins.

func (*Jenkins) DeepCopyInto

func (in *Jenkins) DeepCopyInto(out *Jenkins)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Jenkins) DeepCopyObject

func (in *Jenkins) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Jenkins) GetObjectKind added in v0.0.12

func (in *Jenkins) GetObjectKind() schema.ObjectKind

type JenkinsCredentialType added in v0.0.8

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 {
	Container //TODO move to containers

	// 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"`

	// OperatorPlugins contains plugins required by operator
	OperatorPlugins map[string][]string `json:"basePlugins,omitempty"`
	// Plugins contains plugins required by user
	Plugins map[string][]string `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"`
}

JenkinsSpec defines the desired state of Jenkins

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"`
}

JenkinsStatus defines the observed state of Jenkins

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 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 defined configuration for seed jobs and deploy keys

func (*SeedJob) DeepCopy

func (in *SeedJob) DeepCopy() *SeedJob

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedJob.

func (*SeedJob) DeepCopyInto

func (in *SeedJob) DeepCopyInto(out *SeedJob)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Service added in v0.0.7

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 added in v0.0.7

func (in *Service) DeepCopy() *Service

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.

func (*Service) DeepCopyInto added in v0.0.7

func (in *Service) DeepCopyInto(out *Service)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL