@soft-stech/karpenter
Version:
417 lines (416 loc) • 16.9 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NodeClaim = 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 = "karpenter.sh.v1beta1.NodeClaim";
const schema = {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"karpenter.sh/v1beta1"
]
},
"kind": {
"type": "string",
"enum": [
"NodeClaim"
]
},
"metadata": {
"oneOf": [
{
"$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"
},
{
"type": "null"
}
]
},
"spec": {
"properties": {
"kubelet": {
"properties": {
"clusterDNS": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
},
"cpuCFSQuota": {
"type": "boolean",
"nullable": true
},
"evictionHard": {
"additionalProperties": {
"type": "string",
"pattern": "^((\\d{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)%||(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?)$"
},
"type": "object",
"properties": {},
"nullable": true
},
"evictionMaxPodGracePeriod": {
"format": "int32",
"type": "integer",
"nullable": true
},
"evictionSoft": {
"additionalProperties": {
"type": "string",
"pattern": "^((\\d{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)%||(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?)$"
},
"type": "object",
"properties": {},
"nullable": true
},
"evictionSoftGracePeriod": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"properties": {},
"nullable": true
},
"imageGCHighThresholdPercent": {
"format": "int32",
"type": "integer",
"minimum": 0,
"maximum": 100,
"nullable": true
},
"imageGCLowThresholdPercent": {
"format": "int32",
"type": "integer",
"minimum": 0,
"maximum": 100,
"nullable": true
},
"kubeReserved": {
"additionalProperties": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
},
"type": "object",
"properties": {},
"nullable": true
},
"maxPods": {
"format": "int32",
"type": "integer",
"minimum": 0,
"nullable": true
},
"podsPerCore": {
"format": "int32",
"type": "integer",
"minimum": 0,
"nullable": true
},
"systemReserved": {
"additionalProperties": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
},
"type": "object",
"properties": {},
"nullable": true
}
},
"type": "object",
"nullable": true
},
"nodeClassRef": {
"properties": {
"apiVersion": {
"type": "string",
"nullable": true
},
"kind": {
"type": "string",
"nullable": true
},
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"requirements": {
"items": {
"properties": {
"key": {
"type": "string",
"maxLength": 316,
"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]$"
},
"minValues": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"nullable": true
},
"operator": {
"type": "string",
"enum": [
"In",
"NotIn",
"Exists",
"DoesNotExist",
"Gt",
"Lt"
]
},
"values": {
"items": {
"type": "string"
},
"type": "array",
"maxLength": 63,
"pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$",
"nullable": true
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"maxItems": 30,
"type": "array"
},
"resources": {
"properties": {
"requests": {
"additionalProperties": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
},
"type": "object",
"properties": {},
"nullable": true
}
},
"type": "object",
"nullable": true
},
"startupTaints": {
"items": {
"properties": {
"effect": {
"type": "string",
"enum": [
"NoSchedule",
"PreferNoSchedule",
"NoExecute"
]
},
"key": {
"type": "string",
"minLength": 1,
"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]$"
},
"timeAdded": {
"format": "date-time",
"type": "string",
"nullable": true
},
"value": {
"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]$",
"nullable": true
}
},
"required": [
"effect",
"key"
],
"type": "object"
},
"type": "array",
"nullable": true
},
"taints": {
"items": {
"properties": {
"effect": {
"type": "string",
"enum": [
"NoSchedule",
"PreferNoSchedule",
"NoExecute"
]
},
"key": {
"type": "string",
"minLength": 1,
"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]$"
},
"timeAdded": {
"format": "date-time",
"type": "string",
"nullable": true
},
"value": {
"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]$",
"nullable": true
}
},
"required": [
"effect",
"key"
],
"type": "object"
},
"type": "array",
"nullable": true
}
},
"required": [
"nodeClassRef",
"requirements"
],
"type": "object"
},
"status": {
"properties": {
"allocatable": {
"additionalProperties": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
},
"type": "object",
"properties": {},
"nullable": true
},
"capacity": {
"additionalProperties": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
},
"type": "object",
"properties": {},
"nullable": true
},
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"type": "string",
"nullable": true
},
"message": {
"type": "string",
"nullable": true
},
"reason": {
"type": "string",
"nullable": true
},
"severity": {
"type": "string",
"nullable": true
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"status",
"type"
],
"type": "object"
},
"type": "array",
"nullable": true
},
"imageID": {
"type": "string",
"nullable": true
},
"nodeName": {
"type": "string",
"nullable": true
},
"providerID": {
"type": "string",
"nullable": true
}
},
"type": "object",
"nullable": true
}
},
"required": [
"spec",
"apiVersion",
"kind"
]
};
/**
* NodeClaim is the Schema for the NodeClaims API
*/
class NodeClaim extends base_1.Model {
constructor(data) {
super({
apiVersion: NodeClaim.apiVersion,
kind: NodeClaim.kind,
...data
});
}
}
exports.NodeClaim = NodeClaim;
NodeClaim.apiVersion = "karpenter.sh/v1beta1";
NodeClaim.kind = "NodeClaim";
NodeClaim.is = (0, base_1.createTypeMetaGuard)(NodeClaim);
(0, base_1.setSchema)(NodeClaim, schemaId, () => {
(0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)();
(0, validate_1.register)(schemaId, schema);
});