diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a2ae7c701..4edf9b2cde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ ## 0.25.3 (Unreleased) +### Supported Kubernetes versions + +- v1.15.x +- v1.14.x +- v1.13.x + +### Bug fixes + +- Emit a useful error message (rather than a useless one) if we fail to parse the YAML data in + `kubernetes:config:kubeconfig` (https://github.com/pulumi/pulumi-kubernetes/pull/636). + + ## 0.25.2 (July 11, 2019) ### Supported Kubernetes versions @@ -10,7 +22,7 @@ ### Improvements -- The Kubernetes provider can now communicate detailed information about the difference between a resource's +- The Kubernetes provider can now communicate detailed information about the difference between a resource's desired and actual state during a Pulumi update. (https://github.com/pulumi/pulumi-kubernetes/pull/618). - Refactor Pod await logic for easier testing and maintenance (https://github.com/pulumi/pulumi-kubernetes/pull/590). - Update to client-go v12.0.0 (https://github.com/pulumi/pulumi-kubernetes/pull/621). @@ -72,7 +84,7 @@ desired and actual state during a Pulumi update. (https://github.com/pulumi/pulu BREAKING: This release changes the behavior of the provider `namespace` flag introduced in `0.23.0`. Previously, this flag was treated as an override, which ignored namespace -values set directly on resources. Now, the flag is a default, and will only set the +values set directly on resources. Now, the flag is a default, and will only set the namespace if one is not already set. If you have created resources using a provider with the `namespace` flag set, this change may cause these resources to be recreated on the next update. diff --git a/pkg/provider/provider.go b/pkg/provider/provider.go index d6560c5ff2..26338ca48b 100644 --- a/pkg/provider/provider.go +++ b/pkg/provider/provider.go @@ -27,6 +27,7 @@ import ( "github.com/golang/glog" pbempty "github.com/golang/protobuf/ptypes/empty" structpb "github.com/golang/protobuf/ptypes/struct" + "github.com/pkg/errors" pkgerrors "github.com/pkg/errors" "github.com/pulumi/pulumi-kubernetes/pkg/await" "github.com/pulumi/pulumi-kubernetes/pkg/clients" @@ -234,7 +235,9 @@ func (k *kubeProvider) Configure(_ context.Context, req *pulumirpc.ConfigureRequ if configJSON, ok := vars["kubernetes:config:kubeconfig"]; ok { config, err := clientcmd.Load([]byte(configJSON)) if err != nil { - return nil, fmt.Errorf("failed to parse kubeconfig: %v", err) + return nil, pkgerrors.Wrap(err, "failed to parse kubeconfig data in "+ + "`kubernetes:config:kubeconfig`; this must be a YAML literal string and not "+ + "(say) a filename") } kubeconfig = clientcmd.NewDefaultClientConfig(*config, overrides) } else {