diff --git a/go.mod b/go.mod index a0b302857e..c72ea7a078 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ toolchain go1.22.1 require ( github.com/Masterminds/sprig/v3 v3.2.3 - github.com/fluxcd/helm-controller/api v0.37.2 - github.com/fluxcd/source-controller/api v1.2.3 + github.com/fluxcd/helm-controller/api v1.0.1 + github.com/fluxcd/source-controller/api v1.3.0 github.com/go-logr/logr v1.4.1 github.com/gobuffalo/flect v0.3.0 github.com/google/gofuzz v1.2.0 @@ -48,7 +48,7 @@ require ( kmodules.xyz/custom-resources v0.29.1 kmodules.xyz/go-containerregistry v0.0.12 kmodules.xyz/monitoring-agent-api v0.29.0 - kmodules.xyz/resource-metadata v0.18.6-0.20240519060826-0f56f2586902 + kmodules.xyz/resource-metadata v0.18.6-0.20240519125927-d558ba96f4da kmodules.xyz/resource-metrics v0.29.5 kmodules.xyz/sets v0.29.0 kubeops.dev/falco-ui-server v0.0.3 @@ -99,9 +99,9 @@ require ( github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fluxcd/pkg/apis/acl v0.1.0 // indirect - github.com/fluxcd/pkg/apis/kustomize v1.2.0 // indirect - github.com/fluxcd/pkg/apis/meta v1.2.0 // indirect + github.com/fluxcd/pkg/apis/acl v0.3.0 // indirect + github.com/fluxcd/pkg/apis/kustomize v1.5.0 // indirect + github.com/fluxcd/pkg/apis/meta v1.5.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-ini/ini v1.67.0 // indirect diff --git a/go.sum b/go.sum index bd42fff3b6..7d81839483 100644 --- a/go.sum +++ b/go.sum @@ -147,16 +147,16 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fluxcd/helm-controller/api v0.37.2 h1:tkLezpRdqPDz7HoKHFu92sV+ppOCVDxkjFTh8/lpff8= -github.com/fluxcd/helm-controller/api v0.37.2/go.mod h1:BuXZhAX9blQviil6yUN5zNM4RB753yhyBTJXxXff7Mo= -github.com/fluxcd/pkg/apis/acl v0.1.0 h1:EoAl377hDQYL3WqanWCdifauXqXbMyFuK82NnX6pH4Q= -github.com/fluxcd/pkg/apis/acl v0.1.0/go.mod h1:zfEZzz169Oap034EsDhmCAGgnWlcWmIObZjYMusoXS8= -github.com/fluxcd/pkg/apis/kustomize v1.2.0 h1:vkVs+OumxaWso0jNCqdgFFfMHdh+qtZhykTkjl7OgmA= -github.com/fluxcd/pkg/apis/kustomize v1.2.0/go.mod h1:VF7tR/WuVFeum+HaMTHwp+eCtsHiiQlY6ihgqtAnW/M= -github.com/fluxcd/pkg/apis/meta v1.2.0 h1:O766PzGAdMdQKybSflGL8oV0+GgCNIkdsxfalRyzeO8= -github.com/fluxcd/pkg/apis/meta v1.2.0/go.mod h1:fU/Az9AoVyIxC0oI4ihG0NVMNnvrcCzdEym3wxjIQsc= -github.com/fluxcd/source-controller/api v1.2.3 h1:71mXv3Qg9HEhcpqOq1ObmoE+P/HuZNaAvxfI7dqZMo8= -github.com/fluxcd/source-controller/api v1.2.3/go.mod h1:5gaIVVH7hgb8p3HKFp8P6hGmZEC8fKSt4EcrG3g5vZI= +github.com/fluxcd/helm-controller/api v1.0.1 h1:Gn9qEVuif6D5+gHmVwTEZkR4+nmLOcOhKx4Sw2gL2EA= +github.com/fluxcd/helm-controller/api v1.0.1/go.mod h1:/6AD5a2qjo/ttxVM8GR33syLZwqigta60DCLdy8GrME= +github.com/fluxcd/pkg/apis/acl v0.3.0 h1:UOrKkBTOJK+OlZX7n8rWt2rdBmDCoTK+f5TY2LcZi8A= +github.com/fluxcd/pkg/apis/acl v0.3.0/go.mod h1:WVF9XjSMVBZuU+HTTiSebGAWMgM7IYexFLyVWbK9bNY= +github.com/fluxcd/pkg/apis/kustomize v1.5.0 h1:ah4sfqccnio+/5Edz/tVz6LetFhiBoDzXAElj6fFCzU= +github.com/fluxcd/pkg/apis/kustomize v1.5.0/go.mod h1:nEzhnhHafhWOUUV8VMFLojUOH+HHDEsL75y54mt/c30= +github.com/fluxcd/pkg/apis/meta v1.5.0 h1:/G82d2Az5D9op3F+wJUpD8jw/eTV0suM6P7+cSURoUM= +github.com/fluxcd/pkg/apis/meta v1.5.0/go.mod h1:Y3u7JomuuKtr5fvP1Iji2/50FdRe5GcBug2jawNVkdM= +github.com/fluxcd/source-controller/api v1.3.0 h1:Z5Lq0aJY87yg0cQDEuwGLKS60GhdErCHtsi546HUt10= +github.com/fluxcd/source-controller/api v1.3.0/go.mod h1:+tfd0vltjcVs/bbnq9AlYR9AAHSVfM/Z4v4TpQmdJf4= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI= @@ -921,8 +921,8 @@ kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9 kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI= kmodules.xyz/offshoot-api v0.29.0 h1:GHLhxxT9jU1N8+FvOCCeJNyU5g0duYS46UGrs6AHNLY= kmodules.xyz/offshoot-api v0.29.0/go.mod h1:5NxhBblXoDHWStx9HCDJR2KFTwYjEZ7i1Id3jelIunw= -kmodules.xyz/resource-metadata v0.18.6-0.20240519060826-0f56f2586902 h1:IFSGgnNnUFwvlyif5lDQBx0/JBge+6RgNCeUPee2pf8= -kmodules.xyz/resource-metadata v0.18.6-0.20240519060826-0f56f2586902/go.mod h1:XbfRoZJKblzt3dAe5TLoxcgFrwqX759lqlT78QThxYo= +kmodules.xyz/resource-metadata v0.18.6-0.20240519125927-d558ba96f4da h1:srCqtb/wfooHdaHgIwXrk8tAzHXkZZDd0CigEjX/sa0= +kmodules.xyz/resource-metadata v0.18.6-0.20240519125927-d558ba96f4da/go.mod h1:WKwJXM00EFKeDXDF+fjEMwxyZnKs/1SXMj9nt0VbDHs= kmodules.xyz/resource-metrics v0.29.5 h1:ciuvRXuXsloLNW/JwkubqbYySsvHvHr6/nhkTL5Sf1o= kmodules.xyz/resource-metrics v0.29.5/go.mod h1:OuG/QobZ7o8GFHl/u3lqaUR0fDZDegxtV8Vdh+MNBD4= kmodules.xyz/sets v0.29.0 h1:ZX/qOECzUob95JhhRtngJElHSlJ1UNNdwK4hTEy+nl0= diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index 3988de2b0a..8b1ff2cb49 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -70,7 +70,7 @@ import ( imagestorage "kubeops.dev/ui-server/pkg/registry/scanner/image" reportstorage "kubeops.dev/ui-server/pkg/registry/scanner/reports" - fluxsrc "github.com/fluxcd/source-controller/api/v1beta2" + fluxsrc "github.com/fluxcd/source-controller/api/v1" "github.com/graphql-go/handler" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" openvizapi "go.openviz.dev/apimachinery/apis/openviz/v1alpha1" diff --git a/pkg/cmds/server/start.go b/pkg/cmds/server/start.go index f6599475d8..cbaf17d9e0 100644 --- a/pkg/cmds/server/start.go +++ b/pkg/cmds/server/start.go @@ -33,7 +33,7 @@ import ( featurecontroller "kubeops.dev/ui-server/pkg/controllers/feature" "kubeops.dev/ui-server/pkg/metricshandler" - fluxhelm "github.com/fluxcd/helm-controller/api/v2beta2" + fluxhelm "github.com/fluxcd/helm-controller/api/v2" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/spf13/pflag" diff --git a/pkg/controllers/feature/feature_controller.go b/pkg/controllers/feature/feature_controller.go index c943ef0b6d..8e01d27aec 100644 --- a/pkg/controllers/feature/feature_controller.go +++ b/pkg/controllers/feature/feature_controller.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - fluxhelm "github.com/fluxcd/helm-controller/api/v2beta2" + fluxhelm "github.com/fluxcd/helm-controller/api/v2" "github.com/go-logr/logr" "gomodules.xyz/pointer" kerr "k8s.io/apimachinery/pkg/api/errors" diff --git a/pkg/controllers/feature/feature_controller_test.go b/pkg/controllers/feature/feature_controller_test.go index 8f869ffdcd..a613f38988 100644 --- a/pkg/controllers/feature/feature_controller_test.go +++ b/pkg/controllers/feature/feature_controller_test.go @@ -20,7 +20,7 @@ import ( "context" "testing" - fluxhelm "github.com/fluxcd/helm-controller/api/v2beta2" + fluxhelm "github.com/fluxcd/helm-controller/api/v2" "github.com/go-logr/logr" "github.com/stretchr/testify/assert" "gomodules.xyz/pointer" diff --git a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/annotations.go b/vendor/github.com/fluxcd/helm-controller/api/v2/annotations.go similarity index 98% rename from vendor/github.com/fluxcd/helm-controller/api/v2beta2/annotations.go rename to vendor/github.com/fluxcd/helm-controller/api/v2/annotations.go index bcf4664be9..2bd14057c2 100644 --- a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/annotations.go +++ b/vendor/github.com/fluxcd/helm-controller/api/v2/annotations.go @@ -1,5 +1,5 @@ /* -Copyright 2023 The Flux authors +Copyright 2024 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. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 import "github.com/fluxcd/pkg/apis/meta" diff --git a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/condition_types.go b/vendor/github.com/fluxcd/helm-controller/api/v2/condition_types.go similarity index 81% rename from vendor/github.com/fluxcd/helm-controller/api/v2beta2/condition_types.go rename to vendor/github.com/fluxcd/helm-controller/api/v2/condition_types.go index 10172dfb1c..fb4c6d65f0 100644 --- a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/condition_types.go +++ b/vendor/github.com/fluxcd/helm-controller/api/v2/condition_types.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Flux authors +Copyright 2024 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. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 const ( // ReleasedCondition represents the status of the last release attempt @@ -76,23 +76,7 @@ const ( // HelmRelease failed. ArtifactFailedReason string = "ArtifactFailed" - // InitFailedReason represents the fact that the initialization of the Helm - // configuration failed. - InitFailedReason string = "InitFailed" - - // GetLastReleaseFailedReason represents the fact that observing the last - // release failed. - GetLastReleaseFailedReason string = "GetLastReleaseFailed" - // DependencyNotReadyReason represents the fact that // one of the dependencies is not ready. DependencyNotReadyReason string = "DependencyNotReady" - - // ReconciliationSucceededReason represents the fact that - // the reconciliation succeeded. - ReconciliationSucceededReason string = "ReconciliationSucceeded" - - // ReconciliationFailedReason represents the fact that - // the reconciliation failed. - ReconciliationFailedReason string = "ReconciliationFailed" ) diff --git a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/doc.go b/vendor/github.com/fluxcd/helm-controller/api/v2/doc.go similarity index 82% rename from vendor/github.com/fluxcd/helm-controller/api/v2beta2/doc.go rename to vendor/github.com/fluxcd/helm-controller/api/v2/doc.go index 282bff8135..e04280738c 100644 --- a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/doc.go +++ b/vendor/github.com/fluxcd/helm-controller/api/v2/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Flux authors +Copyright 2024 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. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v2beta2 contains API Schema definitions for the helm v2beta2 API group +// Package v2 contains API Schema definitions for the helm v2 API group // +kubebuilder:object:generate=true // +groupName=helm.toolkit.fluxcd.io -package v2beta2 +package v2 diff --git a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/groupversion_info.go b/vendor/github.com/fluxcd/helm-controller/api/v2/groupversion_info.go similarity index 93% rename from vendor/github.com/fluxcd/helm-controller/api/v2beta2/groupversion_info.go rename to vendor/github.com/fluxcd/helm-controller/api/v2/groupversion_info.go index ea03d5f674..352331bd95 100644 --- a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/groupversion_info.go +++ b/vendor/github.com/fluxcd/helm-controller/api/v2/groupversion_info.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Flux authors +Copyright 2024 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. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 import ( "k8s.io/apimachinery/pkg/runtime/schema" @@ -23,7 +23,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "helm.toolkit.fluxcd.io", Version: "v2beta2"} + GroupVersion = schema.GroupVersion{Group: "helm.toolkit.fluxcd.io", Version: "v2"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/helmrelease_types.go b/vendor/github.com/fluxcd/helm-controller/api/v2/helmrelease_types.go similarity index 95% rename from vendor/github.com/fluxcd/helm-controller/api/v2beta2/helmrelease_types.go rename to vendor/github.com/fluxcd/helm-controller/api/v2/helmrelease_types.go index e9e36b2407..800470bfb5 100644 --- a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/helmrelease_types.go +++ b/vendor/github.com/fluxcd/helm-controller/api/v2/helmrelease_types.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Flux authors +Copyright 2024 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. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 import ( "strings" @@ -49,16 +49,6 @@ type Kustomize struct { // +optional Patches []kustomize.Patch `json:"patches,omitempty"` - // Strategic merge patches, defined as inline YAML objects. - // Deprecated: use Patches instead. - // +optional - PatchesStrategicMerge []apiextensionsv1.JSON `json:"patchesStrategicMerge,omitempty"` - - // JSON 6902 patches, defined as inline YAML objects. - // Deprecated: use Patches instead. - // +optional - PatchesJSON6902 []kustomize.JSON6902Patch `json:"patchesJson6902,omitempty"` - // Images is a list of (image name, new name, new tag or digest) // for changing image names, tags or digests. This can also be achieved with a // patch, but this operator is simpler to specify. @@ -74,11 +64,17 @@ type PostRenderer struct { } // HelmReleaseSpec defines the desired state of a Helm release. +// +kubebuilder:validation:XValidation:rule="(has(self.chart) && !has(self.chartRef)) || (!has(self.chart) && has(self.chartRef))", message="either chart or chartRef must be set" type HelmReleaseSpec struct { - // Chart defines the template of the v1beta2.HelmChart that should be created + // Chart defines the template of the v1.HelmChart that should be created // for this HelmRelease. - // +required - Chart HelmChartTemplate `json:"chart"` + // +optional + Chart *HelmChartTemplate `json:"chart,omitempty"` + + // ChartRef holds a reference to a source controller resource containing the + // Helm chart artifact. + // +optional + ChartRef *CrossNamespaceSourceReference `json:"chartRef,omitempty"` // Interval at which to reconcile the Helm release. // +kubebuilder:validation:Type=string @@ -291,20 +287,20 @@ func (d DriftDetection) MustDetectChanges() bool { } // HelmChartTemplate defines the template from which the controller will -// generate a v1beta2.HelmChart object in the same namespace as the referenced +// generate a v1.HelmChart object in the same namespace as the referenced // v1.Source. type HelmChartTemplate struct { // ObjectMeta holds the template for metadata like labels and annotations. // +optional ObjectMeta *HelmChartTemplateObjectMeta `json:"metadata,omitempty"` - // Spec holds the template for the v1beta2.HelmChartSpec for this HelmRelease. + // Spec holds the template for the v1.HelmChartSpec for this HelmRelease. // +required Spec HelmChartTemplateSpec `json:"spec"` } // HelmChartTemplateObjectMeta defines the template for the ObjectMeta of a -// v1beta2.HelmChart. +// v1.HelmChart. type HelmChartTemplateObjectMeta struct { // Map of string keys and values that can be used to organize and categorize // (scope and select) objects. @@ -321,7 +317,7 @@ type HelmChartTemplateObjectMeta struct { } // HelmChartTemplateSpec defines the template from which the controller will -// generate a v1beta2.HelmChartSpec object. +// generate a v1.HelmChartSpec object. type HelmChartTemplateSpec struct { // The name or path the Helm chart is available at in the SourceRef. // +kubebuilder:validation:MinLength=1 @@ -329,7 +325,7 @@ type HelmChartTemplateSpec struct { // +required Chart string `json:"chart"` - // Version semver expression, ignored for charts from v1beta2.GitRepository and + // Version semver expression, ignored for charts from v1.GitRepository and // v1beta2.Bucket sources. Defaults to latest when omitted. // +kubebuilder:default:=* // +optional @@ -362,13 +358,9 @@ type HelmChartTemplateSpec struct { // +optional ValuesFiles []string `json:"valuesFiles,omitempty"` - // Alternative values file to use as the default chart values, expected to - // be a relative path in the SourceRef. Deprecated in favor of ValuesFiles, - // for backwards compatibility the file defined here is merged before the - // ValuesFiles items. Ignored when omitted. + // IgnoreMissingValuesFiles controls whether to silently ignore missing values files rather than failing. // +optional - // +deprecated - ValuesFile string `json:"valuesFile,omitempty"` + IgnoreMissingValuesFiles bool `json:"ignoreMissingValuesFiles,omitempty"` // Verify contains the secret name containing the trusted public keys // used to verify the signature and specifies which provider to use to check @@ -380,7 +372,7 @@ type HelmChartTemplateSpec struct { Verify *HelmChartTemplateVerification `json:"verify,omitempty"` } -// GetInterval returns the configured interval for the v1beta2.HelmChart, +// GetInterval returns the configured interval for the v1.HelmChart, // or the given default. func (in HelmChartTemplate) GetInterval(defaultInterval metav1.Duration) metav1.Duration { if in.Spec.Interval == nil { @@ -390,7 +382,7 @@ func (in HelmChartTemplate) GetInterval(defaultInterval metav1.Duration) metav1. } // GetNamespace returns the namespace targeted namespace for the -// v1beta2.HelmChart, or the given default. +// v1.HelmChart, or the given default. func (in HelmChartTemplate) GetNamespace(defaultNamespace string) string { if in.Spec.SourceRef.Namespace == "" { return defaultNamespace @@ -401,7 +393,7 @@ func (in HelmChartTemplate) GetNamespace(defaultNamespace string) string { // HelmChartTemplateVerification verifies the authenticity of an OCI Helm chart. type HelmChartTemplateVerification struct { // Provider specifies the technology used to sign the OCI Helm chart. - // +kubebuilder:validation:Enum=cosign + // +kubebuilder:validation:Enum=cosign;notation // +kubebuilder:default:=cosign Provider string `json:"provider"` @@ -941,6 +933,11 @@ type HelmReleaseStatus struct { // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // ObservedPostRenderersDigest is the digest for the post-renderers of + // the last successful reconciliation attempt. + // +optional + ObservedPostRenderersDigest string `json:"observedPostRenderersDigest,omitempty"` + // LastAttemptedGeneration is the last generation the controller attempted // to reconcile. // +optional @@ -989,17 +986,17 @@ type HelmReleaseStatus struct { // +optional UpgradeFailures int64 `json:"upgradeFailures,omitempty"` - // LastAppliedRevision is the revision of the last successfully applied - // source. - // Deprecated: the revision can now be found in the History. - // +optional - LastAppliedRevision string `json:"lastAppliedRevision,omitempty"` - // LastAttemptedRevision is the Source revision of the last reconciliation - // attempt. + // attempt. For OCIRepository sources, the 12 first characters of the digest are + // appended to the chart version e.g. "1.2.3+1234567890ab". // +optional LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"` + // LastAttemptedRevisionDigest is the digest of the last reconciliation attempt. + // This is only set for OCIRepository sources. + // +optional + LastAttemptedRevisionDigest string `json:"lastAttemptedRevisionDigest,omitempty"` + // LastAttemptedValuesChecksum is the SHA1 checksum for the values of the last // reconciliation attempt. // Deprecated: Use LastAttemptedConfigDigest instead. @@ -1052,6 +1049,10 @@ func (in HelmReleaseStatus) GetHelmChart() (string, string) { return "", "" } +func (in *HelmReleaseStatus) GetLastAttemptedRevision() string { + return in.LastAttemptedRevision +} + const ( // SourceIndexKey is the key used for indexing HelmReleases based on // their sources. @@ -1059,7 +1060,6 @@ const ( ) // +genclient -// +genclient:Namespaced // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=hr // +kubebuilder:storageversion @@ -1236,10 +1236,14 @@ func (in *HelmRelease) SetConditions(conditions []metav1.Condition) { in.Status.Conditions = conditions } -// GetStatusConditions returns a pointer to the Status.Conditions slice. -// Deprecated: use GetConditions instead. -func (in *HelmRelease) GetStatusConditions() *[]metav1.Condition { - return &in.Status.Conditions +// HasChartRef returns true if the HelmRelease has a ChartRef. +func (in *HelmRelease) HasChartRef() bool { + return in.Spec.ChartRef != nil +} + +// HasChartTemplate returns true if the HelmRelease has a ChartTemplate. +func (in *HelmRelease) HasChartTemplate() bool { + return in.Spec.Chart != nil } // +kubebuilder:object:root=true diff --git a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/reference_types.go b/vendor/github.com/fluxcd/helm-controller/api/v2/reference_types.go similarity index 77% rename from vendor/github.com/fluxcd/helm-controller/api/v2beta2/reference_types.go rename to vendor/github.com/fluxcd/helm-controller/api/v2/reference_types.go index 4c899fe5d7..fe7003e34e 100644 --- a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/reference_types.go +++ b/vendor/github.com/fluxcd/helm-controller/api/v2/reference_types.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Flux authors +Copyright 2024 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. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 // CrossNamespaceObjectReference contains enough information to let you locate // the typed referenced object at cluster level. @@ -42,6 +42,33 @@ type CrossNamespaceObjectReference struct { Namespace string `json:"namespace,omitempty"` } +// CrossNamespaceSourceReference contains enough information to let you locate +// the typed referenced object at cluster level. +type CrossNamespaceSourceReference struct { + // APIVersion of the referent. + // +optional + APIVersion string `json:"apiVersion,omitempty"` + + // Kind of the referent. + // +kubebuilder:validation:Enum=OCIRepository;HelmChart + // +required + Kind string `json:"kind"` + + // Name of the referent. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=253 + // +required + Name string `json:"name"` + + // Namespace of the referent, defaults to the namespace of the Kubernetes + // resource object that contains the reference. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:Optional + // +optional + Namespace string `json:"namespace,omitempty"` +} + // ValuesReference contains a reference to a resource containing Helm values, // and optionally the key they can be found at. type ValuesReference struct { diff --git a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/snapshot_types.go b/vendor/github.com/fluxcd/helm-controller/api/v2/snapshot_types.go similarity index 95% rename from vendor/github.com/fluxcd/helm-controller/api/v2beta2/snapshot_types.go rename to vendor/github.com/fluxcd/helm-controller/api/v2/snapshot_types.go index 5876676655..2b4e08de49 100644 --- a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/snapshot_types.go +++ b/vendor/github.com/fluxcd/helm-controller/api/v2/snapshot_types.go @@ -1,5 +1,5 @@ /* -Copyright 2023 The Flux authors +Copyright 2024 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. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 import ( "fmt" @@ -138,6 +138,9 @@ type Snapshot struct { // storage. // +required ChartVersion string `json:"chartVersion"` + // AppVersion is the chart app version of the release object in storage. + // +optional + AppVersion string `json:"appVersion,omitempty"` // ConfigDigest is the checksum of the config (better known as // "values") of the release object in storage. // It has the format of `:`. @@ -156,6 +159,9 @@ type Snapshot struct { // run by the controller. // +optional TestHooks *map[string]*TestHookStatus `json:"testHooks,omitempty"` + // OCIDigest is the digest of the OCI artifact associated with the release. + // +optional + OCIDigest string `json:"ociDigest,omitempty"` } // FullReleaseName returns the full name of the release in the format diff --git a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/zz_generated.deepcopy.go b/vendor/github.com/fluxcd/helm-controller/api/v2/zz_generated.deepcopy.go similarity index 93% rename from vendor/github.com/fluxcd/helm-controller/api/v2beta2/zz_generated.deepcopy.go rename to vendor/github.com/fluxcd/helm-controller/api/v2/zz_generated.deepcopy.go index f58cdc02fc..c9f8e8ffed 100644 --- a/vendor/github.com/fluxcd/helm-controller/api/v2beta2/zz_generated.deepcopy.go +++ b/vendor/github.com/fluxcd/helm-controller/api/v2/zz_generated.deepcopy.go @@ -1,8 +1,7 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* -Copyright 2022 The Flux authors +Copyright 2024 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. @@ -19,13 +18,13 @@ limitations under the License. // Code generated by controller-gen. DO NOT EDIT. -package v2beta2 +package v2 import ( "github.com/fluxcd/pkg/apis/kustomize" "github.com/fluxcd/pkg/apis/meta" - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -44,6 +43,21 @@ func (in *CrossNamespaceObjectReference) DeepCopy() *CrossNamespaceObjectReferen return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CrossNamespaceSourceReference) DeepCopyInto(out *CrossNamespaceSourceReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceSourceReference. +func (in *CrossNamespaceSourceReference) DeepCopy() *CrossNamespaceSourceReference { + if in == nil { + return nil + } + out := new(CrossNamespaceSourceReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DriftDetection) DeepCopyInto(out *DriftDetection) { *out = *in @@ -137,7 +151,7 @@ func (in *HelmChartTemplateSpec) DeepCopyInto(out *HelmChartTemplateSpec) { out.SourceRef = in.SourceRef if in.Interval != nil { in, out := &in.Interval, &out.Interval - *out = new(metav1.Duration) + *out = new(v1.Duration) **out = **in } if in.ValuesFiles != nil { @@ -244,7 +258,16 @@ func (in *HelmReleaseList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) { *out = *in - in.Chart.DeepCopyInto(&out.Chart) + if in.Chart != nil { + in, out := &in.Chart, &out.Chart + *out = new(HelmChartTemplate) + (*in).DeepCopyInto(*out) + } + if in.ChartRef != nil { + in, out := &in.ChartRef, &out.ChartRef + *out = new(CrossNamespaceSourceReference) + **out = **in + } out.Interval = in.Interval if in.KubeConfig != nil { in, out := &in.KubeConfig, &out.KubeConfig @@ -258,7 +281,7 @@ func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) { } if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout - *out = new(metav1.Duration) + *out = new(v1.Duration) **out = **in } if in.MaxHistory != nil { @@ -308,7 +331,7 @@ func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) { } if in.Values != nil { in, out := &in.Values, &out.Values - *out = new(v1.JSON) + *out = new(apiextensionsv1.JSON) (*in).DeepCopyInto(*out) } if in.PostRenderers != nil { @@ -335,7 +358,7 @@ func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) + *out = make([]v1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -394,7 +417,7 @@ func (in *Install) DeepCopyInto(out *Install) { *out = *in if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout - *out = new(metav1.Duration) + *out = new(v1.Duration) **out = **in } if in.Remediation != nil { @@ -449,20 +472,6 @@ func (in *Kustomize) DeepCopyInto(out *Kustomize) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.PatchesStrategicMerge != nil { - in, out := &in.PatchesStrategicMerge, &out.PatchesStrategicMerge - *out = make([]v1.JSON, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.PatchesJSON6902 != nil { - in, out := &in.PatchesJSON6902, &out.PatchesJSON6902 - *out = make([]kustomize.JSON6902Patch, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } if in.Images != nil { in, out := &in.Images, &out.Images *out = make([]kustomize.Image, len(*in)) @@ -505,7 +514,7 @@ func (in *Rollback) DeepCopyInto(out *Rollback) { *out = *in if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout - *out = new(metav1.Duration) + *out = new(v1.Duration) **out = **in } } @@ -537,7 +546,8 @@ func (in *Snapshot) DeepCopyInto(out *Snapshot) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(TestHookStatus) (*in).DeepCopyInto(*out) } @@ -587,7 +597,7 @@ func (in *Test) DeepCopyInto(out *Test) { *out = *in if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout - *out = new(metav1.Duration) + *out = new(v1.Duration) **out = **in } if in.Filters != nil { @@ -633,7 +643,7 @@ func (in *Uninstall) DeepCopyInto(out *Uninstall) { *out = *in if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout - *out = new(metav1.Duration) + *out = new(v1.Duration) **out = **in } if in.DeletionPropagation != nil { @@ -658,7 +668,7 @@ func (in *Upgrade) DeepCopyInto(out *Upgrade) { *out = *in if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout - *out = new(metav1.Duration) + *out = new(v1.Duration) **out = **in } if in.Remediation != nil { diff --git a/vendor/github.com/fluxcd/pkg/apis/acl/zz_generated.deepcopy.go b/vendor/github.com/fluxcd/pkg/apis/acl/zz_generated.deepcopy.go index 0d107ba55d..1e91afead9 100644 --- a/vendor/github.com/fluxcd/pkg/apis/acl/zz_generated.deepcopy.go +++ b/vendor/github.com/fluxcd/pkg/apis/acl/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021 The Flux authors diff --git a/vendor/github.com/fluxcd/pkg/apis/kustomize/zz_generated.deepcopy.go b/vendor/github.com/fluxcd/pkg/apis/kustomize/zz_generated.deepcopy.go index f433cd03fa..a99896f28a 100644 --- a/vendor/github.com/fluxcd/pkg/apis/kustomize/zz_generated.deepcopy.go +++ b/vendor/github.com/fluxcd/pkg/apis/kustomize/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021 The Flux authors diff --git a/vendor/github.com/fluxcd/pkg/apis/meta/conditions.go b/vendor/github.com/fluxcd/pkg/apis/meta/conditions.go index e368a97417..167e3abae6 100644 --- a/vendor/github.com/fluxcd/pkg/apis/meta/conditions.go +++ b/vendor/github.com/fluxcd/pkg/apis/meta/conditions.go @@ -57,6 +57,10 @@ const ( // For more information about polarity patterns, see: // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties ReconcilingCondition string = "Reconciling" + + // HealthyCondition represents the last recorded + // health assessment result. + HealthyCondition string = "Healthy" ) // These constants define generic Condition reasons to be used by GitOps Toolkit components. @@ -120,6 +124,30 @@ const ( // UnsupportedConnectionTypeReason signals a failure caused by // the use of unsupported network protocols. UnsupportedConnectionTypeReason = "UnsupportedConnectionType" + + // PruneFailedReason represents the fact that the + // pruning of the resources failed. + PruneFailedReason string = "PruneFailed" + + // ArtifactFailedReason represents the fact that the + // source artifact download failed. + ArtifactFailedReason string = "ArtifactFailed" + + // BuildFailedReason represents the fact that the + // build failed. + BuildFailedReason string = "BuildFailed" + + // HealthCheckFailedReason represents the fact that + // one of the health checks failed. + HealthCheckFailedReason string = "HealthCheckFailed" + + // ReconciliationSucceededReason represents the fact that + // the reconciliation succeeded. + ReconciliationSucceededReason string = "ReconciliationSucceeded" + + // ReconciliationFailedReason represents the fact that + // the reconciliation failed. + ReconciliationFailedReason string = "ReconciliationFailed" ) // ObjectWithConditions describes a Kubernetes resource object with status conditions. diff --git a/vendor/github.com/fluxcd/pkg/apis/meta/zz_generated.deepcopy.go b/vendor/github.com/fluxcd/pkg/apis/meta/zz_generated.deepcopy.go index 50884c5019..be56d49abc 100644 --- a/vendor/github.com/fluxcd/pkg/apis/meta/zz_generated.deepcopy.go +++ b/vendor/github.com/fluxcd/pkg/apis/meta/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021 The Flux authors diff --git a/vendor/github.com/fluxcd/source-controller/api/v1/gitrepository_types.go b/vendor/github.com/fluxcd/source-controller/api/v1/gitrepository_types.go index 838e77a1a3..0d3b3abea3 100644 --- a/vendor/github.com/fluxcd/source-controller/api/v1/gitrepository_types.go +++ b/vendor/github.com/fluxcd/source-controller/api/v1/gitrepository_types.go @@ -309,7 +309,6 @@ func (v *GitRepositoryVerification) VerifyTag() bool { } // +genclient -// +genclient:Namespaced // +kubebuilder:storageversion // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=gitrepo diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/helmchart_types.go b/vendor/github.com/fluxcd/source-controller/api/v1/helmchart_types.go similarity index 87% rename from vendor/github.com/fluxcd/source-controller/api/v1beta2/helmchart_types.go rename to vendor/github.com/fluxcd/source-controller/api/v1/helmchart_types.go index 3c5e387b96..137b164502 100644 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/helmchart_types.go +++ b/vendor/github.com/fluxcd/source-controller/api/v1/helmchart_types.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Flux authors +Copyright 2024 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. @@ -14,16 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta2 +package v1 import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/fluxcd/pkg/apis/acl" "github.com/fluxcd/pkg/apis/meta" - apiv1 "github.com/fluxcd/source-controller/api/v1" ) // HelmChartKind is the string representation of a HelmChart. @@ -71,25 +69,16 @@ type HelmChartSpec struct { // +optional ValuesFiles []string `json:"valuesFiles,omitempty"` - // ValuesFile is an alternative values file to use as the default chart - // values, expected to be a relative path in the SourceRef. Deprecated in - // favor of ValuesFiles, for backwards compatibility the file specified here - // is merged before the ValuesFiles items. Ignored when omitted. + // IgnoreMissingValuesFiles controls whether to silently ignore missing values + // files rather than failing. // +optional - // +deprecated - ValuesFile string `json:"valuesFile,omitempty"` + IgnoreMissingValuesFiles bool `json:"ignoreMissingValuesFiles,omitempty"` // Suspend tells the controller to suspend the reconciliation of this // source. // +optional Suspend bool `json:"suspend,omitempty"` - // AccessFrom specifies an Access Control List for allowing cross-namespace - // references to this object. - // NOTE: Not implemented, provisional as of https://github.com/fluxcd/flux2/pull/2092 - // +optional - AccessFrom *acl.AccessFrom `json:"accessFrom,omitempty"` - // Verify contains the secret name containing the trusted public keys // used to verify the signature and specifies which provider to use to check // whether OCI image is authentic. @@ -142,6 +131,12 @@ type HelmChartStatus struct { // +optional ObservedChartName string `json:"observedChartName,omitempty"` + // ObservedValuesFiles are the observed value files of the last successful + // reconciliation. + // It matches the chart in the last successfully reconciled artifact. + // +optional + ObservedValuesFiles []string `json:"observedValuesFiles,omitempty"` + // Conditions holds the conditions for the HelmChart. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` @@ -154,7 +149,7 @@ type HelmChartStatus struct { // Artifact represents the output of the last successful reconciliation. // +optional - Artifact *apiv1.Artifact `json:"artifact,omitempty"` + Artifact *Artifact `json:"artifact,omitempty"` meta.ReconcileRequestStatus `json:",inline"` } @@ -187,23 +182,16 @@ func (in HelmChart) GetRequeueAfter() time.Duration { // GetArtifact returns the latest artifact from the source if present in the // status sub-resource. -func (in *HelmChart) GetArtifact() *apiv1.Artifact { +func (in *HelmChart) GetArtifact() *Artifact { return in.Status.Artifact } // GetValuesFiles returns a merged list of HelmChartSpec.ValuesFiles. func (in *HelmChart) GetValuesFiles() []string { - valuesFiles := in.Spec.ValuesFiles - - // Prepend the deprecated ValuesFile to the list - if in.Spec.ValuesFile != "" { - valuesFiles = append([]string{in.Spec.ValuesFile}, valuesFiles...) - } - return valuesFiles + return in.Spec.ValuesFiles } // +genclient -// +genclient:Namespaced // +kubebuilder:storageversion // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=hc diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/helmrepository_types.go b/vendor/github.com/fluxcd/source-controller/api/v1/helmrepository_types.go similarity index 97% rename from vendor/github.com/fluxcd/source-controller/api/v1beta2/helmrepository_types.go rename to vendor/github.com/fluxcd/source-controller/api/v1/helmrepository_types.go index 4e53fdfd73..2a21f2c527 100644 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/helmrepository_types.go +++ b/vendor/github.com/fluxcd/source-controller/api/v1/helmrepository_types.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Flux authors +Copyright 2024 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. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta2 +package v1 import ( "time" @@ -23,8 +23,6 @@ import ( "github.com/fluxcd/pkg/apis/acl" "github.com/fluxcd/pkg/apis/meta" - - apiv1 "github.com/fluxcd/source-controller/api/v1" ) const ( @@ -152,7 +150,7 @@ type HelmRepositoryStatus struct { // Artifact represents the last successful HelmRepository reconciliation. // +optional - Artifact *apiv1.Artifact `json:"artifact,omitempty"` + Artifact *Artifact `json:"artifact,omitempty"` meta.ReconcileRequestStatus `json:",inline"` } @@ -193,12 +191,11 @@ func (in HelmRepository) GetTimeout() time.Duration { // GetArtifact returns the latest artifact from the source if present in the // status sub-resource. -func (in *HelmRepository) GetArtifact() *apiv1.Artifact { +func (in *HelmRepository) GetArtifact() *Artifact { return in.Status.Artifact } // +genclient -// +genclient:Namespaced // +kubebuilder:storageversion // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=helmrepo diff --git a/vendor/github.com/fluxcd/source-controller/api/v1/ociverification_types.go b/vendor/github.com/fluxcd/source-controller/api/v1/ociverification_types.go new file mode 100644 index 0000000000..de74be343e --- /dev/null +++ b/vendor/github.com/fluxcd/source-controller/api/v1/ociverification_types.go @@ -0,0 +1,56 @@ +/* +Copyright 2024 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 + +import ( + "github.com/fluxcd/pkg/apis/meta" +) + +// OCIRepositoryVerification verifies the authenticity of an OCI Artifact +type OCIRepositoryVerification struct { + // Provider specifies the technology used to sign the OCI Artifact. + // +kubebuilder:validation:Enum=cosign;notation + // +kubebuilder:default:=cosign + Provider string `json:"provider"` + + // SecretRef specifies the Kubernetes Secret containing the + // trusted public keys. + // +optional + SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"` + + // MatchOIDCIdentity specifies the identity matching criteria to use + // while verifying an OCI artifact which was signed using Cosign keyless + // signing. The artifact's identity is deemed to be verified if any of the + // specified matchers match against the identity. + // +optional + MatchOIDCIdentity []OIDCIdentityMatch `json:"matchOIDCIdentity,omitempty"` +} + +// OIDCIdentityMatch specifies options for verifying the certificate identity, +// i.e. the issuer and the subject of the certificate. +type OIDCIdentityMatch struct { + // Issuer specifies the regex pattern to match against to verify + // the OIDC issuer in the Fulcio certificate. The pattern must be a + // valid Go regular expression. + // +required + Issuer string `json:"issuer"` + // Subject specifies the regex pattern to match against to verify + // the identity subject in the Fulcio certificate. The pattern must + // be a valid Go regular expression. + // +required + Subject string `json:"subject"` +} diff --git a/vendor/github.com/fluxcd/source-controller/api/v1/zz_generated.deepcopy.go b/vendor/github.com/fluxcd/source-controller/api/v1/zz_generated.deepcopy.go index 8167c71368..0616741d40 100644 --- a/vendor/github.com/fluxcd/source-controller/api/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/fluxcd/source-controller/api/v1/zz_generated.deepcopy.go @@ -1,8 +1,7 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* -Copyright 2023 The Flux authors +Copyright 2024 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. @@ -22,6 +21,7 @@ limitations under the License. package v1 import ( + "github.com/fluxcd/pkg/apis/acl" "github.com/fluxcd/pkg/apis/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -265,3 +265,300 @@ func (in *GitRepositoryVerification) DeepCopy() *GitRepositoryVerification { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmChart) DeepCopyInto(out *HelmChart) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChart. +func (in *HelmChart) DeepCopy() *HelmChart { + if in == nil { + return nil + } + out := new(HelmChart) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmChart) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmChartList) DeepCopyInto(out *HelmChartList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HelmChart, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartList. +func (in *HelmChartList) DeepCopy() *HelmChartList { + if in == nil { + return nil + } + out := new(HelmChartList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmChartList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmChartSpec) DeepCopyInto(out *HelmChartSpec) { + *out = *in + out.SourceRef = in.SourceRef + out.Interval = in.Interval + if in.ValuesFiles != nil { + in, out := &in.ValuesFiles, &out.ValuesFiles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Verify != nil { + in, out := &in.Verify, &out.Verify + *out = new(OCIRepositoryVerification) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartSpec. +func (in *HelmChartSpec) DeepCopy() *HelmChartSpec { + if in == nil { + return nil + } + out := new(HelmChartSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmChartStatus) DeepCopyInto(out *HelmChartStatus) { + *out = *in + if in.ObservedValuesFiles != nil { + in, out := &in.ObservedValuesFiles, &out.ObservedValuesFiles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Artifact != nil { + in, out := &in.Artifact, &out.Artifact + *out = new(Artifact) + (*in).DeepCopyInto(*out) + } + out.ReconcileRequestStatus = in.ReconcileRequestStatus +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartStatus. +func (in *HelmChartStatus) DeepCopy() *HelmChartStatus { + if in == nil { + return nil + } + out := new(HelmChartStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmRepository) DeepCopyInto(out *HelmRepository) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepository. +func (in *HelmRepository) DeepCopy() *HelmRepository { + if in == nil { + return nil + } + out := new(HelmRepository) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmRepository) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmRepositoryList) DeepCopyInto(out *HelmRepositoryList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HelmRepository, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepositoryList. +func (in *HelmRepositoryList) DeepCopy() *HelmRepositoryList { + if in == nil { + return nil + } + out := new(HelmRepositoryList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmRepositoryList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmRepositorySpec) DeepCopyInto(out *HelmRepositorySpec) { + *out = *in + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(meta.LocalObjectReference) + **out = **in + } + if in.CertSecretRef != nil { + in, out := &in.CertSecretRef, &out.CertSecretRef + *out = new(meta.LocalObjectReference) + **out = **in + } + out.Interval = in.Interval + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(metav1.Duration) + **out = **in + } + if in.AccessFrom != nil { + in, out := &in.AccessFrom, &out.AccessFrom + *out = new(acl.AccessFrom) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepositorySpec. +func (in *HelmRepositorySpec) DeepCopy() *HelmRepositorySpec { + if in == nil { + return nil + } + out := new(HelmRepositorySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmRepositoryStatus) DeepCopyInto(out *HelmRepositoryStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Artifact != nil { + in, out := &in.Artifact, &out.Artifact + *out = new(Artifact) + (*in).DeepCopyInto(*out) + } + out.ReconcileRequestStatus = in.ReconcileRequestStatus +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepositoryStatus. +func (in *HelmRepositoryStatus) DeepCopy() *HelmRepositoryStatus { + if in == nil { + return nil + } + out := new(HelmRepositoryStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalHelmChartSourceReference) DeepCopyInto(out *LocalHelmChartSourceReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalHelmChartSourceReference. +func (in *LocalHelmChartSourceReference) DeepCopy() *LocalHelmChartSourceReference { + if in == nil { + return nil + } + out := new(LocalHelmChartSourceReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OCIRepositoryVerification) DeepCopyInto(out *OCIRepositoryVerification) { + *out = *in + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(meta.LocalObjectReference) + **out = **in + } + if in.MatchOIDCIdentity != nil { + in, out := &in.MatchOIDCIdentity, &out.MatchOIDCIdentity + *out = make([]OIDCIdentityMatch, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIRepositoryVerification. +func (in *OCIRepositoryVerification) DeepCopy() *OCIRepositoryVerification { + if in == nil { + return nil + } + out := new(OCIRepositoryVerification) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCIdentityMatch) DeepCopyInto(out *OIDCIdentityMatch) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityMatch. +func (in *OIDCIdentityMatch) DeepCopy() *OIDCIdentityMatch { + if in == nil { + return nil + } + out := new(OIDCIdentityMatch) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/artifact_types.go b/vendor/github.com/fluxcd/source-controller/api/v1beta2/artifact_types.go deleted file mode 100644 index cc88d2a0cc..0000000000 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/artifact_types.go +++ /dev/null @@ -1,159 +0,0 @@ -/* -Copyright 2022 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 v1beta2 - -import ( - "path" - "regexp" - "strings" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// Artifact represents the output of a Source reconciliation. -// -// Deprecated: use Artifact from api/v1 instead. This type will be removed in -// a future release. -type Artifact struct { - // Path is the relative file path of the Artifact. It can be used to locate - // the file in the root of the Artifact storage on the local file system of - // the controller managing the Source. - // +required - Path string `json:"path"` - - // URL is the HTTP address of the Artifact as exposed by the controller - // managing the Source. It can be used to retrieve the Artifact for - // consumption, e.g. by another controller applying the Artifact contents. - // +required - URL string `json:"url"` - - // Revision is a human-readable identifier traceable in the origin source - // system. It can be a Git commit SHA, Git tag, a Helm chart version, etc. - // +optional - Revision string `json:"revision"` - - // Checksum is the SHA256 checksum of the Artifact file. - // Deprecated: use Artifact.Digest instead. - // +optional - Checksum string `json:"checksum,omitempty"` - - // Digest is the digest of the file in the form of ':'. - // +optional - // +kubebuilder:validation:Pattern="^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$" - Digest string `json:"digest,omitempty"` - - // LastUpdateTime is the timestamp corresponding to the last update of the - // Artifact. - // +required - LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` - - // Size is the number of bytes in the file. - // +optional - Size *int64 `json:"size,omitempty"` - - // Metadata holds upstream information such as OCI annotations. - // +optional - Metadata map[string]string `json:"metadata,omitempty"` -} - -// HasRevision returns if the given revision matches the current Revision of -// the Artifact. -func (in *Artifact) HasRevision(revision string) bool { - if in == nil { - return false - } - return TransformLegacyRevision(in.Revision) == TransformLegacyRevision(revision) -} - -// HasChecksum returns if the given checksum matches the current Checksum of -// the Artifact. -func (in *Artifact) HasChecksum(checksum string) bool { - if in == nil { - return false - } - return in.Checksum == checksum -} - -// ArtifactDir returns the artifact dir path in the form of -// '//'. -func ArtifactDir(kind, namespace, name string) string { - kind = strings.ToLower(kind) - return path.Join(kind, namespace, name) -} - -// ArtifactPath returns the artifact path in the form of -// '//name>/'. -func ArtifactPath(kind, namespace, name, filename string) string { - return path.Join(ArtifactDir(kind, namespace, name), filename) -} - -// TransformLegacyRevision transforms a "legacy" revision string into a "new" -// revision string. It accepts the following formats: -// -// - main/5394cb7f48332b2de7c17dd8b8384bbc84b7e738 -// - feature/branch/5394cb7f48332b2de7c17dd8b8384bbc84b7e738 -// - HEAD/5394cb7f48332b2de7c17dd8b8384bbc84b7e738 -// - tag/55609ff9d959589ed917ce32e6bc0f0a36809565f308602c15c3668965979edc -// - d52bde83c5b2bd0fa7910264e0afc3ac9cfe9b6636ca29c05c09742f01d5a4bd -// -// Which are transformed into the following formats respectively: -// -// - main@sha1:5394cb7f48332b2de7c17dd8b8384bbc84b7e738 -// - feature/branch@sha1:5394cb7f48332b2de7c17dd8b8384bbc84b7e738 -// - sha1:5394cb7f48332b2de7c17dd8b8384bbc84b7e738 -// - tag@sha256:55609ff9d959589ed917ce32e6bc0f0a36809565f308602c15c3668965979edc -// - sha256:d52bde83c5b2bd0fa7910264e0afc3ac9cfe9b6636ca29c05c09742f01d5a4bd -// -// Deprecated, this function exists for backwards compatibility with existing -// resources, and to provide a transition period. Will be removed in a future -// release. -func TransformLegacyRevision(rev string) string { - if rev != "" && strings.LastIndex(rev, ":") == -1 { - if i := strings.LastIndex(rev, "/"); i >= 0 { - sha := rev[i+1:] - if algo := determineSHAType(sha); algo != "" { - if name := rev[:i]; name != "HEAD" { - return name + "@" + algo + ":" + sha - } - return algo + ":" + sha - } - } - if algo := determineSHAType(rev); algo != "" { - return algo + ":" + rev - } - } - return rev -} - -// isAlphaNumHex returns true if the given string only contains 0-9 and a-f -// characters. -var isAlphaNumHex = regexp.MustCompile(`^[0-9a-f]+$`).MatchString - -// determineSHAType returns the SHA algorithm used to compute the provided hex. -// The determination is heuristic and based on the length of the hex string. If -// the size is not recognized, an empty string is returned. -func determineSHAType(hex string) string { - if isAlphaNumHex(hex) { - switch len(hex) { - case 40: - return "sha1" - case 64: - return "sha256" - } - } - return "" -} diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/bucket_types.go b/vendor/github.com/fluxcd/source-controller/api/v1beta2/bucket_types.go deleted file mode 100644 index 90312f55e6..0000000000 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/bucket_types.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright 2022 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 v1beta2 - -import ( - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/fluxcd/pkg/apis/acl" - "github.com/fluxcd/pkg/apis/meta" - - apiv1 "github.com/fluxcd/source-controller/api/v1" -) - -const ( - // BucketKind is the string representation of a Bucket. - BucketKind = "Bucket" -) - -const ( - // GenericBucketProvider for any S3 API compatible storage Bucket. - GenericBucketProvider string = "generic" - // AmazonBucketProvider for an AWS S3 object storage Bucket. - // Provides support for retrieving credentials from the AWS EC2 service. - AmazonBucketProvider string = "aws" - // GoogleBucketProvider for a Google Cloud Storage Bucket. - // Provides support for authentication using a workload identity. - GoogleBucketProvider string = "gcp" - // AzureBucketProvider for an Azure Blob Storage Bucket. - // Provides support for authentication using a Service Principal, - // Managed Identity or Shared Key. - AzureBucketProvider string = "azure" -) - -// BucketSpec specifies the required configuration to produce an Artifact for -// an object storage bucket. -type BucketSpec struct { - // Provider of the object storage bucket. - // Defaults to 'generic', which expects an S3 (API) compatible object - // storage. - // +kubebuilder:validation:Enum=generic;aws;gcp;azure - // +kubebuilder:default:=generic - // +optional - Provider string `json:"provider,omitempty"` - - // BucketName is the name of the object storage bucket. - // +required - BucketName string `json:"bucketName"` - - // Endpoint is the object storage address the BucketName is located at. - // +required - Endpoint string `json:"endpoint"` - - // Insecure allows connecting to a non-TLS HTTP Endpoint. - // +optional - Insecure bool `json:"insecure,omitempty"` - - // Region of the Endpoint where the BucketName is located in. - // +optional - Region string `json:"region,omitempty"` - - // Prefix to use for server-side filtering of files in the Bucket. - // +optional - Prefix string `json:"prefix,omitempty"` - - // SecretRef specifies the Secret containing authentication credentials - // for the Bucket. - // +optional - SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"` - - // Interval at which the Bucket Endpoint is checked for updates. - // This interval is approximate and may be subject to jitter to ensure - // efficient use of resources. - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" - // +required - Interval metav1.Duration `json:"interval"` - - // Timeout for fetch operations, defaults to 60s. - // +kubebuilder:default="60s" - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m))+$" - // +optional - Timeout *metav1.Duration `json:"timeout,omitempty"` - - // Ignore overrides the set of excluded patterns in the .sourceignore format - // (which is the same as .gitignore). If not provided, a default will be used, - // consult the documentation for your version to find out what those are. - // +optional - Ignore *string `json:"ignore,omitempty"` - - // Suspend tells the controller to suspend the reconciliation of this - // Bucket. - // +optional - Suspend bool `json:"suspend,omitempty"` - - // AccessFrom specifies an Access Control List for allowing cross-namespace - // references to this object. - // NOTE: Not implemented, provisional as of https://github.com/fluxcd/flux2/pull/2092 - // +optional - AccessFrom *acl.AccessFrom `json:"accessFrom,omitempty"` -} - -// BucketStatus records the observed state of a Bucket. -type BucketStatus struct { - // ObservedGeneration is the last observed generation of the Bucket object. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - - // Conditions holds the conditions for the Bucket. - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // URL is the dynamic fetch link for the latest Artifact. - // It is provided on a "best effort" basis, and using the precise - // BucketStatus.Artifact data is recommended. - // +optional - URL string `json:"url,omitempty"` - - // Artifact represents the last successful Bucket reconciliation. - // +optional - Artifact *apiv1.Artifact `json:"artifact,omitempty"` - - // ObservedIgnore is the observed exclusion patterns used for constructing - // the source artifact. - // +optional - ObservedIgnore *string `json:"observedIgnore,omitempty"` - - meta.ReconcileRequestStatus `json:",inline"` -} - -const ( - // BucketOperationSucceededReason signals that the Bucket listing and fetch - // operations succeeded. - BucketOperationSucceededReason string = "BucketOperationSucceeded" - - // BucketOperationFailedReason signals that the Bucket listing or fetch - // operations failed. - BucketOperationFailedReason string = "BucketOperationFailed" -) - -// GetConditions returns the status conditions of the object. -func (in Bucket) GetConditions() []metav1.Condition { - return in.Status.Conditions -} - -// SetConditions sets the status conditions on the object. -func (in *Bucket) SetConditions(conditions []metav1.Condition) { - in.Status.Conditions = conditions -} - -// GetRequeueAfter returns the duration after which the source must be reconciled again. -func (in Bucket) GetRequeueAfter() time.Duration { - return in.Spec.Interval.Duration -} - -// GetArtifact returns the latest artifact from the source if present in the status sub-resource. -func (in *Bucket) GetArtifact() *apiv1.Artifact { - return in.Status.Artifact -} - -// +genclient -// +genclient:Namespaced -// +kubebuilder:storageversion -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Endpoint",type=string,JSONPath=`.spec.endpoint` -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="" -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description="" -// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description="" - -// Bucket is the Schema for the buckets API. -type Bucket struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec BucketSpec `json:"spec,omitempty"` - // +kubebuilder:default={"observedGeneration":-1} - Status BucketStatus `json:"status,omitempty"` -} - -// BucketList contains a list of Bucket objects. -// +kubebuilder:object:root=true -type BucketList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []Bucket `json:"items"` -} - -func init() { - SchemeBuilder.Register(&Bucket{}, &BucketList{}) -} diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/condition_types.go b/vendor/github.com/fluxcd/source-controller/api/v1beta2/condition_types.go deleted file mode 100644 index 2b93a1795f..0000000000 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/condition_types.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 2022 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 v1beta2 - -const SourceFinalizer = "finalizers.fluxcd.io" - -const ( - // ArtifactInStorageCondition indicates the availability of the Artifact in - // the storage. - // If True, the Artifact is stored successfully. - // This Condition is only present on the resource if the Artifact is - // successfully stored. - ArtifactInStorageCondition string = "ArtifactInStorage" - - // ArtifactOutdatedCondition indicates the current Artifact of the Source - // is outdated. - // This is a "negative polarity" or "abnormal-true" type, and is only - // present on the resource if it is True. - ArtifactOutdatedCondition string = "ArtifactOutdated" - - // SourceVerifiedCondition indicates the integrity verification of the - // Source. - // If True, the integrity check succeeded. If False, it failed. - // This Condition is only present on the resource if the integrity check - // is enabled. - SourceVerifiedCondition string = "SourceVerified" - - // FetchFailedCondition indicates a transient or persistent fetch failure - // of an upstream Source. - // If True, observations on the upstream Source revision may be impossible, - // and the Artifact available for the Source may be outdated. - // This is a "negative polarity" or "abnormal-true" type, and is only - // present on the resource if it is True. - FetchFailedCondition string = "FetchFailed" - - // BuildFailedCondition indicates a transient or persistent build failure - // of a Source's Artifact. - // If True, the Source can be in an ArtifactOutdatedCondition. - // This is a "negative polarity" or "abnormal-true" type, and is only - // present on the resource if it is True. - BuildFailedCondition string = "BuildFailed" - - // StorageOperationFailedCondition indicates a transient or persistent - // failure related to storage. If True, the reconciliation failed while - // performing some filesystem operation. - // This is a "negative polarity" or "abnormal-true" type, and is only - // present on the resource if it is True. - StorageOperationFailedCondition string = "StorageOperationFailed" -) - -// Reasons are provided as utility, and not part of the declarative API. -const ( - // URLInvalidReason signals that a given Source has an invalid URL. - URLInvalidReason string = "URLInvalid" - - // AuthenticationFailedReason signals that a Secret does not have the - // required fields, or the provided credentials do not match. - AuthenticationFailedReason string = "AuthenticationFailed" - - // VerificationError signals that the Source's verification - // check failed. - VerificationError string = "VerificationError" - - // DirCreationFailedReason signals a failure caused by a directory creation - // operation. - DirCreationFailedReason string = "DirectoryCreationFailed" - - // StatOperationFailedReason signals a failure caused by a stat operation on - // a path. - StatOperationFailedReason string = "StatOperationFailed" - - // ReadOperationFailedReason signals a failure caused by a read operation. - ReadOperationFailedReason string = "ReadOperationFailed" - - // AcquireLockFailedReason signals a failure in acquiring lock. - AcquireLockFailedReason string = "AcquireLockFailed" - - // InvalidPathReason signals a failure caused by an invalid path. - InvalidPathReason string = "InvalidPath" - - // ArchiveOperationFailedReason signals a failure in archive operation. - ArchiveOperationFailedReason string = "ArchiveOperationFailed" - - // SymlinkUpdateFailedReason signals a failure in updating a symlink. - SymlinkUpdateFailedReason string = "SymlinkUpdateFailed" - - // ArtifactUpToDateReason signals that an existing Artifact is up-to-date - // with the Source. - ArtifactUpToDateReason string = "ArtifactUpToDate" - - // CacheOperationFailedReason signals a failure in cache operation. - CacheOperationFailedReason string = "CacheOperationFailed" -) diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/doc.go b/vendor/github.com/fluxcd/source-controller/api/v1beta2/doc.go deleted file mode 100644 index e9fca1650f..0000000000 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2022 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 v1beta2 contains API Schema definitions for the source v1beta2 API group -// +kubebuilder:object:generate=true -// +groupName=source.toolkit.fluxcd.io -package v1beta2 diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/gitrepository_types.go b/vendor/github.com/fluxcd/source-controller/api/v1beta2/gitrepository_types.go deleted file mode 100644 index 069d03390c..0000000000 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/gitrepository_types.go +++ /dev/null @@ -1,320 +0,0 @@ -/* -Copyright 2022 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 v1beta2 - -import ( - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/fluxcd/pkg/apis/acl" - "github.com/fluxcd/pkg/apis/meta" - - apiv1 "github.com/fluxcd/source-controller/api/v1" -) - -const ( - // GitRepositoryKind is the string representation of a GitRepository. - GitRepositoryKind = "GitRepository" - - // GoGitImplementation for performing Git operations using go-git. - GoGitImplementation = "go-git" - // LibGit2Implementation for performing Git operations using libgit2. - LibGit2Implementation = "libgit2" -) - -const ( - // IncludeUnavailableCondition indicates one of the includes is not - // available. For example, because it does not exist, or does not have an - // Artifact. - // This is a "negative polarity" or "abnormal-true" type, and is only - // present on the resource if it is True. - IncludeUnavailableCondition string = "IncludeUnavailable" -) - -// GitRepositorySpec specifies the required configuration to produce an -// Artifact for a Git repository. -type GitRepositorySpec struct { - // URL specifies the Git repository URL, it can be an HTTP/S or SSH address. - // +kubebuilder:validation:Pattern="^(http|https|ssh)://.*$" - // +required - URL string `json:"url"` - - // SecretRef specifies the Secret containing authentication credentials for - // the GitRepository. - // For HTTPS repositories the Secret must contain 'username' and 'password' - // fields for basic auth or 'bearerToken' field for token auth. - // For SSH repositories the Secret must contain 'identity' - // and 'known_hosts' fields. - // +optional - SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"` - - // Interval at which to check the GitRepository for updates. - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" - // +required - Interval metav1.Duration `json:"interval"` - - // Timeout for Git operations like cloning, defaults to 60s. - // +kubebuilder:default="60s" - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m))+$" - // +optional - Timeout *metav1.Duration `json:"timeout,omitempty"` - - // Reference specifies the Git reference to resolve and monitor for - // changes, defaults to the 'master' branch. - // +optional - Reference *GitRepositoryRef `json:"ref,omitempty"` - - // Verification specifies the configuration to verify the Git commit - // signature(s). - // +optional - Verification *GitRepositoryVerification `json:"verify,omitempty"` - - // Ignore overrides the set of excluded patterns in the .sourceignore format - // (which is the same as .gitignore). If not provided, a default will be used, - // consult the documentation for your version to find out what those are. - // +optional - Ignore *string `json:"ignore,omitempty"` - - // Suspend tells the controller to suspend the reconciliation of this - // GitRepository. - // +optional - Suspend bool `json:"suspend,omitempty"` - - // GitImplementation specifies which Git client library implementation to - // use. Defaults to 'go-git', valid values are ('go-git', 'libgit2'). - // Deprecated: gitImplementation is deprecated now that 'go-git' is the - // only supported implementation. - // +kubebuilder:validation:Enum=go-git;libgit2 - // +kubebuilder:default:=go-git - // +optional - GitImplementation string `json:"gitImplementation,omitempty"` - - // RecurseSubmodules enables the initialization of all submodules within - // the GitRepository as cloned from the URL, using their default settings. - // +optional - RecurseSubmodules bool `json:"recurseSubmodules,omitempty"` - - // Include specifies a list of GitRepository resources which Artifacts - // should be included in the Artifact produced for this GitRepository. - Include []GitRepositoryInclude `json:"include,omitempty"` - - // AccessFrom specifies an Access Control List for allowing cross-namespace - // references to this object. - // NOTE: Not implemented, provisional as of https://github.com/fluxcd/flux2/pull/2092 - // +optional - AccessFrom *acl.AccessFrom `json:"accessFrom,omitempty"` -} - -// GitRepositoryInclude specifies a local reference to a GitRepository which -// Artifact (sub-)contents must be included, and where they should be placed. -type GitRepositoryInclude struct { - // GitRepositoryRef specifies the GitRepository which Artifact contents - // must be included. - GitRepositoryRef meta.LocalObjectReference `json:"repository"` - - // FromPath specifies the path to copy contents from, defaults to the root - // of the Artifact. - // +optional - FromPath string `json:"fromPath"` - - // ToPath specifies the path to copy contents to, defaults to the name of - // the GitRepositoryRef. - // +optional - ToPath string `json:"toPath"` -} - -// GetFromPath returns the specified FromPath. -func (in *GitRepositoryInclude) GetFromPath() string { - return in.FromPath -} - -// GetToPath returns the specified ToPath, falling back to the name of the -// GitRepositoryRef. -func (in *GitRepositoryInclude) GetToPath() string { - if in.ToPath == "" { - return in.GitRepositoryRef.Name - } - return in.ToPath -} - -// GitRepositoryRef specifies the Git reference to resolve and checkout. -type GitRepositoryRef struct { - // Branch to check out, defaults to 'master' if no other field is defined. - // +optional - Branch string `json:"branch,omitempty"` - - // Tag to check out, takes precedence over Branch. - // +optional - Tag string `json:"tag,omitempty"` - - // SemVer tag expression to check out, takes precedence over Tag. - // +optional - SemVer string `json:"semver,omitempty"` - - // Name of the reference to check out; takes precedence over Branch, Tag and SemVer. - // - // It must be a valid Git reference: https://git-scm.com/docs/git-check-ref-format#_description - // Examples: "refs/heads/main", "refs/tags/v0.1.0", "refs/pull/420/head", "refs/merge-requests/1/head" - // +optional - Name string `json:"name,omitempty"` - - // Commit SHA to check out, takes precedence over all reference fields. - // - // This can be combined with Branch to shallow clone the branch, in which - // the commit is expected to exist. - // +optional - Commit string `json:"commit,omitempty"` -} - -// GitRepositoryVerification specifies the Git commit signature verification -// strategy. -type GitRepositoryVerification struct { - // Mode specifies what Git object should be verified, currently ('head'). - // +kubebuilder:validation:Enum=head - Mode string `json:"mode"` - - // SecretRef specifies the Secret containing the public keys of trusted Git - // authors. - SecretRef meta.LocalObjectReference `json:"secretRef"` -} - -// GitRepositoryStatus records the observed state of a Git repository. -type GitRepositoryStatus struct { - // ObservedGeneration is the last observed generation of the GitRepository - // object. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - - // Conditions holds the conditions for the GitRepository. - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // URL is the dynamic fetch link for the latest Artifact. - // It is provided on a "best effort" basis, and using the precise - // GitRepositoryStatus.Artifact data is recommended. - // +optional - URL string `json:"url,omitempty"` - - // Artifact represents the last successful GitRepository reconciliation. - // +optional - Artifact *apiv1.Artifact `json:"artifact,omitempty"` - - // IncludedArtifacts contains a list of the last successfully included - // Artifacts as instructed by GitRepositorySpec.Include. - // +optional - IncludedArtifacts []*apiv1.Artifact `json:"includedArtifacts,omitempty"` - - // ContentConfigChecksum is a checksum of all the configurations related to - // the content of the source artifact: - // - .spec.ignore - // - .spec.recurseSubmodules - // - .spec.included and the checksum of the included artifacts - // observed in .status.observedGeneration version of the object. This can - // be used to determine if the content of the included repository has - // changed. - // It has the format of `:`, for example: `sha256:`. - // - // Deprecated: Replaced with explicit fields for observed artifact content - // config in the status. - // +optional - ContentConfigChecksum string `json:"contentConfigChecksum,omitempty"` - - // ObservedIgnore is the observed exclusion patterns used for constructing - // the source artifact. - // +optional - ObservedIgnore *string `json:"observedIgnore,omitempty"` - - // ObservedRecurseSubmodules is the observed resource submodules - // configuration used to produce the current Artifact. - // +optional - ObservedRecurseSubmodules bool `json:"observedRecurseSubmodules,omitempty"` - - // ObservedInclude is the observed list of GitRepository resources used to - // to produce the current Artifact. - // +optional - ObservedInclude []GitRepositoryInclude `json:"observedInclude,omitempty"` - - meta.ReconcileRequestStatus `json:",inline"` -} - -const ( - // GitOperationSucceedReason signals that a Git operation (e.g. clone, - // checkout, etc.) succeeded. - GitOperationSucceedReason string = "GitOperationSucceeded" - - // GitOperationFailedReason signals that a Git operation (e.g. clone, - // checkout, etc.) failed. - GitOperationFailedReason string = "GitOperationFailed" -) - -// GetConditions returns the status conditions of the object. -func (in GitRepository) GetConditions() []metav1.Condition { - return in.Status.Conditions -} - -// SetConditions sets the status conditions on the object. -func (in *GitRepository) SetConditions(conditions []metav1.Condition) { - in.Status.Conditions = conditions -} - -// GetRequeueAfter returns the duration after which the GitRepository must be -// reconciled again. -func (in GitRepository) GetRequeueAfter() time.Duration { - return in.Spec.Interval.Duration -} - -// GetArtifact returns the latest Artifact from the GitRepository if present in -// the status sub-resource. -func (in *GitRepository) GetArtifact() *apiv1.Artifact { - return in.Status.Artifact -} - -// +genclient -// +genclient:Namespaced -// +kubebuilder:object:root=true -// +kubebuilder:resource:shortName=gitrepo -// +kubebuilder:subresource:status -// +kubebuilder:deprecatedversion:warning="v1beta2 GitRepository is deprecated, upgrade to v1" -// +kubebuilder:printcolumn:name="URL",type=string,JSONPath=`.spec.url` -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="" -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description="" -// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description="" - -// GitRepository is the Schema for the gitrepositories API. -type GitRepository struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec GitRepositorySpec `json:"spec,omitempty"` - // +kubebuilder:default={"observedGeneration":-1} - Status GitRepositoryStatus `json:"status,omitempty"` -} - -// GitRepositoryList contains a list of GitRepository objects. -// +kubebuilder:object:root=true -type GitRepositoryList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []GitRepository `json:"items"` -} - -func init() { - SchemeBuilder.Register(&GitRepository{}, &GitRepositoryList{}) -} diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/groupversion_info.go b/vendor/github.com/fluxcd/source-controller/api/v1beta2/groupversion_info.go deleted file mode 100644 index 797e6c5368..0000000000 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/groupversion_info.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2022 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 v1beta2 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "source.toolkit.fluxcd.io", Version: "v1beta2"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme. - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/ocirepository_types.go b/vendor/github.com/fluxcd/source-controller/api/v1beta2/ocirepository_types.go deleted file mode 100644 index 861003a537..0000000000 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/ocirepository_types.go +++ /dev/null @@ -1,341 +0,0 @@ -/* -Copyright 2022 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 v1beta2 - -import ( - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/fluxcd/pkg/apis/meta" - apiv1 "github.com/fluxcd/source-controller/api/v1" -) - -const ( - // OCIRepositoryKind is the string representation of a OCIRepository. - OCIRepositoryKind = "OCIRepository" - - // OCIRepositoryPrefix is the prefix used for OCIRepository URLs. - OCIRepositoryPrefix = "oci://" - - // GenericOCIProvider provides support for authentication using static credentials - // for any OCI compatible API such as Docker Registry, GitHub Container Registry, - // Docker Hub, Quay, etc. - GenericOCIProvider string = "generic" - - // AmazonOCIProvider provides support for OCI authentication using AWS IRSA. - AmazonOCIProvider string = "aws" - - // GoogleOCIProvider provides support for OCI authentication using GCP workload identity. - GoogleOCIProvider string = "gcp" - - // AzureOCIProvider provides support for OCI authentication using a Azure Service Principal, - // Managed Identity or Shared Key. - AzureOCIProvider string = "azure" - - // OCILayerExtract defines the operation type for extracting the content from an OCI artifact layer. - OCILayerExtract = "extract" - - // OCILayerCopy defines the operation type for copying the content from an OCI artifact layer. - OCILayerCopy = "copy" -) - -// OCIRepositorySpec defines the desired state of OCIRepository -type OCIRepositorySpec struct { - // URL is a reference to an OCI artifact repository hosted - // on a remote container registry. - // +kubebuilder:validation:Pattern="^oci://.*$" - // +required - URL string `json:"url"` - - // The OCI reference to pull and monitor for changes, - // defaults to the latest tag. - // +optional - Reference *OCIRepositoryRef `json:"ref,omitempty"` - - // LayerSelector specifies which layer should be extracted from the OCI artifact. - // When not specified, the first layer found in the artifact is selected. - // +optional - LayerSelector *OCILayerSelector `json:"layerSelector,omitempty"` - - // The provider used for authentication, can be 'aws', 'azure', 'gcp' or 'generic'. - // When not specified, defaults to 'generic'. - // +kubebuilder:validation:Enum=generic;aws;azure;gcp - // +kubebuilder:default:=generic - // +optional - Provider string `json:"provider,omitempty"` - - // SecretRef contains the secret name containing the registry login - // credentials to resolve image metadata. - // The secret must be of type kubernetes.io/dockerconfigjson. - // +optional - SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"` - - // Verify contains the secret name containing the trusted public keys - // used to verify the signature and specifies which provider to use to check - // whether OCI image is authentic. - // +optional - Verify *OCIRepositoryVerification `json:"verify,omitempty"` - - // ServiceAccountName is the name of the Kubernetes ServiceAccount used to authenticate - // the image pull if the service account has attached pull secrets. For more information: - // https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account - // +optional - ServiceAccountName string `json:"serviceAccountName,omitempty"` - - // CertSecretRef can be given the name of a Secret containing - // either or both of - // - // - a PEM-encoded client certificate (`tls.crt`) and private - // key (`tls.key`); - // - a PEM-encoded CA certificate (`ca.crt`) - // - // and whichever are supplied, will be used for connecting to the - // registry. The client cert and key are useful if you are - // authenticating with a certificate; the CA cert is useful if - // you are using a self-signed server certificate. The Secret must - // be of type `Opaque` or `kubernetes.io/tls`. - // - // Note: Support for the `caFile`, `certFile` and `keyFile` keys have - // been deprecated. - // +optional - CertSecretRef *meta.LocalObjectReference `json:"certSecretRef,omitempty"` - - // Interval at which the OCIRepository URL is checked for updates. - // This interval is approximate and may be subject to jitter to ensure - // efficient use of resources. - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" - // +required - Interval metav1.Duration `json:"interval"` - - // The timeout for remote OCI Repository operations like pulling, defaults to 60s. - // +kubebuilder:default="60s" - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m))+$" - // +optional - Timeout *metav1.Duration `json:"timeout,omitempty"` - - // Ignore overrides the set of excluded patterns in the .sourceignore format - // (which is the same as .gitignore). If not provided, a default will be used, - // consult the documentation for your version to find out what those are. - // +optional - Ignore *string `json:"ignore,omitempty"` - - // Insecure allows connecting to a non-TLS HTTP container registry. - // +optional - Insecure bool `json:"insecure,omitempty"` - - // This flag tells the controller to suspend the reconciliation of this source. - // +optional - Suspend bool `json:"suspend,omitempty"` -} - -// OCIRepositoryRef defines the image reference for the OCIRepository's URL -type OCIRepositoryRef struct { - // Digest is the image digest to pull, takes precedence over SemVer. - // The value should be in the format 'sha256:'. - // +optional - Digest string `json:"digest,omitempty"` - - // SemVer is the range of tags to pull selecting the latest within - // the range, takes precedence over Tag. - // +optional - SemVer string `json:"semver,omitempty"` - - // Tag is the image tag to pull, defaults to latest. - // +optional - Tag string `json:"tag,omitempty"` -} - -// OCILayerSelector specifies which layer should be extracted from an OCI Artifact -type OCILayerSelector struct { - // MediaType specifies the OCI media type of the layer - // which should be extracted from the OCI Artifact. The - // first layer matching this type is selected. - // +optional - MediaType string `json:"mediaType,omitempty"` - - // Operation specifies how the selected layer should be processed. - // By default, the layer compressed content is extracted to storage. - // When the operation is set to 'copy', the layer compressed content - // is persisted to storage as it is. - // +kubebuilder:validation:Enum=extract;copy - // +optional - Operation string `json:"operation,omitempty"` -} - -// OCIRepositoryVerification verifies the authenticity of an OCI Artifact -type OCIRepositoryVerification struct { - // Provider specifies the technology used to sign the OCI Artifact. - // +kubebuilder:validation:Enum=cosign - // +kubebuilder:default:=cosign - Provider string `json:"provider"` - - // SecretRef specifies the Kubernetes Secret containing the - // trusted public keys. - // +optional - SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"` - - // MatchOIDCIdentity specifies the identity matching criteria to use - // while verifying an OCI artifact which was signed using Cosign keyless - // signing. The artifact's identity is deemed to be verified if any of the - // specified matchers match against the identity. - // +optional - MatchOIDCIdentity []OIDCIdentityMatch `json:"matchOIDCIdentity,omitempty"` -} - -// OIDCIdentityMatch specifies options for verifying the certificate identity, -// i.e. the issuer and the subject of the certificate. -type OIDCIdentityMatch struct { - // Issuer specifies the regex pattern to match against to verify - // the OIDC issuer in the Fulcio certificate. The pattern must be a - // valid Go regular expression. - // +required - Issuer string `json:"issuer"` - // Subject specifies the regex pattern to match against to verify - // the identity subject in the Fulcio certificate. The pattern must - // be a valid Go regular expression. - // +required - Subject string `json:"subject"` -} - -// OCIRepositoryStatus defines the observed state of OCIRepository -type OCIRepositoryStatus struct { - // ObservedGeneration is the last observed generation. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - - // Conditions holds the conditions for the OCIRepository. - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // URL is the download link for the artifact output of the last OCI Repository sync. - // +optional - URL string `json:"url,omitempty"` - - // Artifact represents the output of the last successful OCI Repository sync. - // +optional - Artifact *apiv1.Artifact `json:"artifact,omitempty"` - - // ContentConfigChecksum is a checksum of all the configurations related to - // the content of the source artifact: - // - .spec.ignore - // - .spec.layerSelector - // observed in .status.observedGeneration version of the object. This can - // be used to determine if the content configuration has changed and the - // artifact needs to be rebuilt. - // It has the format of `:`, for example: `sha256:`. - // - // Deprecated: Replaced with explicit fields for observed artifact content - // config in the status. - // +optional - ContentConfigChecksum string `json:"contentConfigChecksum,omitempty"` - - // ObservedIgnore is the observed exclusion patterns used for constructing - // the source artifact. - // +optional - ObservedIgnore *string `json:"observedIgnore,omitempty"` - - // ObservedLayerSelector is the observed layer selector used for constructing - // the source artifact. - // +optional - ObservedLayerSelector *OCILayerSelector `json:"observedLayerSelector,omitempty"` - - meta.ReconcileRequestStatus `json:",inline"` -} - -const ( - // OCIPullFailedReason signals that a pull operation failed. - OCIPullFailedReason string = "OCIArtifactPullFailed" - - // OCILayerOperationFailedReason signals that an OCI layer operation failed. - OCILayerOperationFailedReason string = "OCIArtifactLayerOperationFailed" -) - -// GetConditions returns the status conditions of the object. -func (in OCIRepository) GetConditions() []metav1.Condition { - return in.Status.Conditions -} - -// SetConditions sets the status conditions on the object. -func (in *OCIRepository) SetConditions(conditions []metav1.Condition) { - in.Status.Conditions = conditions -} - -// GetRequeueAfter returns the duration after which the OCIRepository must be -// reconciled again. -func (in OCIRepository) GetRequeueAfter() time.Duration { - return in.Spec.Interval.Duration -} - -// GetArtifact returns the latest Artifact from the OCIRepository if present in -// the status sub-resource. -func (in *OCIRepository) GetArtifact() *apiv1.Artifact { - return in.Status.Artifact -} - -// GetLayerMediaType returns the media type layer selector if found in spec. -func (in *OCIRepository) GetLayerMediaType() string { - if in.Spec.LayerSelector == nil { - return "" - } - - return in.Spec.LayerSelector.MediaType -} - -// GetLayerOperation returns the layer selector operation (defaults to extract). -func (in *OCIRepository) GetLayerOperation() string { - if in.Spec.LayerSelector == nil || in.Spec.LayerSelector.Operation == "" { - return OCILayerExtract - } - - return in.Spec.LayerSelector.Operation -} - -// +genclient -// +genclient:Namespaced -// +kubebuilder:storageversion -// +kubebuilder:object:root=true -// +kubebuilder:resource:shortName=ocirepo -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="URL",type=string,JSONPath=`.spec.url` -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description="" -// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description="" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="" - -// OCIRepository is the Schema for the ocirepositories API -type OCIRepository struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec OCIRepositorySpec `json:"spec,omitempty"` - // +kubebuilder:default={"observedGeneration":-1} - Status OCIRepositoryStatus `json:"status,omitempty"` -} - -// OCIRepositoryList contains a list of OCIRepository -// +kubebuilder:object:root=true -type OCIRepositoryList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []OCIRepository `json:"items"` -} - -func init() { - SchemeBuilder.Register(&OCIRepository{}, &OCIRepositoryList{}) -} diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/source.go b/vendor/github.com/fluxcd/source-controller/api/v1beta2/source.go deleted file mode 100644 index 4111c0998a..0000000000 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/source.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2022 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 v1beta2 - -import ( - "time" - - "k8s.io/apimachinery/pkg/runtime" -) - -const ( - // SourceIndexKey is the key used for indexing objects based on their - // referenced Source. - SourceIndexKey string = ".metadata.source" -) - -// Source interface must be supported by all API types. -// Source is the interface that provides generic access to the Artifact and -// interval. It must be supported by all kinds of the source.toolkit.fluxcd.io -// API group. -// -// Deprecated: use the Source interface from api/v1 instead. This type will be -// removed in a future release. -// -// +k8s:deepcopy-gen=false -type Source interface { - runtime.Object - // GetRequeueAfter returns the duration after which the source must be - // reconciled again. - GetRequeueAfter() time.Duration - // GetArtifact returns the latest artifact from the source if present in - // the status sub-resource. - GetArtifact() *Artifact -} diff --git a/vendor/github.com/fluxcd/source-controller/api/v1beta2/zz_generated.deepcopy.go b/vendor/github.com/fluxcd/source-controller/api/v1beta2/zz_generated.deepcopy.go deleted file mode 100644 index e522081f26..0000000000 --- a/vendor/github.com/fluxcd/source-controller/api/v1beta2/zz_generated.deepcopy.go +++ /dev/null @@ -1,867 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 2023 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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1beta2 - -import ( - "github.com/fluxcd/pkg/apis/acl" - "github.com/fluxcd/pkg/apis/meta" - apiv1 "github.com/fluxcd/source-controller/api/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Artifact) DeepCopyInto(out *Artifact) { - *out = *in - in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) - if in.Size != nil { - in, out := &in.Size, &out.Size - *out = new(int64) - **out = **in - } - if in.Metadata != nil { - in, out := &in.Metadata, &out.Metadata - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Artifact. -func (in *Artifact) DeepCopy() *Artifact { - if in == nil { - return nil - } - out := new(Artifact) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Bucket) DeepCopyInto(out *Bucket) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bucket. -func (in *Bucket) DeepCopy() *Bucket { - if in == nil { - return nil - } - out := new(Bucket) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Bucket) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BucketList) DeepCopyInto(out *BucketList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Bucket, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketList. -func (in *BucketList) DeepCopy() *BucketList { - if in == nil { - return nil - } - out := new(BucketList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BucketList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BucketSpec) DeepCopyInto(out *BucketSpec) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(meta.LocalObjectReference) - **out = **in - } - out.Interval = in.Interval - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } - if in.Ignore != nil { - in, out := &in.Ignore, &out.Ignore - *out = new(string) - **out = **in - } - if in.AccessFrom != nil { - in, out := &in.AccessFrom, &out.AccessFrom - *out = new(acl.AccessFrom) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketSpec. -func (in *BucketSpec) DeepCopy() *BucketSpec { - if in == nil { - return nil - } - out := new(BucketSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BucketStatus) DeepCopyInto(out *BucketStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Artifact != nil { - in, out := &in.Artifact, &out.Artifact - *out = new(apiv1.Artifact) - (*in).DeepCopyInto(*out) - } - if in.ObservedIgnore != nil { - in, out := &in.ObservedIgnore, &out.ObservedIgnore - *out = new(string) - **out = **in - } - out.ReconcileRequestStatus = in.ReconcileRequestStatus -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketStatus. -func (in *BucketStatus) DeepCopy() *BucketStatus { - if in == nil { - return nil - } - out := new(BucketStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitRepository) DeepCopyInto(out *GitRepository) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepository. -func (in *GitRepository) DeepCopy() *GitRepository { - if in == nil { - return nil - } - out := new(GitRepository) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GitRepository) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitRepositoryInclude) DeepCopyInto(out *GitRepositoryInclude) { - *out = *in - out.GitRepositoryRef = in.GitRepositoryRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositoryInclude. -func (in *GitRepositoryInclude) DeepCopy() *GitRepositoryInclude { - if in == nil { - return nil - } - out := new(GitRepositoryInclude) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitRepositoryList) DeepCopyInto(out *GitRepositoryList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]GitRepository, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositoryList. -func (in *GitRepositoryList) DeepCopy() *GitRepositoryList { - if in == nil { - return nil - } - out := new(GitRepositoryList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GitRepositoryList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitRepositoryRef) DeepCopyInto(out *GitRepositoryRef) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositoryRef. -func (in *GitRepositoryRef) DeepCopy() *GitRepositoryRef { - if in == nil { - return nil - } - out := new(GitRepositoryRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitRepositorySpec) DeepCopyInto(out *GitRepositorySpec) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(meta.LocalObjectReference) - **out = **in - } - out.Interval = in.Interval - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } - if in.Reference != nil { - in, out := &in.Reference, &out.Reference - *out = new(GitRepositoryRef) - **out = **in - } - if in.Verification != nil { - in, out := &in.Verification, &out.Verification - *out = new(GitRepositoryVerification) - **out = **in - } - if in.Ignore != nil { - in, out := &in.Ignore, &out.Ignore - *out = new(string) - **out = **in - } - if in.Include != nil { - in, out := &in.Include, &out.Include - *out = make([]GitRepositoryInclude, len(*in)) - copy(*out, *in) - } - if in.AccessFrom != nil { - in, out := &in.AccessFrom, &out.AccessFrom - *out = new(acl.AccessFrom) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositorySpec. -func (in *GitRepositorySpec) DeepCopy() *GitRepositorySpec { - if in == nil { - return nil - } - out := new(GitRepositorySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitRepositoryStatus) DeepCopyInto(out *GitRepositoryStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Artifact != nil { - in, out := &in.Artifact, &out.Artifact - *out = new(apiv1.Artifact) - (*in).DeepCopyInto(*out) - } - if in.IncludedArtifacts != nil { - in, out := &in.IncludedArtifacts, &out.IncludedArtifacts - *out = make([]*apiv1.Artifact, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(apiv1.Artifact) - (*in).DeepCopyInto(*out) - } - } - } - if in.ObservedIgnore != nil { - in, out := &in.ObservedIgnore, &out.ObservedIgnore - *out = new(string) - **out = **in - } - if in.ObservedInclude != nil { - in, out := &in.ObservedInclude, &out.ObservedInclude - *out = make([]GitRepositoryInclude, len(*in)) - copy(*out, *in) - } - out.ReconcileRequestStatus = in.ReconcileRequestStatus -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositoryStatus. -func (in *GitRepositoryStatus) DeepCopy() *GitRepositoryStatus { - if in == nil { - return nil - } - out := new(GitRepositoryStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitRepositoryVerification) DeepCopyInto(out *GitRepositoryVerification) { - *out = *in - out.SecretRef = in.SecretRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositoryVerification. -func (in *GitRepositoryVerification) DeepCopy() *GitRepositoryVerification { - if in == nil { - return nil - } - out := new(GitRepositoryVerification) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmChart) DeepCopyInto(out *HelmChart) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChart. -func (in *HelmChart) DeepCopy() *HelmChart { - if in == nil { - return nil - } - out := new(HelmChart) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HelmChart) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmChartList) DeepCopyInto(out *HelmChartList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]HelmChart, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartList. -func (in *HelmChartList) DeepCopy() *HelmChartList { - if in == nil { - return nil - } - out := new(HelmChartList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HelmChartList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmChartSpec) DeepCopyInto(out *HelmChartSpec) { - *out = *in - out.SourceRef = in.SourceRef - out.Interval = in.Interval - if in.ValuesFiles != nil { - in, out := &in.ValuesFiles, &out.ValuesFiles - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AccessFrom != nil { - in, out := &in.AccessFrom, &out.AccessFrom - *out = new(acl.AccessFrom) - (*in).DeepCopyInto(*out) - } - if in.Verify != nil { - in, out := &in.Verify, &out.Verify - *out = new(OCIRepositoryVerification) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartSpec. -func (in *HelmChartSpec) DeepCopy() *HelmChartSpec { - if in == nil { - return nil - } - out := new(HelmChartSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmChartStatus) DeepCopyInto(out *HelmChartStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Artifact != nil { - in, out := &in.Artifact, &out.Artifact - *out = new(apiv1.Artifact) - (*in).DeepCopyInto(*out) - } - out.ReconcileRequestStatus = in.ReconcileRequestStatus -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartStatus. -func (in *HelmChartStatus) DeepCopy() *HelmChartStatus { - if in == nil { - return nil - } - out := new(HelmChartStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmRepository) DeepCopyInto(out *HelmRepository) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepository. -func (in *HelmRepository) DeepCopy() *HelmRepository { - if in == nil { - return nil - } - out := new(HelmRepository) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HelmRepository) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmRepositoryList) DeepCopyInto(out *HelmRepositoryList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]HelmRepository, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepositoryList. -func (in *HelmRepositoryList) DeepCopy() *HelmRepositoryList { - if in == nil { - return nil - } - out := new(HelmRepositoryList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HelmRepositoryList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmRepositorySpec) DeepCopyInto(out *HelmRepositorySpec) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(meta.LocalObjectReference) - **out = **in - } - if in.CertSecretRef != nil { - in, out := &in.CertSecretRef, &out.CertSecretRef - *out = new(meta.LocalObjectReference) - **out = **in - } - out.Interval = in.Interval - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } - if in.AccessFrom != nil { - in, out := &in.AccessFrom, &out.AccessFrom - *out = new(acl.AccessFrom) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepositorySpec. -func (in *HelmRepositorySpec) DeepCopy() *HelmRepositorySpec { - if in == nil { - return nil - } - out := new(HelmRepositorySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmRepositoryStatus) DeepCopyInto(out *HelmRepositoryStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Artifact != nil { - in, out := &in.Artifact, &out.Artifact - *out = new(apiv1.Artifact) - (*in).DeepCopyInto(*out) - } - out.ReconcileRequestStatus = in.ReconcileRequestStatus -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepositoryStatus. -func (in *HelmRepositoryStatus) DeepCopy() *HelmRepositoryStatus { - if in == nil { - return nil - } - out := new(HelmRepositoryStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalHelmChartSourceReference) DeepCopyInto(out *LocalHelmChartSourceReference) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalHelmChartSourceReference. -func (in *LocalHelmChartSourceReference) DeepCopy() *LocalHelmChartSourceReference { - if in == nil { - return nil - } - out := new(LocalHelmChartSourceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OCILayerSelector) DeepCopyInto(out *OCILayerSelector) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCILayerSelector. -func (in *OCILayerSelector) DeepCopy() *OCILayerSelector { - if in == nil { - return nil - } - out := new(OCILayerSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OCIRepository) DeepCopyInto(out *OCIRepository) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIRepository. -func (in *OCIRepository) DeepCopy() *OCIRepository { - if in == nil { - return nil - } - out := new(OCIRepository) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OCIRepository) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OCIRepositoryList) DeepCopyInto(out *OCIRepositoryList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OCIRepository, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIRepositoryList. -func (in *OCIRepositoryList) DeepCopy() *OCIRepositoryList { - if in == nil { - return nil - } - out := new(OCIRepositoryList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OCIRepositoryList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OCIRepositoryRef) DeepCopyInto(out *OCIRepositoryRef) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIRepositoryRef. -func (in *OCIRepositoryRef) DeepCopy() *OCIRepositoryRef { - if in == nil { - return nil - } - out := new(OCIRepositoryRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OCIRepositorySpec) DeepCopyInto(out *OCIRepositorySpec) { - *out = *in - if in.Reference != nil { - in, out := &in.Reference, &out.Reference - *out = new(OCIRepositoryRef) - **out = **in - } - if in.LayerSelector != nil { - in, out := &in.LayerSelector, &out.LayerSelector - *out = new(OCILayerSelector) - **out = **in - } - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(meta.LocalObjectReference) - **out = **in - } - if in.Verify != nil { - in, out := &in.Verify, &out.Verify - *out = new(OCIRepositoryVerification) - (*in).DeepCopyInto(*out) - } - if in.CertSecretRef != nil { - in, out := &in.CertSecretRef, &out.CertSecretRef - *out = new(meta.LocalObjectReference) - **out = **in - } - out.Interval = in.Interval - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } - if in.Ignore != nil { - in, out := &in.Ignore, &out.Ignore - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIRepositorySpec. -func (in *OCIRepositorySpec) DeepCopy() *OCIRepositorySpec { - if in == nil { - return nil - } - out := new(OCIRepositorySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OCIRepositoryStatus) DeepCopyInto(out *OCIRepositoryStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Artifact != nil { - in, out := &in.Artifact, &out.Artifact - *out = new(apiv1.Artifact) - (*in).DeepCopyInto(*out) - } - if in.ObservedIgnore != nil { - in, out := &in.ObservedIgnore, &out.ObservedIgnore - *out = new(string) - **out = **in - } - if in.ObservedLayerSelector != nil { - in, out := &in.ObservedLayerSelector, &out.ObservedLayerSelector - *out = new(OCILayerSelector) - **out = **in - } - out.ReconcileRequestStatus = in.ReconcileRequestStatus -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIRepositoryStatus. -func (in *OCIRepositoryStatus) DeepCopy() *OCIRepositoryStatus { - if in == nil { - return nil - } - out := new(OCIRepositoryStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OCIRepositoryVerification) DeepCopyInto(out *OCIRepositoryVerification) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(meta.LocalObjectReference) - **out = **in - } - if in.MatchOIDCIdentity != nil { - in, out := &in.MatchOIDCIdentity, &out.MatchOIDCIdentity - *out = make([]OIDCIdentityMatch, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIRepositoryVerification. -func (in *OCIRepositoryVerification) DeepCopy() *OCIRepositoryVerification { - if in == nil { - return nil - } - out := new(OCIRepositoryVerification) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCIdentityMatch) DeepCopyInto(out *OIDCIdentityMatch) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityMatch. -func (in *OIDCIdentityMatch) DeepCopy() *OIDCIdentityMatch { - if in == nil { - return nil - } - out := new(OIDCIdentityMatch) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/kmodules.xyz/resource-metadata/hub/helm.go b/vendor/kmodules.xyz/resource-metadata/hub/helm.go index 132dcfec2e..a5f7bf5900 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/helm.go +++ b/vendor/kmodules.xyz/resource-metadata/hub/helm.go @@ -24,7 +24,7 @@ import ( kmapi "kmodules.xyz/client-go/api/v1" "kmodules.xyz/resource-metadata/apis/shared" - fluxsrc "github.com/fluxcd/source-controller/api/v1beta2" + fluxsrc "github.com/fluxcd/source-controller/api/v1" "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/controller-runtime/pkg/client" chartsapi "x-helm.dev/apimachinery/apis/charts/v1alpha1" diff --git a/vendor/kmodules.xyz/resource-metadata/pkg/layouts/lib.go b/vendor/kmodules.xyz/resource-metadata/pkg/layouts/lib.go index f0fc7949f2..906dcb6621 100644 --- a/vendor/kmodules.xyz/resource-metadata/pkg/layouts/lib.go +++ b/vendor/kmodules.xyz/resource-metadata/pkg/layouts/lib.go @@ -30,7 +30,6 @@ import ( tabledefs "kmodules.xyz/resource-metadata/hub/resourcetabledefinitions" "kmodules.xyz/resource-metadata/pkg/tableconvertor" - _ "github.com/fluxcd/source-controller/api/v1beta2" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/modules.txt b/vendor/modules.txt index 5f7d67484d..9ffba95785 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -177,22 +177,21 @@ github.com/fatih/structs # github.com/felixge/httpsnoop v1.0.4 ## explicit; go 1.13 github.com/felixge/httpsnoop -# github.com/fluxcd/helm-controller/api v0.37.2 -## explicit; go 1.20 -github.com/fluxcd/helm-controller/api/v2beta2 -# github.com/fluxcd/pkg/apis/acl v0.1.0 -## explicit; go 1.18 +# github.com/fluxcd/helm-controller/api v1.0.1 +## explicit; go 1.22.0 +github.com/fluxcd/helm-controller/api/v2 +# github.com/fluxcd/pkg/apis/acl v0.3.0 +## explicit; go 1.22.0 github.com/fluxcd/pkg/apis/acl -# github.com/fluxcd/pkg/apis/kustomize v1.2.0 -## explicit; go 1.20 +# github.com/fluxcd/pkg/apis/kustomize v1.5.0 +## explicit; go 1.22.0 github.com/fluxcd/pkg/apis/kustomize -# github.com/fluxcd/pkg/apis/meta v1.2.0 -## explicit; go 1.20 +# github.com/fluxcd/pkg/apis/meta v1.5.0 +## explicit; go 1.22.0 github.com/fluxcd/pkg/apis/meta -# github.com/fluxcd/source-controller/api v1.2.3 -## explicit; go 1.20 +# github.com/fluxcd/source-controller/api v1.3.0 +## explicit; go 1.22.0 github.com/fluxcd/source-controller/api/v1 -github.com/fluxcd/source-controller/api/v1beta2 # github.com/fsnotify/fsnotify v1.7.0 ## explicit; go 1.17 github.com/fsnotify/fsnotify @@ -1959,7 +1958,7 @@ kmodules.xyz/monitoring-agent-api/client ## explicit; go 1.21.5 kmodules.xyz/offshoot-api/api/v1 kmodules.xyz/offshoot-api/api/v2 -# kmodules.xyz/resource-metadata v0.18.6-0.20240519060826-0f56f2586902 +# kmodules.xyz/resource-metadata v0.18.6-0.20240519125927-d558ba96f4da ## explicit; go 1.22.0 kmodules.xyz/resource-metadata/apis/core/install kmodules.xyz/resource-metadata/apis/core/v1alpha1