-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tyler Gu <[email protected]>
- Loading branch information
Showing
2 changed files
with
106 additions
and
104 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
## Operator config example | ||
```json | ||
{ | ||
"deploy": { | ||
"method": "YAML", | ||
"file": "data/rabbitmq-operator/operator.yaml", | ||
"init": null | ||
}, | ||
"crd_name": null, | ||
"custom_fields": "data.rabbitmq-operator.prune", | ||
"blackbox_custom_fields": "data.rabbitmq-operator.prune_blackbox", | ||
"k8s_fields": "data.rabbitmq-operator.k8s_mapping", | ||
"seed_custom_resource": "data/rabbitmq-operator/cr.yaml", | ||
"example_dir": "data/rabbitmq-operator/examples", | ||
"analysis": { | ||
"github_link": "https://github.com/rabbitmq/cluster-operator.git", | ||
"commit": "f2ab5cecca7fa4bbba62ba084bfa4ae1b25d15ff", | ||
"entrypoint": null, | ||
"type": "RabbitmqCluster", | ||
"package": "github.com/rabbitmq/cluster-operator/api/v1beta1" | ||
} | ||
} | ||
``` | ||
|
||
## JSON schema for writing the operator porting config | ||
```json | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"deploy": { | ||
"type": "object", | ||
"properties": { | ||
"method": { | ||
"description": "One of three deploy methods [YAML HELM KUSTOMIZE]", | ||
"type": "string" | ||
}, | ||
"file": { | ||
"description": "the deployment file", | ||
"type": "string" | ||
}, | ||
"init": { | ||
"description": "any yaml to deploy for deploying the operator itself", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"method", | ||
"file", | ||
"init" | ||
] | ||
}, | ||
"crd_name": { | ||
"description": "name of the CRD to test, optional if there is only one CRD", | ||
"type": "string" | ||
}, | ||
"custom_fields": { | ||
"description": "file to guide the pruning", | ||
"type": "string" | ||
}, | ||
"seed_custom_resource": { | ||
"description": "the seed CR file", | ||
"type": "string" | ||
}, | ||
"analysis": { | ||
"type": "object", | ||
"properties": { | ||
"github_link": { | ||
"description": "github link for the operator repo", | ||
"type": "string" | ||
}, | ||
"commit": { | ||
"description": "specific commit hash of the repo", | ||
"type": "string" | ||
}, | ||
"entrypoint": { | ||
"description": "directory of the main file", | ||
"type": "string" | ||
}, | ||
"type": { | ||
"description": "the root type of the CR", | ||
"type": "string" | ||
}, | ||
"package": { | ||
"description": "package of the root type", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"github_link", | ||
"commit", | ||
"entrypoint", | ||
"type", | ||
"package" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"deploy", | ||
"crd_name", | ||
"custom_fields", | ||
"seed_custom_resource", | ||
"analysis" | ||
] | ||
} | ||
``` |