UNPKG

@soft-stech/fleet

Version:
936 lines (935 loc) 42.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BundleDeployment = 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.BundleDeployment"; const schema = { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "fleet.cattle.io/v1alpha1" ] }, "kind": { "type": "string", "enum": [ "BundleDeployment" ] }, "metadata": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#" }, { "type": "null" } ] }, "spec": { "properties": { "correctDrift": { "properties": { "enabled": { "type": "boolean", "nullable": true }, "force": { "type": "boolean", "nullable": true }, "keepFailHistory": { "type": "boolean", "nullable": true } }, "type": "object", "nullable": true }, "dependsOn": { "items": { "properties": { "name": { "nullable": true, "type": "string" }, "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, "type": "array" }, "deploymentID": { "nullable": true, "type": "string" }, "ociContents": { "type": "boolean", "nullable": true }, "options": { "properties": { "correctDrift": { "properties": { "enabled": { "type": "boolean", "nullable": true }, "force": { "type": "boolean", "nullable": true }, "keepFailHistory": { "type": "boolean", "nullable": true } }, "type": "object", "nullable": true }, "defaultNamespace": { "nullable": true, "type": "string" }, "deleteCRDResources": { "type": "boolean", "nullable": true }, "deleteNamespace": { "type": "boolean", "nullable": true }, "diff": { "nullable": true, "properties": { "comparePatches": { "items": { "properties": { "apiVersion": { "nullable": true, "type": "string" }, "jsonPointers": { "items": { "type": "string" }, "nullable": true, "type": "array" }, "kind": { "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "namespace": { "nullable": true, "type": "string" }, "operations": { "items": { "properties": { "op": { "nullable": true, "type": "string" }, "path": { "nullable": true, "type": "string" }, "value": { "nullable": true, "type": "string" } }, "type": "object" }, "nullable": true, "type": "array" } }, "type": "object" }, "nullable": true, "type": "array" } }, "type": "object" }, "forceSyncGeneration": { "format": "int64", "type": "integer", "nullable": true }, "helm": { "nullable": true, "properties": { "atomic": { "type": "boolean", "nullable": true }, "chart": { "nullable": true, "type": "string" }, "disableDNS": { "type": "boolean", "nullable": true }, "disableDependencyUpdate": { "type": "boolean", "nullable": true }, "disablePreProcess": { "type": "boolean", "nullable": true }, "force": { "type": "boolean", "nullable": true }, "maxHistory": { "type": "integer", "nullable": true }, "releaseName": { "maxLength": 53, "nullable": true, "type": "string", "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" }, "repo": { "nullable": true, "type": "string" }, "skipSchemaValidation": { "type": "boolean", "nullable": true }, "takeOwnership": { "type": "boolean", "nullable": true }, "timeoutSeconds": { "type": "integer", "nullable": true }, "values": { "nullable": true, "type": "object", "properties": {} }, "valuesFiles": { "items": { "type": "string" }, "nullable": true, "type": "array" }, "valuesFrom": { "items": { "properties": { "configMapKeyRef": { "nullable": true, "properties": { "key": { "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "namespace": { "nullable": true, "type": "string" } }, "type": "object" }, "secretKeyRef": { "nullable": true, "properties": { "key": { "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "namespace": { "nullable": true, "type": "string" } }, "type": "object" } }, "type": "object" }, "nullable": true, "type": "array" }, "version": { "nullable": true, "type": "string" }, "waitForJobs": { "type": "boolean", "nullable": true } }, "type": "object" }, "ignore": { "properties": { "conditions": { "items": { "additionalProperties": { "type": "string" }, "type": "object", "properties": {} }, "nullable": true, "type": "array" } }, "type": "object", "nullable": true }, "keepResources": { "type": "boolean", "nullable": true }, "kustomize": { "nullable": true, "properties": { "dir": { "nullable": true, "type": "string" } }, "type": "object" }, "namespace": { "nullable": true, "type": "string" }, "namespaceAnnotations": { "additionalProperties": { "type": "string" }, "nullable": true, "type": "object", "properties": {} }, "namespaceLabels": { "additionalProperties": { "type": "string" }, "nullable": true, "type": "object", "properties": {} }, "serviceAccount": { "nullable": true, "type": "string" }, "yaml": { "nullable": true, "properties": { "overlays": { "items": { "type": "string" }, "nullable": true, "type": "array" } }, "type": "object" } }, "type": "object", "nullable": true }, "paused": { "type": "boolean", "nullable": true }, "stagedDeploymentID": { "nullable": true, "type": "string" }, "stagedOptions": { "properties": { "correctDrift": { "properties": { "enabled": { "type": "boolean", "nullable": true }, "force": { "type": "boolean", "nullable": true }, "keepFailHistory": { "type": "boolean", "nullable": true } }, "type": "object", "nullable": true }, "defaultNamespace": { "nullable": true, "type": "string" }, "deleteCRDResources": { "type": "boolean", "nullable": true }, "deleteNamespace": { "type": "boolean", "nullable": true }, "diff": { "nullable": true, "properties": { "comparePatches": { "items": { "properties": { "apiVersion": { "nullable": true, "type": "string" }, "jsonPointers": { "items": { "type": "string" }, "nullable": true, "type": "array" }, "kind": { "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "namespace": { "nullable": true, "type": "string" }, "operations": { "items": { "properties": { "op": { "nullable": true, "type": "string" }, "path": { "nullable": true, "type": "string" }, "value": { "nullable": true, "type": "string" } }, "type": "object" }, "nullable": true, "type": "array" } }, "type": "object" }, "nullable": true, "type": "array" } }, "type": "object" }, "forceSyncGeneration": { "format": "int64", "type": "integer", "nullable": true }, "helm": { "nullable": true, "properties": { "atomic": { "type": "boolean", "nullable": true }, "chart": { "nullable": true, "type": "string" }, "disableDNS": { "type": "boolean", "nullable": true }, "disableDependencyUpdate": { "type": "boolean", "nullable": true }, "disablePreProcess": { "type": "boolean", "nullable": true }, "force": { "type": "boolean", "nullable": true }, "maxHistory": { "type": "integer", "nullable": true }, "releaseName": { "maxLength": 53, "nullable": true, "type": "string", "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" }, "repo": { "nullable": true, "type": "string" }, "skipSchemaValidation": { "type": "boolean", "nullable": true }, "takeOwnership": { "type": "boolean", "nullable": true }, "timeoutSeconds": { "type": "integer", "nullable": true }, "values": { "nullable": true, "type": "object", "properties": {} }, "valuesFiles": { "items": { "type": "string" }, "nullable": true, "type": "array" }, "valuesFrom": { "items": { "properties": { "configMapKeyRef": { "nullable": true, "properties": { "key": { "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "namespace": { "nullable": true, "type": "string" } }, "type": "object" }, "secretKeyRef": { "nullable": true, "properties": { "key": { "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "namespace": { "nullable": true, "type": "string" } }, "type": "object" } }, "type": "object" }, "nullable": true, "type": "array" }, "version": { "nullable": true, "type": "string" }, "waitForJobs": { "type": "boolean", "nullable": true } }, "type": "object" }, "ignore": { "properties": { "conditions": { "items": { "additionalProperties": { "type": "string" }, "type": "object", "properties": {} }, "nullable": true, "type": "array" } }, "type": "object", "nullable": true }, "keepResources": { "type": "boolean", "nullable": true }, "kustomize": { "nullable": true, "properties": { "dir": { "nullable": true, "type": "string" } }, "type": "object" }, "namespace": { "nullable": true, "type": "string" }, "namespaceAnnotations": { "additionalProperties": { "type": "string" }, "nullable": true, "type": "object", "properties": {} }, "namespaceLabels": { "additionalProperties": { "type": "string" }, "nullable": true, "type": "object", "properties": {} }, "serviceAccount": { "nullable": true, "type": "string" }, "yaml": { "nullable": true, "properties": { "overlays": { "items": { "type": "string" }, "nullable": true, "type": "array" } }, "type": "object" } }, "type": "object", "nullable": true } }, "type": "object", "nullable": true }, "status": { "properties": { "appliedDeploymentID": { "nullable": true, "type": "string" }, "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" }, "nullable": true, "type": "array" }, "display": { "nullable": true, "properties": { "deployed": { "nullable": true, "type": "string" }, "monitored": { "nullable": true, "type": "string" }, "state": { "nullable": true, "type": "string" } }, "type": "object" }, "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" }, "nonModified": { "type": "boolean", "nullable": true }, "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" }, "ready": { "type": "boolean", "nullable": true }, "release": { "nullable": true, "type": "string" }, "resources": { "items": { "properties": { "apiVersion": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "nullable": true, "type": "string" }, "kind": { "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "namespace": { "nullable": true, "type": "string" } }, "type": "object" }, "nullable": true, "type": "array" }, "syncGeneration": { "format": "int64", "nullable": true, "type": "integer" } }, "type": "object", "nullable": true } }, "required": [ "apiVersion", "kind" ] }; /** * BundleDeployment is used internally by Fleet and should not be used directly. * When a Bundle is deployed to a cluster an instance of a Bundle is called a * BundleDeployment. A BundleDeployment represents the state of that Bundle on * a specific cluster with its cluster-specific customizations. The Fleet agent * is only aware of BundleDeployment resources that are created for the cluster * the agent is managing. */ class BundleDeployment extends base_1.Model { constructor(data) { super({ apiVersion: BundleDeployment.apiVersion, kind: BundleDeployment.kind, ...data }); } } exports.BundleDeployment = BundleDeployment; BundleDeployment.apiVersion = "fleet.cattle.io/v1alpha1"; BundleDeployment.kind = "BundleDeployment"; BundleDeployment.is = (0, base_1.createTypeMetaGuard)(BundleDeployment); (0, base_1.setSchema)(BundleDeployment, schemaId, () => { (0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)(); (0, validate_1.register)(schemaId, schema); });