Skip to content

Auto DevOps is generating domain names that are too long

According to https://tools.ietf.org/html/rfc1035

Labels must be 63 characters or less.

Where a label is defined as any section of the domain name between .. Occasionally our Auto DevOps pipeline will generate a domain name that exceeds this limit and this can sometimes fail to resolve DNS.

Also I've found that Let's encrypt will also fail for long domains with:

error getting certificate from acme server: acme: urn:ietf:params:acme:error:malformed: Error finalizing order :: CN was longer than 64 bytes

So this will cause problems when we implement cert-manager.

I think for production our $CI_PROJECT_PATH_SLUG will ensure that our domain name does not exceed 63 characters but review apps use $CI_PROJECT_PATH_SLUG-$CI_ENVIRONMENT_SLUG as the subdomain which I believe can exceed this limit. In other testing I did notice that even on production apps I was running into the Let's Encrypt limit which seems to enforce that the entire domain name cannot exceed 64 characters even if an individual section does not exceed 64 characters.

Edited by Dylan Griffith