{
  "description": "K8sGPT is the Schema for the k8sgpts 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",
        "null"
      ]
    },
    "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",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "K8sGPTSpec defines the desired state of K8sGPT",
      "properties": {
        "ai": {
          "additionalProperties": false,
          "properties": {
            "anonymized": {
              "default": true,
              "type": [
                "boolean",
                "null"
              ]
            },
            "autoRemediation": {
              "additionalProperties": false,
              "properties": {
                "enabled": {
                  "default": false,
                  "type": "boolean"
                },
                "resources": {
                  "default": [
                    "Pod",
                    "Deployment",
                    "Service",
                    "Ingress"
                  ],
                  "description": "Support Pod, Deployment, Service and Ingress",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "similarityRequirement": {
                  "default": "90",
                  "description": "Defaults to 10%",
                  "type": "string"
                }
              },
              "required": [
                "enabled",
                "resources",
                "similarityRequirement"
              ],
              "type": [
                "object",
                "null"
              ]
            },
            "backOff": {
              "additionalProperties": false,
              "properties": {
                "enabled": {
                  "default": false,
                  "type": "boolean"
                },
                "maxRetries": {
                  "default": 5,
                  "type": "integer"
                }
              },
              "required": [
                "enabled",
                "maxRetries"
              ],
              "type": [
                "object",
                "null"
              ]
            },
            "backend": {
              "default": "openai",
              "enum": [
                "ibmwatsonxai",
                "openai",
                "localai",
                "azureopenai",
                "amazonbedrock",
                "cohere",
                "amazonsagemaker",
                "google",
                "googlevertexai",
                "customrest"
              ],
              "type": "string"
            },
            "baseUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "enabled": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "engine": {
              "type": [
                "string",
                "null"
              ]
            },
            "language": {
              "default": "english",
              "type": [
                "string",
                "null"
              ]
            },
            "maxTokens": {
              "default": "2048",
              "type": [
                "string",
                "null"
              ]
            },
            "model": {
              "default": "gpt-4o-mini",
              "type": [
                "string",
                "null"
              ]
            },
            "providerId": {
              "type": [
                "string",
                "null"
              ]
            },
            "proxyEndpoint": {
              "type": [
                "string",
                "null"
              ]
            },
            "region": {
              "type": [
                "string",
                "null"
              ]
            },
            "secret": {
              "additionalProperties": false,
              "properties": {
                "key": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "topk": {
              "default": "50",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "backend"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "analysis": {
          "additionalProperties": false,
          "properties": {
            "interval": {
              "description": "Interval is the time between analysis runs",
              "pattern": "^[0-9]+[smh]$",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "customAnalyzers": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "connection": {
                "additionalProperties": false,
                "properties": {
                  "port": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "extraOptions": {
          "additionalProperties": false,
          "properties": {
            "backstage": {
              "additionalProperties": false,
              "properties": {
                "enabled": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "serviceAccountIRSA": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "filters": {
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "imagePullPolicy": {
          "description": "PullPolicy describes a policy for if/when to pull a container image",
          "type": [
            "string",
            "null"
          ]
        },
        "imagePullSecrets": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "integrations": {
          "additionalProperties": false,
          "properties": {
            "trivy": {
              "additionalProperties": false,
              "properties": {
                "enabled": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "namespace": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "skipInstall": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "kubeconfig": {
          "additionalProperties": false,
          "description": "Define the kubeconfig the Deployment must use.\nIf empty, the Deployment will use the ServiceAccount provided by Kubernetes itself.",
          "properties": {
            "key": {
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "noCache": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "nodeSelector": {
          "additionalProperties": {
            "type": "string"
          },
          "type": [
            "object",
            "null"
          ]
        },
        "remoteCache": {
          "additionalProperties": false,
          "properties": {
            "azure": {
              "additionalProperties": false,
              "properties": {
                "containerName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "storageAccount": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "credentials": {
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "gcs": {
              "additionalProperties": false,
              "properties": {
                "bucketName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "projectId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "region": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "interplex": {
              "additionalProperties": false,
              "properties": {
                "endpoint": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "s3": {
              "additionalProperties": false,
              "properties": {
                "bucketName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "region": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "repository": {
          "default": "ghcr.io/k8sgpt-ai/k8sgpt",
          "type": [
            "string",
            "null"
          ]
        },
        "resources": {
          "additionalProperties": false,
          "description": "ResourceRequirements describes the compute resource requirements.",
          "properties": {
            "claims": {
              "description": "Claims lists the names of resources, defined in spec.resourceClaims,\nthat are used by this container.\n\nThis is an alpha field and requires enabling the\nDynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.",
              "items": {
                "additionalProperties": false,
                "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",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ],
              "x-kubernetes-list-map-keys": [
                "name"
              ],
              "x-kubernetes-list-type": "map"
            },
            "limits": {
              "additionalProperties": {
                "oneOf": [
                  {
                    "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                    "type": "string"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "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",
                "null"
              ]
            },
            "requests": {
              "additionalProperties": {
                "oneOf": [
                  {
                    "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                    "type": "string"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "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",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "sink": {
          "additionalProperties": false,
          "properties": {
            "channel": {
              "type": [
                "string",
                "null"
              ]
            },
            "icon_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "secret": {
              "additionalProperties": false,
              "properties": {
                "key": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "type": {
              "enum": [
                "slack",
                "mattermost",
                "cloudevents"
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "username": {
              "type": [
                "string",
                "null"
              ]
            },
            "webhook": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "targetNamespace": {
          "type": [
            "string",
            "null"
          ]
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "description": "K8sGPTStatus defines the observed state of K8sGPT\nshow the current backend used",
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}