@soft-stech/fleet
Version:
139 lines (138 loc) • 4.62 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BundleNamespaceMapping = 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.BundleNamespaceMapping";
const schema = {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"fleet.cattle.io/v1alpha1"
]
},
"bundleSelector": {
"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"
},
"kind": {
"type": "string",
"enum": [
"BundleNamespaceMapping"
]
},
"metadata": {
"oneOf": [
{
"$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"
},
{
"type": "null"
}
]
},
"namespaceSelector": {
"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"
}
},
"required": [
"apiVersion",
"kind"
]
};
/**
* BundleNamespaceMapping maps bundles to clusters in other namespaces.
*/
class BundleNamespaceMapping extends base_1.Model {
constructor(data) {
super({
apiVersion: BundleNamespaceMapping.apiVersion,
kind: BundleNamespaceMapping.kind,
...data
});
}
}
exports.BundleNamespaceMapping = BundleNamespaceMapping;
BundleNamespaceMapping.apiVersion = "fleet.cattle.io/v1alpha1";
BundleNamespaceMapping.kind = "BundleNamespaceMapping";
BundleNamespaceMapping.is = (0, base_1.createTypeMetaGuard)(BundleNamespaceMapping);
(0, base_1.setSchema)(BundleNamespaceMapping, schemaId, () => {
(0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)();
(0, validate_1.register)(schemaId, schema);
});