Skip to content

kupe_registry

Manage your tenant’s private registry. A tenant has one registry, named registry.

resource "kupe_registry" "this" {
storage_limit = "20Gi"
}
output "registry_endpoint" {
description = "Image path prefix, e.g. registry.kupe.cloud/acme."
value = kupe_registry.this.endpoint
}

Its cluster connections and access tokens are deleted with it. A stray terraform destroy is refused by the Kupe platform while deletion_protection is true, and the registry stays in state. To delete it, set deletion_protection = false, run terraform apply, then destroy it.

storage_limit caps what the registry stores below the most your plan allows. Leave it out to use the plan’s limit; storage_limit_bytes shows the limit in force. Lowering it below what the registry already stores is accepted: pushes are refused until images are deleted or the limit is raised.

  • kupe_registry_binding lets every pod of a cluster pull from the registry, and gives chosen namespaces a push credential.
  • kupe_registry_token is an access token for CI and anything else that signs in with docker login.
  • deletion_protection (Boolean) While true, the Kupe platform refuses to delete the registry. Set it to false and apply before destroying. Default true, also for an existing registry: importing an unprotected registry without this attribute in configuration plans turning protection on.
  • name (String) Registry name. A tenant has one registry, named registry: this is the default and the only value accepted.
  • storage_limit (String) Most the registry may store, with a binary unit (Mi, Gi or Ti), e.g. 10Gi. It can only be set at or below the most your plan allows. When unset, the plan’s limit applies. Changes in place; lowering it below what the registry stores is accepted, and pushes are then refused until images are deleted.
  • timeouts (Attributes) (see below for nested schema)
  • created_at (String) Timestamp when the registry was created.
  • endpoint (String) Image path prefix to push to and pull from, e.g. registry.kupe.cloud/acme. Empty until the registry is provisioned.
  • etag (String) Resource version used for optimistic locking during updates.
  • phase (String) Current phase: Pending, Provisioning, Running, Degraded or Terminating.
  • repository_count (Number) Number of repositories in the registry.
  • storage_limit_bytes (Number) The storage limit in force, in bytes: storage_limit when set, else the plan’s. -1 means unlimited. Null until the platform has applied a limit.
  • storage_used_bytes (Number) What the registry stores, in bytes, as last measured by the platform.

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).

Import is supported using the following syntax:

Terminal window
terraform import kupe_registry.this registry