From 384fd6ac9e1bb30a25e5043205d6347bcc365fdd Mon Sep 17 00:00:00 2001 From: jwierzbo Date: Tue, 12 Dec 2023 16:39:35 +0100 Subject: [PATCH] Linter - sharedApi (#1537) --- .golangci.yaml | 8 +++ cmd/admin.go | 2 +- cmd/lifecycle.go | 4 +- cmd/lifecycle_probes.go | 4 +- cmd/lifecycle_startup.go | 4 +- pkg/apis/backup/v1/backup_status.go | 6 +-- pkg/apis/deployment/v1/architecture.go | 2 +- pkg/apis/deployment/v1/authentication_spec.go | 2 +- pkg/apis/deployment/v1/bootstrap.go | 2 +- .../v1/cluster_synchronization_spec.go | 4 +- .../deployment/v1/deployment_metrics_spec.go | 2 +- pkg/apis/deployment/v1/deployment_spec.go | 2 +- pkg/apis/deployment/v1/hashes.go | 14 +++--- pkg/apis/deployment/v1/license_spec.go | 2 +- pkg/apis/deployment/v1/member_status.go | 2 +- pkg/apis/deployment/v1/rocksdb_spec.go | 2 +- .../v1/server_group_init_containers.go | 6 +-- .../v1/server_group_security_context_spec.go | 2 +- ...server_group_security_context_spec_test.go | 2 +- pkg/apis/deployment/v1/server_group_spec.go | 2 +- pkg/apis/deployment/v1/server_group_volume.go | 12 ++--- .../v1/server_group_volume_mount.go | 8 +-- .../deployment/v1/server_group_volume_test.go | 4 +- .../deployment/v1/sync_authentication_spec.go | 2 +- .../v1/sync_external_access_spec.go | 2 +- .../deployment/v1/sync_monitoring_spec.go | 2 +- pkg/apis/deployment/v1/tls_sni_spec.go | 8 +-- pkg/apis/deployment/v1/tls_spec.go | 2 +- pkg/apis/deployment/v2alpha1/architecture.go | 2 +- .../v2alpha1/authentication_spec.go | 2 +- pkg/apis/deployment/v2alpha1/bootstrap.go | 2 +- .../v2alpha1/cluster_synchronization_spec.go | 4 +- .../v2alpha1/deployment_metrics_spec.go | 2 +- .../deployment/v2alpha1/deployment_spec.go | 2 +- pkg/apis/deployment/v2alpha1/hashes.go | 14 +++--- pkg/apis/deployment/v2alpha1/license_spec.go | 2 +- pkg/apis/deployment/v2alpha1/member_status.go | 2 +- pkg/apis/deployment/v2alpha1/rocksdb_spec.go | 2 +- .../v2alpha1/server_group_init_containers.go | 6 +-- .../server_group_security_context_spec.go | 2 +- ...server_group_security_context_spec_test.go | 2 +- .../deployment/v2alpha1/server_group_spec.go | 2 +- .../v2alpha1/server_group_volume.go | 12 ++--- .../v2alpha1/server_group_volume_mount.go | 8 +-- .../v2alpha1/server_group_volume_test.go | 4 +- .../v2alpha1/sync_authentication_spec.go | 2 +- .../v2alpha1/sync_external_access_spec.go | 2 +- .../v2alpha1/sync_monitoring_spec.go | 2 +- pkg/apis/deployment/v2alpha1/tls_sni_spec.go | 8 +-- pkg/apis/deployment/v2alpha1/tls_spec.go | 2 +- pkg/apis/ml/v1alpha1/batchjob_spec.go | 2 +- pkg/apis/ml/v1alpha1/cronjob_spec.go | 2 +- pkg/apis/ml/v1alpha1/extension_spec.go | 2 +- .../ml/v1alpha1/extension_spec_deployment.go | 2 +- .../extension_spec_deployment_component.go | 2 +- .../extension_spec_deployment_service.go | 2 +- .../ml/v1alpha1/extension_spec_init_job.go | 2 +- .../extension_spec_metadata_service.go | 2 +- pkg/apis/ml/v1alpha1/extension_status.go | 4 +- .../v1alpha1/extension_status_arangodb_ref.go | 4 +- .../extension_status_metadata_service.go | 4 +- pkg/apis/ml/v1alpha1/storage_spec.go | 2 +- pkg/apis/ml/v1alpha1/storage_spec_backend.go | 2 +- .../ml/v1alpha1/storage_spec_backend_s3.go | 2 +- pkg/apis/ml/v1alpha1/storage_spec_mode.go | 2 +- .../ml/v1alpha1/storage_spec_mode_sidecar.go | 2 +- .../v1/endpoint_authentication_spec.go | 2 +- pkg/apis/replication/v1/endpoint_spec.go | 2 +- pkg/apis/replication/v1/endpoint_tls_spec.go | 2 +- .../v2alpha1/endpoint_authentication_spec.go | 2 +- .../replication/v2alpha1/endpoint_spec.go | 2 +- .../replication/v2alpha1/endpoint_tls_spec.go | 2 +- pkg/apis/shared/v1/core_container_spec.go | 2 +- pkg/apis/shared/v1/core_pod_spec.go | 2 +- pkg/apis/shared/v1/image.go | 2 +- pkg/apis/shared/v1/object.go | 2 +- .../storage/v1alpha/storage_class_spec.go | 2 +- pkg/deployment/client/client_cache.go | 2 +- pkg/deployment/context_impl.go | 2 +- pkg/deployment/deployment_affinity_test.go | 2 +- pkg/deployment/deployment_core_test.go | 2 +- pkg/deployment/deployment_encryption_test.go | 2 +- pkg/deployment/deployment_features_test.go | 2 +- pkg/deployment/deployment_image_test.go | 2 +- pkg/deployment/deployment_metrics_test.go | 2 +- pkg/deployment/deployment_pod_probe_test.go | 2 +- .../deployment_pod_resources_test.go | 2 +- pkg/deployment/deployment_pod_sync_test.go | 2 +- pkg/deployment/deployment_pod_tls_sni_test.go | 2 +- pkg/deployment/deployment_pod_volumes_test.go | 2 +- pkg/deployment/deployment_suite_test.go | 2 +- pkg/deployment/images.go | 2 +- pkg/deployment/images_test.go | 2 +- pkg/deployment/members.go | 2 +- pkg/deployment/pod/affinity.go | 4 +- pkg/deployment/pod/encryption.go | 4 +- pkg/deployment/pod/jwt.go | 4 +- pkg/deployment/pod/security.go | 2 +- pkg/deployment/pod/sni.go | 4 +- pkg/deployment/pod/timezone.go | 4 +- pkg/deployment/pod/tls.go | 4 +- pkg/deployment/reconcile/action_add_member.go | 4 +- .../reconcile/action_set_condition_v2.go | 22 ++++---- .../action_set_member_condition_v2.go | 22 ++++---- .../reconcile/condition_member_recreation.go | 6 +-- .../reconcile/plan_builder_clean_out.go | 6 +-- .../reconcile/plan_builder_cluster.go | 6 +-- .../reconcile/plan_builder_common.go | 4 +- .../reconcile/plan_builder_encryption.go | 4 +- pkg/deployment/reconcile/plan_builder_high.go | 18 +++---- .../reconcile/plan_builder_license.go | 6 +-- .../reconcile/plan_builder_maintenance.go | 14 +++--- .../reconcile/plan_builder_member_recovery.go | 6 +-- .../reconcile/plan_builder_rotate_upgrade.go | 24 ++++----- .../reconcile/plan_builder_scale.go | 8 +-- .../reconcile/plan_builder_storage.go | 6 +-- pkg/deployment/reconcile/plan_builder_sync.go | 6 +-- pkg/deployment/reconcile/plan_builder_test.go | 50 +++++++++---------- pkg/deployment/reconcile/plan_builder_tls.go | 2 +- .../reconcile/plan_builder_volume.go | 10 ++-- .../reconcile/plan_builder_volume_test.go | 2 +- pkg/deployment/resources/exporter.go | 4 +- pkg/deployment/resources/internal_exporter.go | 2 +- pkg/deployment/resources/pod_creator.go | 2 +- .../resources/pod_creator_agent_args_test.go | 2 +- .../resources/pod_creator_arangod.go | 2 +- .../pod_creator_coordinator_args_test.go | 2 +- .../pod_creator_dbserver_args_test.go | 2 +- .../resources/pod_creator_single_args_test.go | 2 +- pkg/deployment/resources/pod_creator_sync.go | 2 +- pkg/deployment/resources/pod_inspector.go | 2 +- pkg/deployment/resources/pod_termination.go | 2 +- pkg/deployment/resources/secrets.go | 2 +- pkg/deployment/resources/services.go | 2 +- .../rotation/arangod_containers_test.go | 2 +- .../rotation/arangod_volume_mounts.go | 2 +- pkg/deployment/rotation/arangod_volumes.go | 2 +- .../rotation/arangod_volumes_test.go | 2 +- pkg/deployment/server_api.go | 4 +- pkg/exporter/monitor.go | 2 +- pkg/handlers/backup/status.go | 6 +-- pkg/handlers/job/handler.go | 2 +- pkg/replication/sync_client.go | 2 +- pkg/storage/pv_creator.go | 2 +- pkg/util/arangod/client.go | 2 +- pkg/util/k8sutil/affinity.go | 4 +- pkg/util/k8sutil/affinity_test.go | 4 +- pkg/util/k8sutil/dns.go | 4 +- pkg/util/k8sutil/images.go | 2 +- pkg/util/k8sutil/images_test.go | 2 +- pkg/util/k8sutil/names_test.go | 4 +- pkg/util/k8sutil/pods.go | 2 +- pkg/util/k8sutil/probes/probes.go | 2 +- pkg/util/k8sutil/probes/probes_test.go | 2 +- pkg/util/k8sutil/services.go | 2 +- pkg/util/k8sutil/tls/tls.go | 4 +- pkg/util/k8sutil/version_check.go | 2 +- pkg/util/svc/service.go | 2 +- 158 files changed, 323 insertions(+), 315 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index d510cefe2..9c23d3d33 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -35,8 +35,16 @@ linters-settings: alias: batch - pkg: k8s.io/api/storage/v1 alias: storage + - pkg: github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared + alias: sharedReconcile - pkg: k8s.io/api/policy/v1 alias: policy + - pkg: github.com/arangodb/kube-arangodb/pkg/apis/shared/v1 + alias: sharedApi + - pkg: github.com/arangodb/kube-arangodb/pkg/apis/shared + alias: shared + - pkg: github.com/arangodb/kube-arangodb/pkg/handlers/enterprise/ml/shared + alias: mlShared - pkg: github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1 alias: mlApi gci: diff --git a/cmd/admin.go b/cmd/admin.go index fadecc673..5726f0757 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -42,7 +42,7 @@ import ( "github.com/arangodb/go-driver/v2/connection" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/constants" "github.com/arangodb/kube-arangodb/pkg/util/errors" "github.com/arangodb/kube-arangodb/pkg/util/globals" diff --git a/cmd/lifecycle.go b/cmd/lifecycle.go index d100a8daa..62a681c57 100644 --- a/cmd/lifecycle.go +++ b/cmd/lifecycle.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ import ( "github.com/spf13/cobra" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/handlers/utils" "github.com/arangodb/kube-arangodb/pkg/util/constants" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil/kerrors" diff --git a/cmd/lifecycle_probes.go b/cmd/lifecycle_probes.go index 87fd2952e..fa0f121c9 100644 --- a/cmd/lifecycle_probes.go +++ b/cmd/lifecycle_probes.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ import ( "github.com/arangodb/go-driver/jwt" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/client" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/deployment/pod" diff --git a/cmd/lifecycle_startup.go b/cmd/lifecycle_startup.go index e30e103bf..a4e364f1d 100644 --- a/cmd/lifecycle_startup.go +++ b/cmd/lifecycle_startup.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import ( "github.com/spf13/cobra" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) var cmdLifecycleStartup = &cobra.Command{ diff --git a/pkg/apis/backup/v1/backup_status.go b/pkg/apis/backup/v1/backup_status.go index 7d4277c73..02818aea0 100644 --- a/pkg/apis/backup/v1/backup_status.go +++ b/pkg/apis/backup/v1/backup_status.go @@ -23,7 +23,7 @@ package v1 import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" - shared "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" ) // ArangoBackupStatus contains the status part of @@ -66,8 +66,8 @@ type ArangoBackupDetails struct { Downloaded *bool `json:"downloaded,omitempty"` Imported *bool `json:"imported,omitempty"` // CreationTimestamp ArangoBackup Custom Resource creation time in UTC - CreationTimestamp meta.Time `json:"createdAt"` - Keys shared.HashList `json:"keys,omitempty"` + CreationTimestamp meta.Time `json:"createdAt"` + Keys sharedApi.HashList `json:"keys,omitempty"` } func (a *ArangoBackupDetails) Equal(b *ArangoBackupDetails) bool { diff --git a/pkg/apis/deployment/v1/architecture.go b/pkg/apis/deployment/v1/architecture.go index 3d8731f17..3c32d9596 100644 --- a/pkg/apis/deployment/v1/architecture.go +++ b/pkg/apis/deployment/v1/architecture.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) // ArangoDeploymentArchitecture defines the list of supported architectures. diff --git a/pkg/apis/deployment/v1/authentication_spec.go b/pkg/apis/deployment/v1/authentication_spec.go index 3e1a7b86b..65880ea83 100644 --- a/pkg/apis/deployment/v1/authentication_spec.go +++ b/pkg/apis/deployment/v1/authentication_spec.go @@ -21,7 +21,7 @@ package v1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v1/bootstrap.go b/pkg/apis/deployment/v1/bootstrap.go index b64ba7422..a757298a1 100644 --- a/pkg/apis/deployment/v1/bootstrap.go +++ b/pkg/apis/deployment/v1/bootstrap.go @@ -21,7 +21,7 @@ package v1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v1/cluster_synchronization_spec.go b/pkg/apis/deployment/v1/cluster_synchronization_spec.go index 2a17a9595..3539bbf49 100644 --- a/pkg/apis/deployment/v1/cluster_synchronization_spec.go +++ b/pkg/apis/deployment/v1/cluster_synchronization_spec.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ package v1 import ( "github.com/pkg/errors" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) type ArangoClusterSynchronizationSpec struct { diff --git a/pkg/apis/deployment/v1/deployment_metrics_spec.go b/pkg/apis/deployment/v1/deployment_metrics_spec.go index ecb807861..2e3ee2894 100644 --- a/pkg/apis/deployment/v1/deployment_metrics_spec.go +++ b/pkg/apis/deployment/v1/deployment_metrics_spec.go @@ -24,7 +24,7 @@ package v1 import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" ) diff --git a/pkg/apis/deployment/v1/deployment_spec.go b/pkg/apis/deployment/v1/deployment_spec.go index 6c6ad87e0..5db0696e5 100644 --- a/pkg/apis/deployment/v1/deployment_spec.go +++ b/pkg/apis/deployment/v1/deployment_spec.go @@ -28,7 +28,7 @@ import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/handlers/utils" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" diff --git a/pkg/apis/deployment/v1/hashes.go b/pkg/apis/deployment/v1/hashes.go index fd7e84e49..7a2c2c3a4 100644 --- a/pkg/apis/deployment/v1/hashes.go +++ b/pkg/apis/deployment/v1/hashes.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ package v1 -import shared "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" +import sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" type DeploymentStatusHashes struct { Encryption DeploymentStatusHashesEncryption `json:"rocksDBEncryption,omitempty"` @@ -29,21 +29,21 @@ type DeploymentStatusHashes struct { } type DeploymentStatusHashesEncryption struct { - Keys shared.HashList `json:"keys,omitempty"` + Keys sharedApi.HashList `json:"keys,omitempty"` Propagated bool `json:"propagated,omitempty"` } type DeploymentStatusHashesTLS struct { - CA *string `json:"ca,omitempty"` - Truststore shared.HashList `json:"truststore,omitempty"` + CA *string `json:"ca,omitempty"` + Truststore sharedApi.HashList `json:"truststore,omitempty"` Propagated bool `json:"propagated,omitempty"` } type DeploymentStatusHashesJWT struct { - Active string `json:"active,omitempty"` - Passive shared.HashList `json:"passive,omitempty"` + Active string `json:"active,omitempty"` + Passive sharedApi.HashList `json:"passive,omitempty"` Propagated bool `json:"propagated,omitempty"` } diff --git a/pkg/apis/deployment/v1/license_spec.go b/pkg/apis/deployment/v1/license_spec.go index eb5eb2801..af8fbb37f 100644 --- a/pkg/apis/deployment/v1/license_spec.go +++ b/pkg/apis/deployment/v1/license_spec.go @@ -21,7 +21,7 @@ package v1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" ) diff --git a/pkg/apis/deployment/v1/member_status.go b/pkg/apis/deployment/v1/member_status.go index d275977f9..f46b198c7 100644 --- a/pkg/apis/deployment/v1/member_status.go +++ b/pkg/apis/deployment/v1/member_status.go @@ -29,7 +29,7 @@ import ( driver "github.com/arangodb/go-driver" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/strings" ) diff --git a/pkg/apis/deployment/v1/rocksdb_spec.go b/pkg/apis/deployment/v1/rocksdb_spec.go index 999a3d711..0876f109f 100644 --- a/pkg/apis/deployment/v1/rocksdb_spec.go +++ b/pkg/apis/deployment/v1/rocksdb_spec.go @@ -21,7 +21,7 @@ package v1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v1/server_group_init_containers.go b/pkg/apis/deployment/v1/server_group_init_containers.go index 23ecacfc0..262c6c37a 100644 --- a/pkg/apis/deployment/v1/server_group_init_containers.go +++ b/pkg/apis/deployment/v1/server_group_init_containers.go @@ -23,8 +23,8 @@ package v1 import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" - sharedv1 "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) @@ -51,7 +51,7 @@ func ValidateServerGroupInitContainerName(name string) error { return errors.Newf("InitContainer name %s is restricted", name) } - return sharedv1.AsKubernetesResourceName(&name).Validate() + return sharedApi.AsKubernetesResourceName(&name).Validate() } type ServerGroupInitContainerMode string diff --git a/pkg/apis/deployment/v1/server_group_security_context_spec.go b/pkg/apis/deployment/v1/server_group_security_context_spec.go index 2be7858c6..d76cce0d7 100644 --- a/pkg/apis/deployment/v1/server_group_security_context_spec.go +++ b/pkg/apis/deployment/v1/server_group_security_context_spec.go @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" ) diff --git a/pkg/apis/deployment/v1/server_group_security_context_spec_test.go b/pkg/apis/deployment/v1/server_group_security_context_spec_test.go index 4501999e2..bb66f3963 100644 --- a/pkg/apis/deployment/v1/server_group_security_context_spec_test.go +++ b/pkg/apis/deployment/v1/server_group_security_context_spec_test.go @@ -29,7 +29,7 @@ import ( core "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" ) diff --git a/pkg/apis/deployment/v1/server_group_spec.go b/pkg/apis/deployment/v1/server_group_spec.go index 3ef30d240..8db453852 100644 --- a/pkg/apis/deployment/v1/server_group_spec.go +++ b/pkg/apis/deployment/v1/server_group_spec.go @@ -28,7 +28,7 @@ import ( core "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" arangodOptions "github.com/arangodb/kube-arangodb/pkg/util/arangod/options" arangosyncOptions "github.com/arangodb/kube-arangodb/pkg/util/arangosync/options" diff --git a/pkg/apis/deployment/v1/server_group_volume.go b/pkg/apis/deployment/v1/server_group_volume.go index 52d55551b..015582eb3 100644 --- a/pkg/apis/deployment/v1/server_group_volume.go +++ b/pkg/apis/deployment/v1/server_group_volume.go @@ -26,8 +26,8 @@ import ( core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" - sharedv1 "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) @@ -160,7 +160,7 @@ func (s *ServerGroupSpecVolume) Validate() error { } return shared.WithErrors( - shared.PrefixResourceErrors("name", sharedv1.AsKubernetesResourceName(&s.Name).Validate()), + shared.PrefixResourceErrors("name", sharedApi.AsKubernetesResourceName(&s.Name).Validate()), shared.PrefixResourceErrors("secret", s.Secret.Validate()), shared.PrefixResourceErrors("configMap", s.ConfigMap.Validate()), shared.PrefixResourceErrors("emptyDir", s.EmptyDir.Validate()), @@ -265,7 +265,7 @@ func (s *ServerGroupSpecVolumeSecret) Validate() error { } return shared.WithErrors( - shared.PrefixResourceError("secretName", sharedv1.AsKubernetesResourceName(&q.SecretName).Validate()), + shared.PrefixResourceError("secretName", sharedApi.AsKubernetesResourceName(&q.SecretName).Validate()), ) } @@ -298,7 +298,7 @@ func (s *ServerGroupSpecVolumeConfigMap) Validate() error { } return shared.WithErrors( - shared.PrefixResourceError("name", sharedv1.AsKubernetesResourceName(&q.Name).Validate()), + shared.PrefixResourceError("name", sharedApi.AsKubernetesResourceName(&q.Name).Validate()), ) } @@ -363,7 +363,7 @@ func (s *ServerGroupSpecVolumePersistentVolumeClaim) Validate() error { } return shared.WithErrors( - shared.PrefixResourceError("claimName", sharedv1.AsKubernetesResourceName(&q.ClaimName).Validate()), + shared.PrefixResourceError("claimName", sharedApi.AsKubernetesResourceName(&q.ClaimName).Validate()), ) } diff --git a/pkg/apis/deployment/v1/server_group_volume_mount.go b/pkg/apis/deployment/v1/server_group_volume_mount.go index c4dd934e5..bb767f040 100644 --- a/pkg/apis/deployment/v1/server_group_volume_mount.go +++ b/pkg/apis/deployment/v1/server_group_volume_mount.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,8 +25,8 @@ import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" - sharedv1 "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" ) type ServerGroupSpecVolumeMounts []ServerGroupSpecVolumeMount @@ -67,6 +67,6 @@ func (s *ServerGroupSpecVolumeMount) Validate() error { } return shared.WithErrors( - shared.PrefixResourceError("name", sharedv1.AsKubernetesResourceName(&s.Name).Validate()), + shared.PrefixResourceError("name", sharedApi.AsKubernetesResourceName(&s.Name).Validate()), ) } diff --git a/pkg/apis/deployment/v1/server_group_volume_test.go b/pkg/apis/deployment/v1/server_group_volume_test.go index be0f93367..daa334b6f 100644 --- a/pkg/apis/deployment/v1/server_group_volume_test.go +++ b/pkg/apis/deployment/v1/server_group_volume_test.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/require" core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) const ( diff --git a/pkg/apis/deployment/v1/sync_authentication_spec.go b/pkg/apis/deployment/v1/sync_authentication_spec.go index 4a5bf6c8f..2060b07f3 100644 --- a/pkg/apis/deployment/v1/sync_authentication_spec.go +++ b/pkg/apis/deployment/v1/sync_authentication_spec.go @@ -21,7 +21,7 @@ package v1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v1/sync_external_access_spec.go b/pkg/apis/deployment/v1/sync_external_access_spec.go index 64b1f3274..67917d4a2 100644 --- a/pkg/apis/deployment/v1/sync_external_access_spec.go +++ b/pkg/apis/deployment/v1/sync_external_access_spec.go @@ -25,7 +25,7 @@ import ( "net/url" "strconv" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v1/sync_monitoring_spec.go b/pkg/apis/deployment/v1/sync_monitoring_spec.go index 11f0a2606..e4dc9a3be 100644 --- a/pkg/apis/deployment/v1/sync_monitoring_spec.go +++ b/pkg/apis/deployment/v1/sync_monitoring_spec.go @@ -21,7 +21,7 @@ package v1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v1/tls_sni_spec.go b/pkg/apis/deployment/v1/tls_sni_spec.go index ce8ce0ecc..911857253 100644 --- a/pkg/apis/deployment/v1/tls_sni_spec.go +++ b/pkg/apis/deployment/v1/tls_sni_spec.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ package v1 import ( - shared "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) @@ -34,7 +34,7 @@ func (s TLSSNISpec) Validate() error { mapped := map[string]interface{}{} for key, values := range s.Mapping { - if err := shared.IsValidName(key); err != nil { + if err := sharedApi.IsValidName(key); err != nil { return err } @@ -46,7 +46,7 @@ func (s TLSSNISpec) Validate() error { // Mark value as existing mapped[value] = nil - if err := shared.IsValidDomain(value); err != nil { + if err := sharedApi.IsValidDomain(value); err != nil { return err } } diff --git a/pkg/apis/deployment/v1/tls_spec.go b/pkg/apis/deployment/v1/tls_spec.go index 315fdb967..4bca0053f 100644 --- a/pkg/apis/deployment/v1/tls_spec.go +++ b/pkg/apis/deployment/v1/tls_spec.go @@ -23,7 +23,7 @@ package v1 import ( "net" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" "github.com/arangodb/kube-arangodb/pkg/util/validation" diff --git a/pkg/apis/deployment/v2alpha1/architecture.go b/pkg/apis/deployment/v2alpha1/architecture.go index dfcffbc41..3d62dec2a 100644 --- a/pkg/apis/deployment/v2alpha1/architecture.go +++ b/pkg/apis/deployment/v2alpha1/architecture.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) // ArangoDeploymentArchitecture defines the list of supported architectures. diff --git a/pkg/apis/deployment/v2alpha1/authentication_spec.go b/pkg/apis/deployment/v2alpha1/authentication_spec.go index e126a4e23..a2a5cb15b 100644 --- a/pkg/apis/deployment/v2alpha1/authentication_spec.go +++ b/pkg/apis/deployment/v2alpha1/authentication_spec.go @@ -21,7 +21,7 @@ package v2alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v2alpha1/bootstrap.go b/pkg/apis/deployment/v2alpha1/bootstrap.go index b910304cd..a8a72e5f1 100644 --- a/pkg/apis/deployment/v2alpha1/bootstrap.go +++ b/pkg/apis/deployment/v2alpha1/bootstrap.go @@ -21,7 +21,7 @@ package v2alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v2alpha1/cluster_synchronization_spec.go b/pkg/apis/deployment/v2alpha1/cluster_synchronization_spec.go index a4ccd487d..b76fb084a 100644 --- a/pkg/apis/deployment/v2alpha1/cluster_synchronization_spec.go +++ b/pkg/apis/deployment/v2alpha1/cluster_synchronization_spec.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ package v2alpha1 import ( "github.com/pkg/errors" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) type ArangoClusterSynchronizationSpec struct { diff --git a/pkg/apis/deployment/v2alpha1/deployment_metrics_spec.go b/pkg/apis/deployment/v2alpha1/deployment_metrics_spec.go index f8047c1ab..14137f097 100644 --- a/pkg/apis/deployment/v2alpha1/deployment_metrics_spec.go +++ b/pkg/apis/deployment/v2alpha1/deployment_metrics_spec.go @@ -24,7 +24,7 @@ package v2alpha1 import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" ) diff --git a/pkg/apis/deployment/v2alpha1/deployment_spec.go b/pkg/apis/deployment/v2alpha1/deployment_spec.go index 4863e524a..400fe49a4 100644 --- a/pkg/apis/deployment/v2alpha1/deployment_spec.go +++ b/pkg/apis/deployment/v2alpha1/deployment_spec.go @@ -28,7 +28,7 @@ import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/handlers/utils" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" diff --git a/pkg/apis/deployment/v2alpha1/hashes.go b/pkg/apis/deployment/v2alpha1/hashes.go index fc5f2f40f..c88cdbe25 100644 --- a/pkg/apis/deployment/v2alpha1/hashes.go +++ b/pkg/apis/deployment/v2alpha1/hashes.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ package v2alpha1 -import shared "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" +import sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" type DeploymentStatusHashes struct { Encryption DeploymentStatusHashesEncryption `json:"rocksDBEncryption,omitempty"` @@ -29,21 +29,21 @@ type DeploymentStatusHashes struct { } type DeploymentStatusHashesEncryption struct { - Keys shared.HashList `json:"keys,omitempty"` + Keys sharedApi.HashList `json:"keys,omitempty"` Propagated bool `json:"propagated,omitempty"` } type DeploymentStatusHashesTLS struct { - CA *string `json:"ca,omitempty"` - Truststore shared.HashList `json:"truststore,omitempty"` + CA *string `json:"ca,omitempty"` + Truststore sharedApi.HashList `json:"truststore,omitempty"` Propagated bool `json:"propagated,omitempty"` } type DeploymentStatusHashesJWT struct { - Active string `json:"active,omitempty"` - Passive shared.HashList `json:"passive,omitempty"` + Active string `json:"active,omitempty"` + Passive sharedApi.HashList `json:"passive,omitempty"` Propagated bool `json:"propagated,omitempty"` } diff --git a/pkg/apis/deployment/v2alpha1/license_spec.go b/pkg/apis/deployment/v2alpha1/license_spec.go index 7d5294228..bc3618f4c 100644 --- a/pkg/apis/deployment/v2alpha1/license_spec.go +++ b/pkg/apis/deployment/v2alpha1/license_spec.go @@ -21,7 +21,7 @@ package v2alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" ) diff --git a/pkg/apis/deployment/v2alpha1/member_status.go b/pkg/apis/deployment/v2alpha1/member_status.go index 1be5c604b..5b8cade5d 100644 --- a/pkg/apis/deployment/v2alpha1/member_status.go +++ b/pkg/apis/deployment/v2alpha1/member_status.go @@ -29,7 +29,7 @@ import ( driver "github.com/arangodb/go-driver" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/strings" ) diff --git a/pkg/apis/deployment/v2alpha1/rocksdb_spec.go b/pkg/apis/deployment/v2alpha1/rocksdb_spec.go index 0b964a041..2d170f3de 100644 --- a/pkg/apis/deployment/v2alpha1/rocksdb_spec.go +++ b/pkg/apis/deployment/v2alpha1/rocksdb_spec.go @@ -21,7 +21,7 @@ package v2alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v2alpha1/server_group_init_containers.go b/pkg/apis/deployment/v2alpha1/server_group_init_containers.go index df4e9c6e3..e356df2af 100644 --- a/pkg/apis/deployment/v2alpha1/server_group_init_containers.go +++ b/pkg/apis/deployment/v2alpha1/server_group_init_containers.go @@ -23,8 +23,8 @@ package v2alpha1 import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" - sharedv1 "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) @@ -51,7 +51,7 @@ func ValidateServerGroupInitContainerName(name string) error { return errors.Newf("InitContainer name %s is restricted", name) } - return sharedv1.AsKubernetesResourceName(&name).Validate() + return sharedApi.AsKubernetesResourceName(&name).Validate() } type ServerGroupInitContainerMode string diff --git a/pkg/apis/deployment/v2alpha1/server_group_security_context_spec.go b/pkg/apis/deployment/v2alpha1/server_group_security_context_spec.go index 0ec453c45..e4f9edb53 100644 --- a/pkg/apis/deployment/v2alpha1/server_group_security_context_spec.go +++ b/pkg/apis/deployment/v2alpha1/server_group_security_context_spec.go @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" ) diff --git a/pkg/apis/deployment/v2alpha1/server_group_security_context_spec_test.go b/pkg/apis/deployment/v2alpha1/server_group_security_context_spec_test.go index 018569ba3..a5f0788ad 100644 --- a/pkg/apis/deployment/v2alpha1/server_group_security_context_spec_test.go +++ b/pkg/apis/deployment/v2alpha1/server_group_security_context_spec_test.go @@ -29,7 +29,7 @@ import ( core "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" ) diff --git a/pkg/apis/deployment/v2alpha1/server_group_spec.go b/pkg/apis/deployment/v2alpha1/server_group_spec.go index a04d1b8d0..1151e25d9 100644 --- a/pkg/apis/deployment/v2alpha1/server_group_spec.go +++ b/pkg/apis/deployment/v2alpha1/server_group_spec.go @@ -28,7 +28,7 @@ import ( core "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" arangodOptions "github.com/arangodb/kube-arangodb/pkg/util/arangod/options" arangosyncOptions "github.com/arangodb/kube-arangodb/pkg/util/arangosync/options" diff --git a/pkg/apis/deployment/v2alpha1/server_group_volume.go b/pkg/apis/deployment/v2alpha1/server_group_volume.go index 6527a6348..c227b6465 100644 --- a/pkg/apis/deployment/v2alpha1/server_group_volume.go +++ b/pkg/apis/deployment/v2alpha1/server_group_volume.go @@ -26,8 +26,8 @@ import ( core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" - sharedv1 "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) @@ -160,7 +160,7 @@ func (s *ServerGroupSpecVolume) Validate() error { } return shared.WithErrors( - shared.PrefixResourceErrors("name", sharedv1.AsKubernetesResourceName(&s.Name).Validate()), + shared.PrefixResourceErrors("name", sharedApi.AsKubernetesResourceName(&s.Name).Validate()), shared.PrefixResourceErrors("secret", s.Secret.Validate()), shared.PrefixResourceErrors("configMap", s.ConfigMap.Validate()), shared.PrefixResourceErrors("emptyDir", s.EmptyDir.Validate()), @@ -265,7 +265,7 @@ func (s *ServerGroupSpecVolumeSecret) Validate() error { } return shared.WithErrors( - shared.PrefixResourceError("secretName", sharedv1.AsKubernetesResourceName(&q.SecretName).Validate()), + shared.PrefixResourceError("secretName", sharedApi.AsKubernetesResourceName(&q.SecretName).Validate()), ) } @@ -298,7 +298,7 @@ func (s *ServerGroupSpecVolumeConfigMap) Validate() error { } return shared.WithErrors( - shared.PrefixResourceError("name", sharedv1.AsKubernetesResourceName(&q.Name).Validate()), + shared.PrefixResourceError("name", sharedApi.AsKubernetesResourceName(&q.Name).Validate()), ) } @@ -363,7 +363,7 @@ func (s *ServerGroupSpecVolumePersistentVolumeClaim) Validate() error { } return shared.WithErrors( - shared.PrefixResourceError("claimName", sharedv1.AsKubernetesResourceName(&q.ClaimName).Validate()), + shared.PrefixResourceError("claimName", sharedApi.AsKubernetesResourceName(&q.ClaimName).Validate()), ) } diff --git a/pkg/apis/deployment/v2alpha1/server_group_volume_mount.go b/pkg/apis/deployment/v2alpha1/server_group_volume_mount.go index bb303044e..2d0fddd66 100644 --- a/pkg/apis/deployment/v2alpha1/server_group_volume_mount.go +++ b/pkg/apis/deployment/v2alpha1/server_group_volume_mount.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,8 +25,8 @@ import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" - sharedv1 "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" ) type ServerGroupSpecVolumeMounts []ServerGroupSpecVolumeMount @@ -67,6 +67,6 @@ func (s *ServerGroupSpecVolumeMount) Validate() error { } return shared.WithErrors( - shared.PrefixResourceError("name", sharedv1.AsKubernetesResourceName(&s.Name).Validate()), + shared.PrefixResourceError("name", sharedApi.AsKubernetesResourceName(&s.Name).Validate()), ) } diff --git a/pkg/apis/deployment/v2alpha1/server_group_volume_test.go b/pkg/apis/deployment/v2alpha1/server_group_volume_test.go index c6083f9eb..06ff21604 100644 --- a/pkg/apis/deployment/v2alpha1/server_group_volume_test.go +++ b/pkg/apis/deployment/v2alpha1/server_group_volume_test.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/require" core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) const ( diff --git a/pkg/apis/deployment/v2alpha1/sync_authentication_spec.go b/pkg/apis/deployment/v2alpha1/sync_authentication_spec.go index 54d22c47a..cc76a1e1f 100644 --- a/pkg/apis/deployment/v2alpha1/sync_authentication_spec.go +++ b/pkg/apis/deployment/v2alpha1/sync_authentication_spec.go @@ -21,7 +21,7 @@ package v2alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v2alpha1/sync_external_access_spec.go b/pkg/apis/deployment/v2alpha1/sync_external_access_spec.go index 7d988479b..414492720 100644 --- a/pkg/apis/deployment/v2alpha1/sync_external_access_spec.go +++ b/pkg/apis/deployment/v2alpha1/sync_external_access_spec.go @@ -25,7 +25,7 @@ import ( "net/url" "strconv" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v2alpha1/sync_monitoring_spec.go b/pkg/apis/deployment/v2alpha1/sync_monitoring_spec.go index 952ce314d..a99c7a5ff 100644 --- a/pkg/apis/deployment/v2alpha1/sync_monitoring_spec.go +++ b/pkg/apis/deployment/v2alpha1/sync_monitoring_spec.go @@ -21,7 +21,7 @@ package v2alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/deployment/v2alpha1/tls_sni_spec.go b/pkg/apis/deployment/v2alpha1/tls_sni_spec.go index 511207c10..9dc51bbd7 100644 --- a/pkg/apis/deployment/v2alpha1/tls_sni_spec.go +++ b/pkg/apis/deployment/v2alpha1/tls_sni_spec.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ package v2alpha1 import ( - shared "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) @@ -34,7 +34,7 @@ func (s TLSSNISpec) Validate() error { mapped := map[string]interface{}{} for key, values := range s.Mapping { - if err := shared.IsValidName(key); err != nil { + if err := sharedApi.IsValidName(key); err != nil { return err } @@ -46,7 +46,7 @@ func (s TLSSNISpec) Validate() error { // Mark value as existing mapped[value] = nil - if err := shared.IsValidDomain(value); err != nil { + if err := sharedApi.IsValidDomain(value); err != nil { return err } } diff --git a/pkg/apis/deployment/v2alpha1/tls_spec.go b/pkg/apis/deployment/v2alpha1/tls_spec.go index 769df5e45..a8a3914b7 100644 --- a/pkg/apis/deployment/v2alpha1/tls_spec.go +++ b/pkg/apis/deployment/v2alpha1/tls_spec.go @@ -23,7 +23,7 @@ package v2alpha1 import ( "net" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" "github.com/arangodb/kube-arangodb/pkg/util/validation" diff --git a/pkg/apis/ml/v1alpha1/batchjob_spec.go b/pkg/apis/ml/v1alpha1/batchjob_spec.go index f02377a58..cf0b5ab1a 100644 --- a/pkg/apis/ml/v1alpha1/batchjob_spec.go +++ b/pkg/apis/ml/v1alpha1/batchjob_spec.go @@ -23,7 +23,7 @@ package v1alpha1 import ( batch "k8s.io/api/batch/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/ml/v1alpha1/cronjob_spec.go b/pkg/apis/ml/v1alpha1/cronjob_spec.go index 99366a0a6..6a085ba63 100644 --- a/pkg/apis/ml/v1alpha1/cronjob_spec.go +++ b/pkg/apis/ml/v1alpha1/cronjob_spec.go @@ -23,7 +23,7 @@ package v1alpha1 import ( batch "k8s.io/api/batch/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/ml/v1alpha1/extension_spec.go b/pkg/apis/ml/v1alpha1/extension_spec.go index b1f7e6818..4b041f84b 100644 --- a/pkg/apis/ml/v1alpha1/extension_spec.go +++ b/pkg/apis/ml/v1alpha1/extension_spec.go @@ -21,7 +21,7 @@ package v1alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" ) diff --git a/pkg/apis/ml/v1alpha1/extension_spec_deployment.go b/pkg/apis/ml/v1alpha1/extension_spec_deployment.go index 798dff24f..f69180616 100644 --- a/pkg/apis/ml/v1alpha1/extension_spec_deployment.go +++ b/pkg/apis/ml/v1alpha1/extension_spec_deployment.go @@ -21,7 +21,7 @@ package v1alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" diff --git a/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go b/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go index 0817024d3..7d4178b72 100644 --- a/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go +++ b/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go @@ -21,7 +21,7 @@ package v1alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" ) diff --git a/pkg/apis/ml/v1alpha1/extension_spec_deployment_service.go b/pkg/apis/ml/v1alpha1/extension_spec_deployment_service.go index 1a8006305..cd4835851 100644 --- a/pkg/apis/ml/v1alpha1/extension_spec_deployment_service.go +++ b/pkg/apis/ml/v1alpha1/extension_spec_deployment_service.go @@ -23,7 +23,7 @@ package v1alpha1 import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) type ArangoMLExtensionSpecDeploymentService struct { diff --git a/pkg/apis/ml/v1alpha1/extension_spec_init_job.go b/pkg/apis/ml/v1alpha1/extension_spec_init_job.go index 42eab49b3..4e2473552 100644 --- a/pkg/apis/ml/v1alpha1/extension_spec_init_job.go +++ b/pkg/apis/ml/v1alpha1/extension_spec_init_job.go @@ -21,7 +21,7 @@ package v1alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" ) diff --git a/pkg/apis/ml/v1alpha1/extension_spec_metadata_service.go b/pkg/apis/ml/v1alpha1/extension_spec_metadata_service.go index d9137c315..47caf3062 100644 --- a/pkg/apis/ml/v1alpha1/extension_spec_metadata_service.go +++ b/pkg/apis/ml/v1alpha1/extension_spec_metadata_service.go @@ -21,7 +21,7 @@ package v1alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/ml/v1alpha1/extension_status.go b/pkg/apis/ml/v1alpha1/extension_status.go index 71a08a237..c5243bc20 100644 --- a/pkg/apis/ml/v1alpha1/extension_status.go +++ b/pkg/apis/ml/v1alpha1/extension_status.go @@ -22,7 +22,7 @@ package v1alpha1 import ( api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - shared "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" ) type ArangoMLExtensionStatus struct { @@ -34,7 +34,7 @@ type ArangoMLExtensionStatus struct { MetadataService *ArangoMLExtensionStatusMetadataService `json:"metadataService,omitempty"` // ServiceAccount keeps the information about ServiceAccount - ServiceAccount *shared.ServiceAccount `json:"serviceAccount,omitempty"` + ServiceAccount *sharedApi.ServiceAccount `json:"serviceAccount,omitempty"` // ArangoDB keeps the information about local arangodb reference ArangoDB *ArangoMLExtensionStatusArangoDBRef `json:"arangoDB,omitempty"` diff --git a/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go b/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go index e36a8244e..bc29f8fb8 100644 --- a/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go +++ b/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go @@ -20,9 +20,9 @@ package v1alpha1 -import shared "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" +import sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" type ArangoMLExtensionStatusArangoDBRef struct { // Secret keeps the information about Secret for ArangoDB Authentication - Secret *shared.Object `json:"secret,omitempty"` + Secret *sharedApi.Object `json:"secret,omitempty"` } diff --git a/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go b/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go index 0de65202d..89c664cb6 100644 --- a/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go +++ b/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go @@ -20,14 +20,14 @@ package v1alpha1 -import shared "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" +import sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" type ArangoMLExtensionStatusMetadataService struct { // Local define the Local ArangoDeployment Metadata Service configuration Local *ArangoMLExtensionStatusMetadataServiceLocal `json:"local,omitempty"` // Secret define the Secret specification to store all the details - Secret *shared.Object `json:"secret,omitempty"` + Secret *sharedApi.Object `json:"secret,omitempty"` } type ArangoMLExtensionStatusMetadataServiceLocal struct { diff --git a/pkg/apis/ml/v1alpha1/storage_spec.go b/pkg/apis/ml/v1alpha1/storage_spec.go index 648c73e17..05601fe41 100644 --- a/pkg/apis/ml/v1alpha1/storage_spec.go +++ b/pkg/apis/ml/v1alpha1/storage_spec.go @@ -21,7 +21,7 @@ package v1alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) type ArangoMLStorageSpec struct { diff --git a/pkg/apis/ml/v1alpha1/storage_spec_backend.go b/pkg/apis/ml/v1alpha1/storage_spec_backend.go index 36f126b2d..45571c503 100644 --- a/pkg/apis/ml/v1alpha1/storage_spec_backend.go +++ b/pkg/apis/ml/v1alpha1/storage_spec_backend.go @@ -21,7 +21,7 @@ package v1alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/ml/v1alpha1/storage_spec_backend_s3.go b/pkg/apis/ml/v1alpha1/storage_spec_backend_s3.go index 464e4343b..688cfab05 100644 --- a/pkg/apis/ml/v1alpha1/storage_spec_backend_s3.go +++ b/pkg/apis/ml/v1alpha1/storage_spec_backend_s3.go @@ -23,7 +23,7 @@ package v1alpha1 import ( "net/url" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/ml/v1alpha1/storage_spec_mode.go b/pkg/apis/ml/v1alpha1/storage_spec_mode.go index 6ed428a50..7af1332e2 100644 --- a/pkg/apis/ml/v1alpha1/storage_spec_mode.go +++ b/pkg/apis/ml/v1alpha1/storage_spec_mode.go @@ -21,7 +21,7 @@ package v1alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/ml/v1alpha1/storage_spec_mode_sidecar.go b/pkg/apis/ml/v1alpha1/storage_spec_mode_sidecar.go index b401e4158..062b18a67 100644 --- a/pkg/apis/ml/v1alpha1/storage_spec_mode_sidecar.go +++ b/pkg/apis/ml/v1alpha1/storage_spec_mode_sidecar.go @@ -21,7 +21,7 @@ package v1alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/replication/v1/endpoint_authentication_spec.go b/pkg/apis/replication/v1/endpoint_authentication_spec.go index e3520dcff..a86966425 100644 --- a/pkg/apis/replication/v1/endpoint_authentication_spec.go +++ b/pkg/apis/replication/v1/endpoint_authentication_spec.go @@ -21,7 +21,7 @@ package v1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/replication/v1/endpoint_spec.go b/pkg/apis/replication/v1/endpoint_spec.go index b6c95356b..ad27ac2e3 100644 --- a/pkg/apis/replication/v1/endpoint_spec.go +++ b/pkg/apis/replication/v1/endpoint_spec.go @@ -23,7 +23,7 @@ package v1 import ( "net/url" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/replication/v1/endpoint_tls_spec.go b/pkg/apis/replication/v1/endpoint_tls_spec.go index 641480e41..70a6bda88 100644 --- a/pkg/apis/replication/v1/endpoint_tls_spec.go +++ b/pkg/apis/replication/v1/endpoint_tls_spec.go @@ -21,7 +21,7 @@ package v1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/replication/v2alpha1/endpoint_authentication_spec.go b/pkg/apis/replication/v2alpha1/endpoint_authentication_spec.go index 1146ee7c0..19fa66fe6 100644 --- a/pkg/apis/replication/v2alpha1/endpoint_authentication_spec.go +++ b/pkg/apis/replication/v2alpha1/endpoint_authentication_spec.go @@ -21,7 +21,7 @@ package v2alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/replication/v2alpha1/endpoint_spec.go b/pkg/apis/replication/v2alpha1/endpoint_spec.go index 1f2bfb554..54254f456 100644 --- a/pkg/apis/replication/v2alpha1/endpoint_spec.go +++ b/pkg/apis/replication/v2alpha1/endpoint_spec.go @@ -23,7 +23,7 @@ package v2alpha1 import ( "net/url" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/replication/v2alpha1/endpoint_tls_spec.go b/pkg/apis/replication/v2alpha1/endpoint_tls_spec.go index af20a16e9..5b068c409 100644 --- a/pkg/apis/replication/v2alpha1/endpoint_tls_spec.go +++ b/pkg/apis/replication/v2alpha1/endpoint_tls_spec.go @@ -21,7 +21,7 @@ package v2alpha1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/apis/shared/v1/core_container_spec.go b/pkg/apis/shared/v1/core_container_spec.go index 003da9885..ab1badea1 100644 --- a/pkg/apis/shared/v1/core_container_spec.go +++ b/pkg/apis/shared/v1/core_container_spec.go @@ -21,7 +21,7 @@ package v1 import ( - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) type ContainerTemplate struct { diff --git a/pkg/apis/shared/v1/core_pod_spec.go b/pkg/apis/shared/v1/core_pod_spec.go index 0a5da9f27..087bc55e3 100644 --- a/pkg/apis/shared/v1/core_pod_spec.go +++ b/pkg/apis/shared/v1/core_pod_spec.go @@ -20,7 +20,7 @@ package v1 -import "github.com/arangodb/kube-arangodb/pkg/apis/shared" +import shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" type PodTemplate struct { // Scheduling keeps the scheduling information diff --git a/pkg/apis/shared/v1/image.go b/pkg/apis/shared/v1/image.go index d27948edd..2f318834c 100644 --- a/pkg/apis/shared/v1/image.go +++ b/pkg/apis/shared/v1/image.go @@ -23,7 +23,7 @@ package v1 import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) type Image struct { diff --git a/pkg/apis/shared/v1/object.go b/pkg/apis/shared/v1/object.go index bb978fdca..ea81a06b5 100644 --- a/pkg/apis/shared/v1/object.go +++ b/pkg/apis/shared/v1/object.go @@ -24,7 +24,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" ) diff --git a/pkg/apis/storage/v1alpha/storage_class_spec.go b/pkg/apis/storage/v1alpha/storage_class_spec.go index a0f6682d9..1c744d100 100644 --- a/pkg/apis/storage/v1alpha/storage_class_spec.go +++ b/pkg/apis/storage/v1alpha/storage_class_spec.go @@ -23,7 +23,7 @@ package v1alpha import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/deployment/client/client_cache.go b/pkg/deployment/client/client_cache.go index 785c0f754..e2904d81d 100644 --- a/pkg/deployment/client/client_cache.go +++ b/pkg/deployment/client/client_cache.go @@ -31,7 +31,7 @@ import ( "github.com/arangodb/go-driver/agency" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/reconciler" "github.com/arangodb/kube-arangodb/pkg/handlers/utils" "github.com/arangodb/kube-arangodb/pkg/util/errors" diff --git a/pkg/deployment/context_impl.go b/pkg/deployment/context_impl.go index 61298e3df..26a91a614 100644 --- a/pkg/deployment/context_impl.go +++ b/pkg/deployment/context_impl.go @@ -43,7 +43,7 @@ import ( backupApi "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/acs/sutil" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/deployment/patch" diff --git a/pkg/deployment/deployment_affinity_test.go b/pkg/deployment/deployment_affinity_test.go index d30d29d6d..37425f445 100644 --- a/pkg/deployment/deployment_affinity_test.go +++ b/pkg/deployment/deployment_affinity_test.go @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) diff --git a/pkg/deployment/deployment_core_test.go b/pkg/deployment/deployment_core_test.go index 3396a5b8e..cbaa2544d 100644 --- a/pkg/deployment/deployment_core_test.go +++ b/pkg/deployment/deployment_core_test.go @@ -30,7 +30,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil/resources" diff --git a/pkg/deployment/deployment_encryption_test.go b/pkg/deployment/deployment_encryption_test.go index 135f4ff72..a68eaa2ef 100644 --- a/pkg/deployment/deployment_encryption_test.go +++ b/pkg/deployment/deployment_encryption_test.go @@ -28,7 +28,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) diff --git a/pkg/deployment/deployment_features_test.go b/pkg/deployment/deployment_features_test.go index 21b8fc815..01d71f402 100644 --- a/pkg/deployment/deployment_features_test.go +++ b/pkg/deployment/deployment_features_test.go @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) diff --git a/pkg/deployment/deployment_image_test.go b/pkg/deployment/deployment_image_test.go index d14f4053f..b4dd24e80 100644 --- a/pkg/deployment/deployment_image_test.go +++ b/pkg/deployment/deployment_image_test.go @@ -28,7 +28,7 @@ import ( "github.com/arangodb/go-driver" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) diff --git a/pkg/deployment/deployment_metrics_test.go b/pkg/deployment/deployment_metrics_test.go index b5147487b..cede7b67a 100644 --- a/pkg/deployment/deployment_metrics_test.go +++ b/pkg/deployment/deployment_metrics_test.go @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) diff --git a/pkg/deployment/deployment_pod_probe_test.go b/pkg/deployment/deployment_pod_probe_test.go index 38c0e2726..26a7dd09e 100644 --- a/pkg/deployment/deployment_pod_probe_test.go +++ b/pkg/deployment/deployment_pod_probe_test.go @@ -27,7 +27,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) diff --git a/pkg/deployment/deployment_pod_resources_test.go b/pkg/deployment/deployment_pod_resources_test.go index 4686c75a6..f547e0621 100644 --- a/pkg/deployment/deployment_pod_resources_test.go +++ b/pkg/deployment/deployment_pod_resources_test.go @@ -28,7 +28,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/resources" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" diff --git a/pkg/deployment/deployment_pod_sync_test.go b/pkg/deployment/deployment_pod_sync_test.go index 95dac4e76..396417b3b 100644 --- a/pkg/deployment/deployment_pod_sync_test.go +++ b/pkg/deployment/deployment_pod_sync_test.go @@ -29,7 +29,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/constants" "github.com/arangodb/kube-arangodb/pkg/util/errors" diff --git a/pkg/deployment/deployment_pod_tls_sni_test.go b/pkg/deployment/deployment_pod_tls_sni_test.go index 3db61f969..713db12c0 100644 --- a/pkg/deployment/deployment_pod_tls_sni_test.go +++ b/pkg/deployment/deployment_pod_tls_sni_test.go @@ -30,7 +30,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/constants" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" diff --git a/pkg/deployment/deployment_pod_volumes_test.go b/pkg/deployment/deployment_pod_volumes_test.go index ead50b374..ecce5c8b0 100644 --- a/pkg/deployment/deployment_pod_volumes_test.go +++ b/pkg/deployment/deployment_pod_volumes_test.go @@ -27,7 +27,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) diff --git a/pkg/deployment/deployment_suite_test.go b/pkg/deployment/deployment_suite_test.go index 2e9ca515c..c0322c16a 100644 --- a/pkg/deployment/deployment_suite_test.go +++ b/pkg/deployment/deployment_suite_test.go @@ -43,7 +43,7 @@ import ( "github.com/arangodb/go-driver/jwt" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/acs" "github.com/arangodb/kube-arangodb/pkg/deployment/client" "github.com/arangodb/kube-arangodb/pkg/deployment/features" diff --git a/pkg/deployment/images.go b/pkg/deployment/images.go index 386ccb34f..bf646243d 100644 --- a/pkg/deployment/images.go +++ b/pkg/deployment/images.go @@ -31,7 +31,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/pod" "github.com/arangodb/kube-arangodb/pkg/deployment/resources" "github.com/arangodb/kube-arangodb/pkg/handlers/utils" diff --git a/pkg/deployment/images_test.go b/pkg/deployment/images_test.go index 03d074085..ab8fc6d2a 100644 --- a/pkg/deployment/images_test.go +++ b/pkg/deployment/images_test.go @@ -33,7 +33,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/resources" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/constants" diff --git a/pkg/deployment/members.go b/pkg/deployment/members.go index d821a728c..ead7c0984 100644 --- a/pkg/deployment/members.go +++ b/pkg/deployment/members.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile" "github.com/arangodb/kube-arangodb/pkg/util/errors" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" diff --git a/pkg/deployment/pod/affinity.go b/pkg/deployment/pod/affinity.go index d37a8dad9..6329372bf 100644 --- a/pkg/deployment/pod/affinity.go +++ b/pkg/deployment/pod/affinity.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil/interfaces" ) diff --git a/pkg/deployment/pod/encryption.go b/pkg/deployment/pod/encryption.go index 0a076e3a6..bc89c4c15 100644 --- a/pkg/deployment/pod/encryption.go +++ b/pkg/deployment/pod/encryption.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/util/constants" "github.com/arangodb/kube-arangodb/pkg/util/errors" diff --git a/pkg/deployment/pod/jwt.go b/pkg/deployment/pod/jwt.go index cb7d62a5b..7746a2f77 100644 --- a/pkg/deployment/pod/jwt.go +++ b/pkg/deployment/pod/jwt.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import ( "github.com/arangodb/go-driver" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/util/constants" "github.com/arangodb/kube-arangodb/pkg/util/errors" diff --git a/pkg/deployment/pod/security.go b/pkg/deployment/pod/security.go index bc7a8795c..b7875134c 100644 --- a/pkg/deployment/pod/security.go +++ b/pkg/deployment/pod/security.go @@ -23,7 +23,7 @@ package pod import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil/interfaces" diff --git a/pkg/deployment/pod/sni.go b/pkg/deployment/pod/sni.go index eb913833f..d5479f341 100644 --- a/pkg/deployment/pod/sni.go +++ b/pkg/deployment/pod/sni.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/constants" diff --git a/pkg/deployment/pod/timezone.go b/pkg/deployment/pod/timezone.go index 57ec60127..76362bf3a 100644 --- a/pkg/deployment/pod/timezone.go +++ b/pkg/deployment/pod/timezone.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil/interfaces" diff --git a/pkg/deployment/pod/tls.go b/pkg/deployment/pod/tls.go index f8e0524a2..9ea9d6b76 100644 --- a/pkg/deployment/pod/tls.go +++ b/pkg/deployment/pod/tls.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/util/constants" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" diff --git a/pkg/deployment/reconcile/action_add_member.go b/pkg/deployment/reconcile/action_add_member.go index 7471e3e3b..a90a19fb8 100644 --- a/pkg/deployment/reconcile/action_add_member.go +++ b/pkg/deployment/reconcile/action_add_member.go @@ -24,7 +24,7 @@ import ( "context" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/topology" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) @@ -68,5 +68,5 @@ func (a *actionAddMember) Start(ctx context.Context) (bool, error) { // ActionPlanAppender appends wait methods to the plan func (a *actionAddMember) ActionPlanAppender(current api.Plan) (api.Plan, bool) { - return withWaitForMember(current, a.action.Group, shared.WithPredefinedMember(a.action.MemberID)), true + return withWaitForMember(current, a.action.Group, sharedReconcile.WithPredefinedMember(a.action.MemberID)), true } diff --git a/pkg/deployment/reconcile/action_set_condition_v2.go b/pkg/deployment/reconcile/action_set_condition_v2.go index 75c51a73d..88e45339f 100644 --- a/pkg/deployment/reconcile/action_set_condition_v2.go +++ b/pkg/deployment/reconcile/action_set_condition_v2.go @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" ) func newSetConditionV2Action(action api.Action, actionCtx ActionContext) Action { @@ -46,24 +46,24 @@ type actionSetConditionV2 struct { // Start starts the action for changing conditions on the provided member. func (a actionSetConditionV2) Start(ctx context.Context) (bool, error) { - at, ok := a.action.Params[shared.SetConditionActionV2KeyType] + at, ok := a.action.Params[sharedReconcile.SetConditionActionV2KeyType] if !ok { - a.log.Info("key %s is missing in action definition", shared.SetConditionActionV2KeyType) + a.log.Info("key %s is missing in action definition", sharedReconcile.SetConditionActionV2KeyType) return true, nil } - aa, ok := a.action.Params[shared.SetConditionActionV2KeyAction] + aa, ok := a.action.Params[sharedReconcile.SetConditionActionV2KeyAction] if !ok { - a.log.Info("key %s is missing in action definition", shared.SetConditionActionV2KeyAction) + a.log.Info("key %s is missing in action definition", sharedReconcile.SetConditionActionV2KeyAction) return true, nil } switch at { - case shared.SetConditionActionV2KeyTypeAdd: - ah := a.action.Params[shared.SetConditionActionV2KeyHash] - am := a.action.Params[shared.SetConditionActionV2KeyMessage] - ar := a.action.Params[shared.SetConditionActionV2KeyReason] - as := a.action.Params[shared.SetConditionActionV2KeyStatus] == string(core.ConditionTrue) + case sharedReconcile.SetConditionActionV2KeyTypeAdd: + ah := a.action.Params[sharedReconcile.SetConditionActionV2KeyHash] + am := a.action.Params[sharedReconcile.SetConditionActionV2KeyMessage] + ar := a.action.Params[sharedReconcile.SetConditionActionV2KeyReason] + as := a.action.Params[sharedReconcile.SetConditionActionV2KeyStatus] == string(core.ConditionTrue) if err := a.actionCtx.WithStatusUpdateErr(ctx, func(s *api.DeploymentStatus) (bool, error) { return s.Conditions.UpdateWithHash(api.ConditionType(aa), as, ar, am, ah), nil @@ -71,7 +71,7 @@ func (a actionSetConditionV2) Start(ctx context.Context) (bool, error) { a.log.Err(err).Warn("unable to update status") return true, nil } - case shared.SetConditionActionV2KeyTypeRemove: + case sharedReconcile.SetConditionActionV2KeyTypeRemove: if err := a.actionCtx.WithStatusUpdateErr(ctx, func(s *api.DeploymentStatus) (bool, error) { return s.Conditions.Remove(api.ConditionType(aa)), nil }); err != nil { diff --git a/pkg/deployment/reconcile/action_set_member_condition_v2.go b/pkg/deployment/reconcile/action_set_member_condition_v2.go index 5ab67e7b5..ebd529f14 100644 --- a/pkg/deployment/reconcile/action_set_member_condition_v2.go +++ b/pkg/deployment/reconcile/action_set_member_condition_v2.go @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" ) func newSetMemberConditionV2Action(action api.Action, actionCtx ActionContext) Action { @@ -46,24 +46,24 @@ type actionSetMemberConditionV2 struct { // Start starts the action for changing conditions on the provided member. func (a actionSetMemberConditionV2) Start(ctx context.Context) (bool, error) { - at, ok := a.action.Params[shared.SetConditionActionV2KeyType] + at, ok := a.action.Params[sharedReconcile.SetConditionActionV2KeyType] if !ok { - a.log.Info("key %s is missing in action definition", shared.SetConditionActionV2KeyType) + a.log.Info("key %s is missing in action definition", sharedReconcile.SetConditionActionV2KeyType) return true, nil } - aa, ok := a.action.Params[shared.SetConditionActionV2KeyAction] + aa, ok := a.action.Params[sharedReconcile.SetConditionActionV2KeyAction] if !ok { - a.log.Info("key %s is missing in action definition", shared.SetConditionActionV2KeyAction) + a.log.Info("key %s is missing in action definition", sharedReconcile.SetConditionActionV2KeyAction) return true, nil } switch at { - case shared.SetConditionActionV2KeyTypeAdd: - ah := a.action.Params[shared.SetConditionActionV2KeyHash] - am := a.action.Params[shared.SetConditionActionV2KeyMessage] - ar := a.action.Params[shared.SetConditionActionV2KeyReason] - as := a.action.Params[shared.SetConditionActionV2KeyStatus] == string(core.ConditionTrue) + case sharedReconcile.SetConditionActionV2KeyTypeAdd: + ah := a.action.Params[sharedReconcile.SetConditionActionV2KeyHash] + am := a.action.Params[sharedReconcile.SetConditionActionV2KeyMessage] + ar := a.action.Params[sharedReconcile.SetConditionActionV2KeyReason] + as := a.action.Params[sharedReconcile.SetConditionActionV2KeyStatus] == string(core.ConditionTrue) if err := a.actionCtx.WithStatusUpdateErr(ctx, func(s *api.DeploymentStatus) (bool, error) { status, g, ok := s.Members.ElementByID(a.action.MemberID) @@ -90,7 +90,7 @@ func (a actionSetMemberConditionV2) Start(ctx context.Context) (bool, error) { a.log.Err(err).Warn("unable to update status") return true, nil } - case shared.SetConditionActionV2KeyTypeRemove: + case sharedReconcile.SetConditionActionV2KeyTypeRemove: if err := a.actionCtx.WithStatusUpdateErr(ctx, func(s *api.DeploymentStatus) (bool, error) { status, g, ok := s.Members.ElementByID(a.action.MemberID) if !ok { diff --git a/pkg/deployment/reconcile/condition_member_recreation.go b/pkg/deployment/reconcile/condition_member_recreation.go index 1af7b51ea..e9c8313b1 100644 --- a/pkg/deployment/reconcile/condition_member_recreation.go +++ b/pkg/deployment/reconcile/condition_member_recreation.go @@ -30,7 +30,7 @@ import ( "github.com/arangodb/kube-arangodb/pkg/apis/deployment" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) @@ -48,12 +48,12 @@ func (r *Reconciler) createMemberRecreationConditionsPlan(ctx context.Context, if !recreate { if _, ok := m.Member.Conditions.Get(api.MemberReplacementRequired); ok { // Unset condition - p = append(p, shared.RemoveMemberConditionActionV2("Member replacement not required", api.MemberReplacementRequired, m.Group, m.Member.ID)) + p = append(p, sharedReconcile.RemoveMemberConditionActionV2("Member replacement not required", api.MemberReplacementRequired, m.Group, m.Member.ID)) } } else { if c, ok := m.Member.Conditions.Get(api.MemberReplacementRequired); !ok || !c.IsTrue() || c.Message != message { // Update condition - p = append(p, shared.UpdateMemberConditionActionV2("Member replacement required", api.MemberReplacementRequired, m.Group, m.Member.ID, true, "Member replacement required", message, "")) + p = append(p, sharedReconcile.UpdateMemberConditionActionV2("Member replacement required", api.MemberReplacementRequired, m.Group, m.Member.ID, true, "Member replacement required", message, "")) } } } diff --git a/pkg/deployment/reconcile/plan_builder_clean_out.go b/pkg/deployment/reconcile/plan_builder_clean_out.go index 061cb9709..126833868 100644 --- a/pkg/deployment/reconcile/plan_builder_clean_out.go +++ b/pkg/deployment/reconcile/plan_builder_clean_out.go @@ -25,7 +25,7 @@ import ( api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" "github.com/arangodb/kube-arangodb/pkg/deployment/agency/state" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) @@ -51,9 +51,9 @@ func (r *Reconciler) createCleanOutPlan(ctx context.Context, _ k8sutil.APIObject if cleanedStatus != cleanedAgency { if cleanedAgency { - plan = append(plan, shared.UpdateMemberConditionActionV2("DBServer cleaned", api.ConditionTypeCleanedOut, m.Group, m.Member.ID, true, "DBServer cleaned", "DBServer cleaned", "")) + plan = append(plan, sharedReconcile.UpdateMemberConditionActionV2("DBServer cleaned", api.ConditionTypeCleanedOut, m.Group, m.Member.ID, true, "DBServer cleaned", "DBServer cleaned", "")) } else { - plan = append(plan, shared.RemoveMemberConditionActionV2("DBServer is not cleaned", api.ConditionTypeCleanedOut, m.Group, m.Member.ID)) + plan = append(plan, sharedReconcile.RemoveMemberConditionActionV2("DBServer is not cleaned", api.ConditionTypeCleanedOut, m.Group, m.Member.ID)) } } } diff --git a/pkg/deployment/reconcile/plan_builder_cluster.go b/pkg/deployment/reconcile/plan_builder_cluster.go index fadaccd9e..78beda3bf 100644 --- a/pkg/deployment/reconcile/plan_builder_cluster.go +++ b/pkg/deployment/reconcile/plan_builder_cluster.go @@ -28,7 +28,7 @@ import ( api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" "github.com/arangodb/kube-arangodb/pkg/deployment/actions" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/globals" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) @@ -83,7 +83,7 @@ func (r *Reconciler) createClusterOperationPlan(ctx context.Context, apiObject k if member.LastHeartbeatAcked.Add(coordinatorHealthFailedTimeout).Before(time.Now()) { return api.Plan{ - actions.NewAction(api.ActionTypeClusterMemberCleanup, api.ServerGroupCoordinators, shared.WithPredefinedMember(string(id))), + actions.NewAction(api.ActionTypeClusterMemberCleanup, api.ServerGroupCoordinators, sharedReconcile.WithPredefinedMember(string(id))), } } case driver.ServerRoleDBServer: @@ -96,7 +96,7 @@ func (r *Reconciler) createClusterOperationPlan(ctx context.Context, apiObject k } return api.Plan{ - actions.NewAction(api.ActionTypeClusterMemberCleanup, api.ServerGroupDBServers, shared.WithPredefinedMember(string(id))), + actions.NewAction(api.ActionTypeClusterMemberCleanup, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember(string(id))), } } } diff --git a/pkg/deployment/reconcile/plan_builder_common.go b/pkg/deployment/reconcile/plan_builder_common.go index 214a456e0..f7381c845 100644 --- a/pkg/deployment/reconcile/plan_builder_common.go +++ b/pkg/deployment/reconcile/plan_builder_common.go @@ -24,7 +24,7 @@ import ( "context" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) @@ -41,7 +41,7 @@ func (r *Reconciler) cleanupConditions(ctx context.Context, apiObject k8sutil.AP for _, c := range ObsoleteClusterConditions { if _, ok := status.Conditions.Get(c); ok { - p = append(p, shared.RemoveConditionActionV2("Cleanup Condition", c)) + p = append(p, sharedReconcile.RemoveConditionActionV2("Cleanup Condition", c)) } } diff --git a/pkg/deployment/reconcile/plan_builder_encryption.go b/pkg/deployment/reconcile/plan_builder_encryption.go index a853218bf..c0b6196f8 100644 --- a/pkg/deployment/reconcile/plan_builder_encryption.go +++ b/pkg/deployment/reconcile/plan_builder_encryption.go @@ -30,7 +30,7 @@ import ( "github.com/arangodb/kube-arangodb/pkg/deployment/client" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/deployment/pod" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/globals" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" "github.com/arangodb/kube-arangodb/pkg/util/strings" @@ -236,7 +236,7 @@ func (r *Reconciler) areEncryptionKeysUpToDate(ctx context.Context, spec api.Dep failed = true continue } else if updateRequired { - plan = append(plan, actions.NewAction(api.ActionTypeEncryptionKeyRefresh, group, shared.WithPredefinedMember(m.ID))) + plan = append(plan, actions.NewAction(api.ActionTypeEncryptionKeyRefresh, group, sharedReconcile.WithPredefinedMember(m.ID))) continue } } diff --git a/pkg/deployment/reconcile/plan_builder_high.go b/pkg/deployment/reconcile/plan_builder_high.go index 4adb8daaf..cd037757f 100644 --- a/pkg/deployment/reconcile/plan_builder_high.go +++ b/pkg/deployment/reconcile/plan_builder_high.go @@ -28,7 +28,7 @@ import ( api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" "github.com/arangodb/kube-arangodb/pkg/deployment/actions" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/rotation" "github.com/arangodb/kube-arangodb/pkg/util/compare" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" @@ -154,18 +154,18 @@ func (r *Reconciler) updateMemberPhasePlan(ctx context.Context, apiObject k8suti } func pendingRestartMemberConditionAction(group api.ServerGroup, memberID string, reason string) api.Action { - return shared.UpdateMemberConditionActionV2(reason, api.ConditionTypePendingRestart, group, memberID, true, reason, "", "") + return sharedReconcile.UpdateMemberConditionActionV2(reason, api.ConditionTypePendingRestart, group, memberID, true, reason, "", "") } func restartMemberConditionAction(group api.ServerGroup, memberID string, reason string) api.Plan { return api.Plan{ pendingRestartMemberConditionAction(group, memberID, reason), - shared.UpdateMemberConditionActionV2(reason, api.ConditionTypeRestart, group, memberID, true, reason, "", ""), + sharedReconcile.UpdateMemberConditionActionV2(reason, api.ConditionTypeRestart, group, memberID, true, reason, "", ""), } } func tlsRotateConditionAction(group api.ServerGroup, memberID string, reason string) api.Action { - return shared.UpdateMemberConditionActionV2(reason, api.ConditionTypePendingTLSRotation, group, memberID, true, reason, "", "") + return sharedReconcile.UpdateMemberConditionActionV2(reason, api.ConditionTypePendingTLSRotation, group, memberID, true, reason, "", "") } func (r *Reconciler) updateMemberUpdateConditionsPlan(ctx context.Context, apiObject k8sutil.APIObject, @@ -178,10 +178,10 @@ func (r *Reconciler) updateMemberUpdateConditionsPlan(ctx context.Context, apiOb // We are in updating phase if status.Plan.IsEmpty() { // If plan is empty then something went wrong - plan = append(plan, shared.RemoveMemberConditionActionV2("Clean update actions after failure", api.ConditionTypePendingUpdate, e.Group, e.Member.ID), - shared.RemoveMemberConditionActionV2("Clean update actions after failure", api.ConditionTypeUpdating, e.Group, e.Member.ID), - shared.UpdateMemberConditionActionV2("Clean update actions after failure", api.ConditionTypeUpdateFailed, e.Group, e.Member.ID, true, "Clean update actions after failure", "", ""), - shared.UpdateMemberConditionActionV2("Clean update actions after failure", api.ConditionTypePendingRestart, e.Group, e.Member.ID, true, "Clean update actions after failure", "", "")) + plan = append(plan, sharedReconcile.RemoveMemberConditionActionV2("Clean update actions after failure", api.ConditionTypePendingUpdate, e.Group, e.Member.ID), + sharedReconcile.RemoveMemberConditionActionV2("Clean update actions after failure", api.ConditionTypeUpdating, e.Group, e.Member.ID), + sharedReconcile.UpdateMemberConditionActionV2("Clean update actions after failure", api.ConditionTypeUpdateFailed, e.Group, e.Member.ID, true, "Clean update actions after failure", "", ""), + sharedReconcile.UpdateMemberConditionActionV2("Clean update actions after failure", api.ConditionTypePendingRestart, e.Group, e.Member.ID, true, "Clean update actions after failure", "", "")) } } @@ -249,7 +249,7 @@ func (r *Reconciler) updateMemberRotationConditions(apiObject k8sutil.APIObject, } else if member.Conditions.IsTrue(api.ConditionTypeUpdating) || member.Conditions.IsTrue(api.ConditionTypePendingUpdate) { return nil, nil } - return api.Plan{shared.UpdateMemberConditionActionV2(reason, api.ConditionTypePendingUpdate, group, member.ID, true, reason, "", "")}, nil + return api.Plan{sharedReconcile.UpdateMemberConditionActionV2(reason, api.ConditionTypePendingUpdate, group, member.ID, true, reason, "", "")}, nil case compare.SilentRotation: // Propagate changes without restart, but apply plan if required plan = append(plan, actions.NewAction(api.ActionTypeArangoMemberUpdatePodStatus, group, member, "Propagating status of pod").AddParam(ActionTypeArangoMemberUpdatePodStatusChecksum, checksum)) diff --git a/pkg/deployment/reconcile/plan_builder_license.go b/pkg/deployment/reconcile/plan_builder_license.go index 697d2c700..8f083c789 100644 --- a/pkg/deployment/reconcile/plan_builder_license.go +++ b/pkg/deployment/reconcile/plan_builder_license.go @@ -26,7 +26,7 @@ import ( api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" "github.com/arangodb/kube-arangodb/pkg/deployment/actions" "github.com/arangodb/kube-arangodb/pkg/deployment/client" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/arangod" "github.com/arangodb/kube-arangodb/pkg/util/globals" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" @@ -83,10 +83,10 @@ func (r *Reconciler) updateClusterLicense(ctx context.Context, apiObject k8sutil return nil } else if ok { if c, _ := status.Conditions.Get(api.ConditionTypeLicenseSet); !c.IsTrue() || c.Hash != l.V2.V2Hash() { - return api.Plan{shared.UpdateConditionActionV2("License is set", api.ConditionTypeLicenseSet, true, "License UpToDate", "", l.V2.V2Hash())} + return api.Plan{sharedReconcile.UpdateConditionActionV2("License is set", api.ConditionTypeLicenseSet, true, "License UpToDate", "", l.V2.V2Hash())} } return nil } - return api.Plan{shared.RemoveConditionActionV2("License is not set", api.ConditionTypeLicenseSet), actions.NewAction(api.ActionTypeLicenseSet, member.Group, member.Member, "Setting license")} + return api.Plan{sharedReconcile.RemoveConditionActionV2("License is not set", api.ConditionTypeLicenseSet), actions.NewAction(api.ActionTypeLicenseSet, member.Group, member.Member, "Setting license")} } diff --git a/pkg/deployment/reconcile/plan_builder_maintenance.go b/pkg/deployment/reconcile/plan_builder_maintenance.go index 8ab4ec23e..788abfe9b 100644 --- a/pkg/deployment/reconcile/plan_builder_maintenance.go +++ b/pkg/deployment/reconcile/plan_builder_maintenance.go @@ -27,7 +27,7 @@ import ( api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" "github.com/arangodb/kube-arangodb/pkg/deployment/actions" "github.com/arangodb/kube-arangodb/pkg/deployment/features" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) @@ -53,7 +53,7 @@ func (r *Reconciler) createBackupInProgressConditionPlan(ctx context.Context, ap if !maintenance.Exists() { // Condition needs to be removed return api.Plan{ - shared.RemoveConditionActionV2("Backup not in progress", api.ConditionTypeBackupInProgress), + sharedReconcile.RemoveConditionActionV2("Backup not in progress", api.ConditionTypeBackupInProgress), } } @@ -63,7 +63,7 @@ func (r *Reconciler) createBackupInProgressConditionPlan(ctx context.Context, ap if !currentCondition.IsTrue() || currentCondition.Hash != hash { return api.Plan{ - shared.UpdateConditionActionV2("Backup in progress", api.ConditionTypeBackupInProgress, true, "Backup In Progress", "", hash), + sharedReconcile.UpdateConditionActionV2("Backup in progress", api.ConditionTypeBackupInProgress, true, "Backup In Progress", "", hash), } } @@ -71,7 +71,7 @@ func (r *Reconciler) createBackupInProgressConditionPlan(ctx context.Context, ap } else { if maintenance.Exists() { return api.Plan{ - shared.UpdateConditionActionV2("Backup in progress", api.ConditionTypeBackupInProgress, true, "Backup In Progress", "", maintenance.Hash()), + sharedReconcile.UpdateConditionActionV2("Backup in progress", api.ConditionTypeBackupInProgress, true, "Backup In Progress", "", maintenance.Hash()), } } @@ -101,7 +101,7 @@ func (r *Reconciler) createMaintenanceConditionPlan(ctx context.Context, apiObje if !maintenance.Exists() { // Condition needs to be removed return api.Plan{ - shared.RemoveConditionActionV2("Maintenance Disabled", api.ConditionTypeMaintenance), + sharedReconcile.RemoveConditionActionV2("Maintenance Disabled", api.ConditionTypeMaintenance), } } @@ -111,7 +111,7 @@ func (r *Reconciler) createMaintenanceConditionPlan(ctx context.Context, apiObje if !currentCondition.IsTrue() || currentCondition.Hash != hash { return api.Plan{ - shared.UpdateConditionActionV2("Maintenance Enabled", api.ConditionTypeMaintenance, true, "Maintenance Enabled", "", hash), + sharedReconcile.UpdateConditionActionV2("Maintenance Enabled", api.ConditionTypeMaintenance, true, "Maintenance Enabled", "", hash), } } @@ -119,7 +119,7 @@ func (r *Reconciler) createMaintenanceConditionPlan(ctx context.Context, apiObje } else { if maintenance.Exists() { return api.Plan{ - shared.UpdateConditionActionV2("Maintenance Enabled", api.ConditionTypeMaintenance, true, "Maintenance Enabled", "", maintenance.Hash()), + sharedReconcile.UpdateConditionActionV2("Maintenance Enabled", api.ConditionTypeMaintenance, true, "Maintenance Enabled", "", maintenance.Hash()), } } diff --git a/pkg/deployment/reconcile/plan_builder_member_recovery.go b/pkg/deployment/reconcile/plan_builder_member_recovery.go index 57d11ce97..4c2abd87f 100644 --- a/pkg/deployment/reconcile/plan_builder_member_recovery.go +++ b/pkg/deployment/reconcile/plan_builder_member_recovery.go @@ -26,7 +26,7 @@ import ( api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" "github.com/arangodb/kube-arangodb/pkg/deployment/actions" "github.com/arangodb/kube-arangodb/pkg/deployment/agency/state" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) @@ -122,8 +122,8 @@ func (r *Reconciler) createMemberFailedRestoreInternal(_ context.Context, _ k8su memberLog.Info("Creating member replacement plan because member has failed") plan = append(plan, actions.NewAction(api.ActionTypeRemoveMember, group, m), - actions.NewAction(api.ActionTypeAddMember, group, shared.WithPredefinedMember("")), - actions.NewAction(api.ActionTypeWaitForMemberUp, group, shared.WithPredefinedMember(api.MemberIDPreviousAction)), + actions.NewAction(api.ActionTypeAddMember, group, sharedReconcile.WithPredefinedMember("")), + actions.NewAction(api.ActionTypeWaitForMemberUp, group, sharedReconcile.WithPredefinedMember(api.MemberIDPreviousAction)), ) } else { memberLog.Info("Restoring old member. Recreation is disabled for group") diff --git a/pkg/deployment/reconcile/plan_builder_rotate_upgrade.go b/pkg/deployment/reconcile/plan_builder_rotate_upgrade.go index 550a23859..23c9e0b11 100644 --- a/pkg/deployment/reconcile/plan_builder_rotate_upgrade.go +++ b/pkg/deployment/reconcile/plan_builder_rotate_upgrade.go @@ -32,7 +32,7 @@ import ( "github.com/arangodb/kube-arangodb/pkg/deployment/actions" "github.com/arangodb/kube-arangodb/pkg/deployment/agency/state" "github.com/arangodb/kube-arangodb/pkg/deployment/features" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/resources" "github.com/arangodb/kube-arangodb/pkg/deployment/rotation" "github.com/arangodb/kube-arangodb/pkg/util" @@ -137,11 +137,11 @@ func (r *Reconciler) createRotateOrUpgradePlanInternal(apiObject k8sutil.APIObje p := make(api.Plan, 0, 2) if upgradeCondition { - p = append(p, shared.RemoveConditionActionV2("Upgrade done", api.ConditionTypeUpgradeInProgress)) + p = append(p, sharedReconcile.RemoveConditionActionV2("Upgrade done", api.ConditionTypeUpgradeInProgress)) } if updateCondition { - p = append(p, shared.RemoveConditionActionV2("Update done", api.ConditionTypeUpdateInProgress)) + p = append(p, sharedReconcile.RemoveConditionActionV2("Update done", api.ConditionTypeUpdateInProgress)) } return p, false @@ -157,7 +157,7 @@ func (r *Reconciler) createUpdatePlanInternalCondition(apiObject k8sutil.APIObje if idle || len(plan) > 0 { if !status.Conditions.IsTrue(api.ConditionTypeUpdateInProgress) { plan = append(api.Plan{ - shared.UpdateConditionActionV2("Update in progress", api.ConditionTypeUpdateInProgress, true, "", "", ""), + sharedReconcile.UpdateConditionActionV2("Update in progress", api.ConditionTypeUpdateInProgress, true, "", "", ""), }, plan...) } } @@ -205,8 +205,8 @@ func (r *Reconciler) createUpdatePlanInternal(apiObject k8sutil.APIObject, spec if svc, ok := cache.Service().V1().GetSimple(arangoMember.GetName()); ok { if k8sutil.IsServiceRotationRequired(spec, svc) { return api.Plan{ - shared.RemoveMemberConditionActionV2("Cleaning update", api.ConditionTypePendingUpdate, m.Group, m.Member.ID), - shared.UpdateMemberConditionActionV2("Cleaning update", api.ConditionTypeUpdating, m.Group, m.Member.ID, true, "Cleaning update", "", ""), + sharedReconcile.RemoveMemberConditionActionV2("Cleaning update", api.ConditionTypePendingUpdate, m.Group, m.Member.ID), + sharedReconcile.UpdateMemberConditionActionV2("Cleaning update", api.ConditionTypeUpdating, m.Group, m.Member.ID, true, "Cleaning update", "", ""), }, false } } @@ -216,18 +216,18 @@ func (r *Reconciler) createUpdatePlanInternal(apiObject k8sutil.APIObject, spec continue } else if mode != compare.InPlaceRotation { return api.Plan{ - shared.RemoveMemberConditionActionV2(reason, api.ConditionTypePendingUpdate, m.Group, m.Member.ID), - shared.UpdateMemberConditionActionV2(reason, api.ConditionTypeUpdating, m.Group, m.Member.ID, true, reason, "", ""), + sharedReconcile.RemoveMemberConditionActionV2(reason, api.ConditionTypePendingUpdate, m.Group, m.Member.ID), + sharedReconcile.UpdateMemberConditionActionV2(reason, api.ConditionTypeUpdating, m.Group, m.Member.ID, true, reason, "", ""), }, false } else { p = withWaitForMember(p, m.Group, m.Member) p = append(p, actions.NewAction(api.ActionTypeArangoMemberUpdatePodStatus, m.Group, m.Member, "Propagating status of pod").AddParam(ActionTypeArangoMemberUpdatePodStatusChecksum, checksum)) p = p.WrapWithPlan(api.Plan{ - shared.RemoveMemberConditionActionV2(reason, api.ConditionTypePendingUpdate, m.Group, m.Member.ID), - shared.UpdateMemberConditionActionV2(reason, api.ConditionTypeUpdating, m.Group, m.Member.ID, true, reason, "", ""), + sharedReconcile.RemoveMemberConditionActionV2(reason, api.ConditionTypePendingUpdate, m.Group, m.Member.ID), + sharedReconcile.UpdateMemberConditionActionV2(reason, api.ConditionTypeUpdating, m.Group, m.Member.ID, true, reason, "", ""), }, api.Plan{ - shared.RemoveMemberConditionActionV2(reason, api.ConditionTypeUpdating, m.Group, m.Member.ID), + sharedReconcile.RemoveMemberConditionActionV2(reason, api.ConditionTypeUpdating, m.Group, m.Member.ID), }) return p, false @@ -242,7 +242,7 @@ func (r *Reconciler) createUpgradePlanInternalCondition(apiObject k8sutil.APIObj if idle || len(plan) > 0 { if !status.Conditions.IsTrue(api.ConditionTypeUpgradeInProgress) { plan = append(api.Plan{ - shared.UpdateConditionActionV2("Upgrade in progress", api.ConditionTypeUpgradeInProgress, true, "", "", ""), + sharedReconcile.UpdateConditionActionV2("Upgrade in progress", api.ConditionTypeUpgradeInProgress, true, "", "", ""), }, plan...) } } diff --git a/pkg/deployment/reconcile/plan_builder_scale.go b/pkg/deployment/reconcile/plan_builder_scale.go index 1f1e815c0..6097bd853 100644 --- a/pkg/deployment/reconcile/plan_builder_scale.go +++ b/pkg/deployment/reconcile/plan_builder_scale.go @@ -25,7 +25,7 @@ import ( api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" "github.com/arangodb/kube-arangodb/pkg/deployment/actions" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) @@ -80,7 +80,7 @@ func (r *Reconciler) createScalePlan(status api.DeploymentStatus, members api.Me // Scale up toAdd := count - len(members) for i := 0; i < toAdd; i++ { - plan = append(plan, actions.NewAction(api.ActionTypeAddMember, group, shared.WithPredefinedMember(""))) + plan = append(plan, actions.NewAction(api.ActionTypeAddMember, group, sharedReconcile.WithPredefinedMember(""))) } r.planLogger. Int("count", count). @@ -140,7 +140,7 @@ func (r *Reconciler) createReplaceMemberPlan(ctx context.Context, apiObject k8su switch group { case api.ServerGroupDBServers: - plan = append(plan, actions.NewAction(api.ActionTypeAddMember, group, shared.WithPredefinedMember(""))) + plan = append(plan, actions.NewAction(api.ActionTypeAddMember, group, sharedReconcile.WithPredefinedMember(""))) r.planLogger. Str("role", group.AsRole()). Debug("Creating replacement plan") @@ -151,7 +151,7 @@ func (r *Reconciler) createReplaceMemberPlan(ctx context.Context, apiObject k8su Debug("Creating replacement plan") case api.ServerGroupAgents: plan = append(plan, cleanOutMember(group, member)...) - plan = append(plan, actions.NewAction(api.ActionTypeAddMember, group, shared.WithPredefinedMember(""))) + plan = append(plan, actions.NewAction(api.ActionTypeAddMember, group, sharedReconcile.WithPredefinedMember(""))) r.planLogger. Str("role", group.AsRole()). Debug("Creating replacement plan") diff --git a/pkg/deployment/reconcile/plan_builder_storage.go b/pkg/deployment/reconcile/plan_builder_storage.go index 914ed1f61..e27201870 100644 --- a/pkg/deployment/reconcile/plan_builder_storage.go +++ b/pkg/deployment/reconcile/plan_builder_storage.go @@ -27,7 +27,7 @@ import ( api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" "github.com/arangodb/kube-arangodb/pkg/deployment/actions" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) @@ -157,9 +157,9 @@ func (r *Reconciler) createRotateServerStoragePVCPendingResizeConditionPlan(ctx if pvcResizePending != pvcResizePendingCond { if pvcResizePending { - plan = append(plan, shared.UpdateMemberConditionActionV2("PVC Resize pending", api.ConditionTypePVCResizePending, i.Group, i.Member.ID, true, "PVC Resize pending", "", "")) + plan = append(plan, sharedReconcile.UpdateMemberConditionActionV2("PVC Resize pending", api.ConditionTypePVCResizePending, i.Group, i.Member.ID, true, "PVC Resize pending", "", "")) } else { - plan = append(plan, shared.RemoveMemberConditionActionV2("PVC Resize is done", api.ConditionTypePVCResizePending, i.Group, i.Member.ID)) + plan = append(plan, sharedReconcile.RemoveMemberConditionActionV2("PVC Resize is done", api.ConditionTypePVCResizePending, i.Group, i.Member.ID)) } } } diff --git a/pkg/deployment/reconcile/plan_builder_sync.go b/pkg/deployment/reconcile/plan_builder_sync.go index 30c9124a9..993d55843 100644 --- a/pkg/deployment/reconcile/plan_builder_sync.go +++ b/pkg/deployment/reconcile/plan_builder_sync.go @@ -24,7 +24,7 @@ import ( "context" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) @@ -39,7 +39,7 @@ func (r *Reconciler) createSyncPlan(ctx context.Context, apiObject k8sutil.APIOb } // We need to enable condition - return api.Plan{shared.UpdateConditionActionV2("Sync Enabled", api.ConditionTypeSyncEnabled, true, "Sync enabled", "", "")} + return api.Plan{sharedReconcile.UpdateConditionActionV2("Sync Enabled", api.ConditionTypeSyncEnabled, true, "Sync enabled", "", "")} } if !status.Conditions.IsTrue(api.ConditionTypeSyncEnabled) { @@ -56,7 +56,7 @@ func (r *Reconciler) createSyncPlan(ctx context.Context, apiObject k8sutil.APIOb if cache.ArangoSync.Error == nil { if !cache.ArangoSync.IsSyncInProgress() { // Remove condition - return api.Plan{shared.RemoveConditionActionV2("Sync Disabled", api.ConditionTypeSyncEnabled)} + return api.Plan{sharedReconcile.RemoveConditionActionV2("Sync Disabled", api.ConditionTypeSyncEnabled)} } } diff --git a/pkg/deployment/reconcile/plan_builder_test.go b/pkg/deployment/reconcile/plan_builder_test.go index 850c86411..b27526214 100644 --- a/pkg/deployment/reconcile/plan_builder_test.go +++ b/pkg/deployment/reconcile/plan_builder_test.go @@ -49,7 +49,7 @@ import ( "github.com/arangodb/kube-arangodb/pkg/deployment/member" "github.com/arangodb/kube-arangodb/pkg/deployment/patch" pod2 "github.com/arangodb/kube-arangodb/pkg/deployment/pod" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/reconciler" "github.com/arangodb/kube-arangodb/pkg/deployment/resources" "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned" @@ -878,7 +878,7 @@ func TestCreatePlan(t *testing.T) { "with reason: Member replacement required", }, ExpectedHighPlan: []api.Action{ - actions.NewAction(api.ActionTypeSetMemberConditionV2, api.ServerGroupDBServers, shared.WithPredefinedMember(""), "Member replacement required"), + actions.NewAction(api.ActionTypeSetMemberConditionV2, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember(""), "Member replacement required"), }, ExpectedLog: "Member replacement required", }, @@ -1101,7 +1101,7 @@ func TestCreatePlan(t *testing.T) { } }, ExpectedHighPlan: []api.Action{ - actions.NewAction(api.ActionTypeRecreateMember, api.ServerGroupAgents, shared.WithPredefinedMember("id")), + actions.NewAction(api.ActionTypeRecreateMember, api.ServerGroupAgents, sharedReconcile.WithPredefinedMember("id")), }, ExpectedLog: "Restoring old member. For agency members recreation of PVC is not supported - to prevent DataLoss", }, @@ -1118,10 +1118,10 @@ func TestCreatePlan(t *testing.T) { ad.Status.Members.Coordinators[0].ID = "id" }, ExpectedPlan: []api.Action{ - actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupCoordinators, shared.WithPredefinedMember("id")), - actions.NewAction(api.ActionTypeAddMember, api.ServerGroupCoordinators, shared.WithPredefinedMember("")), + actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupCoordinators, sharedReconcile.WithPredefinedMember("id")), + actions.NewAction(api.ActionTypeAddMember, api.ServerGroupCoordinators, sharedReconcile.WithPredefinedMember("")), actions.NewAction(api.ActionTypeWaitForMemberUp, api.ServerGroupCoordinators, - shared.WithPredefinedMember(api.MemberIDPreviousAction)), + sharedReconcile.WithPredefinedMember(api.MemberIDPreviousAction)), }, ExpectedLog: "Creating member replacement plan because member has failed", }, @@ -1138,10 +1138,10 @@ func TestCreatePlan(t *testing.T) { ad.Status.Members.DBServers[0].ID = "id" }, ExpectedPlan: []api.Action{ - actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupDBServers, shared.WithPredefinedMember("id")), - actions.NewAction(api.ActionTypeAddMember, api.ServerGroupDBServers, shared.WithPredefinedMember("")), + actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id")), + actions.NewAction(api.ActionTypeAddMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("")), actions.NewAction(api.ActionTypeWaitForMemberUp, api.ServerGroupDBServers, - shared.WithPredefinedMember(api.MemberIDPreviousAction)), + sharedReconcile.WithPredefinedMember(api.MemberIDPreviousAction)), }, ExpectedLog: "Creating member replacement plan because member has failed", }, @@ -1158,10 +1158,10 @@ func TestCreatePlan(t *testing.T) { ad.Status.Members.DBServers[2].ID = "id3" }, ExpectedPlan: []api.Action{ - actions.NewAction(api.ActionTypeCleanOutMember, api.ServerGroupDBServers, shared.WithPredefinedMember("id3")), - actions.NewAction(api.ActionTypeKillMemberPod, api.ServerGroupDBServers, shared.WithPredefinedMember("id3")), - actions.NewAction(api.ActionTypeShutdownMember, api.ServerGroupDBServers, shared.WithPredefinedMember("id3")), - actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupDBServers, shared.WithPredefinedMember("id3")), + actions.NewAction(api.ActionTypeCleanOutMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id3")), + actions.NewAction(api.ActionTypeKillMemberPod, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id3")), + actions.NewAction(api.ActionTypeShutdownMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id3")), + actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id3")), }, ExpectedLog: "Creating scale-down plan", }, @@ -1183,10 +1183,10 @@ func TestCreatePlan(t *testing.T) { } }, ExpectedPlan: []api.Action{ - actions.NewAction(api.ActionTypeCleanOutMember, api.ServerGroupDBServers, shared.WithPredefinedMember("id")), - actions.NewAction(api.ActionTypeKillMemberPod, api.ServerGroupDBServers, shared.WithPredefinedMember("")), - actions.NewAction(api.ActionTypeShutdownMember, api.ServerGroupDBServers, shared.WithPredefinedMember("")), - actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupDBServers, shared.WithPredefinedMember("")), + actions.NewAction(api.ActionTypeCleanOutMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id")), + actions.NewAction(api.ActionTypeKillMemberPod, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("")), + actions.NewAction(api.ActionTypeShutdownMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("")), + actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("")), }, ExpectedLog: "Creating dbserver replacement plan because server is cleanout in created phase", }, @@ -1209,10 +1209,10 @@ func TestCreatePlan(t *testing.T) { } }, ExpectedPlan: []api.Action{ - actions.NewAction(api.ActionTypeCleanOutMember, api.ServerGroupDBServers, shared.WithPredefinedMember("id3")), - actions.NewAction(api.ActionTypeKillMemberPod, api.ServerGroupDBServers, shared.WithPredefinedMember("id3")), - actions.NewAction(api.ActionTypeShutdownMember, api.ServerGroupDBServers, shared.WithPredefinedMember("id3")), - actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupDBServers, shared.WithPredefinedMember("id3")), + actions.NewAction(api.ActionTypeCleanOutMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id3")), + actions.NewAction(api.ActionTypeKillMemberPod, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id3")), + actions.NewAction(api.ActionTypeShutdownMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id3")), + actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id3")), }, ExpectedLog: "Creating scale-down plan", }, @@ -1228,10 +1228,10 @@ func TestCreatePlan(t *testing.T) { ad.Status.Members.DBServers[0].Phase = api.MemberPhaseCreated }, ExpectedPlan: []api.Action{ - actions.NewAction(api.ActionTypeCleanOutMember, api.ServerGroupDBServers, shared.WithPredefinedMember("id")), - actions.NewAction(api.ActionTypeKillMemberPod, api.ServerGroupDBServers, shared.WithPredefinedMember("")), - actions.NewAction(api.ActionTypeShutdownMember, api.ServerGroupDBServers, shared.WithPredefinedMember("")), - actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupDBServers, shared.WithPredefinedMember("")), + actions.NewAction(api.ActionTypeCleanOutMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("id")), + actions.NewAction(api.ActionTypeKillMemberPod, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("")), + actions.NewAction(api.ActionTypeShutdownMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("")), + actions.NewAction(api.ActionTypeRemoveMember, api.ServerGroupDBServers, sharedReconcile.WithPredefinedMember("")), }, ExpectedLog: "Creating scale-down plan", }, diff --git a/pkg/deployment/reconcile/plan_builder_tls.go b/pkg/deployment/reconcile/plan_builder_tls.go index fc9220670..a59b585ab 100644 --- a/pkg/deployment/reconcile/plan_builder_tls.go +++ b/pkg/deployment/reconcile/plan_builder_tls.go @@ -35,7 +35,7 @@ import ( "github.com/arangodb/go-driver" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/actions" "github.com/arangodb/kube-arangodb/pkg/deployment/client" "github.com/arangodb/kube-arangodb/pkg/deployment/features" diff --git a/pkg/deployment/reconcile/plan_builder_volume.go b/pkg/deployment/reconcile/plan_builder_volume.go index 0eb57588c..45c906830 100644 --- a/pkg/deployment/reconcile/plan_builder_volume.go +++ b/pkg/deployment/reconcile/plan_builder_volume.go @@ -27,11 +27,11 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - sharedApis "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/actions" "github.com/arangodb/kube-arangodb/pkg/deployment/agency/state" "github.com/arangodb/kube-arangodb/pkg/deployment/features" - "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" + sharedReconcile "github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" inspectorInterface "github.com/arangodb/kube-arangodb/pkg/util/k8sutil/inspector" ) @@ -115,10 +115,10 @@ func (r *Reconciler) updateMemberConditionTypeMemberVolumeUnschedulableCondition if unschedulable == e.Member.Conditions.IsTrue(api.ConditionTypeMemberVolumeUnschedulable) { continue } else if unschedulable && !e.Member.Conditions.IsTrue(api.ConditionTypeMemberVolumeUnschedulable) { - plan = append(plan, shared.UpdateMemberConditionActionV2("PV Unschedulable", api.ConditionTypeMemberVolumeUnschedulable, e.Group, e.Member.ID, true, + plan = append(plan, sharedReconcile.UpdateMemberConditionActionV2("PV Unschedulable", api.ConditionTypeMemberVolumeUnschedulable, e.Group, e.Member.ID, true, "PV Unschedulable", "PV Unschedulable", "")) } else if !unschedulable && e.Member.Conditions.IsTrue(api.ConditionTypeMemberVolumeUnschedulable) { - plan = append(plan, shared.RemoveMemberConditionActionV2("PV Schedulable", api.ConditionTypeMemberVolumeUnschedulable, e.Group, e.Member.ID)) + plan = append(plan, sharedReconcile.RemoveMemberConditionActionV2("PV Schedulable", api.ConditionTypeMemberVolumeUnschedulable, e.Group, e.Member.ID)) } } @@ -179,7 +179,7 @@ func memberConditionTypeMemberVolumeUnschedulableLocalStorageGone(cache inspecto if required := nodeAffinity.Required; required != nil { for _, nst := range required.NodeSelectorTerms { for _, expr := range nst.MatchExpressions { - if expr.Key == sharedApis.TopologyKeyHostname && expr.Operator == core.NodeSelectorOpIn { + if expr.Key == shared.TopologyKeyHostname && expr.Operator == core.NodeSelectorOpIn { // We got exact key which is required for PV if len(expr.Values) == 1 { // Only one host assigned, we use it as localStorage - check if node exists diff --git a/pkg/deployment/reconcile/plan_builder_volume_test.go b/pkg/deployment/reconcile/plan_builder_volume_test.go index 440c94f23..dd95e69bb 100644 --- a/pkg/deployment/reconcile/plan_builder_volume_test.go +++ b/pkg/deployment/reconcile/plan_builder_volume_test.go @@ -28,7 +28,7 @@ import ( core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/kclient" "github.com/arangodb/kube-arangodb/pkg/util/tests" ) diff --git a/pkg/deployment/resources/exporter.go b/pkg/deployment/resources/exporter.go index d108f464e..040b27759 100644 --- a/pkg/deployment/resources/exporter.go +++ b/pkg/deployment/resources/exporter.go @@ -1,5 +1,5 @@ // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import ( "github.com/arangodb/go-driver" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/constants" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil/probes" diff --git a/pkg/deployment/resources/internal_exporter.go b/pkg/deployment/resources/internal_exporter.go index 8d18a4e2d..08943c68a 100644 --- a/pkg/deployment/resources/internal_exporter.go +++ b/pkg/deployment/resources/internal_exporter.go @@ -22,7 +22,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil/probes" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil/resources" diff --git a/pkg/deployment/resources/pod_creator.go b/pkg/deployment/resources/pod_creator.go index 289b5c332..2825701f1 100644 --- a/pkg/deployment/resources/pod_creator.go +++ b/pkg/deployment/resources/pod_creator.go @@ -35,7 +35,7 @@ import ( "k8s.io/apimachinery/pkg/types" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/acs/sutil" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/deployment/member" diff --git a/pkg/deployment/resources/pod_creator_agent_args_test.go b/pkg/deployment/resources/pod_creator_agent_args_test.go index fcc303ca8..4af399739 100644 --- a/pkg/deployment/resources/pod_creator_agent_args_test.go +++ b/pkg/deployment/resources/pod_creator_agent_args_test.go @@ -31,7 +31,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/pod" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/constants" diff --git a/pkg/deployment/resources/pod_creator_arangod.go b/pkg/deployment/resources/pod_creator_arangod.go index 7f673b26a..1e06f4edb 100644 --- a/pkg/deployment/resources/pod_creator_arangod.go +++ b/pkg/deployment/resources/pod_creator_arangod.go @@ -30,7 +30,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/deployment/pod" "github.com/arangodb/kube-arangodb/pkg/deployment/topology" diff --git a/pkg/deployment/resources/pod_creator_coordinator_args_test.go b/pkg/deployment/resources/pod_creator_coordinator_args_test.go index 1155fad8f..f2f16620e 100644 --- a/pkg/deployment/resources/pod_creator_coordinator_args_test.go +++ b/pkg/deployment/resources/pod_creator_coordinator_args_test.go @@ -29,7 +29,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/pod" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/constants" diff --git a/pkg/deployment/resources/pod_creator_dbserver_args_test.go b/pkg/deployment/resources/pod_creator_dbserver_args_test.go index 1ee82d906..5b8c9cc77 100644 --- a/pkg/deployment/resources/pod_creator_dbserver_args_test.go +++ b/pkg/deployment/resources/pod_creator_dbserver_args_test.go @@ -29,7 +29,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/pod" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/constants" diff --git a/pkg/deployment/resources/pod_creator_single_args_test.go b/pkg/deployment/resources/pod_creator_single_args_test.go index 44accaeea..055b8b482 100644 --- a/pkg/deployment/resources/pod_creator_single_args_test.go +++ b/pkg/deployment/resources/pod_creator_single_args_test.go @@ -29,7 +29,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/pod" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/constants" diff --git a/pkg/deployment/resources/pod_creator_sync.go b/pkg/deployment/resources/pod_creator_sync.go index c9544949a..6a75e063f 100644 --- a/pkg/deployment/resources/pod_creator_sync.go +++ b/pkg/deployment/resources/pod_creator_sync.go @@ -32,7 +32,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/deployment/pod" "github.com/arangodb/kube-arangodb/pkg/handlers/utils" diff --git a/pkg/deployment/resources/pod_inspector.go b/pkg/deployment/resources/pod_inspector.go index 607cd2776..5696f8d9a 100644 --- a/pkg/deployment/resources/pod_inspector.go +++ b/pkg/deployment/resources/pod_inspector.go @@ -31,7 +31,7 @@ import ( "github.com/arangodb/kube-arangodb/pkg/apis/deployment" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/agency/state" "github.com/arangodb/kube-arangodb/pkg/deployment/patch" "github.com/arangodb/kube-arangodb/pkg/metrics" diff --git a/pkg/deployment/resources/pod_termination.go b/pkg/deployment/resources/pod_termination.go index 9168182fa..9039aea5f 100644 --- a/pkg/deployment/resources/pod_termination.go +++ b/pkg/deployment/resources/pod_termination.go @@ -29,7 +29,7 @@ import ( driver "github.com/arangodb/go-driver" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/agency/state" "github.com/arangodb/kube-arangodb/pkg/util/errors" "github.com/arangodb/kube-arangodb/pkg/util/globals" diff --git a/pkg/deployment/resources/secrets.go b/pkg/deployment/resources/secrets.go index fb4995e41..190b79a36 100644 --- a/pkg/deployment/resources/secrets.go +++ b/pkg/deployment/resources/secrets.go @@ -35,7 +35,7 @@ import ( "k8s.io/apimachinery/pkg/util/json" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/deployment/patch" "github.com/arangodb/kube-arangodb/pkg/deployment/pod" diff --git a/pkg/deployment/resources/services.go b/pkg/deployment/resources/services.go index 91b9a1367..34395ae02 100644 --- a/pkg/deployment/resources/services.go +++ b/pkg/deployment/resources/services.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/metrics" "github.com/arangodb/kube-arangodb/pkg/util/errors" diff --git a/pkg/deployment/rotation/arangod_containers_test.go b/pkg/deployment/rotation/arangod_containers_test.go index 4ed3174b6..a92fa988b 100644 --- a/pkg/deployment/rotation/arangod_containers_test.go +++ b/pkg/deployment/rotation/arangod_containers_test.go @@ -27,7 +27,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/deployment/actions" "github.com/arangodb/kube-arangodb/pkg/util/compare" ) diff --git a/pkg/deployment/rotation/arangod_volume_mounts.go b/pkg/deployment/rotation/arangod_volume_mounts.go index 5809bfe36..f14dafde6 100644 --- a/pkg/deployment/rotation/arangod_volume_mounts.go +++ b/pkg/deployment/rotation/arangod_volume_mounts.go @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/compare" ) diff --git a/pkg/deployment/rotation/arangod_volumes.go b/pkg/deployment/rotation/arangod_volumes.go index cd88c2e28..4e17dff59 100644 --- a/pkg/deployment/rotation/arangod_volumes.go +++ b/pkg/deployment/rotation/arangod_volumes.go @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/compare" ) diff --git a/pkg/deployment/rotation/arangod_volumes_test.go b/pkg/deployment/rotation/arangod_volumes_test.go index d026333fb..f04d7ef4a 100644 --- a/pkg/deployment/rotation/arangod_volumes_test.go +++ b/pkg/deployment/rotation/arangod_volumes_test.go @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/compare" ) diff --git a/pkg/deployment/server_api.go b/pkg/deployment/server_api.go index 37aef5951..bef8109d6 100644 --- a/pkg/deployment/server_api.go +++ b/pkg/deployment/server_api.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" memberState "github.com/arangodb/kube-arangodb/pkg/deployment/member" "github.com/arangodb/kube-arangodb/pkg/server" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" diff --git a/pkg/exporter/monitor.go b/pkg/exporter/monitor.go index 773628443..b0b6b5e4d 100644 --- a/pkg/exporter/monitor.go +++ b/pkg/exporter/monitor.go @@ -36,7 +36,7 @@ import ( "github.com/arangodb/go-driver" "github.com/arangodb/go-driver/util" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/logging" "github.com/arangodb/kube-arangodb/pkg/util/timer" ) diff --git a/pkg/handlers/backup/status.go b/pkg/handlers/backup/status.go index 85e191967..edd80fe9d 100644 --- a/pkg/handlers/backup/status.go +++ b/pkg/handlers/backup/status.go @@ -29,7 +29,7 @@ import ( "github.com/arangodb/go-driver" backupApi "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1" - shared "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" + sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/handlers/backup/state" "github.com/arangodb/kube-arangodb/pkg/util" ) @@ -155,12 +155,12 @@ func createBackupFromMeta(backupMeta driver.BackupMeta, old *backupApi.ArangoBac return obj } -func keysToHashList(l []driver.BackupMetaSha256) shared.HashList { +func keysToHashList(l []driver.BackupMetaSha256) sharedApi.HashList { if len(l) == 0 { return nil } - r := make(shared.HashList, len(l)) + r := make(sharedApi.HashList, len(l)) for id, i := range l { r[id] = fmt.Sprintf("sha256:%s", i.SHA256) diff --git a/pkg/handlers/job/handler.go b/pkg/handlers/job/handler.go index 20922a392..9542d7fb6 100644 --- a/pkg/handlers/job/handler.go +++ b/pkg/handlers/job/handler.go @@ -34,7 +34,7 @@ import ( "github.com/arangodb/kube-arangodb/pkg/apis/apps" appsApi "github.com/arangodb/kube-arangodb/pkg/apis/apps/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" arangoClientSet "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned" operator "github.com/arangodb/kube-arangodb/pkg/operatorV2" "github.com/arangodb/kube-arangodb/pkg/operatorV2/event" diff --git a/pkg/replication/sync_client.go b/pkg/replication/sync_client.go index 57aecdef5..d95f17f8a 100644 --- a/pkg/replication/sync_client.go +++ b/pkg/replication/sync_client.go @@ -32,7 +32,7 @@ import ( "github.com/arangodb/arangosync-client/tasks" api "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) diff --git a/pkg/storage/pv_creator.go b/pkg/storage/pv_creator.go index 30e0de51d..fe2377ab4 100644 --- a/pkg/storage/pv_creator.go +++ b/pkg/storage/pv_creator.go @@ -37,7 +37,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" api "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/storage/provisioner" diff --git a/pkg/util/arangod/client.go b/pkg/util/arangod/client.go index 567e5b4bc..6819d757a 100644 --- a/pkg/util/arangod/client.go +++ b/pkg/util/arangod/client.go @@ -36,7 +36,7 @@ import ( "github.com/arangodb/go-driver/util/connection/wrappers/async" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" "github.com/arangodb/kube-arangodb/pkg/util/globals" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" diff --git a/pkg/util/k8sutil/affinity.go b/pkg/util/k8sutil/affinity.go index 74bfd696b..70c52057e 100644 --- a/pkg/util/k8sutil/affinity.go +++ b/pkg/util/k8sutil/affinity.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import ( core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) // CreateAffinity creates pod anti-affinity for the given role. diff --git a/pkg/util/k8sutil/affinity_test.go b/pkg/util/k8sutil/affinity_test.go index 8405340c0..aff4013ea 100644 --- a/pkg/util/k8sutil/affinity_test.go +++ b/pkg/util/k8sutil/affinity_test.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/require" core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) func TestCreateAffinity(t *testing.T) { diff --git a/pkg/util/k8sutil/dns.go b/pkg/util/k8sutil/dns.go index c390637b9..8c4e93ba8 100644 --- a/pkg/util/k8sutil/dns.go +++ b/pkg/util/k8sutil/dns.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import ( core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) func appendDeploymentClusterDomain(dns string, domain *string) string { diff --git a/pkg/util/k8sutil/images.go b/pkg/util/k8sutil/images.go index 957aa629a..c9eb12159 100644 --- a/pkg/util/k8sutil/images.go +++ b/pkg/util/k8sutil/images.go @@ -25,7 +25,7 @@ import ( core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/util/k8sutil/images_test.go b/pkg/util/k8sutil/images_test.go index 136d7be86..d3faba86f 100644 --- a/pkg/util/k8sutil/images_test.go +++ b/pkg/util/k8sutil/images_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/require" core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) diff --git a/pkg/util/k8sutil/names_test.go b/pkg/util/k8sutil/names_test.go index 1ca6be366..8f5c1a500 100644 --- a/pkg/util/k8sutil/names_test.go +++ b/pkg/util/k8sutil/names_test.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ package k8sutil import ( "testing" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) func TestValidateResourceName(t *testing.T) { diff --git a/pkg/util/k8sutil/pods.go b/pkg/util/k8sutil/pods.go index 601178864..7de1d559b 100644 --- a/pkg/util/k8sutil/pods.go +++ b/pkg/util/k8sutil/pods.go @@ -35,7 +35,7 @@ import ( "k8s.io/apimachinery/pkg/util/json" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/deployment/features" "github.com/arangodb/kube-arangodb/pkg/deployment/patch" diff --git a/pkg/util/k8sutil/probes/probes.go b/pkg/util/k8sutil/probes/probes.go index f77011033..8aaadb902 100644 --- a/pkg/util/k8sutil/probes/probes.go +++ b/pkg/util/k8sutil/probes/probes.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) // HTTPProbeConfig contains settings for creating a liveness/readiness probe. diff --git a/pkg/util/k8sutil/probes/probes_test.go b/pkg/util/k8sutil/probes/probes_test.go index a11647864..9b898c343 100644 --- a/pkg/util/k8sutil/probes/probes_test.go +++ b/pkg/util/k8sutil/probes/probes_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" core "k8s.io/api/core/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) func TestCreate(t *testing.T) { diff --git a/pkg/util/k8sutil/services.go b/pkg/util/k8sutil/services.go index 4fcbf1c53..d38e3f8f6 100644 --- a/pkg/util/k8sutil/services.go +++ b/pkg/util/k8sutil/services.go @@ -31,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil/inspector" diff --git a/pkg/util/k8sutil/tls/tls.go b/pkg/util/k8sutil/tls/tls.go index c070fd855..5f598c08d 100644 --- a/pkg/util/k8sutil/tls/tls.go +++ b/pkg/util/k8sutil/tls/tls.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany +// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" "github.com/arangodb/kube-arangodb/pkg/util/k8sutil" ) diff --git a/pkg/util/k8sutil/version_check.go b/pkg/util/k8sutil/version_check.go index 687d244db..0e2e3d595 100644 --- a/pkg/util/k8sutil/version_check.go +++ b/pkg/util/k8sutil/version_check.go @@ -28,7 +28,7 @@ import ( "github.com/arangodb/go-driver" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) // ArangodVersionCheckInitContainer creates a container configured to check version. diff --git a/pkg/util/svc/service.go b/pkg/util/svc/service.go index 5471815b3..204407ecb 100644 --- a/pkg/util/svc/service.go +++ b/pkg/util/svc/service.go @@ -24,7 +24,7 @@ import ( "context" "sync" - "github.com/arangodb/kube-arangodb/pkg/apis/shared" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" ) type Service interface {