Skip to content

Commit

Permalink
Parameterize mysql and minio image (#551)
Browse files Browse the repository at this point in the history
* add job to load sample

* debug

* add job to ks list

* update permission

* update permission

* parameterize deployment

* update param
  • Loading branch information
IronPan authored and k8s-ci-robot committed Dec 17, 2018
1 parent 3306934 commit 353ab0b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
6 changes: 4 additions & 2 deletions pipeline/pipeline/all.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
local scheduledWorkflowImage = params.scheduledWorkflowImage,
local persistenceAgentImage = params.persistenceAgentImage,
local uiImage = params.uiImage,
local mysqlImage = params.mysqlImage,
local minioImage = params.minioImage,
local deployArgo = params.deployArgo,
local reportUsage = params.reportUsage,
local usageId = params.usageId,
Expand All @@ -26,8 +28,8 @@
argo:: if (deployArgo == true) || (deployArgo == "true") then
argo.parts(namespace).all
else [],
all:: minio.parts(namespace).all +
mysql.parts(namespace).all +
all:: minio.parts(namespace, minioImage).all +
mysql.parts(namespace, mysqlImage).all +
pipeline_apiserver.all(namespace, apiImage) +
pipeline_scheduledworkflow.all(namespace, scheduledWorkflowImage) +
pipeline_persistenceagent.all(namespace, persistenceAgentImage) +
Expand Down
18 changes: 9 additions & 9 deletions pipeline/pipeline/minio.libsonnet
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
parts(namespace):: {
all:: [
$.parts(namespace).pvc,
$.parts(namespace).service,
$.parts(namespace).deploy,
$.parts(namespace).secret,
],
all(namespace, minioImage):: [
$.parts(namespace).pvc,
$.parts(namespace).service,
$.parts(namespace).deploy(minioImage),
$.parts(namespace).secret,
],

parts(namespace):: {
pvc: {
apiVersion: "v1",
kind: "PersistentVolumeClaim",
Expand Down Expand Up @@ -50,7 +50,7 @@
},
}, //service

deploy: {
deploy(image): {
apiVersion: "apps/v1beta1",
kind: "Deployment",
metadata: {
Expand Down Expand Up @@ -85,7 +85,7 @@
mountPath: "/data",
},
],
image: "minio/minio:RELEASE.2018-02-09T22-40-05Z",
image: image,
args: [
"server",
"/data",
Expand Down
17 changes: 9 additions & 8 deletions pipeline/pipeline/mysql.libsonnet
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
all(namespace, mysqlImage):: [
$.parts(namespace).pvc,
$.parts(namespace).service,
$.parts(namespace).deploy(mysqlImage),
],
parts(namespace):: {
all:: [
$.parts(namespace).pvc,
$.parts(namespace).service,
$.parts(namespace).deploy,
],

pvc: {
apiVersion: "v1",
kind: "PersistentVolumeClaim",
Expand Down Expand Up @@ -47,7 +46,7 @@
},
}, //service

deploy: {
deploy(image): {
apiVersion: "apps/v1beta2",
kind: "Deployment",
metadata: {
Expand All @@ -72,7 +71,9 @@
spec: {
containers: [
{
image: "mysql:5.6",
// Before bumping the mysql version, make sure version is also available for
// Google Cloud SQL. As of Dec 2018, only mysql 5.6 or 5.7 is supported in Cloud SQL.
image: image,
name: "mysql",
env: [
{
Expand Down
2 changes: 2 additions & 0 deletions pipeline/pipeline/prototypes/pipeline.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// @optionalParam uiImage string gcr.io/ml-pipeline/frontend:0.1.3 UI docker image
// @optionalParam deployArgo string false flag to deploy argo
// @optionalParam reportUsage string false flag to report usage
// @optionalParam mysqlImage string mysql:5.6 mysql image
// @optionalParam minioImage string minio/minio:RELEASE.2018-02-09T22-40-05Z minio image

local k = import "k.libsonnet";
local all = import "pipeline/pipeline/all.libsonnet";
Expand Down

0 comments on commit 353ab0b

Please sign in to comment.