Merge pull request #808 from justinsb/issue_615

Better error message when KOPS_STATE_STORE not set
This commit is contained in:
Chris Love 2016-11-04 00:33:38 -06:00 committed by GitHub
commit 5b05a9ccbc
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ func (f *Factory) Clientset() (simple.Clientset, error) {
if f.clientset == nil {
registryPath := f.options.RegistryPath
if registryPath == "" {
return nil, field.Required(field.NewPath("RegistryPath"), "")
return nil, field.Required(field.NewPath("RegistryPath"), "Please set the --state flag, or `export KOPS_STATE_STORE=s3://<bucket>`")
}
basePath, err := vfs.Context.BuildVfsPath(registryPath)
if err != nil {
@ -51,7 +51,7 @@ func (f *Factory) Clientset() (simple.Clientset, error) {
}
if !vfs.IsClusterReadable(basePath) {
return nil, field.Invalid(field.NewPath("RegistryPath"), registryPath, "Not cloud-reachable - please use an S3 bucket")
return nil, field.Invalid(field.NewPath("RegistryPath"), registryPath, "Not cloud-reachable - please use an S3 bucket when setting --state or KOPS_STATE_STORE")
}
f.clientset = vfsclientset.NewVFSClientset(basePath)