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

Cannot delete labels or annotations in ObjectMetaPatch #2887

Open
patrickli opened this issue Mar 15, 2024 · 1 comment
Open

Cannot delete labels or annotations in ObjectMetaPatch #2887

patrickli opened this issue Mar 15, 2024 · 1 comment
Labels
area/codegen impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec

Comments

@patrickli
Copy link

What happened?

According to the documentation, one can set label item to undefined to delete it. However the labels field in ObjectMetaPatch does not allow undefined.

Source: https://github.com/pulumi/pulumi-kubernetes/blob/master/sdk/nodejs/types/input.ts#L25419

Same goes to the annotations field.

I've tested by manually adding | undefined to the definitions of the two fields, you can set them as undefined and pulumi up successfully deletes the fields from kubernetes.

Example

See documentation link above.

Output of pulumi about

CLI
Version      3.109.0
Go Version   go1.22.0
Go Compiler  gc

Plugins
NAME        VERSION
aws         6.25.1
kubernetes  4.9.1
nodejs      unknown
tls         5.0.1

Host
OS       darwin
Version  14.3.1
Arch     arm64

This project is written in nodejs: executable='/opt/homebrew/bin/node' version='v21.7.1'
Dependencies:
NAME                VERSION
typescript          4.9.5
@pulumi/aws         6.25.1
@pulumi/kubernetes  4.9.1
@pulumi/pulumi      3.109.0
@pulumi/tls         5.0.1
@types/node         18.19.23

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@patrickli patrickli added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Mar 15, 2024
@mjeffryes mjeffryes added area/codegen impact/usability Something that impacts users' ability to use the product easily and intuitively and removed needs-triage Needs attention from the triage team labels Mar 15, 2024
@mjeffryes
Copy link
Contributor

Thanks for the bug report and for sharing your workaround @patrickli. We'll look into why the type definitions are not matching the docs here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants