Automatic merge from submit-queue.
Improving UX for placeholder IP Address
Before the `kops validate cluster` attempts to connect to the K8s API
endpoint, the code now checks to see if the API DNS Entry is the kops
placeholder IP Address 203.0.113.123. It prints a message to the user
and err's. There is a new init func in validate cluster that disables
CGO based DNS for Darwin OS. Darwin does two things with kops
validates; it caches the IP address, and it does not return the
placeholder IP address. We cannot use CGO base DNS with kops validate with OSX.
Before the `kops validate cluster` attempts to connect to the K8s API
endpoint, the code now checks to see if the API DNS Entry is the kops
placeholder IP Address 203.0.113.123. It prints a message to the user
and err's. There is a new init func in validate cluster that disables
CGO based DNS for Darwin OS. Darwin does two things with kops
validates; it caches the IP address, and it does not return the
placeholder IP address. We cannot use CGO base DNS with kops validate.
Automatic merge from submit-queue.
Add edit flag so create instancegroup command is usable on scripts
Until now, the opening of an interactive editor when creating a new instance group was mandatory.
This this commit, a new flag is added, so this is now optional.
This commit is backwards compatible.
Automatic merge from submit-queue.
Add a default NodeLabel with the InstanceGroup name
As requested in https://github.com/kubernetes/kops/issues/2999, this change just auto-populates new InstanceGroup specs with a default node label containing the name of the instance group. It would be really useful for those of us managing environments with multiple instance groups.
It allows an admin to easily view the instance groups using kubectl:
```
kubectl get nodes --label-columns kops.k8s.io/instancegroup
NAME STATUS AGE VERSION INSTANCEGROUP
ip-172-20-108-120.eu-west-1.compute.internal Ready,node 3m v1.7.4 xtra-large
ip-172-20-117-133.eu-west-1.compute.internal Ready,master 14m v1.7.4 master-eu-west-1c
ip-172-20-32-139.eu-west-1.compute.internal Ready,master 14m v1.7.4 master-eu-west-1a
ip-172-20-32-92.eu-west-1.compute.internal Ready,node 12m v1.7.4 nodes
ip-172-20-67-184.eu-west-1.compute.internal Ready,master 13m v1.7.4 master-eu-west-1b
```
Automatic merge from submit-queue.
Template Fixes
- fixing an issue in the way it handled inline yaml documents
- cleaning it up somewhat, the prior version was a little cryptic to read; it's easier to just split into docs, format if required and rejoin at the end.
Apologizes @justinsb ... the prior PR didn't handle YAML separators correctly; I've find it somewhat simpler by a split and join rather than using indexes and such
- fixing an issue in the way it handled inline yaml documents
- cleaning it up somewhat, the prior version was a little cryptic to read; it's easier to just split into docs, format and rejoin at the end
Automatic merge from submit-queue.
GCE Dump: Include instance IPs
The challenge here is that we normally only get the instance url. So we
have to do another call to GCE, but we also don't want to do one call per
instance.
Instead, we create a dump operation context object which we pass into the
dump.
Adding an extra option to the toolbox templating to format the YAML before writing out; which is usefull to cleanup formating issues and as detecting errors in the template
- added a formating options --format-yaml to the toolbox template which cleans up the yaml before writing out
- updated the cli documentation
- added the --config-value used to grab the configuration
The challenge here is that we normally only get the instance url. So we
have to do another call to GCE, but we also don't want to do one call
per instance.
Instead, we create a dump operation context object which we pass into the dump.
Automatic merge from submit-queue.
GCS: Use ACLs for GCE permissions
This needs less permissions, but also allows for more granular control over
access to files than whole-bucket permissions that IAM gives us.
This lets us configure cross-project permissions while ourselves needing
minimal permissions, but also gives us a nice hook for future lockdown
of object-level permissions.
Automatic merge from submit-queue.
Implement DigitalOcean Droplet FI Task
Implements cloudup fi tasks for DigitalOcean droplets. It makes a few assumptions to reduce the size of this PR, those will be addressed in future PRs.
Also does some cleanup in the DigitalOcean `dns` package.
The current implementation fails on template which reference unset variables, it is however useful at times to permit overriding this behavior and using sprig default() for example methods to handle it
- added a new command line option --fail-on-missing (defaults to true, so keeps the current behaviour)
- updated the unit test to reflect the changes
- updated the cli docs