Browse Source
Merge pull request #11131 from VannTen/design/modular_pkgs_install
Merge pull request #11131 from VannTen/design/modular_pkgs_install
Fine grained OS packages installationpull/11121/head
Kubernetes Prow Robot
6 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 214 additions and 107 deletions
Split View
Diff Options
-
12roles/kubernetes/preinstall/defaults/main.yml
-
80roles/kubernetes/preinstall/files/pkgs-schema.json
-
14roles/kubernetes/preinstall/tasks/0020-set_facts.yml
-
12roles/kubernetes/preinstall/tasks/0040-verify-settings.yml
-
23roles/kubernetes/preinstall/tasks/0070-system-packages.yml
-
7roles/kubernetes/preinstall/vars/amazon.yml
-
8roles/kubernetes/preinstall/vars/centos.yml
-
10roles/kubernetes/preinstall/vars/debian-11.yml
-
11roles/kubernetes/preinstall/vars/debian-12.yml
-
9roles/kubernetes/preinstall/vars/debian.yml
-
8roles/kubernetes/preinstall/vars/fedora.yml
-
106roles/kubernetes/preinstall/vars/main.yml
-
8roles/kubernetes/preinstall/vars/redhat.yml
-
5roles/kubernetes/preinstall/vars/suse.yml
-
8roles/kubernetes/preinstall/vars/ubuntu.yml
@ -0,0 +1,80 @@ |
|||
{ |
|||
"$schema": "https://json-schema.org/draft/2020-12/schema", |
|||
"$id": "https://kubespray.io/internal/os_packages.schema.json", |
|||
"title": "Os packages", |
|||
"description": "Criteria for selecting packages to install on Kubernetes nodes during installation by Kubespray", |
|||
"type": "object", |
|||
"patternProperties": { |
|||
".*": { |
|||
"type": "object", |
|||
"additionalProperties": false, |
|||
"properties": { |
|||
"enabled": { |
|||
"description": "Escape hatch to filter packages. The value is expected to be pre-resolved to a boolean by Jinja", |
|||
"type": "boolean", |
|||
"default": true |
|||
}, |
|||
"groups": { |
|||
"description": "Match if the host is in one of these groups. If not specified match any host.", |
|||
"type": "array", |
|||
"minItems": 1, |
|||
"items":{ |
|||
"type": "string", |
|||
"pattern": "^[0-9A-Za-z_]*$" |
|||
} |
|||
}, |
|||
"os": { |
|||
"type": "object", |
|||
"description": "If not specified match any OS. Otherwise, must match by 'families' or 'distributions' to be included.", |
|||
"additionalProperties": false, |
|||
"minProperties": 1, |
|||
"properties": { |
|||
"families": { |
|||
"description": "Match if ansible_os_family is part of the list.", |
|||
"type": "array", |
|||
"minItems": 1, |
|||
"items": { |
|||
"type": "string" |
|||
} |
|||
}, |
|||
"distributions": { |
|||
"type": "object", |
|||
"description": "Match if ansible_distribution match one of defined keys.", |
|||
"minProperties": 1, |
|||
"patternProperties": { |
|||
".*": { |
|||
"description": "Match if either the value is the empty hash, or one major_versions/versions/releases contains the corresponding variable ('ansible_distrbution_*')", |
|||
"type": "object", |
|||
"additionalProperties": false, |
|||
"properties": { |
|||
"major_versions": { |
|||
"type": "array", |
|||
"minItems": 1, |
|||
"items": { |
|||
"type": "string" |
|||
} |
|||
}, |
|||
"versions": { |
|||
"type": "array", |
|||
"minItems": 1, |
|||
"items": { |
|||
"type": "string" |
|||
} |
|||
}, |
|||
"releases": { |
|||
"type": "array", |
|||
"minItems": 1, |
|||
"items": { |
|||
"type": "string" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -1,7 +0,0 @@ |
|||
--- |
|||
required_pkgs: |
|||
- libselinux-python |
|||
- device-mapper-libs |
|||
- nss |
|||
- conntrack-tools |
|||
- libseccomp |
@ -1,8 +0,0 @@ |
|||
--- |
|||
required_pkgs: |
|||
- "{{ ((ansible_distribution_major_version | int) < 8) | ternary('libselinux-python', 'python3-libselinux') }}" |
|||
- device-mapper-libs |
|||
- nss |
|||
- conntrack |
|||
- container-selinux |
|||
- libseccomp |
@ -1,10 +0,0 @@ |
|||
--- |
|||
required_pkgs: |
|||
- python3-apt |
|||
- gnupg |
|||
- apt-transport-https |
|||
- software-properties-common |
|||
- conntrack |
|||
- iptables |
|||
- apparmor |
|||
- libseccomp2 |
@ -1,11 +0,0 @@ |
|||
--- |
|||
required_pkgs: |
|||
- python3-apt |
|||
- gnupg |
|||
- apt-transport-https |
|||
- software-properties-common |
|||
- conntrack |
|||
- iptables |
|||
- apparmor |
|||
- libseccomp2 |
|||
- mergerfs |
@ -1,9 +0,0 @@ |
|||
--- |
|||
required_pkgs: |
|||
- python-apt |
|||
- aufs-tools |
|||
- apt-transport-https |
|||
- software-properties-common |
|||
- conntrack |
|||
- apparmor |
|||
- libseccomp2 |
@ -1,8 +0,0 @@ |
|||
--- |
|||
required_pkgs: |
|||
- iptables |
|||
- libselinux-python3 |
|||
- device-mapper-libs |
|||
- conntrack |
|||
- container-selinux |
|||
- libseccomp |
@ -0,0 +1,106 @@ |
|||
--- |
|||
pkgs: |
|||
apparmor: &debian_family_base |
|||
os: |
|||
families: |
|||
- Debian |
|||
apt-transport-https: *debian_family_base |
|||
aufs-tools: &deb_10 |
|||
groups: |
|||
- k8s_cluster |
|||
os: |
|||
distributions: |
|||
Debian: |
|||
major_versions: |
|||
- "10" |
|||
bash-completion: {} |
|||
conntrack: &deb_redhat |
|||
groups: |
|||
- k8s_cluster |
|||
os: |
|||
families: |
|||
- Debian |
|||
- RedHat |
|||
conntrack-tools: |
|||
groups: |
|||
- k8s_cluster |
|||
os: |
|||
families: |
|||
- Suse |
|||
distributions: |
|||
Amazon: {} |
|||
container-selinux: &redhat_family |
|||
groups: |
|||
- k8s_cluster |
|||
os: |
|||
families: |
|||
- RedHat |
|||
curl: {} |
|||
device-mapper: |
|||
groups: |
|||
- k8s_cluster |
|||
os: |
|||
families: |
|||
- Suse |
|||
device-mapper-libs: *redhat_family |
|||
e2fsprogs: {} |
|||
ebtables: {} |
|||
gnupg: &debian |
|||
groups: |
|||
- k8s_cluster |
|||
os: |
|||
distributions: |
|||
Debian: |
|||
major_versions: |
|||
- "11" |
|||
- "12" |
|||
ipset: |
|||
enabled: "{{ kube_proxy_mode != 'ipvs' }}" |
|||
groups: |
|||
- k8s_cluster |
|||
iptables: *deb_redhat |
|||
ipvsadm: |
|||
enabled: "{{ kube_proxy_mode == 'ipvs' }}" |
|||
groups: |
|||
- k8s_cluster |
|||
libseccomp: *redhat_family |
|||
libseccomp2: |
|||
groups: |
|||
- k8s_cluster |
|||
os: |
|||
families: |
|||
- Suse |
|||
- Debian |
|||
libselinux-python: # TODO: Handle rehat_family + major < 8 |
|||
os: |
|||
distributions: |
|||
Amazon: {} |
|||
libselinux-python3: |
|||
os: |
|||
distributions: |
|||
Fedora: {} |
|||
mergerfs: |
|||
os: |
|||
distributions: |
|||
Debian: |
|||
major_versions: |
|||
- "12" |
|||
nss: *redhat_family |
|||
openssl: {} |
|||
python-apt: *deb_10 |
|||
# TODO: not for debian 10 |
|||
python3-apt: *debian_family_base |
|||
python3-libselinux: |
|||
os: |
|||
distributions: |
|||
RedHat: &major_redhat_like |
|||
major_versions: |
|||
- "8" |
|||
- "9" |
|||
Centos: *major_redhat_like |
|||
rsync: {} |
|||
socat: {} |
|||
software-properties-common: *debian_family_base |
|||
tar: {} |
|||
unzip: {} |
|||
xfsprogs: {} |
@ -1,8 +0,0 @@ |
|||
--- |
|||
required_pkgs: |
|||
- "{{ ((ansible_distribution_major_version | int) < 8) | ternary('libselinux-python', 'python3-libselinux') }}" |
|||
- device-mapper-libs |
|||
- nss |
|||
- conntrack |
|||
- container-selinux |
|||
- libseccomp |
@ -1,5 +0,0 @@ |
|||
--- |
|||
required_pkgs: |
|||
- device-mapper |
|||
- conntrack-tools |
|||
- libseccomp2 |
@ -1,8 +0,0 @@ |
|||
--- |
|||
required_pkgs: |
|||
- python3-apt |
|||
- apt-transport-https |
|||
- software-properties-common |
|||
- conntrack |
|||
- apparmor |
|||
- libseccomp2 |
Write
Preview
Loading…
Cancel
Save