|
328 | 328 | # |
329 | 329 | # [*kubernetes_dashboard_url*] |
330 | 330 | # The URL to get the Kubernetes Dashboard yaml file. |
331 | | -# Defaults to the upstream source. `kube_tool` sets this value. |
| 331 | +# Default is based on dashboard_version. |
332 | 332 | # |
333 | 333 | # [*dashboard_version*] |
334 | 334 | # The version of Kubernetes dashboard you want to install. |
335 | | -# Defaults to v1.10.1 |
| 335 | +# Defaults to 1.10.1 |
336 | 336 | # |
337 | 337 | # [*schedule_on_controller*] |
338 | 338 | # A flag to remove the control plane role and allow pod scheduling on controllers |
|
579 | 579 | Optional[String] $cni_provider = undef, |
580 | 580 | Optional[String] $cni_rbac_binding = undef, |
581 | 581 | Boolean $install_dashboard = false, |
582 | | - String $dashboard_version = 'v1.10.1', |
583 | | - String $kubernetes_dashboard_url = |
584 | | - "https://raw.githubusercontent.com/kubernetes/dashboard/${dashboard_version}/src/deploy/recommended/kubernetes-dashboard.yaml", |
| 582 | + String $dashboard_version = '1.10.1', |
| 583 | + String $kubernetes_dashboard_url = undef, |
585 | 584 | Boolean $schedule_on_controller = false, |
586 | 585 | Integer $api_server_count = undef, |
587 | 586 | Boolean $delegated_pki = false, |
|
684 | 683 | notify { "The OS family ${facts['os']['family']} is not supported by this module": } |
685 | 684 | } |
686 | 685 |
|
| 686 | + if versioncmp($dashboard_version, '2.0.0') >= 0 { |
| 687 | + $dashboard_url = pick($kubernetes_dashboard_url, "https://raw.githubusercontent.com/kubernetes/dashboard/v${dashboard_version}/aio/deploy/recommended.yaml") |
| 688 | + } else { |
| 689 | + $dashboard_url = pick($kubernetes_dashboard_url, "https://raw.githubusercontent.com/kubernetes/dashboard/v${dashboard_version}/src/deploy/recommended/kubernetes-dashboard.yaml") |
| 690 | + } |
| 691 | + |
687 | 692 | # Some cloud providers override or fix the node name, so we can't override |
688 | 693 | case $cloud_provider { |
689 | 694 | # k8s controller in AWS with delete any nodes it can't query in the metadata |
|
0 commit comments