forked from kubeflow/pipelines
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checkin dev.kubeflow.org ksonnet app into kubeflow/testing (kubeflow#94)
/cc @jlewi
- Loading branch information
1 parent
3991cf2
commit 9e7931b
Showing
14 changed files
with
75,779 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
dev-kubeflow-org/.ksonnet/registries/incubator/40285d8a14f1ac5787e405e1023cf0c07f6aa28c.yaml
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,39 @@ | ||
apiVersion: 0.1.0 | ||
gitVersion: | ||
commitSha: 40285d8a14f1ac5787e405e1023cf0c07f6aa28c | ||
refSpec: master | ||
kind: ksonnet.io/registry | ||
libraries: | ||
apache: | ||
path: apache | ||
version: master | ||
efk: | ||
path: efk | ||
version: master | ||
mariadb: | ||
path: mariadb | ||
version: master | ||
memcached: | ||
path: memcached | ||
version: master | ||
mongodb: | ||
path: mongodb | ||
version: master | ||
mysql: | ||
path: mysql | ||
version: master | ||
nginx: | ||
path: nginx | ||
version: master | ||
node: | ||
path: node | ||
version: master | ||
postgres: | ||
path: postgres | ||
version: master | ||
redis: | ||
path: redis | ||
version: master | ||
tomcat: | ||
path: tomcat | ||
version: master |
18 changes: 18 additions & 0 deletions
18
dev-kubeflow-org/.ksonnet/registries/kubeflow/116a63e59869f9c1f5900317af79a4d198840d0b.yaml
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,18 @@ | ||
apiVersion: 0.1.0 | ||
gitVersion: | ||
commitSha: 116a63e59869f9c1f5900317af79a4d198840d0b | ||
refSpec: v0.1-branch | ||
kind: ksonnet.io/registry | ||
libraries: | ||
argo: | ||
path: argo | ||
version: master | ||
core: | ||
path: core | ||
version: master | ||
tf-job: | ||
path: tf-job | ||
version: master | ||
tf-serving: | ||
path: tf-serving | ||
version: master |
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 @@ | ||
ksonnet app for the kubeflow deployment at dev.kubeflow.org |
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,43 @@ | ||
apiVersion: 0.1.0 | ||
environments: | ||
default: | ||
destination: | ||
namespace: kubeflow | ||
server: https://35.188.73.10 | ||
k8sVersion: v1.7.0 | ||
path: default | ||
kind: ksonnet.io/app | ||
libraries: | ||
core: | ||
gitVersion: | ||
commitSha: 0f3a55288738d3094ac829a1dfb9c265b4dab3d2 | ||
refSpec: v0.1.0-rc.1 | ||
name: core | ||
registry: kubeflow | ||
tf-job: | ||
gitVersion: | ||
commitSha: 0f3a55288738d3094ac829a1dfb9c265b4dab3d2 | ||
refSpec: v0.1.0-rc.1 | ||
name: tf-job | ||
registry: kubeflow | ||
tf-serving: | ||
gitVersion: | ||
commitSha: 0f3a55288738d3094ac829a1dfb9c265b4dab3d2 | ||
refSpec: v0.1.0-rc.1 | ||
name: tf-serving | ||
registry: kubeflow | ||
name: new-kubeflowdev-cluster | ||
registries: | ||
incubator: | ||
gitVersion: | ||
commitSha: 40285d8a14f1ac5787e405e1023cf0c07f6aa28c | ||
refSpec: master | ||
protocol: github | ||
uri: github.com/ksonnet/parts/tree/master/incubator | ||
kubeflow: | ||
gitVersion: | ||
commitSha: 0f3a55288738d3094ac829a1dfb9c265b4dab3d2 | ||
refSpec: v0.1.0-rc.1 | ||
protocol: github | ||
uri: github.com/kubeflow/kubeflow/tree/v0.1-branch/kubeflow | ||
version: 0.0.1 |
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,19 @@ | ||
local env = std.extVar("__ksonnet/environments"); | ||
local params = std.extVar("__ksonnet/params").components["cert-manager"]; | ||
// TODO(https://github.com/ksonnet/ksonnet/issues/222): We have to add namespace as an explicit parameter | ||
// because ksonnet doesn't support inheriting it from the environment yet. | ||
|
||
local k = import "k.libsonnet"; | ||
local certManager = import "kubeflow/core/cert-manager.libsonnet"; | ||
|
||
local name = params.name; | ||
local acmeEmail = params.acmeEmail; | ||
local acmeUrl = params.acmeUrl; | ||
|
||
// updatedParams uses the environment namespace if | ||
// the namespace parameter is not explicitly set | ||
local updatedParams = params { | ||
namespace: if params.namespace == "null" then env.namespace else params.namespace | ||
}; | ||
|
||
certManager.parts(updatedParams.namespace).certManagerParts(acmeEmail, acmeUrl) |
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,25 @@ | ||
local env = std.extVar("__ksonnet/environments"); | ||
local params = std.extVar("__ksonnet/params").components["iap-ingress"]; | ||
local k = import "k.libsonnet"; | ||
local iap = import "kubeflow/core/iap.libsonnet"; | ||
local util = import "kubeflow/core/util.libsonnet"; | ||
|
||
// updatedParams uses the environment namespace if | ||
// the namespace parameter is not explicitly set | ||
local updatedParams = params { | ||
namespace: if params.namespace == "null" then env.namespace else params.namespace | ||
}; | ||
|
||
local name = params.name; | ||
local namespace = updatedParams.namespace; | ||
local secretName = params.secretName; | ||
local ipName = params.ipName; | ||
local hostname = params.hostname; | ||
local issuer = params.issuer; | ||
local envoyImage = params.envoyImage; | ||
local disableJwtCheckingParam = params.disableJwtChecking; | ||
local disableJwtChecking = util.toBool(disableJwtCheckingParam); | ||
local clientID = params.clientID; | ||
local clientSecret = params.clientSecret; | ||
|
||
iap.parts(namespace).ingressParts(secretName, ipName, hostname, issuer, envoyImage, disableJwtChecking, clientID, clientSecret) |
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,12 @@ | ||
local env = std.extVar("__ksonnet/environments"); | ||
local params = std.extVar("__ksonnet/params").components["kubeflow-core"]; | ||
local k = import "k.libsonnet"; | ||
local all = import "kubeflow/core/all.libsonnet"; | ||
|
||
// updatedParams uses the environment namespace if | ||
// the namespace parameter is not explicitly set | ||
local updatedParams = params { | ||
namespace: if params.namespace == "null" then env.namespace else params.namespace | ||
}; | ||
|
||
std.prune(k.core.v1.list.new(all.parts(updatedParams).all)) |
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,43 @@ | ||
{ | ||
global: { | ||
// User-defined global parameters; accessible to all component and environments, Ex: | ||
// replicas: 4, | ||
}, | ||
components: { | ||
// Component-level parameters, defined initially from 'ks prototype use ...' | ||
// Each object below should correspond to a component in the components/ directory | ||
"kubeflow-core": { | ||
cloud: "null", | ||
disks: "null", | ||
jupyterHubAuthenticator: "iap", | ||
jupyterHubImage: "gcr.io/kubeflow/jupyterhub-k8s:1.0.1", | ||
jupyterHubServiceType: "ClusterIP", | ||
name: "kubeflow-core", | ||
namespace: "null", | ||
reportUsage: "false", | ||
tfAmbassadorServiceType: "ClusterIP", | ||
tfDefaultImage: "null", | ||
tfJobImage: "gcr.io/kubeflow-images-staging/tf_operator:v20180329-a7511ff", | ||
tfJobUiServiceType: "ClusterIP", | ||
usageId: "unknown_cluster", | ||
}, | ||
"cert-manager": { | ||
acmeEmail: "google-kubeflow-team@google.com", | ||
acmeUrl: "https://acme-v01.api.letsencrypt.org/directory", | ||
name: "cert-manager", | ||
namespace: "null", | ||
}, | ||
"iap-ingress": { | ||
clientID: "235037502967-9cpmvs4ljbiqb3ojtnhnhlkkd8d562rl.apps.googleusercontent.com", | ||
clientSecret: "eNyoA-ZtqC_HSSx95mGRPLR3", | ||
disableJwtChecking: "false", | ||
envoyImage: "gcr.io/kubeflow-images-staging/envoy:v20180309-0fb4886b463698702b6a08955045731903a18738", | ||
hostname: "dev.kubeflow.org", | ||
ipName: "kubeflow-tf-hub", | ||
issuer: "letsencrypt-prod", | ||
name: "iap-ingress", | ||
namespace: "kubeflow", | ||
secretName: "envoy-ingress-tls", | ||
}, | ||
}, | ||
} |
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,4 @@ | ||
local components = std.extVar("__ksonnet/components"); | ||
components + { | ||
// Insert user-specified overrides here. | ||
} |
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,7 @@ | ||
local base = import "base.libsonnet"; | ||
local k = import "k.libsonnet"; | ||
|
||
base + { | ||
// Insert user-specified overrides here. For example if a component is named "nginx-deployment", you might have something like: | ||
// "nginx-deployment"+: k.deployment.mixin.metadata.labels({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,13 @@ | ||
local params = import "../../components/params.libsonnet"; | ||
params + { | ||
components +: { | ||
// Insert component parameter overrides here. Ex: | ||
// guestbook +: { | ||
// name: "guestbook-dev", | ||
// replicas: params.global.replicas, | ||
// }, | ||
"kubeflow-core" +: { | ||
cloud: "gke", | ||
}, | ||
}, | ||
} |
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,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), | ||
}, | ||
}, | ||
}, | ||
} |
Oops, something went wrong.