UNPKG

@soft-stech/fleet

Version:
277 lines (276 loc) 10.8 kB
import { IObjectMeta } from "@soft-stech/apimachinery/apis/meta/v1/ObjectMeta"; import { Model, ModelData } from "@soft-stech/base"; /** * ClusterGroup is a re-usable selector to target a group of clusters. */ export interface IClusterGroup { /** * APIVersion defines the versioned schema of this representation of an object. * Servers should convert recognized schemas to the latest internal value, and * may reject unrecognized values. * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ "apiVersion": "fleet.cattle.io/v1alpha1"; /** * Kind is a string value representing the REST resource this object represents. * Servers may infer this from the endpoint the client submits requests to. * Cannot be updated. * In CamelCase. * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ "kind": "ClusterGroup"; "metadata"?: IObjectMeta; "spec"?: { /** * Selector is a label selector, used to select clusters for this group. */ "selector"?: { /** * matchExpressions is a list of label selector requirements. The requirements are ANDed. */ "matchExpressions"?: Array<{ /** * key is the label key that the selector applies to. */ "key": string; /** * operator represents a key's relationship to a set of values. * Valid operators are In, NotIn, Exists and DoesNotExist. */ "operator": string; /** * values is an array of string values. If the operator is In or NotIn, * the values array must be non-empty. If the operator is Exists or DoesNotExist, * the values array must be empty. This array is replaced during a strategic * merge patch. */ "values"?: Array<string>; }>; /** * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels * map is equivalent to an element of matchExpressions, whose key field is "key", the * operator is "In", and the values array contains only "value". The requirements are ANDed. */ "matchLabels"?: Record<string, string>; }; }; "status"?: { /** * ClusterCount is the number of clusters in the cluster group. */ "clusterCount"?: number; /** * Conditions is a list of conditions and their statuses for the cluster group. */ "conditions"?: Array<{ /** * Last time the condition transitioned from one status to another. */ "lastTransitionTime"?: string; /** * The last time this condition was updated. */ "lastUpdateTime"?: string; /** * Human-readable message indicating details about last transition */ "message"?: string; /** * The reason for the condition's last transition. */ "reason"?: string; /** * Status of the condition, one of True, False, Unknown. */ "status": string; /** * Type of cluster condition. */ "type": string; }>; /** * Display contains the number of ready, desiredready clusters and a * summary state for the bundle's resources. */ "display"?: { /** * ReadyBundles is a string in the form "%d/%d", that describes the * number of bundles that are ready vs. the number of bundles desired * to be ready. */ "readyBundles"?: string; /** * ReadyClusters is a string in the form "%d/%d", that describes the * number of clusters that are ready vs. the number of clusters desired * to be ready. */ "readyClusters"?: string; /** * State is a summary state for the cluster group, showing "NotReady" if * there are non-ready resources. */ "state"?: string; }; /** * NonReadyClusterCount is the number of clusters that are not ready. */ "nonReadyClusterCount"?: number; /** * NonReadyClusters is a list of cluster names that are not ready. */ "nonReadyClusters"?: Array<string>; /** * ResourceCounts contains the number of resources in each state over * all bundles in the cluster group. */ "resourceCounts"?: { /** * DesiredReady is the number of resources that should be ready. */ "desiredReady"?: number; /** * Missing is the number of missing resources. */ "missing"?: number; /** * Modified is the number of resources that have been modified. */ "modified"?: number; /** * NotReady is the number of not ready resources. Resources are not * ready if they do not match any other state. */ "notReady"?: number; /** * Orphaned is the number of orphaned resources. */ "orphaned"?: number; /** * Ready is the number of ready resources. */ "ready"?: number; /** * Unknown is the number of resources in an unknown state. */ "unknown"?: number; /** * WaitApplied is the number of resources that are waiting to be applied. */ "waitApplied"?: number; }; /** * Summary is a summary of the bundle deployments and their resources * in the cluster group. */ "summary"?: { /** * DesiredReady is the number of bundle deployments that should be * ready. */ "desiredReady"?: number; /** * ErrApplied is the number of bundle deployments that have been synced * from the Fleet controller and the downstream cluster, but with some * errors when deploying the bundle. */ "errApplied"?: number; /** * Modified is the number of bundle deployments that have been deployed * and for which all resources are ready, but where some changes from the * Git repository have not yet been synced. */ "modified"?: number; /** * NonReadyClusters is a list of states, which is filled for a bundle * that is not ready. */ "nonReadyResources"?: Array<{ /** * State is the state of the resource, like e.g. "NotReady" or "ErrApplied". */ "bundleState"?: string; /** * Message contains information why the bundle is not ready. */ "message"?: string; /** * ModifiedStatus lists the state for each modified resource. */ "modifiedStatus"?: Array<{ "apiVersion"?: string; "delete"?: boolean; "kind"?: string; "missing"?: boolean; "name"?: string; "namespace"?: string; "patch"?: string; }>; /** * Name is the name of the resource. */ "name"?: string; /** * NonReadyStatus lists the state for each non-ready resource. */ "nonReadyStatus"?: Array<{ "apiVersion"?: string; "kind"?: string; "name"?: string; "namespace"?: string; "summary"?: { "error"?: boolean; "message"?: Array<string>; "state"?: string; "transitioning"?: boolean; }; /** * UID is a type that holds unique ID values, including UUIDs. Because we * don't ONLY use UUIDs, this is an alias to string. Being a type captures * intent and helps make sure that UIDs and names do not get conflated. */ "uid"?: string; }>; }>; /** * NotReady is the number of bundle deployments that have been deployed * where some resources are not ready. */ "notReady"?: number; /** * OutOfSync is the number of bundle deployments that have been synced * from Fleet controller, but not yet by the downstream agent. */ "outOfSync"?: number; /** * Pending is the number of bundle deployments that are being processed * by Fleet controller. */ "pending"?: number; /** * Ready is the number of bundle deployments that have been deployed * where all resources are ready. */ "ready"?: number; /** * WaitApplied is the number of bundle deployments that have been * synced from Fleet controller and downstream cluster, but are waiting * to be deployed. */ "waitApplied"?: number; }; }; } /** * ClusterGroup is a re-usable selector to target a group of clusters. */ export declare class ClusterGroup extends Model<IClusterGroup> implements IClusterGroup { "apiVersion": IClusterGroup["apiVersion"]; "kind": IClusterGroup["kind"]; "metadata"?: IClusterGroup["metadata"]; "spec"?: IClusterGroup["spec"]; "status"?: IClusterGroup["status"]; static apiVersion: IClusterGroup["apiVersion"]; static kind: IClusterGroup["kind"]; static is: import("@soft-stech/base").TypeMetaGuard<IClusterGroup>; constructor(data?: ModelData<IClusterGroup>); }