Skip to content

k8s 1.34 baseline PodSecurity cannot use host field in lifecycle handlers #739

Description

@ImDevinC

Running on k8s 1.34, if you set a PodSecurity level of restricted or baseline, the host field is not allowed to be set in lifecycle handlers. The operator injects the following:

lifecycle:
  preStop:
    httpGet:
      host: localhost  # Violates baseline AND restricted PSA
      path: /quitquitquit
      port: 9091

There is no way to override this without overriding the entire container object, so this ends up leading to the operator not being able to start the pods up.

https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.34.md#bug-or-regression-6

The baseline and restricted pod security admission levels now block setting the host field on probe and lifecycle handlers (kubernetes/kubernetes#125271, @tssurya) [SIG Auth, Node and Testing]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions