Skip to content

Commit

Permalink
Generate objects (#617)
Browse files Browse the repository at this point in the history
  • Loading branch information
waciumawanjohi authored Feb 14, 2022
1 parent 9e2d807 commit 89a5a07
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 5 additions & 1 deletion config/crd/bases/carto.run_clusterruntemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ spec:
type: string
description: "Outputs are a named list of jsonPaths that are used
to gather results from the last successful object stamped by the
template. E.g: \tmy-output: .status.results[?(@.name==\"IMAGE-DIGEST\")].value"
template. E.g: \tmy-output: .status.results[?(@.name==\"IMAGE-DIGEST\")].value
Note: outputs are only filled on the runnable when the templated
object has a Succeeded condition with a Status of True E.g: status.conditions[?(@.type==\"Succeeded\")].status
== True a runnable creating an object without a Succeeded condition
(like a Job or ConfigMap) will never display an output"
type: object
template:
description: 'Template defines a resource template for a Kubernetes
Expand Down
5 changes: 5 additions & 0 deletions config/crd/bases/carto.run_runnables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ spec:
outputs:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: 'Note: outputs are only filled on the runnable when the
templated object has a Succeeded condition with a Status of True
E.g: status.conditions[?(@.type=="Succeeded")].status == True
a runnable creating an object without a Succeeded condition (like
a Job or ConfigMap) will never display an output'
type: object
type: object
required:
Expand Down
6 changes: 3 additions & 3 deletions pkg/apis/v1alpha1/runnable.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ type Runnable struct {
}

type RunnableStatus struct {
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Note: outputs are only filled on the runnable when the templated object
// has a Succeeded condition with a Status of True
// E.g: status.conditions[?(@.type=="Succeeded")].status == True
// a runnable creating an object without a Succeeded condition (like a Job or ConfigMap)
// will never display an output
// +optional
Outputs map[string]apiextensionsv1.JSON `json:"outputs,omitempty"`
Outputs map[string]apiextensionsv1.JSON `json:"outputs,omitempty"`
}

type RunnableSpec struct {
Expand Down

0 comments on commit 89a5a07

Please sign in to comment.