kubernetes-sigs / kubespray

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

Convert kubernetes-apps to use kubectl directly #11700

Open VannTen opened 2 weeks ago

VannTen commented 2 weeks ago

What type of PR is this? /kind design

What this PR does / why we need it: This design an alternative to the custom kube module for applying manifests, by combining the 'template' lookup plugin with the stdin argument of the command module, and converts the manifests under roles/kubernetes-apps/ansible to make use of it.

See first commit for the rationale of that method.

The idea would be to deprecate the kube module and transition existing manifests to this method. Since there is a lot of manifests, there is no need to do eveything at once ; PRs in smaller chunks might be easier to review.

One of the end-goal is to enable server-side apply for CoreDNS (which is converted as part of this PR) to have a proper fix for #10860 and reapply #10617. This is not done as part of this PR to keep it refactoring only (no behavior change) but will be in a separate one.

Special notes for your reviewer: Apart from the first commit, this is mostly conversion commits.

Does this PR introduce a user-facing change?:

NONE

/label tide/merge-method-merge

k8s-ci-robot commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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
VannTen commented 2 weeks ago

/ok-to-test