Controller.json

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:

"group": "",
"resource": "",
"repo": "",
"domain": "",
"namespace": "",
"version": "",
"operator_image": "",
"image": "",
"imagePullSecrets": "",
"imagePullPolicy": "",
"cpu_limit": "",
"memory_limit": "",
"vault_addr": "",
"runOnce": "",
"reconcileFreq": ""

This table explains the controller.json attributes:

AttributeDescription
groupSee the Kubernetes API Concepts page for more information.
resource
namespace
version
repoThe repo where you want to store the operator template.
domainThe domain web address for this project.
operator_imageThe docker registry files used to push operator image into docker.
imageThe docker registry files used to push resource image into docker.
imagePullSecretsRestricted data to be stored in the operator like access, permissions, etc.
imagePullPolicyMethod of updating images. Default pull policy is IfNotPresent causes Kubelet to skip pulling an image if one already exists.
cpu_limitCPU limit allocated to the operator created.
memory_limitMemory limit allocated to the operator created.
vault_addrAddress of the vault.
runOnceIf set to 0 reconciliation stops. If set to 1, reconciliation runs according to the specified frequency.
reconcileFreqFrequency interval (in minutes) between two reconciliations.

Here’s an example of a controller.json file for the Wordpress operator:

{
 "group": "wordpress",
  "resource": "WordpressAPI",
  "repo": "wordpress",
  "domain": "salesforce.com",
  "namespace": "default",
  "version": "v1",
  "operator_image": "ops0-artifactrepo1-0-prd.data.sfdc.net/cco/wordpress-operator",
  "image": "ops0-artifactrepo1-0-prd.data.sfdc.net/cco/wordpress:latest",
  "imagePullSecrets": "registrycredential",
  "imagePullPolicy": "IfNotPresent",
  "cpu_limit": "500m",
  "memory_limit": "200Mi",
  "vault_addr": "http://10.215.194.253:8200"
}