@soft-stech/keda
Version:
KEDA(Kubernetes Event-driven Autoscaling) models
178 lines (177 loc) • 6.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CloudEventSource = 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 = "eventing.keda.sh.v1alpha1.CloudEventSource";
const schema = {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"eventing.keda.sh/v1alpha1"
]
},
"kind": {
"type": "string",
"enum": [
"CloudEventSource"
]
},
"metadata": {
"oneOf": [
{
"$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"
},
{
"type": "null"
}
]
},
"spec": {
"properties": {
"authenticationRef": {
"properties": {
"kind": {
"type": "string",
"nullable": true
},
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object",
"nullable": true
},
"clusterName": {
"type": "string",
"nullable": true
},
"destination": {
"properties": {
"azureEventGridTopic": {
"properties": {
"endpoint": {
"type": "string"
}
},
"required": [
"endpoint"
],
"type": "object",
"nullable": true
},
"http": {
"properties": {
"uri": {
"type": "string"
}
},
"required": [
"uri"
],
"type": "object",
"nullable": true
}
},
"type": "object"
},
"eventSubscription": {
"properties": {
"excludedEventTypes": {
"items": {
"enum": [
"keda.scaledobject.ready.v1",
"keda.scaledobject.failed.v1"
],
"type": "string"
},
"type": "array",
"nullable": true
},
"includedEventTypes": {
"items": {
"enum": [
"keda.scaledobject.ready.v1",
"keda.scaledobject.failed.v1"
],
"type": "string"
},
"type": "array",
"nullable": true
}
},
"type": "object",
"nullable": true
}
},
"required": [
"destination"
],
"type": "object"
},
"status": {
"properties": {
"conditions": {
"items": {
"properties": {
"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
}
},
"type": "object",
"nullable": true
}
},
"required": [
"spec",
"apiVersion",
"kind"
]
};
/**
* CloudEventSource defines how a KEDA event will be sent to event sink
*/
class CloudEventSource extends base_1.Model {
constructor(data) {
super({
apiVersion: CloudEventSource.apiVersion,
kind: CloudEventSource.kind,
...data
});
}
}
exports.CloudEventSource = CloudEventSource;
CloudEventSource.apiVersion = "eventing.keda.sh/v1alpha1";
CloudEventSource.kind = "CloudEventSource";
CloudEventSource.is = (0, base_1.createTypeMetaGuard)(CloudEventSource);
(0, base_1.setSchema)(CloudEventSource, schemaId, () => {
(0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)();
(0, validate_1.register)(schemaId, schema);
});