@soft-stech/flux-cd
Version:
318 lines (317 loc) • 12.4 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImageUpdateAutomation = 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 = "image.toolkit.fluxcd.io.v1beta1.ImageUpdateAutomation";
const schema = {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"image.toolkit.fluxcd.io/v1beta1"
]
},
"kind": {
"type": "string",
"enum": [
"ImageUpdateAutomation"
]
},
"metadata": {
"oneOf": [
{
"$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"
},
{
"type": "null"
}
]
},
"spec": {
"properties": {
"git": {
"properties": {
"checkout": {
"properties": {
"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"
}
},
"required": [
"ref"
],
"type": "object",
"nullable": true
},
"commit": {
"properties": {
"author": {
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string",
"nullable": true
}
},
"required": [
"email"
],
"type": "object"
},
"messageTemplate": {
"type": "string",
"nullable": true
},
"signingKey": {
"properties": {
"secretRef": {
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object",
"nullable": true
}
},
"type": "object",
"nullable": true
}
},
"required": [
"author"
],
"type": "object"
},
"push": {
"properties": {
"branch": {
"type": "string",
"nullable": true
},
"options": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"properties": {},
"nullable": true
},
"refspec": {
"type": "string",
"nullable": true
}
},
"type": "object",
"nullable": true
}
},
"required": [
"commit"
],
"type": "object",
"nullable": true
},
"interval": {
"type": "string",
"pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
},
"sourceRef": {
"properties": {
"apiVersion": {
"type": "string",
"nullable": true
},
"kind": {
"default": "GitRepository",
"enum": [
"GitRepository"
],
"type": "string"
},
"name": {
"type": "string"
},
"namespace": {
"type": "string",
"nullable": true
}
},
"required": [
"kind",
"name"
],
"type": "object"
},
"suspend": {
"type": "boolean",
"nullable": true
},
"update": {
"default": {
"strategy": "Setters"
},
"properties": {
"path": {
"type": "string",
"nullable": true
},
"strategy": {
"default": "Setters",
"enum": [
"Setters"
],
"type": "string"
}
},
"required": [
"strategy"
],
"type": "object",
"nullable": true
}
},
"required": [
"interval",
"sourceRef"
],
"type": "object",
"nullable": true
},
"status": {
"default": {
"observedGeneration": -1
},
"properties": {
"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
},
"lastAutomationRunTime": {
"format": "date-time",
"type": "string",
"nullable": true
},
"lastHandledReconcileAt": {
"type": "string",
"nullable": true
},
"lastPushCommit": {
"type": "string",
"nullable": true
},
"lastPushTime": {
"format": "date-time",
"type": "string",
"nullable": true
},
"observedGeneration": {
"format": "int64",
"type": "integer",
"nullable": true
}
},
"type": "object",
"nullable": true
}
},
"required": [
"apiVersion",
"kind"
]
};
/**
* ImageUpdateAutomation is the Schema for the imageupdateautomations API
*/
class ImageUpdateAutomation extends base_1.Model {
constructor(data) {
super({
apiVersion: ImageUpdateAutomation.apiVersion,
kind: ImageUpdateAutomation.kind,
...data
});
}
}
exports.ImageUpdateAutomation = ImageUpdateAutomation;
ImageUpdateAutomation.apiVersion = "image.toolkit.fluxcd.io/v1beta1";
ImageUpdateAutomation.kind = "ImageUpdateAutomation";
ImageUpdateAutomation.is = (0, base_1.createTypeMetaGuard)(ImageUpdateAutomation);
(0, base_1.setSchema)(ImageUpdateAutomation, schemaId, () => {
(0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)();
(0, validate_1.register)(schemaId, schema);
});