Skip to content

1.3.1

Latest

Choose a tag to compare

@github-actions github-actions released this 18 Nov 19:39
302cfa7

What's Changed

Fixes

  • Containers now run under Pod Security's baseline and restricted levels. This covers clusters that enforce a level by default, such as Talos (baseline), and Portainer's Pod Security Standards policy.
    • NET_RAW is no longer added to the pod. Docker grants it by default, so adding it changes nothing, but baseline refuses a pod that adds it. Portainer's create form added it to every container. It is still added if it was dropped first (--cap-drop ALL --cap-add NET_RAW). Docker's other default capabilities are added as before.
    • Every pod, including a Swarm service's, uses the runtime's default seccomp profile (RuntimeDefault), as Docker applies its own default profile. --security-opt seccomp=unconfined still turns it off.
    • A numeric user other than root (-u 1000) also sets runAsNonRoot, which restricted requires.
    • Containers created by 1.3.0 are updated in place. On start, d2k updates the pods of stopped containers. A running container is updated the next time it starts, so it isn't restarted. A Swarm service is updated the next time docker stack deploy runs.
  • A container the namespace's Pod Security level refuses is refused when it's created, in Docker terms.
    • d2k checks each container with a server-side dry run before it creates anything. A refused container gets a 403 that names the Docker flag and the compose key to change, followed by Kubernetes' reason. Previously the container was created and then never started.
    • A container created before the level was raised is refused in the same way when it starts, and is left stopped.
    • Under a level that only warns (pod-security.kubernetes.io/warn), the container is still created, and docker run and docker compose show the warning.
    • Refusals from other admission policies (Kyverno, Gatekeeper, ValidatingAdmissionPolicy) are passed through as Kubernetes words them.
    • A refused container no longer leaves behind the named volumes it would have created.
  • docker info reports the namespace's Pod Security level.
    • Security Options lists name=seccomp,profile=builtin and name=pod-security,profile=<level>.
    • Under baseline or restricted, a warning says what the level refuses and which Docker settings comply.
    • d2k also logs the level at start-up. It rechecks the level at most a minute after the namespace's labels change.

Chore

  • Go upgraded from 1.26.10 to 1.26.11.
  • Docs: the README has a new Pod Security section with a table of each level and a compose example for restricted. Installing by hand now starts with kubectl apply --dry-run=server, to check that the cluster accepts d2k's own pod.
  • Tests: added test/e2e/pod-security.sh, which runs d2k under baseline and restricted.

Full Changelog: 1.3.0...1.3.1