Skip to content

Commit

Permalink
update more v1beta1 references to argoproj
Browse files Browse the repository at this point in the history
Signed-off-by: Jaideep Rao <jaideep.r97@gmail.com>
  • Loading branch information
jaideepr97 committed Sep 27, 2023
1 parent 520cdca commit 7d22415
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions pkg/cluster/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sort"
"testing"

"github.com/argoproj-labs/argocd-operator/api/v1beta1"
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/pkg/mutation"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -35,11 +35,11 @@ var (
}
)

func testMutationFuncFailed(cr *v1beta1.ArgoCD, resource interface{}, client cntrlClient.Client) error {
func testMutationFuncFailed(cr *argoproj.ArgoCD, resource interface{}, client cntrlClient.Client) error {
return errors.New("test-mutation-error")
}

func testMutationFuncSuccessful(cr *v1beta1.ArgoCD, resource interface{}, client cntrlClient.Client) error {
func testMutationFuncSuccessful(cr *argoproj.ArgoCD, resource interface{}, client cntrlClient.Client) error {
switch obj := resource.(type) {
case *corev1.Namespace:
if _, ok := obj.Labels[testKey]; ok {
Expand Down
6 changes: 3 additions & 3 deletions pkg/monitoring/monitoring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package monitoring
import (
"errors"

"github.com/argoproj-labs/argocd-operator/api/v1beta1"
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1"
cntrlClient "sigs.k8s.io/controller-runtime/pkg/client"
)
Expand All @@ -25,11 +25,11 @@ var (
}
)

func testMutationFuncFailed(cr *v1beta1.ArgoCD, resource interface{}, client cntrlClient.Client) error {
func testMutationFuncFailed(cr *argoproj.ArgoCD, resource interface{}, client cntrlClient.Client) error {
return errors.New("test-mutation-error")
}

func testMutationFuncSuccessful(cr *v1beta1.ArgoCD, resource interface{}, client cntrlClient.Client) error {
func testMutationFuncSuccessful(cr *argoproj.ArgoCD, resource interface{}, client cntrlClient.Client) error {
switch obj := resource.(type) {
case *monitoringv1.PrometheusRule:
obj.Name = testPrometheusRuleNameMutated
Expand Down
6 changes: 3 additions & 3 deletions pkg/mutation/mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mutation
import (
"sync"

"github.com/argoproj-labs/argocd-operator/api/v1beta1"
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand All @@ -13,7 +13,7 @@ var (
)

// MutateFunc defines the function signature for any mutation functions that need to be executed by this package
type MutateFunc func(*v1beta1.ArgoCD, interface{}, client.Client) error
type MutateFunc func(*argoproj.ArgoCD, interface{}, client.Client) error

// Register adds a modifier for updating resources during reconciliation.
func Register(m ...MutateFunc) {
Expand All @@ -22,7 +22,7 @@ func Register(m ...MutateFunc) {
mutateFuncs = append(mutateFuncs, m...)
}

func ApplyReconcilerMutation(cr *v1beta1.ArgoCD, resource interface{}, client client.Client) error {
func ApplyReconcilerMutation(cr *argoproj.ArgoCD, resource interface{}, client client.Client) error {
mutex.Lock()
defer mutex.Unlock()
for _, mutateFunc := range mutateFuncs {
Expand Down
4 changes: 2 additions & 2 deletions pkg/mutation/openshift/openshift.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package openshift
import (
"fmt"

"github.com/argoproj-labs/argocd-operator/api/v1beta1"
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/pkg/cluster"
"github.com/argoproj-labs/argocd-operator/pkg/mutation"
"golang.org/x/mod/semver"
Expand All @@ -15,7 +15,7 @@ func init() {
mutation.Register(AddSeccompProfileForOpenShift)
}

func AddSeccompProfileForOpenShift(cr *v1beta1.ArgoCD, resource interface{}, client client.Client) error {
func AddSeccompProfileForOpenShift(cr *argoproj.ArgoCD, resource interface{}, client client.Client) error {
if !cluster.IsVersionAPIAvailable() {
return nil
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/networking/networking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package networking
import (
"errors"

"github.com/argoproj-labs/argocd-operator/api/v1beta1"
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
routev1 "github.com/openshift/api/route/v1"
corev1 "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
Expand All @@ -29,11 +29,11 @@ var (
}
)

func testMutationFuncFailed(cr *v1beta1.ArgoCD, resource interface{}, client cntrlClient.Client) error {
func testMutationFuncFailed(cr *argoproj.ArgoCD, resource interface{}, client cntrlClient.Client) error {
return errors.New("test-mutation-error")
}

func testMutationFuncSuccessful(cr *v1beta1.ArgoCD, resource interface{}, client cntrlClient.Client) error {
func testMutationFuncSuccessful(cr *argoproj.ArgoCD, resource interface{}, client cntrlClient.Client) error {
switch obj := resource.(type) {
case *corev1.Service:
obj.Name = testServiceNameMutated
Expand Down
6 changes: 3 additions & 3 deletions pkg/permissions/permissions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package permissions
import (
"errors"

"github.com/argoproj-labs/argocd-operator/api/v1beta1"
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
rbacv1 "k8s.io/api/rbac/v1"
cntrlClient "sigs.k8s.io/controller-runtime/pkg/client"
)
Expand Down Expand Up @@ -61,11 +61,11 @@ var (
}
)

func testMutationFuncFailed(cr *v1beta1.ArgoCD, resource interface{}, client cntrlClient.Client) error {
func testMutationFuncFailed(cr *argoproj.ArgoCD, resource interface{}, client cntrlClient.Client) error {
return errors.New("test-mutation-error")
}

func testMutationFuncSuccessful(cr *v1beta1.ArgoCD, resource interface{}, client cntrlClient.Client) error {
func testMutationFuncSuccessful(cr *argoproj.ArgoCD, resource interface{}, client cntrlClient.Client) error {
switch obj := resource.(type) {
case *rbacv1.Role:
if obj.Namespace == testNamespace {
Expand Down

0 comments on commit 7d22415

Please sign in to comment.