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

ansible/helm: add ssc to not allow root previleges #4655

Merged

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Mar 13, 2021

Signed-off-by: Camila Macedo cmacedo@redhat.com

Description of the change:

  • (ansible/v1)(helm/v1) Add SecurityContext to now allow root privileges and align project languages with Golang.

Motivation for the change:

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 15:21 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 15:21 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 15:21 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 15:21 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 15:21 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 15:21 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 17:47 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 17:47 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 17:47 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 17:47 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 17:47 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 17:47 Inactive
@camilamacedo86 camilamacedo86 changed the title ansible/helm: add ssc to not allow root previleges WIP: ansible/helm: add ssc to not allow root previleges Mar 13, 2021
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 13, 2021
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:35 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:35 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:35 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:35 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:35 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:35 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:37 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:37 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:37 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:37 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:38 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 11:38 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 15:12 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 15:12 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 15:12 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 15:12 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 15:12 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 15:12 Inactive
@camilamacedo86 camilamacedo86 changed the title WIP: ansible/helm: add ssc to not allow root previleges ansible/helm: add ssc to not allow root previleges Mar 15, 2021
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 15, 2021
# release notes and/or the migration guide
entries:
- description: >
(ansible/v1)(helm/v1) Add SecurityContext to now allow root privileges.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(ansible/v1)(helm/v1) Add SecurityContext to now allow root privileges.
(ansible/v1, helm/v1) Added `securityContext`'s to the manager's Deployment to disallow running as root user.

# Migration can be defined to automatically add a section to
# the migration guide. This is required for breaking changes.
migration:
header: (ansible/v1)(helm/v1) **(Optional)** Add SecurityContext to now allow root privileges.
Copy link
Member

Choose a reason for hiding this comment

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

All v1.y migrations are optional.

Suggested change
header: (ansible/v1)(helm/v1) **(Optional)** Add SecurityContext to now allow root privileges.
header: (ansible/v1, helm/v1) Add `securityContext`'s to your manager's Deployment.

migration:
header: (ansible/v1)(helm/v1) **(Optional)** Add SecurityContext to now allow root privileges.
body: >
In the `config/manager` add the following security context:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
In the `config/manager` add the following security context:
In `config/manager/manager.yaml`, add the following security contexts:

body: >
In the `config/manager` add the following security context:
```yaml
spec:
Copy link
Member

Choose a reason for hiding this comment

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

Can you indent these from the root field, ex

spec:
  ...
  template:
    ...
    spec:
      securityContext:
        runAsNonRoot: true
      containers:
      - name: manager
        securityContext:
          allowPrivilegeEscalation: false

Signed-off-by: Camila Macedo <cmacedo@redhat.com>
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 22:59 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 22:59 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 22:59 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 22:59 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 22:59 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 15, 2021 22:59 Inactive
Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 15, 2021
@camilamacedo86 camilamacedo86 merged commit 4506415 into operator-framework:master Mar 16, 2021
@camilamacedo86 camilamacedo86 deleted the add-ssc-ansible-helm branch March 16, 2021 01:21
waynesun09 added a commit to waynesun09/reportportal-operator that referenced this pull request Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply SCC for Ansible/Helm
3 participants