Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateClusterResourceTypeSpec ¶
func ValidateClusterResourceTypeSpec(spec *v1alpha1.ClusterResourceTypeSpec, basePath *field.Path) field.ErrorList
ValidateClusterResourceTypeSpec is the cluster-scoped sibling. The spec shape is currently identical to ResourceTypeSpec; this delegates through the shared inner function so future divergence (e.g. cluster-only fields) has a single place to extend.
func ValidateResourceTypeSpec ¶
func ValidateResourceTypeSpec(spec *v1alpha1.ResourceTypeSpec, basePath *field.Path) field.ErrorList
ValidateResourceTypeSpec performs CEL-aware validation on a ResourceTypeSpec. Returned errors carry full field paths under basePath; callers compose the list across multiple specs (e.g. when re-validating a ResourceRelease snapshot).
What this validates:
- Parameters / EnvironmentConfigs schemas parse as well-formed OpenAPI v3.
- Each resources[].template CEL expression compiles against the base env (no applied.* in scope).
- Each resources[].includeWhen returns bool against the base env.
- Each resources[].readyWhen returns bool against the env-with-applied, and any applied.<id> reference matches a declared resources[].id.
- Each outputs[] CEL expression (value / secretKeyRef.{name,key} / configMapKeyRef.{name,key}) compiles against env-with-applied with the same applied.<id> declaration check.
Types ¶
type SchemaOptions ¶
type SchemaOptions struct {
ParametersSchema *apiextschema.Structural
EnvironmentConfigsSchema *apiextschema.Structural
}
SchemaOptions provides schema configuration for resource CEL environment building. Mirrors internal/validation/component.SchemaOptions; defined here to keep the resource validation package self-contained.