You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is be enabled by default for beta and stable versions, or disabled by default
822
-
for alpha versions.
821
+
is be enabled by default for stable versions, or disabled by default
822
+
for alpha and beta versions.
823
823
* You must add the new version to
824
824
`pkg/apis/group_name/install/install.go` (for example, [pkg/apis/apps/install/install.go](https://github.com/kubernetes/kubernetes/blob/v1.21.2/pkg/apis/apps/install/install.go)).
825
825
* You must add the new version to
@@ -845,6 +845,13 @@ local-up-cluster.sh, kind, etc) and running `kubectl get
are also good for testing the full CRUD lifecycle along with the controller.
848
+
* To write integration tests for beta APIs you will need to selectively enable the resources you need.
849
+
You can do this using [cmd/kube-apiserver/app/testing/testserver.go#StartTestServerOrDie](https://github.com/kubernetes/kubernetes/blob/2b1b849d6a8bdeb7dc0807438cfd0ff2a9d752c1/cmd/kube-apiserver/app/testing/testserver.go#L325).
850
+
You will then pass the `--runtime-config=groupname/v1beta1/resourcename` as a flag to enable the beta API.
851
+
* For beta APIs, e2e tests need to perform discovery checks against the kube-apiserver to determine if
852
+
a beta API is enabled or not. See [test/e2e/apimachinery/discovery.go](https://github.com/kubernetes/kubernetes/blob/2b1b849d6a8bdeb7dc0807438cfd0ff2a9d752c1/test/e2e/apimachinery/discovery.go#L50)
853
+
for an example.
854
+
There is a [prow dashboard for beta API jobs](https://prow.k8s.io/?job=*betaapis*) to watch your results.
0 commit comments