1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
| err = s.Admission.ApplyTo() func (a *AdmissionOptions) ApplyTo(){ return a.GenericAdmission.ApplyTo() }
func (ps *Plugins) NewFromPlugins(){ for _, pluginName := range pluginNames { plugin, err := ps.InitPlugin(pluginName, pluginConfig, pluginInitializer) if err != nil { return nil, err } } }
func (ps *Plugins) InitPlugin(name string, config io.Reader, pluginInitializer PluginInitializer) (Interface, error){ plugin, found, err := ps.getPlugin(name, config) }
type Interface interface { Handles(operation Operation) bool }
func (ps *Plugins) getPlugin(name string, config io.Reader) (Interface, bool, error) { ps.lock.Lock() defer ps.lock.Unlock() f, found := ps.registry[name] }
command := app.NewAPIServerCommand()
s := options.NewServerRunOptions()
Admission: kubeoptions.NewAdmissionOptions()
RegisterAllAdmissionPlugins(options.Plugins)
func RegisterAllAdmissionPlugins(plugins *admission.Plugins){ }
var AllOrderedPlugins = []string{ admit.PluginName, autoprovision.PluginName, lifecycle.PluginName, exists.PluginName, scdeny.PluginName, antiaffinity.PluginName, podpreset.PluginName, limitranger.PluginName, serviceaccount.PluginName, noderestriction.PluginName, nodetaint.PluginName, alwayspullimages.PluginName, imagepolicy.PluginName, podsecuritypolicy.PluginName, podnodeselector.PluginName, podpriority.PluginName, defaulttolerationseconds.PluginName, podtolerationrestriction.PluginName, exec.DenyEscalatingExec, exec.DenyExecOnPrivileged, eventratelimit.PluginName, extendedresourcetoleration.PluginName, label.PluginName, setdefault.PluginName, storageobjectinuseprotection.PluginName, gc.PluginName, resize.PluginName, runtimeclass.PluginName, certapproval.PluginName, certsigning.PluginName, certsubjectrestriction.PluginName, defaultingressclass.PluginName,
mutatingwebhook.PluginName, validatingwebhook.PluginName, resourcequota.PluginName, deny.PluginName, }
|