{
  "description": "CStorPoolInstance describes a cstor pool instance resource.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": [
        "string",
        "null"
      ]
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "Spec is the specification of the cstorpoolinstance resource.",
      "properties": {
        "dataRaidGroups": {
          "description": "DataRaidGroups is the raid group configuration for the given pool.",
          "items": {
            "additionalProperties": false,
            "description": "RaidGroup contains the details of a raid group for the pool",
            "properties": {
              "blockDevices": {
                "items": {
                  "additionalProperties": false,
                  "description": "CStorPoolInstanceBlockDevice contains the details of block devices that constitutes a raid group.",
                  "properties": {
                    "blockDeviceName": {
                      "description": "BlockDeviceName is the name of the block device.",
                      "type": "string"
                    },
                    "capacity": {
                      "description": "Capacity is the capacity of the block device. It is system generated",
                      "format": "int64",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "devLink": {
                      "description": "DevLink is the dev link for block devices",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "blockDeviceName"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "blockDevices"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "hostName": {
          "description": "HostName is the name of kubernetes node where the pool should be created.",
          "type": [
            "string",
            "null"
          ]
        },
        "nodeSelector": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "NodeSelector is the labels that will be used to select a node for pool provisioning. Required field",
          "type": "object"
        },
        "poolConfig": {
          "additionalProperties": false,
          "description": "PoolConfig is the default pool config that applies to the pool on node.",
          "properties": {
            "auxResources": {
              "additionalProperties": false,
              "description": "AuxResources are the compute resources required by the cstor-pool pod side car containers.",
              "nullable": true,
              "properties": {
                "claims": {
                  "description": "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable. It can only be set for containers.",
                  "items": {
                    "additionalProperties": false,
                    "description": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
                    "properties": {
                      "name": {
                        "description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "type": [
                    "array",
                    "null"
                  ],
                  "x-kubernetes-list-map-keys": [
                    "name"
                  ],
                  "x-kubernetes-list-type": "map"
                },
                "limits": {
                  "additionalProperties": {
                    "oneOf": [
                      {
                        "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ],
                    "x-kubernetes-int-or-string": true
                  },
                  "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "requests": {
                  "additionalProperties": {
                    "oneOf": [
                      {
                        "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ],
                    "x-kubernetes-int-or-string": true
                  },
                  "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "compression": {
              "description": "Compression to enable compression Optional -- defaults to off Possible values : lz, off",
              "type": [
                "string",
                "null"
              ]
            },
            "dataRaidGroupType": {
              "description": "DataRaidGroupType is the  raid type.",
              "type": "string"
            },
            "priorityClassName": {
              "description": "PriorityClassName if specified applies to this pool pod If left empty, DefaultPriorityClassName is applied. (See CStorPoolClusterSpec.DefaultPriorityClassName) If both are empty, not priority class is applied.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            },
            "resources": {
              "additionalProperties": false,
              "description": "Resources are the compute resources required by the cstor-pool container.",
              "nullable": true,
              "properties": {
                "claims": {
                  "description": "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable. It can only be set for containers.",
                  "items": {
                    "additionalProperties": false,
                    "description": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
                    "properties": {
                      "name": {
                        "description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "type": [
                    "array",
                    "null"
                  ],
                  "x-kubernetes-list-map-keys": [
                    "name"
                  ],
                  "x-kubernetes-list-type": "map"
                },
                "limits": {
                  "additionalProperties": {
                    "oneOf": [
                      {
                        "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ],
                    "x-kubernetes-int-or-string": true
                  },
                  "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "requests": {
                  "additionalProperties": {
                    "oneOf": [
                      {
                        "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ],
                    "x-kubernetes-int-or-string": true
                  },
                  "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "roThresholdLimit": {
              "description": "ROThresholdLimit is threshold(percentage base) limit for pool read only mode. If ROThresholdLimit(%) amount of pool storage is reached then pool will set to readonly. NOTE: 1. If ROThresholdLimit is set to 100 then entire pool storage will be used by default it will be set to 85%. 2. ROThresholdLimit value will be 0 \u003c= ROThresholdLimit \u003c= 100.",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "thickProvision": {
              "description": "ThickProvision to enable thick provisioning Optional -- defaults to false",
              "type": [
                "boolean",
                "null"
              ]
            },
            "tolerations": {
              "description": "Tolerations, if specified, the pool pod's tolerations.",
              "items": {
                "additionalProperties": false,
                "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.",
                "properties": {
                  "effect": {
                    "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "key": {
                    "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "operator": {
                    "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "tolerationSeconds": {
                    "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "value": {
                    "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "nullable": true,
              "type": [
                "array",
                "null"
              ]
            },
            "writeCacheGroupType": {
              "description": "WriteCacheGroupType is the write cache raid type.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "dataRaidGroupType"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "writeCacheRaidGroups": {
          "description": "WriteCacheRaidGroups is the write cache raid group.",
          "items": {
            "additionalProperties": false,
            "description": "RaidGroup contains the details of a raid group for the pool",
            "properties": {
              "blockDevices": {
                "items": {
                  "additionalProperties": false,
                  "description": "CStorPoolInstanceBlockDevice contains the details of block devices that constitutes a raid group.",
                  "properties": {
                    "blockDeviceName": {
                      "description": "BlockDeviceName is the name of the block device.",
                      "type": "string"
                    },
                    "capacity": {
                      "description": "Capacity is the capacity of the block device. It is system generated",
                      "format": "int64",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "devLink": {
                      "description": "DevLink is the dev link for block devices",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "blockDeviceName"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "blockDevices"
            ],
            "type": "object"
          },
          "nullable": true,
          "type": [
            "array",
            "null"
          ]
        }
      },
      "required": [
        "dataRaidGroups",
        "nodeSelector"
      ],
      "type": "object"
    },
    "status": {
      "additionalProperties": false,
      "description": "Status is the possible statuses of the cstorpoolinstance resource.",
      "properties": {
        "capacity": {
          "additionalProperties": false,
          "description": "Capacity describes the capacity details of a cstor pool",
          "properties": {
            "free": {
              "description": "Amount of usable space in the pool after excluding metadata and raid parity",
              "oneOf": [
                {
                  "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ],
              "x-kubernetes-int-or-string": true
            },
            "total": {
              "description": "Sum of usable capacity in all the data raidgroups",
              "oneOf": [
                {
                  "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ],
              "x-kubernetes-int-or-string": true
            },
            "used": {
              "description": "Amount of physical data (and its metadata) written to pool after applying compression, etc..,",
              "oneOf": [
                {
                  "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ],
              "x-kubernetes-int-or-string": true
            },
            "zfs": {
              "additionalProperties": false,
              "description": "ZFSCapacityAttributes contains advanced information about pool capacity details",
              "properties": {
                "logicalUsed": {
                  "description": "LogicalUsed is the amount of space that is \"logically\" consumed by this pool and all its descendents. The logical space ignores the effect of the compression and copies properties, giving a quantity closer to the amount of data that applications see. However, it does include space consumed by metadata.",
                  "oneOf": [
                    {
                      "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    }
                  ],
                  "x-kubernetes-int-or-string": true
                }
              },
              "required": [
                "logicalUsed"
              ],
              "type": "object"
            }
          },
          "required": [
            "free",
            "total",
            "used",
            "zfs"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "conditions": {
          "description": "Current state of CSPI with details.",
          "items": {
            "additionalProperties": false,
            "description": "CSPIConditionType describes the state of a CSPI at a certain point.",
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lastUpdateTime": {
                "description": "The last time this condition was updated.",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "message": {
                "description": "A human readable message indicating details about the transition.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "reason": {
                "description": "The reason for the condition's last transition.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "description": "Status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type of CSPC condition.",
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "healthyReplicas": {
          "description": "HealthyReplicas describes the total count of healthy Volume Replicas in the cstor pool",
          "format": "int32",
          "type": "integer"
        },
        "phase": {
          "description": "The phase of a CStorPool is a simple, high-level summary of the pool state on the node.",
          "type": [
            "string",
            "null"
          ]
        },
        "provisionedReplicas": {
          "description": "ProvisionedReplicas describes the total count of Volume Replicas present in the cstor pool",
          "format": "int32",
          "type": "integer"
        },
        "readOnly": {
          "description": "ReadOnly if pool is readOnly or not",
          "type": "boolean"
        }
      },
      "required": [
        "healthyReplicas",
        "provisionedReplicas",
        "readOnly"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "versionDetails": {
      "additionalProperties": false,
      "description": "VersionDetails is the openebs version.",
      "properties": {
        "autoUpgrade": {
          "description": "If AutoUpgrade is set to true then the resource is upgraded automatically without any manual steps",
          "type": [
            "boolean",
            "null"
          ]
        },
        "desired": {
          "description": "Desired is the version that we want to upgrade or the control plane version",
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "additionalProperties": false,
          "description": "Status gives the status of reconciliation triggered when the desired and current version are not same",
          "properties": {
            "current": {
              "description": "Current is the version of resource",
              "type": [
                "string",
                "null"
              ]
            },
            "dependentsUpgraded": {
              "description": "DependentsUpgraded gives the details whether all children of a resource are upgraded to desired version or not",
              "type": [
                "boolean",
                "null"
              ]
            },
            "lastUpdateTime": {
              "description": "LastUpdateTime is the time the status was last  updated",
              "format": "date-time",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            },
            "message": {
              "description": "Message is a human readable message if some error occurs",
              "type": [
                "string",
                "null"
              ]
            },
            "reason": {
              "description": "Reason is the actual reason for the error state",
              "type": [
                "string",
                "null"
              ]
            },
            "state": {
              "description": "State is the state of reconciliation",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}