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

add a script to test policy-generator local #325

Open
ch-stark opened this issue Aug 9, 2022 · 1 comment
Open

add a script to test policy-generator local #325

ch-stark opened this issue Aug 9, 2022 · 1 comment

Comments

@ch-stark
Copy link
Contributor

ch-stark commented Aug 9, 2022

e.g like below it helps to use PolicyGenerator more easily:

mkdir -p ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator

curl -L \
  -o ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator/PolicyGenerator \
  https://github.com/stolostron/policy-generator-plugin/releases/download/v1.8.0/linux-amd64-PolicyGenerator
chmod +x ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator/PolicyGenerator

curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"  | bash


sudo chmod a+x kustomize /usr/local/sbin
sudo cp kustomize /usr/local/sbin

@ch-stark
Copy link
Contributor Author

ch-stark commented Aug 9, 2022

Once the files are created in the same directory, run the following command to generate the policy:

kustomize build --enable-alpha-plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant