This is a...
Problem:
I cannot find a list in the documentation of possible values for the API Server flag --runtime-config. Could this be provided, or instructions on how to generate the list documented?
According to the overview page "Full list of supported API groups can be seen in Kubernetes API reference.", but the top-level of all reference documentation does not clarify the list of possible strings.
Proposed Solution:
Document the available values in the documentation about the API Server flag
Or in the kube-apiserver docs
Page to Update:
https://kubernetes.io/docs/admin/cluster-management/#turn-on-or-off-an-api-version-for-your-cluster
Also here, although this is about the API, not the API Server.
https://kubernetes.io/docs/concepts/overview/kubernetes-api/
@hobti01 have you been able to find the valid values for --runtime-config? If you have an idea, I can help documenting it.
@ahmetb thanks for the offer. I have not located current possible values and do not have knowledge of the doc generation to propose a solution that will survive versions :(
My short-term need is identifying which, if any, values I need to use with versions 1.4, 1.5, 1.6 to enable features including init-containers.
However, the Right Thing is to have all possible values documented for each version.
Put me into the shame cube, I just ran into myself as well.
Currently I'm trying to figure out why my 1.8 cluster doesn't have api admissionregistration.k8s.io/v1alpha1.
I think one of these values will work, I'll try these:
api/all=true,api/admissionregistration.k8s.io/v1alpha1=trueapi/all=true,apis/admissionregistration.k8s.io/v1alpha1=true (apis because this)api/all=true,admissionregistration.k8s.io/v1alpha1=trueOK I found it. The api/all=true,admissionregistration.k8s.io/v1alpha1=true syntax works.
My understanding:
admissionregistration.k8s.io/v1alpha1 maybe because it's alphaapi/v1 expected.admissionregistration.k8s.io/v1alpha1 unexpected, because there's no api/ or apis/ prefix.=true enables it,=false disables it.@hobti01 I can help you incorporate these into the docs if you're interested.
--runtime-config mapStringString:
A set of key=value pairs that describe runtime configuration that may be passed to apiserver. apis/<groupVersion> key can be used to turn on/off specific api versions. apis/<groupVersion>/<resource> can be used to turn on/off specific resources. api/all and api/legacy are special keys to control all and legacy api versions respectively.
It sort of works if you treat apis as a placeholder (so, <api-name>). In your case:
<api-name>/<groupVersion>[/<resource>] with api-name=admissionregistration.k8s.io and groupVersion=v1alpha1 and no optional resource specified.This aligns with other docs, too:
Certain resources and API groups are enabled by default. You can enable or disable them by setting
--runtime-configon apiserver.--runtime-configaccepts comma separated values. For example, to disable batch/v1, set--runtime-config=batch/v1=false, to enable batch/v2alpha1, set--runtime-config=batch/v2alpha1
If this is the case, the flag help text and the paragraphs and the api groups pages could be clarified.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale
/remove-lifecycle stale
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
/remove-lifecycle stale
A possible solution is to have the doc generator summarizes the API groups it identified. The generator can put that into a separate section in the API reference doc generated.
/lifecycle frozen
It would be great to have it documented under which API resources lie within a specific version - something like https://matthewpalmer.net/kubernetes-app-developer/articles/kubernetes-apiversion-definition-guide.html
Is there any default value in --runtime-config? for example,it is all work file when I config '--runtime-config=authentication.k8s.io/v1beta1=true,authorization.k8s.io/v1beta1=true ' or '--runtime-config="" ' in kube-apiserver. so I was confused, how can I know which api support by default?
/kind feature
/priority backlog
Another gotcha with the current https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/ documentation: it mentions that --runtime-config mapStringString takes a "A set of key=value pairs" - but what is the syntax for that set? Comma-separated? Space-separated? JSON map?
I had to google, which led me to this issue here.
/triage accepted
/sig api-machinery
I think
Most helpful comment
OK I found it. The
api/all=true,admissionregistration.k8s.io/v1alpha1=truesyntax works.My understanding:
admissionregistration.k8s.io/v1alpha1maybe because it's alphaapi/v1expected.admissionregistration.k8s.io/v1alpha1unexpected, because there's noapi/orapis/prefix.=trueenables it,=falsedisables it.@hobti01 I can help you incorporate these into the docs if you're interested.