admissionplugins

package
v1.61.3 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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
	AddedInVersion   string
	RemovedInVersion string
}

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

func (*AdmissionPluginVersionRange) Contains

func (r *AdmissionPluginVersionRange) Contains(version string) (bool, error)

Contains returns true if the range contains the given version, false otherwise. The range contains the given version only if it's greater or equal than AddedInVersion (always true if AddedInVersion is empty), and less than RemovedInVersion (always true if RemovedInVersion is empty).

Jump to

Keyboard shortcuts

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