Skip to content

Commit

Permalink
Update AKO to 2.5.0
Browse files Browse the repository at this point in the history
Signed-off-by: jose.vazquez <[email protected]>
  • Loading branch information
josvazg committed Oct 29, 2024
1 parent c55f7af commit e4211d5
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 13 deletions.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/mongodb-forks/digest v1.1.0
github.com/mongodb-labs/cobra2snooty v0.18.2
github.com/mongodb/mongodb-atlas-kubernetes/v2 v2.4.1
github.com/mongodb/mongodb-atlas-kubernetes/v2 v2.5.0
github.com/pelletier/go-toml v1.9.5
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/shirou/gopsutil/v4 v4.24.9
Expand Down Expand Up @@ -177,5 +177,3 @@ require (
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)

replace github.com/mongodb/mongodb-atlas-kubernetes/v2 v2.4.1 => ../mongodb-atlas-kubernetes
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ github.com/mongodb-forks/digest v1.1.0 h1:7eUdsR1BtqLv0mdNm4OXs6ddWvR4X2/OsLwdKk
github.com/mongodb-forks/digest v1.1.0/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg=
github.com/mongodb-labs/cobra2snooty v0.18.2 h1:qWpLCMWbQb5FSZ5ehiWN2URmieMJhQtQPxT0uhIK62A=
github.com/mongodb-labs/cobra2snooty v0.18.2/go.mod h1:WnzqCFmx4f72Yj9dL/ulBUqcatfURGdKFf8DLT4h7zQ=
github.com/mongodb/mongodb-atlas-kubernetes/v2 v2.5.0 h1:2SzjXb9B3mVkYJfkCQXMMVjLULTNU7CXvLVKBpUe3MY=
github.com/mongodb/mongodb-atlas-kubernetes/v2 v2.5.0/go.mod h1:n4Ii1oia76D+x6Bn14KyfNxysMf6XAR6z8LfE93KHh0=
github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE=
github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
Expand Down
2 changes: 1 addition & 1 deletion internal/kubernetes/operator/config_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/mongodb/mongodb-atlas-cli/atlascli/internal/kubernetes/operator/resources"
"github.com/mongodb/mongodb-atlas-cli/atlascli/internal/kubernetes/operator/streamsprocessing"
"github.com/mongodb/mongodb-atlas-cli/atlascli/internal/store"
"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/serializer/json"
"k8s.io/client-go/kubernetes/scheme"
Expand Down
10 changes: 5 additions & 5 deletions internal/kubernetes/operator/config_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func TestExportAtlasStreamProcessing(t *testing.T) {
ce := NewConfigExporter(atlasOperatorGenericStore, nil, projectID, orgID).
WithFeatureValidator(featureValidator).
WithTargetNamespace("test").
WithTargetOperatorVersion("2.4.0")
WithTargetOperatorVersion("2.5.0")

resources, err := ce.exportAtlasStreamProcessing("my-project")
require.NoError(t, err)
Expand All @@ -308,7 +308,7 @@ func TestExportAtlasStreamProcessing(t *testing.T) {
Name: "my-project-instance-0",
Namespace: "test",
Labels: map[string]string{
"mongodb.com/atlas-resource-version": "2.4.0",
"mongodb.com/atlas-resource-version": "2.5.0",
},
},
Spec: akov2.AtlasStreamInstanceSpec{
Expand Down Expand Up @@ -348,7 +348,7 @@ func TestExportAtlasStreamProcessing(t *testing.T) {
Name: "my-project-instance-0-samplelowlinestreamlowlinesolar",
Namespace: "test",
Labels: map[string]string{
"mongodb.com/atlas-resource-version": "2.4.0",
"mongodb.com/atlas-resource-version": "2.5.0",
},
},
Spec: akov2.AtlasStreamConnectionSpec{
Expand All @@ -370,7 +370,7 @@ func TestExportAtlasStreamProcessing(t *testing.T) {
Name: "my-project-instance-0-kafka-config",
Namespace: "test",
Labels: map[string]string{
"mongodb.com/atlas-resource-version": "2.4.0",
"mongodb.com/atlas-resource-version": "2.5.0",
},
},
Spec: akov2.AtlasStreamConnectionSpec{
Expand Down Expand Up @@ -625,7 +625,7 @@ func defaultTestConfigExporter(t *testing.T, genStore *mocks.MockOperatorGeneric
return NewConfigExporter(genStore, nil, projectID, orgID).
WithTargetNamespace("test").
WithFeatureValidator(featureValidator).
WithTargetOperatorVersion("2.4.0").
WithTargetOperatorVersion("2.5.0").
WithSecretsData(true)
}

Expand Down
15 changes: 14 additions & 1 deletion internal/kubernetes/operator/features/crds.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

const (
LatestOperatorMajorVersion = "2.4.0"
LatestOperatorMajorVersion = "2.5.0"
maxDepth = 100
ResourceVersion = "mongodb.com/atlas-resource-version"
ResourceAtlasProject = "atlasprojects"
Expand Down Expand Up @@ -87,6 +87,19 @@ var (
resource{ResourceAtlasStreamConnection, NopPatcher()},
resource{ResourceAtlasBackupCompliancePolicy, NopPatcher()},
},
"2.5.0": {
resource{ResourceAtlasDatabaseUser, NopPatcher()},
resource{ResourceAtlasProject, NopPatcher()},
resource{ResourceAtlasDeployment, NopPatcher()},
resource{ResourceAtlasBackupSchedule, NopPatcher()},
resource{ResourceAtlasBackupPolicy, NopPatcher()},
resource{ResourceAtlasTeam, NopPatcher()},
resource{ResourceAtlasDataFederation, NopPatcher()},
resource{ResourceAtlasFederatedAuth, NopPatcher()},
resource{ResourceAtlasStreamInstance, NopPatcher()},
resource{ResourceAtlasStreamConnection, NopPatcher()},
resource{ResourceAtlasBackupCompliancePolicy, NopPatcher()},
},
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
const (
testNamespace = "test"
testProjectName = "my-project"
testOperatorVersion = "2.4.0"
testOperatorVersion = "2.5.0"
testInstanceName = "instance-0"
testCertificate = "-----BEGIN CERTIFICATE-----\nMIIEITCCAwmgAwIBAgIUTLX+HHPxjMxw1pOXEu/+m+aXrgIwDQYJKoZIhvcNAQEL\nBQAwgZ8xCzAJBgNVBAYTAkRFMQ8wDQYDVQQIDAZCZXJsaW4xDzANBgNVBAcMBkJl\ncmxpbjEVMBMGA1UECgwMTW9uZ29EQiBHbWJoMRMwEQYDVQQLDApLdWJlcm5ldGVz\nMRcwFQYDVQQDDA5BdGxhcyBPcGVyYXRvcjEpMCcGCSqGSIb3DQEJARYaaGVsZGVy\nLnNhbnRhbmFAbW9uZ29kYi5jb20wHhcNMjQwNDIzMTE0NzI2WhcNMjcwMTE4MTE0\nNzI2WjCBnzELMAkGA1UEBhMCREUxDzANBgNVBAgMBkJlcmxpbjEPMA0GA1UEBwwG\nQmVybGluMRUwEwYDVQQKDAxNb25nb0RCIEdtYmgxEzARBgNVBAsMCkt1YmVybmV0\nZXMxFzAVBgNVBAMMDkF0bGFzIE9wZXJhdG9yMSkwJwYJKoZIhvcNAQkBFhpoZWxk\nZXIuc2FudGFuYUBtb25nb2RiLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC\nAQoCggEBAKoBtN0V9F8ZnbPJMKDZ0jHRw35Y/jtZpdN6z824nyRh4U4FeLaAOzex\nEiHrxDt9IccxKcVc/9WAq7Pn1C42YJFy9dgLSD94TW4lJwLhAsGxI5bVy+ls6c3u\ncpiPzaoUU1vx+Gg5ob+UefjAf7WxaRnuSiUpYPVVueZ218Hhc1W8yajfwLdshXiN\nNaBox2Pu+ofsq5aM1T4MARsLODUJqzoQHR2275oFPNaz2BgBgRUDkICw+RPfjQ0X\nlCkCtHy2QeBb5hGOi0lG89C9lbuEXb5YOzGG4Cc6snZGf21MGxXAXiL/KsBZrP5i\nedABbwkXEgLk41OcwNgshuADM7iOd9sCAwEAAaNTMFEwHQYDVR0OBBYEFBiwIuyh\n3sqgzfcgKb80FF1WByAIMB8GA1UdIwQYMBaAFBiwIuyh3sqgzfcgKb80FF1WByAI\nMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAB0iWV/hpK1WuxjS\nh5HAfRxBCyWFIU14S7tQHTPuQANQAh3Zktkghpmc6hdNb3VjKzVUSTv9Ye6V22mh\nResf7PVWFvOdPoiJnmJjUQ5W3FUVZWOgx3rFlKO/5HOi5wRvBDyuZsTjIEJP5MOl\n3lBs17FOVqM3iT785oabOEj/8LhkvdG9brobG8oAttUSPChiYbEtH83WqgeHnCWI\nreLAKIvG8bFVaokdInEgoRt5uque70g0tqAje9MXqCodB96Lo1tk8yyvX4jWI2Pb\npe7aAzw79hIH3tyw+FHjZLgHAq77E14xBxMxvamSnsqGhvCkb7pRHD5+l4tg2k/N\nYJZC5C0=\n-----END CERTIFICATE-----\n"
)
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/atlas/kubernetes_config_generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ func TestProjectWithStreamsProcessing(t *testing.T) {
),
Namespace: targetNamespace,
Labels: map[string]string{
"mongodb.com/atlas-resource-version": "2.4.0",
"mongodb.com/atlas-resource-version": "2.5.0",
},
},
Spec: akov2.AtlasStreamInstanceSpec{
Expand Down Expand Up @@ -1359,7 +1359,7 @@ func TestProjectWithStreamsProcessing(t *testing.T) {
),
Namespace: targetNamespace,
Labels: map[string]string{
"mongodb.com/atlas-resource-version": "2.4.0",
"mongodb.com/atlas-resource-version": "2.5.0",
},
},
Spec: akov2.AtlasStreamConnectionSpec{
Expand Down

0 comments on commit e4211d5

Please sign in to comment.