diff --git a/docs/how-to-write-a-resolver.md b/docs/how-to-write-a-resolver.md index efa9ee61654..772f1e0157f 100644 --- a/docs/how-to-write-a-resolver.md +++ b/docs/how-to-write-a-resolver.md @@ -119,7 +119,7 @@ type resolver struct {} ``` {{% /tab %}} -{{% tab "Previous Framework" %}} +{{% tab "Previous Framework (Deprecated)" %}} ```go package main @@ -232,7 +232,7 @@ import ( ``` {{% /tab %}} -{{% tab "Previous Framework" %}} +{{% tab "Previous Framework (Deprecated)" %}} ```go import ( @@ -273,7 +273,7 @@ func (r *resolver) Validate(ctx context.Context, req *v1beta1.ResolutionRequestS ``` {{% /tab %}} -{{% tab "Previous Framework" %}} +{{% tab "Previous Framework (Deprecated)" %}} ```go // ValidateParams ensures that the params from a request are as expected. @@ -354,7 +354,7 @@ func (*myResolvedResource) RefSource() *pipelinev1.RefSource { {{% /tab %}} -{{% tab "Previous Framework" %}} +{{% tab "Previous Framework (Deprecated)" %}} ```go diff --git a/docs/resolver-reference.md b/docs/resolver-reference.md index f2d62e22cf0..9d38bc87606 100644 --- a/docs/resolver-reference.md +++ b/docs/resolver-reference.md @@ -35,7 +35,7 @@ configuration for the framework to get a resolver running. {{% /tab %}} -{{% tab "Previous Framework" %}} +{{% tab "Previous Framework (Deprecated)" %}} | Method to Implement | Description | |----------------------|-------------| diff --git a/docs/resolver-template/README.md b/docs/resolver-template/README.md index 829f9845fa1..1469403a20f 100644 --- a/docs/resolver-template/README.md +++ b/docs/resolver-template/README.md @@ -26,7 +26,7 @@ The entire program for the `latest` framework is defined in implementations of all the methods defined by the [`framework.Resolver` interface](../../pkg/remoteresolution/resolver/framework/interface.go). -If you choose to use the previous framework (soon to be deprecated) is defined in +If you choose to use the previous framework (deprecated) is defined in [`./cmd/demoresolver/main.go`](./cmd/demoresolver/main.go) and provides stub implementations of all the methods defined by the [`framework.Resolver` interface](../../pkg/resolution/resolver/framework/interface.go). diff --git a/docs/resolver-template/cmd/demoresolver/main.go b/docs/resolver-template/cmd/demoresolver/main.go index 4c11d7164c2..881be8ba961 100644 --- a/docs/resolver-template/cmd/demoresolver/main.go +++ b/docs/resolver-template/cmd/demoresolver/main.go @@ -32,6 +32,7 @@ func main() { ) } +// Deprecated type resolver struct{} // Initialize sets up any dependencies needed by the resolver. None atm. diff --git a/pkg/resolution/common/interface.go b/pkg/resolution/common/interface.go index 3a1968f3695..82bfda68590 100644 --- a/pkg/resolution/common/interface.go +++ b/pkg/resolution/common/interface.go @@ -30,6 +30,8 @@ type ResolverName string // Requester is the interface implemented by a type that knows how to // submit requests for remote resources. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resource.Requester]. type Requester interface { // Submit accepts the name of a resolver to submit a request to // along with the request itself. @@ -41,6 +43,8 @@ type Requester interface { // type an opportunity to control properties such as whether the name of // a request has particular properties, whether the request should be made // to a specific namespace, and precisely which parameters should be included. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resource.Request]. type Request interface { Name() string Namespace() string diff --git a/pkg/resolution/resolver/bundle/resolver.go b/pkg/resolution/resolver/bundle/resolver.go index b23b2f7a959..9f88ff2caec 100644 --- a/pkg/resolution/resolver/bundle/resolver.go +++ b/pkg/resolution/resolver/bundle/resolver.go @@ -49,6 +49,8 @@ const ( ) // Resolver implements a framework.Resolver that can fetch files from OCI bundles. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resolver/bundle.Resolver] instead. type Resolver struct { kubeClientSet kubernetes.Interface } diff --git a/pkg/resolution/resolver/cluster/resolver.go b/pkg/resolution/resolver/cluster/resolver.go index f3781cbef33..108babb7e31 100644 --- a/pkg/resolution/resolver/cluster/resolver.go +++ b/pkg/resolution/resolver/cluster/resolver.go @@ -51,6 +51,8 @@ const ( var _ framework.Resolver = &Resolver{} // Resolver implements a framework.Resolver that can fetch resources from other namespaces. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resolver/cluster.Resolver] instead. type Resolver struct { pipelineClientSet clientset.Interface } diff --git a/pkg/resolution/resolver/framework/interface.go b/pkg/resolution/resolver/framework/interface.go index 33a9efab4d9..39e1fbfba06 100644 --- a/pkg/resolution/resolver/framework/interface.go +++ b/pkg/resolution/resolver/framework/interface.go @@ -26,6 +26,8 @@ import ( // Resolver is the interface to implement for type-specific resource // resolution. It fetches resources from a given type of remote location // and returns their content along with any associated annotations. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resolver/framework.Resolver] instead. type Resolver interface { // Initialize is called at the moment the resolver controller is // instantiated and is a good place to setup things like diff --git a/pkg/resolution/resolver/framework/reconciler.go b/pkg/resolution/resolver/framework/reconciler.go index b981ea6e02a..4950a90c74d 100644 --- a/pkg/resolution/resolver/framework/reconciler.go +++ b/pkg/resolution/resolver/framework/reconciler.go @@ -43,6 +43,8 @@ import ( // Reconciler handles ResolutionRequest objects, performs functionality // common to all resolvers and delegates resolver-specific actions // to its embedded type-specific Resolver object. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resolver/framework.Reconciler] instead. type Reconciler struct { // Implements reconciler.LeaderAware reconciler.LeaderAwareFuncs diff --git a/pkg/resolution/resolver/git/resolver.go b/pkg/resolution/resolver/git/resolver.go index c8294de862f..b0226e2bebc 100644 --- a/pkg/resolution/resolver/git/resolver.go +++ b/pkg/resolution/resolver/git/resolver.go @@ -73,6 +73,8 @@ const ( var _ framework.Resolver = &Resolver{} // Resolver implements a framework.Resolver that can fetch files from git. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resolver/git.Resolver] instead. type Resolver struct { kubeClient kubernetes.Interface logger *zap.SugaredLogger diff --git a/pkg/resolution/resolver/http/resolver.go b/pkg/resolution/resolver/http/resolver.go index 1b9c9e7c921..88447f43ba1 100644 --- a/pkg/resolution/resolver/http/resolver.go +++ b/pkg/resolution/resolver/http/resolver.go @@ -59,6 +59,8 @@ const ( ) // Resolver implements a framework.Resolver that can fetch files from an HTTP URL +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resolver/http.Resolver] instead. type Resolver struct { kubeClient kubernetes.Interface logger *zap.SugaredLogger diff --git a/pkg/resolution/resolver/hub/resolver.go b/pkg/resolution/resolver/hub/resolver.go index a4f11726f99..db2d9d29413 100644 --- a/pkg/resolution/resolver/hub/resolver.go +++ b/pkg/resolution/resolver/hub/resolver.go @@ -46,6 +46,8 @@ const ( ) // Resolver implements a framework.Resolver that can fetch files from OCI bundles. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resolver/hub.Resolver] instead. type Resolver struct { // TektonHubURL is the URL for hub resolver with type tekton TektonHubURL string diff --git a/pkg/resolution/resource/crd_resource.go b/pkg/resolution/resource/crd_resource.go index 39e41692075..9e1281a63a7 100644 --- a/pkg/resolution/resource/crd_resource.go +++ b/pkg/resolution/resource/crd_resource.go @@ -34,6 +34,8 @@ import ( // CRDRequester implements the Requester interface using // ResolutionRequest CRDs. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resource.CRDRequester] instead. type CRDRequester struct { clientset rrclient.Interface lister rrlisters.ResolutionRequestLister @@ -43,6 +45,8 @@ type CRDRequester struct { // ResolutionRequest CRD objects to mediate between the caller who wants a // resource (e.g. Tekton Pipelines) and the responder who can fetch // it (e.g. the gitresolver) +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resource.NewCRDRequester] instead. func NewCRDRequester(clientset rrclient.Interface, lister rrlisters.ResolutionRequestLister) *CRDRequester { return &CRDRequester{clientset, lister} } diff --git a/pkg/resolution/resource/request.go b/pkg/resolution/resource/request.go index 792267ad36f..a3d8a967be5 100644 --- a/pkg/resolution/resource/request.go +++ b/pkg/resolution/resource/request.go @@ -21,6 +21,8 @@ import v1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" var _ Request = &BasicRequest{} // BasicRequest holds the fields needed to submit a new resource request. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resource.BasicRequest] instead. type BasicRequest struct { name string namespace string @@ -29,6 +31,8 @@ type BasicRequest struct { // NewRequest returns an instance of a BasicRequest with the given name, // namespace and params. +// +// Deprecated: Use [github.com/tektoncd/pipeline/pkg/remoteresolution/resource.NewRequest] instead. func NewRequest(name, namespace string, params v1.Params) Request { return &BasicRequest{name, namespace, params} }