mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-12 05:33:11 +01:00
chore: fix linter issues
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
This commit is contained in:
parent
ed6cc19d29
commit
8cd2a2e1ac
@ -50,6 +50,7 @@ func (e *ExtendedClient) refreshTTL(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Get behaves like the original Get method, but uses a cache for secrets
|
||||
func (e *ExtendedClient) Get(
|
||||
ctx context.Context,
|
||||
key client.ObjectKey,
|
||||
@ -139,6 +140,7 @@ func (e *ExtendedClient) RemoveSecret(key client.ObjectKey) {
|
||||
}
|
||||
}
|
||||
|
||||
// Update behaves like the original Update method, but on secrets it removes the secret from the cache
|
||||
func (e *ExtendedClient) Update(
|
||||
ctx context.Context,
|
||||
obj client.Object,
|
||||
@ -157,6 +159,7 @@ func (e *ExtendedClient) Update(
|
||||
return e.Client.Update(ctx, obj, opts...)
|
||||
}
|
||||
|
||||
// Delete behaves like the original Delete method, but on secrets it removes the secret from the cache
|
||||
func (e *ExtendedClient) Delete(
|
||||
ctx context.Context,
|
||||
obj client.Object,
|
||||
@ -175,6 +178,7 @@ func (e *ExtendedClient) Delete(
|
||||
return e.Client.Delete(ctx, obj, opts...)
|
||||
}
|
||||
|
||||
// Patch behaves like the original Patch method, but on secrets it removes the secret from the cache
|
||||
func (e *ExtendedClient) Patch(
|
||||
ctx context.Context,
|
||||
obj client.Object,
|
||||
|
||||
@ -1,15 +1,16 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/utils/ptr"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client/fake"
|
||||
"time"
|
||||
|
||||
v1 "github.com/cloudnative-pg/plugin-barman-cloud/api/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/utils/ptr"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client/fake"
|
||||
|
||||
v1 "github.com/cloudnative-pg/plugin-barman-cloud/api/v1"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
@ -165,14 +165,12 @@ func reconcilePod(
|
||||
request *lifecycle.OperatorLifecycleRequest,
|
||||
pluginConfiguration *config.PluginConfiguration,
|
||||
) (*lifecycle.OperatorLifecycleResponse, error) {
|
||||
contextLogger := log.FromContext(ctx).WithName("lifecycle")
|
||||
|
||||
pod, err := decoder.DecodePodJSON(request.GetObjectDefinition())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
contextLogger = log.FromContext(ctx).WithName("plugin-barman-cloud-lifecycle").
|
||||
contextLogger := log.FromContext(ctx).WithName("plugin-barman-cloud-lifecycle").
|
||||
WithValues("podName", pod.Name)
|
||||
|
||||
mutatedPod := pod.DeepCopy()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user