Class: Kube::Cluster::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/kube/cluster/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kubeconfig:) ⇒ Connection

Returns a new instance of Connection.



11
12
13
14
15
# File 'lib/kube/cluster/connection.rb', line 11

def initialize(kubeconfig:)
  @kubeconfig = kubeconfig
  @ctl        = Kube::Ctl::Instance.new(kubeconfig: kubeconfig)
  @helm       = Kube::Helm::Instance.new(kubeconfig: kubeconfig)
end

Instance Attribute Details

#ctlObject (readonly)

Returns the value of attribute ctl.



9
10
11
# File 'lib/kube/cluster/connection.rb', line 9

def ctl
  @ctl
end

#helmObject (readonly)

Returns the value of attribute helm.



9
10
11
# File 'lib/kube/cluster/connection.rb', line 9

def helm
  @helm
end

#kubeconfigObject (readonly)

Returns the value of attribute kubeconfig.



9
10
11
# File 'lib/kube/cluster/connection.rb', line 9

def kubeconfig
  @kubeconfig
end

Instance Method Details

#inspectObject



17
18
19
# File 'lib/kube/cluster/connection.rb', line 17

def inspect
  "#<#{self.class.name} kubeconfig=#{@kubeconfig.inspect}>"
end