Skip to content

Commit

Permalink
Merge pull request #471 from UffizziCloud/feature/470_change-clusters…
Browse files Browse the repository at this point in the history
…-namespace-format

[470] Change the clusters namespace format
  • Loading branch information
moklidia authored Aug 22, 2023
2 parents 1aa9967 + ce2650f commit a5d46d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/app/lib/uffizzi_core/concerns/models/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module UffizziCore::Concerns::Models::Cluster
extend ActiveSupport::Concern
include UffizziCore::ClusterRepo

NAMESPACE_PREFIX = 'cluster'
NAMESPACE_PREFIX = 'c'

included do
include AASM
Expand Down Expand Up @@ -55,7 +55,7 @@ def after_disable
end

def namespace
[NAMESPACE_PREFIX, id].join('-')
[NAMESPACE_PREFIX, id].join
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class UffizziCore::Api::Cli::V1::Projects::ClustersControllerTest < ActionContro
expected_request = {
name: cluster_creation_data[:name],
manifest: nil,
base_ingress_host: /#{UffizziCore::Cluster::NAMESPACE_PREFIX}-\d/,
base_ingress_host: /#{UffizziCore::Cluster::NAMESPACE_PREFIX}\d/,
}
stubbed_create_cluster_request = stub_create_cluster_request_with_expected(cluster_creation_data, expected_request)
stubbed_create_namespace_request = stub_create_namespace_request
Expand Down Expand Up @@ -124,7 +124,7 @@ class UffizziCore::Api::Cli::V1::Projects::ClustersControllerTest < ActionContro
expected_request = {
name: cluster_creation_data[:name],
manifest: manifest,
base_ingress_host: /#{UffizziCore::Cluster::NAMESPACE_PREFIX}-\d/,
base_ingress_host: /#{UffizziCore::Cluster::NAMESPACE_PREFIX}\d/,
}
stubbed_create_cluster_request = stub_create_cluster_request_with_expected(cluster_creation_data, expected_request)
stubbed_get_cluster_request = stub_get_cluster_request(cluster_show_data)
Expand Down

0 comments on commit a5d46d2

Please sign in to comment.