@@ -20,7 +20,8 @@ module Cadvisor
2020 #
2121 # A default client is created if options is omitted.
2222 class Node < Client
23- def initialize ( instance :, **options )
23+ def initialize ( **options )
24+ instance = options [ :instance ]
2425 region = options [ :region ] || 'infra'
2526 zone = options [ :zone ] || 'default'
2627
@@ -42,7 +43,8 @@ def query_range(options)
4243
4344 # A client with special labels for pod cadvisor metrics
4445 class Pod < Client
45- def initialize ( pod_name :, **options )
46+ def initialize ( **options )
47+ pod_name = options [ :pod_name ]
4648 namespace = options [ :namespace ] || 'default'
4749 region = options [ :region ] || 'infra'
4850 zone = options [ :zone ] || 'default'
@@ -66,7 +68,9 @@ def query_range(options)
6668
6769 # A client with special labels for container cadvisor metrics
6870 class Container < Client
69- def initialize ( container_name :, pod_name :, **options )
71+ def initialize ( **options )
72+ container_name = args [ :container_name ]
73+ pod_name = args [ :pod_name ]
7074 namespace = args [ :namespace ] || 'default'
7175 region = options [ :region ] || 'infra'
7276 zone = options [ :zone ] || 'default'
0 commit comments