未验证 提交 efc96f05 编写于 作者: K KubeSphere CI Bot 提交者: GitHub

Merge pull request #627 from runzexia/update-s2i

update s2i version
...@@ -4469,7 +4469,7 @@ ...@@ -4469,7 +4469,7 @@
"secretRef": { "secretRef": {
"$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference"
}, },
"server_address": { "serverAddress": {
"type": "string" "type": "string"
}, },
"username": { "username": {
...@@ -4514,6 +4514,31 @@ ...@@ -4514,6 +4514,31 @@
} }
} }
}, },
"com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.ContainerInfo": {
"type": "object",
"properties": {
"buildVolumes": {
"description": "BuildVolumes specifies a list of volumes to mount to container running the build.",
"type": "array",
"items": {
"type": "string"
}
},
"builderImage": {
"description": "BaseImage are the images this template will use.",
"type": "string"
},
"runtimeArtifacts": {
"type": "array",
"items": {
"$ref": "#/definitions/com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.VolumeSpec"
}
},
"runtimeImage": {
"type": "string"
}
}
},
"com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.DockerConfig": { "com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.DockerConfig": {
"description": "DockerConfig contains the configuration for a Docker connection.", "description": "DockerConfig contains the configuration for a Docker connection.",
"type": "object", "type": "object",
...@@ -4779,17 +4804,17 @@ ...@@ -4779,17 +4804,17 @@
"description": "S2iBuilderTemplateSpec defines the desired state of S2iBuilderTemplate", "description": "S2iBuilderTemplateSpec defines the desired state of S2iBuilderTemplate",
"type": "object", "type": "object",
"properties": { "properties": {
"baseImages": {
"description": "BaseImages are the images this template will use.",
"type": "array",
"items": {
"type": "string"
}
},
"codeFramework": { "codeFramework": {
"description": "CodeFramework means which language this template is designed for and which framework is using if has framework. Like Java, NodeJS etc", "description": "CodeFramework means which language this template is designed for and which framework is using if has framework. Like Java, NodeJS etc",
"type": "string" "type": "string"
}, },
"containerInfo": {
"description": "Images are the images this template will use.",
"type": "array",
"items": {
"$ref": "#/definitions/com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.ContainerInfo"
}
},
"defaultBaseImage": { "defaultBaseImage": {
"description": "DefaultBaseImage is the image that will be used by default", "description": "DefaultBaseImage is the image that will be used by default",
"type": "string" "type": "string"
...@@ -4961,6 +4986,10 @@ ...@@ -4961,6 +4986,10 @@
"$ref": "#/definitions/com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.VolumeSpec" "$ref": "#/definitions/com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.VolumeSpec"
} }
}, },
"isBinaryURL": {
"description": "IsBinaryURL explain the type of SourceURL. If it is IsBinaryURL, it will download the file directly without using git.",
"type": "boolean"
},
"keepSymlinks": { "keepSymlinks": {
"description": "KeepSymlinks indicates to copy symlinks as symlinks. Default behavior is to follow symlinks and copy files by content.", "description": "KeepSymlinks indicates to copy symlinks as symlinks. Default behavior is to follow symlinks and copy files by content.",
"type": "boolean" "type": "boolean"
...@@ -4980,6 +5009,17 @@ ...@@ -4980,6 +5009,17 @@
"description": "LayeredBuild describes if this is build which layered scripts and sources on top of BuilderImage.", "description": "LayeredBuild describes if this is build which layered scripts and sources on top of BuilderImage.",
"type": "boolean" "type": "boolean"
}, },
"nodeAffinityKey": {
"description": "The key of Node Affinity.",
"type": "string"
},
"nodeAffinityValues": {
"description": "The values of Node Affinity.",
"type": "array",
"items": {
"type": "string"
}
},
"outputImageName": { "outputImageName": {
"description": "OutputImageName is a result image name without tag, default is latest. tag will append to ImageName in the end", "description": "OutputImageName is a result image name without tag, default is latest. tag will append to ImageName in the end",
"type": "string" "type": "string"
...@@ -5004,6 +5044,10 @@ ...@@ -5004,6 +5044,10 @@
"description": "RemovePreviousImage describes if previous image should be removed after successful build. This applies only to incremental builds.", "description": "RemovePreviousImage describes if previous image should be removed after successful build. This applies only to incremental builds.",
"type": "boolean" "type": "boolean"
}, },
"revisionId": {
"description": "The RevisionId is a branch name or a SHA-1 hash of every important thing about the commit",
"type": "string"
},
"runImage": { "runImage": {
"description": "RunImage will trigger a \"docker run ...\" invocation of the produced image so the user can see if it operates as he would expect", "description": "RunImage will trigger a \"docker run ...\" invocation of the produced image so the user can see if it operates as he would expect",
"type": "boolean" "type": "boolean"
...@@ -5050,6 +5094,10 @@ ...@@ -5050,6 +5094,10 @@
"description": "Tag is a result image tag name.", "description": "Tag is a result image tag name.",
"type": "string" "type": "string"
}, },
"taintKey": {
"description": "The name of taint.",
"type": "string"
},
"usage": { "usage": {
"description": "Usage allows for properly shortcircuiting s2i logic when `s2i usage` is invoked", "description": "Usage allows for properly shortcircuiting s2i logic when `s2i usage` is invoked",
"type": "boolean" "type": "boolean"
...@@ -5143,6 +5191,14 @@ ...@@ -5143,6 +5191,14 @@
"description": "BuilderName specify the name of s2ibuilder, required", "description": "BuilderName specify the name of s2ibuilder, required",
"type": "string" "type": "string"
}, },
"newRevisionId": {
"description": "NewRevisionId override the default NewRevisionId in its s2ibuilder.",
"type": "string"
},
"newSourceURL": {
"description": "NewSourceURL is used to download new binary artifacts",
"type": "string"
},
"newTag": { "newTag": {
"description": "NewTag override the default tag in its s2ibuilder, image name cannot be changed.", "description": "NewTag override the default tag in its s2ibuilder, image name cannot be changed.",
"type": "string" "type": "string"
...@@ -5187,7 +5243,7 @@ ...@@ -5187,7 +5243,7 @@
"com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.UserDefineTemplate": { "com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.UserDefineTemplate": {
"type": "object", "type": "object",
"properties": { "properties": {
"baseImage": { "builderImage": {
"description": "BaseImage specify which version of this template to use", "description": "BaseImage specify which version of this template to use",
"type": "string" "type": "string"
}, },
...@@ -5207,21 +5263,16 @@ ...@@ -5207,21 +5263,16 @@
"com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.VolumeSpec": { "com.github.kubesphere.s2ioperator.pkg.apis.devops.v1alpha1.VolumeSpec": {
"description": "VolumeSpec represents a single volume mount point.", "description": "VolumeSpec represents a single volume mount point.",
"type": "object", "type": "object",
"required": [
"Source",
"Destination",
"Keep"
],
"properties": { "properties": {
"Destination": { "destination": {
"description": "Destination is the path to mount the volume to - absolute or relative.", "description": "Destination is the path to mount the volume to - absolute or relative.",
"type": "string" "type": "string"
}, },
"Keep": { "keep": {
"description": "Keep indicates if the mounted data should be kept in the final image.", "description": "Keep indicates if the mounted data should be kept in the final image.",
"type": "boolean" "type": "boolean"
}, },
"Source": { "source": {
"description": "Source is a reference to the volume source.", "description": "Source is a reference to the volume source.",
"type": "string" "type": "string"
} }
......
...@@ -69,7 +69,7 @@ require ( ...@@ -69,7 +69,7 @@ require (
github.com/knative/pkg v0.0.0-20190314204845-cd278f2d3394 github.com/knative/pkg v0.0.0-20190314204845-cd278f2d3394
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/kubernetes-sigs/application v0.0.0-20190404151855-67ae7f915d4e github.com/kubernetes-sigs/application v0.0.0-20190404151855-67ae7f915d4e
github.com/kubesphere/s2ioperator v0.0.11 github.com/kubesphere/s2ioperator v0.0.12
github.com/kubesphere/sonargo v0.0.2 github.com/kubesphere/sonargo v0.0.2
github.com/lib/pq v1.2.0 // indirect github.com/lib/pq v1.2.0 // indirect
github.com/lucas-clemente/quic-go v0.11.1 // indirect github.com/lucas-clemente/quic-go v0.11.1 // indirect
......
...@@ -209,8 +209,8 @@ github.com/kubesphere/application v0.0.0-20190518133311-b9d9eb0b5cf7 h1:9dongD6m ...@@ -209,8 +209,8 @@ github.com/kubesphere/application v0.0.0-20190518133311-b9d9eb0b5cf7 h1:9dongD6m
github.com/kubesphere/application v0.0.0-20190518133311-b9d9eb0b5cf7/go.mod h1:xCs7b2bgA24oBSuZYf+5btESJC3xPs//ZTSK1ql+W6I= github.com/kubesphere/application v0.0.0-20190518133311-b9d9eb0b5cf7/go.mod h1:xCs7b2bgA24oBSuZYf+5btESJC3xPs//ZTSK1ql+W6I=
github.com/kubesphere/kiali v0.15.1-0.20190407071308-6b5b818211c3 h1:5IASnVaVqZFzzIc/0FZuAnjWO1gVCUxJe1OFUS42/fU= github.com/kubesphere/kiali v0.15.1-0.20190407071308-6b5b818211c3 h1:5IASnVaVqZFzzIc/0FZuAnjWO1gVCUxJe1OFUS42/fU=
github.com/kubesphere/kiali v0.15.1-0.20190407071308-6b5b818211c3/go.mod h1:Y1EqeixoXkKkU8I+yvOfhdh21+8+etFE6wYOVT2XFdI= github.com/kubesphere/kiali v0.15.1-0.20190407071308-6b5b818211c3/go.mod h1:Y1EqeixoXkKkU8I+yvOfhdh21+8+etFE6wYOVT2XFdI=
github.com/kubesphere/s2ioperator v0.0.11 h1:jptEoR+pMb2HXqA6WhMXH3xx0qmtM5kgkoMhO/jaJLQ= github.com/kubesphere/s2ioperator v0.0.12 h1:gEDDjKw7q7gQUuy5qtBIV/adZEwk5liJUBL4CqyOOOY=
github.com/kubesphere/s2ioperator v0.0.11/go.mod h1:dv9L+zRYDlHvnKPp0j6VHRtlGB1BU+lloltW9SAWqVU= github.com/kubesphere/s2ioperator v0.0.12/go.mod h1:dv9L+zRYDlHvnKPp0j6VHRtlGB1BU+lloltW9SAWqVU=
github.com/kubesphere/sonargo v0.0.2 h1:hsSRE3sv3mkPcUAeSABdp7rtfcNW2zzeHXzFa01CTkU= github.com/kubesphere/sonargo v0.0.2 h1:hsSRE3sv3mkPcUAeSABdp7rtfcNW2zzeHXzFa01CTkU=
github.com/kubesphere/sonargo v0.0.2/go.mod h1:ww8n9ANlDXhX5PBZ18iaRnCgEkXN0GMml3/KZXOZ11w= github.com/kubesphere/sonargo v0.0.2/go.mod h1:ww8n9ANlDXhX5PBZ18iaRnCgEkXN0GMml3/KZXOZ11w=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4=
......
...@@ -34,6 +34,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA ...@@ -34,6 +34,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.AuthConfig": schema_pkg_apis_devops_v1alpha1_AuthConfig(ref), "github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.AuthConfig": schema_pkg_apis_devops_v1alpha1_AuthConfig(ref),
"github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.CGroupLimits": schema_pkg_apis_devops_v1alpha1_CGroupLimits(ref), "github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.CGroupLimits": schema_pkg_apis_devops_v1alpha1_CGroupLimits(ref),
"github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.ContainerConfig": schema_pkg_apis_devops_v1alpha1_ContainerConfig(ref), "github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.ContainerConfig": schema_pkg_apis_devops_v1alpha1_ContainerConfig(ref),
"github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.ContainerInfo": schema_pkg_apis_devops_v1alpha1_ContainerInfo(ref),
"github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.DockerConfig": schema_pkg_apis_devops_v1alpha1_DockerConfig(ref), "github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.DockerConfig": schema_pkg_apis_devops_v1alpha1_DockerConfig(ref),
"github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.DockerConfigEntry": schema_pkg_apis_devops_v1alpha1_DockerConfigEntry(ref), "github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.DockerConfigEntry": schema_pkg_apis_devops_v1alpha1_DockerConfigEntry(ref),
"github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.DockerConfigJson": schema_pkg_apis_devops_v1alpha1_DockerConfigJson(ref), "github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.DockerConfigJson": schema_pkg_apis_devops_v1alpha1_DockerConfigJson(ref),
...@@ -325,7 +326,7 @@ func schema_pkg_apis_devops_v1alpha1_AuthConfig(ref common.ReferenceCallback) co ...@@ -325,7 +326,7 @@ func schema_pkg_apis_devops_v1alpha1_AuthConfig(ref common.ReferenceCallback) co
Format: "", Format: "",
}, },
}, },
"server_address": { "serverAddress": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Type: []string{"string"}, Type: []string{"string"},
Format: "", Format: "",
...@@ -436,6 +437,59 @@ func schema_pkg_apis_devops_v1alpha1_ContainerConfig(ref common.ReferenceCallbac ...@@ -436,6 +437,59 @@ func schema_pkg_apis_devops_v1alpha1_ContainerConfig(ref common.ReferenceCallbac
} }
} }
func schema_pkg_apis_devops_v1alpha1_ContainerInfo(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Type: []string{"object"},
Properties: map[string]spec.Schema{
"builderImage": {
SchemaProps: spec.SchemaProps{
Description: "BaseImage are the images this template will use.",
Type: []string{"string"},
Format: "",
},
},
"runtimeImage": {
SchemaProps: spec.SchemaProps{
Type: []string{"string"},
Format: "",
},
},
"runtimeArtifacts": {
SchemaProps: spec.SchemaProps{
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Ref: ref("github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.VolumeSpec"),
},
},
},
},
},
"buildVolumes": {
SchemaProps: spec.SchemaProps{
Description: "BuildVolumes specifies a list of volumes to mount to container running the build.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Type: []string{"string"},
Format: "",
},
},
},
},
},
},
},
},
Dependencies: []string{
"github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.VolumeSpec"},
}
}
func schema_pkg_apis_devops_v1alpha1_DockerConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_pkg_apis_devops_v1alpha1_DockerConfig(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
...@@ -517,6 +571,12 @@ func schema_pkg_apis_devops_v1alpha1_DockerConfigEntry(ref common.ReferenceCallb ...@@ -517,6 +571,12 @@ func schema_pkg_apis_devops_v1alpha1_DockerConfigEntry(ref common.ReferenceCallb
Format: "", Format: "",
}, },
}, },
"serverAddress": {
SchemaProps: spec.SchemaProps{
Type: []string{"string"},
Format: "",
},
},
}, },
Required: []string{"username", "password", "email"}, Required: []string{"username", "password", "email"},
}, },
...@@ -978,15 +1038,14 @@ func schema_pkg_apis_devops_v1alpha1_S2iBuilderTemplateSpec(ref common.Reference ...@@ -978,15 +1038,14 @@ func schema_pkg_apis_devops_v1alpha1_S2iBuilderTemplateSpec(ref common.Reference
Format: "", Format: "",
}, },
}, },
"baseImages": { "containerInfo": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "BaseImages are the images this template will use.", Description: "Images are the images this template will use.",
Type: []string{"array"}, Type: []string{"array"},
Items: &spec.SchemaOrArray{ Items: &spec.SchemaOrArray{
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Type: []string{"string"}, Ref: ref("github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.ContainerInfo"),
Format: "",
}, },
}, },
}, },
...@@ -1037,7 +1096,7 @@ func schema_pkg_apis_devops_v1alpha1_S2iBuilderTemplateSpec(ref common.Reference ...@@ -1037,7 +1096,7 @@ func schema_pkg_apis_devops_v1alpha1_S2iBuilderTemplateSpec(ref common.Reference
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.Parameter"}, "github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.ContainerInfo", "github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1.Parameter"},
} }
} }
...@@ -1470,12 +1529,54 @@ func schema_pkg_apis_devops_v1alpha1_S2iConfig(ref common.ReferenceCallback) com ...@@ -1470,12 +1529,54 @@ func schema_pkg_apis_devops_v1alpha1_S2iConfig(ref common.ReferenceCallback) com
Format: "", Format: "",
}, },
}, },
"isBinaryURL": {
SchemaProps: spec.SchemaProps{
Description: "IsBinaryURL explain the type of SourceURL. If it is IsBinaryURL, it will download the file directly without using git.",
Type: []string{"boolean"},
Format: "",
},
},
"gitSecretRef": { "gitSecretRef": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "GitSecretRef is the BasicAuth Secret of Git Clone", Description: "GitSecretRef is the BasicAuth Secret of Git Clone",
Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), Ref: ref("k8s.io/api/core/v1.LocalObjectReference"),
}, },
}, },
"revisionId": {
SchemaProps: spec.SchemaProps{
Description: "The RevisionId is a branch name or a SHA-1 hash of every important thing about the commit",
Type: []string{"string"},
Format: "",
},
},
"taintKey": {
SchemaProps: spec.SchemaProps{
Description: "The name of taint.",
Type: []string{"string"},
Format: "",
},
},
"nodeAffinityKey": {
SchemaProps: spec.SchemaProps{
Description: "The key of Node Affinity.",
Type: []string{"string"},
Format: "",
},
},
"nodeAffinityValues": {
SchemaProps: spec.SchemaProps{
Description: "The values of Node Affinity.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Type: []string{"string"},
Format: "",
},
},
},
},
},
}, },
Required: []string{"imageName", "sourceUrl"}, Required: []string{"imageName", "sourceUrl"},
}, },
...@@ -1611,6 +1712,20 @@ func schema_pkg_apis_devops_v1alpha1_S2iRunSpec(ref common.ReferenceCallback) co ...@@ -1611,6 +1712,20 @@ func schema_pkg_apis_devops_v1alpha1_S2iRunSpec(ref common.ReferenceCallback) co
Format: "", Format: "",
}, },
}, },
"newRevisionId": {
SchemaProps: spec.SchemaProps{
Description: "NewRevisionId override the default NewRevisionId in its s2ibuilder.",
Type: []string{"string"},
Format: "",
},
},
"newSourceURL": {
SchemaProps: spec.SchemaProps{
Description: "NewSourceURL is used to download new binary artifacts",
Type: []string{"string"},
Format: "",
},
},
}, },
Required: []string{"builderName"}, Required: []string{"builderName"},
}, },
...@@ -1700,7 +1815,7 @@ func schema_pkg_apis_devops_v1alpha1_UserDefineTemplate(ref common.ReferenceCall ...@@ -1700,7 +1815,7 @@ func schema_pkg_apis_devops_v1alpha1_UserDefineTemplate(ref common.ReferenceCall
}, },
}, },
}, },
"baseImage": { "builderImage": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "BaseImage specify which version of this template to use", Description: "BaseImage specify which version of this template to use",
Type: []string{"string"}, Type: []string{"string"},
...@@ -1722,21 +1837,21 @@ func schema_pkg_apis_devops_v1alpha1_VolumeSpec(ref common.ReferenceCallback) co ...@@ -1722,21 +1837,21 @@ func schema_pkg_apis_devops_v1alpha1_VolumeSpec(ref common.ReferenceCallback) co
Description: "VolumeSpec represents a single volume mount point.", Description: "VolumeSpec represents a single volume mount point.",
Type: []string{"object"}, Type: []string{"object"},
Properties: map[string]spec.Schema{ Properties: map[string]spec.Schema{
"Source": { "source": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Source is a reference to the volume source.", Description: "Source is a reference to the volume source.",
Type: []string{"string"}, Type: []string{"string"},
Format: "", Format: "",
}, },
}, },
"Destination": { "destination": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Destination is the path to mount the volume to - absolute or relative.", Description: "Destination is the path to mount the volume to - absolute or relative.",
Type: []string{"string"}, Type: []string{"string"},
Format: "", Format: "",
}, },
}, },
"Keep": { "keep": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Keep indicates if the mounted data should be kept in the final image.", Description: "Keep indicates if the mounted data should be kept in the final image.",
Type: []string{"boolean"}, Type: []string{"boolean"},
...@@ -1744,7 +1859,6 @@ func schema_pkg_apis_devops_v1alpha1_VolumeSpec(ref common.ReferenceCallback) co ...@@ -1744,7 +1859,6 @@ func schema_pkg_apis_devops_v1alpha1_VolumeSpec(ref common.ReferenceCallback) co
}, },
}, },
}, },
Required: []string{"Source", "Destination", "Keep"},
}, },
}, },
Dependencies: []string{}, Dependencies: []string{},
......
...@@ -79,11 +79,11 @@ type CGroupLimits struct { ...@@ -79,11 +79,11 @@ type CGroupLimits struct {
// VolumeSpec represents a single volume mount point. // VolumeSpec represents a single volume mount point.
type VolumeSpec struct { type VolumeSpec struct {
// Source is a reference to the volume source. // Source is a reference to the volume source.
Source string Source string `json:"source,omitempty"`
// Destination is the path to mount the volume to - absolute or relative. // Destination is the path to mount the volume to - absolute or relative.
Destination string Destination string `json:"destination,omitempty"`
// Keep indicates if the mounted data should be kept in the final image. // Keep indicates if the mounted data should be kept in the final image.
Keep bool Keep bool `json:"keep,omitempty"`
} }
// DockerConfig contains the configuration for a Docker connection. // DockerConfig contains the configuration for a Docker connection.
...@@ -113,7 +113,7 @@ type AuthConfig struct { ...@@ -113,7 +113,7 @@ type AuthConfig struct {
Username string `json:"username,omitempty"` Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"` Password string `json:"password,omitempty"`
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
ServerAddress string `json:"server_address,omitempty"` ServerAddress string `json:"serverAddress,omitempty"`
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"` SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
} }
...@@ -395,14 +395,30 @@ type S2iConfig struct { ...@@ -395,14 +395,30 @@ type S2iConfig struct {
// 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 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"` AddHost []string `json:"addHost,omitempty"`
//Export Push the result image to specify image registry in tag // Export Push the result image to specify image registry in tag
Export bool `json:"export,omitempty"` Export bool `json:"export,omitempty"`
//SourceURL is url of the codes such as https://github.com/a/b.git // SourceURL is url of the codes such as https://github.com/a/b.git
SourceURL string `json:"sourceUrl"` SourceURL string `json:"sourceUrl"`
//GitSecretRef is the BasicAuth Secret of Git Clone // 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"` 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"`
} }
type UserDefineTemplate struct { type UserDefineTemplate struct {
...@@ -411,7 +427,7 @@ type UserDefineTemplate struct { ...@@ -411,7 +427,7 @@ type UserDefineTemplate struct {
//Parameters must use with `template`, fill some parameters which template will use //Parameters must use with `template`, fill some parameters which template will use
Parameters []Parameter `json:"parameters,omitempty"` Parameters []Parameter `json:"parameters,omitempty"`
//BaseImage specify which version of this template to use //BaseImage specify which version of this template to use
BaseImage string `json:"baseImage,omitempty"` BuilderImage string `json:"builderImage,omitempty"`
} }
// S2iBuilderSpec defines the desired state of S2iBuilder // S2iBuilderSpec defines the desired state of S2iBuilder
...@@ -480,9 +496,10 @@ type DockerConfigJson struct { ...@@ -480,9 +496,10 @@ type DockerConfigJson struct {
type DockerConfigMap map[string]DockerConfigEntry type DockerConfigMap map[string]DockerConfigEntry
type DockerConfigEntry struct { type DockerConfigEntry struct {
Username string `json:"username"` Username string `json:"username"`
Password string `json:"password"` Password string `json:"password"`
Email string `json:"email"` Email string `json:"email"`
ServerAddress string `json:"serverAddress,omitempty"`
} }
func init() { func init() {
......
...@@ -55,8 +55,8 @@ func (p *Parameter) ToEnvonment() *EnvironmentSpec { ...@@ -55,8 +55,8 @@ func (p *Parameter) ToEnvonment() *EnvironmentSpec {
type S2iBuilderTemplateSpec struct { type S2iBuilderTemplateSpec struct {
//DefaultBaseImage is the image that will be used by default //DefaultBaseImage is the image that will be used by default
DefaultBaseImage string `json:"defaultBaseImage,omitempty"` DefaultBaseImage string `json:"defaultBaseImage,omitempty"`
//BaseImages are the images this template will use. //Images are the images this template will use.
BaseImages []string `json:"baseImages,omitempty"` 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 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"` CodeFramework CodeFramework `json:"codeFramework,omitempty"`
// Parameters is a set of environment variables to be passed to the image. // Parameters is a set of environment variables to be passed to the image.
...@@ -69,6 +69,16 @@ type S2iBuilderTemplateSpec struct { ...@@ -69,6 +69,16 @@ type S2iBuilderTemplateSpec struct {
IconPath string `json:"iconPath,omitempty"` IconPath string `json:"iconPath,omitempty"`
} }
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"`
}
// S2iBuilderTemplateStatus defines the observed state of S2iBuilderTemplate // S2iBuilderTemplateStatus defines the observed state of S2iBuilderTemplate
type S2iBuilderTemplateStatus struct { type S2iBuilderTemplateStatus struct {
} }
......
...@@ -39,6 +39,10 @@ type S2iRunSpec struct { ...@@ -39,6 +39,10 @@ type S2iRunSpec struct {
SecondsAfterFinished int32 `json:"secondsAfterFinished,omitempty"` SecondsAfterFinished int32 `json:"secondsAfterFinished,omitempty"`
//NewTag override the default tag in its s2ibuilder, image name cannot be changed. //NewTag override the default tag in its s2ibuilder, image name cannot be changed.
NewTag string `json:"newTag,omitempty"` 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"`
} }
// S2iRunStatus defines the observed state of S2iRun // S2iRunStatus defines the observed state of S2iRun
......
...@@ -89,6 +89,32 @@ func (in *ContainerConfig) DeepCopy() *ContainerConfig { ...@@ -89,6 +89,32 @@ func (in *ContainerConfig) DeepCopy() *ContainerConfig {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ContainerInfo) DeepCopyInto(out *ContainerInfo) {
*out = *in
if in.RuntimeArtifacts != nil {
in, out := &in.RuntimeArtifacts, &out.RuntimeArtifacts
*out = make([]VolumeSpec, len(*in))
copy(*out, *in)
}
if in.BuildVolumes != nil {
in, out := &in.BuildVolumes, &out.BuildVolumes
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerInfo.
func (in *ContainerInfo) DeepCopy() *ContainerInfo {
if in == nil {
return nil
}
out := new(ContainerInfo)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DockerConfig) DeepCopyInto(out *DockerConfig) { func (in *DockerConfig) DeepCopyInto(out *DockerConfig) {
*out = *in *out = *in
...@@ -421,10 +447,12 @@ func (in *S2iBuilderTemplateList) DeepCopyObject() runtime.Object { ...@@ -421,10 +447,12 @@ func (in *S2iBuilderTemplateList) DeepCopyObject() runtime.Object {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *S2iBuilderTemplateSpec) DeepCopyInto(out *S2iBuilderTemplateSpec) { func (in *S2iBuilderTemplateSpec) DeepCopyInto(out *S2iBuilderTemplateSpec) {
*out = *in *out = *in
if in.BaseImages != nil { if in.ContainerInfo != nil {
in, out := &in.BaseImages, &out.BaseImages in, out := &in.ContainerInfo, &out.ContainerInfo
*out = make([]string, len(*in)) *out = make([]ContainerInfo, len(*in))
copy(*out, *in) for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
} }
if in.Parameters != nil { if in.Parameters != nil {
in, out := &in.Parameters, &out.Parameters in, out := &in.Parameters, &out.Parameters
...@@ -547,6 +575,11 @@ func (in *S2iConfig) DeepCopyInto(out *S2iConfig) { ...@@ -547,6 +575,11 @@ func (in *S2iConfig) DeepCopyInto(out *S2iConfig) {
*out = new(v1.LocalObjectReference) *out = new(v1.LocalObjectReference)
**out = **in **out = **in
} }
if in.NodeAffinityValues != nil {
in, out := &in.NodeAffinityValues, &out.NodeAffinityValues
*out = make([]string, len(*in))
copy(*out, *in)
}
return return
} }
......
...@@ -270,7 +270,7 @@ github.com/kubernetes-sigs/application/pkg/resource ...@@ -270,7 +270,7 @@ github.com/kubernetes-sigs/application/pkg/resource
github.com/kubernetes-sigs/application/pkg/genericreconciler github.com/kubernetes-sigs/application/pkg/genericreconciler
github.com/kubernetes-sigs/application/pkg/kbcontroller github.com/kubernetes-sigs/application/pkg/kbcontroller
github.com/kubernetes-sigs/application/pkg/client/clientset/versioned/scheme github.com/kubernetes-sigs/application/pkg/client/clientset/versioned/scheme
# github.com/kubesphere/s2ioperator v0.0.11 # github.com/kubesphere/s2ioperator v0.0.12
github.com/kubesphere/s2ioperator/pkg/client/informers/externalversions github.com/kubesphere/s2ioperator/pkg/client/informers/externalversions
github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1 github.com/kubesphere/s2ioperator/pkg/apis/devops/v1alpha1
github.com/kubesphere/s2ioperator/pkg/client/clientset/versioned github.com/kubesphere/s2ioperator/pkg/client/clientset/versioned
...@@ -706,8 +706,8 @@ k8s.io/apimachinery/pkg/labels ...@@ -706,8 +706,8 @@ k8s.io/apimachinery/pkg/labels
k8s.io/apimachinery/pkg/runtime/schema k8s.io/apimachinery/pkg/runtime/schema
k8s.io/apimachinery/pkg/runtime k8s.io/apimachinery/pkg/runtime
k8s.io/apimachinery/pkg/util/runtime k8s.io/apimachinery/pkg/util/runtime
k8s.io/apimachinery/pkg/apis/meta/v1
k8s.io/apimachinery/pkg/api/resource k8s.io/apimachinery/pkg/api/resource
k8s.io/apimachinery/pkg/apis/meta/v1
k8s.io/apimachinery/pkg/util/intstr k8s.io/apimachinery/pkg/util/intstr
k8s.io/apimachinery/pkg/util/net k8s.io/apimachinery/pkg/util/net
k8s.io/apimachinery/pkg/runtime/serializer k8s.io/apimachinery/pkg/runtime/serializer
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册