Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 80bf2b6

Browse files
committedFeb 4, 2025··
upkeep: shared namespaces is a thing of the past
1 parent 7ccb3da commit 80bf2b6

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed
 

‎pkg/aiven/aiven.go

-3
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,6 @@ func validateNamespace(ctx context.Context, client ctrl.Client, name string) err
134134
return fmt.Errorf("get namespace: %w", err)
135135
}
136136

137-
if namespace.GetLabels()["shared"] == "true" {
138-
return fmt.Errorf("shared namespace is not allowed: %s", name)
139-
}
140137
return nil
141138
}
142139

‎pkg/aiven/aiven_test.go

-20
Original file line numberDiff line numberDiff line change
@@ -119,26 +119,6 @@ func TestGenerateAivenApplicationUpdated_HasOwnerReference(t *testing.T) {
119119
assert.EqualError(t, err, "create/update: username 'user' is owned by another resource; overwrite is not allowed")
120120
}
121121

122-
func TestValidateNamespaceShared(t *testing.T) {
123-
ctx := context.Background()
124-
namespaceName := "default"
125-
126-
namespace := &v1.Namespace{
127-
TypeMeta: metav1.TypeMeta{
128-
Kind: "Namespace",
129-
APIVersion: "v1",
130-
},
131-
ObjectMeta: metav1.ObjectMeta{
132-
Name: namespaceName,
133-
Labels: map[string]string{"shared": "true"},
134-
},
135-
}
136-
137-
fakeClient := buildWithScheme(namespace).Build()
138-
err := validateNamespace(ctx, fakeClient, namespaceName)
139-
assert.EqualError(t, err, "shared namespace is not allowed: default")
140-
}
141-
142122
func TestValidNamespace(t *testing.T) {
143123
ctx := context.Background()
144124
namespaceName := "team-namespace"

0 commit comments

Comments
 (0)
Please sign in to comment.