KubernetesIngressStorage#
- class gafaelfawr.storage.kubernetes.KubernetesIngressStorage(api_client, logger)#
Bases:
objectKubernetes storage layer for ingress objects.
This abstracts creation of
Ingressresources based on configuration and templates inGafaelfawrIngressresources 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
Ingressresource.get_ingress(name, namespace)Retrieve a Kubernetes
Ingressresource.replace_ingress(ingress, parent)Replace a Kubernetes
Ingressresource.Methods Documentation
- async create_ingress(ingress, parent)#
Create a Kubernetes
Ingressresource.- Parameters:
ingress (
V1Ingress) – TheIngressobject 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
Ingressresource.
- async replace_ingress(ingress, parent)#
Replace a Kubernetes
Ingressresource.- Parameters:
ingress (
V1Ingress) – TheIngressobject 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: