mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-15 22:34:21 +03:00
kubeadm: allow to provide patch inline in inventories
Specifying one directory for kubeadm patches is not ideal: 1. It does not allow working with multiples inventories easily 2. No ansible templating of the patch 3. Ansible path searching can sometimes be confusing Instead, provide the patch directly in a variable, and add some quality of life to handle components targeting and patch ordering more explicitly (`target` and `type` which are translated to the kubeadm scheme which is based on the file name)
This commit is contained in:
14
roles/kubernetes/kubeadm_common/defaults/main.yml
Normal file
14
roles/kubernetes/kubeadm_common/defaults/main.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
kubeadm_patches_dir: "{{ kube_config_dir }}/patches"
|
||||
kubeadm_patches: []
|
||||
# kubeadm_patches:
|
||||
# - target: kube-apiserver|kube-controller-manager|kube-scheduler|etcd|kubeletconfiguration
|
||||
# type: strategic(default)|json|merge
|
||||
# patch:
|
||||
# metadata:
|
||||
# annotations:
|
||||
# example.com/test: "true"
|
||||
# labels:
|
||||
# example.com/prod_level: "{{ prod_level }}"
|
||||
# - ...
|
||||
# Patches are applied in the order they are specified.
|
||||
Reference in New Issue
Block a user