FSAdminManager#

class controller.services.fsadmin.FSAdminManager(*, config, fsadmin_builder, fsadmin_storage, slack_client, logger)#

Bases: object

Manage filesystem admin environment.

This class is a process-wide singleton that manages the fsadmin environment.

Parameters:
  • config (FSAdminConfig) – Configuration for fsadmin environment.

  • fsadmin_builder (FSAdminBuilder) – Builder that constructs fsadmin Kubernetes objects.

  • fileserver_storage – Kubernetes storage layer for fsadmin.

  • slack_client (SlackWebhookClient | None) – Optional Slack webhook client for alerts.

  • logger (BoundLogger) – Logger to use.

  • fsadmin_storage (FSAdminStorage)

Methods Summary

create()

Ensure the fsadmin environment exists.

delete()

Delete the fsadmin environment.

get_status()

Return the status for the fsadmin container, if it exists and is healthy.

Methods Documentation

async create()#

Ensure the fsadmin environment exists.

If we don’t have a filesystem admin environment, create it. If we do, just return. This gets called by the handler when someone POSTs to the /fsadmin/v1/service ingress.

Returns:

Status for the created pod.

Return type:

FSAdminStatus

Raises:
async delete()#

Delete the fsadmin environment. This gets called by the handler when someone sends a DELETE to the /fsadmin/v1/service ingress.

Raises:
Return type:

None

async get_status()#

Return the status for the fsadmin container, if it exists and is healthy. If it does not exist, or is not ready to accept work, raise an exception.

This gets called by the handler when someone issues a GET against the /fsadmin/v1/service ingress.

Raises:
Return type:

FSAdminStatus