File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 44 $bootstrap_controller = $kubernetes::bootstrap_controller,
55 $cni_network_provider = $kubernetes::cni_network_provider,
66 $install_dashboard = $kubernetes::install_dashboard,
7-
7+ $kubernetes_version = $kubernetes::kubernetes_version
88){
99
1010 if $bootstrap_controller {
7171 require => Exec[' Create kube dns service account' ],
7272 }
7373
74- if $install_dashboard {
74+ if $install_dashboard and $kubernetes_version =~ /1[.]8[.]\d/ {
7575 exec { 'Install Kubernetes dashboard' :
7676 command => ' kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml' ,
7777 onlyif => ' kubectl get nodes' ,
7878 unless => ' kubectl -n kube-system get pods | grep kubernetes-dashboard' ,
7979 }
8080 }
81+ if $install_dashboard and $kubernetes_version =~ /1[.](6|7)[.]\d/ {
82+ exec { 'Install Kubernetes dashboard' :
83+ command => ' kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.6.3/src/deploy/kubernetes-dashboard.yaml' ,
84+ onlyif => ' kubectl get nodes' ,
85+ unless => ' kubectl -n kube-system get pods | grep kubernetes-dashboard' ,
86+ }
87+ }
8188 }
8289}
Original file line number Diff line number Diff line change 1818 'bootstrap_controller' => true ,
1919 'cni_network_provider' => 'https://foo.test' ,
2020 'install_dashboard' => false ,
21+ 'kubernetes_version' => '1.7.3'
2122 }
2223 end
2324
3536 'bootstrap_controller' => true ,
3637 'cni_network_provider' => 'https://foo.test' ,
3738 'install_dashboard' => true ,
39+ 'kubernetes_version' => '1.7.3'
3840 }
3941 end
4042
You can’t perform that action at this time.
0 commit comments