Class: Gitlab::Ci::Build::Prerequisite::KubernetesNamespace

Inherits:
Base
  • Object
show all
Defined in:
lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb

Instance Attribute Summary

Attributes inherited from Base

#build

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Constructor Details

This class inherits a constructor from Gitlab::Ci::Build::Prerequisite::Base

Instance Method Details

#complete!Object


14
15
16
17
18
# File 'lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb', line 14

def complete!
  return unless unmet?

  create_namespace
end

#unmet?Boolean

Returns:

  • (Boolean)

8
9
10
11
12
# File 'lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb', line 8

def unmet?
  deployment_cluster.present? &&
    deployment_cluster.managed? &&
    missing_namespace?
end