mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 11:47:47 +03:00
project: fix var-spacing ansible rule (#10266)
* project: fix var-spacing ansible rule Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing on the beginning/end of jinja template Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing of default filter Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing between filter arguments Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix double space at beginning/end of jinja Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix remaining jinja[spacing] ansible-lint warning Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> --------- Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
This commit is contained in:
committed by
GitHub
parent
f8b93fa88a
commit
5d00b851ce
@@ -1,8 +1,8 @@
|
||||
# Macro to convert camelCase dictionary keys to snake_case keys
|
||||
{% macro convert_keys(mydict) -%}
|
||||
{% for key in mydict.keys()|list -%}
|
||||
{% for key in mydict.keys() | list -%}
|
||||
{% set key_split = key.split('_') -%}
|
||||
{% set new_key = key_split[0] + key_split[1:]|map('capitalize')|join -%}
|
||||
{% set new_key = key_split[0] + key_split[1:] | map('capitalize') | join -%}
|
||||
{% set value = mydict.pop(key) -%}
|
||||
{{ mydict.__setitem__(new_key, value) -}}
|
||||
{{ convert_keys(value) if value is mapping else None -}}
|
||||
|
||||
@@ -18,7 +18,7 @@ spec:
|
||||
k8s-app: local-volume-provisioner
|
||||
version: {{ local_volume_provisioner_image_tag }}
|
||||
spec:
|
||||
priorityClassName: {% if local_volume_provisioner_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
|
||||
priorityClassName: {% if local_volume_provisioner_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{ '' }}
|
||||
serviceAccountName: local-volume-provisioner
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
|
||||
Reference in New Issue
Block a user