Skip to content

Domain Name Configuration

When user declares they want to use a domain name associated with the deployment, we treat it as an identifier of the stack. This makes it easier to manage multiple deployments from the same working directory.

Configuration

Domain name defined on a stack level. It can be configured in two ways: 1. Well known parameters 2. Well known environment variable s(overrides the parameter name)

Table below lists all the parameters and environment variables that can be used to configure domain name.

Parameter Environment Variable Description
dns.domain HUB_DOMAIN_NAME Domain name of the stack.
dns.name HUB_STACK_NAME Name of the stack. Prefix part of dns.domain
dns.baseDomain N/A Base domain name of the stack. Suffix part of dns.domain

Autogenerated Domain Name

Name associated with the deployment (both fixed and autogenerated) has been defined when the stack has been initialized withhubctl stack init.

When user will run the hubctl stack configure command, then the name will be propagated to the DNS configuration. Following extensions support this operations

  • aws - This extension will register Route53 hosted zone
  • gcp - This extension will register Cloud DNS managed zone
  • azure - This extension will register Azure DNS zone

Let us now if you need more by raising and up-voting issue in https://github.com/epam/hub-extensions/issues

Example

Fixed Domain Name

User defines a domain name as example.com. This stack can use one and only one domain name

parameters:
- name: dns.domain
  value: example.com

Autogenerated Domain Name

User declares dns.domain parameter must be sources from HUB_DOMAIN_NAME environment variable. In this case hubctl will supply autogenerated domain name.

parameters:
- name: dns.domain
  fromEnv: HUB_DOMAIN_NAME

No Domain Name

In this case just skip declaration of dns.domain parameter. Hub will use a random name as the deployment

User can map capture the autogenerated name associated with the deployment by sourcing parameter value from environment variable HUB_STACK_NAME

parameters:
- name: dns.name
  fromEnv: HUB_STACK_NAME

or fixed name

parameters:
- name: dns.name
  value: foo-bar

Note: As a technical detail we will still generate HUB_DOMAIN_NAME variable equal to HUB_STACK_NAME. This will keep some compatibility with the components that expects this variable to be defined.


Last update: May 2, 2023