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

Overlay resources in node are ignored by policy packs #2134

Open
Tracked by #1971
jkodroff opened this issue Aug 11, 2022 · 1 comment
Open
Tracked by #1971

Overlay resources in node are ignored by policy packs #2134

jkodroff opened this issue Aug 11, 2022 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec mro1 Monica's list of 1st tier overlay related issues

Comments

@jkodroff
Copy link
Member

jkodroff commented Aug 11, 2022

The handwritten node overlays in provider/pkg/gen all need changes similar to those made in #2066 and #2133.

Sample pulumi program for a test bench:

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

new k8s.helm.v3.Chart("my-chart", {
    chart: "ingress-nginx/ingress-nginx",
});

Sample policy pack for a test bench:

import * as k8s from "@pulumi/kubernetes";
import { PolicyPack, validateResourceOfType } from "@pulumi/policy";

new PolicyPack("kubernetes-typescript", {
    policies: [{
        name: "no-helm-v3-charts",
        description: "no-helm-v3-charts",
        enforcementLevel: "mandatory",
        validateResource: validateResourceOfType(k8s.helm.v3.Chart, (svc, args, reportViolation) => {
            reportViolation("reportViolation no-helm-v3-charts");
        }),
    }],
});

IMPORTANT: When testing, be sure to yarn link @pulumi/kubernetes in both the policy pack dir AND the pulumi program dir or it'll appear as though your changes did not fix the problem.

Might be worth also trying similar programs/policy packs to tell whether Python resources have the same issue.

This issue can be closed if we turn these resources into MLCs (i.e. schema-tize them).

@jkodroff jkodroff added kind/bug Some behavior is incorrect or out of spec good-first-issue Start here if you'd like to start contributing to Pulumi labels Aug 11, 2022
@mnlumi mnlumi added the mro1 Monica's list of 1st tier overlay related issues label Mar 28, 2023
@mikhailshilkov mikhailshilkov removed the good-first-issue Start here if you'd like to start contributing to Pulumi label Nov 28, 2023
@EronWright
Copy link
Contributor

This ticket is about adding __pulumiType metadata to the overlay resources, ConfigGroup, ConfigFile, etc. The Chart resource has already been dealt with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec mro1 Monica's list of 1st tier overlay related issues
Projects
None yet
Development

No branches or pull requests

4 participants