The generic-addon
Introduction
The generic-addon is simply used to generate different manifest for running an addon with the generic controller.
You pass in the kind, group, and channel for the addon and it gives you all the necessary manifest required.
List of Manifest
The list of manifests it generates are:
- A CustomResourceDefinition for the addon
- A CustomResource of the addon
- RBAC(Clusterrole and clusterrolebinding) for creating, deleting, updating the custom resource
- A Generic resource for the addon
- The rbac for the addon manifest(The generic controller requires this to apply the manifest)
Usage
- Get the code
go get https://github.com/kubernetes-sigs/cluster-addons
- Build
cd $GOPATH/kubernetes-sigs/cluster-addons/tools/generic-addon
go install
- Run the go program
generic-addon <KIND> <GROUP> <CHANNEL>
Example:
generic-addon Dashboard addons.x-k8s.io ../channels
This command generates two files - dashboard_crd_rbac.yaml
and dashboard_sample.yaml
You can apply this to your cluster. Remember to apply the crd
file as that creates the CRD.
This also assumes you have already applied the CRD for the Generic
resource.
Have fun! 🎉