Fix get_secret utils func to filter for a specific namespace
Change-Id: I7242f0a2d617ebe38b9b46acb69726d7f708046e
This commit is contained in:
@@ -34,6 +34,7 @@ class KubernetesObjectTestCase(testtools.TestCase):
|
||||
SAMPLES_PATH = 'config/samples'
|
||||
SAMPLE_FILE = ''
|
||||
TEMPLATE_FILE = ''
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
sample_path = "%s/%s" % (cls.SAMPLES_PATH, cls.SAMPLE_FILE)
|
||||
|
||||
@@ -182,8 +182,8 @@ def get_secret(namespace, name):
|
||||
"""
|
||||
|
||||
api = pykube.HTTPClient(pykube.KubeConfig.from_env())
|
||||
secret = objects.Secret.objects(api).get(
|
||||
namespace=namespace,
|
||||
|
||||
secret = objects.Secret.objects(api).filter(namespace=namespace).get(
|
||||
name=name
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user