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

CRD .spec.preserveUnknownFields has continuous diff #2505

Closed
lblackstone opened this issue Jul 19, 2023 · 0 comments · Fixed by #2506
Closed

CRD .spec.preserveUnknownFields has continuous diff #2505

lblackstone opened this issue Jul 19, 2023 · 0 comments · Fixed by #2506
Assignees
Labels
4.0 customer/feedback Feedback from customers kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@lblackstone
Copy link
Member

What happened?

Setting .spec.preserveUnknownFields on CRD resources causes a continuous diff.

      ~ spec: {
          + preserveUnknownFields: false
        }

Expected Behavior

No diff detected if the program and resource are unchanged.

Steps to reproduce

import * as k8s from "@pulumi/kubernetes";

new k8s.apiextensions.v1.CustomResourceDefinition("foobar", {
    metadata: { name: "foobars.stable.example.com" },
    spec: {
        preserveUnknownFields: false, // Setting this field causes a continuous diff
        group: "stable.example.com",
        versions: [
            {
                name: "v1",
                served: true,
                storage: true,
                schema: {
                    openAPIV3Schema: {
                        type: "object",
                        properties: {
                            spec: {
                                type: "object",
                                properties: {
                                    foo: {
                                        type: "string",
                                    },
                                },
                            }
                        }
                    }
                }
            }
        ],
        scope: "Namespaced",
        names: {
            plural: "foobars",
            singular: "foobar",
            kind: "FooBar",
            shortNames: ["fb"]
        }
    }
});

Output of pulumi about

pulumi-kubernetes v4.0.0

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).

@lblackstone lblackstone added customer/feedback Feedback from customers kind/bug Some behavior is incorrect or out of spec 4.0 labels Jul 19, 2023
@lblackstone lblackstone self-assigned this Jul 19, 2023
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 customer/feedback Feedback from customers kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants