@soft-stech/keda
Version:
KEDA(Kubernetes Event-driven Autoscaling) models
311 lines (310 loc) • 12.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TriggerAuthentication = 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 = "keda.sh.v1alpha1.TriggerAuthentication";
const schema = {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"keda.sh/v1alpha1"
]
},
"kind": {
"type": "string",
"enum": [
"TriggerAuthentication"
]
},
"metadata": {
"oneOf": [
{
"$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"
},
{
"type": "null"
}
]
},
"spec": {
"properties": {
"azureKeyVault": {
"properties": {
"cloud": {
"properties": {
"activeDirectoryEndpoint": {
"type": "string",
"nullable": true
},
"keyVaultResourceURL": {
"type": "string",
"nullable": true
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object",
"nullable": true
},
"credentials": {
"properties": {
"clientId": {
"type": "string"
},
"clientSecret": {
"properties": {
"valueFrom": {
"properties": {
"secretKeyRef": {
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"type": "object"
}
},
"required": [
"secretKeyRef"
],
"type": "object"
}
},
"required": [
"valueFrom"
],
"type": "object"
},
"tenantId": {
"type": "string"
}
},
"required": [
"clientId",
"clientSecret",
"tenantId"
],
"type": "object",
"nullable": true
},
"podIdentity": {
"properties": {
"identityId": {
"type": "string",
"nullable": true
},
"provider": {
"type": "string"
}
},
"required": [
"provider"
],
"type": "object",
"nullable": true
},
"secrets": {
"items": {
"properties": {
"name": {
"type": "string"
},
"parameter": {
"type": "string"
},
"version": {
"type": "string",
"nullable": true
}
},
"required": [
"name",
"parameter"
],
"type": "object"
},
"type": "array"
},
"vaultUri": {
"type": "string"
}
},
"required": [
"secrets",
"vaultUri"
],
"type": "object",
"nullable": true
},
"env": {
"items": {
"properties": {
"containerName": {
"type": "string",
"nullable": true
},
"name": {
"type": "string"
},
"parameter": {
"type": "string"
}
},
"required": [
"name",
"parameter"
],
"type": "object"
},
"type": "array",
"nullable": true
},
"hashiCorpVault": {
"properties": {
"address": {
"type": "string"
},
"authentication": {
"type": "string"
},
"credential": {
"properties": {
"serviceAccount": {
"type": "string",
"nullable": true
},
"token": {
"type": "string",
"nullable": true
}
},
"type": "object",
"nullable": true
},
"mount": {
"type": "string",
"nullable": true
},
"namespace": {
"type": "string",
"nullable": true
},
"role": {
"type": "string",
"nullable": true
},
"secrets": {
"items": {
"properties": {
"key": {
"type": "string"
},
"parameter": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"key",
"parameter",
"path"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"address",
"authentication",
"secrets"
],
"type": "object",
"nullable": true
},
"podIdentity": {
"properties": {
"identityId": {
"type": "string",
"nullable": true
},
"provider": {
"type": "string"
}
},
"required": [
"provider"
],
"type": "object",
"nullable": true
},
"secretTargetRef": {
"items": {
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"parameter": {
"type": "string"
}
},
"required": [
"key",
"name",
"parameter"
],
"type": "object"
},
"type": "array",
"nullable": true
}
},
"type": "object"
}
},
"required": [
"spec",
"apiVersion",
"kind"
]
};
/**
* TriggerAuthentication defines how a trigger can authenticate
*/
class TriggerAuthentication extends base_1.Model {
constructor(data) {
super({
apiVersion: TriggerAuthentication.apiVersion,
kind: TriggerAuthentication.kind,
...data
});
}
}
exports.TriggerAuthentication = TriggerAuthentication;
TriggerAuthentication.apiVersion = "keda.sh/v1alpha1";
TriggerAuthentication.kind = "TriggerAuthentication";
TriggerAuthentication.is = (0, base_1.createTypeMetaGuard)(TriggerAuthentication);
(0, base_1.setSchema)(TriggerAuthentication, schemaId, () => {
(0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)();
(0, validate_1.register)(schemaId, schema);
});