validation

package
v1.26.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 15 Imported by: 75

Documentation

Index

Constants

View Source
const SysctlContainSlashPatternFmt string = "(" + apivalidation.SysctlSegmentFmt + "[\\./])*" + sysctlPatternSegmentFmt

SysctlContainSlashPatternFmt is a regex that contains a slash used for matching valid sysctl patterns.

Variables

View Source
var ValidatePodSecurityPolicyName = apimachineryvalidation.NameIsDNSSubdomain

ValidatePodSecurityPolicyName can be used to check whether the given pod security policy name is valid. Prefix indicates this name will be used as part of generation, in which case trailing dashes are allowed.

Functions

func IsValidSysctlPattern added in v1.11.0

func IsValidSysctlPattern(name string) bool

IsValidSysctlPattern checks if name is a valid sysctl pattern. i.e. matches sysctlContainSlashPatternRegexp. More info:

https://man7.org/linux/man-pages/man8/sysctl.8.html
https://man7.org/linux/man-pages/man5/sysctl.d.5.html

func ValidatePodDisruptionBudget

func ValidatePodDisruptionBudget(pdb *policy.PodDisruptionBudget, opts PodDisruptionBudgetValidationOptions) field.ErrorList

ValidatePodDisruptionBudget validates a PodDisruptionBudget and returns an ErrorList with any errors.

func ValidatePodDisruptionBudgetSpec

func ValidatePodDisruptionBudgetSpec(spec policy.PodDisruptionBudgetSpec, opts PodDisruptionBudgetValidationOptions, fldPath *field.Path) field.ErrorList

ValidatePodDisruptionBudgetSpec validates a PodDisruptionBudgetSpec and returns an ErrorList with any errors.

func ValidatePodDisruptionBudgetStatusUpdate added in v1.21.0

func ValidatePodDisruptionBudgetStatusUpdate(status, oldStatus policy.PodDisruptionBudgetStatus, fldPath *field.Path, apiVersion schema.GroupVersion) field.ErrorList

ValidatePodDisruptionBudgetStatusUpdate validates a PodDisruptionBudgetStatus and returns an ErrorList with any errors.

func ValidatePodSecurityPolicy added in v1.11.0

func ValidatePodSecurityPolicy(psp *policy.PodSecurityPolicy) field.ErrorList

ValidatePodSecurityPolicy validates a PodSecurityPolicy and returns an ErrorList with any errors.

func ValidatePodSecurityPolicySpec added in v1.11.0

func ValidatePodSecurityPolicySpec(spec *policy.PodSecurityPolicySpec, fldPath *field.Path) field.ErrorList

ValidatePodSecurityPolicySpec validates a PodSecurityPolicySpec and returns an ErrorList with any errors.

func ValidatePodSecurityPolicySpecificAnnotations added in v1.11.0

func ValidatePodSecurityPolicySpecificAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList

ValidatePodSecurityPolicySpecificAnnotations validates annotations and returns an ErrorList with any errors.

func ValidatePodSecurityPolicyUpdate added in v1.11.0

func ValidatePodSecurityPolicyUpdate(old *policy.PodSecurityPolicy, new *policy.PodSecurityPolicy) field.ErrorList

ValidatePodSecurityPolicyUpdate validates a PSP for updates.

Types

type PodDisruptionBudgetValidationOptions added in v1.26.0

type PodDisruptionBudgetValidationOptions struct {
	AllowInvalidLabelValueInSelector bool
}

Jump to

Keyboard shortcuts

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