
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
open-cluster-management.io/policy-generator-plugin
Advanced tools
The Policy Generator constructs Open Cluster Management policies from Kubernetes YAML files provided through a PolicyGenerator Custom Resource. The Policy Generator is a binary compiled for use as a kustomize exec plugin.
For more about Open Cluster Management and its Policy Framework:
Create the plugin directory (optional if using the generator without Kustomize):
mkdir -p ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator
NOTE: The default directory for Kustomize plugins is ${HOME}/.config/kustomize/plugin/, which is used directly in
this readme. You can change this by exporting KUSTOMIZE_PLUGIN_HOME to a different path and updating the root of the
paths used in this document.
Download the precompiled plugin binary from the release of your choice.
Make the binary executable and move the binary to the plugin directory:
Linux:
chmod +x linux-amd64-PolicyGenerator
mv linux-amd64-PolicyGenerator ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator/PolicyGenerator
MacOS:
chmod +x darwin-amd64-PolicyGenerator
mv darwin-amd64-PolicyGenerator ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator/PolicyGenerator
go install (available for v1.11.0 and higher)Set the GOBIN to the plugin directory and specify the desired version (this command uses latest):
GOBIN=${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator \
go install open-cluster-management.io/policy-generator-plugin/cmd/PolicyGenerator@latest
make build
NOTE:
${HOME}/.config/kustomize/plugin/. You
can change this by exporting KUSTOMIZE_PLUGIN_HOME to a different path.make build-binary to place the binary at the root of the repository and either use it
directly from there or move it to the plugin directory to use with Kustomize.Create a kustomization.yaml file that points to PolicyGenerator manifest(s), with any additional desired patches
or customizations (see examples/policyGenerator.yaml for an example):
generators:
- path/to/generator/file.yaml
PolicyGenerator YAML structure, see the
Policy Generator reference YAMLTo use the plugin to generate policies, run the Kustomize build command from any directory with a
kustomization.yaml file pointing to PolicyGenerator manifests:
kustomize build --enable-alpha-plugins
NOTE: To enable Helm processing when passing a Kustomize directory into the generator, set
the environment variable POLICY_GEN_ENABLE_HELM to "true". If the Helm directory is outside of the Kustomize path,
you may set the environment variable POLICY_GEN_DISABLE_LOAD_RESTRICTORS to "true".
In order to bypass Kustomize and run the generator binary directly, change to the directory of PolicyGenerator manifest(s) and run the binary with the manifest(s) as the input arguments:
path/to/PolicyGenerator <path/to/file/1> ... <path/to/file/n>
For example:
make build-binary # This places the binary at the root of the repo, so this is optional if it was done previously
cd examples
../PolicyGenerator policyGenerator.yaml
NOTE:
--debug flag to the arguments.POLICY_GEN_ENABLE_HELM to "true". If the Helm directory is outside of the Kustomize path,
you may set the environment variable POLICY_GEN_DISABLE_LOAD_RESTRICTORS to "true".FAQs
Unknown package
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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.