GraphRevision
internal.kro.run / v1alpha1
apiVersion: internal.kro.run/v1alpha1
kind: GraphRevision
metadata:
name: example
apiVersion
string
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
kind
string
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata
object
spec object
GraphRevisionSpec defines the desired state of GraphRevision.
It captures an immutable snapshot of the source ResourceGraphDefinition.
revision
integer required
Revision is a monotonic revision number assigned per ResourceGraphDefinition name.
format:
int64minimum:
1snapshot object required
Snapshot is an immutable capture of the source ResourceGraphDefinition
identity and spec at the time this revision was issued.
generation
integer required
Generation is the metadata.generation of the source ResourceGraphDefinition
when this revision was issued. Informational only.
format:
int64
name
string required
Name identifies the source ResourceGraphDefinition by name.
This is the authoritative identity for adoption decisions.
spec object required
Spec is an immutable copy of the source ResourceGraphDefinition spec.
This includes user-authored schema and resource templates.
resources []object
Resources is the list of Kubernetes resources that will be created and managed
for each instance. Resources can reference each other using CEL expressions,
creating a dependency graph that determines creation order.
externalRef object
ExternalRef references an existing resource in the cluster instead of creating one.
This is useful for reading existing resources and using their values in other resources.
Exactly one of template or externalRef must be provided.
apiVersion
string required
APIVersion is the API version of the external resource.
Example: "v1" for core resources, "apps/v1" for Deployments.
kind
string required
Kind is the kind of the external resource.
Example: "Service", "ConfigMap", "Deployment".
metadata object required
Metadata contains the name and optional namespace of the external resource.
name
string
Name is the name of the external resource to reference.
Mutually exclusive with Selector.
minLength:
1
namespace
string
Namespace is the namespace of the external resource.
For single external refs (Name), defaults to the instance's namespace.
For external collections (Selector), empty means list across all namespaces.
selector
object
Selector is a label selector for collection external references.
When set, all resources matching the selector are included.
The selector may be a literal Kubernetes [metav1.LabelSelector] object or a full CEL
expression that resolves to one at reconcile time.
Mutually exclusive with Name.
forEach
[]object
ForEach expands this resource into a collection of resources.
Each entry binds a variable name to a CEL expression that evaluates to an array.
kro creates one resource instance for each element in the array.
With multiple entries, kro creates the cartesian product of all combinations.
Use the variable directly in template expressions (e.g., ${region}).
Example: [{"region": "${schema.spec.regions}"}, {"tier": "${schema.spec.tiers}"}]
id
string required
ID is a unique identifier for this resource within the ResourceGraphDefinition.
It is used to reference this resource in CEL expressions from other resources.
Example: "deployment", "service", "configmap".
includeWhen
[]string
IncludeWhen is a list of CEL expressions that determine whether this resource should be created.
All expressions must evaluate to true for the resource to be included.
If not specified, the resource is always included.
Expressions may reference schema fields and/or fields in other resources in the RGD. They are
re-evaluated during reconciliation, so resources may be created later or
pruned later as conditions change.
Each entry must be a single standalone CEL expression wrapped in ${...}.
Example: ["${schema.spec.enableMonitoring == true}", "${network.status.ready == true}"]
readyWhen
[]string
ReadyWhen is a list of CEL expressions that determine when this resource is considered ready.
All expressions must evaluate to true for the resource to be ready.
If not specified, the resource is considered ready when it exists.
Each entry must be a single standalone CEL expression wrapped in ${...}.
Examples:
- Single resource: ["${database.status.phase == 'Running'}", "${database.status.readyReplicas > 0}"]
- Collection: ["${each.status.phase == 'Running'}"]
template
object
Template is the Kubernetes resource manifest to create.
It can contain CEL expressions (using ${...} syntax) that reference other resources.
Exactly one of template or externalRef must be provided.
schema object required
Schema defines the structure of instances created from this ResourceGraphDefinition.
It specifies the API version, kind, and fields (spec/status) for the generated CRD.
Use SimpleSchema syntax to define the instance schema concisely.
additionalPrinterColumns []object
AdditionalPrinterColumns defines additional printer columns
that will be passed down to the created CRD. If set, no
default printer columns will be added to the created CRD,
and if default printer columns need to be retained, they
need to be added explicitly.
description
string
description is a human readable description of this column.
format
string
format is an optional OpenAPI type definition for this column. The 'name' format is applied
to the primary identifier column to assist in clients identifying column is the resource name.
See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
jsonPath
string required
jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against
each custom resource to produce the value for this column.
name
string required
name is a human readable name for the column.
priority
integer
priority is an integer defining the relative importance of this column compared to others. Lower
numbers are considered higher priority. Columns that may be omitted in limited space scenarios
should be given a priority greater than 0.
format:
int32
type
string required
type is an OpenAPI type definition for this column.
See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
apiVersion
string required
APIVersion is the version identifier for the generated CRD.
Must follow Kubernetes versioning conventions (v1, v1alpha1, v1beta1, etc.).
This field is immutable after creation.
Example: "v1alpha1", "v1", "v2beta1"
pattern:
^v[0-9]+(alpha[0-9]+|beta[0-9]+)?$
categories
[]string
Categories is a list of grouped resources this custom resource belongs to.
Resources in a category can be retrieved together with `kubectl get <category>`.
Example: ["kro"] makes instances appear in `kubectl get kro`.
maxItems:
32
group
string
Group is the API group for the generated CRD. Together with APIVersion and Kind,
it forms the complete GVK (Group-Version-Kind) identifier.
If omitted, defaults to "kro.run". This field is immutable after creation.
Example: "mycompany.io", "databases.example.com"
kind
string required
Kind is the name of the custom resource type that will be created.
This becomes the kind field of the generated CRD and must be a valid Kubernetes kind name
(PascalCase, starting with a capital letter). This field is immutable after creation.
Example: "WebApplication", "Database", "MicroService"
pattern:
^[A-Z][a-zA-Z0-9]{0,62}$metadata object
Metadata to apply to the generated CRD
annotations
object
Annotations to apply to the generated CRD
labels
object
Labels to apply to the generated CRD
scope
string required
Scope determines whether the generated instance CRD is Namespaced or Cluster scoped.
Defaults to Namespaced to preserve existing behaviour. This field is immutable after creation.
enum:
Namespaced, Cluster
shortNames
[]string
ShortNames are aliases for the generated CRD that can be used with kubectl.
Example: ["wa", "webapp"] allows `kubectl get wa` or `kubectl get webapp` instead of `kubectl get webapplications`.
maxItems:
32
spec
object
Spec defines the schema for the instance's spec section using SimpleSchema syntax.
This becomes the OpenAPI schema for instances of the generated CRD.
Use SimpleSchema's concise syntax to define fields, types, defaults, and validations.
Markers are space-separated after a single "|" separator.
Example: {"replicas": "integer | default=1 minimum=1 maximum=10"}
status
object
Status defines the schema for the instance's status section using SimpleSchema syntax.
Unlike spec, status fields use CEL expressions to project values from underlying resources.
This allows you to surface important information from managed resources at the instance level.
Example: {"connectionName": "${database.status.connectionName}", "endpoint": "${service.status.loadBalancer.ingress[0].hostname}"}
types
object
Types is a map of custom type definitions that can be referenced in the Spec.
This allows you to define reusable complex types using SimpleSchema syntax.
Reference custom types in Spec using the type name.
Example: {"Server": {"host": "string", "port": "integer"}}
status object
GraphRevisionStatus defines the observed API state of GraphRevision.
Internal runtime states such as Pending, Active, and Failed live in
kro's in-memory revision registry and are not persisted here.
conditions []object
Conditions represent the latest available observations of the GraphRevision state.
GraphRevision exposes GraphVerified plus aggregate Ready.
lastTransitionTime
string
Last time the condition transitioned from one status to another.
format:
date-time
message
string
A human-readable message indicating details about the transition.
observedGeneration
integer
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format:
int64minimum:
0
reason
string
The reason for the condition's last transition.
status
string required
Status of the condition, one of True, False, Unknown.
type
string required
Type is the type of the Condition
resources []object
Resources provides detailed information about each resource in the graph.
dependencies []object
Dependencies lists all resources that this resource depends on.
A resource depends on another if it references it in a CEL expression.
These dependencies determine the order of resource creation.
id
string
ID is the unique identifier of the resource that this resource depends on.
id
string
ID is the unique identifier of the resource as defined in the resources list.
topologicalOrder
[]string
TopologicalOrder is the ordered list of resource IDs based on dependencies.
No matches. Try .spec.revision for an exact path