UNPKG

@soft-stech/flux-cd

Version:
428 lines (427 loc) 15.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GitRepository = 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.GitRepository"; const schema = { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "source.toolkit.fluxcd.io/v1beta2" ] }, "kind": { "type": "string", "enum": [ "GitRepository" ] }, "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 }, "gitImplementation": { "default": "go-git", "enum": [ "go-git", "libgit2" ], "type": "string", "nullable": true }, "ignore": { "type": "string", "nullable": true }, "include": { "items": { "properties": { "fromPath": { "type": "string", "nullable": true }, "repository": { "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object" }, "toPath": { "type": "string", "nullable": true } }, "required": [ "repository" ], "type": "object" }, "type": "array", "nullable": true }, "interval": { "type": "string", "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" }, "recurseSubmodules": { "type": "boolean", "nullable": true }, "ref": { "properties": { "branch": { "type": "string", "nullable": true }, "commit": { "type": "string", "nullable": true }, "name": { "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 }, "suspend": { "type": "boolean", "nullable": true }, "timeout": { "default": "60s", "type": "string", "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m))+$", "nullable": true }, "url": { "type": "string", "pattern": "^(http|https|ssh):\\/\\/.*$" }, "verify": { "properties": { "mode": { "enum": [ "head" ], "type": "string" }, "secretRef": { "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object" } }, "required": [ "mode", "secretRef" ], "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 }, "includedArtifacts": { "items": { "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" }, "type": "array", "nullable": true }, "lastHandledReconcileAt": { "type": "string", "nullable": true }, "observedGeneration": { "format": "int64", "type": "integer", "nullable": true }, "observedIgnore": { "type": "string", "nullable": true }, "observedInclude": { "items": { "properties": { "fromPath": { "type": "string", "nullable": true }, "repository": { "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object" }, "toPath": { "type": "string", "nullable": true } }, "required": [ "repository" ], "type": "object" }, "type": "array", "nullable": true }, "observedRecurseSubmodules": { "type": "boolean", "nullable": true }, "url": { "type": "string", "nullable": true } }, "type": "object", "nullable": true } }, "required": [ "apiVersion", "kind" ] }; /** * GitRepository is the Schema for the gitrepositories API. */ class GitRepository extends base_1.Model { constructor(data) { super({ apiVersion: GitRepository.apiVersion, kind: GitRepository.kind, ...data }); } } exports.GitRepository = GitRepository; GitRepository.apiVersion = "source.toolkit.fluxcd.io/v1beta2"; GitRepository.kind = "GitRepository"; GitRepository.is = (0, base_1.createTypeMetaGuard)(GitRepository); (0, base_1.setSchema)(GitRepository, schemaId, () => { (0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)(); (0, validate_1.register)(schemaId, schema); });