Skip to content

Commit

Permalink
run ks upgrade (kubeflow#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
lluunn authored and Jiayu Liu committed Mar 20, 2018
1 parent dca991b commit facf8e5
Show file tree
Hide file tree
Showing 12 changed files with 151,144 additions and 18 deletions.
27 changes: 26 additions & 1 deletion test-infra/app.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
apiVersion: 0.0.1
apiVersion: 0.1.0
environments:
kubeflow-ci:
destination:
namespace: default
server: https://35.185.54.227
k8sVersion: v1.7.0
path: kubeflow-ci
lunkai-dev2:
destination:
namespace: kubeflow-testing
server: https://35.194.21.181
k8sVersion: v1.7.0
path: lunkai-dev2
prow:
destination:
namespace: kubeflow-testing
server: https://35.196.185.88
k8sVersion: v1.7.0
path: prow
releasing:
destination:
namespace: kubeflow-releasing
server: https://35.226.49.107
k8sVersion: v1.7.0
path: releasing
kind: ksonnet.io/app
libraries:
core:
Expand Down
4 changes: 0 additions & 4 deletions test-infra/environments/kubeflow-ci/spec.json

This file was deleted.

4 changes: 0 additions & 4 deletions test-infra/environments/prow/spec.json

This file was deleted.

4 changes: 0 additions & 4 deletions test-infra/environments/releasing/spec.json

This file was deleted.

80 changes: 80 additions & 0 deletions test-infra/lib/v1.7.0/k.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
local k8s = import "k8s.libsonnet";

local apps = k8s.apps;
local core = k8s.core;
local extensions = k8s.extensions;

local hidden = {
mapContainers(f):: {
local podContainers = super.spec.template.spec.containers,
spec+: {
template+: {
spec+: {
// IMPORTANT: This overwrites the 'containers' field
// for this deployment.
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:: apps + {
v1beta1:: apps.v1beta1 + {
local v1beta1 = apps.v1beta1,

daemonSet:: v1beta1.daemonSet + {
mapContainers(f):: hidden.mapContainers(f),
mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f),
},

deployment:: v1beta1.deployment + {
mapContainers(f):: hidden.mapContainers(f),
mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f),
},
},
},

core:: core + {
v1:: 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]},
},
},
},

extensions:: extensions + {
v1beta1:: extensions.v1beta1 + {
local v1beta1 = extensions.v1beta1,

daemonSet:: v1beta1.daemonSet + {
mapContainers(f):: hidden.mapContainers(f),
mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f),
},

deployment:: v1beta1.deployment + {
mapContainers(f):: hidden.mapContainers(f),
mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f),
},
},
},
}
19,353 changes: 19,353 additions & 0 deletions test-infra/lib/v1.7.0/k8s.libsonnet

Large diffs are not rendered by default.

Loading

0 comments on commit facf8e5

Please sign in to comment.