{
  "description": "ClusterManagementAddOn represents the registration of an add-on to the cluster manager.\nThis resource allows you to discover which add-ons are available for the cluster manager\nand provides metadata information about the add-ons. The ClusterManagementAddOn name is used\nfor the namespace-scoped ManagedClusterAddOn resource.\nClusterManagementAddOn is a cluster-scoped resource.",
  "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 represents a desired configuration for the agent on the cluster management add-on.",
      "properties": {
        "addOnConfiguration": {
          "description": "Deprecated: Use supportedConfigs filed instead\naddOnConfiguration is a reference to configuration information for the add-on.\nIn scenario where a multiple add-ons share the same add-on CRD, multiple ClusterManagementAddOn\nresources need to be created and reference the same AddOnConfiguration.",
          "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.",
          "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
        },
        "installStrategy": {
          "default": {
            "type": "Manual"
          },
          "description": "InstallStrategy represents that related ManagedClusterAddOns should be installed\non certain clusters.",
          "properties": {
            "placements": {
              "description": "Placements is a list of placement references honored when install strategy type is\nPlacements. All clusters selected by these placements will install the addon\nIf one cluster belongs to multiple placements, it will only apply the strategy defined\nlater in the order. That is to say, The latter strategy overrides the previous one.",
              "items": {
                "properties": {
                  "configs": {
                    "description": "Configs is the configuration of managedClusterAddon during installation.\nUser can override the configuration by updating the managedClusterAddon directly.",
                    "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"
                  },
                  "name": {
                    "description": "Name is the name of the placement",
                    "minLength": 1,
                    "type": "string"
                  },
                  "namespace": {
                    "description": "Namespace is the namespace of the placement",
                    "minLength": 1,
                    "type": "string"
                  },
                  "rolloutStrategy": {
                    "default": {
                      "type": "All"
                    },
                    "description": "The rollout strategy to apply addon configurations change.\nThe rollout strategy only watches the addon configurations defined in ClusterManagementAddOn.",
                    "properties": {
                      "all": {
                        "description": "All defines required fields for RolloutStrategy type All",
                        "properties": {
                          "maxFailures": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "default": 0,
                            "description": "MaxFailures is a percentage or number of clusters in the current rollout that can fail before\nproceeding to the next rollout. Fail means the cluster has a failed status or timeout status\n(does not reach successful status after ProgressDeadline).\nOnce the MaxFailures is breached, the rollout will stop.\nMaxFailures is only considered for rollout types Progressive and ProgressivePerGroup. For\nProgressive, this is considered over the total number of clusters. For ProgressivePerGroup,\nthis is considered according to the size of the current group. For both Progressive and\nProgressivePerGroup, the MaxFailures does not apply for MandatoryDecisionGroups, which tolerate\nno failures.\nDefault is that no failures are tolerated.",
                            "pattern": "^((100|[0-9]{1,2})%|[0-9]+)$",
                            "x-kubernetes-int-or-string": true
                          },
                          "minSuccessTime": {
                            "default": "0",
                            "description": "MinSuccessTime is a \"soak\" time. In other words, the minimum amount of time the workload\napplier controller will wait from the start of each rollout before proceeding (assuming a\nsuccessful state has been reached and MaxFailures wasn't breached).\nMinSuccessTime is only considered for rollout types Progressive and ProgressivePerGroup.\nThe default value is 0 meaning the workload applier proceeds immediately after a successful\nstate is reached.\nMinSuccessTime must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s",
                            "type": "string"
                          },
                          "progressDeadline": {
                            "default": "None",
                            "description": "ProgressDeadline defines how long workload applier controller will wait for the workload to\nreach a successful state in the cluster.\nIf the workload does not reach a successful state after ProgressDeadline, will stop waiting\nand workload will be treated as \"timeout\" and be counted into MaxFailures. Once the MaxFailures\nis breached, the rollout will stop.\nProgressDeadline default value is \"None\", meaning the workload applier will wait for a\nsuccessful state indefinitely.\nProgressDeadline must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s",
                            "pattern": "^(([0-9])+[h|m|s])|None$",
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      },
                      "progressive": {
                        "description": "Progressive defines required fields for RolloutStrategy type Progressive",
                        "properties": {
                          "mandatoryDecisionGroups": {
                            "description": "List of the decision groups names or indexes to apply the workload first and fail if workload\ndid not reach successful state.\nGroupName or GroupIndex must match with the decisionGroups defined in the placement's\ndecisionStrategy",
                            "items": {
                              "description": "MandatoryDecisionGroup set the decision group name or group index.\nGroupName is considered first to select the decisionGroups then GroupIndex.",
                              "properties": {
                                "groupIndex": {
                                  "description": "GroupIndex of the decision group should match the placementDecisions label value with label key\ncluster.open-cluster-management.io/decision-group-index",
                                  "format": "int32",
                                  "type": "integer"
                                },
                                "groupName": {
                                  "description": "GroupName of the decision group should match the placementDecisions label value with label key\ncluster.open-cluster-management.io/decision-group-name",
                                  "type": "string"
                                }
                              },
                              "type": "object",
                              "additionalProperties": false
                            },
                            "type": "array"
                          },
                          "maxConcurrency": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "description": "MaxConcurrency is the max number of clusters to deploy workload concurrently. The default value\nfor MaxConcurrency is determined from the clustersPerDecisionGroup defined in the\nplacement->DecisionStrategy.",
                            "pattern": "^((100|[0-9]{1,2})%|[0-9]+)$",
                            "x-kubernetes-int-or-string": true
                          },
                          "maxFailures": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "default": 0,
                            "description": "MaxFailures is a percentage or number of clusters in the current rollout that can fail before\nproceeding to the next rollout. Fail means the cluster has a failed status or timeout status\n(does not reach successful status after ProgressDeadline).\nOnce the MaxFailures is breached, the rollout will stop.\nMaxFailures is only considered for rollout types Progressive and ProgressivePerGroup. For\nProgressive, this is considered over the total number of clusters. For ProgressivePerGroup,\nthis is considered according to the size of the current group. For both Progressive and\nProgressivePerGroup, the MaxFailures does not apply for MandatoryDecisionGroups, which tolerate\nno failures.\nDefault is that no failures are tolerated.",
                            "pattern": "^((100|[0-9]{1,2})%|[0-9]+)$",
                            "x-kubernetes-int-or-string": true
                          },
                          "minSuccessTime": {
                            "default": "0",
                            "description": "MinSuccessTime is a \"soak\" time. In other words, the minimum amount of time the workload\napplier controller will wait from the start of each rollout before proceeding (assuming a\nsuccessful state has been reached and MaxFailures wasn't breached).\nMinSuccessTime is only considered for rollout types Progressive and ProgressivePerGroup.\nThe default value is 0 meaning the workload applier proceeds immediately after a successful\nstate is reached.\nMinSuccessTime must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s",
                            "type": "string"
                          },
                          "progressDeadline": {
                            "default": "None",
                            "description": "ProgressDeadline defines how long workload applier controller will wait for the workload to\nreach a successful state in the cluster.\nIf the workload does not reach a successful state after ProgressDeadline, will stop waiting\nand workload will be treated as \"timeout\" and be counted into MaxFailures. Once the MaxFailures\nis breached, the rollout will stop.\nProgressDeadline default value is \"None\", meaning the workload applier will wait for a\nsuccessful state indefinitely.\nProgressDeadline must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s",
                            "pattern": "^(([0-9])+[h|m|s])|None$",
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      },
                      "progressivePerGroup": {
                        "description": "ProgressivePerGroup defines required fields for RolloutStrategy type ProgressivePerGroup",
                        "properties": {
                          "mandatoryDecisionGroups": {
                            "description": "List of the decision groups names or indexes to apply the workload first and fail if workload\ndid not reach successful state.\nGroupName or GroupIndex must match with the decisionGroups defined in the placement's\ndecisionStrategy",
                            "items": {
                              "description": "MandatoryDecisionGroup set the decision group name or group index.\nGroupName is considered first to select the decisionGroups then GroupIndex.",
                              "properties": {
                                "groupIndex": {
                                  "description": "GroupIndex of the decision group should match the placementDecisions label value with label key\ncluster.open-cluster-management.io/decision-group-index",
                                  "format": "int32",
                                  "type": "integer"
                                },
                                "groupName": {
                                  "description": "GroupName of the decision group should match the placementDecisions label value with label key\ncluster.open-cluster-management.io/decision-group-name",
                                  "type": "string"
                                }
                              },
                              "type": "object",
                              "additionalProperties": false
                            },
                            "type": "array"
                          },
                          "maxFailures": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "default": 0,
                            "description": "MaxFailures is a percentage or number of clusters in the current rollout that can fail before\nproceeding to the next rollout. Fail means the cluster has a failed status or timeout status\n(does not reach successful status after ProgressDeadline).\nOnce the MaxFailures is breached, the rollout will stop.\nMaxFailures is only considered for rollout types Progressive and ProgressivePerGroup. For\nProgressive, this is considered over the total number of clusters. For ProgressivePerGroup,\nthis is considered according to the size of the current group. For both Progressive and\nProgressivePerGroup, the MaxFailures does not apply for MandatoryDecisionGroups, which tolerate\nno failures.\nDefault is that no failures are tolerated.",
                            "pattern": "^((100|[0-9]{1,2})%|[0-9]+)$",
                            "x-kubernetes-int-or-string": true
                          },
                          "minSuccessTime": {
                            "default": "0",
                            "description": "MinSuccessTime is a \"soak\" time. In other words, the minimum amount of time the workload\napplier controller will wait from the start of each rollout before proceeding (assuming a\nsuccessful state has been reached and MaxFailures wasn't breached).\nMinSuccessTime is only considered for rollout types Progressive and ProgressivePerGroup.\nThe default value is 0 meaning the workload applier proceeds immediately after a successful\nstate is reached.\nMinSuccessTime must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s",
                            "type": "string"
                          },
                          "progressDeadline": {
                            "default": "None",
                            "description": "ProgressDeadline defines how long workload applier controller will wait for the workload to\nreach a successful state in the cluster.\nIf the workload does not reach a successful state after ProgressDeadline, will stop waiting\nand workload will be treated as \"timeout\" and be counted into MaxFailures. Once the MaxFailures\nis breached, the rollout will stop.\nProgressDeadline default value is \"None\", meaning the workload applier will wait for a\nsuccessful state indefinitely.\nProgressDeadline must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s",
                            "pattern": "^(([0-9])+[h|m|s])|None$",
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": {
                        "default": "All",
                        "enum": [
                          "All",
                          "Progressive",
                          "ProgressivePerGroup"
                        ],
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "namespace"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array",
              "x-kubernetes-list-map-keys": [
                "namespace",
                "name"
              ],
              "x-kubernetes-list-type": "map"
            },
            "type": {
              "default": "Manual",
              "description": "Type is the type of the install strategy, it can be:\n- Manual: no automatic install\n- Placements: install to clusters selected by placements.",
              "enum": [
                "Manual",
                "Placements"
              ],
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "supportedConfigs": {
          "description": "supportedConfigs is a list of configuration types supported by add-on.\nAn empty list means the add-on does not require configurations.\nThe default is an empty list",
          "items": {
            "description": "ConfigMeta represents a collection of metadata information for add-on configuration.",
            "properties": {
              "defaultConfig": {
                "description": "defaultConfig represents the namespace and name of the default add-on configuration.\nIn scenario where all add-ons have a same configuration.",
                "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"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "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
    },
    "status": {
      "description": "status represents the current status of cluster management add-on.",
      "properties": {
        "defaultconfigReferences": {
          "description": "defaultconfigReferences is a list of current add-on default configuration references.",
          "items": {
            "description": "DefaultConfigReference is a reference to the current add-on configuration.\nThis resource is used to record 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"
              },
              "resource": {
                "description": "resource of the add-on configuration.",
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "resource"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "installProgressions": {
          "description": "installProgression is a list of current add-on configuration references per placement.",
          "items": {
            "properties": {
              "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.",
                "items": {
                  "description": "InstallConfigReference is a reference to the current add-on configuration.\nThis resource is used to record the configuration resource for the current add-on.",
                  "properties": {
                    "desiredConfig": {
                      "description": "desiredConfig record the desired config name and 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 records the config spec hash when the all the corresponding\nManagedClusterAddOn are 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
                    },
                    "lastKnownGoodConfig": {
                      "description": "lastKnownGoodConfig records the last known good config spec hash.\nFor fresh install or rollout with type UpdateAll or RollingUpdate, the\nlastKnownGoodConfig is the same as lastAppliedConfig.\nFor rollout with type RollingUpdateWithCanary, the lastKnownGoodConfig\nis the last successfully applied config spec hash of the canary placement.",
                      "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
                    },
                    "resource": {
                      "description": "resource of the add-on configuration.",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "resource"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "name": {
                "description": "Name is the name of the placement",
                "minLength": 1,
                "type": "string"
              },
              "namespace": {
                "description": "Namespace is the namespace of the placement",
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "name",
              "namespace"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
