Exemple #1
0
func init() {
	admission.RegisterPlugin("DenyEscalatingExec", func(config io.Reader) (admission.Interface, error) {
		return NewDenyEscalatingExec(), nil
	})

	// This is for legacy support of the DenyExecOnPrivileged admission controller.  Most
	// of the time DenyEscalatingExec should be preferred.
	admission.RegisterPlugin("DenyExecOnPrivileged", func(config io.Reader) (admission.Interface, error) {
		return NewDenyExecOnPrivileged(), nil
	})
}
func init() {
	admission.RegisterPlugin("OwnerReferencesPermissionEnforcement", func(config io.Reader) (admission.Interface, error) {
		return &gcPermissionsEnforcement{
			Handler: admission.NewHandler(admission.Create, admission.Update),
		}, nil
	})
}
Exemple #3
0
func init() {
	admission.RegisterPlugin("PodNodeSelector", func(config io.Reader) (admission.Interface, error) {
		// TODO move this to a versioned configuration file format.
		pluginConfig := readConfig(config)
		plugin := NewPodNodeSelector(pluginConfig.PodNodeSelectorPluginConfig)
		return plugin, nil
	})
}
Exemple #4
0
func init() {
	admission.RegisterPlugin("ResourceQuota",
		func(config io.Reader) (admission.Interface, error) {
			// NOTE: we do not provide informers to the registry because admission level decisions
			// does not require us to open watches for all items tracked by quota.
			registry := install.NewRegistry(nil, nil)
			return NewResourceQuota(registry, 5, make(chan struct{}))
		})
}
Exemple #5
0
func init() {
	admission.RegisterPlugin("ImagePolicyWebhook", func(config io.Reader) (admission.Interface, error) {
		newImagePolicyWebhook, err := NewImagePolicyWebhook(config)
		if err != nil {
			return nil, err
		}
		return newImagePolicyWebhook, nil
	})
}
Exemple #6
0
// WARNING: this feature is experimental and will definitely change.
func init() {
	admission.RegisterPlugin("InitialResources", func(config io.Reader) (admission.Interface, error) {
		// TODO: remove the usage of flags in favor of reading versioned configuration
		s, err := newDataSource(*source)
		if err != nil {
			return nil, err
		}
		return newInitialResources(s, *percentile, *nsOnly), nil
	})
}
Exemple #7
0
func init() {
	admission.RegisterPlugin(PluginName, func(config io.Reader) (admission.Interface, error) {
		plugin := NewPlugin(psp.NewSimpleStrategyFactory(), getMatchingPolicies, true)
		return plugin, nil
	})
}
Exemple #8
0
func init() {
	admission.RegisterPlugin("AlwaysAdmit", func(config io.Reader) (admission.Interface, error) {
		return NewAlwaysAdmit(), nil
	})
}
Exemple #9
0
func init() {
	admission.RegisterPlugin("NamespaceAutoProvision", func(config io.Reader) (admission.Interface, error) {
		return NewProvision(), nil
	})
}
Exemple #10
0
func init() {
	admission.RegisterPlugin(PluginName, func(config io.Reader) (admission.Interface, error) {
		serviceAccountAdmission := NewServiceAccount()
		return serviceAccountAdmission, nil
	})
}
Exemple #11
0
func init() {
	admission.RegisterPlugin("SecurityContextDeny", func(config io.Reader) (admission.Interface, error) {
		return NewSecurityContextDeny(), nil
	})
}
Exemple #12
0
func init() {
	admission.RegisterPlugin(PluginName, func(config io.Reader) (admission.Interface, error) {
		return NewLifecycle(sets.NewString(api.NamespaceDefault, api.NamespaceSystem))
	})
}
Exemple #13
0
func init() {
	admission.RegisterPlugin(PluginName, func(config io.Reader) (admission.Interface, error) {
		plugin := newPlugin()
		return plugin, nil
	})
}
Exemple #14
0
func init() {
	admission.RegisterPlugin("NamespaceExists", func(config io.Reader) (admission.Interface, error) {
		return NewExists(), nil
	})
}
Exemple #15
0
func init() {
	admission.RegisterPlugin("LimitPodHardAntiAffinityTopology", func(config io.Reader) (admission.Interface, error) {
		return NewInterPodAntiAffinity(), nil
	})
}
Exemple #16
0
func init() {
	admission.RegisterPlugin("LimitRanger", func(config io.Reader) (admission.Interface, error) {
		return NewLimitRanger(&DefaultLimitRangerActions{})
	})
}
Exemple #17
0
func init() {
	admission.RegisterPlugin("PersistentVolumeLabel", func(config io.Reader) (admission.Interface, error) {
		persistentVolumeLabelAdmission := NewPersistentVolumeLabel()
		return persistentVolumeLabelAdmission, nil
	})
}