Skip to content

Commit

Permalink
Merge pull request #406 from UffizziCloud/feature/505-add-node-select…
Browse files Browse the repository at this point in the history
…or-template-as-install-option

[505] added node selector template to the install command
  • Loading branch information
moklidia authored Mar 14, 2024
2 parents cc4637f + b4ec354 commit 70bff14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/uffizzi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
require 'active_support/core_ext/hash/indifferent_access'
require 'active_support/core_ext/object/blank'
require 'launchy'
require 'base64'

require 'thor'
require 'uffizzi/error'
Expand Down
3 changes: 0 additions & 3 deletions lib/uffizzi/cli/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def list
method_option :output, required: false, type: :string, aliases: '-o', enum: ['json', 'pretty-json']
method_option :'creation-source', required: false, type: :string
method_option :'k8s-version', required: false, type: :string
method_option :'node-selector', required: false, type: :string
def create(name = nil)
run('create', { name: name })
end
Expand Down Expand Up @@ -262,15 +261,13 @@ def cluster_creation_params(cluster_name)
manifest_content = load_manifest_file(options[:manifest])
creation_source = options[:"creation-source"] || ClusterService::MANUAL_CREATION_SOURCE
k8s_version = options[:"k8s-version"]
node_selector = options[:"node-selector"]

{
cluster: {
name: cluster_name,
manifest: manifest_content,
creation_source: creation_source,
k8s_version: k8s_version,
node_selector: node_selector,
},
token: oidc_token,
}
Expand Down
3 changes: 3 additions & 0 deletions lib/uffizzi/cli/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Cli::Install < Thor
method_option :context, type: :string
method_option :issuer, type: :string, enum: ['letsencrypt', 'zerossl']
method_option :'repo-url', type: :string
method_option :'node-selector-template', required: false, type: :string
def controller(hostname)
Uffizzi::AuthHelper.check_login

Expand Down Expand Up @@ -66,6 +67,7 @@ def build_installation_options(uri)
controller_password: generate_password,
cert_email: options[:email],
cluster_issuer: options[:issuer] || InstallService::DEFAULT_CLUSTER_ISSUER,
node_selector_template: options[:"node-selector-template"],
}
end

Expand Down Expand Up @@ -212,6 +214,7 @@ def build_controller_setting_params(uri, installation_options)
managed_dns_zone: uri.host,
login: installation_options[:controller_username],
password: installation_options[:controller_password],
node_selector_template: installation_options[:node_selector_template],
}
end

Expand Down

0 comments on commit 70bff14

Please sign in to comment.