Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Adding Kubernetes priority class to NRI plugin deployment manifests #194

Closed
ffuerste opened this issue Nov 16, 2023 · 3 comments · Fixed by #220
Closed

Question: Adding Kubernetes priority class to NRI plugin deployment manifests #194

ffuerste opened this issue Nov 16, 2023 · 3 comments · Fixed by #220

Comments

@ffuerste
Copy link
Contributor

Description

As described in the NRI (security) docs NRI plugins should be considered as part of the container runtime. Therefore, maybe the Kubernetes priority class system-node-critical could be added for the NRI plugin deployment manifests.

Or maybe adding the priority class not in the deployment manifest as a default, but discussing it as an option/recommendation as part of the README of the plugins?

Rationale

Adding the Kubernetes built-in priority class system-node-critical would ensure, that the particular NRI plugin is not evicted (easily) and available when pods are scheduled for which the respective plugin would be responsible for.

E.g. if a pod is created by a user for which a limit for EPC memory is defined, the sgx-epc NRI plugin must be up and running in order to ensure, that the limit is configured correctly as part of the misc cgroup of the container. Currently the sgx-epc NRI plugin supports only creating new containers. However, if containers are already existing when the plugin registers itself to the container runtime, it would need to request an update for existing containers as described here. This use case is currently not supported by the sgx-epc plugin. Therefore, adding the system-node-critical priority class to the deployment manifest for it, could mitigate potential risk in a running system under load.

However, I am not sure, if this makes sense for all currently available plugins or future ones. But it would be great, if we could define a common policy/best practice for it (as suggested by @mythi here).

@mythi
Copy link
Contributor

mythi commented Nov 30, 2023

Therefore, maybe the Kubernetes priority class system-node-critical could be added for the NRI plugin deployment manifests.

@fmuyassarov any thoughts on this? I think it makes sense but before I add it to my deployment, I thought we could align with the direction.

@fmuyassarov
Copy link
Collaborator

fmuyassarov commented Nov 30, 2023

I don't see reason to say no and that can be made optional in our Helm charts so that whoever is interested can opt in for the feature by setting a flag during the Helm installation. Any objections @kad @klihub @marquiz ?

@kad
Copy link
Collaborator

kad commented Dec 1, 2023

yes, I think it makes sense to add priorityClass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants