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

Adding two helper functions for VAP and CEL admission library #1682

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

slashben
Copy link
Contributor

@slashben slashben commented May 9, 2024

Overview

In this PR I am adding two simple CLI commands related to VAP (Validating Admission Policies) and Kubescape's CEL Admission Policy Library.

One is kubescape vap-helper deploy-library that downloads release artifacts from the CEL Admission Policy Library repo (policies) and prints it to the STDOUT (so it can be used in conjunction with | kubectl apply -f )

The second is kubescape vap-helper create-policy-binding --name my-policy-binding --policy C-0012 --namespace test command that creates a policy binding object YAML and prints it to STDOUT (so it can be used in conjunction with | kubectl apply -f as well)

Checklist before requesting a review

  • My code follows the style guidelines of this project
  • I have commented on my code, particularly in hard-to-understand areas
  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.
  • New and existing unit tests pass locally with my changes

@slashben slashben requested a review from matthyx May 9, 2024 11:39
@dwertent
Copy link
Contributor

dwertent commented May 9, 2024

We should consider naming the command simply vap instead of vap-helper.
Also, maybe we should use the term download instead of deploy-library.

A different option, we already have the download command, so maybe we should have the command as follows:

kubescape download vap

I'm not familiar with the VAP policies to comment on the create-policy-binding command.

@slashben
Copy link
Contributor Author

slashben commented May 12, 2024

We should consider naming the command simply vap instead of vap-helper.

I thought about it from the beginning. The reason I choose the "-helper" suffix is that these functionalities are not implementing "VAP" but convenience functions to manage it more easily.

Also, maybe we should use the term download instead of deploy-library.

But the core functionality is to deploy the library in the cluster with it, not to download (see my next comment as well)

A different option, we already have the download command, so maybe we should have the command as follows

We could split the "deploy" to two parts, download and deploy, but I am not sure about the benefits. I don't see the download to be used as a standalone command yet (what for?).

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 this pull request may close these issues.

None yet

2 participants