{
  "type": "object",
  "description": "Schema validation for the AWXRestore CRD",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More 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. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "type": "object",
      "x-kubernetes-preserve-unknown-fields": true,
      "required": [
        "deployment_name"
      ],
      "properties": {
        "backup_source": {
          "description": "Backup source",
          "type": "string",
          "enum": [
            "Backup CR",
            "PVC"
          ]
        },
        "deployment_name": {
          "description": "Name of the restored deployment. This should be different from the original deployment name if the original deployment still exists.",
          "type": "string"
        },
        "cluster_name": {
          "description": "Cluster name",
          "type": "string"
        },
        "backup_name": {
          "description": "AWXBackup object name",
          "type": "string"
        },
        "backup_pvc": {
          "description": "Name of the PVC to be restored from, set as a status found on the awxbackup object (backupClaim)",
          "type": "string"
        },
        "backup_pvc_namespace": {
          "description": "(Deprecated) Namespace the PVC is in",
          "type": "string"
        },
        "backup_dir": {
          "description": "Backup directory name, set as a status found on the awxbackup object (backupDirectory)",
          "type": "string"
        },
        "restore_resource_requirements": {
          "description": "Resource requirements for the management pod that restores AWX from a backup",
          "properties": {
            "requests": {
              "properties": {
                "cpu": {
                  "type": "string"
                },
                "memory": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "limits": {
              "properties": {
                "cpu": {
                  "type": "string"
                },
                "memory": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "postgres_label_selector": {
          "description": "Label selector used to identify postgres pod for backing up data",
          "type": "string"
        },
        "postgres_image": {
          "description": "Registry path to the PostgreSQL container to use",
          "type": "string"
        },
        "postgres_image_version": {
          "description": "PostgreSQL container image version to use",
          "type": "string"
        },
        "spec_overrides": {
          "description": "Overrides for the AWX spec",
          "type": "object",
          "x-kubernetes-preserve-unknown-fields": true
        },
        "image_pull_policy": {
          "description": "The image pull policy",
          "type": "string",
          "default": "IfNotPresent",
          "enum": [
            "Always",
            "always",
            "Never",
            "never",
            "IfNotPresent",
            "ifnotpresent"
          ]
        },
        "db_management_pod_node_selector": {
          "description": "nodeSelector for the Postgres pods to backup",
          "type": "string"
        },
        "no_log": {
          "description": "Configure no_log for no_log tasks",
          "type": "boolean",
          "default": true
        },
        "additional_labels": {
          "description": "Additional labels defined on the resource, which should be propagated to child resources",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "set_self_labels": {
          "description": "Maintain some of the recommended `app.kubernetes.io/*` labels on the resource (self)",
          "type": "boolean",
          "default": true
        },
        "force_drop_db": {
          "description": "Force drop the database before restoring. USE WITH CAUTION!",
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    },
    "status": {
      "type": "object",
      "x-kubernetes-preserve-unknown-fields": true,
      "properties": {
        "conditions": {
          "description": "The resulting conditions when a Service Telemetry is instantiated",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "restoreComplete": {
          "description": "Restore process complete",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  }
}
