|
| 1 | +# Controller.json |
| 2 | + |
| 3 | +Custom Resource Definition (CRD) information like the domain, group, image, repository, etc. are stored in the controller.json file. This skeleton file for controller.json is created when you [create a CRAFT application in quickstart](quick_setup/README.md): |
| 4 | + |
| 5 | + "group": "", |
| 6 | + "resource": "", |
| 7 | + "repo": "", |
| 8 | + "domain": "", |
| 9 | + "namespace": "", |
| 10 | + "version": "", |
| 11 | + "operator_image": "", |
| 12 | + "image": "", |
| 13 | + "imagePullSecrets": "", |
| 14 | + "imagePullPolicy": "", |
| 15 | + "cpu_limit": "", |
| 16 | + "memory_limit": "", |
| 17 | + "vault_addr": "", |
| 18 | + "runOnce": "", |
| 19 | + "reconcileFreq": "" |
| 20 | + |
| 21 | +This table explains the controller.json attributes: |
| 22 | + |
| 23 | +| Attribute | Description | | | | |
| 24 | +|------------------|--------------------------------------------------------------------------------------------------------------------------------|---|---|---| |
| 25 | +| group | See the Kubernetes API Concepts page for more information. | | | | |
| 26 | +| resource | | | | | |
| 27 | +| namespace | | | | | |
| 28 | +| version | | | | | |
| 29 | +| repo | The repo where you want to store the operator template. | | | | |
| 30 | +| domain | The domain web address for this project. | | | | |
| 31 | +| operator_image | The docker registry files used to push operator image into docker. | | | | |
| 32 | +| image | The docker registry files used to push resource image into docker. | | | | |
| 33 | +| imagePullSecrets | Restricted data to be stored in the operator like access, permissions, etc. | | | | |
| 34 | +| imagePullPolicy | Method of updating images. Default pull policy is IfNotPresent causes Kubelet to skip pulling an image if one already exists. | | | | |
| 35 | +| cpu_limit | CPU limit allocated to the operator created. | | | | |
| 36 | +| memory_limit | Memory limit allocated to the operator created. | | | | |
| 37 | +| vault_addr | Address of the vault. | | | | |
| 38 | +| runOnce | If set to 0 reconciliation stops. If set to 1, reconciliation runs according to the specified frequency. | | | | |
| 39 | +| reconcileFreq | Frequency interval (in minutes) between two reconciliations. | | | | |
| 40 | + |
| 41 | + |
| 42 | +Here’s an example of a controller.json file for the Wordpress operator: |
| 43 | + |
| 44 | +``` |
| 45 | +{ |
| 46 | + "group": "wordpress", |
| 47 | + "resource": "WordpressAPI", |
| 48 | + "repo": "wordpress", |
| 49 | + "domain": "salesforce.com", |
| 50 | + "namespace": "default", |
| 51 | + "version": "v1", |
| 52 | + "operator_image": "ops0-artifactrepo1-0-prd.data.sfdc.net/cco/wordpress-operator", |
| 53 | + "image": "ops0-artifactrepo1-0-prd.data.sfdc.net/cco/wordpress:latest", |
| 54 | + "imagePullSecrets": "registrycredential", |
| 55 | + "imagePullPolicy": "IfNotPresent", |
| 56 | + "cpu_limit": "500m", |
| 57 | + "memory_limit": "200Mi", |
| 58 | + "vault_addr": "http://10.215.194.253:8200" |
| 59 | +} |
| 60 | +``` |
| 61 | + |
| 62 | + |
0 commit comments