Skip to content

Commit 71f2d2b

Browse files
authored
Revert "Add LDAP support to AtlasDatabaseUser (#2334)" (#2335)
This reverts commit 5464c18.
1 parent 5464c18 commit 71f2d2b

File tree

5 files changed

+0
-27
lines changed

5 files changed

+0
-27
lines changed

api/v1/atlasdatabaseuser_types.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ type AtlasDatabaseUserSpec struct {
110110
// +kubebuilder:validation:Enum:=NONE;MANAGED;CUSTOMER
111111
// +optional
112112
X509Type string `json:"x509Type,omitempty"`
113-
114-
// Part of the Lightweight Directory Access Protocol (LDAP) record that
115-
// the database uses to authenticate this database user on the LDAP host.
116-
// +kubebuilder:default:=NONE
117-
// +kubebuilder:validation:Enum:=NONE;GROUP;USER
118-
// +optional
119-
LDAPAuthType string `json:"ldapAuthType,omitempty"`
120113
}
121114

122115
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

config/crd/bases/atlas.mongodb.com_atlasdatabaseusers.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,6 @@ spec:
120120
- value
121121
type: object
122122
type: array
123-
ldapAuthType:
124-
default: NONE
125-
description: |-
126-
Part of the Lightweight Directory Access Protocol (LDAP) record that
127-
the database uses to authenticate this database user on the LDAP host.
128-
enum:
129-
- NONE
130-
- GROUP
131-
- USER
132-
type: string
133123
oidcAuthType:
134124
default: NONE
135125
description: |-

internal/controller/atlasdatabaseuser/databaseuser_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,6 @@ func TestHasChanged(t *testing.T) {
21162116
OIDCAuthType: "NONE",
21172117
AWSIAMType: "NONE",
21182118
X509Type: "NONE",
2119-
LDAPAuthType: "NONE",
21202119
},
21212120
ProjectID: "project-id",
21222121
},
@@ -2127,7 +2126,6 @@ func TestHasChanged(t *testing.T) {
21272126
OIDCAuthType: "NONE",
21282127
AWSIAMType: "NONE",
21292128
X509Type: "NONE",
2130-
LDAPAuthType: "NONE",
21312129
},
21322130
ProjectID: "project-id",
21332131
},
@@ -2143,7 +2141,6 @@ func TestHasChanged(t *testing.T) {
21432141
OIDCAuthType: "NONE",
21442142
AWSIAMType: "NONE",
21452143
X509Type: "MANAGED",
2146-
LDAPAuthType: "NONE",
21472144
},
21482145
ProjectID: "project-id",
21492146
},
@@ -2154,7 +2151,6 @@ func TestHasChanged(t *testing.T) {
21542151
OIDCAuthType: "NONE",
21552152
AWSIAMType: "NONE",
21562153
X509Type: "NONE",
2157-
LDAPAuthType: "NONE",
21582154
},
21592155
ProjectID: "project-id",
21602156
},
@@ -2170,7 +2166,6 @@ func TestHasChanged(t *testing.T) {
21702166
OIDCAuthType: "NONE",
21712167
AWSIAMType: "NONE",
21722168
X509Type: "NONE",
2173-
LDAPAuthType: "NONE",
21742169
},
21752170
ProjectID: "project-id",
21762171
},
@@ -2181,7 +2176,6 @@ func TestHasChanged(t *testing.T) {
21812176
OIDCAuthType: "NONE",
21822177
AWSIAMType: "NONE",
21832178
X509Type: "NONE",
2184-
LDAPAuthType: "NONE",
21852179
},
21862180
ProjectID: "project-id",
21872181
},

internal/translation/dbuser/conversion.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ func fromAtlas(dbUser *admin.CloudDatabaseUser) (*User, error) {
133133
OIDCAuthType: dbUser.GetOidcAuthType(),
134134
AWSIAMType: dbUser.GetAwsIAMType(),
135135
X509Type: dbUser.GetX509Type(),
136-
LDAPAuthType: dbUser.GetLdapAuthType(),
137136
},
138137
}
139138
if err := normalize(u.AtlasDatabaseUserSpec); err != nil {
@@ -162,7 +161,6 @@ func toAtlas(au *User) (*admin.CloudDatabaseUser, error) {
162161
Username: au.Username,
163162
Password: pointer.MakePtrOrNil(au.Password),
164163
OidcAuthType: pointer.MakePtrOrNil(au.OIDCAuthType),
165-
LdapAuthType: pointer.MakePtrOrNil(au.LDAPAuthType),
166164
}, nil
167165
}
168166

internal/translation/dbuser/conversion_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ func TestDiffSpecs(t *testing.T) {
272272
spec.OIDCAuthType = "IDP_GROUP"
273273
spec.AWSIAMType = "USER"
274274
spec.X509Type = "MANAGED"
275-
spec.LDAPAuthType = "GROUP"
276275
return spec
277276
}(),
278277
},
@@ -283,7 +282,6 @@ func TestDiffSpecs(t *testing.T) {
283282
"oidcAuthType",
284283
"awsIamType",
285284
"x509Type",
286-
"ldapAuthType",
287285
},
288286
},
289287

0 commit comments

Comments
 (0)