admissionplugins

package
v1.87.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// PluginsInMigration is the list of plugins which can be specified in the Shoot spec if the constraints are satisfied. This is required to facilitate migration of
	// these plugins in some cases. For example, the "PodSecurityPolicy" plugin should be disabled in the Shoot spec for an upgrade from Kubernetes v1.24 to v1.25, but in v1.25
	// this plugin is not supported. gardener-apiserver will take care to clean this plugin from the spec. See https://github.com/gardener/gardener/pull/8212 for more details.
	PluginsInMigration = map[string]*semver.Constraints{
		"PodSecurityPolicy": versionutils.ConstraintK8sGreaterEqual125,
	}
)

Functions

func IsAdmissionPluginSupported

func IsAdmissionPluginSupported(plugin, version string) (bool, error)

IsAdmissionPluginSupported returns true if the given admission plugin is supported for the given Kubernetes version. An admission plugin is only supported if it's a known admission plugin and its version range contains the given Kubernetes version.

func ValidateAdmissionPlugins

func ValidateAdmissionPlugins(admissionPlugins []core.AdmissionPlugin, version string, fldPath *field.Path) field.ErrorList

ValidateAdmissionPlugins validates the given Kubernetes admission plugins against the given Kubernetes version.

Types

type AdmissionPluginVersionRange

type AdmissionPluginVersionRange struct {
	Forbidden bool
	Required  bool
	versionutils.VersionRange
}

AdmissionPluginVersionRange represents a version range of type [AddedInVersion, RemovedInVersion).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL