Bug 1726029

Summary: Unable to configure admission plugin RunOnceDurationConfig in 4.1
Product: OpenShift Container Platform Reporter: Ravi Trivedi <travi>
Component: openshift-apiserverAssignee: Stefan Schimanski <sttts>
Status: CLOSED NOTABUG QA Contact: Xingxing Xia <xxia>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.1.zCC: aos-bugs, deads, jokerman, mdhanve, mfojtik, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-03 08:51:17 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:

Description Ravi Trivedi 2019-07-02 05:34:21 UTC
Description of problem:

In version 3.X we have the possibility of configuring below admission plugin:

```
admissionConfig:
  pluginConfig:
    RunOnceDuration:
      configuration:
        apiVersion: v1
        kind: RunOnceDurationConfig
        activeDeadlineSecondsOverride: 4800
```

As per 4.1 documentation [1], it is possible to configure this but in while creating it, we get the following error:

```
$ cat AdmissionConfiguration.yaml 
kind: AdmissionConfiguration                                                                                                                                                                                       
apiVersion: apiserver.k8s.io/v1alpha1                                                                                                                                                                              
plugins:                                                                                                                                                                                                           
- name: RunOnceDurationConfig                                                                                                                                                                                      
  activeDeadlineSecondsOverride: 3600                                                                                                                                                                              
$ 
$ oc create -f AdmissionConfiguration.yaml 
error: unable to recognize "AdmissionConfiguration.yaml": no matches for kind "AdmissionConfiguration" in version "apiserver.k8s.io/v1alpha1"
$
```

[1] - https://docs.openshift.com/container-platform/4.1/nodes/pods/nodes-pods-configuring.html#nodes-pods-configuring-run-once_nodes-pods-configuring

Version-Release number of selected component (if applicable):
Openshift Container Platform 4.1

How reproducible:
Always

Actual results:
Cannot configure admission plugin as it worked in version 3.x

Expected results:
Successful configuration of this admission plugin or suggestion of its alternative in OCP 4

Additional info:

- I understand that as part of the master config the default plugins that the apiserver would configure as per https://github.com/openshift/cluster-kube-apiserver-operator/blob/master/bindata/v4.1.0/kube-apiserver/defaultconfig.yaml

- Whether this would need to be handled as part of https://github.com/openshift/cluster-kube-apiserver-operator#configuration such that the node component would make it available as a feature?

- Any help/clarification regarding the configuration or the supportability of this plugin in OCP 4 would be great

Comment 1 Stefan Schimanski 2019-07-03 08:51:17 UTC
If we want this to be configurable, this needs a feature request via a Jira issue, and a team implementing this with a new config API field somewhere. A generic configuration for admission plugin does not exist intentioanlly.