chore: maker linter happy

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
This commit is contained in:
Leonardo Cecchi 2024-10-02 09:41:41 +02:00
parent d8198b8bfb
commit 8bd56842b1
6 changed files with 13 additions and 12 deletions

View File

@ -131,4 +131,4 @@ issues:
- test - test
exclude-files: exclude-files:
- zz_generated.* - zz_generated.*
- internal/controller/suite_test.go - internal/operator/controller/suite_test.go

View File

@ -23,7 +23,7 @@ func main() {
logFlags.ConfigureLogging() logFlags.ConfigureLogging()
return nil return nil
}, },
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, _ []string) error {
requiredSettings := []string{ requiredSettings := []string{
"namespace", "namespace",
"barman-object-name", "barman-object-name",

View File

@ -9,6 +9,7 @@ import (
"github.com/spf13/viper" "github.com/spf13/viper"
"k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
ctrl "sigs.k8s.io/controller-runtime" ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client"
@ -17,15 +18,14 @@ import (
barmancloudv1 "github.com/cloudnative-pg/plugin-barman-cloud/api/v1" barmancloudv1 "github.com/cloudnative-pg/plugin-barman-cloud/api/v1"
) )
var ( var scheme = runtime.NewScheme()
scheme = runtime.NewScheme()
)
func init() { func init() {
_ = barmancloudv1.AddToScheme(scheme) utilruntime.Must(barmancloudv1.AddToScheme(scheme))
_ = cnpgv1.AddToScheme(scheme) utilruntime.Must(cnpgv1.AddToScheme(scheme))
} }
// Start starts the sidecar informers and CNPG-i server
func Start(ctx context.Context) error { func Start(ctx context.Context) error {
setupLog := log.FromContext(ctx) setupLog := log.FromContext(ctx)
setupLog.Info("Starting barman cloud instance plugin") setupLog.Info("Starting barman cloud instance plugin")

View File

@ -9,9 +9,10 @@ import (
"github.com/cloudnative-pg/cnpg-i-machinery/pkg/pluginhelper/object" "github.com/cloudnative-pg/cnpg-i-machinery/pkg/pluginhelper/object"
"github.com/cloudnative-pg/cnpg-i/pkg/lifecycle" "github.com/cloudnative-pg/cnpg-i/pkg/lifecycle"
"github.com/cloudnative-pg/machinery/pkg/log" "github.com/cloudnative-pg/machinery/pkg/log"
"github.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/metadata"
"github.com/spf13/viper" "github.com/spf13/viper"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
"github.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/metadata"
) )
// LifecycleImplementation is the implementation of the lifecycle handler // LifecycleImplementation is the implementation of the lifecycle handler

View File

@ -43,9 +43,7 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth" _ "k8s.io/client-go/plugin/pkg/client/auth"
) )
var ( var scheme = runtime.NewScheme()
scheme = runtime.NewScheme()
)
func init() { func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme)) utilruntime.Must(clientgoscheme.AddToScheme(scheme))

View File

@ -11,7 +11,9 @@ resources:
- ../config/rbac - ../config/rbac
images: images:
- name: plugin-barman-cloud - name: plugin-barman-cloud
newName: kind.local/github.com/cloudnative-pg/plugin-barman-cloud/cmd/operator
newTag: 634ab82d4f8b68ffada6033b7dff817bbed61a2fec8e05f9ebf74f5bedafb0dd
secretGenerator: secretGenerator:
- literals: - literals:
- SIDECAR_IMAGE=plugin-sidecar - SIDECAR_IMAGE=kind.local/github.com/cloudnative-pg/plugin-barman-cloud/cmd/instance:7173a2dcf3ce74e982ca3d35053de40fcec67b31d607a0d12547b4f9d09c535c
name: plugin-barman-cloud name: plugin-barman-cloud