UNPKG

@soft-stech/flagger

Version:
54 lines (53 loc) 1.99 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IMetricTemplateSchema = void 0; // Generated by ts-to-zod const zod_1 = require("zod"); const ObjectMeta_schema_1 = require("@soft-stech/apimachinery/apis/meta/v1/ObjectMeta.schema"); /** * MetricTemplate is the Schema for the MetricTemplates API. */ exports.IMetricTemplateSchema = zod_1.z.object({ "apiVersion": zod_1.z.literal("flagger.app/v1beta1"), "kind": zod_1.z.literal("MetricTemplate"), "metadata": ObjectMeta_schema_1.iObjectMetaSchema.optional(), /** * MetricTemplateSpec defines the desired state of a MetricTemplate. */ "spec": zod_1.z.object({ /** * Provider of this metric template */ "provider": zod_1.z.object({ /** * Type of this provider */ "type": zod_1.z.union([zod_1.z.literal("prometheus"), zod_1.z.literal("influxdb"), zod_1.z.literal("datadog"), zod_1.z.literal("stackdriver"), zod_1.z.literal("cloudwatch"), zod_1.z.literal("newrelic"), zod_1.z.literal("graphite"), zod_1.z.literal("dynatrace")]), /** * API address of this provider */ "address": zod_1.z.string().optional(), /** * Kubernetes secret reference containing the provider credentials */ "secretRef": zod_1.z.object({ /** * Name of the Kubernetes secret */ "name": zod_1.z.string() }).optional(), /** * Region of the provider */ "region": zod_1.z.string().optional(), /** * Disable SSL certificate validation for the provider address */ "insecureSkipVerify": zod_1.z.boolean().optional() }), /** * Query of this metric template */ "query": zod_1.z.string() }).optional() });