Skip to content

Commit

Permalink
To enable (NamespaceFreeformEntry) pre-deployment webhook no longer n…
Browse files Browse the repository at this point in the history
…eed to check/enable ManualNamespaceNames (#493)
  • Loading branch information
ajayy004 committed Feb 1, 2022
1 parent 307bc61 commit 7fedcde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ func CheckTriggererEnabled(client *houston.Client) bool {
func Create(label, ws, releaseName, cloudRole, executor, airflowVersion, dagDeploymentType, nfsLocation, gitRepoURL, gitRevision, gitBranchName, gitDAGDir, sshKey, knownHosts string, gitSyncInterval, triggererReplicas int, client *houston.Client, out io.Writer) error {
vars := map[string]interface{}{"label": label, "workspaceId": ws, "executor": executor, "cloudRole": cloudRole}

if CheckPreCreateNamespaceDeployment(client) && !CheckNamespaceFreeformEntryDeployment(client) {
if CheckPreCreateNamespaceDeployment(client) {
namespace, err := getDeploymentSelectionNamespaces(client, out)
if err != nil {
return err
}
vars["namespace"] = namespace
}

if CheckNamespaceFreeformEntryDeployment(client) && CheckPreCreateNamespaceDeployment(client) {
if CheckNamespaceFreeformEntryDeployment(client) {
namespace, err := getDeploymentNamespaceName()
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions deployment/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@ func TestCreateWithFreeFormNamespaceDeployment(t *testing.T) {
"hardDeleteDeployment": true,
"manualNamespaceNames": true,
"featureFlags": {
"manualNamespaceNames": true,
"manualNamespaceNames": false,
"namespaceFreeformEntry": true
}
},
Expand Down Expand Up @@ -1716,7 +1716,7 @@ func TestCreateWithFreeFormNamespaceDeploymentError(t *testing.T) {
"hardDeleteDeployment": true,
"manualNamespaceNames": true,
"featureFlags": {
"manualNamespaceNames": true,
"manualNamespaceNames": false,
"namespaceFreeformEntry": true
}
},
Expand Down

0 comments on commit 7fedcde

Please sign in to comment.