-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add el9 selinux rpm #7443
Merged
galal-hussein
merged 10 commits into
k3s-io:master
from
galal-hussein:add_el9_selinux_rpm
May 24, 2023
Merged
Add el9 selinux rpm #7443
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
667e7dd
Add el9 to the install script
galal-hussein b6bef98
Add rocky-9 install test to test el9 selinux
galal-hussein 8602aa8
Add rocky-9 install test to test el9 selinux to workflow
galal-hussein afa1c91
Use el8 for fedora 37
galal-hussein 8be341b
Add a warning to reboot in coreos systems
galal-hussein 4112eb5
remove k3s-selinux module in case of upgrade in el9
galal-hussein 94946d7
Check for available container-selinux and k3s-selinux
galal-hussein 2b35319
extend selinux upgrade to sle distros
galal-hussein 2d3f6fa
create /var/lib/rpm-state in sle systems
galal-hussein 76925e7
nit fix
galal-hussein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
# | ||
|
||
ENV['TEST_INSTALL_SH'] ||= '../../../install.sh' | ||
ENV['INSTALL_K3S_CHANNEL'] ||= 'testing' | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vagrant.plugins = { | ||
'vagrant-k3s' => {:version => '~> 0.1.3'}, | ||
} | ||
config.vm.box = "generic/rocky9" | ||
config.vm.boot_timeout = ENV['TEST_VM_BOOT_TIMEOUT'] || 600 # seconds | ||
config.vm.synced_folder '.', '/vagrant', disabled: true | ||
|
||
config.vm.define 'install-rocky-9', primary: true do |test| | ||
test.vm.hostname = 'smoke' | ||
test.vm.provision "disable-firewall", type: "shell", inline: "systemctl stop firewalld" | ||
test.vm.provision 'k3s-upload', type: 'file', run: 'always', source: ENV['TEST_INSTALL_SH'], destination: 'install.sh' | ||
test.vm.provision 'k3s-install', type: 'k3s', run: 'once' do |k3s| | ||
k3s.installer_url = 'file:///home/vagrant/install.sh' | ||
k3s.args = %w[server] | ||
k3s.env = ENV.select{|k,v| k.start_with?('K3S_') || k.start_with?('INSTALL_K3S_')}.merge({ | ||
:INSTALL_K3S_NAME => 'server', | ||
}) | ||
k3s.config = <<~YAML | ||
selinux: true | ||
token: 'vagrant' | ||
YAML | ||
k3s.config_mode = '0644' # side-step https://github.com/k3s-io/k3s/issues/4321 | ||
end | ||
test.vm.provision "k3s-wait-for-node", type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once' do |sh| | ||
sh.env = { :PATH => "/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" } | ||
sh.inline = <<~SHELL | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
echo 'Waiting for node to be ready ...' | ||
time timeout 300 bash -c 'while ! (kubectl wait --for condition=ready node/$(hostname) 2>/dev/null); do sleep 5; done' | ||
kubectl get node,all -A -o wide | ||
SHELL | ||
end | ||
test.vm.provision "k3s-wait-for-coredns", type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once' do |sh| | ||
sh.env = { :PATH => "/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" } | ||
sh.inline = <<~SHELL | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
function describe-coredns { | ||
RC=$? | ||
if [[ $RC -ne 0 ]]; then | ||
kubectl describe node | ||
kubectl --namespace kube-system describe pod -l k8s-app=kube-dns | ||
kubectl --namespace kube-system logs -l k8s-app=kube-dns | ||
fi | ||
exit $RC | ||
} | ||
trap describe-coredns EXIT | ||
time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/coredns 2>/dev/null); do sleep 5; done' | ||
SHELL | ||
end | ||
test.vm.provision "k3s-wait-for-local-storage", type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once' do |sh| | ||
sh.env = { :PATH => "/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" } | ||
sh.inline = <<~SHELL | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/local-path-provisioner 2>/dev/null); do sleep 5; done' | ||
SHELL | ||
end | ||
test.vm.provision "k3s-wait-for-metrics-server", type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once' do |sh| | ||
sh.env = { :PATH => "/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" } | ||
sh.inline = <<~SHELL | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/metrics-server 2>/dev/null); do sleep 5; done' | ||
SHELL | ||
end | ||
test.vm.provision "k3s-wait-for-traefik", type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once' do |sh| | ||
sh.env = { :PATH => "/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" } | ||
sh.inline = <<~SHELL | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
time timeout 300 bash -c 'while ! (kubectl --namespace kube-system rollout status --timeout 10s deploy/traefik 2>/dev/null); do sleep 5; done' | ||
SHELL | ||
end | ||
test.vm.provision "k3s-status", type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once' do |sh| | ||
sh.env = { :PATH => "/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" } | ||
sh.inline = <<~SHELL | ||
#!/usr/bin/env bash | ||
set -eux -o pipefail | ||
kubectl get node,all -A -o wide | ||
SHELL | ||
end | ||
test.vm.provision "k3s-procps", type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once' do |sh| | ||
sh.env = { :PATH => "/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" } | ||
sh.inline = <<~SHELL | ||
#!/usr/bin/env bash | ||
set -eux -o pipefail | ||
ps auxZ | grep -E 'k3s|kube|container' | grep -v grep | ||
SHELL | ||
end | ||
end | ||
|
||
config.vm.provision 'selinux-status', type: 'shell', run: 'once', inline: 'sestatus' | ||
|
||
%w[libvirt virtualbox vmware_desktop].each do |p| | ||
config.vm.provider p do |v| | ||
v.cpus = ENV['TEST_VM_CPUS'] || 2 | ||
v.memory = ENV['TEST_VM_MEMORY'] || 2048 | ||
end | ||
end | ||
config.vm.provider :virtualbox do |v,o| | ||
v.gui = false | ||
v.check_guest_additions = false | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is Fedora 37 the only one that needs the EL8 packages, instead of EL7 or EL9?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as far as I can see yes, it needs el8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend >= "37" so it can work for future releases of fedora.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I think 38 and newer need EL9 packages, and 36 needs EL7? I'm not sure, but some clarification would be good.