Commit Graph

6 Commits (a0de1355174102d94b04243255cc781816e174f6)

Author SHA1 Message Date
Arvind Iyengar 9b28515507 Add generateCRDChart.assumeOwnershipOfCRDs flag
This commit adds a new flag to the experimental feature of generating a CRD chart for charts that need to be able to assume the ownership of any existing CRDs within a cluster. It also modifies the existing `prepare-crd` script to use template files stored in the `./scripts/chart-templates/` directory instead of utilizing numerous `cat` commands in order to achieve the same result.

Feature charts with this flag enabled will differ from the normal CRD chart in the following ways:
- Instead of having CRDs from `crd/` in `templates/`, they will be relocated to `crd-manifest/`.
- On render, the CRDs in `crd-manifest` are placed into a ConfigMap that will be deployed on the cluster.
- On install / upgrade / rollback, a pre-install / pre-upgrade / pre-rollback hook Job that does a `kubectl apply -f` on the manifest within the crd-manifest ConfigMap (with appropriate RBAC credentials via a ServiceAccount, CRB, and ClusterRole) will install the CRDs onto the cluster.
- On uninstall, a delete hook Job does a `kubectl delete -f` on the manifest within the crd-manifest ConfigMap (with the same RBAC credentials) to remove the CRDs from the cluster.

At the moment, this will only be used by the `rancher-monitoring` chart.

Related Issue: https://github.com/rancher/rancher/issues/28326
2020-09-09 15:25:13 -07:00
Caleb Bron be4446bbb4 Remove provides-gvr from readme
This flag has moved outside of the crd splitting flag.
Also it is documented elsewhere, so we want to avoid
duplicate docs.
2020-09-08 11:46:02 -07:00
Brenda Rearden b395206a27 Add url check for package.yaml file, add to cleanup 2020-09-04 10:30:14 -07:00
Daishan 9ff011d5ff Update commit example of overriding a chart 2020-08-17 16:31:39 -07:00
Arvind Iyengar fcc8528186 Enable splitting CRDs to separate package
This commit adds script changes to automatically allow packages to split
the CRD components located in a crd/ directory into a separate package.

It also automatically adds in a validation yaml helper to the main package
to prevent a user from installing the base package without installing the crd
install package first.

Any package can enable the creation of a separate crd package by just adding
`splitCRDsIntoSeparatePackage: true` into the package.yaml, as shown in the
rancher-monitoring chart.
2020-08-04 10:40:45 -07:00
Denise Schannon 44e16849c3 Initial commit 2020-07-29 15:59:02 -07:00