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

[505] added node selector template to the install command #406

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading