
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
helm-parser
Advanced tools
[](https://github.com/prettier/prettier) [](https://g
_ _ _ ____
| | | | ___| |_ __ ___ | _ \ __ _ _ __ ___ ___ _ __
| |_| |/ _ \ | '_ ` _ \ | |_) / _` | '__/ __|/ _ \ '__|
| _ | __/ | | | | | | | __/ (_| | | \__ \ __/ |
|_| |_|\___|_|_| |_| |_| |_| \__,_|_| |___/\___|_|
Template a helm chart with the Helm CLI and load the manifests into an array of JavaScript objects. Mainly intended for use within a test suite.
Helm charts can get very complicated at scale, with an infinite combination of values that can be passed to the chart by consumers. With Helm Parser, you can write comprehensive tests for your chart, using your favourite JS testing framework.
npm install helm-parser
import path from "path";
import { HelmParser } from "helm-parser";
const helmParser = new HelmParser({
chartPath: path.resolve(__dirname, "./path-to/my-chart-dir");
});
const result = helmParser.template({
chartPath,
namespace: "my-namespace",
releaseName: "my-release",
values: {
replicaCount: 3,
},
});
const deployments = result.manifests.filter((manifest) => manifest.kind === "Deployment");
const deployments = result.getDeployments();
const myDeployment = result.getDeployment("my-deployment");
const services = result.getServices();
const myService = result.getService("my-service");
const ingresses = result.getIngresses();
const myIngress = result.getIngress("my-ingress");
You should place this alongside your Chart.yaml file.
This is a helm feature which will validate parameters, as well as allow you to generate a typescript definition for your values.
https://helm.sh/docs/topics/charts/#schema-files
values.schema.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"replicaCount": {
"type": "number"
},
"something": {
"type": "string",
"enum": ["a", "b", "c"]
}
}
}
npx create-helm-tests my-tests --chart-path ./path-to/my-chart-dir
test/main.test.ts
test("can set replicas to 3", () => {
const result = helmParser.template({
namespace: "my-namespace",
releaseName: "my-release",
values: {
replicaCount: 3,
},
});
const deployment = result.getDeployment("my-deployment");
expect(deployment.spec.replicas).to.equal(3);
});
FAQs
[](https://github.com/prettier/prettier) [](https://g
We found that helm-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.