{
  "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"
    },
    "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": "K8sGPTSpec defines the desired state of K8sGPT",
      "properties": {
        "ai": {
          "properties": {
            "anonymized": {
              "default": true,
              "type": "boolean"
            },
            "autoRemediation": {
              "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",
              "additionalProperties": false
            },
            "backOff": {
              "properties": {
                "enabled": {
                  "default": false,
                  "type": "boolean"
                },
                "maxRetries": {
                  "default": 5,
                  "type": "integer"
                }
              },
              "required": [
                "enabled",
                "maxRetries"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "backend": {
              "default": "openai",
              "enum": [
                "ibmwatsonxai",
                "openai",
                "localai",
                "azureopenai",
                "amazonbedrock",
                "cohere",
                "amazonsagemaker",
                "google",
                "googlevertexai",
                "customrest"
              ],
              "type": "string"
            },
            "baseUrl": {
              "type": "string"
            },
            "enabled": {
              "type": "boolean"
            },
            "engine": {
              "type": "string"
            },
            "language": {
              "default": "english",
              "type": "string"
            },
            "maxTokens": {
              "default": "2048",
              "type": "string"
            },
            "model": {
              "default": "gpt-4o-mini",
              "type": "string"
            },
            "providerId": {
              "type": "string"
            },
            "proxyEndpoint": {
              "type": "string"
            },
            "region": {
              "type": "string"
            },
            "secret": {
              "properties": {
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "topk": {
              "default": "50",
              "type": "string"
            }
          },
          "required": [
            "backend"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "analysis": {
          "properties": {
            "interval": {
              "description": "Interval is the time between analysis runs",
              "pattern": "^[0-9]+[smh]$",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "customAnalyzers": {
          "items": {
            "properties": {
              "connection": {
                "properties": {
                  "port": {
                    "type": "integer"
                  },
                  "url": {
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "name": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "extraOptions": {
          "properties": {
            "backstage": {
              "properties": {
                "enabled": {
                  "type": "boolean"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "serviceAccountIRSA": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "filters": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "imagePullPolicy": {
          "description": "PullPolicy describes a policy for if/when to pull a container image",
          "type": "string"
        },
        "imagePullSecrets": {
          "items": {
            "properties": {
              "name": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "integrations": {
          "properties": {
            "trivy": {
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "namespace": {
                  "type": "string"
                },
                "skipInstall": {
                  "type": "boolean"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "kubeconfig": {
          "description": "Define the kubeconfig the Deployment must use.\nIf empty, the Deployment will use the ServiceAccount provided by Kubernetes itself.",
          "properties": {
            "key": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "noCache": {
          "type": "boolean"
        },
        "nodeSelector": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        "remoteCache": {
          "properties": {
            "azure": {
              "properties": {
                "containerName": {
                  "type": "string"
                },
                "storageAccount": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "credentials": {
              "properties": {
                "name": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "gcs": {
              "properties": {
                "bucketName": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "region": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "interplex": {
              "properties": {
                "endpoint": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "s3": {
              "properties": {
                "bucketName": {
                  "type": "string"
                },
                "region": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "repository": {
          "default": "ghcr.io/k8sgpt-ai/k8sgpt",
          "type": "string"
        },
        "resources": {
          "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": {
                "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"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array",
              "x-kubernetes-list-map-keys": [
                "name"
              ],
              "x-kubernetes-list-type": "map"
            },
            "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": "Limits describes the maximum amount of compute resources allowed.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
              "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": "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"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "sink": {
          "properties": {
            "channel": {
              "type": "string"
            },
            "icon_url": {
              "type": "string"
            },
            "secret": {
              "properties": {
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "type": {
              "enum": [
                "slack",
                "mattermost",
                "cloudevents"
              ],
              "type": "string"
            },
            "username": {
              "type": "string"
            },
            "webhook": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "targetNamespace": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "K8sGPTStatus defines the observed state of K8sGPT\nshow the current backend used",
      "type": "object"
    }
  },
  "type": "object"
}
