Skip to content
Snippets Groups Projects
Commit 5c679189 authored by JonasS's avatar JonasS
Browse files

Merge branch 'release/v4'

parents c221c7d4 8a55793b
Branches
Tags 4.0.0
No related merge requests found
......@@ -91,8 +91,8 @@ $ docker-machine create \
## Options
- `--hetzner-api-token`: **required**. Your project-specific access token for the Hetzner Cloud API.
- `--hetzner-image`: The name (or ID) of the Hetzner Cloud image to use, see [Images API](https://docs.hetzner.cloud/#resources-images-get) for how to get a list (defaults to `ubuntu-18.04`).
- `--hetzner-image`: The architecture to use during image lookup, inferred from the server type if not explicitly given.
- `--hetzner-image`: The name (or ID) of the Hetzner Cloud image to use, see [Images API](https://docs.hetzner.cloud/#resources-images-get) for how to get a list (currently defaults to `ubuntu-20.04`). *Explicitly specifying an image is **strongly** recommended and will be **required from v6 onwards***.
- `--hetzner-image-arch`: The architecture to use during image lookup, inferred from the server type if not explicitly given.
- `--hetzner-image-id`: The id of the Hetzner cloud image (or snapshot) to use, see [Images API](https://docs.hetzner.cloud/#resources-images-get) for how to get a list (mutually excludes `--hetzner-image`).
- `--hetzner-server-type`: The type of the Hetzner Cloud server, see [Server Types API](https://docs.hetzner.cloud/#resources-server-types-get) for how to get a list (defaults to `cx11`).
- `--hetzner-server-location`: The location to create the server in, see [Locations API](https://docs.hetzner.cloud/#resources-locations-get) for how to get a list.
......@@ -125,6 +125,9 @@ When `--hetzner-image` is passed, lookup will happen either by name or by ID as
architecture, which is usually inferred from the server type. One may explicitly specify it using `--hetzner-image-arch` in which case the user
supplied value will take precedence.
While there is currently a default image as fallback, this behaviour will be removed in a future version. Explicitly specifying an operating system
image is strongly recommended for new deployments, and will be mandatory in upcoming versions.
#### Existing SSH keys
When you specify the `--hetzner-existing-key-path` option, the driver will attempt to copy `(specified file name)`
......@@ -143,9 +146,9 @@ was used during creation.
#### Environment variables and default values
| CLI option | Environment variable | Default |
|---------------------------------|-------------------------------| -------------------------- |
|---------------------------------|-------------------------------|----------------------------|
| **`--hetzner-api-token`** | `HETZNER_API_TOKEN` | |
| `--hetzner-image` | `HETZNER_IMAGE` | `ubuntu-18.04` |
| `--hetzner-image` | `HETZNER_IMAGE` | `ubuntu-20.04` as fallback |
| `--hetzner-image-arch` | `HETZNER_IMAGE_ARCH` | *(infer from server)* |
| `--hetzner-image-id` | `HETZNER_IMAGE_ID` | |
| `--hetzner-server-type` | `HETZNER_TYPE` | `cx11` |
......@@ -247,6 +250,7 @@ $ docker-machine create --driver hetzner
### 4.0.0
* **check log output for BREAKING-V5**
* `--hetzner-user-data-from-file` will be fully deprecated and its flag description will only read 'DEPRECATED, legacy'; current fallback behaviour will be retained. `--hetzner-flag-user-data-file` should be used instead.
* `--hetzner-disable-public-4`/`--hetzner-disable-public-6` will be fully deprecated and its flag description will only read 'DEPRECATED, legacy'; current fallback behaviour will be retained. `--hetzner-disable-public-ipv4`/`--hetzner-disable-public-ipv6` should be used instead.
......@@ -254,3 +258,8 @@ $ docker-machine create --driver hetzner
* `--hetzner-user-data-from-file` will be removed entirely, including its fallback behavior
* `--hetzner-disable-public-4`/`--hetzner-disable-public-6` ill be removed entirely, including their fallback behavior
* not specifying `--hetzner-image` will generate a warning stating 'use of default image is DEPRECATED'
### 6.0.0
* specifying `--hetzner-image` will be mandatory, and a default image will no longer be provided
......@@ -59,10 +59,11 @@ type Driver struct {
// internal housekeeping
version string
usesDfr bool
}
const (
defaultImage = "ubuntu-18.04"
defaultImage = "ubuntu-20.04"
defaultType = "cx11"
flagAPIToken = "hetzner-api-token"
......@@ -182,7 +183,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
mcnflag.BoolFlag{
EnvVar: "HETZNER_USER_DATA_FROM_FILE",
Name: legacyFlagUserDataFromFile,
Usage: "DEPRECATED, use --hetzner-user-data-file. Treat --hetzner-user-data argument as filename.",
Usage: "DEPRECATED, legacy.",
},
mcnflag.StringFlag{
EnvVar: "HETZNER_USER_DATA_FILE",
......@@ -215,7 +216,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
mcnflag.BoolFlag{
EnvVar: "HETZNER_DISABLE_PUBLIC_4",
Name: legacyFlagDisablePublic4,
Usage: "DEPRECATED, use --hetzner-disable-public-ipv4; disable public ipv4",
Usage: "DEPRECATED, legacy",
},
mcnflag.BoolFlag{
EnvVar: "HETZNER_DISABLE_PUBLIC_IPV6",
......@@ -225,7 +226,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
mcnflag.BoolFlag{
EnvVar: "HETZNER_DISABLE_PUBLIC_6",
Name: legacyFlagDisablePublic6,
Usage: "DEPRECATED, use --hetzner-disable-public-ipv6; disable public ipv6",
Usage: "DEPRECATED, legacy",
},
mcnflag.BoolFlag{
EnvVar: "HETZNER_DISABLE_PUBLIC",
......@@ -368,6 +369,13 @@ func (d *Driver) setConfigFromFlagsImpl(opts drivers.DriverOptions) error {
instrumented(d)
if d.usesDfr {
log.Warn("!!!! BREAKING-V5 !!!!")
log.Warn("your configuration uses deprecated flags and will stop working as-is from v5 onwards")
log.Warn("check preceding output for 'DEPRECATED' log statements")
log.Warn("!!!! /BREAKING-V5 !!!!")
}
return nil
}
......
......@@ -51,7 +51,8 @@ func (d *Driver) verifyNetworkFlags() error {
func (d *Driver) deprecatedBooleanFlag(opts drivers.DriverOptions, flag, deprecatedFlag string) bool {
if opts.Bool(deprecatedFlag) {
log.Warnf("--%v is deprecated, use --%v instead", deprecatedFlag, flag)
log.Warnf("--%v is DEPRECATED FOR REMOVAL, use --%v instead", deprecatedFlag, flag)
d.usesDfr = true
return true
}
return opts.Bool(flag)
......@@ -66,7 +67,8 @@ func (d *Driver) setUserDataFlags(opts drivers.DriverOptions) error {
return d.flagFailure("--%v and --%v are mutually exclusive", flagUserDataFile, legacyFlagUserDataFromFile)
}
log.Warnf("--%v is deprecated, pass '--%v \"%v\"'", legacyFlagUserDataFromFile, flagUserDataFile, userData)
log.Warnf("--%v is DEPRECATED FOR REMOVAL, pass '--%v \"%v\"'", legacyFlagUserDataFromFile, flagUserDataFile, userData)
d.usesDfr = true
d.userDataFile = userData
return nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment