Update README.md (#156)

This commit is contained in:
Chris O'Haver 2019-04-24 12:25:43 -04:00 committed by GitHub
parent aad513584d
commit 4dc43f42c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,74 +1,41 @@
## Corefile-tool ## Corefile-tool
Corefile-tool is a simple command line tool which helps you to evaluate and migrate your CoreDNS Corefile Configuration. Corefile-tool is a command line tool which helps you to evaluate and migrate your CoreDNS Corefile Configuration.
It is based on the [CoreDNS migration tool library](https://github.com/coredns/deployment/tree/master/kubernetes/migration). It uses the [CoreDNS migration tool library](https://github.com/coredns/deployment/tree/master/kubernetes/migration).
## Usage ## Usage
Use the following syntax to run the `corefile-tool` command: Use the following syntax to run the `corefile-tool` command:
`corefile-tool [command] [flags]` ```
Usage:
where `command`, `flags` are: corefile-tool default --corefile <path> [--k8sversion <k8s-ver>]
corefile-tool deprecated --from <coredns-ver> --to <coredns-ver> --corefile <path>
- `command`: The operation you want to perform. corefile-tool migrate --from <coredns-ver> --to <coredns-ver> --corefile <path> [--deprecations <true|false>]
- `flags` : Specifies flags required to carry out the operations. corefile-tool released --dockerImageId <id>
corefile-tool removed --from <coredns-ver> --to <coredns-ver> --corefile <path>
corefile-tool unsupported --from <coredns-ver> --to <coredns-ver> --corefile <path>
corefile-tool validversions
```
### Operations ### Operations
The following commands are supported: The following operations are supported:
- `default`: Default returns true if the Corefile is the default for a that version of Kubernetes. - `default`: returns true if the Corefile is the default for the given version of Kubernetes. If `--k8sversion` is not specified, then this will return true if the Corefile is the default for any version of Kubernetes supported by the tool.
If the Kubernetes version is omitted, returns true if the Corefile is the default for any version.
The following flags are accepted by the `default` command: - `deprecated`: returns a list of plugins/options in the Corefile that have been deprecated.
- `k8sversion`: The Kubernetes version for which you are checking the default.
If the Kubernetes version is omitted, returns true if the Corefile is the default for any version.
- `corefile` : The path where your Corefile is located. This flag is mandatory.
- `deprecated` : Deprecated returns a list of deprecated plugins or directives present in the Corefile. - `migrate`: updates your CoreDNS corefile to be compatible with the `-to` version. Setting the `--deprecations` flag to `true` will migrate plugins/options as soon as they are announced as deprecated. Setting the `--deprecations` flag to `false` will migrate plugins/options only once they are removed (or made a no-op). The default is `false`.
The following flags are accepted and mandatory for the `deprecated` command:
- `from`: The CoreDNS version you are migrating from.
- `to` : The CoreDNS version you are migrating to.
- `corefile` : The path where your Corefile is located.
- `migrate` : Migrate your CoreDNS corefile.
The following flags are accepted and mandatory for the `migrate` command: - `released`: determines if the `--dockerImageID` was an official CoreDNS release or not. Only official releases of CoreDNS are supported by the tool.
- `from` : The CoreDNS version you are migrating from.
- `to` : The CoreDNS version you are migrating to. This flag is mandatory.
- `corefile` : The path where your Corefile is located. This flag is mandatory.
- `deprecations`: Specify whether you want to migrate all the deprecations that are present in the current Corefile.
Specifying `false` will result in the `migrate` command not migrating the deprecated plugins present in the Corefile.
- `released` : Released determines whether your Docker Image ID of a CoreDNS release is valid or not.
The following flags are accepted and mandatory for the `released` command: - `removed`: returns a list plugins/options in the Corefile that have been removed from CoreDNS.
- `dockerImageID` : The docker image ID you want to check.
- `removed` : Removed returns a list of removed plugins or directives present in the Corefile.
The following flags are accepted and mandatory for the `removed` command: - `unsupported`: returns a list of plugins/options in the Corefile that are not supported by the migration tool (but may still be valid in CoreDNS).
- `from` : The CoreDNS version you are migrating from.
- `to` : The CoreDNS version you are migrating to. This flag is mandatory.
- `corefile` : The path where your Corefile is located. This flag is mandatory.
- `unsupported` : Unsupported returns a list of plugins that are not recognized/supported by the migration tool (but may still be valid in CoreDNS).
The following flags are accepted and mandatory for the `unsupported` command: - `validversions`: Shows the list of CoreDNS versions supported by the this tool.
- `from` : The CoreDNS version you are migrating from.
- `to` : The CoreDNS version you are migrating to. This flag is mandatory.
- `corefile` : The path where your Corefile is located. This flag is mandatory.
- `validversions` : Shows valid versions of CoreDNS.
### Examples ### Examples