// enabledPluginNames makes use of RecommendedPluginOrder, DefaultOffPlugins,
// EnablePlugins, DisablePlugins fields
// to prepare a list of ordered plugin names that are enabled.
// TODO nilebox: remove this method once switched to RecommendedOptions
enabledPluginNames makes use of RecommendedPluginOrder, DefaultOffPlugins,
EnablePlugins, DisablePlugins fields
to prepare a list of ordered plugin names that are enabled.
TODO nilebox: remove this method once switched to RecommendedOptions
// enabledPluginNames makes use of RecommendedPluginOrder DefaultOffPlugins // EnablePlugins DisablePlugins fields // to prepare a list of ordered plugin names that are enabled . // TODO nilebox : remove this method once switched to RecommendedOptions
func enabledPluginNames(a *genericserveroptions.AdmissionOptions) []string {
	allOffPlugins := append(a.DefaultOffPlugins.List(), a.DisablePlugins...)
	disabledPlugins := sets.NewString(allOffPlugins...)
	enabledPlugins := sets.NewString(a.EnablePlugins...)
	disabledPlugins = disabledPlugins.Difference(enabledPlugins)
	resultPlugins := sets.NewString()
	orderedPlugins := []string{}
	for _, plugin := range a.RecommendedPluginOrder {
		if !disabledPlugins.Has(plugin) {
			orderedPlugins = append(orderedPlugins, plugin)
			resultPlugins.Insert(plugin)
		}
	}
	for plugin := range enabledPlugins {
		if !resultPlugins.Has(plugin) {
			orderedPlugins = append(orderedPlugins, plugin)
			resultPlugins.Insert(plugin)
		}
	}
	return orderedPlugins
}
func enabledPluginNames ( a * genericserveroptions . AdmissionOptions ) [ ] string { allOffPlugins := append ( a . DefaultOffPlugins . List ( ) , a . DisablePlugins ... ) disabledPlugins := sets . NewString ( allOffPlugins ... ) enabledPlugins := sets . NewString ( a . EnablePlugins ... ) disabledPlugins = disabledPlugins . Difference ( enabledPlugins ) resultPlugins := sets . NewString ( ) orderedPlugins := [ ] string { } for _ , plugin := range a . RecommendedPluginOrder { if ! disabledPlugins . Has ( plugin ) { orderedPlugins = append ( orderedPlugins , plugin ) resultPlugins . Insert ( plugin ) } } for plugin := range enabledPlugins { if ! resultPlugins . Has ( plugin ) { orderedPlugins = append ( orderedPlugins , plugin ) resultPlugins . Insert ( plugin ) } } return orderedPlugins }
enabledPluginNames makes use of RecommendedPluginOrder, DefaultOffPlugins,
EnablePlugins, DisablePlugins fields
to prepare a list of ordered plugin names that are enabled.
enabledPluginNames makes use of RecommendedPluginOrder DefaultOffPlugins EnablePlugins DisablePlugins fields to prepare a list of ordered plugin names that are enabled .
// First, add core plugins in a recommended order // Second, add all missing Service Catalog plugins // Note that those plugins are added in no specific order