{
  "description": "CephObjectZone represents a Ceph Object Store Gateway Zone",
  "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": "ObjectZoneSpec represent the spec of an ObjectZone",
      "properties": {
        "customEndpoints": {
          "description": "If this zone cannot be accessed from other peer Ceph clusters via the ClusterIP Service\nendpoint created by Rook, you must set this to the externally reachable endpoint(s). You may\ninclude the port in the definition. For example: \"https://my-object-store.my-domain.net:443\".\nIn many cases, you should set this to the endpoint of the ingress resource that makes the\nCephObjectStore associated with this CephObjectStoreZone reachable to peer clusters.\nThe list can have one or more endpoints pointing to different RGW servers in the zone.\n\nIf a CephObjectStore endpoint is omitted from this list, that object store's gateways will\nnot receive multisite replication data\n(see CephObjectStore.spec.gateway.disableMultisiteSyncTraffic).",
          "items": {
            "type": "string"
          },
          "nullable": true,
          "type": "array"
        },
        "dataPool": {
          "description": "The data pool settings",
          "nullable": true,
          "properties": {
            "application": {
              "description": "The application name to set on the pool. Only expected to be set for rgw pools.",
              "type": "string"
            },
            "compressionMode": {
              "description": "DEPRECATED: use Parameters instead, e.g., Parameters[\"compression_mode\"] = \"force\"\nThe inline compression mode in Bluestore OSD to set to (options are: none, passive, aggressive, force)\nDo NOT set a default value for kubebuilder as this will override the Parameters",
              "enum": [
                "none",
                "passive",
                "aggressive",
                "force",
                ""
              ],
              "nullable": true,
              "type": "string"
            },
            "crushRoot": {
              "description": "The root of the crush hierarchy utilized by the pool",
              "nullable": true,
              "type": "string"
            },
            "deviceClass": {
              "description": "The device class the OSD should set to for use in the pool",
              "nullable": true,
              "type": "string"
            },
            "enableCrushUpdates": {
              "description": "Allow rook operator to change the pool CRUSH tunables once the pool is created",
              "nullable": true,
              "type": "boolean"
            },
            "enableRBDStats": {
              "description": "EnableRBDStats is used to enable gathering of statistics for all RBD images in the pool",
              "type": "boolean"
            },
            "erasureCoded": {
              "description": "The erasure code settings",
              "properties": {
                "algorithm": {
                  "description": "The algorithm for erasure coding.\nIf absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.",
                  "enum": [
                    "isa",
                    "jerasure"
                  ],
                  "type": "string"
                },
                "codingChunks": {
                  "description": "Number of coding chunks per object in an erasure coded storage pool (required for erasure-coded pool type).\nThis is the number of OSDs that can be lost simultaneously before data cannot be recovered.",
                  "minimum": 0,
                  "type": "integer"
                },
                "dataChunks": {
                  "description": "Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type).\nThe number of chunks required to recover an object when any single OSD is lost is the same\nas dataChunks so be aware that the larger the number of data chunks, the higher the cost of recovery.",
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "required": [
                "codingChunks",
                "dataChunks"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "failureDomain": {
              "description": "The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map",
              "type": "string"
            },
            "mirroring": {
              "description": "The mirroring settings",
              "properties": {
                "enabled": {
                  "description": "Enabled whether this pool is mirrored or not",
                  "type": "boolean"
                },
                "mode": {
                  "description": "Mode is the mirroring mode: pool, image or init-only.",
                  "enum": [
                    "pool",
                    "image",
                    "init-only"
                  ],
                  "type": "string"
                },
                "peers": {
                  "description": "Peers represents the peers spec",
                  "nullable": true,
                  "properties": {
                    "secretNames": {
                      "description": "SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "snapshotSchedules": {
                  "description": "SnapshotSchedules is the scheduling of snapshot for mirrored images/pools",
                  "items": {
                    "description": "SnapshotScheduleSpec represents the snapshot scheduling settings of a mirrored pool",
                    "properties": {
                      "interval": {
                        "description": "Interval represent the periodicity of the snapshot.",
                        "type": "string"
                      },
                      "path": {
                        "description": "Path is the path to snapshot, only valid for CephFS",
                        "type": "string"
                      },
                      "startTime": {
                        "description": "StartTime indicates when to start the snapshot",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "parameters": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "Parameters is a list of properties to enable on a given pool",
              "nullable": true,
              "type": "object",
              "x-kubernetes-preserve-unknown-fields": true
            },
            "quotas": {
              "description": "The quota settings",
              "nullable": true,
              "properties": {
                "maxBytes": {
                  "description": "MaxBytes represents the quota in bytes\nDeprecated in favor of MaxSize",
                  "format": "int64",
                  "type": "integer"
                },
                "maxObjects": {
                  "description": "MaxObjects represents the quota in objects",
                  "format": "int64",
                  "type": "integer"
                },
                "maxSize": {
                  "description": "MaxSize represents the quota in bytes as a string",
                  "pattern": "^[0-9]+[\\.]?[0-9]*([KMGTPE]i|[kMGTPE])?$",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "replicated": {
              "description": "The replication settings",
              "properties": {
                "hybridStorage": {
                  "description": "HybridStorage represents hybrid storage tier settings",
                  "nullable": true,
                  "properties": {
                    "primaryDeviceClass": {
                      "description": "PrimaryDeviceClass represents high performance tier (for example SSD or NVME) for Primary OSD",
                      "minLength": 1,
                      "type": "string"
                    },
                    "secondaryDeviceClass": {
                      "description": "SecondaryDeviceClass represents low performance tier (for example HDDs) for remaining OSDs",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "primaryDeviceClass",
                    "secondaryDeviceClass"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "replicasPerFailureDomain": {
                  "description": "ReplicasPerFailureDomain the number of replica in the specified failure domain",
                  "minimum": 1,
                  "type": "integer"
                },
                "requireSafeReplicaSize": {
                  "description": "RequireSafeReplicaSize if false allows you to set replica 1",
                  "type": "boolean"
                },
                "size": {
                  "description": "Size - Number of copies per object in a replicated storage pool, including the object itself (required for replicated pool type)",
                  "minimum": 0,
                  "type": "integer"
                },
                "subFailureDomain": {
                  "description": "SubFailureDomain the name of the sub-failure domain",
                  "type": "string"
                },
                "targetSizeRatio": {
                  "description": "TargetSizeRatio gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity",
                  "minimum": 0,
                  "type": "number"
                }
              },
              "required": [
                "size"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "statusCheck": {
              "description": "The mirroring statusCheck",
              "properties": {
                "mirror": {
                  "description": "HealthCheckSpec represents the health check of an object store bucket",
                  "nullable": true,
                  "properties": {
                    "disabled": {
                      "type": "boolean"
                    },
                    "interval": {
                      "description": "Interval is the internal in second or minute for the health check to run like 60s for 60 seconds",
                      "type": "string"
                    },
                    "timeout": {
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "x-kubernetes-preserve-unknown-fields": true,
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "metadataPool": {
          "description": "The metadata pool settings",
          "nullable": true,
          "properties": {
            "application": {
              "description": "The application name to set on the pool. Only expected to be set for rgw pools.",
              "type": "string"
            },
            "compressionMode": {
              "description": "DEPRECATED: use Parameters instead, e.g., Parameters[\"compression_mode\"] = \"force\"\nThe inline compression mode in Bluestore OSD to set to (options are: none, passive, aggressive, force)\nDo NOT set a default value for kubebuilder as this will override the Parameters",
              "enum": [
                "none",
                "passive",
                "aggressive",
                "force",
                ""
              ],
              "nullable": true,
              "type": "string"
            },
            "crushRoot": {
              "description": "The root of the crush hierarchy utilized by the pool",
              "nullable": true,
              "type": "string"
            },
            "deviceClass": {
              "description": "The device class the OSD should set to for use in the pool",
              "nullable": true,
              "type": "string"
            },
            "enableCrushUpdates": {
              "description": "Allow rook operator to change the pool CRUSH tunables once the pool is created",
              "nullable": true,
              "type": "boolean"
            },
            "enableRBDStats": {
              "description": "EnableRBDStats is used to enable gathering of statistics for all RBD images in the pool",
              "type": "boolean"
            },
            "erasureCoded": {
              "description": "The erasure code settings",
              "properties": {
                "algorithm": {
                  "description": "The algorithm for erasure coding.\nIf absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.",
                  "enum": [
                    "isa",
                    "jerasure"
                  ],
                  "type": "string"
                },
                "codingChunks": {
                  "description": "Number of coding chunks per object in an erasure coded storage pool (required for erasure-coded pool type).\nThis is the number of OSDs that can be lost simultaneously before data cannot be recovered.",
                  "minimum": 0,
                  "type": "integer"
                },
                "dataChunks": {
                  "description": "Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type).\nThe number of chunks required to recover an object when any single OSD is lost is the same\nas dataChunks so be aware that the larger the number of data chunks, the higher the cost of recovery.",
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "required": [
                "codingChunks",
                "dataChunks"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "failureDomain": {
              "description": "The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map",
              "type": "string"
            },
            "mirroring": {
              "description": "The mirroring settings",
              "properties": {
                "enabled": {
                  "description": "Enabled whether this pool is mirrored or not",
                  "type": "boolean"
                },
                "mode": {
                  "description": "Mode is the mirroring mode: pool, image or init-only.",
                  "enum": [
                    "pool",
                    "image",
                    "init-only"
                  ],
                  "type": "string"
                },
                "peers": {
                  "description": "Peers represents the peers spec",
                  "nullable": true,
                  "properties": {
                    "secretNames": {
                      "description": "SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "snapshotSchedules": {
                  "description": "SnapshotSchedules is the scheduling of snapshot for mirrored images/pools",
                  "items": {
                    "description": "SnapshotScheduleSpec represents the snapshot scheduling settings of a mirrored pool",
                    "properties": {
                      "interval": {
                        "description": "Interval represent the periodicity of the snapshot.",
                        "type": "string"
                      },
                      "path": {
                        "description": "Path is the path to snapshot, only valid for CephFS",
                        "type": "string"
                      },
                      "startTime": {
                        "description": "StartTime indicates when to start the snapshot",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "parameters": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "Parameters is a list of properties to enable on a given pool",
              "nullable": true,
              "type": "object",
              "x-kubernetes-preserve-unknown-fields": true
            },
            "quotas": {
              "description": "The quota settings",
              "nullable": true,
              "properties": {
                "maxBytes": {
                  "description": "MaxBytes represents the quota in bytes\nDeprecated in favor of MaxSize",
                  "format": "int64",
                  "type": "integer"
                },
                "maxObjects": {
                  "description": "MaxObjects represents the quota in objects",
                  "format": "int64",
                  "type": "integer"
                },
                "maxSize": {
                  "description": "MaxSize represents the quota in bytes as a string",
                  "pattern": "^[0-9]+[\\.]?[0-9]*([KMGTPE]i|[kMGTPE])?$",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "replicated": {
              "description": "The replication settings",
              "properties": {
                "hybridStorage": {
                  "description": "HybridStorage represents hybrid storage tier settings",
                  "nullable": true,
                  "properties": {
                    "primaryDeviceClass": {
                      "description": "PrimaryDeviceClass represents high performance tier (for example SSD or NVME) for Primary OSD",
                      "minLength": 1,
                      "type": "string"
                    },
                    "secondaryDeviceClass": {
                      "description": "SecondaryDeviceClass represents low performance tier (for example HDDs) for remaining OSDs",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "primaryDeviceClass",
                    "secondaryDeviceClass"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "replicasPerFailureDomain": {
                  "description": "ReplicasPerFailureDomain the number of replica in the specified failure domain",
                  "minimum": 1,
                  "type": "integer"
                },
                "requireSafeReplicaSize": {
                  "description": "RequireSafeReplicaSize if false allows you to set replica 1",
                  "type": "boolean"
                },
                "size": {
                  "description": "Size - Number of copies per object in a replicated storage pool, including the object itself (required for replicated pool type)",
                  "minimum": 0,
                  "type": "integer"
                },
                "subFailureDomain": {
                  "description": "SubFailureDomain the name of the sub-failure domain",
                  "type": "string"
                },
                "targetSizeRatio": {
                  "description": "TargetSizeRatio gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity",
                  "minimum": 0,
                  "type": "number"
                }
              },
              "required": [
                "size"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "statusCheck": {
              "description": "The mirroring statusCheck",
              "properties": {
                "mirror": {
                  "description": "HealthCheckSpec represents the health check of an object store bucket",
                  "nullable": true,
                  "properties": {
                    "disabled": {
                      "type": "boolean"
                    },
                    "interval": {
                      "description": "Interval is the internal in second or minute for the health check to run like 60s for 60 seconds",
                      "type": "string"
                    },
                    "timeout": {
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "x-kubernetes-preserve-unknown-fields": true,
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "preservePoolsOnDelete": {
          "default": true,
          "description": "Preserve pools on object zone deletion",
          "type": "boolean"
        },
        "sharedPools": {
          "description": "The pool information when configuring RADOS namespaces in existing pools.",
          "nullable": true,
          "properties": {
            "dataPoolName": {
              "description": "The data pool used for creating RADOS namespaces in the object store",
              "type": "string",
              "x-kubernetes-validations": [
                {
                  "message": "object store shared data pool is immutable",
                  "rule": "self == oldSelf"
                }
              ]
            },
            "metadataPoolName": {
              "description": "The metadata pool used for creating RADOS namespaces in the object store",
              "type": "string",
              "x-kubernetes-validations": [
                {
                  "message": "object store shared metadata pool is immutable",
                  "rule": "self == oldSelf"
                }
              ]
            },
            "poolPlacements": {
              "description": "PoolPlacements control which Pools are associated with a particular RGW bucket.\nOnce PoolPlacements are defined, RGW client will be able to associate pool\nwith ObjectStore bucket by providing \"<LocationConstraint>\" during s3 bucket creation\nor \"X-Storage-Policy\" header during swift container creation.\nSee: https://docs.ceph.com/en/latest/radosgw/placement/#placement-targets\nPoolPlacement with name: \"default\" will be used as a default pool if no option\nis provided during bucket creation.\nIf default placement is not provided, spec.sharedPools.dataPoolName and spec.sharedPools.MetadataPoolName will be used as default pools.\nIf spec.sharedPools are also empty, then RGW pools (spec.dataPool and spec.metadataPool) will be used as defaults.",
              "items": {
                "properties": {
                  "dataNonECPoolName": {
                    "description": "The data pool used to store ObjectStore data that cannot use erasure coding (ex: multi-part uploads).\nIf dataPoolName is not erasure coded, then there is no need for dataNonECPoolName.\nWARNING: Do not change this field after creation. Pool names are used in RADOS namespaces and renaming leads to data loss.",
                    "type": "string"
                  },
                  "dataPoolName": {
                    "description": "The data pool used to store ObjectStore objects data.\nWARNING: Do not change this field after creation. Pool names are used in RADOS namespaces and renaming leads to data loss.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "default": {
                    "description": "Sets given placement as default. Only one placement in the list can be marked as default.\nDefault is false.",
                    "type": "boolean"
                  },
                  "metadataPoolName": {
                    "description": "The metadata pool used to store ObjectStore bucket index.\nWARNING: Do not change this field after creation. Pool names are used in RADOS namespaces and renaming leads to data loss.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "name": {
                    "description": "Pool placement name. Name can be arbitrary. Placement with name \"default\" will be used as default.",
                    "minLength": 1,
                    "pattern": "^[a-zA-Z0-9._/-]+$",
                    "type": "string"
                  },
                  "storageClasses": {
                    "description": "StorageClasses can be selected by user to override dataPoolName during object creation.\nEach placement has default STANDARD StorageClass pointing to dataPoolName.\nThis list allows defining additional StorageClasses on top of default STANDARD storage class.",
                    "items": {
                      "properties": {
                        "dataPoolName": {
                          "description": "DataPoolName is the data pool used to store ObjectStore objects data.\nWARNING: Do not change this field after creation. Pool names are used in RADOS namespaces and renaming leads to data loss.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "name": {
                          "description": "Name is the StorageClass name. Ceph allows arbitrary name for StorageClasses,\nhowever most clients/libs insist on AWS names so it is recommended to use\none of the valid x-amz-storage-class values for better compatibility:\nREDUCED_REDUNDANCY | STANDARD_IA | ONEZONE_IA | INTELLIGENT_TIERING | GLACIER | DEEP_ARCHIVE | OUTPOSTS | GLACIER_IR | SNOW | EXPRESS_ONEZONE\nSee AWS docs: https://aws.amazon.com/de/s3/storage-classes/",
                          "minLength": 1,
                          "pattern": "^[a-zA-Z0-9._/-]+$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "dataPoolName",
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                },
                "required": [
                  "dataPoolName",
                  "metadataPoolName",
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            },
            "preserveRadosNamespaceDataOnDelete": {
              "description": "Whether the RADOS namespaces should be preserved on deletion of the object store",
              "type": "boolean"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "zoneGroup": {
          "description": "The name of the zone group the zone is a member of.",
          "type": "string"
        }
      },
      "required": [
        "zoneGroup"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "Status represents the status of an object",
      "properties": {
        "conditions": {
          "items": {
            "description": "Condition represents a status condition on any Rook-Ceph Custom Resource.",
            "properties": {
              "lastHeartbeatTime": {
                "format": "date-time",
                "type": "string"
              },
              "lastTransitionTime": {
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "reason": {
                "description": "ConditionReason is a reason for a condition",
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "type": {
                "description": "ConditionType represent a resource's status",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the latest generation observed by the controller.",
          "format": "int64",
          "type": "integer"
        },
        "phase": {
          "type": "string"
        }
      },
      "type": "object",
      "x-kubernetes-preserve-unknown-fields": true,
      "additionalProperties": false
    }
  },
  "required": [
    "metadata",
    "spec"
  ],
  "type": "object"
}
