Use deployment's cluster for kubernetes prereq
A deployment will have a cluster associated on creation if there is one. Otherwise fallback to deployment_platform for legacy deployments.
This commit is contained in:
parent
2f96e5d3b9
commit
2cdb72ea03
1 changed files with 3 additions and 1 deletions
|
@ -20,7 +20,9 @@ module Gitlab
|
|||
private
|
||||
|
||||
def deployment_cluster
|
||||
build.deployment&.deployment_platform_cluster
|
||||
strong_memoize(:deployment_cluster) do
|
||||
build.deployment&.cluster || build.deployment&.deployment_platform_cluster
|
||||
end
|
||||
end
|
||||
|
||||
def kubernetes_namespace
|
||||
|
|
Loading…
Reference in a new issue