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

add ValidatingAdmissionPolicy resource from k8s v1.28.0 #2250

Open
BBBmau opened this issue Aug 30, 2023 · 7 comments · May be fixed by #2576
Open

add ValidatingAdmissionPolicy resource from k8s v1.28.0 #2250

BBBmau opened this issue Aug 30, 2023 · 7 comments · May be fixed by #2576

Comments

@BBBmau
Copy link
Contributor

BBBmau commented Aug 30, 2023

Description

https://kubernetes.io/blog/2023/08/15/kubernetes-v1-28-release/#validatingadmissionpolicies-graduate-to-beta
https://kubernetes.io/docs/reference/access-authn-authz/validating-admission-policy/

with ValidatingAdmissionPolicy being moved to the beta state in v1.28.0 we should consider whether this resource should be a high priority or wait until it has reached the stable state.

YAML configuration

apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingAdmissionPolicy
metadata:
  name: "demo-policy.example.com"
spec:
  failurePolicy: Fail
  matchConstraints:
    resourceRules:
    - apiGroups:   ["apps"]
      apiVersions: ["v1"]
      operations:  ["CREATE", "UPDATE"]
      resources:   ["deployments"]
  validations:
    - expression: "object.spec.replicas <= 5"

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@BBBmau
Copy link
Contributor Author

BBBmau commented Jan 10, 2024

Referencing https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#validatingadmissionpolicy-v1beta1-admissionregistration-k8s-io

Since this would be the schema for the ValidatingAdmissionPolicy resource

@appilon appilon assigned appilon and unassigned appilon Jan 15, 2024
@appilon
Copy link
Contributor

appilon commented Jan 17, 2024

The provider typically does not implement resources where there is a feature gate that defaults to false. This is because cloud provisioned clusters generally do not have the option to set feature gates to true. Unfortunately the feature gate ValidatingAdmissionPolicy defaults to false as of v1.28, see docs.

@skraga
Copy link

skraga commented Jul 5, 2024

@appilon according to the doc that you've sharedValidatingAdmissionPolicy defaults to true nowadays (starting from k8s 1.30 is in GA)

@BBBmau
Copy link
Contributor Author

BBBmau commented Jul 5, 2024

@appilon according to the doc that you've sharedValidatingAdmissionPolicy defaults to true nowadays (starting from k8s 1.30 is in GA)

Thanks for the update! Marking this as good first issue / help wanted @skraga you're welcome to open a PR if interested. Refer to CONTRIBUTING.md

@BBBmau
Copy link
Contributor Author

BBBmau commented Aug 12, 2024

interested in this one @aayushsss1? @JaylonmcShan03 can review once the PR is open.

@aayushsss1
Copy link
Contributor

Hey @BBBmau thanks, I can take this up!

@BBBmau BBBmau added this to the v2.23.0 milestone Aug 14, 2024
@aayushsss1 aayushsss1 linked a pull request Aug 28, 2024 that will close this issue
2 tasks
@BBBmau BBBmau added the blocked label Sep 25, 2024
@BBBmau BBBmau modified the milestones: v2.33.0, v3.0.0 Sep 25, 2024
@BBBmau
Copy link
Contributor Author

BBBmau commented Sep 25, 2024

marked as blocked and moved to v3.0.0 since this requires a k8s version bump which will be addressed in the next major version release of the provider.

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