Update from master
Squashed commit of the following:
commit fb79786bd154505ea9c7578e6247dea565ea9c41
Author: Mark Beierl <mark.beierl@canonical.com>
Date: Thu May 18 22:21:06 2023 -0400
Wrapping Retry for Py3.10
The retrying_async library is not Python 3.10 ready, so we are providing
a 3.10 compatible callback for it to use instead of the default one
Change-Id: I15e9b64c70d4d294c9ff0c6c7048cd257f6e1b61
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
commit 714d8874783b507cd66a37d1dcd2f1d3ac980257
Author: Mark Beierl <mark.beierl@canonical.com>
Date: Thu May 18 15:08:06 2023 -0400
Wrapping Retry for Py3.10
The retrying_async library is not Python 3.10 ready, so we are providing
a 3.10 compatible callback for it to use instead of the default one
Change-Id: I6e98f6d7ebc2fe134b0e3fe37d180e383044b30b
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
commit 2c3c146360fe5ce949a81e0e55e0e62e7f805d0b
Author: Mark Beierl <mark.beierl@canonical.com>
Date: Mon May 15 16:17:02 2023 -0400
Python3.10/Ubuntu 22.04 part 2
Removal of loop from all methods
Change-Id: I05bfe90f82b8c8acba3172de89c7d8e0ee08402b
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
commit fcbd881700fec0522c81e8b32e3a982fb3ccbd80
Author: Gabriel Cuba <gcuba@whitestack.com>
Date: Thu May 11 02:04:17 2023 -0500
Remove charset-normalizer version constraint
Change-Id: I46311f74e949270278f685c50576f5884ba96227
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
commit 474fd958ac88b5d2275d3acbc2fabe22e5e9344f
Author: Guillermo Calvino <guillermo.calvino@canonical.com>
Date: Fri Apr 28 11:51:43 2023 +0200
Ubuntu 22.04 and Python 3.10 preparation
Change-Id: I57a4ee39c101bdab610a6964de58eaa2653d37a3
Signed-off-by: Guillermo Calvino <guillermo.calvino@canonical.com>
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
commit 806cd5cf9456e69a849f4231e163da4f72379c1b
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Fri Mar 24 14:03:17 2023 +0100
Fix black errors
Change-Id: I58c380853485995e2c37163a958b06072cbe24ca
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
(cherry picked from commit 9831d7e8205bce462a669a8cc2b3dc1a611c924c)
Change-Id: I0c9356df8f245b68f72f4d64ba90c9811f2e5ec7
Signed-off-by: Dario Faccin <dario.faccin@canonical.com>
diff --git a/n2vc/kubectl.py b/n2vc/kubectl.py
index d6ca09a..3fe6b53 100644
--- a/n2vc/kubectl.py
+++ b/n2vc/kubectl.py
@@ -35,6 +35,7 @@
V1SecretReference,
)
from kubernetes.client.rest import ApiException
+from n2vc.libjuju import retry_callback
from retrying_async import retry
@@ -319,6 +320,7 @@
attempts=10,
delay=1,
fallback=Exception("Failed getting the secret from service account"),
+ callback=retry_callback,
)
async def get_secret_data(
self, name: str, namespace: str = "kube-system"