-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add Patch resources to all SDKs #2043
Conversation
4e2ba41
to
d93c859
Compare
d93c859
to
24b94a2
Compare
Add Patch resources for all Kubernetes resource types that can be used to patch existing cluster resources rather than creating a new resource under Pulumi management. See #2011 for additional details on the background and design of this feature.
24b94a2
to
658e30b
Compare
658e30b
to
4167799
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Does the PR have any schema changes?Looking good! No breaking changes found. New resources:
|
provider/pkg/gen/_go-templates/apiextensions/customResourcePatch.go
Outdated
Show resolved
Hide resolved
@@ -1285,6 +1285,71 @@ var apiextentionsCustomResource = pschema.ResourceSpec{ | |||
}, | |||
} | |||
|
|||
var apiextentionsCustomResourcePatch = pschema.ResourceSpec{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the interest of avoiding unnecessary duplication, refer to properties etc. from apiextentionsCustomResource
instead?
@@ -2683,12 +2707,13 @@ func (k *kubeProvider) tryServerSidePatch( | |||
return nil, nil, false, err | |||
} | |||
} | |||
if err != nil { | |||
return nil, nil, false, err | |||
if err.Error() == "name is required" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit - consider returning a strongly typed error for this instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directionally LGTM! We might move addressing some of the suggestions to a subsequent PR for review ergonomics.
Does the PR have any schema changes?Looking good! No breaking changes found. New resources:
|
Sounds good! I will make another pass through these feedback items once this merges. |
Proposed changes
Add Patch resources for all Kubernetes resource types that can be used to patch existing cluster resources rather than creating a new resource under Pulumi management. See #2011 for additional details on the background and design of this feature.
Related issues (optional)
Fix #2015