diff options
author | Hordur Freyr Yngvason <hfyngvason@gitlab.com> | 2019-07-11 14:26:15 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-07-11 14:26:15 +0300 |
commit | 6971fd261dd63ac7698da9d4e5337af6f053dddd (patch) | |
tree | 44654d2b0d971fb8cab894c8e271fd346fb96e12 /spec/support/helpers/kubernetes_helpers.rb | |
parent | cc3ef63572361398d6f93d29a31c16e23cbc6de6 (diff) |
Give Knative serving permissions to service account
GitLab uses a kubernetes service account to perform deployments. For
serverless deployments to work as expected with externally created
clusters with their own knative installations (e.g. via Cloud Run), this
account requires additional permissions in the serving.knative.dev API
group.
Diffstat (limited to 'spec/support/helpers/kubernetes_helpers.rb')
-rw-r--r-- | spec/support/helpers/kubernetes_helpers.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/helpers/kubernetes_helpers.rb b/spec/support/helpers/kubernetes_helpers.rb index 3c7bcba2b42..278264f3df5 100644 --- a/spec/support/helpers/kubernetes_helpers.rb +++ b/spec/support/helpers/kubernetes_helpers.rb @@ -199,6 +199,11 @@ module KubernetesHelpers .to_return(kube_response({})) end + def stub_kubeclient_put_role(api_url, name, namespace: 'default') + WebMock.stub_request(:put, api_url + "/apis/rbac.authorization.k8s.io/v1/namespaces/#{namespace}/roles/#{name}") + .to_return(kube_response({})) + end + def kube_v1_secret_body(**options) { "kind" => "SecretList", |