Kubernetes sets ATLANTIS_PORT to a tcp://... address which Atlantis then
tries to parse so we need to set it ourselves.
Also add "v" to the version to make it obvious that the Docker images
all start with v.
Since the manifests need to be edited before they're applied to the
cluster I thought it best to list them in the README rather than as
files so it's more obvious that you can't just kubectl apply them.
I also removed the dns-ssl manifest because it was using
tazjin/kubernetes-letsencrypt which is no longer maintained and because
there are so many ways to do SSL and routing within Kubernetes that I
don't have a specific recommendation.
We use a config file so we can set ngrok's API port (web_addr). We use
the API to get the public URL and if there's already ngrok running, it
will just choose a random API port and we won't be able to get the right
url.
- This will make the help output easier to read. To accomplish this, we
needed to not set defaults via cobra because then the default would be
printed on another line which looks bad. So now we set the defaults
ourselves.
- Also had to update spf13/pflag to the version that supports newlines
in flag descriptions.
- run terraform with TF_PLUGIN_CACHE_DIR set so that terraform init will
be faster.
- check which workspace we're in and don't switch unless we need to.
- run terraform with TF_IN_AUTOMATION set so the plan output doesn't
have instructions that don't make sense. Ex.
```
This plan was saved to: /tmp/atlantis/data/repos/lkysow/atlantis-example/3/default/default.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "/tmp/atlantis/data/repos/lkysow/atlantis-example/3/default/default.tfplan"
```
- added tests
- moved AutomaticEnv() call into the init() function of the server flag
so it's set when we run the tests. Before it was in main().
- Set SetTypeByDefaultValue to true so boolean flags can be specified as
env vars.
Saw in the TF code how they were validating workspace names
and decided to do the same. '..' is actually a valid TF workspace but we
don't support that.