Chore: Use Kind().GroupVersionResource() (#113133)
This commit is contained in:
@@ -14,7 +14,6 @@ import (
|
||||
k8serrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/client-go/dynamic"
|
||||
|
||||
"github.com/grafana/grafana/apps/shorturl/pkg/apis/shorturl/v1alpha1"
|
||||
@@ -326,11 +325,7 @@ func (srv *CleanUpService) deleteStaleKubernetesShortURLs(ctx context.Context) {
|
||||
}
|
||||
|
||||
// Set up the GroupVersionResource for shortURLs
|
||||
gvr := schema.GroupVersionResource{
|
||||
Group: v1alpha1.ShortURLKind().Group(),
|
||||
Version: v1alpha1.ShortURLKind().Version(),
|
||||
Resource: v1alpha1.ShortURLKind().Plural(),
|
||||
}
|
||||
gvr := v1alpha1.ShortURLKind().GroupVersionResource()
|
||||
|
||||
// Calculate the expiration time
|
||||
expirationTime := time.Now().Add(-time.Duration(srv.Cfg.ShortLinkExpiration*24) * time.Hour)
|
||||
|
||||
Reference in New Issue
Block a user