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

Pod Security Admission Controller #2369

Closed
EmirDanfoss opened this issue Dec 18, 2023 · 2 comments
Closed

Pod Security Admission Controller #2369

EmirDanfoss opened this issue Dec 18, 2023 · 2 comments

Comments

@EmirDanfoss
Copy link

Description

As you may be aware, Pod Security Policy has been removed since Kubernetes version v.1.25, where Pod Security Admission took it's place. It should be put in consideration to implement Pod Security Admission Controller as a resource.

References

https://kubernetes.io/docs/concepts/security/pod-security-admission/
https://kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/

YAML configuration

apiVersion: apiserver.config.k8s.io/v1
kind: AdmissionConfiguration
plugins:
- name: PodSecurity
  configuration:
    apiVersion: pod-security.admission.config.k8s.io/v1
    kind: PodSecurityConfiguration
    defaults:
      enforce: "privileged"
      enforce-version: "latest"
      audit: "privileged"
      audit-version: "latest"
      warn: "privileged"
      warn-version: "latest"
    exemptions:
      usernames: []
      runtimeClasses: []
      namespaces: []
@BBBmau
Copy link
Contributor

BBBmau commented Jan 9, 2024

Referencing this since this would be a starting point for creating the schema for PodSecurityAdmissionController https://kubernetes.io/docs/reference/config-api/apiserver-config.v1/#apiserver-config-k8s-io-v1-AdmissionPluginConfiguration

@BBBmau
Copy link
Contributor

BBBmau commented Jan 10, 2024

Hello! Thanks for opening this issue, after further investigation it was found that the previous PodSecurityPolicy resource was created through the k8s api. However with the introduction of PodSecurityAdmissionController, it's handled differently due to it being from the Config API. This means that creating a this resource would be done when first provisioning a cluster and not through kubectl or the provider.

TLDR; I'll be closing this issue since this resource can not be created in the provider due to it not existing in the k8s api, (exists in config api)

@BBBmau BBBmau closed this as completed Jan 10, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants