Skip to content

Commit

Permalink
Fedora and RHEL use etc_t and the convention is <type_name>_t (kubern…
Browse files Browse the repository at this point in the history
…etes-sigs#7891)

* Fedora and RHEL use etc_t and the convention is <type_name>_t

* Docs: specify all values for preinstall_selinux_state

* CI: Add Fedora 34 with SELinux in enforcing mode
  • Loading branch information
cristicalin authored and sakuraiyuta committed Apr 16, 2022
1 parent 5e7528c commit e4a4849
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .gitlab-ci/packet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ packet_fedora33-calico:
variables:
MITOGEN_ENABLE: "true"

packet_fedora34-calico-selinux:
stage: deploy-part2
extends: .packet_periodic
when: on_success
variables:
MITOGEN_ENABLE: "true"

packet_amazon-linux-2-aio:
stage: deploy-part2
extends: .packet_pr
Expand Down
2 changes: 1 addition & 1 deletion docs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ centos8 | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :x: | :x:
debian10 | :x: | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
debian9 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: |
fedora33 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora34 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: |
fedora34 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: |
opensuse | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
oracle7 | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu16 | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
Expand Down
2 changes: 1 addition & 1 deletion docs/vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Some variables of note include:
* *kube_version* - Specify a given Kubernetes version
* *searchdomains* - Array of DNS domains to search when looking up hostnames
* *nameservers* - Array of nameservers to use for DNS lookup
* *preinstall_selinux_state* - Set selinux state, permitted values are permissive and disabled.
* *preinstall_selinux_state* - Set selinux state, permitted values are permissive, enforcing and disabled.

## Addressing variables

Expand Down
2 changes: 1 addition & 1 deletion roles/kubernetes/node/tasks/kubelet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
template:
src: "kubelet.env.{{ kubeletConfig_api_version }}.j2"
dest: "{{ kube_config_dir }}/kubelet.env"
setype: "{{ (preinstall_selinux_state == 'enforcing') | ternary('t_etc', omit) }}"
setype: "{{ (preinstall_selinux_state != 'disabled') | ternary('etc_t', omit) }}"
backup: yes
mode: 0640
notify: Node | restart kubelet
Expand Down
14 changes: 14 additions & 0 deletions tests/files/packet_fedora34-calico-selinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# Instance settings
cloud_image: fedora-34
mode: default

# Kubespray settings
deploy_netchecker: true
dns_min_replicas: 1
kube_network_plugin: calico

auto_renew_certificates: true

# Test with SELinux in enforcing mode
preinstall_selinux_state: enforcing

0 comments on commit e4a4849

Please sign in to comment.