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 ,add if … #2326

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

itsCheithanya
Copy link

Fixes issue #2226 Don't give operator permissions to create CRDs if not needed
Result of the change :

image
Reproduce the result:
create a local values.yaml file with CRD creation disabled:

tetragonOperator:
  skipCRDCreation: true

and then run
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

@itsCheithanya itsCheithanya requested a review from a team as a code owner April 12, 2024 05:58
@lambdanis lambdanis added area/helm Related to the Helm chart release-note/minor This PR introduces a minor user-visible change labels Apr 14, 2024
Copy link
Contributor

@lambdanis lambdanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @itsCheithanya, thank you for the PR. The code change looks good, but the CI is complaining about the long commit message subject:

{[1/1] Don't give operator permissions to create CRDs if not needed ,add if block to stop it}

  Error: ERROR:CUSTOM: Please avoid long commit subjects (max: 75, found: 85)

https://github.com/cilium/tetragon/actions/runs/8657663468/job/23747314419?pr=2326

Could you amend the commit message and force push? You can put details in the commit message body.

@lambdanis lambdanis self-assigned this Apr 14, 2024
@lambdanis
Copy link
Contributor

lambdanis commented Apr 25, 2024

@itsCheithanya It seems you pushed an extra empty commit instead of amending the previous one, so the CI still fails. You can fix it like this:

git reset --hard HEAD~1  # delete the second commit
git commit --amend  # now edit the commit message of the first commit
git push -f  # you need to force push because you edited a commit

When done please re-request review with this button
re-request-review-comment

Thanks!

Copy link

netlify bot commented Apr 28, 2024

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 6f3a225
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/662e7e0ebcb9cb000830585b
😎 Deploy Preview https://deploy-preview-2326--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 28, 2024

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 834843a
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/662e7e2f0a5a7f0008165b93
😎 Deploy Preview https://deploy-preview-2326--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@lambdanis
Copy link
Contributor

@itsCheithanya I see you merged the upstream main branch into your branch, could you rebase instead? Also your commit needs to be signed-off, see https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#dev-coo

@lambdanis lambdanis marked this pull request as draft May 6, 2024 12:27
@lambdanis
Copy link
Contributor

I marked this PR a draft for now, @itsCheithanya please click the "Ready for review" button when you fix the commits.

@lambdanis lambdanis removed their assignment May 22, 2024
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 release-note/minor This PR introduces a minor user-visible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants