From b80784303124e5156476983666f47a5fcc31b3b8 Mon Sep 17 00:00:00 2001 From: IronPan Date: Fri, 30 Nov 2018 07:51:00 -0800 Subject: [PATCH] add pipeline environment to code search web app (#372) * add pipeline * Update app.yaml --- code_search/ks-web-app/app.yaml | 6 ++++++ .../environments/pipeline/globals.libsonnet | 2 ++ .../ks-web-app/environments/pipeline/main.jsonnet | 9 +++++++++ .../environments/pipeline/params.libsonnet | 13 +++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 code_search/ks-web-app/environments/pipeline/globals.libsonnet create mode 100644 code_search/ks-web-app/environments/pipeline/main.jsonnet create mode 100644 code_search/ks-web-app/environments/pipeline/params.libsonnet diff --git a/code_search/ks-web-app/app.yaml b/code_search/ks-web-app/app.yaml index 5770551d4..1090f6056 100644 --- a/code_search/ks-web-app/app.yaml +++ b/code_search/ks-web-app/app.yaml @@ -6,6 +6,12 @@ environments: server: https://35.185.115.154 k8sVersion: v1.10.9 path: cs_demo + pipeline: + destination: + namespace: cs-web-app + server: https://kubernetes.default + k8sVersion: v1.10.9 + path: pipeline kind: ksonnet.io/app libraries: tf-serving: diff --git a/code_search/ks-web-app/environments/pipeline/globals.libsonnet b/code_search/ks-web-app/environments/pipeline/globals.libsonnet new file mode 100644 index 000000000..7a73a41bf --- /dev/null +++ b/code_search/ks-web-app/environments/pipeline/globals.libsonnet @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/code_search/ks-web-app/environments/pipeline/main.jsonnet b/code_search/ks-web-app/environments/pipeline/main.jsonnet new file mode 100644 index 000000000..1d4f64251 --- /dev/null +++ b/code_search/ks-web-app/environments/pipeline/main.jsonnet @@ -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"}) +} diff --git a/code_search/ks-web-app/environments/pipeline/params.libsonnet b/code_search/ks-web-app/environments/pipeline/params.libsonnet new file mode 100644 index 000000000..e460154d4 --- /dev/null +++ b/code_search/ks-web-app/environments/pipeline/params.libsonnet @@ -0,0 +1,13 @@ +local params = std.extVar('__ksonnet/params'); +local globals = import 'globals.libsonnet'; +local envParams = params + { + components+: { + }, +}; + +{ + components: { + [x]: envParams.components[x] + globals + for x in std.objectFields(envParams.components) + }, +}