File tree Expand file tree Collapse file tree 12 files changed +1079
-27
lines changed Expand file tree Collapse file tree 12 files changed +1079
-27
lines changed Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: .
3
3
specs:
4
- fluent-plugin-kubernetes-objects (1.1.10 )
4
+ fluent-plugin-kubernetes-objects (1.1.11 )
5
5
fluentd (>= 1.9.1 )
6
6
http_parser.rb (= 0.5.3 )
7
- kubeclient (~> 4.6.0 )
7
+ kubeclient (~> 4.9.3 )
8
8
9
9
GEM
10
10
remote: https://rubygems.org/
11
11
specs:
12
12
addressable (2.8.0 )
13
13
public_suffix (>= 2.0.2 , < 5.0 )
14
- concurrent-ruby (1.1.9 )
14
+ concurrent-ruby (1.1.10 )
15
15
cool.io (1.7.1 )
16
16
crack (0.4.5 )
17
17
rexml
22
22
ffi-compiler (1.0.1 )
23
23
ffi (>= 1.0.0 )
24
24
rake
25
- fluentd (1.14.4 )
25
+ fluentd (1.14.5 )
26
26
bundler
27
27
cool.io (>= 1.4.5 , < 2.0.0 )
28
28
http_parser.rb (>= 0.5.1 , < 0.9.0 )
29
29
msgpack (>= 1.3.1 , < 2.0.0 )
30
- serverengine (>= 2.2.2 , < 3.0.0 )
30
+ serverengine (>= 2.2.5 , < 3.0.0 )
31
31
sigdump (~> 0.2.2 )
32
32
strptime (>= 0.2.4 , < 1.0.0 )
33
33
tzinfo (>= 1.0 , < 3.0 )
47
47
http-parser (1.2.3 )
48
48
ffi-compiler (>= 1.0 , < 2.0 )
49
49
http_parser.rb (0.5.3 )
50
- kubeclient (4.6.0 )
50
+ jsonpath (1.1.0 )
51
+ multi_json
52
+ kubeclient (4.9.3 )
51
53
http (>= 3.0 , < 5.0 )
52
- recursive-open-struct (~> 1.0 , >= 1.0.4 )
54
+ jsonpath (~> 1.0 )
55
+ recursive-open-struct (~> 1.1 , >= 1.1.1 )
53
56
rest-client (~> 2.0 )
54
57
mime-types (3.4.1 )
55
58
mime-types-data (~> 3.2015 )
56
59
mime-types-data (3.2022.0105 )
57
60
minitest (5.14.4 )
58
- msgpack (1.4.4 )
61
+ msgpack (1.4.5 )
62
+ multi_json (1.15.0 )
59
63
netrc (0.11.0 )
60
64
power_assert (2.0.1 )
61
65
public_suffix (4.0.6 )
81
85
power_assert
82
86
tzinfo (2.0.4 )
83
87
concurrent-ruby (~> 1.0 )
84
- tzinfo-data (1.2021.5 )
88
+ tzinfo-data (1.2022.1 )
85
89
tzinfo (>= 1.0.0 )
86
90
unf (0.1.4 )
87
91
unf_ext
88
- unf_ext (0.0.8 )
92
+ unf_ext (0.0.8.1 )
89
93
webmock (3.14.0 )
90
94
addressable (>= 2.8.0 )
91
95
crack (>= 0.3.2 )
@@ -106,4 +110,4 @@ DEPENDENCIES
106
110
webmock (~> 3.5 )
107
111
108
112
BUNDLED WITH
109
- 2.2.30
113
+ 2.2.32
Original file line number Diff line number Diff line change 1
- 1.1.10
1
+ 1.1.11
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ RUN yum update -y \
43
43
&& bundle install \
44
44
&& bundle update i18n \
45
45
&& gem uninstall -i /usr/share/gems i18n --version 1.8.11 \
46
- && rpm -e --nodeps python3-pip-wheel python3-urllib3-* python3-requests-* python3-libxml2-* python3-dmidecode-* subscription-manager-* libwebp-* libwebp-devel-* glib2-* libjpeg-turbo-devel-* libjpeg-turbo-* mariadb-connector-c-config-* mariadb-connector-c-* mariadb-connector-c-devel-* rsync-* sqlite-libs-* sqlite-devel-* sqlite-* libxml2-* libxml2-devel-* libX11-* libX11-common-* libX11-devel-* libX11-xcb-* nettle-* libsolv-* file-libs-* dbus-daemon-* tar-* qt5-srpm-macros-* perl-parent-* git-* bsdtar-* openssh-clients-* json-c -* binutils-* libtiff-devel-* libtiff-* || true
46
+ && rpm -e --nodeps python3-pip-wheel python3-urllib3-* python3-requests-* python3-libxml2-* python3-dmidecode-* subscription-manager-* libwebp-* libwebp-devel-* libjpeg-turbo-devel-* libjpeg-turbo-* mariadb-connector-c-config-* mariadb-connector-c-* mariadb-connector-c-devel-* rsync-* libX11-* libX11-common-* libX11-devel-* libX11-xcb-* dbus-daemon-* tar-* qt5-srpm-macros-* perl-parent-* git-* bsdtar-* openssh-clients-* binutils-* libtiff-devel-* libtiff-* || true
47
47
48
48
RUN groupadd -r $FLUENT_USER && \
49
49
useradd -r -g $FLUENT_USER $FLUENT_USER && \
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ gem "fluent-plugin-jq", "= 0.5.1"
11
11
gem "oj" , "= 3.10.18"
12
12
gem 'multi_json' , '>= 1.14.1'
13
13
gem 'bigdecimal' , '>= 2.0.0'
14
- gem 'kubeclient' , '>= 4.6.0 '
14
+ gem 'kubeclient' , '>= 4.9.3 '
15
15
gem 'http_parser.rb' , '>= 0.5.3'
16
16
17
17
gem "fluent-plugin-splunk-hec" , ">= 1.2.5"
Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: gem
3
3
specs:
4
- fluent-plugin-kubernetes-objects (1.1.10 )
4
+ fluent-plugin-kubernetes-objects (1.1.11 )
5
5
fluentd (>= 1.9.1 )
6
6
http_parser.rb (= 0.5.3 )
7
- kubeclient (~> 4.6.0 )
7
+ kubeclient (~> 4.9.3 )
8
8
9
9
GEM
10
10
remote: https://rubygems.org/
27
27
cool.io (1.7.1 )
28
28
domain_name (0.5.20190701 )
29
29
unf (>= 0.0.5 , < 1.0.0 )
30
- ffi (1.15.4 )
30
+ ffi (1.15.5 )
31
31
ffi-compiler (1.0.1 )
32
32
ffi (>= 1.0.0 )
33
33
rake
43
43
prometheus-client (>= 2.1.0 )
44
44
fluent-plugin-record-modifier (2.1.0 )
45
45
fluentd (>= 1.0 , < 2 )
46
- fluent-plugin-splunk-hec (1.2.11 )
46
+ fluent-plugin-splunk-hec (1.2.12 )
47
47
fluentd (>= 1.4 )
48
48
multi_json (~> 1.13 )
49
49
net-http-persistent (~> 3.1 )
80
80
activesupport (>= 4.2 )
81
81
aes_key_wrap
82
82
bindata
83
- kubeclient (4.6.0 )
83
+ jsonpath (1.1.0 )
84
+ multi_json
85
+ kubeclient (4.9.3 )
84
86
http (>= 3.0 , < 5.0 )
85
- recursive-open-struct (~> 1.0 , >= 1.0.4 )
87
+ jsonpath (~> 1.0 )
88
+ recursive-open-struct (~> 1.1 , >= 1.1.1 )
86
89
rest-client (~> 2.0 )
87
90
lru_redux (1.1.0 )
88
91
mail (2.7.1 )
89
92
mini_mime (>= 0.1.1 )
90
93
mime-types (3.4.1 )
91
94
mime-types-data (~> 3.2015 )
92
- mime-types-data (3.2021.1115 )
95
+ mime-types-data (3.2022.0105 )
93
96
mini_mime (1.1.2 )
94
97
minitest (5.15.0 )
95
98
msgpack (1.4.2 )
138
141
tzinfo (>= 1.0.0 )
139
142
unf (0.1.4 )
140
143
unf_ext
141
- unf_ext (0.0.8 )
144
+ unf_ext (0.0.8.1 )
142
145
validate_email (0.1.6 )
143
146
activemodel (>= 3.0 )
144
147
mail (>= 2.2.5 )
@@ -164,7 +167,7 @@ DEPENDENCIES
164
167
fluent-plugin-splunk-hec (>= 1.2.5 )
165
168
fluentd (>= 1.14.2 )
166
169
http_parser.rb (>= 0.5.3 )
167
- kubeclient (>= 4.6.0 )
170
+ kubeclient (>= 4.9.3 )
168
171
multi_json (>= 1.14.1 )
169
172
oj (= 3.10.18 )
170
173
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
spec . executables = spec . files . grep ( %r{^exe/} ) { |f | File . basename ( f ) }
23
23
spec . required_ruby_version = '>= 2.3.0'
24
24
spec . add_runtime_dependency 'fluentd' , '>= 1.9.1'
25
- spec . add_runtime_dependency 'kubeclient' , '~> 4.6.0 '
25
+ spec . add_runtime_dependency 'kubeclient' , '~> 4.9.3 '
26
26
spec . add_runtime_dependency 'http_parser.rb' , '= 0.5.3'
27
27
28
28
spec . add_development_dependency 'bundler' , '~> 2.0'
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ class KubernetesObjectsInput < Fluent::Plugin::Input
20
20
desc 'Kubernetes API version.'
21
21
config_param :api_version , :string , default : 'v1'
22
22
23
+ desc 'Kubernetes API endpoint.'
24
+ config_param :api_endpoint , :string , default : 'api'
25
+
23
26
desc 'Path to the certificate file for this client.'
24
27
config_param :client_cert , :string , default : nil
25
28
@@ -139,7 +142,7 @@ def initialize_client
139
142
env_host = ENV [ 'KUBERNETES_SERVICE_HOST' ]
140
143
env_port = ENV [ 'KUBERNETES_SERVICE_PORT' ]
141
144
if env_host && env_port
142
- @kubernetes_url = "https://#{ env_host } :#{ env_port } /#{ @api_version == 'v1' ? 'api' : 'apis' } "
145
+ @kubernetes_url = "https://#{ env_host } :#{ env_port } /#{ @api_endpoint . delete_prefix ( '/' ) } "
143
146
end
144
147
end
145
148
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
1
+ {
2
+ "kind" : " APIResourceList" ,
3
+ "apiVersion" : " v1" ,
4
+ "groupVersion" : " apps/v1" ,
5
+ "resources" : [
6
+ {
7
+ "name" : " controllerrevisions" ,
8
+ "singularName" : " " ,
9
+ "namespaced" : true ,
10
+ "kind" : " ControllerRevision" ,
11
+ "verbs" : [
12
+ " create" ,
13
+ " delete" ,
14
+ " deletecollection" ,
15
+ " get" ,
16
+ " list" ,
17
+ " patch" ,
18
+ " update" ,
19
+ " watch"
20
+ ],
21
+ "storageVersionHash" : " 85nkx63pcBU="
22
+ },
23
+ {
24
+ "name" : " daemonsets" ,
25
+ "singularName" : " " ,
26
+ "namespaced" : true ,
27
+ "kind" : " DaemonSet" ,
28
+ "verbs" : [
29
+ " create" ,
30
+ " delete" ,
31
+ " deletecollection" ,
32
+ " get" ,
33
+ " list" ,
34
+ " patch" ,
35
+ " update" ,
36
+ " watch"
37
+ ],
38
+ "shortNames" : [
39
+ " ds"
40
+ ],
41
+ "categories" : [
42
+ " all"
43
+ ],
44
+ "storageVersionHash" : " dd7pWHUlMKQ="
45
+ },
46
+ {
47
+ "name" : " daemonsets/status" ,
48
+ "singularName" : " " ,
49
+ "namespaced" : true ,
50
+ "kind" : " DaemonSet" ,
51
+ "verbs" : [
52
+ " get" ,
53
+ " patch" ,
54
+ " update"
55
+ ]
56
+ },
57
+ {
58
+ "name" : " deployments" ,
59
+ "singularName" : " " ,
60
+ "namespaced" : true ,
61
+ "kind" : " Deployment" ,
62
+ "verbs" : [
63
+ " create" ,
64
+ " delete" ,
65
+ " deletecollection" ,
66
+ " get" ,
67
+ " list" ,
68
+ " patch" ,
69
+ " update" ,
70
+ " watch"
71
+ ],
72
+ "shortNames" : [
73
+ " deploy"
74
+ ],
75
+ "categories" : [
76
+ " all"
77
+ ],
78
+ "storageVersionHash" : " 8aSe+NMegvE="
79
+ },
80
+ {
81
+ "name" : " deployments/scale" ,
82
+ "singularName" : " " ,
83
+ "namespaced" : true ,
84
+ "group" : " autoscaling" ,
85
+ "version" : " v1" ,
86
+ "kind" : " Scale" ,
87
+ "verbs" : [
88
+ " get" ,
89
+ " patch" ,
90
+ " update"
91
+ ]
92
+ },
93
+ {
94
+ "name" : " deployments/status" ,
95
+ "singularName" : " " ,
96
+ "namespaced" : true ,
97
+ "kind" : " Deployment" ,
98
+ "verbs" : [
99
+ " get" ,
100
+ " patch" ,
101
+ " update"
102
+ ]
103
+ },
104
+ {
105
+ "name" : " replicasets" ,
106
+ "singularName" : " " ,
107
+ "namespaced" : true ,
108
+ "kind" : " ReplicaSet" ,
109
+ "verbs" : [
110
+ " create" ,
111
+ " delete" ,
112
+ " deletecollection" ,
113
+ " get" ,
114
+ " list" ,
115
+ " patch" ,
116
+ " update" ,
117
+ " watch"
118
+ ],
119
+ "shortNames" : [
120
+ " rs"
121
+ ],
122
+ "categories" : [
123
+ " all"
124
+ ],
125
+ "storageVersionHash" : " P1RzHs8/mWQ="
126
+ },
127
+ {
128
+ "name" : " replicasets/scale" ,
129
+ "singularName" : " " ,
130
+ "namespaced" : true ,
131
+ "group" : " autoscaling" ,
132
+ "version" : " v1" ,
133
+ "kind" : " Scale" ,
134
+ "verbs" : [
135
+ " get" ,
136
+ " patch" ,
137
+ " update"
138
+ ]
139
+ },
140
+ {
141
+ "name" : " replicasets/status" ,
142
+ "singularName" : " " ,
143
+ "namespaced" : true ,
144
+ "kind" : " ReplicaSet" ,
145
+ "verbs" : [
146
+ " get" ,
147
+ " patch" ,
148
+ " update"
149
+ ]
150
+ },
151
+ {
152
+ "name" : " statefulsets" ,
153
+ "singularName" : " " ,
154
+ "namespaced" : true ,
155
+ "kind" : " StatefulSet" ,
156
+ "verbs" : [
157
+ " create" ,
158
+ " delete" ,
159
+ " deletecollection" ,
160
+ " get" ,
161
+ " list" ,
162
+ " patch" ,
163
+ " update" ,
164
+ " watch"
165
+ ],
166
+ "shortNames" : [
167
+ " sts"
168
+ ],
169
+ "categories" : [
170
+ " all"
171
+ ],
172
+ "storageVersionHash" : " H+vl74LkKdo="
173
+ },
174
+ {
175
+ "name" : " statefulsets/scale" ,
176
+ "singularName" : " " ,
177
+ "namespaced" : true ,
178
+ "group" : " autoscaling" ,
179
+ "version" : " v1" ,
180
+ "kind" : " Scale" ,
181
+ "verbs" : [
182
+ " get" ,
183
+ " patch" ,
184
+ " update"
185
+ ]
186
+ },
187
+ {
188
+ "name" : " statefulsets/status" ,
189
+ "singularName" : " " ,
190
+ "namespaced" : true ,
191
+ "kind" : " StatefulSet" ,
192
+ "verbs" : [
193
+ " get" ,
194
+ " patch" ,
195
+ " update"
196
+ ]
197
+ }
198
+ ]
199
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "kind" : " APIGroup" ,
3
+ "apiVersion" : " v1" ,
4
+ "name" : " apps" ,
5
+ "versions" : [
6
+ {
7
+ "groupVersion" : " apps/v1" ,
8
+ "version" : " v1"
9
+ }
10
+ ],
11
+ "preferredVersion" : {
12
+ "groupVersion" : " apps/v1" ,
13
+ "version" : " v1"
14
+ }
15
+ }
Original file line number Diff line number Diff line change 57
57
puts 'Test: should use pick the right path'
58
58
ENV [ 'KUBERNETES_SERVICE_HOST' ] = k8s_host
59
59
ENV [ 'KUBERNETES_SERVICE_PORT' ] = k8s_port
60
- expect ( create_input_driver ( <<~CONF ) . instance . kubernetes_url ) . must_equal k8s_url ( 'apis' )
61
- api_version apps/v1
60
+ expect ( create_input_driver ( <<~CONF ) . instance . kubernetes_url ) . must_equal k8s_url ( 'apis/apps' )
61
+ api_endpoint apis/apps
62
+ api_version v1
62
63
<pull>
63
64
resource_name deployments
64
65
</pull>
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ def stub_k8s_requests
54
54
stub_k8s_nodes
55
55
stub_k8s_pods
56
56
stub_k8s_events
57
+ stub_k8s_apps
58
+ stub_k8s_apps_v1
59
+ stub_k8s_apps_v1_namespace
57
60
end
58
61
59
62
def stub_k8s_api
@@ -68,6 +71,24 @@ def stub_k8s_apis
68
71
end . close
69
72
end
70
73
74
+ def stub_k8s_apps
75
+ File . open ( File . expand_path ( 'apps.json' , __dir__ ) ) . tap do |f |
76
+ stub_request ( :get , k8s_url ( 'apis/apps' ) ) . to_return ( body : f . read )
77
+ end . close
78
+ end
79
+
80
+ def stub_k8s_apps_v1
81
+ File . open ( File . expand_path ( 'apps-v1.json' , __dir__ ) ) . tap do |f |
82
+ stub_request ( :get , k8s_url ( 'apis/apps/v1' ) ) . to_return ( body : f . read )
83
+ end . close
84
+ end
85
+
86
+ def stub_k8s_apps_v1_namespace
87
+ File . open ( File . expand_path ( 'apps-v1-namespace.json' , __dir__ ) ) . tap do |f |
88
+ stub_request ( :get , k8s_url ( 'apis/apps' ) ) . to_return ( body : f . read )
89
+ end . close
90
+ end
91
+
71
92
def stub_k8s_v1
72
93
File . open ( File . expand_path ( 'v1.json' , __dir__ ) ) . tap do |f |
73
94
stub_request ( :get , "#{ k8s_url } /v1" ) . to_return ( body : f . read )
You can’t perform that action at this time.
0 commit comments