{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-model-kubernetes-infra-schema.json",
  "title": "model.KubernetesInfra",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-chaos-infrastructure-api-openapi.yml#/components/schemas/model.KubernetesInfra",
  "type": "object",
  "properties": {
    "clusterType": {
      "description": "Cluster type Indicates the type on infrastructure (Kubernetes/openshift)",
      "allOf": [
        {
          "$ref": "#/$defs/model.ClusterType"
        }
      ]
    },
    "createdAt": {
      "description": "Timestamp when the infra was created",
      "type": "string"
    },
    "createdBy": {
      "description": "User who created the infra",
      "allOf": [
        {
          "$ref": "#/$defs/github_com_harness_hce-saas_graphql_server_graph_model.UserDetails"
        }
      ]
    },
    "description": {
      "description": "Description of the infra",
      "type": "string"
    },
    "environmentID": {
      "description": "Environment ID for the infra",
      "type": "string"
    },
    "infraID": {
      "description": "ID of the infra",
      "type": "string"
    },
    "infraNamespace": {
      "description": "Namespace where the infra is being installed",
      "type": "string"
    },
    "infraNsExists": {
      "description": "Bool value indicating whether infra ns used already exists on infra or not",
      "type": "boolean"
    },
    "infraSaExists": {
      "description": "Bool value indicating whether service account used already exists on infra or not",
      "type": "boolean"
    },
    "infraScope": {
      "description": "Scope of the infra : ns or cluster",
      "allOf": [
        {
          "$ref": "#/$defs/model.InfraScope"
        }
      ]
    },
    "infraType": {
      "description": "Type of the infrastructure",
      "allOf": [
        {
          "$ref": "#/$defs/model.InfrastructureType"
        }
      ]
    },
    "installationType": {
      "description": "InstallationType connector/manifest",
      "allOf": [
        {
          "$ref": "#/$defs/model.InstallationType"
        }
      ]
    },
    "isActive": {
      "description": "Boolean value indicating if chaos infrastructure is active or not",
      "type": "boolean"
    },
    "isInfraConfirmed": {
      "description": "Boolean value indicating if chaos infrastructure is confirmed or not",
      "type": "boolean"
    },
    "isRemoved": {
      "description": "Boolean value indicating if chaos infrastructure is removed or not",
      "type": "boolean"
    },
    "isSecretEnabled": {
      "description": "Tune secret for infra",
      "type": "boolean"
    },
    "k8sConnectorID": {
      "description": "K8sConnectorID",
      "type": "string"
    },
    "lastHeartbeat": {
      "description": "Last Heartbeat status sent by the infra",
      "type": "string"
    },
    "lastWorkflowTimestamp": {
      "description": "Timestamp of the last workflow run in the infra",
      "type": "string"
    },
    "name": {
      "description": "Name of the infra",
      "type": "string"
    },
    "noOfSchedules": {
      "description": "Number of schedules created in the infra",
      "type": "integer"
    },
    "noOfWorkflows": {
      "description": "Number of workflows run in the infra",
      "type": "integer"
    },
    "platformName": {
      "description": "Infra Platform Name eg. GKE,AWS, Others",
      "type": "string"
    },
    "runAsGroup": {
      "description": "set the user group for security context in pod",
      "type": "integer"
    },
    "runAsUser": {
      "description": "set the user for security context in pod",
      "type": "integer"
    },
    "serviceAccount": {
      "description": "Name of service account used by infra",
      "type": "string"
    },
    "startTime": {
      "description": "Timestamp when the infra got connected",
      "type": "string"
    },
    "tags": {
      "description": "Tags of the infra",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "token": {
      "description": "Token used to verify and retrieve the infra manifest",
      "type": "string"
    },
    "updateStatus": {
      "description": "update status of infra",
      "allOf": [
        {
          "$ref": "#/$defs/model.UpdateStatus"
        }
      ]
    },
    "updatedAt": {
      "description": "Timestamp when the infra was last updated",
      "type": "string"
    },
    "updatedBy": {
      "description": "User who has updated the infra",
      "allOf": [
        {
          "$ref": "#/$defs/github_com_harness_hce-saas_graphql_server_graph_model.UserDetails"
        }
      ]
    },
    "upgrade": {
      "description": "Upgrade struct for the chaos infrastructure",
      "allOf": [
        {
          "$ref": "#/$defs/model.Upgrade"
        }
      ]
    },
    "version": {
      "description": "Version of the infra",
      "type": "string"
    }
  },
  "$defs": {
    "github_com_harness_hce-saas_graphql_server_graph_model.UserDetails": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "userID": {
          "type": "string"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "model.ClusterType": {
      "type": "string",
      "enum": [
        "KUBERNETES",
        "OPENSHIFT",
        "HELM"
      ],
      "x-enum-varnames": [
        "ClusterTypeKubernetes",
        "ClusterTypeOpenshift",
        "ClusterTypeHelm"
      ]
    },
    "model.InfraScope": {
      "type": "string",
      "enum": [
        "namespace",
        "cluster"
      ],
      "x-enum-varnames": [
        "InfraScopeNamespace",
        "InfraScopeCluster"
      ]
    },
    "model.InfrastructureType": {
      "type": "string",
      "enum": [
        "Kubernetes",
        "KubernetesV2",
        "Windows",
        "Linux",
        "CloudFoundry",
        "Container"
      ],
      "x-enum-varnames": [
        "InfrastructureTypeKubernetes",
        "InfrastructureTypeKubernetesV2",
        "InfrastructureTypeWindows",
        "InfrastructureTypeLinux",
        "InfrastructureTypeCloudFoundry",
        "InfrastructureTypeContainer"
      ]
    },
    "model.InstallationType": {
      "type": "string",
      "enum": [
        "CONNECTOR",
        "MANIFEST",
        "CONNECTORV2"
      ],
      "x-enum-varnames": [
        "InstallationTypeConnector",
        "InstallationTypeManifest",
        "InstallationTypeConnectorv2"
      ]
    },
    "model.UpdateStatus": {
      "type": "string",
      "enum": [
        "AVAILABLE",
        "MANDATORY",
        "NOT_REQUIRED"
      ],
      "x-enum-varnames": [
        "UpdateStatusAvailable",
        "UpdateStatusMandatory",
        "UpdateStatusNotRequired"
      ]
    },
    "model.Upgrade": {
      "type": "object",
      "properties": {
        "isAutoUpgradeEnabled": {
          "type": "boolean"
        },
        "status": {
          "$ref": "#/$defs/model.UpgradeStatus"
        }
      }
    },
    "model.UpgradeStatus": {
      "type": "string",
      "enum": [
        "UPGRADING_INFRA",
        "UPGRADE_SKIPPED",
        "UPGRADE_SUCCESSFUL",
        "UPGRADE_FAILED",
        "DETECTING_UPGRADER",
        "UPGRADER_DISABLED"
      ],
      "x-enum-varnames": [
        "UpgradeStatusUpgradingInfra",
        "UpgradeStatusUpgradeSkipped",
        "UpgradeStatusUpgradeSuccessful",
        "UpgradeStatusUpgradeFailed",
        "UpgradeStatusDetectingUpgrader",
        "UpgradeStatusUpgraderDisabled"
      ]
    }
  }
}