Constants

Constants for the infrastructure app.

smarter.apps.infrastructure.const.BILLABLE_KUBERNETES_KINDS = ('persistentvolumeclaim',)

Kubernetes kinds that provision a billable cloud resource of their own, e.g. a block storage volume.

A Service of type LoadBalancer, which provisions a cloud load balancer, and a StatefulSet with volumeClaimTemplates, which provisions volumes, are billable too. See smarter.apps.infrastructure.services.kubernetes.billable_resources().

('persistentvolumeclaim', )
class smarter.apps.infrastructure.const.CertificateStatus(*values)[source]

Bases: str, SmarterEnumAbstract

The status of a TLS certificate, in any provider’s certificate service.

The names are those of AWS Certificate Manager, which other providers map to.

EXPIRED = 'EXPIRED'
FAILED = 'FAILED'
INACTIVE = 'INACTIVE'
ISSUED = 'ISSUED'
PENDING_VALIDATION = 'PENDING_VALIDATION'
REVOKED = 'REVOKED'
VALIDATION_TIMED_OUT = 'VALIDATION_TIMED_OUT'
class smarter.apps.infrastructure.const.CloudProviders(*values)[source]

Bases: str, SmarterEnumAbstract

The cloud providers that Smarter’s infrastructure services can run on.

smarter_settings.cloud_provider selects one. Only AWS is implemented: the others are reserved, so that a new provider is a new package in smarter.apps.infrastructure.providers, registered with register_provider(), rather than a change to the platform.

AWS = 'aws'
AZURE = 'azure'
DIGITALOCEAN = 'digitalocean'
GCP = 'gcp'
MEMORY = 'memory'

An in-memory provider, for tests and local development without a cloud account.

smarter.apps.infrastructure.const.DEFAULT_DNS_RECORD_TTL = 600

Seconds.

class smarter.apps.infrastructure.const.InfrastructureServiceNames(*values)[source]

Bases: str, SmarterEnumAbstract

The names of the infrastructure services, as they appear in signals and logs.

CERTIFICATES = 'certificates'
DNS = 'dns'
EMAIL = 'email'
KUBERNETES = 'kubernetes'
PROVIDER = 'provider'