Skip to content

Commit ccf1708

Browse files
authored
ROX-33400: vendor ArgoCD v1alpha1.Application (#2605)
1 parent 8d3304c commit ccf1708

File tree

20 files changed

+1829
-588
lines changed

20 files changed

+1829
-588
lines changed

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ CHAMBER_BIN := $(LOCAL_BIN_PATH)/chamber
9595
$(CHAMBER_BIN): $(TOOLS_DIR)/go.mod $(TOOLS_DIR)/go.sum
9696
@cd $(TOOLS_DIR) && GOBIN=${LOCAL_BIN_PATH} $(GO) install github.com/segmentio/chamber/v2
9797

98+
DEEPCOPY_GEN_BIN := $(LOCAL_BIN_PATH)/deepcopy-gen
99+
$(DEEPCOPY_GEN_BIN): $(TOOLS_DIR)/go.mod $(TOOLS_DIR)/go.sum
100+
@cd $(TOOLS_DIR) && GOBIN=${LOCAL_BIN_PATH} $(GO) install k8s.io/code-generator/cmd/deepcopy-gen
101+
98102
GINKGO_BIN := $(LOCAL_BIN_PATH)/ginkgo
99103
$(GINKGO_BIN): go.mod go.sum
100104
@GOBIN=${LOCAL_BIN_PATH} $(GO) install github.com/onsi/ginkgo/v2/ginkgo
@@ -399,7 +403,7 @@ test/e2e/cleanup:
399403
.PHONY: test/e2e/cleanup
400404

401405
# generate files
402-
generate: $(MOQ_BIN) openapi/generate
406+
generate: $(MOQ_BIN) openapi/generate deepcopy-gen/generate
403407
$(GO) generate ./...
404408
.PHONY: generate
405409

@@ -450,6 +454,13 @@ openapi/generate/emailsender: openapi-generator
450454
$(GOFMT) -w emailsender/pkg/client/openapi
451455
.PHONY: openapi/generate/emailsender
452456

457+
.PHONY: deepcopy-gen/generate
458+
deepcopy-gen/generate: $(DEEPCOPY_GEN_BIN)
459+
@$(DEEPCOPY_GEN_BIN) \
460+
--output-file zz_generated.deepcopy.go \
461+
--go-header-file /dev/null \
462+
github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1
463+
453464
# fail if formatting is required
454465
code/check:
455466
@if ! [ -z "$$(find . -path './vendor' -prune -o -type f -name '*.go' -print0 | xargs -0 $(GOFMT) -l)" ]; then \

e2e/e2e_canary_upgrade_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"os"
88
"strings"
99

10-
argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
1110
. "github.com/onsi/ginkgo/v2"
1211
. "github.com/onsi/gomega"
12+
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
1313
"github.com/stackrox/rox/operator/api/v1alpha1"
1414
appsv1 "k8s.io/api/apps/v1"
1515
v1 "k8s.io/api/core/v1"

fleetshard/pkg/argox/generic_argo_reconciler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"context"
55
"fmt"
66

7-
argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
87
"github.com/golang/glog"
8+
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
99
"k8s.io/apimachinery/pkg/api/errors"
1010
"k8s.io/apimachinery/pkg/util/json"
1111
ctrlClient "sigs.k8s.io/controller-runtime/pkg/client"

fleetshard/pkg/argox/generic_argo_reconciler_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ package argox
22

33
import (
44
"context"
5-
argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
5+
"testing"
6+
7+
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
68
"github.com/stretchr/testify/assert"
79
"github.com/stretchr/testify/require"
810
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
911
"k8s.io/apimachinery/pkg/runtime"
1012
"sigs.k8s.io/controller-runtime/pkg/client"
1113
"sigs.k8s.io/controller-runtime/pkg/client/fake"
1214
"sigs.k8s.io/controller-runtime/pkg/client/interceptor"
13-
"testing"
1415
)
1516

1617
func Test_reconcileArgoCDApplications_deletesUnwantedApplications(t *testing.T) {

fleetshard/pkg/central/reconciler/argo_reconciler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import (
66
"fmt"
77
"time"
88

9-
argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
109
"github.com/golang/glog"
1110
"github.com/stackrox/acs-fleet-manager/fleetshard/config"
1211
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/argox"
1312
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/central/postgres"
1413
"github.com/stackrox/acs-fleet-manager/internal/central/pkg/api/private"
14+
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
1515
apiErrors "k8s.io/apimachinery/pkg/api/errors"
1616
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1717
"k8s.io/apimachinery/pkg/runtime"

fleetshard/pkg/central/reconciler/reconciler_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import (
1010
"testing"
1111
"time"
1212

13-
argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
14-
1513
"github.com/aws/smithy-go"
1614
openshiftRouteV1 "github.com/openshift/api/route/v1"
1715
"github.com/pkg/errors"
@@ -25,6 +23,7 @@ import (
2523
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/util"
2624
centralConstants "github.com/stackrox/acs-fleet-manager/internal/central/constants"
2725
"github.com/stackrox/acs-fleet-manager/internal/central/pkg/api/private"
26+
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
2827
"github.com/stackrox/acs-fleet-manager/pkg/client/fleetmanager"
2928
fmMocks "github.com/stackrox/acs-fleet-manager/pkg/client/fleetmanager/mocks"
3029
centralNotifierUtils "github.com/stackrox/rox/central/notifiers/utils"

fleetshard/pkg/k8s/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
package k8s
33

44
import (
5-
argoCd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
65
"github.com/golang/glog"
76
openshiftOperatorV1 "github.com/openshift/api/operator/v1"
87
openshiftRouteV1 "github.com/openshift/api/route/v1"
8+
argoCd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
99
"github.com/stackrox/rox/operator/api/v1alpha1"
1010
"k8s.io/apimachinery/pkg/runtime"
1111
"k8s.io/apimachinery/pkg/runtime/schema"

fleetshard/pkg/runtime/runtime_applications_reconciler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"encoding/json"
77
"fmt"
88

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

1313
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/argox"

fleetshard/pkg/runtime/runtime_applications_reconciler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"testing"
66

7-
argocd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
7+
argocd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
88
"github.com/stretchr/testify/assert"
99
"github.com/stretchr/testify/require"
1010
"k8s.io/apimachinery/pkg/runtime"

fleetshard/pkg/testutils/k8s.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import (
66
"fmt"
77
"testing"
88

9-
argoCd "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
109
"github.com/hashicorp/go-multierror"
1110
openshiftOperatorV1 "github.com/openshift/api/operator/v1"
1211
openshiftRouteV1 "github.com/openshift/api/route/v1"
1312
"github.com/pkg/errors"
13+
argoCd "github.com/stackrox/acs-fleet-manager/pkg/argocd/apis/application/v1alpha1"
1414
platform "github.com/stackrox/rox/operator/api/v1alpha1"
1515
"github.com/stretchr/testify/require"
1616
appsv1 "k8s.io/api/apps/v1"

0 commit comments

Comments
 (0)