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

Fix namespaceable check for diff #554

Merged
merged 1 commit into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

### Bug fixes

- None
- Fix namespaceable check for diff (https://github.com/pulumi/pulumi-kubernetes/pull/554)

## 0.23.0 (April 30, 2019)

Expand Down
9 changes: 8 additions & 1 deletion pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,14 @@ func (k *kubeProvider) Diff(

namespacedKind, err := k.clientSet.IsNamespacedKind(gvk)
if err != nil {
return nil, err
if clients.IsNoNamespaceInfoErr(err) {
// This is probably a CustomResource without a registered CustomResourceDefinition.
// Since we can't tell for sure at this point, assume it is namespaced, and correct if
// required during the Create step.
namespacedKind = true
} else {
return nil, err
}
}

if namespacedKind {
Expand Down