{
  "description": "Volume is where Longhorn stores volume object.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore 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": "VolumeSpec defines the desired state of the Longhorn volume",
      "properties": {
        "Standby": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "accessMode": {
          "enum": [
            "rwo",
            "rwop",
            "rwx"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "backingImage": {
          "type": [
            "string",
            "null"
          ],
          "x-kubernetes-validations": [
            {
              "message": "BackingImage is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "backupBlockSize": {
          "description": "BackupBlockSize indicate the block size to create backups. The block size is immutable.",
          "enum": [
            "2097152",
            "16777216"
          ],
          "format": "int64",
          "type": [
            "string",
            "null"
          ]
        },
        "backupCompressionMethod": {
          "enum": [
            "none",
            "lz4",
            "gzip"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "backupTargetName": {
          "description": "The backup target name that the volume will be backed up to or is synced.",
          "type": [
            "string",
            "null"
          ]
        },
        "cloneMode": {
          "enum": [
            "",
            "full-copy",
            "linked-clone"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "dataEngine": {
          "enum": [
            "v1",
            "v2"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "dataLocality": {
          "enum": [
            "disabled",
            "best-effort",
            "strict-local"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "dataSource": {
          "type": [
            "string",
            "null"
          ]
        },
        "disableFrontend": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "diskSelector": {
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "encrypted": {
          "type": [
            "boolean",
            "null"
          ],
          "x-kubernetes-validations": [
            {
              "message": "Encrypted is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "freezeFilesystemForSnapshot": {
          "description": "Setting that freezes the filesystem on the root partition before a snapshot is created.",
          "enum": [
            "ignored",
            "enabled",
            "disabled"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "fromBackup": {
          "type": [
            "string",
            "null"
          ]
        },
        "frontend": {
          "enum": [
            "blockdev",
            "iscsi",
            "nvmf",
            "ublk",
            ""
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "image": {
          "type": [
            "string",
            "null"
          ]
        },
        "lastAttachedBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "migratable": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "migrationNodeID": {
          "type": [
            "string",
            "null"
          ]
        },
        "nodeID": {
          "type": [
            "string",
            "null"
          ]
        },
        "nodeSelector": {
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "numberOfReplicas": {
          "type": [
            "integer",
            "null"
          ]
        },
        "offlineRebuilding": {
          "description": "Specifies whether Longhorn should rebuild replicas while the detached volume is degraded.\n- ignored: Use the global setting for offline replica rebuilding.\n- enabled: Enable offline rebuilding for this volume, regardless of the global setting.\n- disabled: Disable offline rebuilding for this volume, regardless of the global setting",
          "enum": [
            "ignored",
            "disabled",
            "enabled"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "rebuildConcurrentSyncLimit": {
          "description": "RebuildConcurrentSyncLimit controls the maximum number of file synchronization operations that can run\nconcurrently during a single replica rebuild.\nWhen set to 0, it means following the global setting.",
          "maximum": 5,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "replicaAutoBalance": {
          "enum": [
            "ignored",
            "disabled",
            "least-effort",
            "best-effort"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "replicaDiskSoftAntiAffinity": {
          "description": "Replica disk soft anti affinity of the volume. Set enabled to allow replicas to be scheduled in the same disk.",
          "enum": [
            "ignored",
            "enabled",
            "disabled"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "replicaRebuildingBandwidthLimit": {
          "description": "ReplicaRebuildingBandwidthLimit controls the maximum write bandwidth (in megabytes per second) allowed on the destination replica during the rebuilding process. Set this value to 0 to disable bandwidth limiting.",
          "format": "int64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "replicaSoftAntiAffinity": {
          "description": "Replica soft anti affinity of the volume. Set enabled to allow replicas to be scheduled on the same node.",
          "enum": [
            "ignored",
            "enabled",
            "disabled"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "replicaZoneSoftAntiAffinity": {
          "description": "Replica zone soft anti affinity of the volume. Set enabled to allow replicas to be scheduled in the same zone.",
          "enum": [
            "ignored",
            "enabled",
            "disabled"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "restoreVolumeRecurringJob": {
          "enum": [
            "ignored",
            "enabled",
            "disabled"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "revisionCounterDisabled": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "size": {
          "format": "int64",
          "type": [
            "string",
            "null"
          ]
        },
        "snapshotDataIntegrity": {
          "enum": [
            "ignored",
            "disabled",
            "enabled",
            "fast-check"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "snapshotMaxCount": {
          "type": [
            "integer",
            "null"
          ]
        },
        "snapshotMaxSize": {
          "format": "int64",
          "type": [
            "string",
            "null"
          ]
        },
        "staleReplicaTimeout": {
          "type": [
            "integer",
            "null"
          ]
        },
        "ublkNumberOfQueue": {
          "description": "ublkNumberOfQueue controls the number of queues for ublk frontend.",
          "type": [
            "integer",
            "null"
          ]
        },
        "ublkQueueDepth": {
          "description": "ublkQueueDepth controls the depth of each queue for ublk frontend.",
          "type": [
            "integer",
            "null"
          ]
        },
        "unmapMarkSnapChainRemoved": {
          "enum": [
            "ignored",
            "disabled",
            "enabled"
          ],
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "additionalProperties": false,
      "description": "VolumeStatus defines the observed state of the Longhorn volume",
      "properties": {
        "actualSize": {
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "cloneStatus": {
          "additionalProperties": false,
          "properties": {
            "attemptCount": {
              "type": [
                "integer",
                "null"
              ]
            },
            "nextAllowedAttemptAt": {
              "type": [
                "string",
                "null"
              ]
            },
            "snapshot": {
              "type": [
                "string",
                "null"
              ]
            },
            "sourceVolume": {
              "type": [
                "string",
                "null"
              ]
            },
            "state": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "conditions": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "lastProbeTime": {
                "description": "Last time we probed the condition.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "message": {
                "description": "Human-readable message indicating details about last transition.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "reason": {
                "description": "Unique, one-word, CamelCase reason for the condition's last transition.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "description": "Status is the status of the condition.\nCan be True, False, Unknown.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "description": "Type is the type of the condition.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "nullable": true,
          "type": [
            "array",
            "null"
          ]
        },
        "currentImage": {
          "type": [
            "string",
            "null"
          ]
        },
        "currentMigrationNodeID": {
          "description": "the node that this volume is currently migrating to",
          "type": [
            "string",
            "null"
          ]
        },
        "currentNodeID": {
          "type": [
            "string",
            "null"
          ]
        },
        "expansionRequired": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "frontendDisabled": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "isStandby": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "kubernetesStatus": {
          "additionalProperties": false,
          "properties": {
            "lastPVCRefAt": {
              "type": [
                "string",
                "null"
              ]
            },
            "lastPodRefAt": {
              "type": [
                "string",
                "null"
              ]
            },
            "namespace": {
              "description": "determine if PVC/Namespace is history or not",
              "type": [
                "string",
                "null"
              ]
            },
            "pvName": {
              "type": [
                "string",
                "null"
              ]
            },
            "pvStatus": {
              "type": [
                "string",
                "null"
              ]
            },
            "pvcName": {
              "type": [
                "string",
                "null"
              ]
            },
            "workloadsStatus": {
              "description": "determine if Pod/Workload is history or not",
              "items": {
                "additionalProperties": false,
                "properties": {
                  "podName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "podStatus": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "workloadName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "workloadType": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "nullable": true,
              "type": [
                "array",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "lastBackup": {
          "type": [
            "string",
            "null"
          ]
        },
        "lastBackupAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "lastDegradedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "ownerID": {
          "type": [
            "string",
            "null"
          ]
        },
        "remountRequestedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "restoreInitiated": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "restoreRequired": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "robustness": {
          "type": [
            "string",
            "null"
          ]
        },
        "shareEndpoint": {
          "type": [
            "string",
            "null"
          ]
        },
        "shareState": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}