{
  "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"
    },
    "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"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "VolumeSpec defines the desired state of the Longhorn volume",
      "properties": {
        "Standby": {
          "type": "boolean"
        },
        "accessMode": {
          "enum": [
            "rwo",
            "rwx"
          ],
          "type": "string"
        },
        "backendStoreDriver": {
          "description": "Deprecated:Replaced by field `dataEngine`.'",
          "type": "string"
        },
        "backingImage": {
          "type": "string"
        },
        "backupCompressionMethod": {
          "enum": [
            "none",
            "lz4",
            "gzip"
          ],
          "type": "string"
        },
        "dataEngine": {
          "enum": [
            "v1",
            "v2"
          ],
          "type": "string"
        },
        "dataLocality": {
          "enum": [
            "disabled",
            "best-effort",
            "strict-local"
          ],
          "type": "string"
        },
        "dataSource": {
          "type": "string"
        },
        "disableFrontend": {
          "type": "boolean"
        },
        "diskSelector": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "encrypted": {
          "type": "boolean"
        },
        "engineImage": {
          "description": "Deprecated: Replaced by field `image`.",
          "type": "string"
        },
        "freezeFilesystemForSnapshot": {
          "description": "Setting that freezes the filesystem on the root partition before a snapshot is created.",
          "enum": [
            "ignored",
            "enabled",
            "disabled"
          ],
          "type": "string"
        },
        "fromBackup": {
          "type": "string"
        },
        "frontend": {
          "enum": [
            "blockdev",
            "iscsi",
            "nvmf",
            ""
          ],
          "type": "string"
        },
        "image": {
          "type": "string"
        },
        "lastAttachedBy": {
          "type": "string"
        },
        "migratable": {
          "type": "boolean"
        },
        "migrationNodeID": {
          "type": "string"
        },
        "nodeID": {
          "type": "string"
        },
        "nodeSelector": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "numberOfReplicas": {
          "type": "integer"
        },
        "replicaAutoBalance": {
          "enum": [
            "ignored",
            "disabled",
            "least-effort",
            "best-effort"
          ],
          "type": "string"
        },
        "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"
        },
        "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"
        },
        "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"
        },
        "restoreVolumeRecurringJob": {
          "enum": [
            "ignored",
            "enabled",
            "disabled"
          ],
          "type": "string"
        },
        "revisionCounterDisabled": {
          "type": "boolean"
        },
        "size": {
          "format": "int64",
          "type": "string"
        },
        "snapshotDataIntegrity": {
          "enum": [
            "ignored",
            "disabled",
            "enabled",
            "fast-check"
          ],
          "type": "string"
        },
        "snapshotMaxCount": {
          "type": "integer"
        },
        "snapshotMaxSize": {
          "format": "int64",
          "type": "string"
        },
        "staleReplicaTimeout": {
          "type": "integer"
        },
        "unmapMarkSnapChainRemoved": {
          "enum": [
            "ignored",
            "disabled",
            "enabled"
          ],
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "VolumeStatus defines the observed state of the Longhorn volume",
      "properties": {
        "actualSize": {
          "format": "int64",
          "type": "integer"
        },
        "cloneStatus": {
          "properties": {
            "attemptCount": {
              "type": "integer"
            },
            "nextAllowedAttemptAt": {
              "type": "string"
            },
            "snapshot": {
              "type": "string"
            },
            "sourceVolume": {
              "type": "string"
            },
            "state": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "conditions": {
          "items": {
            "properties": {
              "lastProbeTime": {
                "description": "Last time we probed the condition.",
                "type": "string"
              },
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable message indicating details about last transition.",
                "type": "string"
              },
              "reason": {
                "description": "Unique, one-word, CamelCase reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status is the status of the condition.\nCan be True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type is the type of the condition.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "nullable": true,
          "type": "array"
        },
        "currentImage": {
          "type": "string"
        },
        "currentMigrationNodeID": {
          "description": "the node that this volume is currently migrating to",
          "type": "string"
        },
        "currentNodeID": {
          "type": "string"
        },
        "expansionRequired": {
          "type": "boolean"
        },
        "frontendDisabled": {
          "type": "boolean"
        },
        "isStandby": {
          "type": "boolean"
        },
        "kubernetesStatus": {
          "properties": {
            "lastPVCRefAt": {
              "type": "string"
            },
            "lastPodRefAt": {
              "type": "string"
            },
            "namespace": {
              "description": "determine if PVC/Namespace is history or not",
              "type": "string"
            },
            "pvName": {
              "type": "string"
            },
            "pvStatus": {
              "type": "string"
            },
            "pvcName": {
              "type": "string"
            },
            "workloadsStatus": {
              "description": "determine if Pod/Workload is history or not",
              "items": {
                "properties": {
                  "podName": {
                    "type": "string"
                  },
                  "podStatus": {
                    "type": "string"
                  },
                  "workloadName": {
                    "type": "string"
                  },
                  "workloadType": {
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "nullable": true,
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "lastBackup": {
          "type": "string"
        },
        "lastBackupAt": {
          "type": "string"
        },
        "lastDegradedAt": {
          "type": "string"
        },
        "ownerID": {
          "type": "string"
        },
        "pendingNodeID": {
          "description": "Deprecated.",
          "type": "string"
        },
        "remountRequestedAt": {
          "type": "string"
        },
        "restoreInitiated": {
          "type": "boolean"
        },
        "restoreRequired": {
          "type": "boolean"
        },
        "robustness": {
          "type": "string"
        },
        "shareEndpoint": {
          "type": "string"
        },
        "shareState": {
          "type": "string"
        },
        "state": {
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
