Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ CHAMBER_BIN := $(LOCAL_BIN_PATH)/chamber
$(CHAMBER_BIN): $(TOOLS_DIR)/go.mod $(TOOLS_DIR)/go.sum
@cd $(TOOLS_DIR) && GOBIN=${LOCAL_BIN_PATH} $(GO) install github.com/segmentio/chamber/v2

DEEPCOPY_GEN_BIN := $(LOCAL_BIN_PATH)/deepcopy-gen
$(DEEPCOPY_GEN_BIN): $(TOOLS_DIR)/go.mod $(TOOLS_DIR)/go.sum
@cd $(TOOLS_DIR) && GOBIN=${LOCAL_BIN_PATH} $(GO) install k8s.io/code-generator/cmd/deepcopy-gen

GINKGO_BIN := $(LOCAL_BIN_PATH)/ginkgo
$(GINKGO_BIN): go.mod go.sum
@GOBIN=${LOCAL_BIN_PATH} $(GO) install github.com/onsi/ginkgo/v2/ginkgo
Expand Down Expand Up @@ -399,7 +403,7 @@ test/e2e/cleanup:
.PHONY: test/e2e/cleanup

# generate files
generate: $(MOQ_BIN) openapi/generate
generate: $(MOQ_BIN) openapi/generate deepcopy-gen/generate
$(GO) generate ./...
.PHONY: generate

Expand Down Expand Up @@ -450,6 +454,13 @@ openapi/generate/emailsender: openapi-generator
$(GOFMT) -w emailsender/pkg/client/openapi
.PHONY: openapi/generate/emailsender

.PHONY: deepcopy-gen/generate
deepcopy-gen/generate: $(DEEPCOPY_GEN_BIN)
@$(DEEPCOPY_GEN_BIN) \
--output-file zz_generated.deepcopy.go \
--go-header-file /dev/null \
github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1

# fail if formatting is required
code/check:
@if ! [ -z "$$(find . -path './vendor' -prune -o -type f -name '*.go' -print0 | xargs -0 $(GOFMT) -l)" ]; then \
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e_canary_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"os"
"strings"

argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
"github.com/stackrox/rox/operator/api/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion fleetshard/pkg/argox/generic_argo_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"fmt"

argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/golang/glog"
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/util/json"
ctrlClient "sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
5 changes: 3 additions & 2 deletions fleetshard/pkg/argox/generic_argo_reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ package argox

import (
"context"
argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"testing"

argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/client/interceptor"
"testing"
)

func Test_reconcileArgoCDApplications_deletesUnwantedApplications(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion fleetshard/pkg/central/reconciler/argo_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"fmt"
"time"

argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/golang/glog"
"github.com/stackrox/acs-fleet-manager/fleetshard/config"
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/argox"
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/central/postgres"
"github.com/stackrox/acs-fleet-manager/internal/central/pkg/api/private"
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
apiErrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
3 changes: 1 addition & 2 deletions fleetshard/pkg/central/reconciler/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"testing"
"time"

argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"

"github.com/aws/smithy-go"
openshiftRouteV1 "github.com/openshift/api/route/v1"
"github.com/pkg/errors"
Expand All @@ -25,6 +23,7 @@ import (
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/util"
centralConstants "github.com/stackrox/acs-fleet-manager/internal/central/constants"
"github.com/stackrox/acs-fleet-manager/internal/central/pkg/api/private"
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
"github.com/stackrox/acs-fleet-manager/pkg/client/fleetmanager"
fmMocks "github.com/stackrox/acs-fleet-manager/pkg/client/fleetmanager/mocks"
centralNotifierUtils "github.com/stackrox/rox/central/notifiers/utils"
Expand Down
2 changes: 1 addition & 1 deletion fleetshard/pkg/k8s/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
package k8s

import (
argoCd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/golang/glog"
openshiftOperatorV1 "github.com/openshift/api/operator/v1"
openshiftRouteV1 "github.com/openshift/api/route/v1"
argoCd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
"github.com/stackrox/rox/operator/api/v1alpha1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
2 changes: 1 addition & 1 deletion fleetshard/pkg/runtime/runtime_applications_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"encoding/json"
"fmt"

argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/golang/glog"
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
ctrlClient "sigs.k8s.io/controller-runtime/pkg/client"

"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/argox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion fleetshard/pkg/testutils/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"fmt"
"testing"

argoCd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/hashicorp/go-multierror"
openshiftOperatorV1 "github.com/openshift/api/operator/v1"
openshiftRouteV1 "github.com/openshift/api/route/v1"
"github.com/pkg/errors"
argoCd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
platform "github.com/stackrox/rox/operator/api/v1alpha1"
"github.com/stretchr/testify/require"
appsv1 "k8s.io/api/apps/v1"
Expand Down
Loading
Loading