Bug 1452092
| Summary: | no kind "AdmissionConfiguration" is registered for version "apiserver.k8s.io/v1alpha1" | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | DeShuai Ma <dma> |
| Component: | Node | Assignee: | Stefan Schimanski <sttts> |
| Status: | CLOSED ERRATA | QA Contact: | DeShuai Ma <dma> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.6.0 | CC: | aos-bugs, jokerman, mmccomas, smunilla, wmeng |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://github.com/openshift/origin/pull/14272 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-10 05:24:06 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
The old format is actually supposed to work, but doesn't due to a bug. Here is a PR to allow legacy admission plugin config without a Kind: https://github.com/openshift/origin/pull/14272 Fixed on origin master. Verified on openshift v3.6.106
1. Configure PodNodeSelector admission controller like below and it works well.
admissionConfig:
pluginConfig:
PodNodeSelector:
location: admission-control-config-file.cfg
# cat admission-control-config-file.cfg
podNodeSelectorPluginConfig:
clusterDefaultNodeSelector: region=west
2. If admission-control-config-file.cfg contain AdmissionConfiguration restart master service, no error
admissionConfig:
pluginConfig:
PodNodeSelector:
location: admission-control-config-file.cfg
# cat admission-control-config-file.cfg
apiVersion: apiserver.k8s.io/v1alpha1
kind: AdmissionConfiguration
plugins:
- name: "PodNodeSelector"
configuration:
apiVersion: podnodeselector.admission.k8s.io/v1alpha1
kind: Configuration
podNodeSelectorPluginConfig:
clusterDefaultNodeSelector: region=west
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1716 |
Description of problem: In ocp35 we can configure PodNodeSelector admission controller in master-config.yaml like below: admissionConfig: pluginConfig: PodNodeSelector: location: admission-control-config-file.cfg # cat admission-control-config-file.cfg podNodeSelectorPluginConfig: clusterDefaultNodeSelector: region=west But now in ocp36(v3.6.74), this failed with error: "start_master.go:112] Object 'Kind' is missing in '{"podNodeSelectorPluginConfig":{"clusterDefaultNodeSelector":"region=west"}}'" I notice there is a pr to support versioned configuration: https://github.com/kubernetes/kubernetes/pull/39109 According to the new file type, I try to configure like: apiVersion: apiserver.k8s.io/v1alpha1 kind: AdmissionConfiguration plugins: - name: "PodNodeSelector:" configuration: apiVersion: podnodeselector.admission.k8s.io/v1alpha1 kind: Configuration podNodeSelectorPluginConfig: clusterDefaultNodeSelector: region=west or apiVersion: apiserver.k8s.io/v1alpha1 kind: AdmissionConfiguration plugins: - name: "PodNodeSelector:" configuration: apiVersion: podnodeselector.admission.k8s.io/v1alpha1 kind: Configuration clusterDefaultNodeSelector: region=west But both I get another error: start_master.go:112] no kind "AdmissionConfiguration" is registered for version "apiserver.k8s.io/v1alpha1" Version-Release number of selected component (if applicable): openshift v3.6.74 kubernetes v1.6.1+5115d708d7 etcd 3.1.0 How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: