diff options
author | James Fargher <proglottis@gmail.com> | 2019-03-21 08:06:47 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-03-21 08:06:47 +0000 |
commit | 01aa1ef77beee21a588f8b6b27bd372fc7ed7c8d (patch) | |
tree | aa7054c30e2b4172d0d0d2b18ec9d09e064f3e92 /spec/support/helpers/kubernetes_helpers.rb | |
parent | 6a0702fe9382c2b3c4a72421054d46821a95c781 (diff) | |
download | gitlab-ce-01aa1ef77beee21a588f8b6b27bd372fc7ed7c8d.tar.gz |
Update dashboards to additionally use new environment selector
Deploy boards now will check for app.gitlab.com/env and
app.gitlab.com/app
Diffstat (limited to 'spec/support/helpers/kubernetes_helpers.rb')
-rw-r--r-- | spec/support/helpers/kubernetes_helpers.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/support/helpers/kubernetes_helpers.rb b/spec/support/helpers/kubernetes_helpers.rb index cca11e112c9..ac52acb6570 100644 --- a/spec/support/helpers/kubernetes_helpers.rb +++ b/spec/support/helpers/kubernetes_helpers.rb @@ -250,16 +250,19 @@ module KubernetesHelpers # This is a partial response, it will have many more elements in reality but # these are the ones we care about at the moment - def kube_pod(name: "kube-pod", app: "valid-pod-label", status: "Running", track: nil) + def kube_pod(name: "kube-pod", environment_slug: "production", project_slug: "project-path-slug", status: "Running", track: nil) { "metadata" => { "name" => name, "generate_name" => "generated-name-with-suffix", "creationTimestamp" => "2016-11-25T19:55:19Z", + "annotations" => { + "app.gitlab.com/env" => environment_slug, + "app.gitlab.com/app" => project_slug + }, "labels" => { - "app" => app, "track" => track - } + }.compact }, "spec" => { "containers" => [ @@ -293,13 +296,16 @@ module KubernetesHelpers } end - def kube_deployment(name: "kube-deployment", app: "valid-deployment-label", track: nil) + def kube_deployment(name: "kube-deployment", environment_slug: "production", project_slug: "project-path-slug", track: nil) { "metadata" => { "name" => name, "generation" => 4, + "annotations" => { + "app.gitlab.com/env" => environment_slug, + "app.gitlab.com/app" => project_slug + }, "labels" => { - "app" => app, "track" => track }.compact }, |