UNPKG

@soft-stech/flux-cd

Version:
357 lines (356 loc) 12.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OCIRepository = 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 = "source.toolkit.fluxcd.io.v1beta2.OCIRepository"; const schema = { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "source.toolkit.fluxcd.io/v1beta2" ] }, "kind": { "type": "string", "enum": [ "OCIRepository" ] }, "metadata": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#" }, { "type": "null" } ] }, "spec": { "properties": { "certSecretRef": { "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object", "nullable": true }, "ignore": { "type": "string", "nullable": true }, "insecure": { "type": "boolean", "nullable": true }, "interval": { "type": "string", "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" }, "layerSelector": { "properties": { "mediaType": { "type": "string", "nullable": true }, "operation": { "enum": [ "extract", "copy" ], "type": "string", "nullable": true } }, "type": "object", "nullable": true }, "provider": { "default": "generic", "enum": [ "generic", "aws", "azure", "gcp" ], "type": "string", "nullable": true }, "ref": { "properties": { "digest": { "type": "string", "nullable": true }, "semver": { "type": "string", "nullable": true }, "tag": { "type": "string", "nullable": true } }, "type": "object", "nullable": true }, "secretRef": { "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object", "nullable": true }, "serviceAccountName": { "type": "string", "nullable": true }, "suspend": { "type": "boolean", "nullable": true }, "timeout": { "default": "60s", "type": "string", "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m))+$", "nullable": true }, "url": { "type": "string", "pattern": "^oci:\\/\\/.*$" }, "verify": { "properties": { "matchOIDCIdentity": { "items": { "properties": { "issuer": { "type": "string" }, "subject": { "type": "string" } }, "required": [ "issuer", "subject" ], "type": "object" }, "type": "array", "nullable": true }, "provider": { "default": "cosign", "enum": [ "cosign" ], "type": "string" }, "secretRef": { "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object", "nullable": true } }, "required": [ "provider" ], "type": "object", "nullable": true } }, "required": [ "interval", "url" ], "type": "object", "nullable": true }, "status": { "default": { "observedGeneration": -1 }, "properties": { "artifact": { "properties": { "digest": { "type": "string", "pattern": "^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$", "nullable": true }, "lastUpdateTime": { "format": "date-time", "type": "string" }, "metadata": { "additionalProperties": { "type": "string" }, "type": "object", "properties": {}, "nullable": true }, "path": { "type": "string" }, "revision": { "type": "string" }, "size": { "format": "int64", "type": "integer", "nullable": true }, "url": { "type": "string" } }, "required": [ "lastUpdateTime", "path", "revision", "url" ], "type": "object", "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 }, "contentConfigChecksum": { "type": "string", "nullable": true }, "lastHandledReconcileAt": { "type": "string", "nullable": true }, "observedGeneration": { "format": "int64", "type": "integer", "nullable": true }, "observedIgnore": { "type": "string", "nullable": true }, "observedLayerSelector": { "properties": { "mediaType": { "type": "string", "nullable": true }, "operation": { "enum": [ "extract", "copy" ], "type": "string", "nullable": true } }, "type": "object", "nullable": true }, "url": { "type": "string", "nullable": true } }, "type": "object", "nullable": true } }, "required": [ "apiVersion", "kind" ] }; /** * OCIRepository is the Schema for the ocirepositories API */ class OCIRepository extends base_1.Model { constructor(data) { super({ apiVersion: OCIRepository.apiVersion, kind: OCIRepository.kind, ...data }); } } exports.OCIRepository = OCIRepository; OCIRepository.apiVersion = "source.toolkit.fluxcd.io/v1beta2"; OCIRepository.kind = "OCIRepository"; OCIRepository.is = (0, base_1.createTypeMetaGuard)(OCIRepository); (0, base_1.setSchema)(OCIRepository, schemaId, () => { (0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)(); (0, validate_1.register)(schemaId, schema); });