{
  "properties": {
    "spec": {
      "properties": {
        "account": {
          "description": "Name of the account to which the Stream belongs.",
          "pattern": "^[^.*>]*$",
          "type": "string"
        },
        "bucket": {
          "description": "A unique name for the KV Store.",
          "type": "string"
        },
        "compression": {
          "description": "KV Store compression.",
          "type": "boolean"
        },
        "creds": {
          "default": "",
          "description": "NATS user credentials for connecting to servers. Please make sure your controller has mounted the creds on its path.",
          "type": "string"
        },
        "description": {
          "description": "The description of the KV Store.",
          "type": "string"
        },
        "history": {
          "description": "The number of historical values to keep per key.",
          "type": "integer"
        },
        "jsDomain": {
          "description": "The JetStream domain to use for the KV store.",
          "type": "string"
        },
        "maxBytes": {
          "description": "The maximum size of the KV Store in bytes.",
          "type": "integer"
        },
        "maxValueSize": {
          "description": "The maximum size of a value in bytes.",
          "type": "integer"
        },
        "mirror": {
          "description": "A KV Store mirror.",
          "properties": {
            "externalApiPrefix": {
              "type": "string"
            },
            "externalDeliverPrefix": {
              "type": "string"
            },
            "filterSubject": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "optStartSeq": {
              "type": "integer"
            },
            "optStartTime": {
              "description": "Time format must be RFC3339.",
              "type": "string"
            },
            "subjectTransforms": {
              "description": "List of subject transforms for this mirror.",
              "items": {
                "description": "A subject transform pair.",
                "properties": {
                  "dest": {
                    "description": "Destination subject.",
                    "type": "string"
                  },
                  "source": {
                    "description": "Source subject.",
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "nkey": {
          "default": "",
          "description": "NATS user NKey for connecting to servers.",
          "type": "string"
        },
        "placement": {
          "description": "The KV Store placement via tags or cluster name.",
          "properties": {
            "cluster": {
              "type": "string"
            },
            "tags": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "preventDelete": {
          "default": false,
          "description": "When true, the managed KV Store will not be deleted when the resource is deleted.",
          "type": "boolean"
        },
        "preventUpdate": {
          "default": false,
          "description": "When true, the managed KV Store will not be updated when the resource is updated.",
          "type": "boolean"
        },
        "replicas": {
          "default": 1,
          "description": "The number of replicas to keep for the KV Store in clustered JetStream.",
          "maximum": 5,
          "minimum": 1,
          "type": "integer"
        },
        "republish": {
          "description": "Republish configuration for the KV Store.",
          "properties": {
            "destination": {
              "description": "Messages will be additionally published to this subject after Bucket.",
              "type": "string"
            },
            "source": {
              "description": "Messages will be published from this subject to the destination subject.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "servers": {
          "default": [],
          "description": "A list of servers for creating the KV Store.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "sources": {
          "description": "A KV Store's sources.",
          "items": {
            "properties": {
              "externalApiPrefix": {
                "type": "string"
              },
              "externalDeliverPrefix": {
                "type": "string"
              },
              "filterSubject": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "optStartSeq": {
                "type": "integer"
              },
              "optStartTime": {
                "description": "Time format must be RFC3339.",
                "type": "string"
              },
              "subjectTransforms": {
                "description": "List of subject transforms for this mirror.",
                "items": {
                  "description": "A subject transform pair.",
                  "properties": {
                    "dest": {
                      "description": "Destination subject.",
                      "type": "string"
                    },
                    "source": {
                      "description": "Source subject.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "storage": {
          "description": "The storage backend to use for the KV Store.",
          "enum": [
            "file",
            "memory"
          ],
          "type": "string"
        },
        "tls": {
          "description": "A client's TLS certs and keys.",
          "properties": {
            "clientCert": {
              "description": "A client's cert filepath. Should be mounted.",
              "type": "string"
            },
            "clientKey": {
              "description": "A client's key filepath. Should be mounted.",
              "type": "string"
            },
            "rootCas": {
              "description": "A list of filepaths to CAs. Should be mounted.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "tlsFirst": {
          "default": false,
          "description": "When true, the KV Store will initiate TLS before server INFO.",
          "type": "boolean"
        },
        "ttl": {
          "description": "The time expiry for keys.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "properties": {
        "conditions": {
          "items": {
            "properties": {
              "lastTransitionTime": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "observedGeneration": {
          "type": "integer"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
