Closed jwreagor closed 7 years ago
/cc @jen20 @sean-
Actually, realized I forgot to commit tests. Probably should flesh those out.
This should be at least good to test and review. I'm looking at the hash comparison again but feeling confident its doing the job ATM.
Close this PR once #17 has been merged. #17 includes both CNS and Metadata features.
Subsumed into #17.
Ref: #8 #4 and #3
This implements the CNS stanza outlined in #8(comment). This touches both
tags
as well as movingcns
related configuration into its own block.Things to note:
services
argument.disable
feature. Ifdisable
is true, than all CNS related configuration is ignored and DNS names are cleared from the resource’s state (more on this below).disable
feature only works on update, it is hard set to false during provisioning.tags
handling.Domain Names
It’s worth talking about how CNS domain names converge….
The process for waiting on domain name convergence is rather naive and simply checks for domain names that include each service name as the first part of the domain name, (
frontend
->frontend.svc.<uuid>.us-west-1.triton.zone
). We only check the first part of the DNS record (frontend.
) and only look for a single domain match (because CNS works for both private, public, and either/or). From all of my tests, this convergence feature has been working really well and takes about 20 seconds. There is no timeout.Please make sure when testing that you are looking at both CNS tags as well as domain names stored in the state file. I kept a list of various combinations of state that I found while buckling down the hatches of CNS.
Finally
I'd like to handle the final merge alongside #14 since those will affect each other. I could open a PR with both included together if that makes it easier to merge into master.