-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Feature) Add generator for CRD validation schemas (#1488)
* (Feature) Add generator for CRD validation schemas * Improve docs / log output for crd installation * Add ability to force-update CRDs to allow testing
- Loading branch information
1 parent
934039f
commit 82cb7f1
Showing
35 changed files
with
607 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Custom resources overview | ||
|
||
Main CRDs: | ||
- [ArangoDeployment](deployment-resource-reference.md) | ||
- [ArangoDeploymentReplication](deployment-replication-resource-reference.md) | ||
- [ArangoLocalStorage](storage-resource.md) | ||
- [Backup](backup-resource.md) | ||
- [BackupPolicy](backuppolicy-resource.md) | ||
|
||
Operator manages the CustomResources based on CustomResourceDefinitions installed in your cluster. | ||
|
||
There are different options how CustomResourceDefinitions can be created. | ||
|
||
**Deprecated options:** | ||
- Install CRDs directly from `manifests` folder. | ||
- Install `kube-arangodb-crd` helm chart before installing `kube-arangodb` chart. | ||
- Install CRDs using kustomize `all` or `crd` manifests. | ||
|
||
**Recommended:** | ||
Use `kube-arangodb` Helm chart. | ||
If you've chosen not to install CRDs automatically (`--skip-crds`), the operator will try to install CRDs automatically. | ||
Make sure that ServiceAccount for operator has permissions to `create` CustomResourceDefinitions. | ||
|
||
To disable the automatic creation of CRDs, set `enableCRDManagement=false` template parameter, e.g.: | ||
```shell | ||
helm install --generate-name https://github.com/arangodb/kube-arangodb/releases/download/$VER/kube-arangodb-$VER.tgz --set "operator.enableCRDManagement=false" | ||
``` | ||
|
||
## Schema validation | ||
|
||
Starting with v1.2.36, the [schema validation](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation) is supported for all CRDs. | ||
|
||
Schema validation can be enabled only on cluster with no CRDs installed or by upgrading your CR from one CRD version to another. | ||
|
||
To enable creation of CRD with validation schema, pass additional args to operator command line, e.g.: | ||
``` | ||
--crd.validation-schema=arangobackuppolicies.backup.arangodb.com=true --crd.validation-schema=arangodeployments.database.arangodb.com=false | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.