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
62 changes: 62 additions & 0 deletions api/v1/action.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
Copyright 2026 The Flux authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1

// Action describes an observable stage of a source reconcile loop, from
// reconciling the local artifact storage through acquiring and verifying the
// upstream source, packaging the artifact and finalizing on deletion.
type Action string

// String returns the string representation of the Action.
func (a Action) String() string {
return string(a)
}

const (
// ActionReconcile denotes the overall outcome of the reconcile loop,
// emitted once per run to report that reconciliation finished or failed.
ActionReconcile Action = "Reconcile"

// ActionReconcileStorage verifies that the advertised artifact still
// exists in local storage, reconstructs the storage path, garbage
// collects stale artifacts and sets the artifact URL.
ActionReconcileStorage Action = "ReconcileStorage"

// ActionReconcileSource acquires the upstream content — cloning the Git
// repository, pulling the OCI artifact, downloading the Helm index or
// chart, or fetching the Bucket objects — into a working directory and
// determines the revision.
ActionReconcileSource Action = "ReconcileSource"

// ActionVerifySource validates the authenticity of the acquired source,
// using PGP or SSH for GitRepository and Cosign or Notation for
// OCIRepository and HelmChart. It runs as part of ReconcileSource.
ActionVerifySource Action = "VerifySource"

// ActionReconcileArtifact archives the acquired content into an immutable
// Artifact, persists it under the per-object storage lock and publishes
// the artifact URL and revision.
ActionReconcileArtifact Action = "ReconcileArtifact"

// ActionGarbageCollect prunes stale artifacts from storage, honoring the
// configured retention TTL and record count.
ActionGarbageCollect Action = "GarbageCollect"

// ActionFinalize garbage collects the object's artifacts and removes the
// finalizer when the source is deleted.
ActionFinalize Action = "Finalize"
)
16 changes: 16 additions & 0 deletions api/v1/condition_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ const (
// check failed.
VerificationError string = "VerificationError"

// ArtifactVerificationFailedReason signals that the integrity verification
// of an Artifact in storage failed.
ArtifactVerificationFailedReason string = "ArtifactVerificationFailed"

// DirCreationFailedReason signals a failure caused by a directory creation
// operation.
DirCreationFailedReason string = "DirectoryCreationFailed"
Expand Down Expand Up @@ -102,6 +106,18 @@ const (
// with the Source.
ArtifactUpToDateReason string = "ArtifactUpToDate"

// NewArtifactReason signals that a new Artifact has been stored for the
// Source.
NewArtifactReason string = "NewArtifact"

// NoSourceArtifactReason signals that the referenced Source does not yet
// have an Artifact available.
NoSourceArtifactReason string = "NoSourceArtifact"

// GarbageCollectionSucceededReason signals that garbage collection of
// stale artifacts from storage succeeded.
GarbageCollectionSucceededReason string = "GarbageCollectionSucceeded"

// CacheOperationFailedReason signals a failure in cache operation.
CacheOperationFailedReason string = "CacheOperationFailed"

Expand Down
5 changes: 5 additions & 0 deletions docs/api/v1/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,11 @@ OCIRepositoryStatus
</table>
</div>
</div>
<h3 id="source.toolkit.fluxcd.io/v1.Action">Action
(<code>string</code> alias)</h3>
<p>Action describes an observable stage of a source reconcile loop, from
reconciling the local artifact storage through acquiring and verifying the
upstream source, packaging the artifact and finalizing on deletion.</p>
<h3 id="source.toolkit.fluxcd.io/v1.BucketSTSSpec">BucketSTSSpec
</h3>
<p>
Expand Down
75 changes: 37 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/docker/go-units v0.5.0
github.com/elazarl/goproxy v1.8.4
github.com/fluxcd/cli-utils v1.3.0
github.com/fluxcd/pkg/apis/event v0.29.0
github.com/fluxcd/pkg/apis/event v0.30.0
github.com/fluxcd/pkg/apis/meta v1.32.0
github.com/fluxcd/pkg/artifact v0.21.0
github.com/fluxcd/pkg/auth v0.57.0
Expand All @@ -34,7 +34,7 @@ require (
github.com/fluxcd/pkg/http/transport v0.8.0
github.com/fluxcd/pkg/masktoken v0.9.0
github.com/fluxcd/pkg/oci v0.70.0
github.com/fluxcd/pkg/runtime v0.112.0
github.com/fluxcd/pkg/runtime v0.115.0
github.com/fluxcd/pkg/sourceignore v0.19.0
github.com/fluxcd/pkg/ssh v0.26.0
github.com/fluxcd/pkg/tar v1.2.0
Expand Down Expand Up @@ -63,13 +63,13 @@ require (
github.com/sigstore/sigstore-go v1.2.0
github.com/sirupsen/logrus v1.9.4
github.com/spf13/pflag v1.0.10
golang.org/x/crypto v0.56.0
golang.org/x/sync v0.22.0
golang.org/x/crypto v0.57.0
golang.org/x/sync v0.23.0
google.golang.org/api v0.297.0
helm.sh/helm/v4 v4.2.4
k8s.io/api v0.37.0
k8s.io/apimachinery v0.37.0
k8s.io/client-go v0.37.0
k8s.io/api v0.37.1
k8s.io/apimachinery v0.37.1
k8s.io/client-go v0.37.1
k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3
oras.land/oras-go/v2 v2.6.1
sigs.k8s.io/controller-runtime v0.25.1
Expand Down Expand Up @@ -182,12 +182,12 @@ require (
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
github.com/extism/go-sdk v1.7.1 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/felixge/httpsnoop v1.1.0 // indirect
github.com/fluxcd/gitkit v0.6.0 // indirect
github.com/fluxcd/pkg/apis/acl v0.11.0 // indirect
github.com/fluxcd/pkg/lockedfile v0.8.0 // indirect
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/fxamacker/cbor/v2 v2.9.3 // indirect
github.com/fxamacker/cbor/v2 v2.9.4 // indirect
github.com/gaganhr94/docker-credential-acr v1.0.2 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.7 // indirect
github.com/go-chi/chi/v5 v5.3.0 // indirect
Expand All @@ -198,20 +198,19 @@ require (
github.com/go-ldap/ldap/v3 v3.4.10 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/analysis v0.25.2 // indirect
github.com/go-openapi/errors v0.22.7 // indirect
github.com/go-openapi/analysis v0.25.5 // indirect
github.com/go-openapi/errors v0.22.8 // indirect
github.com/go-openapi/jsonpointer v1.0.0 // indirect
github.com/go-openapi/jsonreference v1.0.1 // indirect
github.com/go-openapi/loads v0.23.3 // indirect
github.com/go-openapi/runtime v0.32.3 // indirect
github.com/go-openapi/loads v0.25.0 // indirect
github.com/go-openapi/runtime v0.33.0 // indirect
github.com/go-openapi/runtime/server-middleware v0.30.0 // indirect
github.com/go-openapi/spec v0.22.5 // indirect
github.com/go-openapi/strfmt v0.26.3 // indirect
github.com/go-openapi/spec v0.22.9 // indirect
github.com/go-openapi/strfmt v0.27.0 // indirect
github.com/go-openapi/swag v0.29.1 // indirect
github.com/go-openapi/swag/cmdutils v0.29.1 // indirect
github.com/go-openapi/swag/conv v0.29.1 // indirect
github.com/go-openapi/swag/fileutils v0.29.1 // indirect
github.com/go-openapi/swag/jsonname v0.26.0 // indirect
github.com/go-openapi/swag/jsonutils v0.29.1 // indirect
github.com/go-openapi/swag/loading v0.29.1 // indirect
github.com/go-openapi/swag/mangling v0.29.1 // indirect
Expand All @@ -220,7 +219,7 @@ require (
github.com/go-openapi/swag/stringutils v0.29.1 // indirect
github.com/go-openapi/swag/typeutils v0.29.1 // indirect
github.com/go-openapi/swag/yamlutils v0.29.1 // indirect
github.com/go-openapi/validate v0.25.3 // indirect
github.com/go-openapi/validate v0.26.1 // indirect
github.com/go-piv/piv-go/v2 v2.5.0 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
Expand All @@ -244,7 +243,7 @@ require (
github.com/gorilla/handlers v1.5.2 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gosuri/uitable v0.0.4 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/hashicorp/golang-lru/arc/v2 v2.0.5 // indirect
Expand Down Expand Up @@ -302,7 +301,7 @@ require (
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.3 // indirect
github.com/prometheus/common v0.71.0 // indirect
github.com/prometheus/common v0.72.0 // indirect
github.com/prometheus/otlptranslator v1.0.0 // indirect
github.com/prometheus/procfs v0.22.0 // indirect
github.com/redis/go-redis/extra/rediscmd/v9 v9.5.3 // indirect
Expand Down Expand Up @@ -353,9 +352,9 @@ require (
go.opentelemetry.io/contrib/bridges/prometheus v0.67.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.44.0 // indirect
go.opentelemetry.io/contrib/exporters/autoexport v0.67.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 // indirect
go.opentelemetry.io/otel v1.44.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0 // indirect
go.opentelemetry.io/otel v1.45.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.43.0 // indirect
Expand All @@ -366,30 +365,30 @@ require (
go.opentelemetry.io/otel/exporters/prometheus v0.65.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.18.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.42.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.45.0 // indirect
go.opentelemetry.io/otel/log v0.19.0 // indirect
go.opentelemetry.io/otel/metric v1.44.0 // indirect
go.opentelemetry.io/otel/sdk v1.44.0 // indirect
go.opentelemetry.io/otel/metric v1.45.0 // indirect
go.opentelemetry.io/otel/sdk v1.45.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.19.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.44.0 // indirect
go.opentelemetry.io/otel/trace v1.44.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.45.0 // indirect
go.opentelemetry.io/otel/trace v1.45.0 // indirect
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.28.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.5 // indirect
golang.org/x/mod v0.39.0 // indirect
golang.org/x/net v0.58.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/term v0.45.0 // indirect
golang.org/x/text v0.41.0 // indirect
golang.org/x/mod v0.41.0 // indirect
golang.org/x/net v0.59.0 // indirect
golang.org/x/oauth2 v0.37.0 // indirect
golang.org/x/sys v0.48.0 // indirect
golang.org/x/term v0.46.0 // indirect
golang.org/x/text v0.42.0 // indirect
golang.org/x/time v0.15.0 // indirect
golang.org/x/tools v0.49.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
google.golang.org/genproto v0.0.0-20260715232425-e75dac1f907d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260715232425-e75dac1f907d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688 // indirect
google.golang.org/grpc v1.83.2 // indirect
google.golang.org/protobuf v1.36.12 // indirect
Expand All @@ -399,14 +398,14 @@ require (
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.37.0 // indirect
k8s.io/apiserver v0.37.0 // indirect
k8s.io/apiextensions-apiserver v0.37.1 // indirect
k8s.io/apiserver v0.37.1 // indirect
k8s.io/cli-runtime v0.37.0 // indirect
k8s.io/component-base v0.37.0 // indirect
k8s.io/component-base v0.37.1 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kube-openapi v0.0.0-20260821135717-be32def86098 // indirect
k8s.io/kubectl v0.37.0 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/json v0.0.0-20260909141634-11ed52e25bc5 // indirect
sigs.k8s.io/kustomize/api v0.21.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.21.1 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
Expand Down
Loading
Loading