-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d746bde
commit 67b5571
Showing
9 changed files
with
117,012 additions
and
7 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
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
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
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,2 @@ | ||
{ | ||
} |
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,9 @@ | ||
local base = import "base.libsonnet"; | ||
// uncomment if you reference ksonnet-lib | ||
// local k = import "k.libsonnet"; | ||
// local deployment = k.apps.v1beta2.deployment; | ||
|
||
base + { | ||
// Insert user-specified overrides here. For example if a component is named \"nginx-deployment\", you might have something like:\n") | ||
// "nginx-deployment"+: deployment.mixin.metadata.withLabels({foo: "bar"}) | ||
} |
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,21 @@ | ||
local params = std.extVar('__ksonnet/params'); | ||
local globals = import 'globals.libsonnet'; | ||
local envParams = params + { | ||
components+: { | ||
workflows+: { | ||
namespace: 'kubeflow-test-infra', | ||
name: 'tf-operator-release-d746bde9-kunming', | ||
prow_env: 'JOB_NAME=tf-operator-release,JOB_TYPE=tf-operator-release,REPO_NAME=tf-operator,REPO_OWNER=kubeflow,BUILD_NUMBER=01A3,PULL_BASE_SHA=d746bde9', | ||
versionTag: 'v20190702-d746bde9', | ||
registry: 'gcr.io/kubeflow-images-public', | ||
bucket: 'kubeflow-releasing-artifacts', | ||
}, | ||
}, | ||
}; | ||
|
||
{ | ||
components: { | ||
[x]: envParams.components[x] + globals | ||
for x in std.objectFields(envParams.components) | ||
}, | ||
} |
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,129 @@ | ||
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 + { | ||
v1:: k8s.apps.v1 + { | ||
daemonSet:: k8s.apps.v1.daemonSet + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
deployment:: k8s.apps.v1.deployment + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
replicaSet:: k8s.apps.v1.replicaSet + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
statefulSet:: k8s.apps.v1.statefulSet + { | ||
mapContainers(f):: fn.mapContainers(f), | ||
mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), | ||
}, | ||
}, | ||
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), | ||
}, | ||
}, | ||
}, | ||
} |
Oops, something went wrong.