Skip to content

Commit 19a4266

Browse files
ductnnirozzo-1A
authored andcommitted
docs(k8smeta): clarify dynamic nodeName usage
Signed-off-by: ductnn <[email protected]>
1 parent 3352cc2 commit 19a4266

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

plugins/k8smeta/README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ The `k8smeta` plugin implements 4 capabilities:
5959

6060
Here's an example of configuration of `falco.yaml`:
6161

62-
> NOTE: Please note that you can provide values to the config as environment variables. So, for example, you can take advantage of the Kubernetes downward API to provide the node name as an env variable `nodename: ${MY_NODE}`.
62+
> NOTE:
63+
> The `nodeName` field is required by the plugin and must match the name of the
64+
> Kubernetes node on which the Falco instance is running.
65+
>
66+
> When running Falco as a DaemonSet, this value **must be set dynamically**
67+
> using the Kubernetes Downward API.
68+
> Hard-coding the node name will cause metadata enrichment to work only for a
69+
> single node.
6370
6471
```yaml
6572
plugins:
@@ -72,7 +79,20 @@ plugins:
7279
# hostname exposed by the k8s-metacollector
7380
collectorHostname: localhost # (required)
7481
# name of the node on which the Falco instance is running.
75-
nodeName: kind-control-plane # (required)
82+
nodeName: "${FALCO_K8S_NODE_NAME}" # (required)
83+
# name of the node on which the Falco instance is running.
84+
# In Kubernetes DaemonSets, you should use an environment variable
85+
# that is populated via Downward API so that each Falco pod gets
86+
# its own node name dynamically:
87+
#
88+
# extra:
89+
# # -- Extra environment variables that will be pass onto Falco containers.
90+
# env:
91+
# - name: FALCO_K8S_NODE_NAME
92+
# valueFrom:
93+
# fieldRef:
94+
# fieldPath: spec.nodeName
95+
#
7696
# verbosity level for the plugin logger
7797
verbosity: warning # (optional, default: info)
7898
# path to the PEM encoding of the server root certificates.

0 commit comments

Comments
 (0)