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

JSON patch not working properly for changed namespaces #683

Closed
lblackstone opened this issue Aug 1, 2019 · 1 comment · Fixed by #1631
Closed

JSON patch not working properly for changed namespaces #683

lblackstone opened this issue Aug 1, 2019 · 1 comment · Fixed by #1631
Assignees
Labels
dry-run-diff Related to dry run diff behavior kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@lblackstone
Copy link
Member

Failed to check for changes in resource default/foo because of an error computing the JSON patch describing the resource changes: the namespace of the object (default) does not match the namespace on the request (foo)

Before:

const ns = new k8s.core.v1.Namespace("foo", {metadata: {name: "foo"}});
const provider = new k8s.Provider("bar", {namespace: ns.metadata.name});

const appLabels = { app: "nginx" };
const deployment = new k8s.apps.v1.Deployment("nginx", {
    metadata: { name: "foo"},
    spec: {
        selector: { matchLabels: appLabels },
        replicas: 1,
        template: {
            metadata: { labels: appLabels },
            spec: {
                containers: [{ name: "nginx", image: "nginx:1.14"}],
            },
        },
    }
}, {provider: provider});

After:

const ns = new k8s.core.v1.Namespace("foo", {metadata: {name: "foo"}});
const provider = new k8s.Provider("bar", {});

const appLabels = { app: "nginx" };
const deployment = new k8s.apps.v1.Deployment("nginx", {
    metadata: { name: "foo"},
    spec: {
        selector: { matchLabels: appLabels },
        replicas: 1,
        template: {
            metadata: { labels: appLabels },
            spec: {
                containers: [{ name: "nginx", image: "nginx:1.14"}],
            },
        },
    }
}, {provider: provider});
@lblackstone lblackstone added the kind/bug Some behavior is incorrect or out of spec label Aug 1, 2019
@lblackstone lblackstone added this to the 0.26 milestone Aug 1, 2019
@lblackstone lblackstone self-assigned this Aug 1, 2019
@lblackstone
Copy link
Member Author

No longer a P1 since the new diff behavior is now opt-in

@lblackstone lblackstone modified the milestones: 0.26, 0.27 Aug 5, 2019
@lblackstone lblackstone removed this from the 0.27 milestone Sep 18, 2019
@lblackstone lblackstone added the dry-run-diff Related to dry run diff behavior label Oct 21, 2019
@lblackstone lblackstone added this to the 0.58 milestone Jun 22, 2021
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dry-run-diff Related to dry run diff behavior 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