Skip to content

Commit

Permalink
(cluster/pillan) change role from rke -> rke2{server,agent}
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Dec 11, 2024
1 parent 7865c1e commit f052d8c
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 18 deletions.
4 changes: 4 additions & 0 deletions hieradata/cluster/pillan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ clustershell::groupmembers:
profile::core::ospl::enable_rundir: true
profile::core::k8snode::enable_dhcp: true
tuned::active_profile: "latency-performance"
nm::conf:
device:
keep-configuration: "no"
allowed-connections: "except:origin:nm-initrd-generator"
nm::connections:
enp4s0f3u2u2c2:
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
classes:
- "profile::core::sysctl::rp_filter"
profile::core::sysctl::rp_filter::enable: false
rke2::config:
node-label:
- "role=storage-node"
7 changes: 7 additions & 0 deletions hieradata/cluster/pillan/role/rke2server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
classes:
- "profile::core::sysctl::rp_filter"
profile::core::sysctl::rp_filter::enable: false
rke2::config:
node-label:
- "role=storage-node"
37 changes: 28 additions & 9 deletions spec/hosts/nodes/pillan01.tu.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,53 @@
end
let(:node_params) do
{
role: 'rke',
site: 'tu',
role: 'rke2server',
cluster: 'pillan',
site: 'tu',
}
end

it { is_expected.to compile.with_all_deps }

include_examples 'docker', docker_version: '24.0.9'
include_examples 'baremetal'
include_context 'with nm interface'
include_examples 'ceph cluster'

it do
expect(catalogue.resource('class', 'rke2')[:config]).to include(
'node-label' => ['role=storage-node']
)
end

it do
is_expected.to contain_class('profile::core::sysctl::rp_filter').with_enable(false)
end

it do
is_expected.to contain_class('profile::core::rke').with(
version: '1.6.2'
is_expected.to contain_class('clustershell').with(
groupmembers: {
'pillan' => {
'group' => 'pillan',
'member' => 'pillan[01-09]',
},
}
)
end

it do
is_expected.to contain_class('rke2').with(
node_type: 'server',
release_series: '1.29',
version: '1.29.9~rke2r1'
)
end

it do
is_expected.to contain_class('cni::plugins').with(
version: '1.2.0',
checksum: 'f3a841324845ca6bf0d4091b4fc7f97e18a623172158b72fc3fdcdb9d42d2d37',
enable: ['macvlan']
expect(catalogue.resource('class', 'nm')[:conf]).to include(
'device' => {
'keep-configuration' => 'no',
'allowed-connections' => 'except:origin:nm-initrd-generator',
}
)
end

Expand Down
37 changes: 28 additions & 9 deletions spec/hosts/nodes/pillan08.tu.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,53 @@
end
let(:node_params) do
{
role: 'rke',
site: 'tu',
role: 'rke2agent',
cluster: 'pillan',
site: 'tu',
}
end

it { is_expected.to compile.with_all_deps }

include_examples 'docker', docker_version: '24.0.9'
include_examples 'baremetal'
include_context 'with nm interface'
include_examples 'ceph cluster'

it do
expect(catalogue.resource('class', 'rke2')[:config]).to include(
'node-label' => include('role=storage-node')
)
end

it do
is_expected.to contain_class('profile::core::sysctl::rp_filter').with_enable(false)
end

it do
is_expected.to contain_class('profile::core::rke').with(
version: '1.6.2'
is_expected.to contain_class('clustershell').with(
groupmembers: {
'pillan' => {
'group' => 'pillan',
'member' => 'pillan[01-09]',
},
}
)
end

it do
is_expected.to contain_class('rke2').with(
node_type: 'agent',
release_series: '1.29',
version: '1.29.9~rke2r1'
)
end

it do
is_expected.to contain_class('cni::plugins').with(
version: '1.2.0',
checksum: 'f3a841324845ca6bf0d4091b4fc7f97e18a623172158b72fc3fdcdb9d42d2d37',
enable: ['macvlan']
expect(catalogue.resource('class', 'nm')[:conf]).to include(
'device' => {
'keep-configuration' => 'no',
'allowed-connections' => 'except:origin:nm-initrd-generator',
}
)
end

Expand Down

0 comments on commit f052d8c

Please sign in to comment.