-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathcomponent_image.go
46 lines (38 loc) · 1.04 KB
/
component_image.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package v1alpha2
// ImageType describes the type of image.
// Only one of the following image type may be specified.
// +kubebuilder:validation:Enum=Dockerfile
type ImageType string
const (
DockerfileImageType ImageType = "Dockerfile"
)
type BaseImage struct {
}
// Component that allows the developer to build a runtime image for outerloop
type ImageComponent struct {
BaseComponent `json:",inline"`
Image `json:",inline"`
}
type Image struct {
// Name of the image for the resulting outerloop build
ImageName string `json:"imageName"`
ImageUnion `json:",inline"`
}
// +union
// +devfile:getter:generate
type ImageUnion struct {
// Type of image
//
// +unionDiscriminator
// +optional
ImageType ImageType `json:"imageType,omitempty"`
// Allows specifying dockerfile type build
// +optional
Dockerfile *DockerfileImage `json:"dockerfile,omitempty"`
// Defines if the image should be built during startup.
//
// Default value is `false`
// +optional
// +devfile:default:value=false
AutoBuild *bool `json:"autoBuild,omitempty"`
}