Обновить ansible/k8s_post_install.yml
This commit is contained in:
@@ -18,26 +18,26 @@
|
|||||||
hosts: masters
|
hosts: masters
|
||||||
become: false
|
become: false
|
||||||
vars:
|
vars:
|
||||||
# Эта переменная должна быть задана в Semaphore Survey
|
|
||||||
# Если не задана, используем дефолт
|
|
||||||
ip_range: "{{ metallb_ip_range | default('10.33.33.210-10.33.33.250') }}"
|
ip_range: "{{ metallb_ip_range | default('10.33.33.210-10.33.33.250') }}"
|
||||||
tasks:
|
tasks:
|
||||||
- name: Установка Local Path Provisioner (Storage)
|
- name: Установка Local Path Provisioner (Storage)
|
||||||
shell: kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
|
shell: kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
|
||||||
|
|
||||||
- name: Установка StorageClass по умолчанию
|
- name: Установка StorageClass по умолчанию
|
||||||
shell: kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
|
# ИСПОЛЬЗУЕМ |, чтобы двоеточия в JSON не ломали YAML
|
||||||
|
shell: |
|
||||||
|
kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Установка MetalLB (Manifest)
|
- name: Установка MetalLB (Manifest)
|
||||||
shell: kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.8/config/manifests/metallb-native.yaml
|
shell: kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.8/config/manifests/metallb-native.yaml
|
||||||
|
|
||||||
- name: Ожидание запуска MetalLB Controller (может занять время)
|
- name: Ожидание запуска MetalLB Controller
|
||||||
shell: kubectl wait --namespace metallb-system --for=condition=ready pod -l app=metallb,component=controller --timeout=120s
|
shell: kubectl wait --namespace metallb-system --for=condition=ready pod -l app=metallb,component=controller --timeout=120s
|
||||||
changed_when: false
|
changed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Удаление блокирующего Webhook (Fix "operation not permitted")
|
- name: Удаление блокирующего Webhook
|
||||||
shell: kubectl delete validatingwebhookconfiguration metallb-webhook-configuration
|
shell: kubectl delete validatingwebhookconfiguration metallb-webhook-configuration
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
shell: kubectl get nodes
|
shell: kubectl get nodes
|
||||||
register: nodes_out
|
register: nodes_out
|
||||||
|
|
||||||
- name: Список запущенных подов во всех неймспейсах
|
- name: Список запущенных подов
|
||||||
shell: kubectl get pods -A
|
shell: kubectl get pods -A
|
||||||
register: pods_out
|
register: pods_out
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user