Skip to content

Commit db97950

Browse files
blvacveticm
andauthored
CLOUDP-293194: Merge plugin shift into AtlasCLI (#3636)
Co-authored-by: Melanija Cvetic <[email protected]> Co-authored-by: cveticm <[email protected]>
1 parent bd8a63c commit db97950

File tree

80 files changed

+431
-17765
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+431
-17765
lines changed

.github/CODEOWNERS

-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@
33

44
# Docs maintained by Docs Cloud Team
55
/docs/ @mongodb/docs-cloud-team
6-
7-
/internal/kubernetes/operator/ @mongodb/atlas_kubernetes_team
8-
/internal/cli/atlas/kubernetes/ @mongodb/atlas_kubernetes_team

.github/dependabot.yml

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ updates:
1515
golang:
1616
patterns:
1717
- "golang.org*"
18-
kubernetes:
19-
patterns:
20-
- "*k8s.io*"
2118
google:
2219
patterns:
2320
- "*google.golang.org*"

.github/workflows/code-health.yml

-19
Original file line numberDiff line numberDiff line change
@@ -157,25 +157,6 @@ jobs:
157157
echo "Error: Coverage difference (${{ steps.compare.outputs.diff }}%) is negative"
158158
fi
159159
160-
fuzz-tests:
161-
env:
162-
COVERAGE: coverage.out
163-
TEST_CMD: gotestsum --format standard-verbose --
164-
UNIT_TAGS: unit
165-
INTEGRATION_TAGS: integration
166-
runs-on: ubuntu-latest
167-
steps:
168-
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
169-
with:
170-
config: ${{ vars.PERMISSIONS_CONFIG }}
171-
- name: Checkout repository
172-
uses: actions/checkout@v4
173-
- name: Install Go
174-
uses: actions/setup-go@v5
175-
with:
176-
go-version-file: 'go.mod'
177-
- run: go install gotest.tools/gotestsum@latest
178-
- run: make fuzz-normalizer-test
179160
libraryOwners:
180161
runs-on: ubuntu-latest
181162
steps:

.golangci.yml

-24
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,6 @@ linters-settings:
1717
alias: atlas
1818
- pkg: go.mongodb.org/atlas/auth
1919
alias: atlasauth
20-
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/api
21-
alias: akoapi
22-
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/api/v1
23-
alias: akov2
24-
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/api/v1/common
25-
alias: akov2common
26-
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/api/v1/provider
27-
alias: akov2provider
28-
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/api/v1/status
29-
alias: akov2status
30-
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/api/v1/project
31-
alias: akov2project
32-
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
33-
alias: metav1
34-
- pkg: k8s.io/api/apps/v1
35-
alias: appsv1
36-
- pkg: k8s.io/api/core/v1
37-
alias: corev1
38-
- pkg: k8s.io/api/rbac/v1
39-
alias: rbacv1
40-
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
41-
alias: apiextensionsv1
42-
- pkg: k8s.io/apiserver/pkg/storage/names
43-
alias: k8snames
4420
- pkg: github.com/AlecAivazis/survey/v2/core
4521
alias: survey
4622
- pkg: github.com/creack/pty

Makefile

+1-6
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fmt-all: ### Format all go files with goimports and gofmt
8181
find . -name "*.go" -not -path "./vendor/*" -not -path "./internal/mocks" -exec goimports -l -w "{}" \;
8282

8383
.PHONY: test
84-
test: unit-test fuzz-normalizer-test
84+
test: unit-test
8585

8686
.PHONY: lint
8787
lint: ## Run linter
@@ -144,11 +144,6 @@ e2e-test: build-debug ## Run E2E tests
144144
@echo "==> Running E2E tests..."
145145
GOCOVERDIR=$(GOCOVERDIR) $(TEST_CMD) -v -p 1 -parallel $(E2E_PARALLEL) -v -timeout $(E2E_TIMEOUT) -tags="$(E2E_TAGS)" ./test/e2e... $(E2E_EXTRA_ARGS)
146146

147-
.PHONY: fuzz-normalizer-test
148-
fuzz-normalizer-test: ## Run fuzz test
149-
@echo "==> Running fuzz test..."
150-
$(TEST_CMD) -fuzz=Fuzz -fuzztime 50s --tags="$(UNIT_TAGS)" -race ./internal/kubernetes/operator/resources
151-
152147
.PHONY: unit-test
153148
unit-test: ## Run unit-tests
154149
@echo "==> Running unit tests..."

build/ci/copy.bara.sky.template

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ core.workflow(
2323
integrates = [],
2424
),
2525
origin_files = glob(["docs/command/**"], exclude = ["docs/command/atlas-completion**"]),
26-
destination_files = glob(["source/includes/command/**"]),
26+
destination_files = glob(["source/includes/command/**"], exclude=["source/includes/command/atlas-kubernetes**"]),
2727
authoring = authoring.pass_thru(author),
2828
transformations = [
2929
core.move("docs/command", "source/includes/command"),
@@ -46,7 +46,7 @@ core.workflow(
4646
integrates = [],
4747
),
4848
origin_files = glob(["docs/command/**"]),
49-
destination_files = glob(["source/command/**"], exclude = ["source/command/atlas-api"]),
49+
destination_files = glob(["source/command/**"], exclude=["source/command/atlas-api", "source/includes/command/atlas-kubernetes**"]),
5050
authoring = authoring.pass_thru(author),
5151
transformations = [
5252
core.move("docs/command", "source/command"),

build/ci/evergreen.yml

+6-46
Original file line numberDiff line numberDiff line change
@@ -742,49 +742,9 @@ tasks:
742742
MCLI_OPS_MANAGER_URL: ${mcli_ops_manager_url}
743743
MCLI_SERVICE: cloud
744744
E2E_TAGS: atlas,clusters,m0
745-
- name: atlas_kubernetes_generate_e2e
746-
tags: ["e2e","atlas","kubernetes", "assigned_to_jira_team_cloudp_kubernetes_atlas"]
745+
- name: atlas_kubernetes_plugin
746+
tags: ["e2e","atlas","plugin","kubernetes"]
747747
must_have_test_results: true
748-
depends_on:
749-
- name: atlas_clusters_flags_e2e
750-
variant: "e2e_atlas_clusters"
751-
patch_optional: true
752-
commands:
753-
- func: "install gotestsum"
754-
- func: "e2e test"
755-
vars:
756-
MCLI_ORG_ID: ${atlas_org_id}
757-
MCLI_PROJECT_ID: ${atlas_project_id}
758-
MCLI_PRIVATE_API_KEY: ${atlas_private_api_key}
759-
MCLI_PUBLIC_API_KEY: ${atlas_public_api_key}
760-
MCLI_OPS_MANAGER_URL: ${mcli_ops_manager_url}
761-
MCLI_SERVICE: cloud
762-
E2E_TAGS: atlas,cluster,kubernetes,generate
763-
- name: atlas_kubernetes_apply_e2e
764-
tags: [ "e2e","atlas","kubernetes", "assigned_to_jira_team_cloudp_kubernetes_atlas" ]
765-
must_have_test_results: true
766-
depends_on:
767-
- name: atlas_clusters_flags_e2e
768-
variant: "e2e_atlas_clusters"
769-
patch_optional: true
770-
commands:
771-
- func: "install gotestsum"
772-
- func: "e2e test"
773-
vars:
774-
MCLI_ORG_ID: ${atlas_org_id}
775-
MCLI_PROJECT_ID: ${atlas_project_id}
776-
MCLI_PRIVATE_API_KEY: ${atlas_private_api_key}
777-
MCLI_PUBLIC_API_KEY: ${atlas_public_api_key}
778-
MCLI_OPS_MANAGER_URL: ${mcli_ops_manager_url}
779-
MCLI_SERVICE: cloud
780-
E2E_TAGS: atlas,cluster,kubernetes,apply
781-
- name: atlas_kubernetes_install_e2e
782-
tags: [ "e2e","atlas","kubernetes", "assigned_to_jira_team_cloudp_kubernetes_atlas" ]
783-
must_have_test_results: true
784-
depends_on:
785-
- name: atlas_clusters_flags_e2e
786-
variant: "e2e_atlas_clusters"
787-
patch_optional: true
788748
commands:
789749
- func: "install gotestsum"
790750
- func: "e2e test"
@@ -795,7 +755,7 @@ tasks:
795755
MCLI_PUBLIC_API_KEY: ${atlas_public_api_key}
796756
MCLI_OPS_MANAGER_URL: ${mcli_ops_manager_url}
797757
MCLI_SERVICE: cloud
798-
E2E_TAGS: atlas,cluster,kubernetes,local
758+
E2E_TAGS: atlas,plugin,kubenetes
799759
- name: atlas_clusters_upgrade_e2e
800760
tags: ["e2e","clusters","atlas"]
801761
must_have_test_results: true
@@ -1830,14 +1790,14 @@ buildvariants:
18301790
<<: *go_linux_version
18311791
tasks:
18321792
- name: ".e2e .clusters .atlas"
1833-
- name: e2e_atlas_kubernetes
1834-
display_name: "E2E Atlas Kubernetes Tests"
1793+
- name: e2e_atlas_kubernetes_plugin
1794+
display_name: "E2E Atlas Kubernetes Plugin Tests"
18351795
run_on:
18361796
- ubuntu2204-small
18371797
expansions:
18381798
<<: *go_linux_version
18391799
tasks:
1840-
- name: ".e2e .atlas .kubernetes"
1800+
- name: ".e2e .atlas .plugin .kubernetes"
18411801
- name: e2e_decryption
18421802
display_name: "E2E Decryption Tests"
18431803
run_on:

build/ci/library_owners.json

+3-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"github.com/golang-jwt/jwt/v4": "apix-2",
1919
"github.com/golang/mock": "apix-2",
2020
"github.com/google/go-github/v61": "apix-2",
21-
"github.com/google/uuid": "atlas_kubernetes_team",
2221
"github.com/hinshun/vt10x": "apix-2",
2322
"github.com/iancoleman/strcase": "apix-2",
2423
"github.com/klauspost/compress": "apix-2",
@@ -27,11 +26,11 @@
2726
"github.com/mholt/archives": "apix-2",
2827
"github.com/mongodb-forks/digest": "apix-2",
2928
"github.com/mongodb-labs/cobra2snooty": "apix-2",
30-
"github.com/mongodb/mongodb-atlas-kubernetes/v2": "atlas_kubernetes_team",
3129
"github.com/Netflix/go-expect": "apix-2",
3230
"github.com/PaesslerAG/jsonpath": "apix-2",
3331
"github.com/pelletier/go-toml": "apix-2",
3432
"github.com/pkg/browser": "apix-2",
33+
"github.com/ProtonMail/go-crypto": "apix-2",
3534
"github.com/shirou/gopsutil/v4": "apix-2",
3635
"github.com/speakeasy-api/openapi-overlay": "apix-2",
3736
"github.com/spf13/afero": "apix-2",
@@ -42,29 +41,20 @@
4241
"github.com/tangzero/inflector": "apix-2",
4342
"github.com/yuin/goldmark": "apix-2",
4443
"go.mongodb.org/atlas-sdk/v20240530005": "apix-2",
45-
"go.mongodb.org/atlas-sdk/v20241113001": "apix-2",
4644
"go.mongodb.org/atlas-sdk/v20241113004": "apix-2",
4745
"go.mongodb.org/atlas": "apix-2",
4846
"go.mongodb.org/mongo-driver": "apix-2",
4947
"go.opentelemetry.io/otel": "apix-2",
5048
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc": "apix-2",
5149
"go.opentelemetry.io/otel/sdk": "apix-2",
5250
"go.opentelemetry.io/otel/trace": "apix-2",
53-
"golang.org/x/exp": "atlas_kubernetes_team",
51+
"golang.org/x/exp": "apix-2",
5452
"golang.org/x/mod": "apix-2",
5553
"golang.org/x/net": "apix-2",
5654
"golang.org/x/sys": "apix-2",
5755
"golang.org/x/tools": "apix-2",
5856
"google.golang.org/api": "apix-2",
5957
"google.golang.org/grpc": "apix-2",
6058
"google.golang.org/protobuf": "apix-2",
61-
"gopkg.in/yaml.v3": "apix-2",
62-
"k8s.io/api": "atlas_kubernetes_team",
63-
"k8s.io/apiextensions-apiserver": "atlas_kubernetes_team",
64-
"k8s.io/apimachinery": "atlas_kubernetes_team",
65-
"k8s.io/apiserver": "atlas_kubernetes_team",
66-
"k8s.io/client-go": "atlas_kubernetes_team",
67-
"sigs.k8s.io/controller-runtime": "atlas_kubernetes_team",
68-
"sigs.k8s.io/kind": "atlas_kubernetes_team",
69-
"sigs.k8s.io/yaml": "atlas_kubernetes_team"
59+
"gopkg.in/yaml.v3": "apix-2"
7060
}

build/ci/library_owners_jira.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"apix-2": "22223",
3-
"atlas_kubernetes_team": "24741"
2+
"apix-2": "22223"
43
}

docs/command/atlas-kubernetes-config-apply.txt

-117
This file was deleted.

0 commit comments

Comments
 (0)