From f028481ec72cba281dcf6a92e6544179247be5eb Mon Sep 17 00:00:00 2001 From: mozillazg Date: Sat, 7 Sep 2024 09:06:01 +0000 Subject: [PATCH] chore(docs): rename killer to enforcer closes #2517 Signed-off-by: mozillazg --- api/v1/README.md | 2 +- api/v1/tetragon/tetragon.pb.go | 2 +- api/v1/tetragon/tetragon.proto | 2 +- bpf/process/types/basic.h | 4 +-- .../tetragon/api/v1/tetragon/tetragon.pb.go | 2 +- .../tetragon/api/v1/tetragon/tetragon.proto | 2 +- docs/content/en/docs/reference/grpc-api.md | 2 +- .../schemas/tracingpolicy-cilium.io.json | 2 +- .../tracingpolicynamespaced-cilium.io.json | 2 +- .../crds-yaml/cilium.io_tracingpolicies.yaml | 2 +- .../cilium.io_tracingpoliciesnamespaced.yaml | 2 +- pkg/api/tracingapi/client_kprobe.go | 26 +++++++++---------- pkg/grpc/tracing/tracing.go | 2 +- .../v1alpha1/cilium.io_tracingpolicies.yaml | 2 +- .../cilium.io_tracingpoliciesnamespaced.yaml | 2 +- .../v1alpha1/tracing_policy_types.go | 2 +- pkg/k8s/apis/cilium.io/v1alpha1/version.go | 2 +- .../tetragon/api/v1/tetragon/tetragon.pb.go | 2 +- .../tetragon/api/v1/tetragon/tetragon.proto | 2 +- .../v1alpha1/cilium.io_tracingpolicies.yaml | 2 +- .../cilium.io_tracingpoliciesnamespaced.yaml | 2 +- .../v1alpha1/tracing_policy_types.go | 2 +- .../k8s/apis/cilium.io/v1alpha1/version.go | 2 +- 23 files changed, 36 insertions(+), 36 deletions(-) diff --git a/api/v1/README.md b/api/v1/README.md index 8f27d870487..85eedda1ca9 100644 --- a/api/v1/README.md +++ b/api/v1/README.md @@ -1150,7 +1150,7 @@ User records | KPROBE_ACTION_SIGNAL | 10 | Signal action sends specified signal to the process. | | KPROBE_ACTION_TRACKSOCK | 11 | TrackSock action tracks socket. | | KPROBE_ACTION_UNTRACKSOCK | 12 | UntrackSock action un-tracks socket. | -| KPROBE_ACTION_NOTIFYENFORCER | 13 | NotifyEnforcer action notifies killer sensor. | +| KPROBE_ACTION_NOTIFYENFORCER | 13 | NotifyEnforcer action notifies enforcer sensor. | diff --git a/api/v1/tetragon/tetragon.pb.go b/api/v1/tetragon/tetragon.pb.go index 874343f7bad..df8cc2aefbb 100644 --- a/api/v1/tetragon/tetragon.pb.go +++ b/api/v1/tetragon/tetragon.pb.go @@ -55,7 +55,7 @@ const ( KprobeAction_KPROBE_ACTION_TRACKSOCK KprobeAction = 11 // UntrackSock action un-tracks socket. KprobeAction_KPROBE_ACTION_UNTRACKSOCK KprobeAction = 12 - // NotifyEnforcer action notifies killer sensor. + // NotifyEnforcer action notifies enforcer sensor. KprobeAction_KPROBE_ACTION_NOTIFYENFORCER KprobeAction = 13 ) diff --git a/api/v1/tetragon/tetragon.proto b/api/v1/tetragon/tetragon.proto index 20e1e78abb0..17f3e334d81 100644 --- a/api/v1/tetragon/tetragon.proto +++ b/api/v1/tetragon/tetragon.proto @@ -463,7 +463,7 @@ enum KprobeAction { KPROBE_ACTION_TRACKSOCK = 11; // UntrackSock action un-tracks socket. KPROBE_ACTION_UNTRACKSOCK = 12; - // NotifyEnforcer action notifies killer sensor. + // NotifyEnforcer action notifies enforcer sensor. KPROBE_ACTION_NOTIFYENFORCER = 13; } diff --git a/bpf/process/types/basic.h b/bpf/process/types/basic.h index 06de0defca1..bf93e6be20d 100644 --- a/bpf/process/types/basic.h +++ b/bpf/process/types/basic.h @@ -107,7 +107,7 @@ enum { ACTION_SIGNAL = 9, ACTION_TRACKSOCK = 10, ACTION_UNTRACKSOCK = 11, - ACTION_NOTIFY_KILLER = 12, + ACTION_NOTIFY_ENFORCER = 12, }; enum { @@ -2257,7 +2257,7 @@ do_action(void *ctx, __u32 i, struct selector_action *actions, socki = actions->act[++i]; err = tracksock(e, socki, action == ACTION_TRACKSOCK); break; - case ACTION_NOTIFY_KILLER: + case ACTION_NOTIFY_ENFORCER: error = actions->act[++i]; signal = actions->act[++i]; do_action_notify_enforcer(error, signal); diff --git a/contrib/tetragon-rthooks/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go b/contrib/tetragon-rthooks/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go index 874343f7bad..df8cc2aefbb 100644 --- a/contrib/tetragon-rthooks/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go +++ b/contrib/tetragon-rthooks/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go @@ -55,7 +55,7 @@ const ( KprobeAction_KPROBE_ACTION_TRACKSOCK KprobeAction = 11 // UntrackSock action un-tracks socket. KprobeAction_KPROBE_ACTION_UNTRACKSOCK KprobeAction = 12 - // NotifyEnforcer action notifies killer sensor. + // NotifyEnforcer action notifies enforcer sensor. KprobeAction_KPROBE_ACTION_NOTIFYENFORCER KprobeAction = 13 ) diff --git a/contrib/tetragon-rthooks/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto b/contrib/tetragon-rthooks/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto index 20e1e78abb0..17f3e334d81 100644 --- a/contrib/tetragon-rthooks/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto +++ b/contrib/tetragon-rthooks/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto @@ -463,7 +463,7 @@ enum KprobeAction { KPROBE_ACTION_TRACKSOCK = 11; // UntrackSock action un-tracks socket. KPROBE_ACTION_UNTRACKSOCK = 12; - // NotifyEnforcer action notifies killer sensor. + // NotifyEnforcer action notifies enforcer sensor. KPROBE_ACTION_NOTIFYENFORCER = 13; } diff --git a/docs/content/en/docs/reference/grpc-api.md b/docs/content/en/docs/reference/grpc-api.md index e927d2f2213..439a0e90fbf 100644 --- a/docs/content/en/docs/reference/grpc-api.md +++ b/docs/content/en/docs/reference/grpc-api.md @@ -695,7 +695,7 @@ User records | KPROBE_ACTION_SIGNAL | 10 | Signal action sends specified signal to the process. | | KPROBE_ACTION_TRACKSOCK | 11 | TrackSock action tracks socket. | | KPROBE_ACTION_UNTRACKSOCK | 12 | UntrackSock action un-tracks socket. | -| KPROBE_ACTION_NOTIFYENFORCER | 13 | NotifyEnforcer action notifies killer sensor. | +| KPROBE_ACTION_NOTIFYENFORCER | 13 | NotifyEnforcer action notifies enforcer sensor. | diff --git a/install/kubernetes/schemas/tracingpolicy-cilium.io.json b/install/kubernetes/schemas/tracingpolicy-cilium.io.json index 94faa11c68f..4747abbf9c3 100644 --- a/install/kubernetes/schemas/tracingpolicy-cilium.io.json +++ b/install/kubernetes/schemas/tracingpolicy-cilium.io.json @@ -68,7 +68,7 @@ "additionalProperties": false }, "enforcers": { - "description": "A killer spec.", + "description": "A enforcer spec.", "items": { "properties": { "calls": { diff --git a/install/kubernetes/schemas/tracingpolicynamespaced-cilium.io.json b/install/kubernetes/schemas/tracingpolicynamespaced-cilium.io.json index 94faa11c68f..4747abbf9c3 100644 --- a/install/kubernetes/schemas/tracingpolicynamespaced-cilium.io.json +++ b/install/kubernetes/schemas/tracingpolicynamespaced-cilium.io.json @@ -68,7 +68,7 @@ "additionalProperties": false }, "enforcers": { - "description": "A killer spec.", + "description": "A enforcer spec.", "items": { "properties": { "calls": { diff --git a/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpolicies.yaml b/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpolicies.yaml index 0524ff9df29..88c97b78fe4 100644 --- a/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpolicies.yaml +++ b/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpolicies.yaml @@ -92,7 +92,7 @@ spec: type: object type: object enforcers: - description: A killer spec. + description: A enforcer spec. items: properties: calls: diff --git a/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpoliciesnamespaced.yaml b/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpoliciesnamespaced.yaml index f7aed86615b..e30a7ee4f86 100644 --- a/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpoliciesnamespaced.yaml +++ b/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpoliciesnamespaced.yaml @@ -92,7 +92,7 @@ spec: type: object type: object enforcers: - description: A killer spec. + description: A enforcer spec. items: properties: calls: diff --git a/pkg/api/tracingapi/client_kprobe.go b/pkg/api/tracingapi/client_kprobe.go index d95bb4663f6..b94db1a697d 100644 --- a/pkg/api/tracingapi/client_kprobe.go +++ b/pkg/api/tracingapi/client_kprobe.go @@ -12,19 +12,19 @@ const ( ) const ( - ActionPost = 0 - ActionFollowFd = 1 - ActionSigKill = 2 - ActionUnfollowFd = 3 - ActionOverride = 4 - ActionCopyFd = 5 - ActionGetUrl = 6 - ActionLookupDns = 7 - ActionNoPost = 8 - ActionSignal = 9 - ActionTrackSock = 10 - ActionUntrackSock = 11 - ActionNotifyKiller = 12 + ActionPost = 0 + ActionFollowFd = 1 + ActionSigKill = 2 + ActionUnfollowFd = 3 + ActionOverride = 4 + ActionCopyFd = 5 + ActionGetUrl = 6 + ActionLookupDns = 7 + ActionNoPost = 8 + ActionSignal = 9 + ActionTrackSock = 10 + ActionUntrackSock = 11 + ActionNotifyEnforcer = 12 ) const ( diff --git a/pkg/grpc/tracing/tracing.go b/pkg/grpc/tracing/tracing.go index 3f1229f2d66..c447af54d40 100644 --- a/pkg/grpc/tracing/tracing.go +++ b/pkg/grpc/tracing/tracing.go @@ -59,7 +59,7 @@ func kprobeAction(act uint64) tetragon.KprobeAction { return tetragon.KprobeAction_KPROBE_ACTION_TRACKSOCK case tracingapi.ActionUntrackSock: return tetragon.KprobeAction_KPROBE_ACTION_UNTRACKSOCK - case tracingapi.ActionNotifyKiller: + case tracingapi.ActionNotifyEnforcer: return tetragon.KprobeAction_KPROBE_ACTION_NOTIFYENFORCER default: return tetragon.KprobeAction_KPROBE_ACTION_UNKNOWN diff --git a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml index 0524ff9df29..88c97b78fe4 100644 --- a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml +++ b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml @@ -92,7 +92,7 @@ spec: type: object type: object enforcers: - description: A killer spec. + description: A enforcer spec. items: properties: calls: diff --git a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml index f7aed86615b..e30a7ee4f86 100644 --- a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml +++ b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml @@ -92,7 +92,7 @@ spec: type: object type: object enforcers: - description: A killer spec. + description: A enforcer spec. items: properties: calls: diff --git a/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go b/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go index 36b6d9f9197..69cfc633a80 100644 --- a/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go +++ b/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go @@ -105,7 +105,7 @@ type TracingPolicySpec struct { Lists []ListSpec `json:"lists,omitempty"` // +kubebuilder:validation:Optional - // A killer spec. + // A enforcer spec. Enforcers []EnforcerSpec `json:"enforcers,omitempty"` // +kubebuilder:validation:Optional diff --git a/pkg/k8s/apis/cilium.io/v1alpha1/version.go b/pkg/k8s/apis/cilium.io/v1alpha1/version.go index b62df8c74e6..e15f207706e 100644 --- a/pkg/k8s/apis/cilium.io/v1alpha1/version.go +++ b/pkg/k8s/apis/cilium.io/v1alpha1/version.go @@ -7,4 +7,4 @@ package v1alpha1 // Used to determine if CRD needs to be updated in cluster // // Developers: Bump patch for each change in the CRD schema. -const CustomResourceDefinitionSchemaVersion = "1.3.0" +const CustomResourceDefinitionSchemaVersion = "1.3.1" diff --git a/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go b/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go index 874343f7bad..df8cc2aefbb 100644 --- a/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go +++ b/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go @@ -55,7 +55,7 @@ const ( KprobeAction_KPROBE_ACTION_TRACKSOCK KprobeAction = 11 // UntrackSock action un-tracks socket. KprobeAction_KPROBE_ACTION_UNTRACKSOCK KprobeAction = 12 - // NotifyEnforcer action notifies killer sensor. + // NotifyEnforcer action notifies enforcer sensor. KprobeAction_KPROBE_ACTION_NOTIFYENFORCER KprobeAction = 13 ) diff --git a/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto b/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto index 20e1e78abb0..17f3e334d81 100644 --- a/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto +++ b/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto @@ -463,7 +463,7 @@ enum KprobeAction { KPROBE_ACTION_TRACKSOCK = 11; // UntrackSock action un-tracks socket. KPROBE_ACTION_UNTRACKSOCK = 12; - // NotifyEnforcer action notifies killer sensor. + // NotifyEnforcer action notifies enforcer sensor. KPROBE_ACTION_NOTIFYENFORCER = 13; } diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml index 0524ff9df29..88c97b78fe4 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml @@ -92,7 +92,7 @@ spec: type: object type: object enforcers: - description: A killer spec. + description: A enforcer spec. items: properties: calls: diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml index f7aed86615b..e30a7ee4f86 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml @@ -92,7 +92,7 @@ spec: type: object type: object enforcers: - description: A killer spec. + description: A enforcer spec. items: properties: calls: diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go index 36b6d9f9197..69cfc633a80 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go @@ -105,7 +105,7 @@ type TracingPolicySpec struct { Lists []ListSpec `json:"lists,omitempty"` // +kubebuilder:validation:Optional - // A killer spec. + // A enforcer spec. Enforcers []EnforcerSpec `json:"enforcers,omitempty"` // +kubebuilder:validation:Optional diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/version.go b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/version.go index b62df8c74e6..e15f207706e 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/version.go +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/version.go @@ -7,4 +7,4 @@ package v1alpha1 // Used to determine if CRD needs to be updated in cluster // // Developers: Bump patch for each change in the CRD schema. -const CustomResourceDefinitionSchemaVersion = "1.3.0" +const CustomResourceDefinitionSchemaVersion = "1.3.1"