Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
6d041abb
Commit
6d041abb
authored
Apr 04, 2019
by
danielqsj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove metrics prober_probe_result
parent
295d672d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
27 deletions
+1
-27
prober_manager.go
pkg/kubelet/prober/prober_manager.go
+0
-18
worker.go
pkg/kubelet/prober/worker.go
+1
-8
server.go
pkg/kubelet/server/server.go
+0
-1
No files found.
pkg/kubelet/prober/prober_manager.go
View file @
6d041abb
...
...
@@ -47,24 +47,6 @@ var ProberResults = prometheus.NewCounterVec(
"pod_uid"
},
)
// DeprecatedProberResults stores the results of a probe as prometheus metrics.
// This metrics is deprecated, will be removed in a future release.
// Please convert to the metrics of counter type above.
var
DeprecatedProberResults
=
prometheus
.
NewGaugeVec
(
prometheus
.
GaugeOpts
{
Subsystem
:
"prober"
,
Name
:
"probe_result"
,
Help
:
"(Deprecated) The result of a liveness or readiness probe for a container."
,
},
[]
string
{
"probe_type"
,
"container_name"
,
"container"
,
"pod_name"
,
"pod"
,
"namespace"
,
"pod_uid"
},
)
// Manager manages pod probing. It creates a probe "worker" for every container that specifies a
// probe (AddPod). The worker periodically probes its assigned container and caches the results. The
// manager use the cached probe results to set the appropriate Ready state in the PodStatus when
...
...
pkg/kubelet/prober/worker.go
View file @
6d041abb
...
...
@@ -68,8 +68,7 @@ type worker struct {
onHold
bool
// proberResultsMetricLabels holds the labels attached to this worker
// for the ProberResults metric.
proberResultsMetricLabels
prometheus
.
Labels
// for the ProberResults metric by result.
proberResultsSuccessfulMetricLabels
prometheus
.
Labels
proberResultsFailedMetricLabels
prometheus
.
Labels
proberResultsUnknownMetricLabels
prometheus
.
Labels
...
...
@@ -109,10 +108,6 @@ func newWorker(
"pod_uid"
:
string
(
w
.
pod
.
UID
),
}
w
.
proberResultsMetricLabels
=
deepCopyPrometheusLabels
(
basicMetricLabels
)
w
.
proberResultsMetricLabels
[
"container_name"
]
=
w
.
container
.
Name
w
.
proberResultsMetricLabels
[
"pod_name"
]
=
w
.
pod
.
Name
w
.
proberResultsSuccessfulMetricLabels
=
deepCopyPrometheusLabels
(
basicMetricLabels
)
w
.
proberResultsSuccessfulMetricLabels
[
"result"
]
=
probeResultSuccessful
...
...
@@ -146,7 +141,6 @@ func (w *worker) run() {
ProberResults
.
Delete
(
w
.
proberResultsSuccessfulMetricLabels
)
ProberResults
.
Delete
(
w
.
proberResultsFailedMetricLabels
)
ProberResults
.
Delete
(
w
.
proberResultsUnknownMetricLabels
)
DeprecatedProberResults
.
Delete
(
w
.
proberResultsMetricLabels
)
}()
probeLoop
:
...
...
@@ -260,7 +254,6 @@ func (w *worker) doProbe() (keepGoing bool) {
}
w
.
resultsManager
.
Set
(
w
.
containerID
,
result
,
w
.
pod
)
DeprecatedProberResults
.
With
(
w
.
proberResultsMetricLabels
)
.
Set
(
result
.
ToPrometheusType
())
if
w
.
probeType
==
liveness
&&
result
==
results
.
Failure
{
// The container fails a liveness check, it will need to be restarted.
...
...
pkg/kubelet/server/server.go
View file @
6d041abb
...
...
@@ -321,7 +321,6 @@ func (s *Server) InstallDefaultHandlers() {
// prober metrics are exposed under a different endpoint
p
:=
prometheus
.
NewRegistry
()
p
.
MustRegister
(
prober
.
ProberResults
)
p
.
MustRegister
(
prober
.
DeprecatedProberResults
)
s
.
restfulCont
.
Handle
(
proberMetricsPath
,
promhttp
.
HandlerFor
(
p
,
promhttp
.
HandlerOpts
{
ErrorHandling
:
promhttp
.
ContinueOnError
}),
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment