diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-11-13 13:27:21 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-11-13 13:27:21 +0300 |
commit | 5d2fd2ea9e9518b53292d678526563527dd7c76c (patch) | |
tree | a2f869c2d0b3de2aaa8cc469406e8cfb6aac5e32 /app/models/clusters/platforms | |
parent | 91f117274ecb803cd2833fffe5e2807eccdf5b73 (diff) |
Fix deployment jobs using nil token
Diffstat (limited to 'app/models/clusters/platforms')
-rw-r--r-- | app/models/clusters/platforms/kubernetes.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/clusters/platforms/kubernetes.rb b/app/models/clusters/platforms/kubernetes.rb index ea02ae6c9d8..9860abeecf7 100644 --- a/app/models/clusters/platforms/kubernetes.rb +++ b/app/models/clusters/platforms/kubernetes.rb @@ -83,7 +83,7 @@ module Clusters .append(key: 'KUBE_CA_PEM_FILE', value: ca_pem, file: true) end - if kubernetes_namespace = cluster.kubernetes_namespaces.find_by(project: project) + if kubernetes_namespace = cluster.kubernetes_namespaces.has_service_account_token.find_by(project: project) variables.concat(kubernetes_namespace.predefined_variables) else # From 11.5, every Clusters::Project should have at least one |