kubernetes-sigs / kubespray

Deploy a Production Ready Kubernetes Cluster
Apache License 2.0
16.2k stars 6.49k forks source link

Include scripts and conf files in the ansible collection #11707

Closed VannTen closed 6 days ago

VannTen commented 1 week ago

What type of PR is this? /kind bug

What this PR does / why we need it: We use shell scripts and conf files in some roles (notably, certificates provisioning), so we need to include them in order for the collection to work when using the configurations depending on those roles.

Which issue(s) this PR fixes: Fixes #11706

Does this PR introduce a user-facing change?:

Fix collection usage for calico and other configuration depending on .sh and .conf files in Kubespray 

/cherrypick release-2.26

VannTen commented 1 week ago

/ok-to-test

VannTen commented 1 week ago

Diff between collection contents with this:

diff --git a/on_master b/on_fix
index b2141b66c..9d3a73da9 100644
--- a/on_master
+++ b/on_fix
@@ -70,2 +70,3 @@ roles/bastion-ssh-config/templates/ssh-bastion.conf.j2
 roles/bootstrap-os/defaults/
+roles/bootstrap-os/files/
 roles/bootstrap-os/handlers/
@@ -75,2 +76,3 @@ roles/bootstrap-os/vars/
 roles/bootstrap-os/defaults/main.yml
+roles/bootstrap-os/files/bootstrap.sh
 roles/bootstrap-os/handlers/main.yml
@@ -156,2 +158,3 @@ roles/container-engine/cri-dockerd/molecule/default/molecule.yml
 roles/container-engine/cri-dockerd/molecule/default/prepare.yml
+roles/container-engine/cri-dockerd/molecule/default/files/10-mynet.conf
 roles/container-engine/cri-dockerd/molecule/default/files/container.json
@@ -162,2 +165,3 @@ roles/container-engine/cri-dockerd/templates/cri-dockerd.socket.j2
 roles/container-engine/cri-o/defaults/
+roles/container-engine/cri-o/files/
 roles/container-engine/cri-o/handlers/
@@ -169,2 +173,3 @@ roles/container-engine/cri-o/vars/
 roles/container-engine/cri-o/defaults/main.yml
+roles/container-engine/cri-o/files/mounts.conf
 roles/container-engine/cri-o/handlers/main.yml
@@ -176,2 +181,3 @@ roles/container-engine/cri-o/molecule/default/molecule.yml
 roles/container-engine/cri-o/molecule/default/prepare.yml
+roles/container-engine/cri-o/molecule/default/files/10-mynet.conf
 roles/container-engine/cri-o/molecule/default/files/container.json
@@ -199,2 +205,3 @@ roles/container-engine/crun/tasks/main.yml
 roles/container-engine/docker/defaults/
+roles/container-engine/docker/files/
 roles/container-engine/docker/handlers/
@@ -205,2 +212,3 @@ roles/container-engine/docker/vars/
 roles/container-engine/docker/defaults/main.yml
+roles/container-engine/docker/files/cleanup-docker-orphans.sh
 roles/container-engine/docker/handlers/main.yml
@@ -238,2 +246,3 @@ roles/container-engine/gvisor/molecule/default/molecule.yml
 roles/container-engine/gvisor/molecule/default/prepare.yml
+roles/container-engine/gvisor/molecule/default/files/10-mynet.conf
 roles/container-engine/gvisor/molecule/default/files/container.json
@@ -251,2 +260,3 @@ roles/container-engine/kata-containers/molecule/default/molecule.yml
 roles/container-engine/kata-containers/molecule/default/prepare.yml
+roles/container-engine/kata-containers/molecule/default/files/10-mynet.conf
 roles/container-engine/kata-containers/molecule/default/files/container.json
@@ -280,2 +290,3 @@ roles/container-engine/youki/molecule/default/molecule.yml
 roles/container-engine/youki/molecule/default/prepare.yml
+roles/container-engine/youki/molecule/default/files/10-mynet.conf
 roles/container-engine/youki/molecule/default/files/container.json
@@ -999,2 +1010,3 @@ roles/kubernetes/node/vars/ubuntu-24.yml
 roles/kubernetes/preinstall/defaults/
+roles/kubernetes/preinstall/files/
 roles/kubernetes/preinstall/handlers/
@@ -1005,2 +1017,3 @@ roles/kubernetes/preinstall/vars/
 roles/kubernetes/preinstall/defaults/main.yml
+roles/kubernetes/preinstall/files/dhclient_nodnsupdate
 roles/kubernetes/preinstall/handlers/main.yml
@@ -1053,2 +1066,3 @@ roles/network_plugin/ovn4nfv/
 roles/network_plugin/weave/
+roles/network_plugin/calico/files/
 roles/network_plugin/calico/handlers/
@@ -1059,2 +1073,3 @@ roles/network_plugin/calico/templates/
 roles/network_plugin/calico/vars/
+roles/network_plugin/calico/files/openssl.conf
 roles/network_plugin/calico/handlers/main.yml
@@ -1175,2 +1190,3 @@ roles/network_plugin/kube-router/templates/kubeconfig.yml.j2
 roles/network_plugin/macvlan/defaults/
+roles/network_plugin/macvlan/files/
 roles/network_plugin/macvlan/handlers/
@@ -1180,2 +1196,6 @@ roles/network_plugin/macvlan/templates/
 roles/network_plugin/macvlan/defaults/main.yml
+roles/network_plugin/macvlan/files/ifdown-local
+roles/network_plugin/macvlan/files/ifdown-macvlan
+roles/network_plugin/macvlan/files/ifup-local
+roles/network_plugin/macvlan/files/ifup-macvlan
 roles/network_plugin/macvlan/handlers/main.yml
VannTen commented 1 week ago

/cherrypick release-2.26

k8s-infra-cherrypick-robot commented 1 week ago

@VannTen: once the present PR merges, I will cherry-pick it on top of release-2.26 in a new PR and assign it to you.

In response to [this](https://github.com/kubernetes-sigs/kubespray/pull/11707#issuecomment-2470939890): >/cherrypick release-2.26 > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
VannTen commented 6 days ago

/cc @MrFreezeex

k8s-ci-robot commented 6 days ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MrFreezeex, VannTen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/kubespray/blob/master/OWNERS)~~ [VannTen] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
k8s-infra-cherrypick-robot commented 6 days ago

@VannTen: new pull request created: #11713

In response to [this](https://github.com/kubernetes-sigs/kubespray/pull/11707#issuecomment-2470939890): >/cherrypick release-2.26 > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
VannTen commented 5 days ago

/cherrypick release-2.26

k8s-infra-cherrypick-robot commented 5 days ago

@VannTen: new pull request created: #11717

In response to [this](https://github.com/kubernetes-sigs/kubespray/pull/11707#issuecomment-2480753663): >/cherrypick release-2.26 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.