Skip to content

Commit f377ce8

Browse files
authored
koordlet: change metric cache to tsdb (#1228)
Signed-off-by: 佑祎 <zzw261520@alibaba-inc.com>
1 parent 32aca30 commit f377ce8

28 files changed

+2811
-508
lines changed

config/manager/koordlet.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ spec:
8282
- mountPaht: /dev
8383
name: host-dev
8484
mountPropagation: HostToContainer
85+
- mountPath: /metric-data/
86+
name: metric-db-path
8587
hostNetwork: true
8688
hostPID: true
8789
restartPolicy: Always
@@ -130,3 +132,6 @@ spec:
130132
path: /dev
131133
type: ""
132134
name: host-dev
135+
- emptyDir:
136+
sizeLimit: 150Mi
137+
name: metric-db-path

go.mod

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ require (
2828
github.com/patrickmn/go-cache v2.1.0+incompatible
2929
github.com/prashantv/gostub v1.1.0
3030
github.com/prometheus/client_golang v1.14.0
31+
github.com/prometheus/prometheus v0.37.0
3132
github.com/spf13/cobra v1.6.1
3233
github.com/spf13/pflag v1.0.5
3334
github.com/stretchr/testify v1.8.2
@@ -36,7 +37,7 @@ require (
3637
golang.org/x/crypto v0.1.0
3738
golang.org/x/net v0.8.0
3839
golang.org/x/sys v0.6.0
39-
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
40+
golang.org/x/time v0.0.0-20220920022843-2ce7c2934d45
4041
google.golang.org/grpc v1.49.0
4142
google.golang.org/protobuf v1.28.1
4243
gopkg.in/yaml.v2 v2.4.0
@@ -63,26 +64,27 @@ require (
6364
)
6465

6566
require (
66-
cloud.google.com/go v0.65.0 // indirect
67-
github.com/Azure/azure-sdk-for-go v55.0.0+incompatible // indirect
67+
cloud.google.com/go/compute v1.7.0 // indirect
68+
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect
6869
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
6970
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
70-
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
71-
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
71+
github.com/Azure/go-autorest/autorest v0.11.28 // indirect
72+
github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect
7273
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
73-
github.com/Azure/go-autorest/autorest/mocks v0.4.1 // indirect
74+
github.com/Azure/go-autorest/autorest/mocks v0.4.2 // indirect
7475
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
75-
github.com/Azure/go-autorest/autorest/validation v0.1.0 // indirect
76+
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
7677
github.com/Azure/go-autorest/logger v0.2.1 // indirect
7778
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
7879
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317 // indirect
7980
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab // indirect
80-
github.com/Microsoft/go-winio v0.4.17 // indirect
81+
github.com/Microsoft/go-winio v0.5.1 // indirect
8182
github.com/Microsoft/hcsshim v0.8.23 // indirect
8283
github.com/NYTimes/gziphandler v1.1.1 // indirect
84+
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
8385
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e // indirect
84-
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
85-
github.com/aws/aws-sdk-go v1.38.49 // indirect
86+
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
87+
github.com/aws/aws-sdk-go v1.44.102 // indirect
8688
github.com/beorn7/perks v1.0.1 // indirect
8789
github.com/bits-and-blooms/bitset v1.2.0 // indirect
8890
github.com/blang/semver v3.5.1+incompatible // indirect
@@ -100,6 +102,8 @@ require (
100102
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
101103
github.com/cyphar/filepath-securejoin v0.2.2 // indirect
102104
github.com/davecgh/go-spew v1.1.1 // indirect
105+
github.com/dennwc/varint v1.0.0 // indirect
106+
github.com/dnaeon/go-vcr v1.2.0 // indirect
103107
github.com/docker/distribution v2.8.1+incompatible // indirect
104108
github.com/docker/go-connections v0.4.0 // indirect
105109
github.com/docker/go-units v0.4.0 // indirect
@@ -108,20 +112,26 @@ require (
108112
github.com/felixge/httpsnoop v1.0.3 // indirect
109113
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
110114
github.com/gin-contrib/sse v0.1.0 // indirect
115+
github.com/go-kit/log v0.2.1 // indirect
116+
github.com/go-logfmt/logfmt v0.5.1 // indirect
111117
github.com/go-logr/logr v1.2.3 // indirect
112118
github.com/go-openapi/jsonpointer v0.19.5 // indirect
113119
github.com/go-openapi/jsonreference v0.20.0 // indirect
114120
github.com/go-openapi/swag v0.21.1 // indirect
115121
github.com/go-ozzo/ozzo-validation v3.5.0+incompatible // indirect
116122
github.com/goccy/go-json v0.9.7 // indirect
117123
github.com/godbus/dbus/v5 v5.0.4 // indirect
118-
github.com/gofrs/uuid v4.0.0+incompatible // indirect
124+
github.com/gofrs/uuid v4.2.0+incompatible // indirect
119125
github.com/gogo/protobuf v1.3.2 // indirect
126+
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
127+
github.com/golang/snappy v0.0.4 // indirect
120128
github.com/google/cadvisor v0.39.3 // indirect
121-
github.com/google/gofuzz v1.1.0 // indirect
122-
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
129+
github.com/google/gofuzz v1.2.0 // indirect
130+
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
131+
github.com/googleapis/gax-go/v2 v2.5.1 // indirect
123132
github.com/googleapis/gnostic v0.5.5 // indirect
124-
github.com/gophercloud/gophercloud v0.1.0 // indirect
133+
github.com/gophercloud/gophercloud v1.0.0 // indirect
134+
github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2 // indirect
125135
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
126136
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
127137
github.com/heketi/heketi v10.3.0+incompatible // indirect
@@ -131,29 +141,32 @@ require (
131141
github.com/jinzhu/now v1.1.5 // indirect
132142
github.com/jmespath/go-jmespath v0.4.0 // indirect
133143
github.com/josharian/intern v1.0.0 // indirect
144+
github.com/jpillora/backoff v1.0.0 // indirect
134145
github.com/json-iterator/go v1.1.12 // indirect
135146
github.com/karrick/godirwalk v1.16.1 // indirect
136147
github.com/leodido/go-urn v1.2.1 // indirect
137148
github.com/libopenstorage/openstorage v1.0.0 // indirect
138149
github.com/lithammer/dedent v1.1.0 // indirect
139-
github.com/mailru/easyjson v0.7.6 // indirect
150+
github.com/mailru/easyjson v0.7.7 // indirect
140151
github.com/mattn/go-isatty v0.0.14 // indirect
141152
github.com/mattn/go-runewidth v0.0.13 // indirect
142153
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
143154
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
144155
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect
145-
github.com/mitchellh/mapstructure v1.1.2 // indirect
156+
github.com/mitchellh/mapstructure v1.5.0 // indirect
146157
github.com/moby/ipvs v1.0.1 // indirect
147158
github.com/moby/spdystream v0.2.0 // indirect
148159
github.com/moby/sys/mountinfo v0.4.1 // indirect
149-
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
160+
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
150161
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
151162
github.com/modern-go/reflect2 v1.0.2 // indirect
152163
github.com/morikuni/aec v1.0.0 // indirect
153164
github.com/mrunalp/fileutils v0.5.0 // indirect
154165
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
166+
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
155167
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
156168
github.com/nxadm/tail v1.4.8 // indirect
169+
github.com/oklog/ulid v1.3.1 // indirect
157170
github.com/opencontainers/go-digest v1.0.0 // indirect
158171
github.com/opencontainers/image-spec v1.0.2 // indirect
159172
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
@@ -163,6 +176,7 @@ require (
163176
github.com/pmezard/go-difflib v1.0.0 // indirect
164177
github.com/prometheus/client_model v0.3.0 // indirect
165178
github.com/prometheus/common v0.37.0 // indirect
179+
github.com/prometheus/common/sigv4 v0.1.0 // indirect
166180
github.com/prometheus/procfs v0.8.0 // indirect
167181
github.com/quobyte/api v0.1.8 // indirect
168182
github.com/rivo/uniseg v0.2.0 // indirect
@@ -179,34 +193,36 @@ require (
179193
go.etcd.io/etcd/api/v3 v3.5.5 // indirect
180194
go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
181195
go.etcd.io/etcd/client/v3 v3.5.5 // indirect
182-
go.opencensus.io v0.22.4 // indirect
196+
go.opencensus.io v0.23.0 // indirect
183197
go.opentelemetry.io/contrib v0.20.0 // indirect
184198
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 // indirect
185-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0 // indirect
199+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.0 // indirect
186200
go.opentelemetry.io/otel v1.10.0 // indirect
187201
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
188-
go.opentelemetry.io/otel/metric v0.31.0 // indirect
202+
go.opentelemetry.io/otel/metric v0.32.0 // indirect
189203
go.opentelemetry.io/otel/sdk v1.10.0 // indirect
190204
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect
191205
go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect
192206
go.opentelemetry.io/otel/trace v1.10.0 // indirect
193207
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
208+
go.uber.org/goleak v1.2.0 // indirect
194209
go.uber.org/zap v1.19.0 // indirect
195210
golang.org/x/mod v0.8.0 // indirect
196-
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
211+
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect
197212
golang.org/x/sync v0.1.0 // indirect
198213
golang.org/x/term v0.6.0 // indirect
199214
golang.org/x/text v0.8.0 // indirect
200215
golang.org/x/tools v0.6.0 // indirect
216+
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
201217
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
202-
google.golang.org/api v0.30.0 // indirect
218+
google.golang.org/api v0.96.0 // indirect
203219
google.golang.org/appengine v1.6.7 // indirect
204-
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
205-
gopkg.in/gcfg.v1 v1.2.0 // indirect
220+
google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006 // indirect
221+
gopkg.in/gcfg.v1 v1.2.3 // indirect
206222
gopkg.in/inf.v0 v0.9.1 // indirect
207223
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
208224
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
209-
gopkg.in/warnings.v0 v0.1.1 // indirect
225+
gopkg.in/warnings.v0 v0.1.2 // indirect
210226
gopkg.in/yaml.v3 v3.0.1 // indirect
211227
k8s.io/apiextensions-apiserver v0.22.6 // indirect
212228
k8s.io/cloud-provider v0.22.6 // indirect
@@ -223,6 +239,8 @@ require (
223239
replace (
224240
github.com/go-logr/logr => github.com/go-logr/logr v0.4.0
225241
github.com/google/cadvisor => github.com/koordinator-sh/cadvisor v0.0.0-20220919031936-833eb74e858e
242+
github.com/gophercloud/gophercloud => github.com/gophercloud/gophercloud v0.1.0
243+
github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.39.2
226244
go.opentelemetry.io/contrib => go.opentelemetry.io/contrib v0.20.0
227245
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0
228246
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0

0 commit comments

Comments
 (0)