-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently tetragon uses cilium Endoints to get Pod Labels. Pod Info CRD is a mapping between Pod IPs and Pod metadata therefore, instead of using cilium endpoints, it can use the pod info CRs, hence removing the dependency on cilium. This commit: - Added flag to skip PodInfo CRD in the operator, tetragon will use endpoints in this case. - Integrated logic to register the PodInfo CRD with the API server, similar to tracing Policies CRD. Signed-off-by: Prateek Singh <[email protected]>
- Loading branch information
1 parent
0de4662
commit c9e7537
Showing
17 changed files
with
669 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ rules: | |
- apiGroups: | ||
- cilium.io | ||
resources: | ||
- tetragonpods | ||
- podinfo | ||
verbs: | ||
- create | ||
- delete | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.11.3 | ||
creationTimestamp: null | ||
name: podinfo.cilium.io | ||
spec: | ||
group: cilium.io | ||
names: | ||
kind: PodInfo | ||
listKind: PodInfoList | ||
plural: podinfo | ||
singular: podinfo | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: PodInfo is the Schema for the PodInfo API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
properties: | ||
hostNetwork: | ||
description: Host networking requested for this pod. Use the host's | ||
network namespace. If this option is set, the ports that will be | ||
used must be specified. | ||
type: boolean | ||
type: object | ||
status: | ||
properties: | ||
podIP: | ||
description: IP address allocated to the pod. Routable at least within | ||
the cluster. Empty if not yet allocated. | ||
type: string | ||
podIPs: | ||
description: List of Ip addresses allocated to the pod. 0th entry | ||
must be same as PodIP. | ||
items: | ||
properties: | ||
ip: | ||
description: ip is an IP address (IPv4 or IPv6) assigned to | ||
the pod | ||
type: string | ||
type: object | ||
type: array | ||
type: object | ||
type: object | ||
served: true | ||
storage: true |
70 changes: 70 additions & 0 deletions
70
pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfoes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
|
||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.12.1 | ||
creationTimestamp: null | ||
name: podinfoes.cilium.io | ||
spec: | ||
group: cilium.io | ||
names: | ||
kind: PodInfo | ||
listKind: PodInfoList | ||
plural: podinfoes | ||
singular: podinfo | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: PodInfo is the Scheme for the Podinfo API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
properties: | ||
hostNetwork: | ||
description: Host networking requested for this pod. Use the host's | ||
network namespace. If this option is set, the ports that will be | ||
used must be specified. | ||
type: boolean | ||
type: object | ||
status: | ||
properties: | ||
podIP: | ||
description: IP address allocated to the pod. Routable at least within | ||
the cluster. Empty if not yet allocated. | ||
type: string | ||
podIPs: | ||
description: List of Ip addresses allocated to the pod. 0th entry | ||
must be same as PodIP. | ||
items: | ||
properties: | ||
IP: | ||
description: IP is an IP address (IPv4 or IPv6) assigned to | ||
the pod | ||
type: string | ||
type: object | ||
type: array | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
Oops, something went wrong.