@@ -242,6 +242,7 @@ def crdExists(dynClient: DynamicClient, crdName: str) -> bool:
242242 logger .debug (f"CRD does not exist: { crdName } " )
243243 return False
244244
245+
245246def getCR (dynClient : DynamicClient , cr_api_version : str , cr_kind : str , cr_name : str , namespace : str = None ) -> dict :
246247 """
247248 Get a Custom Resource
@@ -259,6 +260,7 @@ def getCR(dynClient: DynamicClient, cr_api_version: str, cr_kind: str, cr_name:
259260
260261 return {}
261262
263+
262264def getSecret (dynClient : DynamicClient , namespace : str , secret_name : str ) -> dict :
263265 """
264266 Get a Secret
@@ -272,6 +274,7 @@ def getSecret(dynClient: DynamicClient, namespace: str, secret_name: str) -> dic
272274 logger .debug (f"Secret { secret_name } does not exist in namespace { namespace } " )
273275 return {}
274276
277+
275278def apply_resource (dynClient : DynamicClient , resource_yaml : str , namespace : str ):
276279 """
277280 Apply a Kubernetes resource from its YAML definition.
@@ -296,6 +299,7 @@ def apply_resource(dynClient: DynamicClient, resource_yaml: str, namespace: str)
296299 logger .debug (f"Creating new { kind } '{ name } ' in namespace '{ namespace } '" )
297300 resource .create (body = resource_dict , namespace = namespace )
298301
302+
299303def listInstances (dynClient : DynamicClient , apiVersion : str , kind : str ) -> list :
300304 """
301305 Get a list of instances of a particular CR on the cluster
0 commit comments