mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 00:08:46 -03:30
Define a standard commandline for applying manifests
This is expected to be used in the command module this way:
command:
cmd: "{{ kubectl_apply_stdin }}"
stdin: <... rendered manifests > -> using the 'template' lookup plugin
in most cases.
The advantages over the kube plugin module integrated in kubespray
(which this should replace eventually):
- way easier to modify to take advantage of new features (server-side
apply for instance)
- no need for a separate template tasks + checking the result (which can
introduce problem if the first playbook runs encounters an error).
This commit is contained in:
2
roles/kubernetes-apps/defaults/main.yml
Normal file
2
roles/kubernetes-apps/defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
namespace: kube-system
|
||||
2
roles/kubernetes-apps/vars/main.yml
Normal file
2
roles/kubernetes-apps/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
kubectl_apply_stdin: "{{ kubectl }} apply -f - -n {{ namespace }}"
|
||||
Reference in New Issue
Block a user