{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "apiVersion": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "resourcePolicy": {
          "properties": {
            "containerPolicies": {
              "items": {
                "properties": {
                  "containerName": {
                    "type": "string"
                  },
                  "maxAllowed": {
                    "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
                    },
                    "type": "object"
                  },
                  "minAllowed": {
                    "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
                    },
                    "type": "object"
                  },
                  "mode": {
                    "enum": [
                      "Auto",
                      "Off"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "targetRef": {
          "properties": {
            "apiVersion": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "name"
          ],
          "type": "object",
          "x-kubernetes-map-type": "atomic"
        },
        "updatePolicy": {
          "properties": {
            "updateMode": {
              "enum": [
                "Off",
                "Initial",
                "Recreate",
                "Auto"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "required": [
        "targetRef"
      ],
      "type": "object"
    },
    "status": {
      "properties": {
        "conditions": {
          "items": {
            "properties": {
              "lastTransitionTime": {
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "recommendation": {
          "properties": {
            "containerRecommendations": {
              "items": {
                "properties": {
                  "containerName": {
                    "type": "string"
                  },
                  "lowerBound": {
                    "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
                    },
                    "type": "object"
                  },
                  "target": {
                    "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
                    },
                    "type": "object"
                  },
                  "uncappedTarget": {
                    "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
                    },
                    "type": "object"
                  },
                  "upperBound": {
                    "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
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "target"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
