{
  "description": "Shard is where Longhorn stores Shard 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": "ShardSpec defines the desired state of the Longhorn Shard",
      "properties": {
        "diskPath": {
          "description": "DiskPath is the path of the disk that hosts the shard lvol.",
          "type": [
            "string",
            "null"
          ]
        },
        "diskUUID": {
          "description": "DiskUUID is the UUID of the disk that hosts the shard lvol.",
          "type": [
            "string",
            "null"
          ]
        },
        "evictionRequested": {
          "description": "EvictionRequested indicates this shard should be relocated to a different node or disk.\nSet by the node controller when the shard's node is being drained or its disk is evicted.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "nodeID": {
          "description": "NodeID is the node where this shard's lvol resides and its NVMe-oF target runs.",
          "type": [
            "string",
            "null"
          ]
        },
        "shardGroupName": {
          "description": "ShardGroupName is the name of the owning ShardGroup CR. Immutable after creation.",
          "type": [
            "string",
            "null"
          ]
        },
        "size": {
          "description": "Size is the shard lvol size in bytes. Set by the ShardGroup controller at creation time\nand used for idempotent reconciliation.",
          "format": "int64",
          "type": [
            "string",
            "null"
          ]
        },
        "slotIndex": {
          "description": "SlotIndex is the zero-based position of this shard in the EC base-bdev array.\nDetermines the shard's role: indices 0..k-1 are DATA, k..k+m-1 are PARITY.\nImmutable after creation.",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "additionalProperties": false,
      "description": "ShardStatus defines the observed state of the Longhorn Shard",
      "properties": {
        "lastFailureTimestamp": {
          "description": "LastFailureTimestamp is the RFC3339 timestamp of the most recent shard failure.",
          "type": [
            "string",
            "null"
          ]
        },
        "ownerID": {
          "description": "OwnerID is the ID of the node that owns this Shard.",
          "type": [
            "string",
            "null"
          ]
        },
        "port": {
          "description": "Port is the NVMe-oF port of the shard's target export.",
          "format": "int32",
          "type": [
            "integer",
            "null"
          ]
        },
        "rebuildProgress": {
          "description": "RebuildProgress is the rebuild completion percentage (0-100).",
          "type": [
            "integer",
            "null"
          ]
        },
        "replaceTriggered": {
          "description": "ReplaceTriggered is set to true after shard replacement has been initiated, to prevent\nre-issuing the replace command on subsequent cycles while SPDK advances the slot state.\nCleared when the slot state transitions away from Failed.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "role": {
          "description": "Role is the EC role of this slot (data or parity). Derived from SlotIndex and the parent\nShardGroup's DataChunks; stored here for informational purposes only.",
          "enum": [
            "data",
            "parity",
            ""
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "description": "State is the health state of this EC shard slot.",
          "enum": [
            "normal",
            "failed",
            "replacing",
            ""
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "storageIP": {
          "description": "StorageIP is the IP address of the NVMe-oF target exported by the shard's InstanceManager.\nPopulated after the shard instance is running.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}