Skip to content

Commit

Permalink
Add an optional cluster_name field to GetEventsResponse
Browse files Browse the repository at this point in the history
Add an optional cluster_name field to GetEventsResponse. To enable the
field, set tetragon.clusterName Helm value.

Signed-off-by: Michi Mutsuzaki <[email protected]>
  • Loading branch information
michi-covalent committed Oct 22, 2024
1 parent 1b279b8 commit b83744f
Show file tree
Hide file tree
Showing 17 changed files with 138 additions and 79 deletions.
1 change: 1 addition & 0 deletions api/v1/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 37 additions & 26 deletions api/v1/tetragon/events.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api/v1/tetragon/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,6 @@ message GetEventsResponse {
// aggregation_info contains information about aggregation results. This field
// is set only for aggregated responses.
AggregationInfo aggregation_info = 1002;
// Name of the cluster where this event was observed.
string cluster_name = 1003;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/content/en/docs/reference/grpc-api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/content/en/docs/reference/helm-chart.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/data/tetragon_flags.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions install/kubernetes/tetragon/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
labels:
{{- include "tetragon.labels" . | nindent 4 }}
data:
cluster-name: {{ .Values.tetragon.clusterName | quote }}
{{- if .Values.tetragon.btf }}
btf: {{ .Values.tetragon.btf }}
{{- end }}
Expand Down Expand Up @@ -75,4 +76,4 @@ data:
{{- if .Values.tetragon.enableKeepSensorsOnExit }}
keep-sensors-on-exit: "true"
release-pinned-bpf: "false"
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions install/kubernetes/tetragon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ tetragon:
# With both of the above redaction filters in place, we are now redacting all
# password arguments.
redactionFilters: ""
# -- Name of the cluster where Tetragon is installed. Tetragon uses this value
# to set the cluster_name field in GetEventsResponse messages.
clusterName: ""
# -- Access Kubernetes API to associate Tetragon events with Kubernetes pods.
enableK8sAPI: true
# -- Enable Capabilities visibility in exec and kprobe events.
Expand Down
1 change: 1 addition & 0 deletions pkg/option/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type config struct {
Verbosity int
ForceSmallProgs bool
ForceLargeProgs bool
ClusterName string

EnableProcessNs bool
EnableProcessCred bool
Expand Down
Loading

0 comments on commit b83744f

Please sign in to comment.