feat: add CSI smoke test and default Traefik LB location
This commit is contained in:
@@ -49,6 +49,30 @@
|
||||
delay: 10
|
||||
when: ccm_workload_kind.stdout == "daemonset"
|
||||
|
||||
- name: Set default Hetzner load balancer location for Traefik service
|
||||
command: kubectl -n kube-system annotate service traefik load-balancer.hetzner.cloud/location={{ hcloud_lb_location }} --overwrite
|
||||
register: traefik_annotation
|
||||
changed_when: true
|
||||
failed_when: false
|
||||
|
||||
- name: Show Traefik service when annotation patch fails
|
||||
command: kubectl -n kube-system get service traefik -o yaml
|
||||
register: traefik_service_dump
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when: traefik_annotation.rc != 0
|
||||
|
||||
- name: Fail when Traefik load balancer annotation cannot be set
|
||||
fail:
|
||||
msg: |
|
||||
Failed to set Hetzner load balancer location annotation on kube-system/traefik service.
|
||||
Command output:
|
||||
{{ traefik_annotation.stderr | default(traefik_annotation.stdout) }}
|
||||
|
||||
Service dump:
|
||||
{{ traefik_service_dump.stdout | default('n/a') }}
|
||||
when: traefik_annotation.rc != 0
|
||||
|
||||
- name: Show CCM namespace objects when workload missing
|
||||
command: kubectl -n kube-system get all | grep hcloud-cloud-controller-manager || true
|
||||
register: ccm_ns_objects
|
||||
|
||||
Reference in New Issue
Block a user