## What?

Currently, in order to upgrade a cluster to a newer version, a set of checks are run validating that it's safe to upgrade. [One of these checks validates](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/ClusterDeprecationChecks.java#L23) that there's enough room in the cluster to create new shards for (potential) intermediate indices. 

## How

The main idea it creates a new indicator into the new [Health API](https://www.elastic.co/guide/en/elasticsearch/reference/master/health-api.html), in such a way it'll be displayed on the `Deployment Management > Monitoring > Health page`. Later, the Cluster Upgrade Tool should use this indicator to validate that upgrading the cluster is safe. Also, the check should be removed from the Deprecation API.

## Tasks

- [x] Talk with the UI team to confirm that the new indicator, once exposed in the UI, will automatically appear in the UI or it must be developed involved
- [x] Create all the machinery in Elasticsearch repo to expose the new Health API indicator (ticket tracking this work #91119)
- [x] Start the conversations with the Cloud team about the needed changes on their side to use this indicator –or any other new indicator– to block upgrades in case the cluster is Unhealthy.
- [x] Removes the old check from the Deprecation API #95177

### Related

* PR introducing the check https://github.com/elastic/elasticsearch/pull/85967
x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/ClusterDeprecationChecks.java
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0; you may not use this file except in compliance with the Elastic License
 * 2.0.
 */
package org.elasticsearch.xpack.deprecation;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.indices.ShardLimitValidator;
import org.elasticsearch.xpack.core.deprecation.DeprecationIssue;
import java.util.Locale;
import static org.elasticsearch.indices.ShardLimitValidator.SETTING_CLUSTER_MAX_SHARDS_PER_NODE;
public class ClusterDeprecationChecks {
    /**
     * Upgrading can require the addition of one or more small indices. This method checks that based on configuration we have the room
     * to add a small number of additional shards to the cluster. The goal is to prevent a failure during upgrade.
     * @param clusterState The cluster state, used to get settings and information about nodes
     * @return A deprecation issue if there is not enough room in this cluster to add a few more shards, or null otherwise
     */
    static DeprecationIssue checkShards(ClusterState clusterState) {