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,SmarterEnumAbstractThe 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,SmarterEnumAbstractThe cloud providers that Smarter’s infrastructure services can run on.
smarter_settings.cloud_providerselects one. Only AWS is implemented: the others are reserved, so that a new provider is a new package insmarter.apps.infrastructure.providers, registered withregister_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,SmarterEnumAbstractThe names of the infrastructure services, as they appear in signals and logs.
- CERTIFICATES = 'certificates'
- DNS = 'dns'
- EMAIL = 'email'
- KUBERNETES = 'kubernetes'
- LOGS = 'logs'
- PROVIDER = 'provider'
- SLACK = 'slack'
- STORAGE = 'storage'
- class smarter.apps.infrastructure.const.KubernetesResourceTypes(*values)[source]
Bases:
str,SmarterEnumAbstractThe resource types of the Kubernetes cluster that the inventory discovers.
See
smarter.apps.infrastructure.services.inventory. The cluster, its add-ons and its node groups are the cloud provider’s, and the others are the cluster’s own. Besides the cluster, its add-ons, node groups and nodes, only the resources of the environment’s namespace,smarter_settings.environment_namespace, are discovered.- ADDON = 'kubernetes.addon'
A managed add-on of the cluster, e.g. the VPC CNI, CoreDNS, or the EBS CSI driver.
- CERTIFICATE = 'kubernetes.certificate'
A cert-manager Certificate, i.e. an ssl/tls certificate, of the environment’s namespace.
- CLUSTER = 'kubernetes.cluster'
The managed Kubernetes cluster, e.g. AWS EKS, which is billed by the hour.
- INGRESS = 'kubernetes.ingress'
An Ingress of the environment’s namespace.
- LOAD_BALANCER = 'kubernetes.loadbalancer'
A Service of type LoadBalancer of the environment’s namespace, which provisions a cloud load balancer.
- NODE = 'kubernetes.node'
A compute node, e.g. an EC2 instance.
- NODEGROUP = 'kubernetes.nodegroup'
A managed group of identical nodes.
Its nodes are billed, not the group.
- PERSISTENT_VOLUME = 'kubernetes.persistentvolume'
A block storage volume, e.g. an EBS volume, bound to a claim in the environment’s namespace.