7 Commits

Author SHA1 Message Date
Clark Boylan
b16fae463e Bump the default ensure-kubernetes microk8s version to 1.31/stable
Previously we pinned to 1.28/stable due to a bug that prevented
1.29/stable from working. Now we've hit a new issue with 1.28/stable on
bookworm. The fix for that appears to simply be to upgrade to
1.31/stable so we do so here. More details can be found in this GitHub
issue:

  https://github.com/canonical/microk8s/issues/4361

The new version appears to return from the snap installation before the
k8s installation is fully ready to deal with add-on installation. This
occasionally produces errors like:

  subprocess.CalledProcessError:
  Command '('/snap/microk8s/7178/microk8s-kubectl.wrapper', 'get',
            'all,ingress', '--all-namespaces')'
  returned non-zero exit status 1.

Work around that with `microk8s status --wait-ready` to ensure that k8s
is up before adding addons.

While we are at it we also update the collect-kubernetes-logs role to
collect microk8s inspect output as that would've enabled us to debug the
above issue without holding nodes. We also update test jobs to trigger
when the collect-kubernetes-logs and collect-container-logs roles are
updated to ensure we get coverage from those jobs when updating these
roles.

Change-Id: I60022ec6468c2cadd723a71bbc583f20096b27dc
2024-09-17 15:04:05 -07:00
Sorin Sbarnea
7325aca987 More E208 (22)
Change-Id: I8cbb919c39bdb099eaec076c7bcf2ea0b84a6475
2020-11-09 14:40:00 +00:00
okozachenko
9baf749f6d Fix namespace speicification in collect-kubernetes-logs role
Change-Id: Icff4ac0d0c09b8c314bcd96289db4b1710e8ecb3
2020-06-16 04:17:39 +03:00
okozachenko
81b584d5a1 Add namespace in the collect-k8s-logs role
Specify namespace to collect logs, so no need to change the context

Change-Id: If26bb9aa517bbd6462fbb93eb6cca99929e7e6aa
2020-05-29 18:11:20 +03:00
Albin Vass
d0e2016592 Add loop var policy to ansible-lint
This adds a custom ansible-lint rule at .rules/ZuulJobsNamespaceLoopVar.py
that enforces the loop var policy described at:
https://zuul-ci.org/docs/zuul-jobs/policy.html#ansible-loops-in-roles

It also updates existing roles to follow the policy.

Change-Id: I92b2ff56a1c2702542fc07b316f1809087a4c92f
2020-04-29 17:20:59 +02:00
Albin Vass
605fb74921 k8-logs: use failed_when: instead of ignore_errors:
Change-Id: Ifd4652cdb198ac6cc40edb2254967d08104baa30
2020-04-27 20:51:41 +02:00
olesandr kozachenko
c20150566a add role for collecting the kubernetes pod&kubelet logs
Change-Id: I73a0cf471b9e7a8b924655e22e1f7dde069df5c7
2020-03-23 22:28:02 +02:00