Documentation
¶
Index ¶
- func AddValidator(schema apiextensionsv1.CustomResourceDefinition) error
- func AddWarning(warnings *[]string, path field.Path, message string, ...)
- func ApplySchemaDefaults(raw map[string]any) (map[string]any, error)
- func ApplySchemaDefaultsStr(yamlString string) (string, error)
- func CheckBaseURLImmutability(oldProvider BaseURLProvider, newProvider BaseURLProvider, reasons *[]string)
- func CheckURLImmutability(oldURL, newURL model.URL, allErrs *field.ErrorList, path *field.Path)
- func LoadSchemasForCRD(cfg *rest.Config, namespace, name string) error
- func ValidateBaseURL(baseURL string) error
- func ValidateIngressRouteURLsContainsBaseURL(urls model.IngressRouteURLs, baseURL model.URL, path *field.Path) *field.Error
- func ValidateIngressRouteURLsNotRemoved(oldURLs, newURLs model.IngressRouteURLs, allErrs *field.ErrorList, ...)
- func ValidateLabelsOnCreate(labels map[string]string) *field.Error
- func ValidateLabelsOnUpdate(oldLabels, newLabels map[string]string, allErrs *field.ErrorList)
- func ValidateSchema(yamlString string) error
- type BaseURLProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddValidator ¶
func AddValidator(schema apiextensionsv1.CustomResourceDefinition) error
AddSchema manually add an OpenAPI schema for a CRD
func AddWarning ¶
func AddWarning(warnings *[]string, path field.Path, message string, groupVersionKind schema.GroupVersionKind, name string)
AddWarning is a helper function so all warnings have the same formating
func ApplySchemaDefaultsStr ¶
func CheckBaseURLImmutability ¶
func CheckBaseURLImmutability(oldProvider BaseURLProvider, newProvider BaseURLProvider, reasons *[]string)
func CheckURLImmutability ¶
func LoadSchemasForCRD ¶
LoadSchemaForCRD extracts OpenAPI schemas for a specific CRD from a Kubernetes cluster
func ValidateBaseURL ¶
ValidateBaseURL Checks if the baseURL is https and has a path
func ValidateLabelsOnCreate ¶
ValidateLabelsOnCCreate Checks labels on creation
func ValidateLabelsOnUpdate ¶
ValidateLabelsOnUpdate Checks if the old and new label set are exactly the same
func ValidateSchema ¶
ValidateSchema validates incoming data against a OpenAPI specification
Types ¶
type BaseURLProvider ¶
type BaseURLProvider interface {
GetBaseUrl() string
}
Click to show internal directories.
Click to hide internal directories.