forked from kubeflow/kubeflow
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre/post submit jobs for Jupyter UI (kubeflow#2671)
* Add pre/post submit jobs Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Update the libsonnet * Update the default value of parameters for testing_image * Use more intuitive paths Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Small fixes in the libsonnet Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Include the scripts/ in the jobs Else we get permission error when running the /scripts/build_image.sh Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Include entire scripts/* Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Remove -c from bash command Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Change workingDir Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Fix permissions and Image name Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Use kubeflow-ci project for pre/postsubmit jobs Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
- Loading branch information
1 parent
1d78b0f
commit 7ae0bf9
Showing
9 changed files
with
95,756 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/lib | ||
/.ksonnet/registries | ||
/app.override.yaml | ||
/.ks_environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
components/jupyter-web-app/releaser/lib/ksonnet-lib/v1.8.0/k.libsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
local k8s = import 'k8s.libsonnet'; | ||
local fn = { | ||
mapContainers(f):: { | ||
local podContainers = super.spec.template.spec.containers, | ||
spec+: { | ||
template+: { | ||
spec+: { | ||
containers: std.map(f, podContainers), | ||
}, | ||
}, | ||
}, | ||
}, | ||
mapContainersWithName(names, f):: | ||
local nameSet = if std.type(names) == 'array' then std.set(names) else std.set([names]); | ||
local inNameSet(name) = std.length(std.setInter(nameSet, std.set([name]))) > 0; | ||
|
||
self.mapContainers(function(c) if std.objectHas(c, 'name') && inNameSet(c.name) then f(c) else c), | ||
}; | ||
|
||
k8s + { | ||
apps:: k8s.apps + { | ||
v1beta1:: k8s.apps.v1beta1 + { | ||
deployment:: k8s.apps.v1beta1.deployment + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
statefulSet:: k8s.apps.v1beta1.statefulSet + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
}, | ||
v1beta2:: k8s.apps.v1beta2 + { | ||
daemonSet:: k8s.apps.v1beta2.daemonSet + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
deployment:: k8s.apps.v1beta2.deployment + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
replicaSet:: k8s.apps.v1beta2.replicaSet + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
statefulSet:: k8s.apps.v1beta2.statefulSet + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
}, | ||
}, | ||
batch:: k8s.batch + { | ||
v1:: k8s.batch.v1 + { | ||
job:: k8s.batch.v1.job + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
}, | ||
v1beta1:: k8s.batch.v1beta1 + { | ||
cronJob:: k8s.batch.v1beta1.cronJob + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
}, | ||
v2alpha1:: k8s.batch.v2alpha1 + { | ||
cronJob:: k8s.batch.v2alpha1.cronJob + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
}, | ||
}, | ||
core:: k8s.core + { | ||
v1:: k8s.core.v1 + { | ||
list:: { | ||
new(items):: { | ||
apiVersion: 'v1', | ||
} + { | ||
kind: 'List', | ||
} + self.items(items), | ||
items(items):: if std.type(items) == 'array' then { items+: items } else { items+: [items] }, | ||
}, | ||
pod:: k8s.core.v1.pod + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
podTemplate:: k8s.core.v1.podTemplate + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
replicationController:: k8s.core.v1.replicationController + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
}, | ||
}, | ||
extensions:: k8s.extensions + { | ||
v1beta1:: k8s.extensions.v1beta1 + { | ||
daemonSet:: k8s.extensions.v1beta1.daemonSet + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
deployment:: k8s.extensions.v1beta1.deployment + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
replicaSet:: k8s.extensions.v1beta1.replicaSet + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
}, | ||
}, | ||
} |
21,871 changes: 21,871 additions & 0 deletions
21,871
components/jupyter-web-app/releaser/lib/ksonnet-lib/v1.8.0/k8s.libsonnet
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.