Skip to content

Commit e826e4c

Browse files
committed
Add instructions on how to install from a release
Signed-off-by: mprahl <[email protected]>
1 parent 537f2e7 commit e826e4c

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,55 @@ For more about Open Cluster Management and its Policy Framework:
1313

1414
### As a Kustomize plugin
1515

16+
#### Installation
17+
18+
##### Install from the GitHub release
19+
20+
1. Download the precompiled plugin binary from the
21+
[release](https://github.com/open-cluster-management/policy-generator-plugin/releases)
22+
of your choice.
23+
24+
2. Create the plugin directory:
25+
26+
```bash
27+
mkdir -p ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator
28+
```
29+
30+
3. Move the binary to the plugin directory:
31+
32+
- Linux:
33+
34+
```bash
35+
chmod +x linux-amd64-PolicyGenerator
36+
mv linux-amd64-PolicyGenerator ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator/PolicyGenerator
37+
```
38+
39+
- MacOS:
40+
41+
```bash
42+
chmod +x darwin-amd64-PolicyGenerator
43+
mv darwin-amd64-PolicyGenerator ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator/PolicyGenerator
44+
```
45+
46+
##### Build and install from source
47+
1648
1. Build the plugin binary (only needed once or to update the plugin):
1749
```bash
1850
make build
1951
```
2052
**NOTE:** This will default to placing the binary in `${HOME}/.config/kustomize/plugin/`. You can change this by exporting `KUSTOMIZE_PLUGIN_HOME` to a different path.
2153

22-
2. Create a `kustomization.yaml` file that points to `PolicyGenerator` manifest(s), with any additional desired patches or customizations (see [`examples/policyGenerator.yaml`](./examples/policyGenerator.yaml) for an example):
54+
#### Configuration
55+
56+
1. Create a `kustomization.yaml` file that points to `PolicyGenerator` manifest(s), with any additional desired patches or customizations (see [`examples/policyGenerator.yaml`](./examples/policyGenerator.yaml) for an example):
2357
```yaml
2458
generators:
2559
- path/to/generator/file.yaml
2660
...
2761
```
2862
- To read more about the `PolicyGenerator` YAML, see [About the PolicyGenerator plugin](./docs/policygenerator.md)
2963

30-
3. To use the plugin to generate policies, do one of:
64+
2. To use the plugin to generate policies, do one of:
3165
- Utilize the `examples/` directory in this repository (the directory can be modified by exporting a new path to `SOURCE_DIR`):
3266
```bash
3367
make generate

0 commit comments

Comments
 (0)