|
3 | 3 | # @param manage_container_manager Whether to add the CRI-o repository or not |
4 | 4 | # @param container_manager The name of the container manager |
5 | 5 | # @param major_version The major version of Kubernetes to deploy repos for |
| 6 | +# @param core_package_base The url base of the k8s core packages |
| 7 | +# @param crio_package_base The url base of the cri-o packages |
6 | 8 | # |
7 | 9 | class k8s::repo ( |
8 | 10 | Boolean $manage_container_manager = $k8s::manage_container_manager, |
9 | 11 | K8s::Container_runtimes $container_manager = $k8s::container_manager, |
10 | 12 | String[1] $major_version = $k8s::version.split('\.')[0, 2].join('.'), |
| 13 | + String[1] $core_package_base = 'https://pkgs.k8s.io/core:/stable', |
| 14 | + String[1] $crio_package_base = 'https://download.opensuse.org/repositories/isv:/cri-o:/stable', |
11 | 15 | ) { |
12 | 16 | case fact('os.family') { |
13 | 17 | 'Debian': { |
14 | | - $core_url = "https://pkgs.k8s.io/core:/stable:/v${major_version}/deb" |
15 | | - $crio_url = "https://pkgs.k8s.io/addons:/cri-o:/stable:/v${major_version}/deb" |
| 18 | + $core_url = "${core_package_base}:/v${major_version}/deb" |
| 19 | + $crio_url = "${crio_package_base}:/v${major_version}/deb" |
16 | 20 |
|
17 | 21 | apt::source { 'libcontainers:stable': |
18 | 22 | ensure => absent, |
|
49 | 53 | } |
50 | 54 | } |
51 | 55 | 'RedHat': { |
52 | | - $core_url = "https://pkgs.k8s.io/core:/stable:/v${major_version}/rpm" |
53 | | - $crio_url = "https://pkgs.k8s.io/addons:/cri-o:/stable:/v${major_version}/rpm" |
| 56 | + $core_url = "${core_package_base}:/v${major_version}/rpm" |
| 57 | + $crio_url = "${crio_package_base}:/v${major_version}/rpm" |
54 | 58 |
|
55 | 59 | yumrepo { 'libcontainers:stable': |
56 | 60 | ensure => absent, |
|
59 | 63 | descr => 'Stable releases of Kubernetes', |
60 | 64 | baseurl => $core_url, |
61 | 65 | gpgcheck => 1, |
62 | | - gpgkey => "${core_url}repodata/repomd.xml.key", |
| 66 | + gpgkey => "${core_url}/repodata/repomd.xml.key", |
63 | 67 | } |
64 | 68 |
|
65 | 69 | if $manage_container_manager { |
|
72 | 76 | descr => 'Stable releases of CRI-o', |
73 | 77 | baseurl => $crio_url, |
74 | 78 | gpgcheck => 1, |
75 | | - gpgkey => "${crio_url}repodata/repomd.xml.key", |
| 79 | + gpgkey => "${crio_url}/repodata/repomd.xml.key", |
76 | 80 | } |
77 | 81 | } |
78 | 82 | 'containerd': { |
|
0 commit comments