Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

knative_version_role_binding_finder.rb 379 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module Clusters
  class KnativeVersionRoleBindingFinder
    attr_reader :cluster

    def initialize(cluster)
      @cluster = cluster
    end

    def execute
12
13
14
      cluster.kubeclient&.get_cluster_role_binding(Clusters::Kubernetes::GITLAB_KNATIVE_VERSION_ROLE_BINDING_NAME)
    rescue Kubeclient::ResourceNotFoundError
      nil
15
16
17
    end
  end
end