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.



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

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.



6
7
8
# File 'lib/kube/cluster/connection.rb', line 6

def ctl
  @ctl
end

#helmObject (readonly)

Returns the value of attribute helm.



6
7
8
# File 'lib/kube/cluster/connection.rb', line 6

def helm
  @helm
end

#kubeconfigObject (readonly)

Returns the value of attribute kubeconfig.



6
7
8
# File 'lib/kube/cluster/connection.rb', line 6

def kubeconfig
  @kubeconfig
end

Instance Method Details

#inspectObject



14
15
16
# File 'lib/kube/cluster/connection.rb', line 14

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