Skip to content

Conversation

kalexmills
Copy link
Contributor

@kalexmills kalexmills commented Sep 18, 2025

Closes #1271.

This PR documents how to enable deprecated APIs via runtimeConfig.

This ticket is a bit old, so I tested that this still works via kind v0.27.0, running images for k8s v1.29.14.

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
    image: kindest/node:v1.29.14@sha256:8703bd94ee24e51b778d5556ae310c6c0fa67d761fae6379c8e0bb480e6fea29
  - role: worker
    image: kindest/node:v1.29.14@sha256:8703bd94ee24e51b778d5556ae310c6c0fa67d761fae6379c8e0bb480e6fea29
runtimeConfig:
  "api/alpha": "true"

After creating the cluster I can see the ValidatingAdmissionPolicy is enabled at v1alpha1. In k8s v1.29, the v1alpha1 version of this resource was deprecated in favor of v1beta1 (link).

$  k api-resources | grep admission
mutatingwebhookconfigurations                    admissionregistration.k8s.io/v1         false        MutatingWebhookConfiguration
validatingadmissionpolicies                      admissionregistration.k8s.io/v1alpha1   false        ValidatingAdmissionPolicy
validatingadmissionpolicybindings                admissionregistration.k8s.io/v1alpha1   false        ValidatingAdmissionPolicyBinding
validatingwebhookconfigurations                  admissionregistration.k8s.io/v1         false        ValidatingWebhookConfiguration

Creating a cluster without the runtimeConfig above results in no ValidatingAdmissionPolicies being shown.

$  k api-resources | grep admission
mutatingwebhookconfigurations                  admissionregistration.k8s.io/v1   false        MutatingWebhookConfiguration
validatingwebhookconfigurations                admissionregistration.k8s.io/v1   false        ValidatingWebhookConfiguration
```

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 18, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @kalexmills!

It looks like this is your first PR to kubernetes-sigs/kind 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kind has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 18, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @kalexmills. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 18, 2025
@stmcginnis
Copy link
Contributor

Seems like a nice breadcrumb to include for someone looking for how to do this.

/ok-to-test
/lgtm

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 18, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 18, 2025
@kalexmills
Copy link
Contributor Author

/assign @BenTheElder

@kalexmills
Copy link
Contributor Author

/test

@k8s-ci-robot
Copy link
Contributor

@kalexmills: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

/test pull-kind-build
/test pull-kind-conformance-parallel-dual-stack-ipv4-ipv6
/test pull-kind-conformance-parallel-ga-only
/test pull-kind-conformance-parallel-ipv6
/test pull-kind-e2e-kubernetes
/test pull-kind-e2e-kubernetes-1-31
/test pull-kind-e2e-kubernetes-1-32
/test pull-kind-e2e-kubernetes-1-33
/test pull-kind-e2e-kubernetes-1-34
/test pull-kind-test
/test pull-kind-verify

The following commands are available to trigger optional jobs:

/test pull-kind-e2e-kubernetes-canary

Use /test all to run the following jobs that were automatically triggered:

pull-kind-build
pull-kind-test
pull-kind-verify

In response to this:

/test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kalexmills
Copy link
Contributor Author

Looks to me like all this is waiting for is approval. Sorry for the comment spam.

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve
thanks!

we may also have to update these docs soon for kubernetes/kubernetes#133697

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, kalexmills

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 9, 2025
@k8s-ci-robot k8s-ci-robot merged commit 84d3e10 into kubernetes-sigs:main Oct 9, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document howto enable deprecated k8s APIs

4 participants