{
  "description": "Database is the Schema for the databases 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": "DatabaseSpec defines the desired state of Database",
      "properties": {
        "backup": {
          "description": "DatabaseBackup defines the desired state of backup and schedule",
          "properties": {
            "cron": {
              "type": "string"
            },
            "enable": {
              "type": "boolean"
            }
          },
          "required": [
            "cron",
            "enable"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "cleanup": {
          "type": "boolean"
        },
        "credentials": {
          "description": "Credentials should be used to setup everything relates to k8s secrets and configmaps\nTODO(@allanger): Field .spec.secretName should be moved here in the v1beta2 version",
          "properties": {
            "templates": {
              "description": "Templates to add custom entries to ConfigMaps and Secrets",
              "items": {
                "description": "Tempaltes to add custom entries to ConfigMaps and Secrets",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "secret": {
                    "type": "boolean"
                  },
                  "template": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "secret",
                  "template"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "deletionProtected": {
          "type": "boolean"
        },
        "instance": {
          "type": "string"
        },
        "postgres": {
          "description": "Postgres struct should be used to provide resource that only applicable to postgres",
          "properties": {
            "dropPublicSchema": {
              "description": "If set to true, the public schema will be dropped after the database creation",
              "type": "boolean"
            },
            "extensions": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "schemas": {
              "description": "Specify schemas to be created. The user created by db-operator will have all access on them.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "template": {
              "description": "Let user create database from template",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "secretName": {
          "type": "string"
        },
        "secretsTemplates": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        }
      },
      "required": [
        "backup",
        "deletionProtected",
        "instance",
        "secretName"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "DatabaseStatus defines the observed state of Database",
      "properties": {
        "database": {
          "type": "string"
        },
        "engine": {
          "type": "string"
        },
        "monitorUserSecret": {
          "type": "string"
        },
        "operatorVersion": {
          "type": "string"
        },
        "proxyStatus": {
          "description": "DatabaseProxyStatus defines whether proxy for database is enabled or not\nif so, provide information",
          "properties": {
            "serviceName": {
              "type": "string"
            },
            "sqlPort": {
              "format": "int32",
              "type": "integer"
            },
            "status": {
              "type": "boolean"
            }
          },
          "required": [
            "serviceName",
            "sqlPort",
            "status"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "status": {
          "description": "Important: Run \"make generate\" to regenerate code after modifying this file\nAdd custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html",
          "type": "boolean"
        },
        "user": {
          "type": "string"
        }
      },
      "required": [
        "database",
        "engine",
        "status",
        "user"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
