kubeclient 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kubeclient might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44f9ae79ede59af09899f793e1ed033432e53961
4
- data.tar.gz: 91bd146bc7163d9b63ef077d36282c3f3d4d6e31
3
+ metadata.gz: e43821f5d44f8c1c576f9a026781bd392216148d
4
+ data.tar.gz: 6034365578182ed965eebf2c4947de38c76aa8f8
5
5
  SHA512:
6
- metadata.gz: a228a944f9d2ef70578ab7ad97b5ed1a0636b8b2bcc9e3553d18e5a97c064d2f4135e0803babcf3774e4c020d9ebeb199a0179fa8725ab53e6c91c7bb4a283ac
7
- data.tar.gz: b770ad33ad96267dbea66d3cd6e3bff15968dd91c2f1f9a540bcc96936762264667c8ea1f19c186c68ba7b017a077dbedf43b2ebef3ea0cd61729080bf14d021
6
+ metadata.gz: 39321cd7d662320e4a91665aa6619afe4271378233f4e64cb47e957298fbf378c59ead7912728a758c9dc37977f43a26daff9fea5a7b4ba1325defbfa563d2dc
7
+ data.tar.gz: 596d4e2b33a4a9b950859799a5ccfaaf69c56ade5a7e3c78a71cfc027c0a06be1c5549816d3388034228c77a03b51b79e782afdc82d4a06b3534c38d4b8daf74
@@ -14,8 +14,8 @@ Gem::Specification.new do |spec|
14
14
  spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(/^(test|spec|features)\//)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
  spec.required_ruby_version = '>= 2.0.0'
21
21
 
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency 'rake', '~> 10.0'
24
24
  spec.add_development_dependency 'minitest'
25
25
  spec.add_development_dependency 'webmock'
26
- spec.add_development_dependency 'rubocop'
26
+ spec.add_development_dependency 'rubocop', '= 0.30.0'
27
27
  spec.add_dependency 'rest-client'
28
28
  spec.add_dependency 'activesupport'
29
29
  spec.add_dependency 'json'
@@ -20,7 +20,13 @@ module Kubeclient
20
20
  # and especially since currently the class body is empty
21
21
  ENTITY_TYPES = %w(Pod Service ReplicationController Node Event Endpoint
22
22
  Namespace).map do |et|
23
- [Kubeclient.const_set(et, Class.new(RecursiveOpenStruct)), et]
23
+ clazz = Class.new(RecursiveOpenStruct) do
24
+ def initialize(hash = nil, args = {})
25
+ args.merge!(recurse_over_arrays: true)
26
+ super(hash, args)
27
+ end
28
+ end
29
+ [Kubeclient.const_set(et, clazz), et]
24
30
  end
25
31
 
26
32
  def initialize(uri, version = 'v1beta3')
@@ -40,13 +40,13 @@ module Kubeclient
40
40
  watch_entities(entity_type, resource_version)
41
41
  end
42
42
 
43
- # get a single entity of a specific type by id
44
- define_method("get_#{entity_name}") do |id|
45
- get_entity(entity_type, klass, id)
43
+ # get a single entity of a specific type by name
44
+ define_method("get_#{entity_name}") do |name|
45
+ get_entity(entity_type, klass, name)
46
46
  end
47
47
 
48
- define_method("delete_#{entity_name}") do |id|
49
- delete_entity(entity_type, id)
48
+ define_method("delete_#{entity_name}") do |name|
49
+ delete_entity(entity_type, name)
50
50
  end
51
51
 
52
52
  define_method("create_#{entity_name}") do |entity_config|
@@ -67,17 +67,17 @@ module Kubeclient
67
67
  ssl_client_cert: @ssl_options[:client_cert],
68
68
  ssl_client_key: @ssl_options[:client_key]
69
69
  }
70
- endpoint_with_version = @api_endpoint.merge(@api_endpoint.path + '/' \
71
- + @api_version)
72
- RestClient::Resource.new(endpoint_with_version, options)
70
+ endpoint_with_ver = @api_endpoint
71
+ .merge("#{@api_endpoint.path}/#{@api_version}")
72
+ RestClient::Resource.new(endpoint_with_ver, options)
73
73
  end
74
74
  end
75
75
 
76
76
  def watch_entities(entity_type, resource_version = nil)
77
- resource_name = get_resource_name(entity_type.to_s)
77
+ resource = get_resource_name(entity_type.to_s)
78
78
 
79
- uri = @api_endpoint.merge(@api_endpoint.path + '/' + @api_version \
80
- + '/watch/' + resource_name)
79
+ uri = @api_endpoint
80
+ .merge("#{@api_endpoint.path}/#{@api_version}/watch/#{resource}")
81
81
 
82
82
  unless resource_version.nil?
83
83
  uri.query = URI.encode_www_form('resourceVersion' => resource_version)
@@ -86,7 +86,9 @@ module Kubeclient
86
86
  options = {
87
87
  use_ssl: uri.scheme == 'https',
88
88
  ca_file: @ssl_options[:ca_file],
89
- verify_ssl: @ssl_options[:verify_ssl],
89
+ # ruby Net::HTTP uses verify_mode instead of verify_ssl
90
+ # http://ruby-doc.org/stdlib-1.9.3/libdoc/net/http/rdoc/Net/HTTP.html
91
+ verify_mode: @ssl_options[:verify_ssl],
90
92
  client_cert: @ssl_options[:client_cert],
91
93
  client_key: @ssl_options[:client_key]
92
94
  }
@@ -118,17 +120,17 @@ module Kubeclient
118
120
  EntityList.new(entity_type, resource_version, collection)
119
121
  end
120
122
 
121
- def get_entity(entity_type, klass, id)
123
+ def get_entity(entity_type, klass, name)
122
124
  response = handle_exception do
123
- rest_client[get_resource_name(entity_type) + "/#{id}"].get
125
+ rest_client[get_resource_name(entity_type) + "/#{name}"].get
124
126
  end
125
127
  result = JSON.parse(response)
126
128
  new_entity(result, klass)
127
129
  end
128
130
 
129
- def delete_entity(entity_type, id)
131
+ def delete_entity(entity_type, name)
130
132
  handle_exception do
131
- rest_client[get_resource_name(entity_type) + "/#{id}"].delete
133
+ rest_client[get_resource_name(entity_type) + "/#{name}"].delete
132
134
  end
133
135
  end
134
136
 
@@ -142,7 +144,7 @@ module Kubeclient
142
144
  end
143
145
 
144
146
  def update_entity(entity_type, entity_config)
145
- id = entity_config.id
147
+ name = entity_config.name
146
148
  # to_hash should be called because of issue #9 in recursive open
147
149
  # struct
148
150
  hash = entity_config.to_hash
@@ -150,7 +152,7 @@ module Kubeclient
150
152
  # https://github.com/GoogleCloudPlatform/kubernetes/issues/3085
151
153
  hash.delete(:id)
152
154
  handle_exception do
153
- rest_client[get_resource_name(entity_type) + "/#{id}"]
155
+ rest_client[get_resource_name(entity_type) + "/#{name}"]
154
156
  .put(hash.to_json)
155
157
  end
156
158
  end
@@ -1,4 +1,4 @@
1
1
  # Kubernetes REST-API Client
2
2
  module Kubeclient
3
- VERSION = '0.1.9'
3
+ VERSION = '0.1.10'
4
4
  end
@@ -2,26 +2,32 @@
2
2
  "kind": "Service",
3
3
  "apiVersion": "v1beta3",
4
4
  "metadata": {
5
- "name": "kubernetes-ro",
6
- "namespace": "default",
7
- "selfLink": "/api/v1beta3/services/kubernetes-ro?namespace=default",
8
- "uid": "ffb153db-a230-11e4-a36b-3c970e4a436a",
9
- "resourceVersion": "4",
10
- "creationTimestamp": "2015-01-22T14:20:05+02:00",
5
+ "name": "redis-slave",
6
+ "namespace": "development",
7
+ "selfLink": "/api/v1beta3/namespaces/development/services/redis-slave",
8
+ "uid": "bdb80a8f-db93-11e4-b293-f8b156af4ae1",
9
+ "resourceVersion": "2815",
10
+ "creationTimestamp": "2015-04-05T13:00:31Z",
11
11
  "labels": {
12
- "component": "apiserver",
13
- "provider": "kubernetes"
12
+ "name": "redis",
13
+ "role": "slave"
14
14
  }
15
15
  },
16
16
  "spec": {
17
- "port": 80,
18
- "protocol": "TCP",
19
- "selector": null,
20
- "portalIP": "10.0.0.154",
21
- "containerPort": 0,
17
+ "ports": [
18
+ {
19
+ "name": "",
20
+ "protocol": "TCP",
21
+ "port": 6379,
22
+ "targetPort": "redis-server"
23
+ }
24
+ ],
25
+ "selector": {
26
+ "name": "redis",
27
+ "role": "slave"
28
+ },
29
+ "portalIP": "10.0.0.140",
22
30
  "sessionAffinity": "None"
23
31
  },
24
- "status": {
25
-
26
- }
27
- }
32
+ "status": {}
33
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "kind": "ServiceList",
3
+ "apiVersion": "v1beta3",
4
+ "metadata": {
5
+ "selfLink": "/api/v1beta3/services",
6
+ "resourceVersion": "36727"
7
+ },
8
+ "items": [
9
+ {
10
+ "metadata": {
11
+ "name": "kubernetes",
12
+ "namespace": "default",
13
+ "selfLink": "/api/v1beta3/namespaces/default/services/kubernetes",
14
+ "uid": "b6606490-db86-11e4-b293-f8b156af4ae1",
15
+ "resourceVersion": "6",
16
+ "creationTimestamp": "2015-04-05T11:27:15Z",
17
+ "labels": {
18
+ "component": "apiserver",
19
+ "provider": "kubernetes"
20
+ }
21
+ },
22
+ "spec": {
23
+ "ports": [
24
+ {
25
+ "name": "",
26
+ "protocol": "TCP",
27
+ "port": 443,
28
+ "targetPort": 443
29
+ }
30
+ ],
31
+ "selector": null,
32
+ "portalIP": "10.0.0.2",
33
+ "sessionAffinity": "None"
34
+ },
35
+ "status": {}
36
+ },
37
+ {
38
+ "metadata": {
39
+ "name": "kubernetes-ro",
40
+ "namespace": "default",
41
+ "selfLink": "/api/v1beta3/namespaces/default/services/kubernetes-ro",
42
+ "uid": "b6606694-db86-11e4-b293-f8b156af4ae1",
43
+ "resourceVersion": "5",
44
+ "creationTimestamp": "2015-04-05T11:27:15Z",
45
+ "labels": {
46
+ "component": "apiserver",
47
+ "provider": "kubernetes"
48
+ }
49
+ },
50
+ "spec": {
51
+ "ports": [
52
+ {
53
+ "name": "",
54
+ "protocol": "TCP",
55
+ "port": 80,
56
+ "targetPort": 80
57
+ }
58
+ ],
59
+ "selector": null,
60
+ "portalIP": "10.0.0.1",
61
+ "sessionAffinity": "None"
62
+ },
63
+ "status": {}
64
+ },
65
+ {
66
+ "metadata": {
67
+ "name": "redis-slave",
68
+ "namespace": "development",
69
+ "selfLink": "/api/v1beta3/namespaces/development/services/redis-slave",
70
+ "uid": "bdb80a8f-db93-11e4-b293-f8b156af4ae1",
71
+ "resourceVersion": "2815",
72
+ "creationTimestamp": "2015-04-05T13:00:31Z",
73
+ "labels": {
74
+ "name": "redis",
75
+ "role": "slave"
76
+ }
77
+ },
78
+ "spec": {
79
+ "ports": [
80
+ {
81
+ "name": "",
82
+ "protocol": "TCP",
83
+ "port": 6379,
84
+ "targetPort": "redis-server"
85
+ }
86
+ ],
87
+ "selector": {
88
+ "name": "redis",
89
+ "role": "slave"
90
+ },
91
+ "portalIP": "10.0.0.140",
92
+ "sessionAffinity": "None"
93
+ },
94
+ "status": {}
95
+ }
96
+ ]
97
+ }
@@ -43,12 +43,12 @@ class KubeClientTest < MiniTest::Test
43
43
  end
44
44
 
45
45
  def test_exception
46
- stub_request(:post, /\/services/)
46
+ stub_request(:post, %r{/services})
47
47
  .to_return(body: open_test_json_file('namespace_exception_b3.json'),
48
48
  status: 409)
49
49
 
50
50
  service = Kubeclient::Service.new
51
- service.id = 'redisslave'
51
+ service.name = 'redisslave'
52
52
  service.port = 80
53
53
  service.container_port = 6379
54
54
  service.protocol = 'TCP'
@@ -107,7 +107,7 @@ class KubeClientTest < MiniTest::Test
107
107
  end
108
108
 
109
109
  def test_nonjson_exception
110
- stub_request(:get, /\/servic/)
110
+ stub_request(:get, %r{/servic})
111
111
  .to_return(body: open_test_json_file('service_illegal_json_404.json'),
112
112
  status: 404)
113
113
 
@@ -123,7 +123,7 @@ class KubeClientTest < MiniTest::Test
123
123
  end
124
124
 
125
125
  def test_entity_list
126
- stub_request(:get, /\/services/)
126
+ stub_request(:get, %r{/services})
127
127
  .to_return(body: open_test_json_file('entity_list_b3.json'),
128
128
  status: 200)
129
129
 
@@ -139,7 +139,7 @@ class KubeClientTest < MiniTest::Test
139
139
  end
140
140
 
141
141
  def test_empty_list
142
- stub_request(:get, /\/pods/)
142
+ stub_request(:get, %r{/pods})
143
143
  .to_return(body: open_test_json_file('empty_pod_list_b3.json'),
144
144
  status: 200)
145
145
 
@@ -150,30 +150,30 @@ class KubeClientTest < MiniTest::Test
150
150
  end
151
151
 
152
152
  def test_get_all
153
- stub_request(:get, /\/services/)
154
- .to_return(body: open_test_json_file('get_all_services_b3.json'),
153
+ stub_request(:get, %r{/services})
154
+ .to_return(body: open_test_json_file('service_list_b3.json'),
155
155
  status: 200)
156
156
 
157
- stub_request(:get, /\/pods/)
157
+ stub_request(:get, %r{/pods})
158
158
  .to_return(body: open_test_json_file('pod_list_b3.json'),
159
159
  status: 200)
160
160
 
161
- stub_request(:get, /\/nodes/)
161
+ stub_request(:get, %r{/nodes})
162
162
  .to_return(body: open_test_json_file('node_list_b3.json'),
163
163
  status: 200)
164
164
 
165
- stub_request(:get, /\/replicationcontrollers/)
165
+ stub_request(:get, %r{/replicationcontrollers})
166
166
  .to_return(body: open_test_json_file('replication_controller_list_' \
167
167
  'b3.json'), status: 200)
168
168
 
169
- stub_request(:get, /\/events/)
169
+ stub_request(:get, %r{/events})
170
170
  .to_return(body: open_test_json_file('event_list_b3.json'), status: 200)
171
171
 
172
- stub_request(:get, /\/endpoints/)
172
+ stub_request(:get, %r{/endpoints})
173
173
  .to_return(body: open_test_json_file('endpoint_list_b3.json'),
174
174
  status: 200)
175
175
 
176
- stub_request(:get, /\/namespaces/)
176
+ stub_request(:get, %r{/namespaces})
177
177
  .to_return(body: open_test_json_file('namespace_list_b3.json'),
178
178
  status: 200)
179
179
 
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  # Namespace entity tests
4
4
  class TestNamespace < MiniTest::Test
5
5
  def test_get_namespace_v1beta3
6
- stub_request(:get, /\/namespaces/)
6
+ stub_request(:get, %r{/namespaces})
7
7
  .to_return(body: open_test_json_file('namespace_b3.json'),
8
8
  status: 200)
9
9
 
@@ -21,7 +21,7 @@ class TestNamespace < MiniTest::Test
21
21
  our_namespace = Kubeclient::Namespace.new
22
22
  our_namespace.name = 'staging'
23
23
 
24
- stub_request(:delete, /\/namespaces/)
24
+ stub_request(:delete, %r{/namespaces})
25
25
  .to_return(status: 200)
26
26
 
27
27
  client = Kubeclient::Client.new 'http://localhost:8080/api/', 'v1beta3'
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  # Node entity tests
4
4
  class TestNode < MiniTest::Test
5
5
  def test_get_from_json_v3
6
- stub_request(:get, /\/nodes/)
6
+ stub_request(:get, %r{/nodes})
7
7
  .to_return(body: open_test_json_file('node_b3.json'),
8
8
  status: 200)
9
9
 
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  # Pod entity tests
4
4
  class TestPod < MiniTest::Test
5
5
  def test_get_from_json_v3
6
- stub_request(:get, /\/pods/)
6
+ stub_request(:get, %r{/pods})
7
7
  .to_return(body: open_test_json_file('pod_b3.json'),
8
8
  status: 200)
9
9
 
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  # Replication Controller entity tests
4
4
  class TestReplicationController < MiniTest::Test
5
5
  def test_get_from_json_v3
6
- stub_request(:get, /\/replicationcontrollers/)
6
+ stub_request(:get, %r{/replicationcontrollers})
7
7
  .to_return(body: open_test_json_file('replication_controller_b3.json'),
8
8
  status: 200)
9
9
 
@@ -4,9 +4,8 @@ require 'test_helper'
4
4
  class TestService < MiniTest::Test
5
5
  def test_construct_our_own_service
6
6
  our_service = Kubeclient::Service.new
7
- our_service.id = 'redis-service'
8
- our_service.port = 80
9
- our_service.protocol = 'TCP'
7
+ our_service.name = 'redis-service'
8
+ # TODO, new ports assignment to be added
10
9
  our_service.labels = {}
11
10
  our_service.labels.component = 'apiserver'
12
11
  our_service.labels.provider = 'kubernetes'
@@ -20,38 +19,38 @@ class TestService < MiniTest::Test
20
19
  end
21
20
 
22
21
  def test_conversion_from_json_v3
23
- stub_request(:get, /\/services/)
22
+ stub_request(:get, %r{/services})
24
23
  .to_return(body: open_test_json_file('service_b3.json'),
25
24
  status: 200)
26
25
 
27
- client = Kubeclient::Client.new 'http://localhost:8080/api/', 'v1beta3'
26
+ client = Kubeclient::Client.new 'http://localhost:8080/api/'
28
27
  service = client.get_service 'redisslave'
29
28
 
30
29
  assert_instance_of(Kubeclient::Service, service)
31
- # checking that creationTimestamp was renamed properly
32
- assert_equal('2015-01-22T14:20:05+02:00',
30
+ assert_equal('2015-04-05T13:00:31Z',
33
31
  service.metadata.creationTimestamp)
34
- assert_equal('ffb153db-a230-11e4-a36b-3c970e4a436a', service.metadata.uid)
35
- assert_equal('kubernetes-ro', service.metadata.name)
36
- assert_equal('4', service.metadata.resourceVersion)
32
+ assert_equal('bdb80a8f-db93-11e4-b293-f8b156af4ae1', service.metadata.uid)
33
+ assert_equal('redis-slave', service.metadata.name)
34
+ assert_equal('2815', service.metadata.resourceVersion)
37
35
  assert_equal('v1beta3', service.apiVersion)
38
- assert_equal('10.0.0.154', service.spec.portalIP)
39
- assert_equal(0, service.spec.containerPort)
40
- assert_equal('TCP', service.spec.protocol)
41
- assert_equal(80, service.spec.port)
42
- assert_equal('default', service.metadata.namespace)
36
+ assert_equal('10.0.0.140', service.spec.portalIP)
37
+ assert_equal('development', service.metadata.namespace)
38
+
39
+ assert_equal('TCP', service.spec.ports[0].protocol)
40
+ assert_equal(6379, service.spec.ports[0].port)
41
+ assert_equal('', service.spec.ports[0].name)
42
+ assert_equal('redis-server', service.spec.ports[0].targetPort)
43
43
  end
44
44
 
45
45
  def test_delete_service
46
46
  our_service = Kubeclient::Service.new
47
- our_service.id = 'redis-service'
48
- our_service.port = 80
49
- our_service.protocol = 'TCP'
47
+ our_service.name = 'redis-service'
48
+ # TODO, new ports assignment to be added
50
49
  our_service.labels = {}
51
50
  our_service.labels.component = 'apiserver'
52
51
  our_service.labels.provider = 'kubernetes'
53
52
 
54
- stub_request(:delete, /\/services/)
53
+ stub_request(:delete, %r{/services})
55
54
  .to_return(status: 200)
56
55
 
57
56
  client = Kubeclient::Client.new 'http://localhost:8080/api/', 'v1beta3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubeclient
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alissa Bonas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-01 00:00:00.000000000 Z
11
+ date: 2015-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 0.30.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 0.30.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rest-client
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -162,7 +162,6 @@ files:
162
162
  - test/json/endpoint_list_b3.json
163
163
  - test/json/entity_list_b3.json
164
164
  - test/json/event_list_b3.json
165
- - test/json/get_all_services_b3.json
166
165
  - test/json/namespace_b3.json
167
166
  - test/json/namespace_exception_b3.json
168
167
  - test/json/namespace_list_b3.json
@@ -174,6 +173,7 @@ files:
174
173
  - test/json/replication_controller_list_b3.json
175
174
  - test/json/service_b3.json
176
175
  - test/json/service_illegal_json_404.json
176
+ - test/json/service_list_b3.json
177
177
  - test/json/versions_list.json
178
178
  - test/json/watch_stream_b3.json
179
179
  - test/test_helper.rb
@@ -213,7 +213,6 @@ test_files:
213
213
  - test/json/endpoint_list_b3.json
214
214
  - test/json/entity_list_b3.json
215
215
  - test/json/event_list_b3.json
216
- - test/json/get_all_services_b3.json
217
216
  - test/json/namespace_b3.json
218
217
  - test/json/namespace_exception_b3.json
219
218
  - test/json/namespace_list_b3.json
@@ -225,6 +224,7 @@ test_files:
225
224
  - test/json/replication_controller_list_b3.json
226
225
  - test/json/service_b3.json
227
226
  - test/json/service_illegal_json_404.json
227
+ - test/json/service_list_b3.json
228
228
  - test/json/versions_list.json
229
229
  - test/json/watch_stream_b3.json
230
230
  - test/test_helper.rb
@@ -1,56 +0,0 @@
1
- {
2
- "kind": "ServiceList",
3
- "apiVersion": "v1beta3",
4
- "metadata": {
5
- "selfLink": "/api/v1beta3/services",
6
- "resourceVersion": "59"
7
- },
8
- "items": [
9
- {
10
- "metadata": {
11
- "name": "kubernetes",
12
- "namespace": "default",
13
- "selfLink": "/api/v1beta3/services/kubernetes?namespace=default",
14
- "uid": "016e9dcd-ce39-11e4-ac24-3c970e4a436a",
15
- "resourceVersion": "6",
16
- "creationTimestamp": "2015-03-19T15:08:16+02:00",
17
- "labels": {
18
- "component": "apiserver",
19
- "provider": "kubernetes"
20
- }
21
- },
22
- "spec": {
23
- "port": 443,
24
- "protocol": "TCP",
25
- "selector": null,
26
- "portalIP": "10.0.0.2",
27
- "containerPort": 0,
28
- "sessionAffinity": "None"
29
- },
30
- "status": {}
31
- },
32
- {
33
- "metadata": {
34
- "name": "kubernetes-ro",
35
- "namespace": "default",
36
- "selfLink": "/api/v1beta3/services/kubernetes-ro?namespace=default",
37
- "uid": "015b78bf-ce39-11e4-ac24-3c970e4a436a",
38
- "resourceVersion": "5",
39
- "creationTimestamp": "2015-03-19T15:08:15+02:00",
40
- "labels": {
41
- "component": "apiserver",
42
- "provider": "kubernetes"
43
- }
44
- },
45
- "spec": {
46
- "port": 80,
47
- "protocol": "TCP",
48
- "selector": null,
49
- "portalIP": "10.0.0.1",
50
- "containerPort": 0,
51
- "sessionAffinity": "None"
52
- },
53
- "status": {}
54
- }
55
- ]
56
- }