Sha256: 7f32d188b13a4d3e349ff6e91e32bbcce068244edaa8fd868e86535e9d02a6fc
Contents?: true
Size: 793 Bytes
Versions: 43
Compression:
Stored size: 793 Bytes
Contents
# frozen_string_literal: true require 'krane/cluster_resource_discovery' module Krane class TaskConfig attr_reader :context, :namespace, :logger, :kubeconfig def initialize(context, namespace, logger = nil, kubeconfig = nil) @context = context @namespace = namespace @logger = logger || FormattedLogger.build(@namespace, @context) @kubeconfig = kubeconfig || ENV['KUBECONFIG'] 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 def kubeclient_builder @kubeclient_builder ||= KubeclientBuilder.new(kubeconfig: kubeconfig) end end end
Version data entries
43 entries across 43 versions & 1 rubygems