prole/infrastructure/roles/k3s/templates/config.yaml.j2
chrisfu f47c18fef7 feat(infrastructure): enhance k3s automation and OpenTofu integration
- Infrastructure:
    - Updated k3s Ansible role with mountpoint preflight checks and better permission management.
    - Automated deployment of prole configuration and port-forwarding scripts to cluster hosts.
    - Added systemd service for managing port forwards on k3s nodes.
    - Added prole-installer service account token automation.
- K8s Manifests:
    - Renamed and added Persistent Volumes in iscsi-pvs.yaml (including OpenBao support).
    - Updated StatefulSets for garage and openbao.
    - Migrated prole-db to CloudNativePG-based configuration.
    - Added comprehensive OpenTofu manifests for cluster deployment.
- Configuration:
    - Added cluster-specific configurations (k3d, k3s-hosts).
    - Added PostgreSQL configuration templates.
    - Updated .gitignore to track the conf/ directory.
- Tools:
    - Updated install.py and port-forwarding scripts.
    - Added render_manifest.py for manifest generation.
2026-02-07 22:53:18 -08:00

49 lines
1.1 KiB
Django/Jinja

{% if k3s_role == 'server' %}
{% if k3s_cluster_init | bool %}
cluster-init: true
{% elif k3s_server_url %}
server: "{{ k3s_server_url }}"
{% endif %}
{% else %}
server: "{{ k3s_server_url }}"
{% endif %}
{% if k3s_token %}
token: "{{ k3s_token }}"
{% endif %}
{% if k3s_role == 'server' and k3s_write_kubeconfig_mode %}
write-kubeconfig-mode: "{{ k3s_write_kubeconfig_mode }}"
{% endif %}
{% if k3s_role == 'server' and k3s_kubeconfig_group %}
write-kubeconfig-group: "{{ k3s_kubeconfig_group }}"
{% endif %}
{% if k3s_tls_sans | length %}
tls-san:
{% for item in k3s_tls_sans %}
- "{{ item }}"
{% endfor %}
{% endif %}
{% if k3s_role == 'server' and k3s_disable | length %}
disable:
{% for item in k3s_disable %}
- "{{ item }}"
{% endfor %}
{% endif %}
{% if k3s_disable_agent | bool %}
disable-agent: true
{% endif %}
{% if k3s_data_dir is defined and k3s_data_dir %}
data-dir: "{{ k3s_data_dir }}"
{% endif %}
{% if k3s_node_labels | length %}
node-label:
{% for item in k3s_node_labels %}
- "{{ item }}"
{% endfor %}
{% endif %}
{% if k3s_node_taints | length %}
node-taint:
{% for item in k3s_node_taints %}
- "{{ item }}"
{% endfor %}
{% endif %}