Sha256: 3615ab89ad274ce5fa9bed56609b30676ca92a8594ecfcaf9762ca95f7e8c127

Contents?: true

Size: 598 Bytes

Versions: 12

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true

require 'krane/cluster_resource_discovery'

module Krane
  class TaskConfig
    attr_reader :context, :namespace, :logger

    def initialize(context, namespace, logger = nil)
      @context = context
      @namespace = namespace
      @logger = logger || FormattedLogger.build(@namespace, @context)
    end

    def global_kinds
      @global_kinds ||= begin
        cluster_resource_discoverer = ClusterResourceDiscovery.new(task_config: self)
        cluster_resource_discoverer.fetch_resources(namespaced: false).map { |g| g["kind"] }
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
krane-2.0.0 lib/krane/task_config.rb
kubernetes-deploy-1.0.0.pre.2 lib/krane/task_config.rb
krane-1.1.4 lib/krane/task_config.rb
krane-1.1.3 lib/krane/task_config.rb
krane-1.1.2 lib/krane/task_config.rb
krane-1.1.1 lib/krane/task_config.rb
krane-1.1.0 lib/krane/task_config.rb
tobsch-krane-1.0.2 lib/krane/task_config.rb
tobsch-krane-1.0.1 lib/krane/task_config.rb
tobsch-krane-1.0.0 lib/krane/task_config.rb
krane-1.0.0 lib/krane/task_config.rb
kubernetes-deploy-1.0.0.pre.1 lib/krane/task_config.rb