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

Enhance PodSecurityPolicy for restricted namespace #6533

Merged
merged 1 commit into from
Sep 23, 2022

Conversation

matzew
Copy link
Member

@matzew matzew commented Sep 22, 2022

Signed-off-by: Matthias Wessendorf mwessend@redhat.com

Fixes #6532

Proposed Changes

  • 🧹 replacing all with ALL, since this is the only acceptable string check here and here.
  • 🧹 adding seccompProfile to avoid must set securityContext.seccompProfile.type to "RuntimeDefault" warnings

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note

 :broom: Fixing PodSecurity Policy warnings for restricted environments 

Docs

@knative-prow knative-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 22, 2022
@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Base: 81.96% // Head: 81.96% // No change to project coverage 👍

Coverage data is based on head (f0657aa) compared to base (54174e3).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6533   +/-   ##
=======================================
  Coverage   81.96%   81.96%           
=======================================
  Files         235      235           
  Lines       11726    11726           
=======================================
  Hits         9611     9611           
  Misses       1644     1644           
  Partials      471      471           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@matzew
Copy link
Member Author

matzew commented Sep 22, 2022

/test upgrade-tests

 * replacing all with ALL
 * adding seccompProfile

to avoid warnings when deploying with restricted security policy

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
@matzew matzew changed the title WIP: Enhance PodSecurityPolicy for restricted namespace Enhance PodSecurityPolicy for restricted namespace Sep 22, 2022
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 22, 2022
@matzew
Copy link
Member Author

matzew commented Sep 22, 2022

/assign @evankanderson

Hey, Evan, can you take a look here? /cc @rhuss @lionelvillard

@matzew matzew changed the title Enhance PodSecurityPolicy for restricted namespace WIP: Enhance PodSecurityPolicy for restricted namespace Sep 22, 2022
@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 22, 2022
Copy link
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 23, 2022
@knative-prow
Copy link

knative-prow bot commented Sep 23, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: evankanderson, matzew

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 [evankanderson,matzew]

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

@matzew matzew changed the title WIP: Enhance PodSecurityPolicy for restricted namespace Enhance PodSecurityPolicy for restricted namespace Sep 23, 2022
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 23, 2022
@knative-prow knative-prow bot merged commit 3a69d31 into knative:main Sep 23, 2022
matzew added a commit to matzew/eventing-kafka-broker that referenced this pull request Sep 27, 2022
* adding/updating securityContext, as needed, to allow running as 'restricted' standard.
* adding seccompProfile

PR references from knative/eventing repo:
* knative/eventing#5863
* knative/eventing#6533

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
matzew added a commit to matzew/eventing-kafka-broker that referenced this pull request Sep 27, 2022
* adding/updating securityContext, as needed, to allow running as 'restricted' standard.
* adding seccompProfile

PR references from knative/eventing repo:
* knative/eventing#5863
* knative/eventing#6533

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
matzew added a commit to matzew/eventing-kafka-broker that referenced this pull request Oct 21, 2022
* adding/updating securityContext, as needed, to allow running as 'restricted' standard.
* adding seccompProfile

PR references from knative/eventing repo:
* knative/eventing#5863
* knative/eventing#6533

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
matzew added a commit to matzew/eventing-kafka-broker that referenced this pull request Oct 21, 2022
* adding/updating securityContext, as needed, to allow running as 'restricted' standard.
* adding seccompProfile

PR references from knative/eventing repo:
* knative/eventing#5863
* knative/eventing#6533

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
knative-prow bot pushed a commit to knative-extensions/eventing-kafka-broker that referenced this pull request Oct 21, 2022
* 🛂 Addressing PodSecurity violation warnings:

* adding/updating securityContext, as needed, to allow running as 'restricted' standard.
* adding seccompProfile

PR references from knative/eventing repo:
* knative/eventing#5863
* knative/eventing#6533

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* revert zipkin changes

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Update control-plane/config/post-install/500-storage-version-migrator.yaml

Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
knative-prow-robot pushed a commit to knative-prow-robot/eventing-kafka-broker that referenced this pull request Oct 24, 2022
* adding/updating securityContext, as needed, to allow running as 'restricted' standard.
* adding seccompProfile

PR references from knative/eventing repo:
* knative/eventing#5863
* knative/eventing#6533

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
knative-prow bot pushed a commit to knative-extensions/eventing-kafka-broker that referenced this pull request Oct 24, 2022
* passport_control: Addressing PodSecurity violation warnings:

* adding/updating securityContext, as needed, to allow running as 'restricted' standard.
* adding seccompProfile

PR references from knative/eventing repo:
* knative/eventing#5863
* knative/eventing#6533

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* revert zipkin changes

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Update control-plane/config/post-install/500-storage-version-migrator.yaml

Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Co-authored-by: Matthias Wessendorf <mwessend@redhat.com>
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
knative-prow bot pushed a commit that referenced this pull request Mar 3, 2023
…ent (#6788)

Fixes #6787

<!-- Please include the 'why' behind your changes if no issue exists -->

## Proposed Changes

<!-- Please categorize your changes:
- 🎁 Add new feature
- 🐛 Fix bug
- 🧹 Update or clean up current behavior
- 🗑️ Remove feature or internal logic
-->

- similar to our static manifests we set the required SC bits (see:
#6533), except SeccompProfile

### Pre-review Checklist

<!-- If these boxes are not checked, you will be asked to complete these
requirements or explain why they do not apply to your PR. -->

- [ ] **At least 80% unit test coverage**
- [ ] **E2E tests** for any new behavior
- [ ] **Docs PR** for any user-facing impact
- [ ] **Spec PR** for any new API feature
- [ ] **Conformance test** for any change to the spec

**Release Note**

<!--
:page_facing_up: If this change has user-visible impact, write a release
note in the block
below. Include the string "action required" if additional action is
required of
users switching to the new release, for example in case of a breaking
change.

Write as if you are speaking to users, not other Knative contributors.
If this
change has no user-visible impact, no release note is needed.
-->

```release-note
SecurityContext settings for ApiServerSource's Receive Adapter's container/deployment 
```


**Docs**

<!--
:book: If this change has user-visible impact, link to an issue or PR in
https://github.com/knative/docs.
-->

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
vishal-chdhry pushed a commit to vishal-chdhry/eventing that referenced this pull request Mar 14, 2023
…ent (knative#6788)

Fixes knative#6787

<!-- Please include the 'why' behind your changes if no issue exists -->

## Proposed Changes

<!-- Please categorize your changes:
- 🎁 Add new feature
- 🐛 Fix bug
- 🧹 Update or clean up current behavior
- 🗑️ Remove feature or internal logic
-->

- similar to our static manifests we set the required SC bits (see:
knative#6533), except SeccompProfile

### Pre-review Checklist

<!-- If these boxes are not checked, you will be asked to complete these
requirements or explain why they do not apply to your PR. -->

- [ ] **At least 80% unit test coverage**
- [ ] **E2E tests** for any new behavior
- [ ] **Docs PR** for any user-facing impact
- [ ] **Spec PR** for any new API feature
- [ ] **Conformance test** for any change to the spec

**Release Note**

<!--
:page_facing_up: If this change has user-visible impact, write a release
note in the block
below. Include the string "action required" if additional action is
required of
users switching to the new release, for example in case of a breaking
change.

Write as if you are speaking to users, not other Knative contributors.
If this
change has no user-visible impact, no release note is needed.
-->

```release-note
SecurityContext settings for ApiServerSource's Receive Adapter's container/deployment 
```


**Docs**

<!--
:book: If this change has user-visible impact, link to an issue or PR in
https://github.com/knative/docs.
-->

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
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. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restricted PodSecurity violation from deployments
2 participants