UNPKG

@soft-stech/fleet

Version:
367 lines (366 loc) 15.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ClusterGroup = void 0; const IoK8sApimachineryPkgApisMetaV1ObjectMeta_1 = require("@soft-stech/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta"); const base_1 = require("@soft-stech/base"); const validate_1 = require("@soft-stech/validate"); const schemaId = "fleet.cattle.io.v1alpha1.ClusterGroup"; const schema = { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "fleet.cattle.io/v1alpha1" ] }, "kind": { "type": "string", "enum": [ "ClusterGroup" ] }, "metadata": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#" }, { "type": "null" } ] }, "spec": { "properties": { "selector": { "nullable": true, "properties": { "matchExpressions": { "items": { "properties": { "key": { "type": "string" }, "operator": { "type": "string" }, "values": { "items": { "type": "string" }, "type": "array", "nullable": true } }, "required": [ "key", "operator" ], "type": "object" }, "type": "array", "nullable": true }, "matchLabels": { "additionalProperties": { "type": "string" }, "type": "object", "properties": {}, "nullable": true } }, "type": "object" } }, "type": "object", "nullable": true }, "status": { "properties": { "clusterCount": { "type": "integer", "nullable": true }, "conditions": { "items": { "properties": { "lastTransitionTime": { "type": "string", "nullable": true }, "lastUpdateTime": { "type": "string", "nullable": true }, "message": { "type": "string", "nullable": true }, "reason": { "type": "string", "nullable": true }, "status": { "type": "string" }, "type": { "type": "string" } }, "required": [ "status", "type" ], "type": "object" }, "type": "array", "nullable": true }, "display": { "properties": { "readyBundles": { "nullable": true, "type": "string" }, "readyClusters": { "nullable": true, "type": "string" }, "state": { "nullable": true, "type": "string" } }, "type": "object", "nullable": true }, "nonReadyClusterCount": { "type": "integer", "nullable": true }, "nonReadyClusters": { "items": { "type": "string" }, "nullable": true, "type": "array" }, "resourceCounts": { "properties": { "desiredReady": { "type": "integer", "nullable": true }, "missing": { "type": "integer", "nullable": true }, "modified": { "type": "integer", "nullable": true }, "notReady": { "type": "integer", "nullable": true }, "orphaned": { "type": "integer", "nullable": true }, "ready": { "type": "integer", "nullable": true }, "unknown": { "type": "integer", "nullable": true }, "waitApplied": { "type": "integer", "nullable": true } }, "type": "object", "nullable": true }, "summary": { "properties": { "desiredReady": { "type": "integer", "nullable": true }, "errApplied": { "type": "integer", "nullable": true }, "modified": { "type": "integer", "nullable": true }, "nonReadyResources": { "items": { "properties": { "bundleState": { "nullable": true, "type": "string" }, "message": { "nullable": true, "type": "string" }, "modifiedStatus": { "items": { "properties": { "apiVersion": { "nullable": true, "type": "string" }, "delete": { "type": "boolean", "nullable": true }, "kind": { "nullable": true, "type": "string" }, "missing": { "type": "boolean", "nullable": true }, "name": { "nullable": true, "type": "string" }, "namespace": { "nullable": true, "type": "string" }, "patch": { "nullable": true, "type": "string" } }, "type": "object" }, "nullable": true, "type": "array" }, "name": { "nullable": true, "type": "string" }, "nonReadyStatus": { "items": { "properties": { "apiVersion": { "nullable": true, "type": "string" }, "kind": { "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "namespace": { "nullable": true, "type": "string" }, "summary": { "properties": { "error": { "type": "boolean", "nullable": true }, "message": { "items": { "type": "string" }, "type": "array", "nullable": true }, "state": { "type": "string", "nullable": true }, "transitioning": { "type": "boolean", "nullable": true } }, "type": "object", "nullable": true }, "uid": { "nullable": true, "type": "string" } }, "type": "object" }, "nullable": true, "type": "array" } }, "type": "object" }, "nullable": true, "type": "array" }, "notReady": { "type": "integer", "nullable": true }, "outOfSync": { "type": "integer", "nullable": true }, "pending": { "type": "integer", "nullable": true }, "ready": { "type": "integer", "nullable": true }, "waitApplied": { "type": "integer", "nullable": true } }, "type": "object", "nullable": true } }, "type": "object", "nullable": true } }, "required": [ "apiVersion", "kind" ] }; /** * ClusterGroup is a re-usable selector to target a group of clusters. */ class ClusterGroup extends base_1.Model { constructor(data) { super({ apiVersion: ClusterGroup.apiVersion, kind: ClusterGroup.kind, ...data }); } } exports.ClusterGroup = ClusterGroup; ClusterGroup.apiVersion = "fleet.cattle.io/v1alpha1"; ClusterGroup.kind = "ClusterGroup"; ClusterGroup.is = (0, base_1.createTypeMetaGuard)(ClusterGroup); (0, base_1.setSchema)(ClusterGroup, schemaId, () => { (0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)(); (0, validate_1.register)(schemaId, schema); });