Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ go 1.26.0
require (
github.com/fluxcd/pkg/apis/acl v0.11.0
github.com/fluxcd/pkg/apis/meta v1.32.0
k8s.io/apimachinery v0.37.0
k8s.io/apiextensions-apiserver v0.37.1
k8s.io/apimachinery v0.37.1
)

require (
Expand Down
6 changes: 4 additions & 2 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/apimachinery v0.37.0 h1:Np2AbDtf8x6RDHiD8T9LbKJ9gaegeVNa8yNm5FuGKm0=
k8s.io/apimachinery v0.37.0/go.mod h1:RN3nhprFSCxOi5Selxd7oMTXOe/c+ZbcE7Im+TS2zkE=
k8s.io/apiextensions-apiserver v0.37.1 h1:7fIQG8eThDSTVYBWg/DOpI8v5wYfKCo0N8/TDMjj+zY=
k8s.io/apiextensions-apiserver v0.37.1/go.mod h1:1Q3ujWwHgnhBoGsdmGORflwK1sDFmuaqH1OsMDWk2Gs=
k8s.io/apimachinery v0.37.1 h1:hGCYyvKHCwtwMitj2vU4vYx0Z16N9GyZk9BBnz0wDAE=
k8s.io/apimachinery v0.37.1/go.mod h1:jF84AyUi/IRIXRot5f+lm6MpxoWI+F1XgjaMmwCdTFw=
k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad h1:oXImqH8mQNk7PmvzKhmN3ddJoY6OnyM225MXwGHPm0A=
Expand Down
7 changes: 7 additions & 0 deletions api/v1/externalartifact_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package v1
import (
"time"

apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/fluxcd/pkg/apis/meta"
Expand All @@ -44,6 +45,12 @@ type ExternalArtifactStatus struct {
// Conditions holds the conditions for the ExternalArtifact.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`

// ExportedInputs holds a map of structured data optionally extracted from the source resource.
// It may be used, for example, by downstream consumers such as templating engines like
// ResourceSet to consume these inputs for implementing templating logic.
// +optional
ExportedInputs map[string]*apiextensionsv1.JSON `json:"exportedInputs,omitempty"`
}

// GetConditions returns the status conditions of the object.
Expand Down
17 changes: 17 additions & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ spec:
- type
type: object
type: array
exportedInputs:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: |-
ExportedInputs holds a map of structured data optionally extracted from the source resource.
It may be used, for example, by downstream consumers such as templating engines like
ResourceSet to consume these inputs for implementing templating logic.
type: object
type: object
type: object
served: true
Expand Down
14 changes: 14 additions & 0 deletions docs/api/v1/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -1918,6 +1918,20 @@ github.com/fluxcd/pkg/apis/meta.Artifact
<p>Conditions holds the conditions for the ExternalArtifact.</p>
</td>
</tr>
<tr>
<td>
<code>exportedInputs</code><br>
<em>
map[string]*k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON
</em>
</td>
<td>
<em>(Optional)</em>
<p>ExportedInputs holds a map of structured data optionally extracted from the source resource.
It may be used, for example, by downstream consumers such as templating engines like
ResourceSet to consume these inputs for implementing templating logic.</p>
</td>
</tr>
</tbody>
</table>
</div>
Expand Down
11 changes: 11 additions & 0 deletions docs/spec/v1/externalartifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,14 @@ the following attributes to the ExternalArtifact's `.status.conditions`:

The `message` field should contain a human-readable message indicating
the reason for the failure.

### Exported Inputs

The ExternalArtifact can optionally report structured data extracted from the source
resource in the `.status.exportedInputs` field.

The `.status.exportedInputs` contains a map where the keys are strings and the values
are JSON objects representing the extracted data.

This field is useful, for example, for downstream consumers such as templating engines
like ResourceSet to consume these inputs for implementing templating logic.
Loading