Skip to content

Conversation

@kemingy
Copy link
Contributor

@kemingy kemingy commented Oct 21, 2025

Fixes N/A

Description

Update the argument types doc according to pkg/k8s/apis/cilium.io/v1alpha1/types.go

Changelog

@kemingy kemingy requested review from a team and mtardy as code owners October 21, 2025 08:48
@netlify
Copy link

netlify bot commented Oct 21, 2025

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 4ad4362
🔍 Latest deploy log https://app.netlify.com/projects/tetragon/deploys/6902df3b14dd340008ef050f
😎 Deploy Preview https://deploy-preview-4213--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kemingy kemingy changed the title docs: update the argument types doc: update the argument types Oct 21, 2025
Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Ah indeed some of the types are not reflected into the TracingPolicy API, @olsajiri since you created that page, I imagine you based yourself on

var genericStringToType = map[string]int{
"string": GenericStringType,
"int": GenericIntType,
"uint64": GenericU64Type,
"unsigned long": GenericU64Type,
"ulong": GenericU64Type,
"uint32": GenericU32Type,
"sint64": GenericS64Type,
"int64": GenericS64Type,
"long": GenericS64Type,
"sint32": GenericS32Type,
"int32": GenericS32Type,
"skb": GenericSkbType,
"sock": GenericSockType,
"size_t": GenericSizeType,
"char_buf": GenericCharBuffer,
"char_iovec": GenericCharIovec,
"filename": GenericFilenameType,
"file": GenericFileType,
"path": GenericPathType,
"fd": GenericFdType,
"cred": GenericCredType,
"const_buf": GenericConstBuffer,
"nop": GenericNopType,
"bpf_attr": GenericBpfAttr,
"perf_event": GenericPerfEvent,
"bpf_map": GenericBpfMap,
"user_namespace": GenericUserNamespace,
"capability": GenericCapability,
"kiocb": GenericKiocb,
"iov_iter": GenericIovIter,
"load_info": GenericLoadModule,
"module": GenericKernelModule,
"syscall64": GenericSyscall64,
"sint16": GenericS16Type,
"int16": GenericS16Type,
"uint16": GenericU16Type,
"sint8": GenericS8Type,
"int8": GenericS8Type,
"uint8": GenericU8Type,
"kernel_cap_t": GenericKernelCap,
"cap_inheritable": GenericCapInheritable,
"cap_permitted": GenericCapPermitted,
"cap_effective": GenericCapEffective,
"linux_binprm": GenericLinuxBinprmType,
"data_loc": GenericDataLoc,
"net_device": GenericNetDev,
"sockaddr": GenericSockaddrType,
"socket": GenericSocketType,
"dentry": GenericDentryType,
"bpf_prog": GenericBpfProgType,
}

Do you know why we have this difference?

@mtardy mtardy added area/documentation Improvements or additions to documentation release-note/docs This PR updates the documentation. labels Oct 21, 2025
Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So apparently instead of just deleting it from the docs we should either:

  • document that these types are only supported in non-k8s context
  • add support for k8s context, I don't think it should be too hard, it's just some plumbing missing

@kemingy
Copy link
Contributor Author

kemingy commented Oct 21, 2025

So apparently instead of just deleting it from the docs we should either:

* document that these types are only supported in non-k8s context

* add support for k8s context, I don't think it should be too hard, it's just some plumbing missing

Will try to support those types for k8s context.

Actually, I'm not sure what the non-k8s context means. I run it with the local Docker container, but clearly it requires the tracepoints policy YAML file, and those types are rejected since they violate the protobuf.

@mtardy
Copy link
Member

mtardy commented Oct 21, 2025

Will try to support those types for k8s context.

Cool! I think it's the better option here.

Actually, I'm not sure what the non-k8s context means. I run it with the local Docker container, but clearly it requires the tracepoints policy YAML file, and those types are rejected since they violate the protobuf.

Yeah previously they weren't validated because of a bug but indeed now they should be validated against the CRD so it should be rejected anyway.

@kemingy kemingy changed the title doc: update the argument types feat: align the argument types for k8s context Oct 28, 2025
@kemingy kemingy requested a review from mtardy October 30, 2025 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Improvements or additions to documentation release-note/docs This PR updates the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants