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

Change securityContext on operator, so that scc is 'restricted' #220

Merged
merged 1 commit into from Aug 23, 2021

Conversation

akrejcir
Copy link
Collaborator

What this PR does / why we need it:
Changing the security context on the deployment, changes the assigned SCC from privileged to restricted.

Which issue(s) this PR fixes:
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1995295

Release note:

None

@akrejcir
Copy link
Collaborator Author

/cc @kwiesmueller @vatsalparekh

@akrejcir
Copy link
Collaborator Author

Holding until CI starts.

/hold

@kwiesmueller
Copy link

Do you have a reference explaining why this fixes the bug? I'm lacking context on why this change is required and if it is okay/safe to remove the uid.

@akrejcir
Copy link
Collaborator Author

akrejcir commented Aug 19, 2021

I have added the UID as part of my PR that updated operator-sdk and manifests to a newer version. It was generated automatically, and I kept it there, because I thought that it would not cause any problem.

This PR updates the securityContext to be the same as in other kubevirt components.

I don't know why this changes the SCC.

@akrejcir
Copy link
Collaborator Author

/hold cancel

@akrejcir
Copy link
Collaborator Author

/cc @ksimon1 @omeryahud

@kwiesmueller
Copy link

/lgtm
/approve

@kwiesmueller
Copy link

Thanks

@akrejcir
Copy link
Collaborator Author

The kubevirt-bot is not working on this PR, can you approve it manually?

@omeryahud
Copy link
Contributor

@akrejcir Do you think adding a test verifying your expectations here is necessary?

@akrejcir
Copy link
Collaborator Author

Not necessary, but a good idea in case we change manifests in the future and SCC will change.

I will add them.

@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M labels Aug 20, 2021
@akrejcir
Copy link
Collaborator Author

Canceling approval. Test IDs are needed.

/approve cancel

@akrejcir
Copy link
Collaborator Author

/remove-approve

This change will allow the SCC to be 'restricted',
otherwise it will be 'privileged'

Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
@akrejcir
Copy link
Collaborator Author

/retest

@akrejcir
Copy link
Collaborator Author

This is ready for review.

@akrejcir
Copy link
Collaborator Author

@ksimon1
Copy link
Member

ksimon1 commented Aug 23, 2021

/lgtm

@ksimon1 ksimon1 closed this Aug 23, 2021
@ksimon1 ksimon1 reopened this Aug 23, 2021
@sonarcloud
Copy link

sonarcloud bot commented Aug 23, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ksimon1
Copy link
Member

ksimon1 commented Aug 23, 2021

sorry, I pressed wrong button

@vatsalparekh
Copy link

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 23, 2021
@ksimon1
Copy link
Member

ksimon1 commented Aug 23, 2021

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ksimon1, kwiesmueller

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [ksimon1,kwiesmueller]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@akrejcir
Copy link
Collaborator Author

/retest

@kubevirt-bot kubevirt-bot merged commit 8cc68c7 into kubevirt:master Aug 23, 2021
@akrejcir akrejcir deleted the scc-fix branch August 23, 2021 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants