{
  "description": "ManagedClusterAddOn is the Custom Resource object which holds the current state\nof an add-on. This object is used by add-on operators to convey their state.\nThis resource should be created in the ManagedCluster namespace.",
  "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": "spec holds configuration that could apply to any operator.",
      "properties": {
        "configs": {
          "description": "configs is a list of add-on configurations.\nIn scenario where the current add-on has its own configurations.\nAn empty list means there are no default configurations for add-on.\nThe default is an empty list",
          "items": {
            "properties": {
              "group": {
                "default": "",
                "description": "group of the add-on configuration.",
                "type": "string"
              },
              "name": {
                "description": "name of the add-on configuration.",
                "minLength": 1,
                "type": "string"
              },
              "namespace": {
                "description": "namespace of the add-on configuration.\nIf this field is not set, the configuration is in the cluster scope.",
                "type": "string"
              },
              "resource": {
                "description": "resource of the add-on configuration.",
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "name",
              "resource"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "installNamespace": {
          "default": "open-cluster-management-agent-addon",
          "description": "installNamespace is the namespace on the managed cluster to install the addon agent.\nIf it is not set, open-cluster-management-agent-addon namespace is used to install the addon agent.",
          "maxLength": 63,
          "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "status holds the information about the state of an operator.  It is consistent with status information across\nthe Kubernetes ecosystem.",
      "properties": {
        "addOnConfiguration": {
          "description": "Deprecated: Use configReferences instead.\naddOnConfiguration is a reference to configuration information for the add-on.\nThis resource is used to locate the configuration resource for the add-on.",
          "properties": {
            "crName": {
              "description": "crName is the name of the CR used to configure instances of the managed add-on.\nThis field should be configured if add-on CR have a consistent name across the all of the ManagedCluster instaces.",
              "type": "string"
            },
            "crdName": {
              "description": "crdName is the name of the CRD used to configure instances of the managed add-on.\nThis field should be configured if the add-on have a CRD that controls the configuration of the add-on.",
              "type": "string"
            },
            "lastObservedGeneration": {
              "description": "lastObservedGeneration is the observed generation of the custom resource for the configuration of the addon.",
              "format": "int64",
              "type": "integer"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "addOnMeta": {
          "description": "addOnMeta is a reference to the metadata information for the add-on.\nThis should be same as the addOnMeta for the corresponding ClusterManagementAddOn resource.",
          "properties": {
            "description": {
              "description": "description represents the detailed description of the add-on.",
              "type": "string"
            },
            "displayName": {
              "description": "displayName represents the name of add-on that will be displayed.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "conditions": {
          "description": "conditions describe the state of the managed and monitored components for the operator.",
          "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"
        },
        "configReferences": {
          "description": "configReferences is a list of current add-on configuration references.\nThis will be overridden by the clustermanagementaddon configuration references.",
          "items": {
            "description": "ConfigReference is a reference to the current add-on configuration.\nThis resource is used to locate the configuration resource for the current add-on.",
            "properties": {
              "desiredConfig": {
                "description": "desiredConfig record the desired config spec hash.",
                "properties": {
                  "name": {
                    "description": "name of the add-on configuration.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "namespace": {
                    "description": "namespace of the add-on configuration.\nIf this field is not set, the configuration is in the cluster scope.",
                    "type": "string"
                  },
                  "specHash": {
                    "description": "spec hash for an add-on configuration.",
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "group": {
                "default": "",
                "description": "group of the add-on configuration.",
                "type": "string"
              },
              "lastAppliedConfig": {
                "description": "lastAppliedConfig record the config spec hash when the corresponding ManifestWork is applied successfully.",
                "properties": {
                  "name": {
                    "description": "name of the add-on configuration.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "namespace": {
                    "description": "namespace of the add-on configuration.\nIf this field is not set, the configuration is in the cluster scope.",
                    "type": "string"
                  },
                  "specHash": {
                    "description": "spec hash for an add-on configuration.",
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "lastObservedGeneration": {
                "description": "Deprecated: Use LastAppliedConfig instead\nlastObservedGeneration is the observed generation of the add-on configuration.",
                "format": "int64",
                "type": "integer"
              },
              "name": {
                "description": "name of the add-on configuration.",
                "minLength": 1,
                "type": "string"
              },
              "namespace": {
                "description": "namespace of the add-on configuration.\nIf this field is not set, the configuration is in the cluster scope.",
                "type": "string"
              },
              "resource": {
                "description": "resource of the add-on configuration.",
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "name",
              "resource"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "healthCheck": {
          "description": "healthCheck indicates how to check the healthiness status of the current addon. It should be\nset by each addon implementation, by default, the lease mode will be used.",
          "properties": {
            "mode": {
              "default": "Lease",
              "description": "mode indicates which mode will be used to check the healthiness status of the addon.",
              "enum": [
                "Lease",
                "Customized"
              ],
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "namespace": {
          "description": "namespace is the namespace on the managedcluster to put registration secret or lease for the addon. It is\nrequired when registration is set or healthcheck mode is Lease.",
          "type": "string"
        },
        "registrations": {
          "description": "registrations is the configurations for the addon agent to register to hub. It should be set by each addon controller\non hub to define how the addon agent on managedcluster is registered. With the registration defined,\nThe addon agent can access to kube apiserver with kube style API or other endpoints on hub cluster with client\ncertificate authentication. A csr will be created per registration configuration. If more than one\nregistrationConfig is defined, a csr will be created for each registration configuration. It is not allowed that\nmultiple registrationConfigs have the same signer name. After the csr is approved on the hub cluster, the klusterlet\nagent will create a secret in the installNamespace for the registrationConfig. If the signerName is\n\"kubernetes.io/kube-apiserver-client\", the secret name will be \"{addon name}-hub-kubeconfig\" whose contents includes\nkey/cert and kubeconfig. Otherwise, the secret name will be \"{addon name}-{signer name}-client-cert\" whose contents includes key/cert.",
          "items": {
            "description": "RegistrationConfig defines the configuration of the addon agent to register to hub. The Klusterlet agent will\ncreate a csr for the addon agent with the registrationConfig.",
            "properties": {
              "signerName": {
                "description": "signerName is the name of signer that addon agent will use to create csr.",
                "maxLength": 571,
                "minLength": 5,
                "pattern": "^([a-z0-9][a-z0-9-]*[a-z0-9]\\.)+[a-z]+\\/[a-z0-9-\\.]+$",
                "type": "string"
              },
              "subject": {
                "description": "subject is the user subject of the addon agent to be registered to the hub.\nIf it is not set, the addon agent will have the default subject\n\"subject\": {\n  \"user\": \"system:open-cluster-management:cluster:{clusterName}:addon:{addonName}:agent:{agentName}\",\n  \"groups: [\"system:open-cluster-management:cluster:{clusterName}:addon:{addonName}\",\n            \"system:open-cluster-management:addon:{addonName}\", \"system:authenticated\"]\n}",
                "properties": {
                  "groups": {
                    "description": "groups is the user group of the addon agent.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "organizationUnit": {
                    "description": "organizationUnit is the ou of the addon agent",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "user": {
                    "description": "user is the user name of the addon agent.",
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "required": [
              "signerName"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "relatedObjects": {
          "description": "relatedObjects is a list of objects that are \"interesting\" or related to this operator. Common uses are:\n1. the detailed resource driving the operator\n2. operator namespaces\n3. operand namespaces\n4. related ClusterManagementAddon resource",
          "items": {
            "description": "ObjectReference contains enough information to let you inspect or modify the referred object.",
            "properties": {
              "group": {
                "description": "group of the referent.",
                "type": "string"
              },
              "name": {
                "description": "name of the referent.",
                "type": "string"
              },
              "namespace": {
                "description": "namespace of the referent.",
                "type": "string"
              },
              "resource": {
                "description": "resource of the referent.",
                "type": "string"
              }
            },
            "required": [
              "group",
              "name",
              "resource"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "supportedConfigs": {
          "description": "SupportedConfigs is a list of configuration types that are allowed to override the add-on configurations defined\nin ClusterManagementAddOn spec.\nThe default is an empty list, which means the add-on configurations can not be overridden.",
          "items": {
            "description": "ConfigGroupResource represents the GroupResource of the add-on configuration",
            "properties": {
              "group": {
                "default": "",
                "description": "group of the add-on configuration.",
                "type": "string"
              },
              "resource": {
                "description": "resource of the add-on configuration.",
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "resource"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "group",
            "resource"
          ],
          "x-kubernetes-list-type": "map"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
