{
  "description": "PluginConfig the Schema for the PluginConfig API",
  "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": "spec defines the desired state of the PluginConfig",
      "properties": {
        "exporterConfig": {
          "description": "Defines options to inject, enable and configure a pgBackRest exporter\nsidecar into the cluster pods.\nWhen enabled, it adds a pgBackRest exporter container to expose backup\nand WAL archiving metrics for monitoring purposes.",
          "properties": {
            "collectInterval": {
              "default": 600,
              "description": "Collecting metrics interval in seconds.",
              "type": "integer"
            },
            "enabled": {
              "description": "Define if pgBackRest exporter should be enabled.",
              "type": "boolean"
            }
          },
          "required": [
            "collectInterval"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "resourcesRequirement": {
          "description": "Defines resource requests and limits for the pgBackRest sidecar containers.",
          "properties": {
            "claims": {
              "description": "Claims lists the names of resources, defined in spec.resourceClaims,\nthat are used by this container.\n\nThis field depends on the\nDynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.",
              "items": {
                "description": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
                "properties": {
                  "name": {
                    "description": "Name must match the name of one entry in pod.spec.resourceClaims of\nthe Pod where this field is used. It makes that resource available\ninside a container.",
                    "type": "string"
                  },
                  "request": {
                    "description": "Request is the name chosen for a request in the referenced claim.\nIf empty, everything from the claim is made available, otherwise\nonly the result of this request.",
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array",
              "x-kubernetes-list-map-keys": [
                "name"
              ],
              "x-kubernetes-list-type": "map"
            },
            "limits": {
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "string"
                  }
                ],
                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                "x-kubernetes-int-or-string": true
              },
              "description": "Limits describes the maximum amount of compute resources allowed.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
              "type": "object"
            },
            "requests": {
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "string"
                  }
                ],
                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                "x-kubernetes-int-or-string": true
              },
              "description": "Requests describes the minimum amount of compute resources required.\nIf Requests is omitted for a container, it defaults to Limits if that is explicitly specified,\notherwise to an implementation-defined value. Requests cannot exceed Limits.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
              "type": "object"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "storageConfig": {
          "description": "Defines the configuration for pgBackRest storage used to persist WALs\nwhen running in asynchronous mode. When provided, it allows to customize\nthe PersistentVolumeClaim settings (storage class and default size) for\nthe pgBackRest sidecars.",
          "properties": {
            "size": {
              "description": "Defines the size of storage request for pgBackRest WAL storage\nwhen running in asynchronous mode. This value determines the\ncapacity allocated to safely retain WALs.",
              "pattern": "^[0-9]+?[M|G]i$",
              "type": "string"
            },
            "storageClass": {
              "default": "default",
              "description": "Defines the storage class used for PersistentVolumeClaims\ncreated for the pgBackRest sidecar container. This storage will be used\nto safely store WAL segments when running in asynchronous mode.",
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "storageClass"
          ],
          "type": "object",
          "additionalProperties": false
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
