feat(nfc_kubernetes): prime node to always be labeled prime

useful for setting up single node where if all nodes off except prime, targeting can be done

!77 nofusscomputing/infrastructure/configuration-management/project-production!58 nofusscomputing/infrastructure/configuration-management/inventory-infrastructure!4 nofusscomputing/infrastructure/configuration-management/templates-production!28
This commit is contained in:
2024-07-28 15:40:24 +09:30
parent 6d26e2e0cf
commit 3c06647637

View File

@ -58,9 +58,27 @@
kind: Node
metadata:
name: "{{ inventory_hostname }}"
{% if nfc_role_kubernetes_node_labels -%}
{% if
nfc_role_kubernetes_node_labels
and
not nfc_role_kubernetes_prime | bool
-%}
labels:
{{ nfc_role_kubernetes_node_labels | to_nice_yaml(indent=0) | indent(4) }}
{ elif
nfc_role_kubernetes_prime | bool
%}
labels:
node-role.kubernetes.io/prime: "true"
{% if nfc_role_kubernetes_node_labels %}
{{ nfc_role_kubernetes_node_labels | to_nice_yaml(indent=0) | indent(4) }}
{% endif %}
{%- endif +%}
{% if nfc_role_kubernetes_node_taints -%}
spec: