KubernetesIngressStorage¶
- class gafaelfawr.storage.kubernetes.KubernetesIngressStorage(api_client, logger)¶
Bases:
object
Kubernetes storage layer for ingress objects.
This abstracts creation of
Ingress
resources based on configuration and templates inGafaelfawrIngress
resources by wrapping the underlying Kubernetes Python client.- Parameters:
api_client (
ApiClient
) – Kubernetes async client to use.logger (
BoundLogger
) – Logger to use.
Notes
Unlike
KubernetesTokenStorage
, this storage layer is very lightweight, since the API is defined in terms of Kubernetes API objects (there was no compelling reason to create parallel models) and the service is responsible for assembling those objects based on the template inGafaelfawrIngress
.Methods Summary
create_ingress
(ingress, parent)Create a Kubernetes
Ingress
resource.get_ingress
(name, namespace)Retrieve a Kubernetes
Ingress
resource.replace_ingress
(ingress, parent)Replace a Kubernetes
Ingress
resource.Methods Documentation
- async create_ingress(ingress, parent)¶
Create a Kubernetes
Ingress
resource.- Parameters:
ingress (
V1Ingress
) – TheIngress
object to create. This will be modified in place to add owner metadata.parent (
GafaelfawrIngress
) – The parent object for the ingress
- Returns:
Status information to store in the parent object.
- Return type:
- async get_ingress(name, namespace)¶
Retrieve a Kubernetes
Ingress
resource.
- async replace_ingress(ingress, parent)¶
Replace a Kubernetes
Ingress
resource.- Parameters:
ingress (
V1Ingress
) – TheIngress
object to replace. This will be modified in place to add owner metadata.parent (
GafaelfawrIngress
) – The parent object for the ingress
- Returns:
Status information to store in the parent object.
- Return type: