diff --git a/hieradata/roles/infra/k8s.yaml b/hieradata/roles/infra/k8s.yaml index d8c9bcb..b91b86a 100644 --- a/hieradata/roles/infra/k8s.yaml +++ b/hieradata/roles/infra/k8s.yaml @@ -11,6 +11,8 @@ hiera_include: # manage rke2 rke2::bootstrap_node: prodnxsr0001.main.unkin.net rke2::join_url: https://join-k8s.service.consul:9345 +# pull the airgap image bundle via artifactapi (host-reachable pre-CNI), not github directly +rke2::container_archive_source: 'https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/rancher/rke2/releases/download' rke2::manage_registries: true rke2::registries: docker.io: diff --git a/modules/rke2/manifests/install.pp b/modules/rke2/manifests/install.pp index f15764d..7c5b7b3 100644 --- a/modules/rke2/manifests/install.pp +++ b/modules/rke2/manifests/install.pp @@ -27,10 +27,10 @@ class rke2::install ( before => Service["rke2-${node_type}"], } - # download required archive of containers + # preload the airgap bundle (has the default canal CNI images) so canal starts from disk, not the mirror VIP that needs flannel first archive { '/var/lib/rancher/rke2/agent/images/rke2-images.linux-amd64.tar.zst': ensure => present, - source => "https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/rancher/rke2/releases/download/v${rke2_version}%2B${rke2_release}/rke2-images.linux-amd64.tar.zst", + source => "${container_archive_source}/v${rke2_version}%2B${rke2_release}/rke2-images.linux-amd64.tar.zst", require => [ Package["rke2-${node_type}"], File['/var/lib/rancher/rke2/agent/images'], diff --git a/modules/rke2/manifests/params.pp b/modules/rke2/manifests/params.pp index 4c110dc..9d5a443 100644 --- a/modules/rke2/manifests/params.pp +++ b/modules/rke2/manifests/params.pp @@ -1,7 +1,7 @@ # rke2 params class rke2::params ( Enum['server', 'agent'] $node_type = 'agent', - String $rke2_version = '1.33.4', + String $rke2_version = '1.33.11', String $rke2_release = 'rke2r1', Stdlib::Absolutepath $config_file = '/etc/rancher/rke2/config.yaml', Hash $config_hash = {},