Skip to content

Commit

Permalink
Refactored cluster code
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekdwivedi3060 committed Aug 13, 2024
1 parent c8095ff commit 07f1e54
Show file tree
Hide file tree
Showing 25 changed files with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

// Aerospike access control reconciliation of access control.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers
package cluster

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion controllers/pod.go → controllers/cluster/pod.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion controllers/pvc.go → controllers/cluster/pvc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion controllers/rack.go → controllers/cluster/rack.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
"context"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion controllers/service.go → controllers/cluster/service.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package controllers
package cluster

import (
gosets "github.com/deckarep/golang-set/v2"
Expand Down
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ import (
"github.com/aerospike/aerospike-management-lib/asconfig"

asdbv1 "github.com/aerospike/aerospike-kubernetes-operator/api/v1"
// +kubebuilder:scaffold:imports
asdbv1beta1 "github.com/aerospike/aerospike-kubernetes-operator/api/v1beta1"
aerospikecluster "github.com/aerospike/aerospike-kubernetes-operator/controllers"
"github.com/aerospike/aerospike-kubernetes-operator/controllers/backup"
backupservice "github.com/aerospike/aerospike-kubernetes-operator/controllers/backup-service"

// +kubebuilder:scaffold:imports
"github.com/aerospike/aerospike-kubernetes-operator/controllers/cluster"
"github.com/aerospike/aerospike-kubernetes-operator/controllers/restore"
"github.com/aerospike/aerospike-kubernetes-operator/pkg/configschema"
)
Expand Down Expand Up @@ -137,7 +138,7 @@ func main() {
eventBroadcaster.StartStructuredLogging(0)
eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")})

if err = (&aerospikecluster.AerospikeClusterReconciler{
if err = (&cluster.AerospikeClusterReconciler{
Client: client,
KubeClient: kubeClient,
KubeConfig: kubeConfig,
Expand Down
2 changes: 1 addition & 1 deletion test/cluster/access_control_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

as "github.com/aerospike/aerospike-client-go/v7"
asdbv1 "github.com/aerospike/aerospike-kubernetes-operator/api/v1"
aerospikecluster "github.com/aerospike/aerospike-kubernetes-operator/controllers"
aerospikecluster "github.com/aerospike/aerospike-kubernetes-operator/controllers/cluster"
"github.com/aerospike/aerospike-kubernetes-operator/test"
)

Expand Down
2 changes: 1 addition & 1 deletion test/cluster/network_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"k8s.io/utils/ptr"

asdbv1 "github.com/aerospike/aerospike-kubernetes-operator/api/v1"
aerospikecluster "github.com/aerospike/aerospike-kubernetes-operator/controllers"
aerospikecluster "github.com/aerospike/aerospike-kubernetes-operator/controllers/cluster"
"github.com/aerospike/aerospike-kubernetes-operator/test"
"github.com/aerospike/aerospike-management-lib/deployment"
)
Expand Down
2 changes: 1 addition & 1 deletion test/cluster/test_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

as "github.com/aerospike/aerospike-client-go/v7"
asdbv1 "github.com/aerospike/aerospike-kubernetes-operator/api/v1"
aerospikecluster "github.com/aerospike/aerospike-kubernetes-operator/controllers"
aerospikecluster "github.com/aerospike/aerospike-kubernetes-operator/controllers/cluster"
)

// FromSecretPasswordProvider provides user password from the secret provided in AerospikeUserSpec.
Expand Down

0 comments on commit 07f1e54

Please sign in to comment.