resource

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

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.

Jump to

Keyboard shortcuts

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