Skip to content

Commit

Permalink
update cache volume path (#95)
Browse files Browse the repository at this point in the history
Signed-off-by: soulseen <[email protected]>
  • Loading branch information
Zhuxiaoyang authored and ks-ci-bot committed Aug 5, 2019
1 parent f842307 commit cdf025a
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 43 deletions.
12 changes: 6 additions & 6 deletions config/crds/devops_v1alpha1_s2ibuildertemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ spec:
type: object
spec:
properties:
buildVolumes:
description: BuildVolumes specifies a list of volumes to mount to container
running the build.
items:
type: string
type: array
codeFramework:
description: CodeFramework means which language this template is designed
for and which framework is using if has framework. Like Java, NodeJS
Expand All @@ -55,6 +49,12 @@ spec:
description: Images are the images this template will use.
items:
properties:
buildVolumes:
description: BuildVolumes specifies a list of volumes to mount
to container running the build.
items:
type: string
type: array
builderImage:
description: BaseImage are the images this template will use.
type: string
Expand Down
2 changes: 1 addition & 1 deletion config/samples/autoscale-failed/python-s2i-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ spec:
password: UserShouldEnterUserPassword
builderImage: kubespheredev/python-35-centos7
revisionId: "b3f973b86e78d936df2637eb8058006e9bd5822c"
buildVolumes: ["devops_cache:/opt/app-root/lib"]
buildVolumes: ["s2i_python35_cache:/opt/app-root/lib"]

2 changes: 1 addition & 1 deletion config/samples/devops_v1alpha1_s2ibuilder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ spec:
tag: latest
builderPullPolicy: if-not-present
revisionId: "staging"
buildVolumes: ["devops_cache:/opt/app-root/lib"]
buildVolumes: ["s2i_python35_cache:/opt/app-root/lib"]
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ spec:
tag: latest
revisionId: master
builderPullPolicy: if-not-present
buildVolumes: ["devops_cache:/opt/app-root/lib"]
buildVolumes: ["s2i_java_cache:/opt/app-root/lib"]
5 changes: 3 additions & 2 deletions config/templates/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ spec:
runtimeImage: zhuxiaoyang/s2i-java11-runtime:latest
runtimeArtifacts:
- source: "/deployments"
buildVolumes: ["s2i_java_cache:/tmp/artifacts"]
- builderImage: kubespheredev/java-8-centos7:advanced-2.0.0
runtimeImage: zhuxiaoyang/s2i-java8-runtime:latest
runtimeArtifacts:
- source: "/deployments"
buildVolumes: ["s2i_java_cache:/tmp/artifacts"]
environment:
- key: MAVEN_ARGS
type: string
Expand Down Expand Up @@ -191,5 +193,4 @@ spec:
description: "This is a S2I builder template for Java builds whose result can be run directly without any further application server.It's suited ideally for microservices with a flat classpath (including \"far jars\").
This image also provides an easy integration with an Jolokia agent."
iconPath: assets/java.png
buildVolumes: ["devops_cache:/tmp/artifacts"]
iconPath: assets/java.png
6 changes: 4 additions & 2 deletions config/templates/nodejs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ metadata:
spec:
containerInfo:
- builderImage: kubespheredev/nodejs-8-centos7
buildVolumes: ["s2i_nodejs_cache:/opt/app-root/src/.npm"]
- builderImage: kubespheredev/nodejs-6-centos7
buildVolumes: ["s2i_nodejs_cache:/opt/app-root/src/.npm"]
- builderImage: kubespheredev/nodejs-4-centos7
buildVolumes: ["s2i_nodejs_cache:/opt/app-root/src/.npm"]
environment:
- key: NODE_ENV
type: string
Expand Down Expand Up @@ -54,5 +57,4 @@ spec:
defaultBaseImage: kubespheredev/nodejs-8-centos7
version: 0.0.1
description: "Node.js available as container is a base platform for building and running various Node.js applications and frameworks. Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices."
iconPath: assets/nodejs.png
buildVolumes: ["devops_cache:/opt/app-root/src/.npm"]
iconPath: assets/nodejs.png
7 changes: 5 additions & 2 deletions config/templates/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ metadata:
spec:
containerInfo:
- builderImage: kubespheredev/python-36-centos7
buildVolumes: ["s2i_python36_cache:/opt/app-root/lib"]
- builderImage: kubespheredev/python-35-centos7
buildVolumes: ["s2i_python35_cache:/opt/app-root/lib"]
- builderImage: kubespheredev/python-34-centos7
buildVolumes: ["s2i_python34_cache:/opt/app-root/lib"]
- builderImage: kubespheredev/python-27-centos7
buildVolumes: ["s2i_python27_cache:/opt/app-root/lib"]
environment:
- key: APP_SCRIPT
type: string
Expand Down Expand Up @@ -78,5 +82,4 @@ spec:
description: "Python available as container is a base platform for building and running various Python applications and frameworks. Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python's elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.
This container image includes an npm utility, so users can use it to install JavaScript modules for their web applications. There is no guarantee for any specific npm or nodejs version, that is included in the image; those versions can be changed anytime and the nodejs itself is included just to make the npm work."
iconPath: assets/python.png
buildVolumes: ["devops_cache:/opt/app-root/lib"]
iconPath: assets/python.png
12 changes: 6 additions & 6 deletions deploy/s2ioperator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,6 @@ spec:
type: object
spec:
properties:
buildVolumes:
description: BuildVolumes specifies a list of volumes to mount to container
running the build.
items:
type: string
type: array
codeFramework:
description: CodeFramework means which language this template is designed
for and which framework is using if has framework. Like Java, NodeJS
Expand All @@ -506,6 +500,12 @@ spec:
description: Images are the images this template will use.
items:
properties:
buildVolumes:
description: BuildVolumes specifies a list of volumes to mount
to container running the build.
items:
type: string
type: array
builderImage:
description: BaseImage are the images this template will use.
type: string
Expand Down
28 changes: 14 additions & 14 deletions pkg/apis/devops/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/apis/devops/v1alpha1/s2ibuildertemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ type S2iBuilderTemplateSpec struct {
Description string `json:"description,omitempty"`
// IconPath is used for frontend display
IconPath string `json:"iconPath,omitempty"`
// BuildVolumes specifies a list of volumes to mount to container running the
// build.
BuildVolumes []string `json:"buildVolumes,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
Expand Down
10 changes: 5 additions & 5 deletions pkg/apis/devops/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cdf025a

Please sign in to comment.