-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ubuntu
committed
Sep 15, 2022
1 parent
60f623f
commit dd73cb0
Showing
39 changed files
with
3,412 additions
and
3,656 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.idea | ||
*bundle.yaml |
Large diffs are not rendered by default.
Oops, something went wrong.
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,30 @@ | ||
## CRD's Schema<br/> | ||
|
||
|
||
Purpose: | ||
The schema is meant to ease the use of CRDs by restricting the fields to defined types and providing relevant description. | ||
|
||
|
||
### Work Flow - How add a new field: | ||
* Not all steps are always required | ||
|
||
#### 1. Update Tags: | ||
In the files | ||
+ `pkg/apis/app/v1alpha1/redisenterprisedatabase_types.go`<br/> | ||
+ `pkg/apis/app/v1alpha1/redisenterprisecluster_types.go`<br/> | ||
add tags on top of variables to mark allowed types (Enum)<br/> | ||
(see: https://book.kubebuilder.io/reference/markers/crd-validation.html).<br/> | ||
They will be used by the operator sdk when creating the scheme.<br/> | ||
**Default values** do not appear in the schema since the operator has its own default mechanism. | ||
|
||
|
||
#### 2 .Create the schema: | ||
1) Install operator-sdk version 0.17.2.<br/> | ||
See: https://sdk.operatorframework.io/docs/installation/install-operator-sdk/#install-from-github-release | ||
2) Run `operator-sdk generate crds` | ||
|
||
#### 3. Update the schema: | ||
- Edit the current schema in all of the relevant CRD yamls with the new section that was generated<br/> | ||
- Note that fields which are k8s objects might be very long - e.g. `SideContainersSpec` | ||
in this case -<br/>it appears in the schema but with no description in the fields since it extends the schema and is not unique for Redis Enterprise. | ||
|
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.