Skip to content

Commit

Permalink
add output result (#99)
Browse files Browse the repository at this point in the history
* add output result

Signed-off-by: soulseen <sunzhu@yunify.com>

* update annotation to pod

Signed-off-by: soulseen <sunzhu@yunify.com>
  • Loading branch information
Zhuxiaoyang authored and ks-ci-bot committed Aug 26, 2019
1 parent b04bdd7 commit e883bfb
Show file tree
Hide file tree
Showing 13 changed files with 497 additions and 20 deletions.
3 changes: 3 additions & 0 deletions config/crds/devops_v1alpha1_s2ibuilder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ spec:
items:
type: string
type: array
outputBuildResult:
description: Whether output build result to status.
type: boolean
outputImageName:
description: OutputImageName is a result image name without tag,
default is latest. tag will append to ImageName in the end
Expand Down
5 changes: 1 addition & 4 deletions config/crds/devops_v1alpha1_s2irun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- JSONPath: .status.completionTime
name: CompletionTime
type: date
- JSONPath: .status.imageName
- JSONPath: .status.s2iBuildResult.imageName
name: ImageName
type: string
group: devops.kubesphere.io
Expand Down Expand Up @@ -84,9 +84,6 @@ spec:
represented in RFC3339 form and is in UTC.
format: date-time
type: string
imageName:
description: ImageName is the name of artifact
type: string
kubernetesJobName:
description: KubernetesJobName is the job name in k8s
type: string
Expand Down
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
- name: SECRET_NAME
value: $(WEBHOOK_SECRET_NAME)
- name: S2IIMAGENAME
value: kubespheredev/s2irun:v0.0.2
value: kubespheredev/s2irun:v0.0.3
resources:
limits:
cpu: 100m
Expand Down
29 changes: 29 additions & 0 deletions config/rbac/rbac_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ rules:
- get
- list
- watch
- update
- patch
- apiGroups:
- apps
resources:
Expand Down Expand Up @@ -130,6 +132,33 @@ rules:
- secrets
verbs:
- get
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- list
- watch
- create
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
verbs:
- get
- list
- watch
- create
- apiGroups:
- rbac.authorization.k8s.io
resources:
- roles
verbs:
- get
- list
- watch
- create
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down
1 change: 1 addition & 0 deletions config/samples/devops_v1alpha1_s2ibuilder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ spec:
nodeAffinityValues: ["affinityValue1"]
taintKey: "taint1"
buildVolumes: ["s2i_python35_cache:/opt/app-root/lib"]
outputBuildResult: true
41 changes: 35 additions & 6 deletions deploy/s2ioperator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ spec:
items:
type: string
type: array
outputBuildResult:
description: Whether output build result to status.
type: boolean
outputImageName:
description: OutputImageName is a result image name without tag,
default is latest. tag will append to ImageName in the end
Expand Down Expand Up @@ -612,7 +615,7 @@ spec:
- JSONPath: .status.completionTime
name: CompletionTime
type: date
- JSONPath: .status.imageName
- JSONPath: .status.s2iBuildResult.imageName
name: ImageName
type: string
group: devops.kubesphere.io
Expand Down Expand Up @@ -677,9 +680,6 @@ spec:
represented in RFC3339 form and is in UTC.
format: date-time
type: string
imageName:
description: ImageName is the name of artifact
type: string
kubernetesJobName:
description: KubernetesJobName is the job name in k8s
type: string
Expand Down Expand Up @@ -796,6 +796,8 @@ rules:
- get
- list
- watch
- update
- patch
- apiGroups:
- apps
resources:
Expand Down Expand Up @@ -835,6 +837,33 @@ rules:
- secrets
verbs:
- get
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- list
- watch
- create
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
verbs:
- get
- list
- watch
- create
- apiGroups:
- rbac.authorization.k8s.io
resources:
- roles
verbs:
- get
- list
- watch
- create
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down Expand Up @@ -1011,8 +1040,8 @@ spec:
- name: SECRET_NAME
value: webhook-server-secret
- name: S2IIMAGENAME
value: kubespheredev/s2irun:v0.0.2
image: kubespheredev/s2ioperator:v0.0.11
value: kubespheredev/s2irun:v0.0.3
image: kubespheredev/s2ioperator:advanced-2.1.0
imagePullPolicy: Always
name: manager
ports:
Expand Down
162 changes: 157 additions & 5 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.

3 changes: 3 additions & 0 deletions pkg/apis/devops/v1alpha1/s2ibuilder_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ type S2iConfig struct {

// The values of Node Affinity.
NodeAffinityValues []string `json:"nodeAffinityValues,omitempty"`

// Whether output build result to status.
OutputBuildResult bool `json:"outputBuildResult,omitempty"`
}

type UserDefineTemplate struct {
Expand Down
Loading

0 comments on commit e883bfb

Please sign in to comment.