blob: e55da95f95def848d9bf080d1300818dc9355250 [file] [log] [blame]
Matthias Andreas Benkard832a54e2019-01-29 09:27:38 +01001/*
2Copyright 2017 The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17package apiserver
18
19import (
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.
27type 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.
36type 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}