UNPKG

@soft-stech/flux-cd

Version:
261 lines (260 loc) 8.99 kB
import { addSchema } from "@soft-stech/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta"; import { Model, setSchema, createTypeMetaGuard } from "@soft-stech/base"; import { register } from "@soft-stech/validate"; const schemaId = "image.toolkit.fluxcd.io.v1beta2.ImageRepository"; const schema = { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "image.toolkit.fluxcd.io/v1beta2" ] }, "kind": { "type": "string", "enum": [ "ImageRepository" ] }, "metadata": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#" }, { "type": "null" } ] }, "spec": { "properties": { "accessFrom": { "properties": { "namespaceSelectors": { "items": { "properties": { "matchLabels": { "additionalProperties": { "type": "string" }, "type": "object", "properties": {}, "nullable": true } }, "type": "object" }, "type": "array" } }, "required": [ "namespaceSelectors" ], "type": "object", "nullable": true }, "certSecretRef": { "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object", "nullable": true }, "exclusionList": { "default": [ "^.*\\.sig$" ], "items": { "type": "string" }, "maxItems": 25, "type": "array", "nullable": true }, "image": { "type": "string", "nullable": true }, "insecure": { "type": "boolean", "nullable": true }, "interval": { "type": "string", "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$", "nullable": true }, "provider": { "default": "generic", "enum": [ "generic", "aws", "azure", "gcp" ], "type": "string", "nullable": true }, "secretRef": { "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object", "nullable": true }, "serviceAccountName": { "maxLength": 253, "type": "string", "nullable": true }, "suspend": { "type": "boolean", "nullable": true }, "timeout": { "type": "string", "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m))+$", "nullable": true } }, "type": "object", "nullable": true }, "status": { "default": { "observedGeneration": -1 }, "properties": { "canonicalImageName": { "type": "string", "nullable": true }, "conditions": { "items": { "properties": { "lastTransitionTime": { "format": "date-time", "type": "string" }, "message": { "maxLength": 32768, "type": "string" }, "observedGeneration": { "format": "int64", "type": "integer", "minimum": 0, "nullable": true }, "reason": { "maxLength": 1024, "minLength": 1, "type": "string", "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$" }, "status": { "enum": [ "True", "False", "Unknown" ], "type": "string" }, "type": { "maxLength": 316, "type": "string", "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$" } }, "required": [ "lastTransitionTime", "message", "reason", "status", "type" ], "type": "object" }, "type": "array", "nullable": true }, "lastHandledReconcileAt": { "type": "string", "nullable": true }, "lastScanResult": { "properties": { "latestTags": { "items": { "type": "string" }, "type": "array", "nullable": true }, "scanTime": { "format": "date-time", "type": "string", "nullable": true }, "tagCount": { "type": "integer" } }, "required": [ "tagCount" ], "type": "object", "nullable": true }, "observedExclusionList": { "items": { "type": "string" }, "type": "array", "nullable": true }, "observedGeneration": { "format": "int64", "type": "integer", "nullable": true } }, "type": "object", "nullable": true } }, "required": [ "apiVersion", "kind" ] }; /** * ImageRepository is the Schema for the imagerepositories API */ export class ImageRepository extends Model { constructor(data) { super({ apiVersion: ImageRepository.apiVersion, kind: ImageRepository.kind, ...data }); } } ImageRepository.apiVersion = "image.toolkit.fluxcd.io/v1beta2"; ImageRepository.kind = "ImageRepository"; ImageRepository.is = createTypeMetaGuard(ImageRepository); setSchema(ImageRepository, schemaId, () => { addSchema(); register(schemaId, schema); });