Skip to content

Conversation

@yossisegev
Copy link
Contributor

Support extra parameters of SecurityContextConstraints resource.

@redhat-qe-bot
Copy link
Contributor

Report bugs in Issues

The following are automatically added:

  • Add reviewers from OWNER file (in the root of the repository) under reviewers section.
  • Set PR size label.
  • New issue is created for the PR. (Closed when PR is merged/closed)

Available user actions:

  • To mark PR as verified add /verified to a PR comment, to un-verify add /verified cancel to a PR comment.
    verified label removed on each new commit push.
  • To cherry pick a merged PR add /cherry-pick <target branch to cherry-pick to> to a PR comment.
    • Support only merged PRs
  • To add a label by comment use /<label name>, to remove, use /<label name> cancel
Supported labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
  • target-version-

Security Context Constraints object. API reference:
https://docs.openshift.com/container-platform/4.13/rest_api/security_apis/securitycontextconstraints-security-openshift-io-v1.html
Args:
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. should be under init
  2. do not repeat the api docs
  3. defaults by the api should not appear here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

super().to_dict()
if not self.yaml_file:
self.res.update()
manifest_spec = self.res
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need to save

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@sonarqubecloud
Copy link

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
No Duplication information No Duplication information

https://docs.openshift.com/container-platform/4.13/rest_api/security_apis/securitycontextconstraints-security-openshift-io-v1.html
Args:
allow_host_dir_volume_plugin (bool): Determines if the policy allow containers to use the HostDir volume
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add defaults, e.g allow_host_dir_volume_plugin (bool, default: False)

if self.groups:
self.res["groups"] = self.groups

if self.priority:
Copy link
Collaborator

Choose a reason for hiding this comment

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

priority default is 0
is 0 a valid option?if so, the code below will not be reached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants