Skip to content

Commit decf6e5

Browse files
committed
update doc
1 parent da25051 commit decf6e5

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

plugin/input/k8s/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,15 @@ Example: ```component: '{{ index .pod.Labels "component" | default .k8s_containe
118118

119119
**`meta_file`** *`string`*
120120

121-
The filename to store current k8s pod meta. Meta are loaded only on initialization
121+
The filename to store current k8s pod metadata (`map[Namespace]map[PodName]map[ContainerID]*podMeta`, where `podMeta` is a wrapper for `corev1.Pod`).
122+
123+
Metadata is saved once per gatherer `MaintenanceInterval` and is loaded only on initialization.
124+
125+
If parameter is empty, the metadata won't be cached.
122126

123127
> This feature is used to reuse metadata that we have already received, in particular if the kube-apiserver is unavailable.
124128
>
125-
> The plugin considers kube-apiserver to be unavailable from the moment the SetWatchErrorHandler handler is called until one of the ResourceEventHandlerFuncs handlers is called.
129+
> The plugin considers kube-apiserver to be unavailable from the moment the `SetWatchErrorHandler` handler is called until one of the `ResourceEventHandlerFuncs` handlers is called.
126130

127131
<br>
128132

plugin/input/k8s/k8s.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,15 @@ type Config struct {
140140

141141
// > @3@4@5@6
142142
// >
143-
// > The filename to store current k8s pod meta. Meta are loaded only on initialization
143+
// > The filename to store current k8s pod metadata (`map[Namespace]map[PodName]map[ContainerID]*podMeta`, where `podMeta` is a wrapper for `corev1.Pod`).
144+
// >
145+
// > Metadata is saved once per gatherer `MaintenanceInterval` and is loaded only on initialization.
146+
// >
147+
// > If parameter is empty, the metadata won't be cached.
144148
// >
145149
// > > This feature is used to reuse metadata that we have already received, in particular if the kube-apiserver is unavailable.
146150
// > >
147-
// > > The plugin considers kube-apiserver to be unavailable from the moment the SetWatchErrorHandler handler is called until one of the ResourceEventHandlerFuncs handlers is called.
151+
// > > The plugin considers kube-apiserver to be unavailable from the moment the `SetWatchErrorHandler` handler is called until one of the `ResourceEventHandlerFuncs` handlers is called.
148152
K8sMetaFile string `json:"meta_file" default:""` // *
149153
}
150154

0 commit comments

Comments
 (0)