projects
/
osm
/
docker-api-fe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c1ddc5
)
fix backwards compatibility by adding Forbidden error in kubernetes API call
author
Gabriel Cuba
<gcuba@whitestack.com>
Thu, 29 Jun 2023 08:20:20 +0000
(
03:20
-0500)
committer
Gabriel Cuba
<gcuba@whitestack.com>
Thu, 29 Jun 2023 08:20:20 +0000
(
03:20
-0500)
osm_ee/util/util_kubernetes.py
patch
|
blob
|
history
diff --git
a/osm_ee/util/util_kubernetes.py
b/osm_ee/util/util_kubernetes.py
index
d4594d9
..
a02334e
100644
(file)
--- a/
osm_ee/util/util_kubernetes.py
+++ b/
osm_ee/util/util_kubernetes.py
@@
-16,7
+16,8
@@
def get_secret_data(name) -> dict:
try:
secret = v1.read_namespaced_secret(name, current_namespace)
except ApiException as e:
- if e.reason == 'Not Found': # Backwards compatibility: we run in k8s but certs don't exist
+ if e.reason in ("Not Found", "Forbidden"):
+ # Backwards compatibility: we run in k8s but certs don't exist, or we are running in a different namespace
return {}
else:
raise