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

Don't give operator permissions to create CRDs if not needed #2226

Open
lambdanis opened this issue Mar 15, 2024 · 2 comments
Open

Don't give operator permissions to create CRDs if not needed #2226

lambdanis opened this issue Mar 15, 2024 · 2 comments
Labels
area/helm Related to the Helm chart good first issue Good for newcomers kind/enhancement This improves or streamlines existing functionality

Comments

@lambdanis
Copy link
Contributor

Tetragon Operator has an option to skip CRD creation, but even if it's used, the operator ClusterRole still contains permissions to create CRDs. For slightly better security hygiene, these permissions can be included conditionally, only if needed.

@lambdanis lambdanis added kind/enhancement This improves or streamlines existing functionality area/helm Related to the Helm chart good first issue Good for newcomers labels Mar 15, 2024
@itsCheithanya
Copy link

I would like to contribute to this issue, can you guide me on how to get started

@lambdanis
Copy link
Contributor Author

@itsCheithanya Thanks! To implement the fix, you'll need to use the Helm if block in the operator ClusterRole. It should be a pretty small change.

To test it, first create a local kind cluster:

./contrib/localdev/bootstrap-kind-cluster.sh

then create a local values.yaml file with CRD creation disabled:

tetragonOperator:
  skipCRDCreation: true

and install Tetragon with using local Helm chart and your values.yaml file:

./contrib/localdev/install-tetragon.sh --values values.yaml

Then, check the operator ClusterRole using kubectl:

kubectl get clusterrole tetragon-operator -oyaml

I hope this gives you a starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Related to the Helm chart good first issue Good for newcomers kind/enhancement This improves or streamlines existing functionality
Projects
Status: No status
Development

No branches or pull requests

2 participants