MCPcopy Index your code
hub / github.com/appvia/psp-migration

github.com/appvia/psp-migration @v1.37.131

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.37.131 ↗ · + Follow
19 symbols 46 edges 9 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Kubernetes Pod Security Policy Migration

PodSecurityPolicy is dead, long live ???

CI GitHub issues GitHub forks GitHub stars GitHub contributors GitHub last commit Appvia Community Slack GitHub license

Please see our blog post PodSecurityPolicy is Dead, Long Live...?!


🚨 🚧 UNDER ACTIVE DEVELOPMENT (pull requests welcome) 🚧 🚨

This project is striving to recreate common Pod Security Policy configuration in other common kubernetes policy engines, to better inform the consumer how to migrate before it is removed in Kubernetes 1.25

Installation

Download the right binary for your OS and Arch from the latest release

Or you can try it now in your browser!

Usage

The app takes PodSecurityPolicy on stdIn and output your policy engine of choice on stdOut, you select the policy engine with the --engine=<engine>:

$ cat psp.yaml | ./psp-migration --engine=gatekeeper > output.yaml
# or if you're feeling brave you can pipe it back and forth to the kubernetes api
$ kubectl get -o yaml mypodsecuritypolicy | ./psp-migration -e kubewarden | kubectl apply -f -

Known limitations

  • Generated policy will probably be pretty verbose
  • Generated policy will probably have some unintended side effects, please create an issue when this happens
  • Only takes one PodSecurityPolicy at a time
  • Generated policy may conflict with other policies

Features

:warning: This table is manually updated, see the automated test suites results :warning:

Note: ❌ Doesn't mean it doesn't work, it just means the test is currently failing, in most cases the test needs to be updated

PSP field Pod Security Policy Pod Security Standard (baseline) Gatekeeper Kyverno Kubewarden k-rail
privileged ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
hostPID ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
hostIPC ✔️ ✔️ ✔️ ✔️ ✔️
hostNetwork ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
hostPorts ✔️ ✔️ ✔️ ✔️
volumes ✔️ ✔️ ✔️ ✔️ ✔️
allowedHostPaths ✔️ ✔️ ✔️ ✔️
allowedFlexVolumes ✔️ ✔️ ✔️ ✔️
readOnlyRootFilesystem ✔️ ✔️ ✔️ ✔️
runAsUser ✔️ ✔️ ✔️ ✔️
runAsGroup ✔️ ✔️ ✔️ ✔️
supplementalGroups ✔️ ✔️ ✔️ ✔️
fsgroup ✔️ ✔️ ✔️ ✔️
allowPrivilegeEscalation ✔️ ✔️ ✔️ ✔️
defaultAllowPrivilegeEscalation ✔️ ✔️ ✔️ ✔️
allowedCapabilities ✔️ ✔️ ✔️ ✔️
defaultAddCapabilities ✔️ ✔️ ✔️ ✔️
requiredDropCapabilities ✔️ ✔️ ✔️ ✔️
seLinux ✔️ ✔️ ✔️ ✔️ [❌](./tests/seLinux

Core symbols most depended-on inside this repo

addRule
called by 25
src/kyverno.ts
wrap_validate_spec
called by 11
src/kyverno.ts
optional_ephemeral_init_container_copy
called by 5
src/kyverno.ts
parse
called by 2
src/index.ts
transform
called by 2
src/index.ts
transform_gatekeeper
called by 1
src/gatekeeper.ts
process
called by 1
src/browser.ts
transform_kyverno
called by 1
src/kyverno.ts

Shape

Function 15
Class 2
Method 2

Languages

TypeScript100%

Modules by API surface

src/kyverno.ts7 symbols
src/index.ts3 symbols
src/kubewarden.ts2 symbols
src/gatekeeper.ts2 symbols
src/browser.ts2 symbols
webpack.config.js1 symbols
src/__tests__/kyverno.spec.ts1 symbols
src/__tests__/index.spec.ts1 symbols

For agents

$ claude mcp add psp-migration \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact