diff --git a/lib/uffizzi.rb b/lib/uffizzi.rb index 106fde41..c3e9c3c8 100644 --- a/lib/uffizzi.rb +++ b/lib/uffizzi.rb @@ -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' diff --git a/lib/uffizzi/cli/cluster.rb b/lib/uffizzi/cli/cluster.rb index 80e98bc2..b4041a5c 100644 --- a/lib/uffizzi/cli/cluster.rb +++ b/lib/uffizzi/cli/cluster.rb @@ -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 @@ -262,7 +261,6 @@ 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: { @@ -270,7 +268,6 @@ def cluster_creation_params(cluster_name) manifest: manifest_content, creation_source: creation_source, k8s_version: k8s_version, - node_selector: node_selector, }, token: oidc_token, } diff --git a/lib/uffizzi/cli/install.rb b/lib/uffizzi/cli/install.rb index c421f162..a2f0f4e7 100644 --- a/lib/uffizzi/cli/install.rb +++ b/lib/uffizzi/cli/install.rb @@ -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 @@ -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 @@ -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