Read about our upcoming Code of Conduct on this issue

knative_serving_namespace_finder.rb 351 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Clusters
  class KnativeServingNamespaceFinder
    attr_reader :cluster

    def initialize(cluster)
      @cluster = cluster
    end

    def execute
      cluster.kubeclient&.get_namespace(Clusters::Kubernetes::KNATIVE_SERVING_NAMESPACE)
    rescue Kubeclient::ResourceNotFoundError
      nil
    end
  end
end