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

Check allNamespace config value while loading configuration file #1087

Merged
merged 1 commit into from
May 28, 2018

Conversation

silvin-lubecki
Copy link
Contributor

- How to verify it

# Add allNamespaces to your config file
$ cat ~/.docker/config.json
{
    "kubernetes": {
        "allNamespaces": "disabled"
    }
}
# Try some command
$ docker version
...
# Amend your config file with unknown value
$ cat ~/.docker/config.json
{
    "kubernetes": {
        "allNamespaces": "unknown"
    }
}
# Now a warning is displayed
$ docker version
WARNING: Error loading config file: /Users/silvin/.docker/config.json: invalid 'kubernetes.allNamespaces' value, should be 'enabled' or 'disabled': unknown
...

- Description for the changelog

  • Restrict kubernetes.allNamespaces value to 'enabled' or 'disabled' in configuration file

- A picture of a cute animal (not mandatory but encouraged)
image

@silvin-lubecki
Copy link
Contributor Author

Maybe we need a json schema on the configuration file... WDYT @vdemeester @thaJeztah ?

Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🎋
For json-schema, meh, we might at some point but it would probably be overkill for now 😓

@thaJeztah
Copy link
Member

Agreed that JSON-schema could be nice at some point (also related to #1058), but I think there's more enhancements to be made (multiple configurations you can switch between etc), so perhaps better to keep it for a future rewrite of this stuff

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@thaJeztah thaJeztah merged commit 05f04bb into docker:master May 28, 2018
@GordonTheTurtle GordonTheTurtle added this to the 18.06.0 milestone May 28, 2018
@silvin-lubecki silvin-lubecki deleted the check-kubernetes-config branch May 28, 2018 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants