@ -16,6 +16,8 @@ nfc_kubernetes_tigera_operator_tag: v1.32.3 # Calico v3.27.0
|
|||||||
nfc_kubernetes_enable_metallb: false
|
nfc_kubernetes_enable_metallb: false
|
||||||
nfc_kubernetes_enable_servicelb: false
|
nfc_kubernetes_enable_servicelb: false
|
||||||
|
|
||||||
|
nfc_role_kubernetes_install_olm: false
|
||||||
|
|
||||||
|
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
#
|
#
|
||||||
@ -34,7 +36,6 @@ KubernetesVersion: '1.26.2' # must match the repo
|
|||||||
kubernetes_version_olm: '0.26.0'
|
kubernetes_version_olm: '0.26.0'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
KubernetesVersion_k3s_prefix: '+k3s1'
|
KubernetesVersion_k3s_prefix: '+k3s1'
|
||||||
|
|
||||||
@ -53,8 +54,6 @@ kubelet_arg_system_reserved_cpu: 450m
|
|||||||
kubelet_arg_system_reserved_memory: 512Mi
|
kubelet_arg_system_reserved_memory: 512Mi
|
||||||
kubelet_arg_system_reserved_storage: 8Gi
|
kubelet_arg_system_reserved_storage: 8Gi
|
||||||
|
|
||||||
# kubernetes_olm_install: true # optional, boolean. default=true
|
|
||||||
|
|
||||||
|
|
||||||
nfc_kubernetes:
|
nfc_kubernetes:
|
||||||
enable_firewall: true # Optional, bool enable firewall rules from role 'nfc_firewall'
|
enable_firewall: true # Optional, bool enable firewall rules from role 'nfc_firewall'
|
||||||
|
|||||||
@ -182,7 +182,10 @@
|
|||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
run_once: true
|
run_once: true
|
||||||
# no_log: true
|
# no_log: true
|
||||||
when: ansible_os_family == 'Debian'
|
when: >
|
||||||
|
ansible_os_family == 'Debian'
|
||||||
|
and
|
||||||
|
{{ item.when | default(true) | bool }}
|
||||||
loop: "{{ download_files }}"
|
loop: "{{ download_files }}"
|
||||||
vars:
|
vars:
|
||||||
ansible_connection: local
|
ansible_connection: local
|
||||||
@ -191,6 +194,7 @@
|
|||||||
url: https://get.k3s.io
|
url: https://get.k3s.io
|
||||||
- dest: /tmp/install_olm.sh
|
- dest: /tmp/install_olm.sh
|
||||||
url: https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/v{{ kubernetes_version_olm }}/scripts/install.sh
|
url: https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/v{{ kubernetes_version_olm }}/scripts/install.sh
|
||||||
|
when: "{{ nfc_role_kubernetes_install_olm }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Download K3s Binary
|
- name: Download K3s Binary
|
||||||
@ -247,6 +251,7 @@
|
|||||||
group: root
|
group: root
|
||||||
when: hash_sha256_k3s_existing_binary.stat.checksum | default('0') != hash_sha256_k3s_downloaded_binary
|
when: hash_sha256_k3s_existing_binary.stat.checksum | default('0') != hash_sha256_k3s_downloaded_binary
|
||||||
|
|
||||||
|
|
||||||
- name: Copy install scripts to Host
|
- name: Copy install scripts to Host
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
@ -258,9 +263,12 @@
|
|||||||
loop: "{{ install_scripts }}"
|
loop: "{{ install_scripts }}"
|
||||||
vars:
|
vars:
|
||||||
install_scripts:
|
install_scripts:
|
||||||
- "/tmp/install.sh"
|
- path: "/tmp/install.sh"
|
||||||
- "/tmp/install_olm.sh"
|
- path: "/tmp/install_olm.sh"
|
||||||
# when: hash_sha256_k3s_existing_binary.stat.checksum | default('0') != hash_sha256_k3s_downloaded_binary
|
when: "{{ nfc_role_kubernetes_install_olm }}"
|
||||||
|
when: >
|
||||||
|
{{ item.when | default(true) | bool }}
|
||||||
|
|
||||||
|
|
||||||
- name: Required Initial config files
|
- name: Required Initial config files
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@ -425,7 +433,7 @@
|
|||||||
when: >
|
when: >
|
||||||
kubernetes_config.cluster.prime.name == inventory_hostname
|
kubernetes_config.cluster.prime.name == inventory_hostname
|
||||||
and
|
and
|
||||||
kubernetes_olm_install | default(false) | bool
|
nfc_role_kubernetes_install_olm | default(false) | bool
|
||||||
|
|
||||||
|
|
||||||
- name: Uninstall OLM
|
- name: Uninstall OLM
|
||||||
@ -436,7 +444,7 @@
|
|||||||
kubectl delete -n olm deployment olm-operator;
|
kubectl delete -n olm deployment olm-operator;
|
||||||
|
|
||||||
kubectl delete crd catalogsources.operators.coreos.com;
|
kubectl delete crd catalogsources.operators.coreos.com;
|
||||||
kubectl delete` crd clusterserviceversions.operators.coreos.com;
|
kubectl delete crd clusterserviceversions.operators.coreos.com;
|
||||||
kubectl delete crd installplans.operators.coreos.com;
|
kubectl delete crd installplans.operators.coreos.com;
|
||||||
kubectl delete crd olmconfigs.operators.coreos.com;
|
kubectl delete crd olmconfigs.operators.coreos.com;
|
||||||
kubectl delete crd operatorconditions.operators.coreos.com;
|
kubectl delete crd operatorconditions.operators.coreos.com;
|
||||||
@ -453,7 +461,7 @@
|
|||||||
when: >
|
when: >
|
||||||
kubernetes_config.cluster.prime.name == inventory_hostname
|
kubernetes_config.cluster.prime.name == inventory_hostname
|
||||||
and
|
and
|
||||||
'olm_uninstall' not in ansible_run_tags
|
'olm_uninstall' in ansible_run_tags
|
||||||
|
|
||||||
|
|
||||||
- name: Enable Cluster Encryption
|
- name: Enable Cluster Encryption
|
||||||
|
|||||||
Reference in New Issue
Block a user