-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: add sane defaults to the pod and containers in pepr deployments #445
Conversation
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
✅ Deploy Preview for pepr-docs canceled.
|
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Testing this against DUBBD 0.15.0 looks good. All policies that are currently set to enforce are no longer showing failures. There is one remaining policy that is currently failing but it is currently only in
The policy is roughly based on this - https://kyverno.io/policies/other/disable-automountserviceaccounttoken/disable-automountserviceaccounttoken/ Looking into what is a reasonable way to address that I found this example: https://cert-manager.io/docs/installation/best-practice/#restrict-auto-mount-of-service-account-tokens I would be fine to move this along and create a follow on issue to address that particular policy because it seems a bit more involved. |
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
totally got tripped up testing locally b/c I was not able to create the |
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Retested this against a baseline DUBBD LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's discuss this after the break please
Status update? Looking forward to this fix so I can stop excluding the pepr-system namespace from my deployment's kyverno policies |
If we break this up, I don't have a problem with security context at all. I have an issue with the automount portion. Is that possible @cmwylie19? |
Yes, definitely possible. I think that the automount is taken care of by intentionally and purposefully assigning serviceAccounts to your resources and not using the defaults. @RothAndrew should be done today and I will look to get it reviewed tomorrow |
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Tested upgrade process manually details here -- #464 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pepr](https://togithub.com/defenseunicorns/pepr) | [`0.21.1` -> `0.22.0`](https://renovatebot.com/diffs/npm/pepr/0.21.1/0.22.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pepr/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pepr/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pepr/0.21.1/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pepr/0.21.1/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>defenseunicorns/pepr (pepr)</summary> ### [`v0.22.0`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.22.0) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.21.1...v0.22.0) #### Features Make `npx pepr deploy` wait recursively for deployments to be in a ready-state - feat: npx pepr dev does not wait for resources to be fully up by [@​schaeferka](https://togithub.com/schaeferka) in [defenseunicorns/pepr#435 Work on multi-versioned docs automation for the [Docs Site](https://pepr-docs.netlify.app/v0.21.1/) - feat: delete website by [@​btlghrants](https://togithub.com/btlghrants) in [defenseunicorns/pepr#459 Locking down the Pepr generated Kubernetes manifests with securityContexts - feat: add sane defaults to the pod and containers in pepr deployments by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#445 `npx pepr deploy --force` to override manager field in the underlying KFC implementation of [Server Side Apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/#conflicts) eat: force option on npx pepr deploy by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#480 (e2e style) Upgrade test of Kubernetes manifests - feat: pepr upgrade test by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#478 Force rollouts to Pepr's Admission and Watcher deployments by adding an annotation to podSpecs - feat: add timestamp to podSpec annotations force rollout on deployments by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#483 #### What's Changed - chore: update waitForDeployments by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#482 - chore: add error message for easier debugging by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#479 - chore: kubernetes slack channel for pepr and readme updates by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#467 - chore: test code coverage by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#468 - chore: bump the development-dependencies group with 2 updates by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#456 - chore: bump actions/dependency-review-action from 3.1.4 to 3.1.5 by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#458 - chore: bump the development-dependencies group with 2 updates by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#457 - chore: bump the development-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#466 - chore: bump the development-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#469 - chore: bump actions/checkout from 2 to 4 by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#472 - chore: bump actions/setup-node from 2 to 4 by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#470 - chore: bump codecov/codecov-action from 2 to 3 by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#471 - chore: bump the development-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#475 **Full Changelog**: defenseunicorns/pepr@v0.21.1...v0.22.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/defenseunicorns/uds-core). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pepr](https://togithub.com/defenseunicorns/pepr) | [`0.21.1` -> `0.22.0`](https://renovatebot.com/diffs/npm/pepr/0.21.1/0.22.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pepr/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pepr/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pepr/0.21.1/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pepr/0.21.1/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>defenseunicorns/pepr (pepr)</summary> ### [`v0.22.0`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.22.0) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.21.1...v0.22.0) #### Features Make `npx pepr deploy` wait recursively for deployments to be in a ready-state - feat: npx pepr dev does not wait for resources to be fully up by [@​schaeferka](https://togithub.com/schaeferka) in [defenseunicorns/pepr#435 Work on multi-versioned docs automation for the [Docs Site](https://pepr-docs.netlify.app/v0.21.1/) - feat: delete website by [@​btlghrants](https://togithub.com/btlghrants) in [defenseunicorns/pepr#459 Locking down the Pepr generated Kubernetes manifests with securityContexts - feat: add sane defaults to the pod and containers in pepr deployments by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#445 `npx pepr deploy --force` to override manager field in the underlying KFC implementation of [Server Side Apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/#conflicts) eat: force option on npx pepr deploy by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#480 (e2e style) Upgrade test of Kubernetes manifests - feat: pepr upgrade test by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#478 Force rollouts to Pepr's Admission and Watcher deployments by adding an annotation to podSpecs - feat: add timestamp to podSpec annotations force rollout on deployments by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#483 #### What's Changed - chore: update waitForDeployments by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#482 - chore: add error message for easier debugging by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#479 - chore: kubernetes slack channel for pepr and readme updates by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#467 - chore: test code coverage by [@​cmwylie19](https://togithub.com/cmwylie19) in [defenseunicorns/pepr#468 - chore: bump the development-dependencies group with 2 updates by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#456 - chore: bump actions/dependency-review-action from 3.1.4 to 3.1.5 by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#458 - chore: bump the development-dependencies group with 2 updates by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#457 - chore: bump the development-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#466 - chore: bump the development-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#469 - chore: bump actions/checkout from 2 to 4 by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#472 - chore: bump actions/setup-node from 2 to 4 by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#470 - chore: bump codecov/codecov-action from 2 to 3 by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#471 - chore: bump the development-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [defenseunicorns/pepr#475 **Full Changelog**: defenseunicorns/pepr@v0.21.1...v0.22.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/defenseunicorns/uds-core). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Description
Adds sane defaults to
securityContext
in Pepr's Admission and Watcher Deployment in the podSpec and containerSpec.Related Issue
Fixes #444
Relates to #
Type of change
Checklist before merging