|
7 | 7 | require_relative 'kube_tool/clean_up.rb' |
8 | 8 | require_relative 'kube_tool/other_params.rb' |
9 | 9 |
|
10 | | -options = {:fqdn => nil, :ip => nil, :bootstrap_controller_ip => nil, :etcd_initial_cluster => nil, :etcd_ip => nil, :kube_api_advertise_address => nil, :install_dashboard => nil} |
| 10 | +options = {:os => nil, :version => nil, :container_runtime => nil, :fqdn => nil, :ip => nil, :bootstrap_controller_ip => nil, :etcd_initial_cluster => nil, :etcd_ip => nil, :kube_api_advertise_address => nil, :install_dashboard => nil} |
11 | 11 |
|
12 | 12 | parser = OptionParser.new do|opts| |
| 13 | + |
| 14 | + opts.on('-o', '--os-type os-type', 'the os that kubernetes will run on') do |os| |
| 15 | + options[:os] = os; |
| 16 | + end |
| 17 | + |
| 18 | + opts.on('-v', '--version version', 'the kubernetes version to install') do |version| |
| 19 | + options[:version] = version; |
| 20 | + end |
| 21 | + |
| 22 | + opts.on('-r', '--container_runtime container runtime', 'the container runtime to use. this can only be docker or cri_containerd') do |container_runtime| |
| 23 | + options[:container_runtime] = container_runtime; |
| 24 | + end |
| 25 | + |
13 | 26 | opts.on('-f', '--fqdn fqdn', 'fqdn') do |fqdn| |
14 | 27 | options[:fqdn] = fqdn; |
15 | 28 | end |
@@ -63,7 +76,7 @@ def build_hiera(hash) |
63 | 76 | CreateCerts.kube_scheduler |
64 | 77 | CreateCerts.kube_workers |
65 | 78 | CreateToken.bootstrap |
66 | | - OtherParams.create(hash[:bootstrap_controller_ip], hash[:fqdn], hash[:etcd_initial_cluster], hash[:etcd_ip], hash[:kube_api_advertise_address], hash[:install_dashboard]) |
| 79 | + OtherParams.create(hash[:os], hash[:version], hash[:container_runtime], hash[:bootstrap_controller_ip], hash[:fqdn], hash[:etcd_initial_cluster], hash[:etcd_ip], hash[:kube_api_advertise_address], hash[:install_dashboard]) |
67 | 80 | CleanUp.remove_files |
68 | 81 | end |
69 | 82 | end |
|
0 commit comments