Matthias Andreas Benkard | 832a54e | 2019-01-29 09:27:38 +0100 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2017 The Kubernetes Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package apiserver |
| 18 | |
| 19 | import ( |
| 20 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 21 | "k8s.io/apimachinery/pkg/runtime" |
| 22 | ) |
| 23 | |
| 24 | // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
| 25 | |
| 26 | // AdmissionConfiguration provides versioned configuration for admission controllers. |
| 27 | type AdmissionConfiguration struct { |
| 28 | metav1.TypeMeta |
| 29 | |
| 30 | // Plugins allows specifying a configuration per admission control plugin. |
| 31 | // +optional |
| 32 | Plugins []AdmissionPluginConfiguration |
| 33 | } |
| 34 | |
| 35 | // AdmissionPluginConfiguration provides the configuration for a single plug-in. |
| 36 | type AdmissionPluginConfiguration struct { |
| 37 | // Name is the name of the admission controller. |
| 38 | // It must match the registered admission plugin name. |
| 39 | Name string |
| 40 | |
| 41 | // Path is the path to a configuration file that contains the plugin's |
| 42 | // configuration |
| 43 | // +optional |
| 44 | Path string |
| 45 | |
| 46 | // Configuration is an embedded configuration object to be used as the plugin's |
| 47 | // configuration. If present, it will be used instead of the path to the configuration file. |
| 48 | // +optional |
| 49 | Configuration *runtime.Unknown |
| 50 | } |