Commit 2cdb72ea authored by Thong Kuah's avatar Thong Kuah

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.
parent 2f96e5d3
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment