-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* el8: keep on truckin - keep up with container-selinux moving past 2.164.1 on el8 Signed-off-by: Jacob Blain Christen <[email protected]>
- Loading branch information
Showing
7 changed files
with
111 additions
and
26 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
ARG TUMBLEWEED=opensuse/tumbleweed | ||
FROM ${TUMBLEWEED} | ||
ADD https://github.com/AkihiroSuda/clone3-workaround/releases/download/v1.0.0/clone3-workaround.x86_64 /bin/clone3-workaround | ||
RUN chmod +x /bin/clone3-workaround | ||
SHELL ["clone3-workaround", "/usr/bin/env", "bash","-c"] | ||
RUN zypper install -y container-selinux git rpm-build selinux-policy-devel | ||
|
||
|
||
ENV DAPPER_SOURCE /source | ||
ENV DAPPER_OUTPUT ./dist | ||
ENV DAPPER_ENV COMBARCH DRONE_TAG TAG | ||
ENV HOME ${DAPPER_SOURCE} | ||
WORKDIR ${DAPPER_SOURCE} | ||
|
||
ENTRYPOINT ["./policy/microos/scripts/entry"] | ||
ENTRYPOINT ["clone3-workaround", "./policy/microos/scripts/entry"] |
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# vim: sw=8:ts=8:et | ||
|
||
/etc/systemd/system/k3s.* -- gen_context(system_u:object_r:container_unit_file_t,s0) | ||
/usr/lib/systemd/system/k3s.* -- gen_context(system_u:object_r:container_unit_file_t,s0) | ||
#/usr/lib/systemd/system/k3s.* -- gen_context(system_u:object_r:container_unit_file_t,s0) | ||
/usr/local/lib/systemd/system/k3s.* -- gen_context(system_u:object_r:container_unit_file_t,s0) | ||
/usr/local/s?bin/k3s -- gen_context(system_u:object_r:container_runtime_exec_t,s0) | ||
/usr/s?bin/k3s -- gen_context(system_u:object_r:container_runtime_exec_t,s0) | ||
/var/lib/cni(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0) | ||
/var/lib/kubelet/pods(/.*)? gen_context(system_u:object_r:container_file_t,s0) | ||
/var/lib/rancher/k3s(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0) | ||
/var/lib/rancher/k3s/agent/containerd/[^/]*/snapshots -d gen_context(system_u:object_r:container_share_t,s0) | ||
/var/lib/rancher/k3s/agent/containerd/[^/]*/snapshots/[^/]* -d gen_context(system_u:object_r:container_share_t,s0) | ||
/var/lib/rancher/k3s/agent/containerd/[^/]*/snapshots/[^/]*/.* <<none>> | ||
/var/lib/rancher/k3s/agent/containerd/[^/]*/sandboxes(/.*)? gen_context(system_u:object_r:container_share_t,s0) | ||
/var/lib/rancher/k3s/data(/.*)? gen_context(system_u:object_r:container_runtime_exec_t,s0) | ||
/var/lib/rancher/k3s/storage(/.*)? gen_context(system_u:object_r:container_file_t,s0) | ||
/var/log/containers(/.*)? gen_context(system_u:object_r:container_log_t,s0) | ||
/var/log/pods(/.*)? gen_context(system_u:object_r:container_log_t,s0) | ||
/var/run/flannel(/.*)? gen_context(system_u:object_r:container_var_run_t,s0) | ||
/var/run/k3s(/.*)? gen_context(system_u:object_r:container_var_run_t,s0) | ||
/var/run/k3s/containerd/[^/]*/sandboxes/[^/]*/shm(/.*)? gen_context(system_u:object_r:container_runtime_tmpfs_t,s0) | ||
#/usr/local/s?bin/k3s -- gen_context(system_u:object_r:container_runtime_exec_t,s0) | ||
#/usr/s?bin/k3s -- gen_context(system_u:object_r:container_runtime_exec_t,s0) | ||
#/var/lib/cni(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0) | ||
#/var/lib/kubelet/pods(/.*)? gen_context(system_u:object_r:container_file_t,s0) | ||
#/var/lib/rancher/k3s(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0) | ||
#/var/lib/rancher/k3s/agent/containerd/[^/]*/snapshots -d gen_context(system_u:object_r:container_share_t,s0) | ||
#/var/lib/rancher/k3s/agent/containerd/[^/]*/snapshots/[^/]* -d gen_context(system_u:object_r:container_share_t,s0) | ||
#/var/lib/rancher/k3s/agent/containerd/[^/]*/snapshots/[^/]*/.* <<none>> | ||
#/var/lib/rancher/k3s/agent/containerd/[^/]*/sandboxes(/.*)? gen_context(system_u:object_r:container_share_t,s0) | ||
#/var/lib/rancher/k3s/data(/.*)? gen_context(system_u:object_r:container_runtime_exec_t,s0) | ||
#/var/lib/rancher/k3s/storage(/.*)? gen_context(system_u:object_r:container_file_t,s0) | ||
#/var/log/containers(/.*)? gen_context(system_u:object_r:container_log_t,s0) | ||
#/var/log/pods(/.*)? gen_context(system_u:object_r:container_log_t,s0) | ||
#/var/run/flannel(/.*)? gen_context(system_u:object_r:container_var_run_t,s0) | ||
#/var/run/k3s(/.*)? gen_context(system_u:object_r:container_var_run_t,s0) | ||
#/var/run/k3s/containerd/[^/]*/sandboxes/[^/]*/shm(/.*)? gen_context(system_u:object_r:container_runtime_tmpfs_t,s0) |
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,40 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vagrant.plugins = ["vagrant-k3s"] | ||
|
||
config.vm.box = "centos/8" | ||
|
||
%w[hyperv libvirt virtualbox vmware_desktop].each do |p| | ||
config.vm.provider p do |v, o| | ||
v.memory = "2048" | ||
v.cpus = 2 | ||
end | ||
end | ||
|
||
config.vm.synced_folder '.', '/vagrant', disabled: true | ||
config.vm.synced_folder '../../dist/centos8/noarch', '/vagrant/dist', type: 'rsync' | ||
|
||
config.vm.provision :shell, run: 'once', inline: 'set -x; dnf install -y https://github.com/k3s-io/k3s-selinux/releases/download/v0.4.stable.1/k3s-selinux-0.4-1.el8.noarch.rpm' | ||
config.vm.provision :shell, run: 'once' do |sh| | ||
sh.inline = <<~EOF | ||
#!/usr/bin/env bash | ||
set -eux -o pipefail | ||
dnf install -y \ | ||
/vagrant/dist/k3s-selinux-*.el8.noarch.rpm | ||
EOF | ||
end | ||
|
||
# vagrant [up|provision] --provision-with=k3s | ||
config.vm.provision :k3s, run: 'never' do |k3s| | ||
k3s.env = <<~ENV | ||
INSTALL_K3S_NAME=server | ||
INSTALL_K3S_SKIP_SELINUX_RPM=true | ||
INSTALL_K3S_VERSION=v1.21.5+k3s2 | ||
K3S_KUBECONFIG_MODE=0644 | ||
K3S_SELINUX=true | ||
K3S_TOKEN=vagrant | ||
ENV | ||
end | ||
end |
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,41 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vagrant.plugins = ["vagrant-k3s"] | ||
|
||
config.vm.box = "fedora/34-cloud-base" | ||
|
||
%w[hyperv libvirt virtualbox vmware_desktop].each do |p| | ||
config.vm.provider p do |v, o| | ||
v.memory = "2048" | ||
v.cpus = 2 | ||
end | ||
end | ||
|
||
config.vm.synced_folder '.', '/vagrant', disabled: true | ||
config.vm.synced_folder '../../dist/centos8/noarch', '/vagrant/dist', type: 'rsync' | ||
|
||
config.vm.provision :shell, run: 'once', inline: 'set -x; dnf install -y https://github.com/k3s-io/k3s-selinux/releases/download/v0.4.stable.1/k3s-selinux-0.4-1.el8.noarch.rpm' | ||
config.vm.provision :shell, run: 'once' do |sh| | ||
sh.inline = <<~EOF | ||
#!/usr/bin/env bash | ||
set -eux -o pipefail | ||
dnf install -y \ | ||
https://kojipkgs.fedoraproject.org/packages/container-selinux/2.170.0/2.fc34/noarch/container-selinux-2.170.0-2.fc34.noarch.rpm \ | ||
/vagrant/dist/k3s-selinux-*.el8.noarch.rpm | ||
EOF | ||
end | ||
|
||
# vagrant [up|provision] --provision-with=k3s | ||
config.vm.provision :k3s, run: 'never' do |k3s| | ||
k3s.env = <<~ENV | ||
INSTALL_K3S_NAME=server | ||
INSTALL_K3S_SKIP_SELINUX_RPM=true | ||
INSTALL_K3S_VERSION=v1.21.5+k3s2 | ||
K3S_KUBECONFIG_MODE=0644 | ||
K3S_SELINUX=true | ||
K3S_TOKEN=vagrant | ||
ENV | ||
end | ||
end |