Documentation ¶
Overview ¶
Package metadata provides validation checks for errors in Resource metadata
These checks are specifically on the `metadata` fields, which are defined for all Resources. Validators MAY be triggered by Group/Version/Kind, but SHOULD NOT access Kind-specific fields. Kinds with validation specific to their fields SHOULD have their own dedicated package.
Index ¶
- Constants
- func IllegalAnnotationDefinitionError(resource client.Object, annotations []string) status.Error
- func IllegalLabelDefinitionError(resource client.Object, labels []string) status.Error
- func IllegalMetadataNamespaceDeclarationError(resource client.Object, expectedNamespace string) status.Error
- func IllegalTopLevelNamespaceError(resource client.Object) status.Error
- func InvalidNamespaceNameError(resource client.Object, expected string) status.Error
Constants ¶
const IllegalAnnotationDefinitionErrorCode = "1010"
IllegalAnnotationDefinitionErrorCode is the error code for IllegalAnnotationDefinitionError
const IllegalLabelDefinitionErrorCode = "1011"
IllegalLabelDefinitionErrorCode is the error code for IllegalLabelDefinitionError
const IllegalMetadataNamespaceDeclarationErrorCode = "1009"
IllegalMetadataNamespaceDeclarationErrorCode is the error code for IllegalNamespaceDeclarationError
const IllegalTopLevelNamespaceErrorCode = "1019"
IllegalTopLevelNamespaceErrorCode is the error code for IllegalTopLevelNamespaceError
const InvalidNamespaceNameErrorCode = "1020"
InvalidNamespaceNameErrorCode is the error code for InvalidNamespaceNameError
Variables ¶
This section is empty.
Functions ¶
func IllegalAnnotationDefinitionError ¶
IllegalAnnotationDefinitionError represents a set of illegal annotation definitions.
func IllegalLabelDefinitionError ¶
IllegalLabelDefinitionError represent a set of illegal label definitions.
func IllegalMetadataNamespaceDeclarationError ¶
func IllegalMetadataNamespaceDeclarationError(resource client.Object, expectedNamespace string) status.Error
IllegalMetadataNamespaceDeclarationError represents illegally declaring metadata.namespace
func IllegalTopLevelNamespaceError ¶
IllegalTopLevelNamespaceError reports that there may not be a Namespace declared directly in namespaces/ Error implements error
Types ¶
This section is empty.