-
Notifications
You must be signed in to change notification settings - Fork 113
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
Pulumi crossguard policy doesn't apply for k8s.helm.v3.Chart #2057
Comments
Thank you @awoimbee for reporting this. I took a quick look at this and it looks like All custom resources have it, e.g. https://github.com/pulumi/pulumi-kubernetes/blob/master/sdk/nodejs/authorization/v1/localSubjectAccessReview.ts#L25 But not the Therefore, I moved the issue to pulumi-kubernetes. |
Hi @awoimbee. I've submitted a PR that (I hope - this is my first contribution to this repo) fixes the issue. |
@jkodroff Your changes did not fix the issue, please reopen and remove the |
@viveklak you seem to be active in the issues, maybe you can help ? |
Oh come on ! How did you test your code @jkodroff ? new PolicyPack("kubernetes-typescript", {
policies: [{
name: "helm-charts-are-up-to-date",
description: "Helm charts deployments should use the latest version.",
enforcementLevel: "advisory",
validateResource: validateResourceOfType(k8s.helm.v3.Chart, async (config, args, reportViolation) => {
reportViolation(`AAAH ${config} '${Object.keys(config)}' '${Object.getOwnPropertyNames(config)}' '${Object.getPrototypeOf(config) === Object.prototype}'`); }),
}],
});
pulumi cli v3.38.0, "@pulumi/kubernetes": "^3.20.5", "@pulumi/policy": "^1.4.0" |
What happened?
Following #1672 (comment) I tried to create a policypack.
I'm using
pulumi preview --non-interactive --policy-pack ../crossguard-policies
This works:
But not this:
The callback is never called on k8s.helm.v3.Chart.
Steps to reproduce
k8s.helm.v3.Chart
validateResource
callback is never calledExpected Behavior
The validation callback is called
Actual Behavior
The validation callback is not called
Versions used
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).
The text was updated successfully, but these errors were encountered: