Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the devops v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/hzhhong/kubesphere/pkg/apis/devops +k8s:defaulter-gen=TypeMeta +groupName=devops.kubesphere.io
Package v1alpha1 contains API Schema definitions for the devops v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/hzhhong/kubesphere/pkg/apis/devops +k8s:defaulter-gen=TypeMeta +groupName=devops.kubesphere.io
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func Resource(resource string) schema.GroupResource
- type AuthConfig
- type CGroupLimits
- type CodeFramework
- type ContainerConfig
- type ContainerInfo
- type DockerConfig
- type DockerConfigEntry
- type DockerConfigJson
- type DockerConfigMap
- type DockerNetworkMode
- type EnvironmentSpec
- type Parameter
- type ProxyConfig
- type PullPolicy
- type RunState
- type S2iAutoScale
- type S2iBinary
- type S2iBinaryList
- type S2iBinarySpec
- type S2iBinaryStatus
- type S2iBuildResult
- type S2iBuildSource
- type S2iBuilder
- type S2iBuilderList
- type S2iBuilderSpec
- type S2iBuilderStatus
- type S2iBuilderTemplate
- type S2iBuilderTemplateList
- type S2iBuilderTemplateSpec
- type S2iBuilderTemplateStatus
- type S2iConfig
- type S2iRun
- type S2iRunList
- type S2iRunSpec
- type S2iRunStatus
- type TriggerSource
- type UserDefineTemplate
- type VolumeSpec
Constants ¶
const ( ResourceKindS2iBinary = "S2iBinary" ResourceSingularS2iBinary = "s2ibinary" ResourcePluralS2iBinary = "s2ibinaries" )
const ( StatusUploading = "Uploading" StatusReady = "Ready" StatusUploadFailed = "UploadFailed" )
const ( S2iBinaryFinalizerName = "s2ibinary.finalizers.kubesphere.io" S2iBinaryLabelKey = "s2ibinary-name.kubesphere.io" )
const ( ResourceKindS2iBuilder = "S2iBuilder" ResourceSingularS2iBuilder = "s2ibuilder" ResourcePluralS2iBuilder = "s2ibuilders" )
const ( AutoScaleAnnotations = "devops.kubesphere.io/autoscale" S2iRunLabel = "devops.kubesphere.io/s2ir" S2irCompletedScaleAnnotations = "devops.kubesphere.io/completedscale" WorkLoadCompletedInitAnnotations = "devops.kubesphere.io/inithasbeencomplted" S2iRunDoNotAutoScaleAnnotations = "devops.kubesphere.io/donotautoscale" DescriptionAnnotations = "desc" )
const ( KindDeployment = "Deployment" KindStatefulSet = "StatefulSet" )
const ( // PullAlways means that we always attempt to pull the latest image. PullAlways PullPolicy = "always" // PullNever means that we never pull an image, but only use a local image. PullNever PullPolicy = "never" // PullIfNotPresent means that we pull if the image isn't present on disk. PullIfNotPresent PullPolicy = "if-not-present" // DefaultBuilderPullPolicy specifies the default pull policy to use DefaultBuilderPullPolicy = PullIfNotPresent // DefaultRuntimeImagePullPolicy specifies the default pull policy to use. DefaultRuntimeImagePullPolicy = PullIfNotPresent // DefaultPreviousImagePullPolicy specifies policy for pulling the previously // build Docker image when doing incremental build DefaultPreviousImagePullPolicy = PullIfNotPresent )
const ( // DockerNetworkModeHost places the container in the default (host) network namespace. DockerNetworkModeHost DockerNetworkMode = "host" // DockerNetworkModeBridge instructs docker to create a network namespace for this container connected to the docker0 bridge via a veth-pair. DockerNetworkModeBridge DockerNetworkMode = "bridge" // DockerNetworkModeContainerPrefix is the string prefix used by NewDockerNetworkModeContainer. DockerNetworkModeContainerPrefix string = "container:" // DockerNetworkModeNetworkNamespacePrefix is the string prefix used when sharing a namespace from a CRI-O container. DockerNetworkModeNetworkNamespacePrefix string = "netns:" )
const ( ResourceKindS2iBuilderTemplate = "S2iBuilderTemplate" ResourceSingularS2iBuilderTemplate = "s2ibuildertemplate" ResourcePluralS2iBuilderTemplate = "s2ibuildertemplates" )
const ( ResourceKindS2iRun = "S2iRun" ResourceSingularS2iRun = "s2irun" ResourcePluralS2iRun = "s2iruns" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "devops.kubesphere.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by pkg/client/... AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type AuthConfig ¶
type AuthConfig struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Email string `json:"email,omitempty"` ServerAddress string `json:"serverAddress,omitempty"` SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"` }
AuthConfig is our abstraction of the Registry authorization information for whatever docker client we happen to be based on
func (*AuthConfig) DeepCopy ¶
func (in *AuthConfig) DeepCopy() *AuthConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthConfig.
func (*AuthConfig) DeepCopyInto ¶
func (in *AuthConfig) DeepCopyInto(out *AuthConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CGroupLimits ¶
type CGroupLimits struct { MemoryLimitBytes int64 `json:"memoryLimitBytes"` CPUPeriod int64 `json:"cpuPeriod"` CPUQuota int64 `json:"cpuQuota"` MemorySwap int64 `json:"memorySwap"` Parent string `json:"parent"` }
CGroupLimits holds limits used to constrain container resources.
func (*CGroupLimits) DeepCopy ¶
func (in *CGroupLimits) DeepCopy() *CGroupLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CGroupLimits.
func (*CGroupLimits) DeepCopyInto ¶
func (in *CGroupLimits) DeepCopyInto(out *CGroupLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodeFramework ¶
type CodeFramework string
const ( Ruby CodeFramework = "ruby" Go CodeFramework = "go" Java CodeFramework = "Java" JavaTomcat CodeFramework = "JavaTomcat" Nodejs CodeFramework = "Nodejs" Python CodeFramework = "python" )
type ContainerConfig ¶
ContainerConfig is the abstraction of the docker client provider (formerly go-dockerclient, now either engine-api or kube docker client) container.Config type that is leveraged by s2i or origin
func (*ContainerConfig) DeepCopy ¶
func (in *ContainerConfig) DeepCopy() *ContainerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerConfig.
func (*ContainerConfig) DeepCopyInto ¶
func (in *ContainerConfig) DeepCopyInto(out *ContainerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContainerInfo ¶
type ContainerInfo struct { //BaseImage are the images this template will use. BuilderImage string `json:"builderImage,omitempty"` RuntimeImage string `json:"runtimeImage,omitempty"` RuntimeArtifacts []VolumeSpec `json:"runtimeArtifacts,omitempty"` // BuildVolumes specifies a list of volumes to mount to container running the // build. BuildVolumes []string `json:"buildVolumes,omitempty"` }
func (*ContainerInfo) DeepCopy ¶
func (in *ContainerInfo) DeepCopy() *ContainerInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerInfo.
func (*ContainerInfo) DeepCopyInto ¶
func (in *ContainerInfo) DeepCopyInto(out *ContainerInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DockerConfig ¶
type DockerConfig struct { // Endpoint is the docker network endpoint or socket Endpoint string `json:"endPoint"` // CertFile is the certificate file path for a TLS connection CertFile string `json:"certFile"` // KeyFile is the key file path for a TLS connection KeyFile string `json:"keyFile"` // CAFile is the certificate authority file path for a TLS connection CAFile string `json:"caFile"` // UseTLS indicates if TLS must be used UseTLS bool `json:"useTLS"` // TLSVerify indicates if TLS peer must be verified TLSVerify bool `json:"tlsVerify"` }
DockerConfig contains the configuration for a Docker connection.
func (*DockerConfig) DeepCopy ¶
func (in *DockerConfig) DeepCopy() *DockerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfig.
func (*DockerConfig) DeepCopyInto ¶
func (in *DockerConfig) DeepCopyInto(out *DockerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DockerConfigEntry ¶
type DockerConfigEntry struct { Username string `json:"username"` Password string `json:"password"` Email string `json:"email"` ServerAddress string `json:"serverAddress,omitempty"` }
func (*DockerConfigEntry) DeepCopy ¶
func (in *DockerConfigEntry) DeepCopy() *DockerConfigEntry
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfigEntry.
func (*DockerConfigEntry) DeepCopyInto ¶
func (in *DockerConfigEntry) DeepCopyInto(out *DockerConfigEntry)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DockerConfigJson ¶
type DockerConfigJson struct {
Auths DockerConfigMap `json:"auths"`
}
func (*DockerConfigJson) DeepCopy ¶
func (in *DockerConfigJson) DeepCopy() *DockerConfigJson
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfigJson.
func (*DockerConfigJson) DeepCopyInto ¶
func (in *DockerConfigJson) DeepCopyInto(out *DockerConfigJson)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DockerConfigMap ¶
type DockerConfigMap map[string]DockerConfigEntry
DockerConfig represents the config file used by the docker CLI. This config that represents the credentials that should be used when pulling images from specific image repositories.
func (DockerConfigMap) DeepCopy ¶
func (in DockerConfigMap) DeepCopy() DockerConfigMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfigMap.
func (DockerConfigMap) DeepCopyInto ¶
func (in DockerConfigMap) DeepCopyInto(out *DockerConfigMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DockerNetworkMode ¶
type DockerNetworkMode string
DockerNetworkMode specifies the network mode setting for the docker container
func NewDockerNetworkModeContainer ¶
func NewDockerNetworkModeContainer(id string) DockerNetworkMode
NewDockerNetworkModeContainer creates a DockerNetworkMode value which instructs docker to place the container in the network namespace of an existing container. It can be used, for instance, to place the s2i container in the network namespace of the infrastructure container of a k8s pod.
type EnvironmentSpec ¶
EnvironmentSpec specifies a single environment variable.
func (*EnvironmentSpec) DeepCopy ¶
func (in *EnvironmentSpec) DeepCopy() *EnvironmentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentSpec.
func (*EnvironmentSpec) DeepCopyInto ¶
func (in *EnvironmentSpec) DeepCopyInto(out *EnvironmentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Parameter ¶
type Parameter struct { Description string `json:"description,omitempty"` Key string `json:"key,omitempty"` Type string `json:"type,omitempty"` OptValues []string `json:"optValues,omitempty"` Required bool `json:"required,omitempty"` DefaultValue string `json:"defaultValue,omitempty"` Value string `json:"value,omitempty"` }
func (*Parameter) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parameter.
func (*Parameter) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Parameter) ToEnvonment ¶
func (p *Parameter) ToEnvonment() *EnvironmentSpec
type ProxyConfig ¶
type ProxyConfig struct { HTTPProxy string `json:"httpProxy,omitempty"` HTTPSProxy string `json:"httpsProxy,omitempty"` }
ProxyConfig holds proxy configuration.
func (*ProxyConfig) DeepCopy ¶
func (in *ProxyConfig) DeepCopy() *ProxyConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig.
func (*ProxyConfig) DeepCopyInto ¶
func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PullPolicy ¶
type PullPolicy string
func (*PullPolicy) Set ¶
func (p *PullPolicy) Set(v string) error
Set implements the Set() function of pflags.Value interface The valid options are "always", "never" or "if-not-present"
func (*PullPolicy) String ¶
func (p *PullPolicy) String() string
String implements the String() function of pflags.Value so this can be used as command line parameter. This method is really used just to show the default value when printing help. It will not default the configuration.
func (*PullPolicy) Type ¶
func (p *PullPolicy) Type() string
Type implements the Type() function of pflags.Value interface
type S2iAutoScale ¶
type S2iAutoScale struct { Kind string `json:"kind"` Name string `json:"name"` InitReplicas *int32 `json:"initReplicas,omitempty"` Containers []string `json:"containers,omitempty"` }
func (*S2iAutoScale) DeepCopy ¶
func (in *S2iAutoScale) DeepCopy() *S2iAutoScale
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iAutoScale.
func (*S2iAutoScale) DeepCopyInto ¶
func (in *S2iAutoScale) DeepCopyInto(out *S2iAutoScale)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iBinary ¶
type S2iBinary struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec S2iBinarySpec `json:"spec,omitempty"` Status S2iBinaryStatus `json:"status,omitempty"` }
S2iBinary is the Schema for the s2ibinaries API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="FileName",type="string",JSONPath=".spec.fileName" +kubebuilder:printcolumn:name="MD5",type="string",JSONPath=".spec.md5" +kubebuilder:printcolumn:name="Size",type="string",JSONPath=".spec.size" +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase"
func (*S2iBinary) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBinary.
func (*S2iBinary) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*S2iBinary) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type S2iBinaryList ¶
type S2iBinaryList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []S2iBinary `json:"items"` }
S2iBinaryList contains a list of S2iBinary
func (*S2iBinaryList) DeepCopy ¶
func (in *S2iBinaryList) DeepCopy() *S2iBinaryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBinaryList.
func (*S2iBinaryList) DeepCopyInto ¶
func (in *S2iBinaryList) DeepCopyInto(out *S2iBinaryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*S2iBinaryList) DeepCopyObject ¶
func (in *S2iBinaryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type S2iBinarySpec ¶
type S2iBinarySpec struct { //FileName is filename of binary FileName string `json:"fileName,omitempty"` //MD5 is Binary's MD5 Hash MD5 string `json:"md5,omitempty"` //Size is the file size of file Size string `json:"size,omitempty"` //DownloadURL in KubeSphere DownloadURL string `json:"downloadURL,omitempty"` // UploadTime is last upload time UploadTimeStamp *metav1.Time `json:"uploadTimeStamp,omitempty"` }
S2iBinarySpec defines the desired state of S2iBinary
func (*S2iBinarySpec) DeepCopy ¶
func (in *S2iBinarySpec) DeepCopy() *S2iBinarySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBinarySpec.
func (*S2iBinarySpec) DeepCopyInto ¶
func (in *S2iBinarySpec) DeepCopyInto(out *S2iBinarySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iBinaryStatus ¶
type S2iBinaryStatus struct { //Phase is status of S2iBinary . Possible value is "Ready","UnableToDownload" Phase string `json:"phase,omitempty"` }
S2iBinaryStatus defines the observed state of S2iBinary
func (*S2iBinaryStatus) DeepCopy ¶
func (in *S2iBinaryStatus) DeepCopy() *S2iBinaryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBinaryStatus.
func (*S2iBinaryStatus) DeepCopyInto ¶
func (in *S2iBinaryStatus) DeepCopyInto(out *S2iBinaryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iBuildResult ¶
type S2iBuildResult struct { //ImageName is the name of artifact ImageName string `json:"imageName,omitempty"` //The size in bytes of the image ImageSize int64 `json:"imageSize,omitempty"` // Image ID. ImageID string `json:"imageID,omitempty"` // Image created time. ImageCreated string `json:"imageCreated,omitempty"` // image tags. ImageRepoTags []string `json:"imageRepoTags,omitempty"` // Command for pull image. CommandPull string `json:"commandPull,omitempty"` }
func (*S2iBuildResult) DeepCopy ¶
func (in *S2iBuildResult) DeepCopy() *S2iBuildResult
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuildResult.
func (*S2iBuildResult) DeepCopyInto ¶
func (in *S2iBuildResult) DeepCopyInto(out *S2iBuildResult)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iBuildSource ¶
type S2iBuildSource struct { // SourceURL is url of the codes such as https://github.com/a/b.git SourceUrl string `json:"sourceUrl,omitempty"` // The RevisionId is a branch name or a SHA-1 hash of every important thing about the commit RevisionId string `json:"revisionId,omitempty"` // Binary file Name BinaryName string `json:"binaryName,omitempty"` // Binary file Size BinarySize uint64 `json:"binarySize,omitempty"` // // BuilderImage describes which image is used for building the result images. BuilderImage string `json:"builderImage,omitempty"` // Description is a result image description label. The default is no // description. Description string `json:"description,omitempty"` // CommitID represents an arbitrary extended object reference in Git as SHA-1 CommitID string `json:"commitID,omitempty"` // CommitterName contains the name of the committer CommitterName string `json:"committerName,omitempty"` // CommitterEmail contains the e-mail of the committer CommitterEmail string `json:"committerEmail,omitempty"` }
func (*S2iBuildSource) DeepCopy ¶
func (in *S2iBuildSource) DeepCopy() *S2iBuildSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuildSource.
func (*S2iBuildSource) DeepCopyInto ¶
func (in *S2iBuildSource) DeepCopyInto(out *S2iBuildSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iBuilder ¶
type S2iBuilder struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec S2iBuilderSpec `json:"spec,omitempty"` Status S2iBuilderStatus `json:"status,omitempty"` }
S2iBuilder is the Schema for the s2ibuilders API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="RunCount",type="integer",JSONPath=".status.runCount" +kubebuilder:printcolumn:name="LastRunState",type="string",JSONPath=".status.lastRunState" +kubebuilder:printcolumn:name="LastRunName",type="string",JSONPath=".status.lastRunName" +kubebuilder:printcolumn:name="LastRunStartTime",type="date",JSONPath=".status.lastRunStartTime" +kubebuilder:resource:shortName=s2ib
func (*S2iBuilder) DeepCopy ¶
func (in *S2iBuilder) DeepCopy() *S2iBuilder
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilder.
func (*S2iBuilder) DeepCopyInto ¶
func (in *S2iBuilder) DeepCopyInto(out *S2iBuilder)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*S2iBuilder) DeepCopyObject ¶
func (in *S2iBuilder) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type S2iBuilderList ¶
type S2iBuilderList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []S2iBuilder `json:"items"` }
S2iBuilderList contains a list of S2iBuilder
func (*S2iBuilderList) DeepCopy ¶
func (in *S2iBuilderList) DeepCopy() *S2iBuilderList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderList.
func (*S2iBuilderList) DeepCopyInto ¶
func (in *S2iBuilderList) DeepCopyInto(out *S2iBuilderList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*S2iBuilderList) DeepCopyObject ¶
func (in *S2iBuilderList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type S2iBuilderSpec ¶
type S2iBuilderSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file Config *S2iConfig `json:"config,omitempty"` //FromTemplate define some inputs from user FromTemplate *UserDefineTemplate `json:"fromTemplate,omitempty"` }
S2iBuilderSpec defines the desired state of S2iBuilder
func (*S2iBuilderSpec) DeepCopy ¶
func (in *S2iBuilderSpec) DeepCopy() *S2iBuilderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderSpec.
func (*S2iBuilderSpec) DeepCopyInto ¶
func (in *S2iBuilderSpec) DeepCopyInto(out *S2iBuilderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iBuilderStatus ¶
type S2iBuilderStatus struct { //RunCount represent the sum of s2irun of this builder RunCount int `json:"runCount"` //LastRunState return the state of the newest run of this builder LastRunState RunState `json:"lastRunState,omitempty"` //LastRunState return the name of the newest run of this builder LastRunName *string `json:"lastRunName,omitempty"` //LastRunStartTime return the startTime of the newest run of this builder LastRunStartTime *metav1.Time `json:"lastRunStartTime,omitempty"` }
S2iBuilderStatus defines the observed state of S2iBuilder
func (*S2iBuilderStatus) DeepCopy ¶
func (in *S2iBuilderStatus) DeepCopy() *S2iBuilderStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderStatus.
func (*S2iBuilderStatus) DeepCopyInto ¶
func (in *S2iBuilderStatus) DeepCopyInto(out *S2iBuilderStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iBuilderTemplate ¶
type S2iBuilderTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec S2iBuilderTemplateSpec `json:"spec,omitempty"` Status S2iBuilderTemplateStatus `json:"status,omitempty"` }
S2iBuilderTemplate is the Schema for the s2ibuildertemplates API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Framework",type="string",JSONPath=".spec.codeFramework" +kubebuilder:printcolumn:name="DefaultBaseImage",type="string",JSONPath=".spec.defaultBaseImage" +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:resource:categories="devops",scope="Cluster",shortName="s2ibt"
func (*S2iBuilderTemplate) DeepCopy ¶
func (in *S2iBuilderTemplate) DeepCopy() *S2iBuilderTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderTemplate.
func (*S2iBuilderTemplate) DeepCopyInto ¶
func (in *S2iBuilderTemplate) DeepCopyInto(out *S2iBuilderTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*S2iBuilderTemplate) DeepCopyObject ¶
func (in *S2iBuilderTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type S2iBuilderTemplateList ¶
type S2iBuilderTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []S2iBuilderTemplate `json:"items"` }
S2iBuilderTemplateList contains a list of S2iBuilderTemplate
func (*S2iBuilderTemplateList) DeepCopy ¶
func (in *S2iBuilderTemplateList) DeepCopy() *S2iBuilderTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderTemplateList.
func (*S2iBuilderTemplateList) DeepCopyInto ¶
func (in *S2iBuilderTemplateList) DeepCopyInto(out *S2iBuilderTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*S2iBuilderTemplateList) DeepCopyObject ¶
func (in *S2iBuilderTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type S2iBuilderTemplateSpec ¶
type S2iBuilderTemplateSpec struct { //DefaultBaseImage is the image that will be used by default DefaultBaseImage string `json:"defaultBaseImage,omitempty"` //Images are the images this template will use. ContainerInfo []ContainerInfo `json:"containerInfo,omitempty"` //CodeFramework means which language this template is designed for and which framework is using if has framework. Like Java, NodeJS etc CodeFramework CodeFramework `json:"codeFramework,omitempty"` // Parameters is a set of environment variables to be passed to the image. Parameters []Parameter `json:"environment,omitempty"` // Version of template Version string `json:"version,omitempty"` // Description illustrate the purpose of this template Description string `json:"description,omitempty"` // IconPath is used for frontend display IconPath string `json:"iconPath,omitempty"` }
S2iBuilderTemplateSpec defines the desired state of S2iBuilderTemplate
func (*S2iBuilderTemplateSpec) DeepCopy ¶
func (in *S2iBuilderTemplateSpec) DeepCopy() *S2iBuilderTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderTemplateSpec.
func (*S2iBuilderTemplateSpec) DeepCopyInto ¶
func (in *S2iBuilderTemplateSpec) DeepCopyInto(out *S2iBuilderTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iBuilderTemplateStatus ¶
type S2iBuilderTemplateStatus struct { }
S2iBuilderTemplateStatus defines the observed state of S2iBuilderTemplate
func (*S2iBuilderTemplateStatus) DeepCopy ¶
func (in *S2iBuilderTemplateStatus) DeepCopy() *S2iBuilderTemplateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderTemplateStatus.
func (*S2iBuilderTemplateStatus) DeepCopyInto ¶
func (in *S2iBuilderTemplateStatus) DeepCopyInto(out *S2iBuilderTemplateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iConfig ¶
type S2iConfig struct { // DisplayName is a result image display-name label. This defaults to the // output image name. DisplayName string `json:"displayName,omitempty"` // Description is a result image description label. The default is no // description. Description string `json:"description,omitempty"` // BuilderImage describes which image is used for building the result images. BuilderImage string `json:"builderImage,omitempty"` // BuilderImageVersion provides optional version information about the builder image. BuilderImageVersion string `json:"builderImageVersion,omitempty"` // BuilderBaseImageVersion provides optional version information about the builder base image. BuilderBaseImageVersion string `json:"builderBaseImageVersion,omitempty"` // RuntimeImage specifies the image that will be a base for resulting image // and will be used for running an application. By default, BuilderImage is // used for building and running, but the latter may be overridden. RuntimeImage string `json:"runtimeImage,omitempty"` //OutputImageName is a result image name without tag, default is latest. tag will append to ImageName in the end OutputImageName string `json:"outputImageName,omitempty"` // RuntimeImagePullPolicy specifies when to pull a runtime image. RuntimeImagePullPolicy PullPolicy `json:"runtimeImagePullPolicy,omitempty"` // RuntimeAuthentication holds the authentication information for pulling the // runtime Docker images from private repositories. RuntimeAuthentication *AuthConfig `json:"runtimeAuthentication,omitempty"` // RuntimeArtifacts specifies a list of source/destination pairs that will // be copied from builder to a runtime image. Source can be a file or // directory. Destination must be a directory. Regardless whether it // is an absolute or relative path, it will be placed into image's WORKDIR. // Destination also can be empty or equals to ".", in this case it just // refers to a root of WORKDIR. // In case it's empty, S2I will try to get this list from // io.openshift.s2i.assemble-input-files label on a RuntimeImage. RuntimeArtifacts []VolumeSpec `json:"runtimeArtifacts,omitempty"` // DockerConfig describes how to access host docker daemon. DockerConfig *DockerConfig `json:"dockerConfig,omitempty"` // PullAuthentication holds the authentication information for pulling the // Docker images from private repositories PullAuthentication *AuthConfig `json:"pullAuthentication,omitempty"` // PullAuthentication holds the authentication information for pulling the // Docker images from private repositories PushAuthentication *AuthConfig `json:"pushAuthentication,omitempty"` // IncrementalAuthentication holds the authentication information for pulling the // previous image from private repositories IncrementalAuthentication *AuthConfig `json:"incrementalAuthentication,omitempty"` // DockerNetworkMode is used to set the docker network setting to --net=container:<id> // when the builder is invoked from a container. DockerNetworkMode DockerNetworkMode `json:"dockerNetworkMode,omitempty"` // PreserveWorkingDir describes if working directory should be left after processing. PreserveWorkingDir bool `json:"preserveWorkingDir,omitempty"` //ImageName Contains the registry address and reponame, tag should set by field tag alone ImageName string `json:"imageName"` // Tag is a result image tag name. Tag string `json:"tag,omitempty"` // BuilderPullPolicy specifies when to pull the builder image BuilderPullPolicy PullPolicy `json:"builderPullPolicy,omitempty"` // PreviousImagePullPolicy specifies when to pull the previously build image // when doing incremental build PreviousImagePullPolicy PullPolicy `json:"previousImagePullPolicy,omitempty"` // Incremental describes whether to try to perform incremental build. Incremental bool `json:"incremental,omitempty"` // IncrementalFromTag sets an alternative image tag to look for existing // artifacts. Tag is used by default if this is not set. IncrementalFromTag string `json:"incrementalFromTag,omitempty"` // RemovePreviousImage describes if previous image should be removed after successful build. // This applies only to incremental builds. RemovePreviousImage bool `json:"removePreviousImage,omitempty"` // Environment is a map of environment variables to be passed to the image. Environment []EnvironmentSpec `json:"environment,omitempty"` // LabelNamespace provides the namespace under which the labels will be generated. LabelNamespace string `json:"labelNamespace,omitempty"` // CallbackURL is a URL which is called upon successful build to inform about that fact. CallbackURL string `json:"callbackUrl,omitempty"` // ScriptsURL is a URL describing where to fetch the S2I scripts from during build process. // This url can be a reference within the builder image if the scheme is specified as image:// ScriptsURL string `json:"scriptsUrl,omitempty"` // Destination specifies a location where the untar operation will place its artifacts. Destination string `json:"destination,omitempty"` // WorkingDir describes temporary directory used for downloading sources, scripts and tar operations. WorkingDir string `json:"workingDir,omitempty"` // WorkingSourceDir describes the subdirectory off of WorkingDir set up during the repo download // that is later used as the root for ignore processing WorkingSourceDir string `json:"workingSourceDir,omitempty"` // LayeredBuild describes if this is build which layered scripts and sources on top of BuilderImage. LayeredBuild bool `json:"layeredBuild,omitempty"` // Specify a relative directory inside the application repository that should // be used as a root directory for the application. ContextDir string `json:"contextDir,omitempty"` // AssembleUser specifies the user to run the assemble script in container AssembleUser string `json:"assembleUser,omitempty"` // RunImage will trigger a "docker run ..." invocation of the produced image so the user // can see if it operates as he would expect RunImage bool `json:"runImage,omitempty"` // Usage allows for properly shortcircuiting s2i logic when `s2i usage` is invoked Usage bool `json:"usage,omitempty"` // Injections specifies a list source/destination folders that are injected to // the container that runs assemble. // All files we inject will be truncated after the assemble script finishes. Injections []VolumeSpec `json:"injections,omitempty"` // CGroupLimits describes the cgroups limits that will be applied to any containers // run by s2i. CGroupLimits *CGroupLimits `json:"cgroupLimits,omitempty"` // DropCapabilities contains a list of capabilities to drop when executing containers DropCapabilities []string `json:"dropCapabilities,omitempty"` // ScriptDownloadProxyConfig optionally specifies the http and https proxy // to use when downloading scripts ScriptDownloadProxyConfig *ProxyConfig `json:"scriptDownloadProxyConfig,omitempty"` // ExcludeRegExp contains a string representation of the regular expression desired for // deciding which files to exclude from the tar stream ExcludeRegExp string `json:"excludeRegExp,omitempty"` // BlockOnBuild prevents s2i from performing a docker build operation // if one is necessary to execute ONBUILD commands, or to layer source code into // the container for images that don't have a tar binary available, if the // image contains ONBUILD commands that would be executed. BlockOnBuild bool `json:"blockOnBuild,omitempty"` // HasOnBuild will be set to true if the builder image contains ONBUILD instructions HasOnBuild bool `json:"hasOnBuild,omitempty"` // BuildVolumes specifies a list of volumes to mount to container running the // build. BuildVolumes []string `json:"buildVolumes,omitempty"` // Labels specify labels and their values to be applied to the resulting image. Label keys // must have non-zero length. The labels defined here override generated labels in case // they have the same name. Labels map[string]string `json:"labels,omitempty"` // SecurityOpt are passed as options to the docker containers launched by s2i. SecurityOpt []string `json:"securityOpt,omitempty"` // KeepSymlinks indicates to copy symlinks as symlinks. Default behavior is to follow // symlinks and copy files by content. KeepSymlinks bool `json:"keepSymlinks,omitempty"` // AsDockerfile indicates the path where the Dockerfile should be written instead of building // a new image. AsDockerfile string `json:"asDockerfile,omitempty"` // ImageWorkDir is the default working directory for the builder image. ImageWorkDir string `json:"imageWorkDir,omitempty"` // ImageScriptsURL is the default location to find the assemble/run scripts for a builder image. // This url can be a reference within the builder image if the scheme is specified as image:// ImageScriptsURL string `json:"imageScriptsUrl,omitempty"` // AddHost Add a line to /etc/hosts for test purpose or private use in LAN. Its format is host:IP,muliple hosts can be added by using multiple --add-host AddHost []string `json:"addHost,omitempty"` // Export Push the result image to specify image registry in tag Export bool `json:"export,omitempty"` // SourceURL is url of the codes such as https://github.com/a/b.git SourceURL string `json:"sourceUrl"` // IsBinaryURL explain the type of SourceURL. // If it is IsBinaryURL, it will download the file directly without using git. IsBinaryURL bool `json:"isBinaryURL,omitempty"` // GitSecretRef is the BasicAuth Secret of Git Clone GitSecretRef *corev1.LocalObjectReference `json:"gitSecretRef,omitempty"` // The RevisionId is a branch name or a SHA-1 hash of every important thing about the commit RevisionId string `json:"revisionId,omitempty"` // The name of taint. TaintKey string `json:"taintKey,omitempty"` // The key of Node Affinity. NodeAffinityKey string `json:"nodeAffinityKey,omitempty"` // The values of Node Affinity. NodeAffinityValues []string `json:"nodeAffinityValues,omitempty"` // Whether output build result to status. OutputBuildResult bool `json:"outputBuildResult,omitempty"` // Regular expressions, ignoring names that do not match the provided regular expression BranchExpression string `json:"branchExpression,omitempty"` // SecretCode SecretCode string `json:"secretCode,omitempty"` }
func (*S2iConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iConfig.
func (*S2iConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iRun ¶
type S2iRun struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec S2iRunSpec `json:"spec,omitempty"` Status S2iRunStatus `json:"status,omitempty"` }
S2iRun is the Schema for the s2iruns API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=s2ir +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.runState" +kubebuilder:printcolumn:name="K8sJobName",type="string",JSONPath=".status.kubernetesJobName" +kubebuilder:printcolumn:name="StartTime",type="date",JSONPath=".status.startTime" +kubebuilder:printcolumn:name="CompletionTime",type="date",JSONPath=".status.completionTime" +kubebuilder:printcolumn:name="ImageName",type="string",JSONPath=".status.s2iBuildResult.imageName"
func (*S2iRun) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iRun.
func (*S2iRun) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*S2iRun) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type S2iRunList ¶
type S2iRunList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []S2iRun `json:"items"` }
S2iRunList contains a list of S2iRun
func (*S2iRunList) DeepCopy ¶
func (in *S2iRunList) DeepCopy() *S2iRunList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iRunList.
func (*S2iRunList) DeepCopyInto ¶
func (in *S2iRunList) DeepCopyInto(out *S2iRunList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*S2iRunList) DeepCopyObject ¶
func (in *S2iRunList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type S2iRunSpec ¶
type S2iRunSpec struct { //BuilderName specify the name of s2ibuilder, required BuilderName string `json:"builderName"` //BackoffLimit limits the restart count of each s2irun. Default is 0 BackoffLimit int32 `json:"backoffLimit,omitempty"` //SecondsAfterFinished if is set and greater than zero, and the job created by s2irun become successful or failed , the job will be auto deleted after SecondsAfterFinished SecondsAfterFinished int32 `json:"secondsAfterFinished,omitempty"` //NewTag override the default tag in its s2ibuilder, image name cannot be changed. NewTag string `json:"newTag,omitempty"` //NewRevisionId override the default NewRevisionId in its s2ibuilder. NewRevisionId string `json:"newRevisionId,omitempty"` //NewSourceURL is used to download new binary artifacts NewSourceURL string `json:"newSourceURL,omitempty"` }
S2iRunSpec defines the desired state of S2iRun
func (*S2iRunSpec) DeepCopy ¶
func (in *S2iRunSpec) DeepCopy() *S2iRunSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iRunSpec.
func (*S2iRunSpec) DeepCopyInto ¶
func (in *S2iRunSpec) DeepCopyInto(out *S2iRunSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S2iRunStatus ¶
type S2iRunStatus struct { // StartTime represent when this run began StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"` // Represents time when the job was completed. It is not guaranteed to // be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. // +optional CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"` // RunState indicates whether this job is done or failed RunState RunState `json:"runState,omitempty"` //LogURL is uesd for external log handler to let user know where is log located in LogURL string `json:"logURL,omitempty"` //KubernetesJobName is the job name in k8s KubernetesJobName string `json:"kubernetesJobName,omitempty"` // S2i build result info. S2iBuildResult *S2iBuildResult `json:"s2iBuildResult,omitempty"` // S2i build source info. S2iBuildSource *S2iBuildSource `json:"s2iBuildSource,omitempty"` }
S2iRunStatus defines the observed state of S2iRun
func (*S2iRunStatus) DeepCopy ¶
func (in *S2iRunStatus) DeepCopy() *S2iRunStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iRunStatus.
func (*S2iRunStatus) DeepCopyInto ¶
func (in *S2iRunStatus) DeepCopyInto(out *S2iRunStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TriggerSource ¶
type TriggerSource string
const ( Default TriggerSource = "Manual" Github TriggerSource = "Github" Gitlab TriggerSource = "Gitlab" SVN TriggerSource = "SVN" Others TriggerSource = "Others" )
type UserDefineTemplate ¶
type UserDefineTemplate struct { //Name specify a template to use, so many fields in Config can left empty Name string `json:"name,omitempty"` //Parameters must use with `template`, fill some parameters which template will use Parameters []Parameter `json:"parameters,omitempty"` //BaseImage specify which version of this template to use BuilderImage string `json:"builderImage,omitempty"` }
func (*UserDefineTemplate) DeepCopy ¶
func (in *UserDefineTemplate) DeepCopy() *UserDefineTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserDefineTemplate.
func (*UserDefineTemplate) DeepCopyInto ¶
func (in *UserDefineTemplate) DeepCopyInto(out *UserDefineTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeSpec ¶
type VolumeSpec struct { // Source is a reference to the volume source. Source string `json:"source,omitempty"` // Destination is the path to mount the volume to - absolute or relative. Destination string `json:"destination,omitempty"` // Keep indicates if the mounted data should be kept in the final image. Keep bool `json:"keep,omitempty"` }
VolumeSpec represents a single volume mount point.
func (*VolumeSpec) DeepCopy ¶
func (in *VolumeSpec) DeepCopy() *VolumeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSpec.
func (*VolumeSpec) DeepCopyInto ¶
func (in *VolumeSpec) DeepCopyInto(out *VolumeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.