fix(plugins/container): handle liveness and readiness probes#1218
fix(plugins/container): handle liveness and readiness probes#1218
Conversation
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
…CRI engine Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: leogr The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Rules files suggestions |
| readinessProbe *event.Probe | ||
| ) | ||
| containerName := ctr.GetMetadata().GetName() | ||
| if annotation, ok := podSandboxStatus.GetAnnotations()[k8sLastAppliedConfigAnnotation]; ok { |
There was a problem hiding this comment.
This is a best effort extraction, the last-applied-configuration is part of the legacy mechanism to track changes with client side apply. It's not there when using server-side apply or when creating the resources without apply.
The kubelet exposes an API to list the pods spec managed by it, we could rely on it but it's not always accessible (especially in a secure clutster). Otherwise we could pass from Apiserver proxy.
TBH I would rather deprecate this feature from the container plugin, as it is a Kubernetes specific information and not strictly related to the container runtime.
There was a problem hiding this comment.
TBH I would rather deprecate this feature from the container plugin, as it is a Kubernetes specific information and not strictly related to the container runtime.
I tend to agree with this.
cc @falcosecurity/plugins-maintainers any thoughts in this regard? 🤔
There was a problem hiding this comment.
I agree with the fact that this is a kubernetes-specific information and that the mechanism is a bit fragile. At this point, better to remove the support here and move it to k8smeta
What type of PR is this?
/kind bug
/kind cleanup
Any specific area of the project related to this PR?
/area plugins
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1017
Special notes for your reviewer: