mirror of
https://github.com/dredx/prole.git
synced 2026-09-24 15:54:32 +00:00
Repairs and improvements:
- iSCSI: Added cleanup tasks to remove stale mounts and fstab entries. Improved robustness of iSCSI target management and added 'iscsi_absent_mounts' support.
- K3s:
- Updated service start logic to accept 'activating' state, preventing premature failure during slow startups.
- Improved service stop logic to safely handle missing or not-found services.
- Ensured 'prole-installer' ServiceAccount and ClusterRoleBinding exist for K8s administration.
- Added leader election and etcd tuning arguments (forgiving leases) to config.yaml.j2.
- Removed deprecated 'prole-port-forwards' systemd service.
- Installer & Scripts:
- Updated legacy_tk.py to support K3s mode, secret resolution for passwords, and better environment management (including ~/.prole/env.sh for service mode).
- Updated init_ansible.sh to support PROLE_VAULT_PASS_FILE and ANSIBLE_VAULT_PASSWORD_FILE.
- Improved directory and kubeconfig path resolution in prole_cfg.sh to support fallback to ~/.prole.
- Enhanced Grafana password resolution in init_monitoring.sh.
- Added automatic application of iSCSI StorageClass and PersistentVolumes in init_openbao.sh.
- General: Switched conf/prole.cfg to k3s deployment mode and updated vault_k3s.yml token.
New Ansible Tasks and Playbooks:
- infrastructure/playbooks/iscsi_cleanup.yml: Automates logout and removal of stale iSCSI node records.
- infrastructure/playbooks/prole_logs_migrate.yml: Orchestrates /prole/logs migration to iSCSI storage.
- infrastructure/playbooks/tmp_bao_dir.yml: Ensures host-level storage directories for OpenBao.
- infrastructure/playbooks/tmp_mount.yml: Utility to verify and enforce host-level mounts.
- infrastructure/playbooks/k3s_sync.yml: Added tasks to start K3s after sync and update local kubeconfig on the controller.
- Added 'Unmount stale iSCSI mounts' and 'Remove stale iSCSI fstab entries' to the iscsi role.
- Added 'Ensure prole-installer service account exists' to the k3s role.
78 lines
2.0 KiB
Django/Jinja
78 lines
2.0 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 %}
|
|
{# --- Control-plane leader election tuning (forgiving leases) --- #}
|
|
{% if k3s_kube_controller_manager_args is defined and k3s_kube_controller_manager_args | length %}
|
|
kube-controller-manager-arg:
|
|
{% for item in k3s_kube_controller_manager_args %}
|
|
- "{{ item }}"
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if k3s_kube_scheduler_args is defined and k3s_kube_scheduler_args | length %}
|
|
kube-scheduler-arg:
|
|
{% for item in k3s_kube_scheduler_args %}
|
|
- "{{ item }}"
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if k3s_cloud_controller_manager_args is defined and k3s_cloud_controller_manager_args | length %}
|
|
k3s-cloud-controller-manager-arg:
|
|
{% for item in k3s_cloud_controller_manager_args %}
|
|
- "{{ item }}"
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{# --- Embedded etcd tuning (optional) --- #}
|
|
{% if k3s_etcd_args is defined and k3s_etcd_args | length %}
|
|
etcd-arg:
|
|
{% for item in k3s_etcd_args %}
|
|
- "{{ item }}"
|
|
{% endfor %}
|
|
{% endif %}
|