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

Unnecessary ObjectMeta that can instead use the k8s built-in types #35

Closed
metral opened this issue Apr 12, 2021 · 2 comments
Closed

Unnecessary ObjectMeta that can instead use the k8s built-in types #35

metral opened this issue Apr 12, 2021 · 2 comments
Assignees
Labels
area/codegen Affects quality or correctness of generated code kind/enhancement Improvements or new features language/javascript resolution/duplicate This issue is a duplicate of another issue
Milestone

Comments

@metral
Copy link

metral commented Apr 12, 2021

Expected behavior

Don't generate metadata and instead use built-in k8s input types.

Current behavior

Currently the metadata of a CustomResource is using a locally generated ObjectMeta for metadata instead of using the built-in types in pulumi-kubernetes.

import {ObjectMeta} from "../../meta/v1";
...
public readonly metadata!: pulumi.Output<ObjectMeta | undefined>;

...

export interface FooArgs {
    ...
    readonly metadata?: pulumi.Input<ObjectMeta>;
}

Desired:

import { input as k8sInputs, output as k8sOutputs } from "@pulumi/kubernetes/types";
...
public readonly metadata!: pulumi.Output<k8sOutputs.meta.v1.ObjectMeta>;

...

export interface FooArgs {
    ...
    readonly metadata?: pulumi.Input<k8sInputs.meta.v1.ObjectMeta>;
}

Related:

Also closes:

@metral metral added the kind/bug Some behavior is incorrect or out of spec label Apr 12, 2021
@leezen leezen added kind/bug Some behavior is incorrect or out of spec and removed kind/bug Some behavior is incorrect or out of spec labels Apr 13, 2021
@infin8x infin8x added this to the 0.56 milestone Apr 28, 2021
@leezen leezen removed this from the 0.56 milestone Apr 28, 2021
@ghostsquad
Copy link

This is true for Go too. Maybe you can remove Typescript from the issue title?

@lukehoban lukehoban changed the title Typescript generates unnecessary ObjectMeta that can instead use the k8s built-in types Unnecessary ObjectMeta that can instead use the k8s built-in types Feb 3, 2022
@mattolenik mattolenik added language/javascript area/codegen Affects quality or correctness of generated code labels Jun 2, 2022
@lukehoban lukehoban added kind/enhancement Improvements or new features and removed kind/bug Some behavior is incorrect or out of spec labels Jul 11, 2022
@blampe blampe added the resolution/duplicate This issue is a duplicate of another issue label Jul 1, 2024
@blampe
Copy link
Contributor

blampe commented Jul 1, 2024

Duplicate of #30

@blampe blampe marked this as a duplicate of #30 Jul 1, 2024
@blampe blampe closed this as completed Jul 1, 2024
@mjeffryes mjeffryes added this to the 0.107 milestone Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen Affects quality or correctness of generated code kind/enhancement Improvements or new features language/javascript resolution/duplicate This issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

9 participants