UNPKG

@soft-stech/keda

Version:
740 lines (739 loc) 32.5 kB
"use strict"; 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": { "awsSecretManager": { "properties": { "credentials": { "properties": { "accessKey": { "properties": { "valueFrom": { "properties": { "secretKeyRef": { "properties": { "key": { "type": "string" }, "name": { "type": "string" } }, "required": [ "key", "name" ], "type": "object" } }, "required": [ "secretKeyRef" ], "type": "object" } }, "required": [ "valueFrom" ], "type": "object" }, "accessSecretKey": { "properties": { "valueFrom": { "properties": { "secretKeyRef": { "properties": { "key": { "type": "string" }, "name": { "type": "string" } }, "required": [ "key", "name" ], "type": "object" } }, "required": [ "secretKeyRef" ], "type": "object" } }, "required": [ "valueFrom" ], "type": "object" }, "accessToken": { "properties": { "valueFrom": { "properties": { "secretKeyRef": { "properties": { "key": { "type": "string" }, "name": { "type": "string" } }, "required": [ "key", "name" ], "type": "object" } }, "required": [ "secretKeyRef" ], "type": "object" } }, "required": [ "valueFrom" ], "type": "object", "nullable": true } }, "required": [ "accessKey", "accessSecretKey" ], "type": "object", "nullable": true }, "podIdentity": { "properties": { "identityAuthorityHost": { "type": "string", "nullable": true }, "identityId": { "type": "string", "nullable": true }, "identityOwner": { "enum": [ "keda", "workload" ], "type": "string", "nullable": true }, "identityTenantId": { "type": "string", "nullable": true }, "provider": { "enum": [ "azure-workload", "gcp", "aws", "aws-eks", "none" ], "type": "string" }, "roleArn": { "type": "string", "nullable": true } }, "required": [ "provider" ], "type": "object", "nullable": true }, "region": { "type": "string", "nullable": true }, "secrets": { "items": { "properties": { "name": { "type": "string" }, "parameter": { "type": "string" }, "versionId": { "type": "string", "nullable": true }, "versionStage": { "type": "string", "nullable": true } }, "required": [ "name", "parameter" ], "type": "object" }, "type": "array" } }, "required": [ "secrets" ], "type": "object", "nullable": true }, "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": { "identityAuthorityHost": { "type": "string", "nullable": true }, "identityId": { "type": "string", "nullable": true }, "identityOwner": { "enum": [ "keda", "workload" ], "type": "string", "nullable": true }, "identityTenantId": { "type": "string", "nullable": true }, "provider": { "enum": [ "azure-workload", "gcp", "aws", "aws-eks", "none" ], "type": "string" }, "roleArn": { "type": "string", "nullable": true } }, "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 }, "configMapTargetRef": { "items": { "properties": { "key": { "type": "string" }, "name": { "type": "string" }, "parameter": { "type": "string" } }, "required": [ "key", "name", "parameter" ], "type": "object" }, "type": "array", "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 }, "gcpSecretManager": { "properties": { "credentials": { "properties": { "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" } }, "required": [ "clientSecret" ], "type": "object", "nullable": true }, "podIdentity": { "properties": { "identityAuthorityHost": { "type": "string", "nullable": true }, "identityId": { "type": "string", "nullable": true }, "identityOwner": { "enum": [ "keda", "workload" ], "type": "string", "nullable": true }, "identityTenantId": { "type": "string", "nullable": true }, "provider": { "enum": [ "azure-workload", "gcp", "aws", "aws-eks", "none" ], "type": "string" }, "roleArn": { "type": "string", "nullable": true } }, "required": [ "provider" ], "type": "object", "nullable": true }, "secrets": { "items": { "properties": { "id": { "type": "string" }, "parameter": { "type": "string" }, "version": { "type": "string", "nullable": true } }, "required": [ "id", "parameter" ], "type": "object" }, "type": "array" } }, "required": [ "secrets" ], "type": "object", "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" }, "pkiData": { "properties": { "altNames": { "type": "string", "nullable": true }, "commonName": { "type": "string", "nullable": true }, "format": { "type": "string", "nullable": true }, "ipSans": { "type": "string", "nullable": true }, "otherSans": { "type": "string", "nullable": true }, "ttl": { "type": "string", "nullable": true }, "uriSans": { "type": "string", "nullable": true } }, "type": "object", "nullable": true }, "type": { "type": "string", "nullable": true } }, "required": [ "key", "parameter", "path" ], "type": "object" }, "type": "array" } }, "required": [ "address", "authentication", "secrets" ], "type": "object", "nullable": true }, "podIdentity": { "properties": { "identityAuthorityHost": { "type": "string", "nullable": true }, "identityId": { "type": "string", "nullable": true }, "identityOwner": { "enum": [ "keda", "workload" ], "type": "string", "nullable": true }, "identityTenantId": { "type": "string", "nullable": true }, "provider": { "enum": [ "azure-workload", "gcp", "aws", "aws-eks", "none" ], "type": "string" }, "roleArn": { "type": "string", "nullable": true } }, "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" }, "status": { "properties": { "scaledjobs": { "type": "string", "nullable": true }, "scaledobjects": { "type": "string", "nullable": true } }, "type": "object", "nullable": true } }, "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); });