Define list of build resource to track with trackBuildConfigs
key
trackBuildConfigs:
- kind: [buildconfig kind]
name: [buildconfig name]
namespace: [buildconfig namespace]
- BuildWatcher watch UpdateEvent of
build.openshift.io/v1/builds
wait for first-time status.phase=Complete - BuildWatcher match
status.configs
tocpe.cogadvisor.io/v1/benchmarks
- BuildWatcher update buildname to
status.trackedBuilds
listcpe.cogadvisor.io/v1/benchmarks
- BenchmarkController get Update request of
cpe.cogadvisor.io/v1/benchmarks
- BenchmarkController add new job according to operator attached with the build name
- fork ray-project/ray to ray-repo-clone
- add
{{ .Values.operatorNamespace }}
to template - add securityContext.privileged
- run
cd ray helm package . helm repo index . --url https://raw.githubusercontent.com/sunya-ch/ray-repo-clone/master/deploy/charts/ray git add . git commit -m "index helm" git push [email protected]:sunya-ch/ray-repo-clone.git master
buildconfig/example-ray-job-image-stream.yaml
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: example-ray-job-image
spec:
lookupPolicy:
local: false
tags:
- name: latest
from:
kind: DockerImage
name: res-cpe-team-docker-local.artifactory.swg-devops.com/cpe/tracker/example-ray-job
referencePolicy:
type: Source
buildconfig/example-ray-job-build.yaml
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: ray-example
labels:
app: ray-example
spec:
triggers:
- type: "GitHub"
github:
secret: "rayrepoclone"
source:
type: Git
git:
uri: https://github.com/sunya-ch/ray-repo-clone
contextDir: docker/ray
strategy:
type: Docker
dockerStrategy:
dockerfilePath: Dockerfile
output:
to:
kind: ImageStreamTag
name: example-ray-job-image:latest
pushSecret:
name: res-cpe-team-docker-local