{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-openshift/json-schema/red-hat-openshift-add-on-schema.json",
  "title": "AddOn",
  "description": "Representation of an add-on that can be installed in a cluster.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-openshift-ocm-clusters-mgmt-openapi.yml#/components/schemas/AddOn",
  "properties": {
    "kind": {
      "description": "Indicates the type of this object. Will be 'AddOn' if this is a complete object or 'AddOnLink' if it is just a link.",
      "type": "string"
    },
    "id": {
      "description": "Unique identifier of the object.",
      "type": "string"
    },
    "href": {
      "description": "Self link.",
      "type": "string"
    },
    "common_annotations": {
      "description": "Common annotations to be applied to all resources created by this addon.",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "common_labels": {
      "description": "Common labels to be applied to all resources created by this addon.",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "config": {
      "description": "Additional configs to be used by the addon once its installed in the cluster.",
      "$ref": "#/$defs/AddOnConfig"
    },
    "credentials_requests": {
      "description": "List of credentials requests to authenticate operators to access cloud resources.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CredentialRequest"
      }
    },
    "description": {
      "description": "Description of the add-on.",
      "type": "string"
    },
    "docs_link": {
      "description": "Link to documentation about the add-on.",
      "type": "string"
    },
    "enabled": {
      "description": "Indicates if this add-on can be added to clusters.",
      "type": "boolean"
    },
    "has_external_resources": {
      "description": "Indicates if this add-on has external resources associated with it",
      "type": "boolean"
    },
    "hidden": {
      "description": "Indicates if this add-on is hidden.",
      "type": "boolean"
    },
    "icon": {
      "description": "Base64-encoded icon representing an add-on. The icon should be in PNG format.",
      "type": "string"
    },
    "install_mode": {
      "description": "The mode in which the addon is deployed.",
      "$ref": "#/$defs/AddOnInstallMode"
    },
    "label": {
      "description": "Label used to attach to a cluster deployment when add-on is installed.",
      "type": "string"
    },
    "managed_service": {
      "description": "Indicates if add-on is part of a managed service",
      "type": "boolean"
    },
    "name": {
      "description": "Name of the add-on.",
      "type": "string"
    },
    "namespaces": {
      "description": "Namespaces which are required by this addon.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AddOnNamespace"
      }
    },
    "operator_name": {
      "description": "The name of the operator installed by this add-on.",
      "type": "string"
    },
    "parameters": {
      "description": "List of parameters for this add-on.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AddOnParameter"
      }
    },
    "requirements": {
      "description": "List of requirements for this add-on.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AddOnRequirement"
      }
    },
    "resource_cost": {
      "description": "Used to determine how many units of quota an add-on consumes per resource name.",
      "type": "number",
      "format": "float"
    },
    "resource_name": {
      "description": "Used to determine from where to reserve quota for this add-on.",
      "type": "string"
    },
    "sub_operators": {
      "description": "List of sub operators for this add-on.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AddOnSubOperator"
      }
    },
    "target_namespace": {
      "description": "The namespace in which the addon CRD exists.",
      "type": "string"
    },
    "version": {
      "description": "Link to the current default version of this add-on.",
      "$ref": "#/$defs/AddOnVersion"
    }
  },
  "$defs": {
    "AddOn": {
      "description": "Representation of an add-on that can be installed in a cluster.",
      "properties": {
        "kind": {
          "description": "Indicates the type of this object. Will be 'AddOn' if this is a complete object or 'AddOnLink' if it is just a link.",
          "type": "string"
        },
        "id": {
          "description": "Unique identifier of the object.",
          "type": "string"
        },
        "href": {
          "description": "Self link.",
          "type": "string"
        },
        "common_annotations": {
          "description": "Common annotations to be applied to all resources created by this addon.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "common_labels": {
          "description": "Common labels to be applied to all resources created by this addon.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "config": {
          "description": "Additional configs to be used by the addon once its installed in the cluster.",
          "$ref": "#/$defs/AddOnConfig"
        },
        "credentials_requests": {
          "description": "List of credentials requests to authenticate operators to access cloud resources.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/CredentialRequest"
          }
        },
        "description": {
          "description": "Description of the add-on.",
          "type": "string"
        },
        "docs_link": {
          "description": "Link to documentation about the add-on.",
          "type": "string"
        },
        "enabled": {
          "description": "Indicates if this add-on can be added to clusters.",
          "type": "boolean"
        },
        "has_external_resources": {
          "description": "Indicates if this add-on has external resources associated with it",
          "type": "boolean"
        },
        "hidden": {
          "description": "Indicates if this add-on is hidden.",
          "type": "boolean"
        },
        "icon": {
          "description": "Base64-encoded icon representing an add-on. The icon should be in PNG format.",
          "type": "string"
        },
        "install_mode": {
          "description": "The mode in which the addon is deployed.",
          "$ref": "#/$defs/AddOnInstallMode"
        },
        "label": {
          "description": "Label used to attach to a cluster deployment when add-on is installed.",
          "type": "string"
        },
        "managed_service": {
          "description": "Indicates if add-on is part of a managed service",
          "type": "boolean"
        },
        "name": {
          "description": "Name of the add-on.",
          "type": "string"
        },
        "namespaces": {
          "description": "Namespaces which are required by this addon.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnNamespace"
          }
        },
        "operator_name": {
          "description": "The name of the operator installed by this add-on.",
          "type": "string"
        },
        "parameters": {
          "description": "List of parameters for this add-on.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnParameter"
          }
        },
        "requirements": {
          "description": "List of requirements for this add-on.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnRequirement"
          }
        },
        "resource_cost": {
          "description": "Used to determine how many units of quota an add-on consumes per resource name.",
          "type": "number",
          "format": "float"
        },
        "resource_name": {
          "description": "Used to determine from where to reserve quota for this add-on.",
          "type": "string"
        },
        "sub_operators": {
          "description": "List of sub operators for this add-on.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnSubOperator"
          }
        },
        "target_namespace": {
          "description": "The namespace in which the addon CRD exists.",
          "type": "string"
        },
        "version": {
          "description": "Link to the current default version of this add-on.",
          "$ref": "#/$defs/AddOnVersion"
        }
      }
    },
    "AddOnConfig": {
      "description": "Representation of an add-on config.\nThe attributes under it are to be used by the addon once its installed in the cluster.",
      "properties": {
        "kind": {
          "description": "Indicates the type of this object. Will be 'AddOnConfig' if this is a complete object or 'AddOnConfigLink' if it is just a link.",
          "type": "string"
        },
        "id": {
          "description": "Unique identifier of the object.",
          "type": "string"
        },
        "href": {
          "description": "Self link.",
          "type": "string"
        },
        "add_on_environment_variables": {
          "description": "List of environment variables for the addon",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnEnvironmentVariable"
          }
        },
        "secret_propagations": {
          "description": "List of secret propagations for the addon",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnSecretPropagation"
          }
        }
      }
    },
    "AddOnEnvironmentVariable": {
      "description": "Representation of an add-on env object.",
      "properties": {
        "kind": {
          "description": "Indicates the type of this object. Will be 'AddOnEnvironmentVariable' if this is a complete object or 'AddOnEnvironmentVariableLink' if it is just a link.",
          "type": "string"
        },
        "id": {
          "description": "Unique identifier of the object.",
          "type": "string"
        },
        "href": {
          "description": "Self link.",
          "type": "string"
        },
        "name": {
          "description": "Name of the env object.",
          "type": "string"
        },
        "value": {
          "description": "Value of the env object.",
          "type": "string"
        }
      }
    },
    "AddOnInstallMode": {
      "description": "Representation of an add-on InstallMode field.",
      "type": "string",
      "enum": [
        "all_namespaces",
        "own_namespace"
      ]
    },
    "AddOnNamespace": {
      "properties": {
        "kind": {
          "description": "Indicates the type of this object. Will be 'AddOnNamespace' if this is a complete object or 'AddOnNamespaceLink' if it is just a link.",
          "type": "string"
        },
        "id": {
          "description": "Unique identifier of the object.",
          "type": "string"
        },
        "href": {
          "description": "Self link.",
          "type": "string"
        },
        "annotations": {
          "description": "Annotations to be applied to this namespace.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "labels": {
          "description": "Labels to be applied to this namespace.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "name": {
          "description": "Name of the namespace.",
          "type": "string"
        }
      }
    },
    "AddOnParameter": {
      "description": "Representation of an add-on parameter.",
      "properties": {
        "kind": {
          "description": "Indicates the type of this object. Will be 'AddOnParameter' if this is a complete object or 'AddOnParameterLink' if it is just a link.",
          "type": "string"
        },
        "id": {
          "description": "Unique identifier of the object.",
          "type": "string"
        },
        "href": {
          "description": "Self link.",
          "type": "string"
        },
        "addon": {
          "description": "Link to add-on.",
          "$ref": "#/$defs/AddOn"
        },
        "conditions": {
          "description": "Conditions in which this parameter is valid for",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnRequirement"
          }
        },
        "default_value": {
          "description": "Indicates the value default for the add-on parameter.",
          "type": "string"
        },
        "description": {
          "description": "Description of the add-on parameter.",
          "type": "string"
        },
        "editable": {
          "description": "Indicates if this parameter can be edited after creation.",
          "type": "boolean"
        },
        "editable_direction": {
          "description": "Restricts if the parameter can be upscaled/downscaled\nExpected values are \"up\", \"down\", or \"\" (no restriction).",
          "type": "string"
        },
        "enabled": {
          "description": "Indicates if this parameter is enabled for the add-on.",
          "type": "boolean"
        },
        "name": {
          "description": "Name of the add-on parameter.",
          "type": "string"
        },
        "options": {
          "description": "List of options for the add-on parameter value.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnParameterOption"
          }
        },
        "required": {
          "description": "Indicates if this parameter is required by the add-on.",
          "type": "boolean"
        },
        "validation": {
          "description": "Validation rule for the add-on parameter.",
          "type": "string"
        },
        "validation_err_msg": {
          "description": "Error message to return should the parameter be invalid.",
          "type": "string"
        },
        "value_type": {
          "description": "Type of value of the add-on parameter.",
          "type": "string"
        }
      }
    },
    "AddOnParameterOption": {
      "description": "Representation of an add-on parameter option.",
      "properties": {
        "name": {
          "description": "Name of the add-on parameter option.",
          "type": "string"
        },
        "rank": {
          "description": "Rank of option to be used in cases where editable direction should be restricted.",
          "type": "integer",
          "format": "int32"
        },
        "requirements": {
          "description": "List of add-on requirements for this parameter option.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnRequirement"
          }
        },
        "value": {
          "description": "Value of the add-on parameter option.",
          "type": "string"
        }
      }
    },
    "AddOnRequirement": {
      "description": "Representation of an add-on requirement.",
      "properties": {
        "id": {
          "description": "ID of the add-on requirement.",
          "type": "string"
        },
        "data": {
          "description": "Data for the add-on requirement.",
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "enabled": {
          "description": "Indicates if this requirement is enabled for the add-on.",
          "type": "boolean"
        },
        "resource": {
          "description": "Type of resource of the add-on requirement.",
          "type": "string"
        },
        "status": {
          "description": "Optional cluster specific status for the add-on.",
          "$ref": "#/$defs/AddOnRequirementStatus"
        }
      }
    },
    "AddOnRequirementStatus": {
      "description": "Representation of an add-on requirement status.",
      "properties": {
        "error_msgs": {
          "description": "Error messages detailing reasons for unfulfilled requirements.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "fulfilled": {
          "description": "Indicates if this requirement is fulfilled.",
          "type": "boolean"
        }
      }
    },
    "AddOnSecretPropagation": {
      "description": "Representation of an addon secret propagation",
      "properties": {
        "id": {
          "description": "ID of the secret propagation",
          "type": "string"
        },
        "destination_secret": {
          "description": "DestinationSecret is location of the secret to be added",
          "type": "string"
        },
        "enabled": {
          "description": "Indicates is this secret propagation is enabled for the addon",
          "type": "boolean"
        },
        "source_secret": {
          "description": "SourceSecret is location of the source secret",
          "type": "string"
        }
      }
    },
    "AddOnSubOperator": {
      "description": "Representation of an add-on sub operator. A sub operator is an operator\nwho's life cycle is controlled by the add-on umbrella operator. ",
      "properties": {
        "enabled": {
          "description": "Indicates if the sub operator is enabled for the add-on",
          "type": "boolean"
        },
        "operator_name": {
          "description": "Name of the add-on sub operator",
          "type": "string"
        },
        "operator_namespace": {
          "description": "Namespace of the add-on sub operator",
          "type": "string"
        }
      }
    },
    "AddOnVersion": {
      "description": "Representation of an add-on version.",
      "properties": {
        "kind": {
          "description": "Indicates the type of this object. Will be 'AddOnVersion' if this is a complete object or 'AddOnVersionLink' if it is just a link.",
          "type": "string"
        },
        "id": {
          "description": "Unique identifier of the object.",
          "type": "string"
        },
        "href": {
          "description": "Self link.",
          "type": "string"
        },
        "additional_catalog_sources": {
          "description": "Additional catalog sources associated with this addon version",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AdditionalCatalogSource"
          }
        },
        "available_upgrades": {
          "description": "AvailableUpgrades is the list of versions this version can be upgraded to.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "channel": {
          "description": "The specific addon catalog source channel of packages",
          "type": "string"
        },
        "config": {
          "description": "Additional configs to be used by the addon once its installed in the cluster.",
          "$ref": "#/$defs/AddOnConfig"
        },
        "enabled": {
          "description": "Indicates if this add-on version can be added to clusters.",
          "type": "boolean"
        },
        "package_image": {
          "description": "The package image for this addon version",
          "type": "string"
        },
        "parameters": {
          "description": "List of parameters for this add-on version.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnParameter"
          }
        },
        "pull_secret_name": {
          "description": "The pull secret name used for this addon version.",
          "type": "string"
        },
        "requirements": {
          "description": "List of requirements for this add-on version.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnRequirement"
          }
        },
        "source_image": {
          "description": "The catalog source image for this add-on version.",
          "type": "string"
        },
        "sub_operators": {
          "description": "List of sub operators for this add-on version.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddOnSubOperator"
          }
        }
      }
    },
    "AdditionalCatalogSource": {
      "description": "Representation of an addon catalog source object used by addon versions.",
      "properties": {
        "id": {
          "description": "ID of the additional catalog source",
          "type": "string"
        },
        "enabled": {
          "description": "Indicates is this additional catalog source is enabled for the addon",
          "type": "boolean"
        },
        "image": {
          "description": "Image of the additional catalog source.",
          "type": "string"
        },
        "name": {
          "description": "Name of the additional catalog source.",
          "type": "string"
        }
      }
    },
    "CredentialRequest": {
      "description": "Contains the necessary attributes to allow each operator to access the necessary AWS resources",
      "properties": {
        "name": {
          "description": "Name of the credentials secret used to access cloud resources",
          "type": "string"
        },
        "namespace": {
          "description": "Namespace where the credentials secret lives in the cluster",
          "type": "string"
        },
        "policy_permissions": {
          "description": "List of policy permissions needed to access cloud resources",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "service_account": {
          "description": "Service account name to use when authenticating",
          "type": "string"
        }
      }
    }
  }
}