Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Override a hub’s domain name

This guide aims provides an overview of how to override the domain name of a hub and why you may want to do this.

Motivation

In the past, the engineering team have been asked to provide a temporary, alternative domain name for a hub to make it undiscoverable. This could be for reasons such as:

How-to guide

  1. Create a new file with the path config/clusters/$CLUSTER_NAME/<hub_name>.domain_override.secret.yaml where <hub_name> is the name of the hub we are targeting, and $CLUSTER_NAME is the name of the cluster upon which the hub is running.

  2. Add the new domain to the new domain override file like so:

    domain: ENTER_NEW_DOMAIN_HERE
  3. (Optional) Encrypt the file with sops.

    export CLUSTER_NAME=<cluster-name>
    export HUB_NAME=<hub-name>
    sops --output config/clusters/$CLUSTER_NAME/enc-$HUB_NAME.domain_override.secret.yaml --encrypt config/clusters/$CLUSTER_NAME/$HUB_NAME.domain_override.secret.yaml

    The file can now be safely committed to the repository.

  4. Update the cluster.yaml file to list the domain override file.

    hubs:
      ...
      - name: <hub-name>
        domain: original.domain.2i2c.cloud
        domain_override_file: enc-<hub-name>.domain-override.secret.yaml
  5. Run the deployer for the hub!

    deployer deploy $CLUSTER_NAME $HUB_NAME