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:
prevent a class from accessing an educational hub while investigations around cheating are ongoing
make the hub undiscoverable by crypto-miners
How-to guide¶
Create a new file with the path
config/clusters/$CLUSTER_NAME/<hub_name>.domain_override.secret.yamlwhere<hub_name>is the name of the hub we are targeting, and$CLUSTER_NAMEis the name of the cluster upon which the hub is running.Add the new domain to the new domain override file like so:
domain: ENTER_NEW_DOMAIN_HERE(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.yamlThe file can now be safely committed to the repository.
Update the
cluster.yamlfile to list the domain override file.hubs: ... - name: <hub-name> domain: original.domain.2i2c.cloud domain_override_file: enc-<hub-name>.domain-override.secret.yamlRun the deployer for the hub!
deployer deploy $CLUSTER_NAME $HUB_NAME