mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
ci(ql3): enable bridge netfilter for security live
This commit is contained in:
@@ -744,6 +744,18 @@ async function main(argv = process.argv.slice(2)) {
|
||||
const createdEvidenceJobs = new Set();
|
||||
try {
|
||||
const nodes = await fixture.start();
|
||||
for (const node of fixture.nodes) {
|
||||
for (const setting of [
|
||||
'net.ipv4.ip_forward=1',
|
||||
'net.bridge.bridge-nf-call-iptables=1',
|
||||
]) {
|
||||
const configured = fixture.dockerRun(
|
||||
['exec', node, 'sysctl', '-w', setting],
|
||||
{ capture: true, quiet: true },
|
||||
).stdout;
|
||||
assert.equal(configured.trim().endsWith(' = 1'), true);
|
||||
}
|
||||
}
|
||||
const architecture = fixture.inspectImage(fixture.k3sImage).Architecture;
|
||||
assert.ok(['amd64', 'arm64'].includes(architecture));
|
||||
for (const reviewedImage of [OPERATOR_IMAGE, POSTGRES_IMAGE]) {
|
||||
|
||||
@@ -178,6 +178,8 @@ test('live runner remains opt-in, reviewed, cleanup-bound and log-free', () => {
|
||||
);
|
||||
assert.match(source, /reviewedOperatorManifest\(operatorManifestFile\)/);
|
||||
assert.match(source, /validateSecurityAdministrationKubernetesLiveReport/);
|
||||
assert.match(source, /net\.ipv4\.ip_forward=1/);
|
||||
assert.match(source, /net\.bridge\.bridge-nf-call-iptables=1/);
|
||||
assert.match(source, /projectedMode: 0o444/);
|
||||
assert.match(source, /credential\.issue\.replay/);
|
||||
assert.match(source, /FallbackToLogsOnError/);
|
||||
|
||||
Reference in New Issue
Block a user