Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use toolchainv1alpha1.NamespaceTypeDefault #339

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/aws/aws-sdk-go v1.44.100
github.com/codeready-toolchain/api v0.0.0-20230630062406-c91909d2a37f
github.com/codeready-toolchain/api v0.0.0-20230721145244-7b5530059942
github.com/codeready-toolchain/toolchain-common v0.0.0-20230710095440-719b09376de3
github.com/go-logr/logr v1.2.3
github.com/gofrs/uuid v4.2.0+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/codeready-toolchain/api v0.0.0-20230630062406-c91909d2a37f h1:8SYKnGfaZdMGLWZw5CPmj6ST4xy3MOSvvPIgFLFgwIM=
github.com/codeready-toolchain/api v0.0.0-20230630062406-c91909d2a37f/go.mod h1:nn3W6eKb9PFIVwSwZW7wDeLACMBOwAV+4kddGuN+ARM=
github.com/codeready-toolchain/api v0.0.0-20230721145244-7b5530059942 h1:qHBVReryHNy0W9+lah/RGiKK8c9tK51fhfWJXVJBaNE=
github.com/codeready-toolchain/api v0.0.0-20230721145244-7b5530059942/go.mod h1:nn3W6eKb9PFIVwSwZW7wDeLACMBOwAV+4kddGuN+ARM=
github.com/codeready-toolchain/toolchain-common v0.0.0-20230710095440-719b09376de3 h1:zPxv/JJRZsXS+OVgsrF1egFlTi45DXJ8MTPi50meujI=
github.com/codeready-toolchain/toolchain-common v0.0.0-20230710095440-719b09376de3/go.mod h1:vtUfWOJBDxQP1DtcIoxfjI5heBGcT8D+C8ux+PLouyg=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
Expand Down
2 changes: 1 addition & 1 deletion pkg/proxy/handlers/spacelister_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func workspaceFor(t *testing.T, fakeClient client.Client, name, role string, isH
commonproxy.WithNamespaces([]toolchainv1alpha1.SpaceNamespace{
{
Name: "john-dev",
Type: "default",
Type: toolchainv1alpha1.NamespaceTypeDefault,
rajivnathan marked this conversation as resolved.
Show resolved Hide resolved
},
{
Name: "john-stage",
Expand Down
2 changes: 1 addition & 1 deletion pkg/signup/service/signup_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ func GetDefaultUserNamespace(provider ResourceProvider, signup signup.Signup) st
createdSpaceFound = space.Labels[toolchainv1alpha1.SpaceCreatorLabelKey] == signup.Name

for _, ns := range space.Status.ProvisionedNamespaces {
if ns.Type == "default" {
if ns.Type == toolchainv1alpha1.NamespaceTypeDefault {
// use this namespace if it is the first one found or if the space was created by the user
if defaultNamespace == "" || createdSpaceFound {
defaultNamespace = ns.Name
Expand Down
2 changes: 1 addition & 1 deletion pkg/signup/service/signup_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@ func (s *TestSignupServiceSuite) newSpaceForMUR(murName, creator string) *toolch
ProvisionedNamespaces: []toolchainv1alpha1.SpaceNamespace{
{
Name: fmt.Sprintf("%s-dev", murName),
Type: "default",
Type: toolchainv1alpha1.NamespaceTypeDefault,
rajivnathan marked this conversation as resolved.
Show resolved Hide resolved
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion test/fake/informer.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func NewSpace(name, targetCluster, compliantUserName string) *toolchainv1alpha1.
ProvisionedNamespaces: []toolchainv1alpha1.SpaceNamespace{
{
Name: "john-dev",
Type: "default",
Type: toolchainv1alpha1.NamespaceTypeDefault,
},
{
Name: "john-stage",
Expand Down
Loading