Class: CronKubernetes::KubeclientContext

Inherits:
Object
  • Object
show all
Defined in:
lib/cron_kubernetes/kubeclient_context.rb

Overview

Create a context for ‘Kubeclient` depending on the environment.

Defined Under Namespace

Classes: Context

Class Method Summary collapse

Class Method Details

.contextObject



11
12
13
14
15
16
17
18
19
# File 'lib/cron_kubernetes/kubeclient_context.rb', line 11

def context
  [
      CronKubernetes::Context::WellKnown,
      CronKubernetes::Context::Kubectl
  ].each do |context_type|
    context = context_type.new
    return context.context if context.applicable?
  end
end