Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding CLI for the migration tool #154

Merged
merged 5 commits into from
Apr 24, 2019
Merged

Conversation

rajansandeep
Copy link
Member

Adds the CLI as defined here

Adds support to basic commands such as migrate, deprecated, default, removed, unsupported and vaildversions

@rajansandeep
Copy link
Member Author

/cc @chrisohaver @fturib

Copy link
Contributor

@fturib fturib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for moving to function instead of global vars.
Please see my other comments.

}

// defaultCorefileFromPath takes the path where the Corefile is located and checks
// if the Corefile is the default for a that version of Kubernetes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo with "for a"

// defaultCorefileFromPath takes the path where the Corefile is located and checks
// if the Corefile is the default for a that version of Kubernetes.
func defaultCorefileFromPath(k8sVersion, corefilePath string) (bool, error) {
if _, err := os.Stat(corefilePath); os.IsNotExist(err) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all the lines from #43 to #51 are the same for all function "FromPath: ...
Can you just build a small utility function "getCorefileFrompath(path string)(string error) ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Short: "A brief description of your application",
Long: dedent.Dedent(`

┌──────────────────────────────────────────────────────────┐
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good !

Copy link
Member

@chrisohaver chrisohaver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readme I think is missing some information.


where `command`, `flags` are:

- `command`: The operation you want to perform.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to define what the valid commands are. I think these are in the "Operations" section, but the terminology is not consistent command/operation, so it's confusing.

where `command`, `flags` are:

- `command`: The operation you want to perform.
- `flags` : Specifies flags required to carry out the operations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to define what the valid flags are per command.

```

```bash
# Migrate CoreDNS from v1.4.0 to v1.5.0 and handle deprecations .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should explain what "handle deprecations" means.

@chrisohaver
Copy link
Member

Can you also add a wrapper for Released()?

@chrisohaver chrisohaver merged commit 37f5d0d into coredns:master Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants