{
  "description": "Recommendation is the Schema for the recommendations 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": "RecommendationSpec defines the desired state of Recommendation",
      "properties": {
        "containersGrouping": {
          "description": "Defines rules for grouping containers based on specific attributes.",
          "items": {
            "properties": {
              "into": {
                "description": "The target container name into which matching containers should be grouped",
                "type": "string"
              },
              "key": {
                "description": "The attribute used to match containers. `name` refers to container name property",
                "enum": [
                  "name"
                ],
                "type": "string"
              },
              "operator": {
                "description": "Defines how the 'key' is evaluated against the 'values' list",
                "enum": [
                  "contains"
                ],
                "type": "string"
              },
              "values": {
                "description": "A list of string values used for matching against the 'key' with the specified operator",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "into",
              "key",
              "operator",
              "values"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "hpa": {
          "properties": {
            "spec": {
              "description": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.",
              "properties": {
                "behavior": {
                  "description": "behavior configures the scaling behavior of the target\nin both Up and Down directions (scaleUp and scaleDown fields respectively).\nIf not set, the default HPAScalingRules for scale up and scale down are used.",
                  "properties": {
                    "scaleDown": {
                      "description": "scaleDown is scaling policy for scaling Down.\nIf not set, the default value is to allow to scale down to minReplicas pods, with a\n300 second stabilization window (i.e., the highest recommendation for\nthe last 300sec is used).",
                      "properties": {
                        "policies": {
                          "description": "policies is a list of potential scaling polices which can be used during scaling.\nIf not set, use the default values:\n- For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window.\n- For scale down: allow all pods to be removed in a 15s window.",
                          "items": {
                            "description": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.",
                            "properties": {
                              "periodSeconds": {
                                "description": "periodSeconds specifies the window of time for which the policy should hold true.\nPeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).",
                                "format": "int32",
                                "type": "integer"
                              },
                              "type": {
                                "description": "type is used to specify the scaling policy.",
                                "type": "string"
                              },
                              "value": {
                                "description": "value contains the amount of change which is permitted by the policy.\nIt must be greater than zero",
                                "format": "int32",
                                "type": "integer"
                              }
                            },
                            "required": [
                              "periodSeconds",
                              "type",
                              "value"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "type": "array",
                          "x-kubernetes-list-type": "atomic"
                        },
                        "selectPolicy": {
                          "description": "selectPolicy is used to specify which policy should be used.\nIf not set, the default value Max is used.",
                          "type": "string"
                        },
                        "stabilizationWindowSeconds": {
                          "description": "stabilizationWindowSeconds is the number of seconds for which past recommendations should be\nconsidered while scaling up or scaling down.\nStabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour).\nIf not set, use the default values:\n- For scale up: 0 (i.e. no stabilization is done).\n- For scale down: 300 (i.e. the stabilization window is 300 seconds long).",
                          "format": "int32",
                          "type": "integer"
                        },
                        "tolerance": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "tolerance is the tolerance on the ratio between the current and desired\nmetric value under which no updates are made to the desired number of\nreplicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not\nset, the default cluster-wide tolerance is applied (by default 10%).\n\nFor example, if autoscaling is configured with a memory consumption target of 100Mi,\nand scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be\ntriggered when the actual consumption falls below 95Mi or exceeds 101Mi.\n\nThis is an alpha field and requires enabling the HPAConfigurableTolerance\nfeature gate.",
                          "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",
                      "additionalProperties": false
                    },
                    "scaleUp": {
                      "description": "scaleUp is scaling policy for scaling Up.\nIf not set, the default value is the higher of:\n  * increase no more than 4 pods per 60 seconds\n  * double the number of pods per 60 seconds\nNo stabilization is used.",
                      "properties": {
                        "policies": {
                          "description": "policies is a list of potential scaling polices which can be used during scaling.\nIf not set, use the default values:\n- For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window.\n- For scale down: allow all pods to be removed in a 15s window.",
                          "items": {
                            "description": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.",
                            "properties": {
                              "periodSeconds": {
                                "description": "periodSeconds specifies the window of time for which the policy should hold true.\nPeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).",
                                "format": "int32",
                                "type": "integer"
                              },
                              "type": {
                                "description": "type is used to specify the scaling policy.",
                                "type": "string"
                              },
                              "value": {
                                "description": "value contains the amount of change which is permitted by the policy.\nIt must be greater than zero",
                                "format": "int32",
                                "type": "integer"
                              }
                            },
                            "required": [
                              "periodSeconds",
                              "type",
                              "value"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "type": "array",
                          "x-kubernetes-list-type": "atomic"
                        },
                        "selectPolicy": {
                          "description": "selectPolicy is used to specify which policy should be used.\nIf not set, the default value Max is used.",
                          "type": "string"
                        },
                        "stabilizationWindowSeconds": {
                          "description": "stabilizationWindowSeconds is the number of seconds for which past recommendations should be\nconsidered while scaling up or scaling down.\nStabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour).\nIf not set, use the default values:\n- For scale up: 0 (i.e. no stabilization is done).\n- For scale down: 300 (i.e. the stabilization window is 300 seconds long).",
                          "format": "int32",
                          "type": "integer"
                        },
                        "tolerance": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "tolerance is the tolerance on the ratio between the current and desired\nmetric value under which no updates are made to the desired number of\nreplicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not\nset, the default cluster-wide tolerance is applied (by default 10%).\n\nFor example, if autoscaling is configured with a memory consumption target of 100Mi,\nand scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be\ntriggered when the actual consumption falls below 95Mi or exceeds 101Mi.\n\nThis is an alpha field and requires enabling the HPAConfigurableTolerance\nfeature gate.",
                          "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",
                      "additionalProperties": false
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "maxReplicas": {
                  "description": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.\nIt cannot be less that minReplicas.",
                  "format": "int32",
                  "type": "integer"
                },
                "metrics": {
                  "description": "metrics contains the specifications for which to use to calculate the\ndesired replica count (the maximum replica count across all metrics will\nbe used).  The desired replica count is calculated multiplying the\nratio between the target value and the current value by the current\nnumber of pods.  Ergo, metrics used must decrease as the pod count is\nincreased, and vice-versa.  See the individual metric source types for\nmore information about how each type of metric must respond.\nIf not set, the default metric will be set to 80% average CPU utilization.",
                  "items": {
                    "description": "MetricSpec specifies how to scale based on a single metric\n(only `type` and one other matching field should be set at once).",
                    "properties": {
                      "containerResource": {
                        "description": "containerResource refers to a resource metric (such as those specified in\nrequests and limits) known to Kubernetes describing a single container in\neach pod of the current scale target (e.g. CPU or memory). Such metrics are\nbuilt in to Kubernetes, and have special scaling options on top of those\navailable to normal per-pod metrics using the \"pods\" source.",
                        "properties": {
                          "container": {
                            "description": "container is the name of the container in the pods of the scaling target",
                            "type": "string"
                          },
                          "name": {
                            "description": "name is the name of the resource in question.",
                            "type": "string"
                          },
                          "target": {
                            "description": "target specifies the target value for the given metric",
                            "properties": {
                              "averageUtilization": {
                                "description": "averageUtilization is the target value of the average of the\nresource metric across all relevant pods, represented as a percentage of\nthe requested value of the resource for the pods.\nCurrently only valid for Resource metric source type",
                                "format": "int32",
                                "type": "integer"
                              },
                              "averageValue": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "averageValue is the target value of the average of the\nmetric across all relevant pods (as a quantity)",
                                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                                "x-kubernetes-int-or-string": true
                              },
                              "type": {
                                "description": "type represents whether the metric type is Utilization, Value, or AverageValue",
                                "type": "string"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "value is the target value of the metric (as a quantity).",
                                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                                "x-kubernetes-int-or-string": true
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "container",
                          "name",
                          "target"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "external": {
                        "description": "external refers to a global metric that is not associated\nwith any Kubernetes object. It allows autoscaling based on information\ncoming from components running outside of cluster\n(for example length of queue in cloud messaging service, or\nQPS from loadbalancer running outside of cluster).",
                        "properties": {
                          "metric": {
                            "description": "metric identifies the target metric by name and selector",
                            "properties": {
                              "name": {
                                "description": "name is the name of the given metric",
                                "type": "string"
                              },
                              "selector": {
                                "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric\nWhen set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.\nWhen unset, just the metricName will be used to gather metrics.",
                                "properties": {
                                  "matchExpressions": {
                                    "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
                                    "items": {
                                      "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.",
                                      "properties": {
                                        "key": {
                                          "description": "key is the label key that the selector applies to.",
                                          "type": "string"
                                        },
                                        "operator": {
                                          "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.",
                                          "type": "string"
                                        },
                                        "values": {
                                          "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array",
                                          "x-kubernetes-list-type": "atomic"
                                        }
                                      },
                                      "required": [
                                        "key",
                                        "operator"
                                      ],
                                      "type": "object",
                                      "additionalProperties": false
                                    },
                                    "type": "array",
                                    "x-kubernetes-list-type": "atomic"
                                  },
                                  "matchLabels": {
                                    "additionalProperties": {
                                      "type": "string"
                                    },
                                    "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
                                    "type": "object"
                                  }
                                },
                                "type": "object",
                                "x-kubernetes-map-type": "atomic",
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "target": {
                            "description": "target specifies the target value for the given metric",
                            "properties": {
                              "averageUtilization": {
                                "description": "averageUtilization is the target value of the average of the\nresource metric across all relevant pods, represented as a percentage of\nthe requested value of the resource for the pods.\nCurrently only valid for Resource metric source type",
                                "format": "int32",
                                "type": "integer"
                              },
                              "averageValue": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "averageValue is the target value of the average of the\nmetric across all relevant pods (as a quantity)",
                                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                                "x-kubernetes-int-or-string": true
                              },
                              "type": {
                                "description": "type represents whether the metric type is Utilization, Value, or AverageValue",
                                "type": "string"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "value is the target value of the metric (as a quantity).",
                                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                                "x-kubernetes-int-or-string": true
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "metric",
                          "target"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "object": {
                        "description": "object refers to a metric describing a single kubernetes object\n(for example, hits-per-second on an Ingress object).",
                        "properties": {
                          "describedObject": {
                            "description": "describedObject specifies the descriptions of a object,such as kind,name apiVersion",
                            "properties": {
                              "apiVersion": {
                                "description": "apiVersion is the API version of the referent",
                                "type": "string"
                              },
                              "kind": {
                                "description": "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                                "type": "string"
                              },
                              "name": {
                                "description": "name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "name"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "metric": {
                            "description": "metric identifies the target metric by name and selector",
                            "properties": {
                              "name": {
                                "description": "name is the name of the given metric",
                                "type": "string"
                              },
                              "selector": {
                                "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric\nWhen set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.\nWhen unset, just the metricName will be used to gather metrics.",
                                "properties": {
                                  "matchExpressions": {
                                    "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
                                    "items": {
                                      "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.",
                                      "properties": {
                                        "key": {
                                          "description": "key is the label key that the selector applies to.",
                                          "type": "string"
                                        },
                                        "operator": {
                                          "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.",
                                          "type": "string"
                                        },
                                        "values": {
                                          "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array",
                                          "x-kubernetes-list-type": "atomic"
                                        }
                                      },
                                      "required": [
                                        "key",
                                        "operator"
                                      ],
                                      "type": "object",
                                      "additionalProperties": false
                                    },
                                    "type": "array",
                                    "x-kubernetes-list-type": "atomic"
                                  },
                                  "matchLabels": {
                                    "additionalProperties": {
                                      "type": "string"
                                    },
                                    "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
                                    "type": "object"
                                  }
                                },
                                "type": "object",
                                "x-kubernetes-map-type": "atomic",
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "target": {
                            "description": "target specifies the target value for the given metric",
                            "properties": {
                              "averageUtilization": {
                                "description": "averageUtilization is the target value of the average of the\nresource metric across all relevant pods, represented as a percentage of\nthe requested value of the resource for the pods.\nCurrently only valid for Resource metric source type",
                                "format": "int32",
                                "type": "integer"
                              },
                              "averageValue": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "averageValue is the target value of the average of the\nmetric across all relevant pods (as a quantity)",
                                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                                "x-kubernetes-int-or-string": true
                              },
                              "type": {
                                "description": "type represents whether the metric type is Utilization, Value, or AverageValue",
                                "type": "string"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "value is the target value of the metric (as a quantity).",
                                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                                "x-kubernetes-int-or-string": true
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "describedObject",
                          "metric",
                          "target"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "pods": {
                        "description": "pods refers to a metric describing each pod in the current scale target\n(for example, transactions-processed-per-second).  The values will be\naveraged together before being compared to the target value.",
                        "properties": {
                          "metric": {
                            "description": "metric identifies the target metric by name and selector",
                            "properties": {
                              "name": {
                                "description": "name is the name of the given metric",
                                "type": "string"
                              },
                              "selector": {
                                "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric\nWhen set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.\nWhen unset, just the metricName will be used to gather metrics.",
                                "properties": {
                                  "matchExpressions": {
                                    "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
                                    "items": {
                                      "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.",
                                      "properties": {
                                        "key": {
                                          "description": "key is the label key that the selector applies to.",
                                          "type": "string"
                                        },
                                        "operator": {
                                          "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.",
                                          "type": "string"
                                        },
                                        "values": {
                                          "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array",
                                          "x-kubernetes-list-type": "atomic"
                                        }
                                      },
                                      "required": [
                                        "key",
                                        "operator"
                                      ],
                                      "type": "object",
                                      "additionalProperties": false
                                    },
                                    "type": "array",
                                    "x-kubernetes-list-type": "atomic"
                                  },
                                  "matchLabels": {
                                    "additionalProperties": {
                                      "type": "string"
                                    },
                                    "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
                                    "type": "object"
                                  }
                                },
                                "type": "object",
                                "x-kubernetes-map-type": "atomic",
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "target": {
                            "description": "target specifies the target value for the given metric",
                            "properties": {
                              "averageUtilization": {
                                "description": "averageUtilization is the target value of the average of the\nresource metric across all relevant pods, represented as a percentage of\nthe requested value of the resource for the pods.\nCurrently only valid for Resource metric source type",
                                "format": "int32",
                                "type": "integer"
                              },
                              "averageValue": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "averageValue is the target value of the average of the\nmetric across all relevant pods (as a quantity)",
                                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                                "x-kubernetes-int-or-string": true
                              },
                              "type": {
                                "description": "type represents whether the metric type is Utilization, Value, or AverageValue",
                                "type": "string"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "value is the target value of the metric (as a quantity).",
                                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                                "x-kubernetes-int-or-string": true
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "metric",
                          "target"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "resource": {
                        "description": "resource refers to a resource metric (such as those specified in\nrequests and limits) known to Kubernetes describing each pod in the\ncurrent scale target (e.g. CPU or memory). Such metrics are built in to\nKubernetes, and have special scaling options on top of those available\nto normal per-pod metrics using the \"pods\" source.",
                        "properties": {
                          "name": {
                            "description": "name is the name of the resource in question.",
                            "type": "string"
                          },
                          "target": {
                            "description": "target specifies the target value for the given metric",
                            "properties": {
                              "averageUtilization": {
                                "description": "averageUtilization is the target value of the average of the\nresource metric across all relevant pods, represented as a percentage of\nthe requested value of the resource for the pods.\nCurrently only valid for Resource metric source type",
                                "format": "int32",
                                "type": "integer"
                              },
                              "averageValue": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "averageValue is the target value of the average of the\nmetric across all relevant pods (as a quantity)",
                                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                                "x-kubernetes-int-or-string": true
                              },
                              "type": {
                                "description": "type represents whether the metric type is Utilization, Value, or AverageValue",
                                "type": "string"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "value is the target value of the metric (as a quantity).",
                                "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                                "x-kubernetes-int-or-string": true
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "name",
                          "target"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": {
                        "description": "type is the type of metric source.  It should be one of \"ContainerResource\", \"External\",\n\"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array",
                  "x-kubernetes-list-type": "atomic"
                },
                "minReplicas": {
                  "description": "minReplicas is the lower limit for the number of replicas to which the autoscaler\ncan scale down.  It defaults to 1 pod.  minReplicas is allowed to be 0 if the\nalpha feature gate HPAScaleToZero is enabled and at least one Object or External\nmetric is configured.  Scaling is active as long as at least one metric value is\navailable.",
                  "format": "int32",
                  "type": "integer"
                },
                "scaleTargetRef": {
                  "description": "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics\nshould be collected, as well as to actually change the replica count.",
                  "properties": {
                    "apiVersion": {
                      "description": "apiVersion is the API version of the referent",
                      "type": "string"
                    },
                    "kind": {
                      "description": "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                      "type": "string"
                    },
                    "name": {
                      "description": "name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "name"
                  ],
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "required": [
                "maxReplicas",
                "scaleTargetRef"
              ],
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "recommendation": {
          "items": {
            "description": "ContainerAdjustments represents the adjustments to be made to a Pod container.",
            "properties": {
              "containerName": {
                "type": "string"
              },
              "env": {
                "description": "EnvVars represents a list of environment variables to be injected into a container.\nIf the same variable name appears multiple times, the last one in the list takes precedence.",
                "items": {
                  "description": "EnvVar defines a single environment variable to be set in a container during pod creation.",
                  "properties": {
                    "name": {
                      "description": "Name of the environment variable.",
                      "type": "string"
                    },
                    "onConflict": {
                      "default": {
                        "type": "Ignore"
                      },
                      "description": "OnConflict defines the strategy to resolve conflicts when a variable with the same name already exists.\nIf not specified, defaults to 'Ignore'.",
                      "properties": {
                        "separator": {
                          "description": "Separator is used to separate the new value from the existing one when OnConflict is set to Append.",
                          "type": "string"
                        },
                        "type": {
                          "default": "Ignore",
                          "description": "Type determines what happens if a variable with the same name already exists in the container.\nDefaults to 'Ignore' if not specified.",
                          "enum": [
                            "Ignore",
                            "Append"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "fieldPath": ".separator",
                          "message": "separator must be empty if the type is not Append",
                          "reason": "FieldValueForbidden",
                          "rule": "!(has(self.separator) && self.type != 'Append')"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "value": {
                      "description": "Value of the environment variable.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "value"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "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": "ResourceList is a set of (resource name, quantity) pairs.",
                "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": "ResourceList is a set of (resource name, quantity) pairs.",
                "type": "object"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "replicas": {
          "format": "int32",
          "type": "integer"
        },
        "rolloutBehavior": {
          "description": "Defines workload rollout behavior while recommendation is being applied/removed.",
          "properties": {
            "type": {
              "description": "Defines workload rollout behavior while recommendation is being applied/removed.",
              "enum": [
                "NoDisruption"
              ],
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "targetRef": {
          "properties": {
            "apiVersion": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "recommendation",
        "targetRef"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "RecommendationStatus defines the observed state of Recommendation",
      "properties": {
        "conditions": {
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
