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

Update some of our policies that are targeting Pod, to make them process higher level objects #282

Open
7 of 19 tasks
jvanz opened this issue Sep 21, 2022 · 10 comments
Open
7 of 19 tasks

Comments

@jvanz
Copy link
Member

jvanz commented Sep 21, 2022

Update some of our policies that are targeting Pod, to make them process higher level objects like deployments. This is a better practice because we prevent the resources to be created instead of failing in the deployment phase when the pods are created.

The following list is the policies with rules targeting pod resource which need to be updated

Go-based:

Rust-based:

For the rust policies, it's possible to use a recent feature added to the rust SDK which allow policy authors to get the pod definition from the high level resources. It would be nice to have a similar feature in the others SDKs as well.

@jvanz
Copy link
Member Author

jvanz commented Oct 7, 2022

As we are not working on this now, I've re added the issue in the board to keep it in the "waiting triage" queue.

@flavio
Copy link
Member

flavio commented Aug 4, 2023

Instead of updating all our policies targeting Pods to cover for high order resources, we might consider doing something like Kyverno aug-gen rules

@adnanhashmi09
Copy link

I would like to work on this issue. Please assign this to me.

@jvanz jvanz assigned adnanhashmi09 and unassigned jvanz Aug 4, 2023
@jvanz
Copy link
Member Author

jvanz commented Aug 4, 2023

@adnanhashmi09, please, select a sub task. I'll assign it for you as well.

@flavio
Copy link
Member

flavio commented Aug 7, 2023

wait, I'm a bit confused. I don't know if @adnanhashmi09 wants to work on the original task or attempt to implement what I described inside of #282 (comment)

@adnanhashmi09: can you please clarify?

@adnanhashmi09
Copy link

adnanhashmi09 commented Aug 7, 2023

I am working on this sub-issue.. I left a comment there. @flavio

@flavio
Copy link
Member

flavio commented Aug 7, 2023

JFYI, I've created kubewarden/rfc#23 to keep track of what I described inside of #282 (comment).

I suggest to put this issue on hold until we understand whether we can have a generic way to make Pod-specific policies work against higher-order resources

@niheetes
Copy link

Any progress on the generic way to make these policies work on higher level resources?

@jvanz
Copy link
Member Author

jvanz commented Jan 18, 2024

Any progress on the generic way to make these policies work on higher level resources?

No, this is issue is on hold for now. May I ask you why you're interested on this? Are you facing some issue writing policies or something similar? Do you want to contribute?

@jvanz
Copy link
Member Author

jvanz commented Jan 26, 2024

@niheetes sorry for the long delay to give you a feedback. We've discussed this issue during our planning session and we do not want to fix all the policies manually. Because that will required a lot of changes and it not future proof. In other words, we would like to avoid to remember that policy must be handle pod inside high level resources every time. Therefore, we will refine this card to decide the proper way to move it forward.

However, we do not want to leave you if a workaround. Thus, we would like to know which policies you want to get fix. Therefore, we can work on them while we do not find the final solution for this issue. Can you share that with us?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants