Expose Kubernetes ApiextensionsV1Api
This commit exposes the Kubernetes API extensions in order to allow StarlingX Applications to manage CRDs using API calls. Test Plan: PASS: AIO-SX host-lock and host-unlock run successfully. PASS: Exposed resources have been called from an Application and run accordingly. Story: 2011069 Task: 49756 Change-Id: I7d04d3e779dae9ebf95403c8afb93fe6d048993b Signed-off-by: Guilherme Santos <guilherme.santos@windriver.com>
This commit is contained in:
parent
2a072b65c5
commit
9a564e455e
|
@ -381,6 +381,7 @@ class KubeOperator(object):
|
|||
self._kube_client_custom_objects = None
|
||||
self._kube_client_admission_registration = None
|
||||
self._kube_client_rbac_authorization = None
|
||||
self._kube_client_extensions = None
|
||||
|
||||
def _load_kube_config(self):
|
||||
if not is_k8s_configured():
|
||||
|
@ -435,6 +436,12 @@ class KubeOperator(object):
|
|||
self._kube_client_rbac_authorization = client.RbacAuthorizationV1Api()
|
||||
return self._kube_client_rbac_authorization
|
||||
|
||||
def _get_kubernetesclient_extensions(self):
|
||||
if not self._kube_client_extensions:
|
||||
self._load_kube_config()
|
||||
self._kube_client_extensions = client.ApiextensionsV1Api()
|
||||
return self._kube_client_extensions
|
||||
|
||||
def _retry_on_urllibs3_MaxRetryError(ex): # pylint: disable=no-self-argument
|
||||
if isinstance(ex, MaxRetryError):
|
||||
LOG.warn('Retrying against MaxRetryError: {}'.format(ex))
|
||||
|
|
Loading…
Reference in New Issue