3920d76ba2
Split out of #281 per review: the VerticalPodAutoscaler CRDs land first, together with their generated kubeconform schemas, so CI can validate the VPA objects that follow. - Adds apps/base/vpa-system with the v1.7.0 VPA CRDs served via the artifactapi github remote (terraform-artifactapi#14, merged) - Adds schemas/autoscaling.k8s.io/ (verticalpodautoscaler + checkpoint, v1 and v1beta2) generated with the same transform as ci/generate-schemas.sh (from the CRD manifest rather than the live cluster, since the CRDs are not installed yet) - Wires the vpa-system overlay into the platform applicationset Verified: kustomize renders both CRDs; a sample updateMode Off VPA passes kubeconform against the new schemas. Merge before #281 (recommender) and #283 (per-workload VPAs). Reviewed-on: #284 Co-authored-by: Ben Vincent <ben@unkin.net> Co-committed-by: Ben Vincent <ben@unkin.net>
432 lines
14 KiB
JSON
432 lines
14 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"properties": {
|
|
"apiVersion": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"type": "object"
|
|
},
|
|
"spec": {
|
|
"properties": {
|
|
"recommenders": {
|
|
"items": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"resourcePolicy": {
|
|
"properties": {
|
|
"containerPolicies": {
|
|
"items": {
|
|
"properties": {
|
|
"containerName": {
|
|
"type": "string"
|
|
},
|
|
"controlledResources": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"controlledValues": {
|
|
"enum": [
|
|
"RequestsAndLimits",
|
|
"RequestsOnly"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"maxAllowed": {
|
|
"additionalProperties": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"type": "object"
|
|
},
|
|
"memoryAggregationIntervalCount": {
|
|
"format": "int64",
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
"memoryAggregationIntervalSeconds": {
|
|
"format": "int32",
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
"minAllowed": {
|
|
"additionalProperties": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"type": "object"
|
|
},
|
|
"mode": {
|
|
"enum": [
|
|
"Auto",
|
|
"Off"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"oomBumpUpRatio": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"oomMinBumpUp": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"startupBoost": {
|
|
"properties": {
|
|
"cpu": {
|
|
"properties": {
|
|
"durationSeconds": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"factor": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"quantity": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"Factor",
|
|
"Quantity"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"type": "object",
|
|
"x-kubernetes-validations": [
|
|
{
|
|
"message": "factor is required when type is Factor and forbidden otherwise",
|
|
"rule": "(self.type == 'Factor') == has(self.factor)"
|
|
},
|
|
{
|
|
"message": "quantity is required when type is Quantity and forbidden otherwise",
|
|
"rule": "(self.type == 'Quantity') == has(self.quantity)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"startupBoost": {
|
|
"properties": {
|
|
"cpu": {
|
|
"properties": {
|
|
"durationSeconds": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"factor": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"quantity": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"Factor",
|
|
"Quantity"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"type": "object",
|
|
"x-kubernetes-validations": [
|
|
{
|
|
"message": "factor is required when type is Factor and forbidden otherwise",
|
|
"rule": "(self.type == 'Factor') == has(self.factor)"
|
|
},
|
|
{
|
|
"message": "quantity is required when type is Quantity and forbidden otherwise",
|
|
"rule": "(self.type == 'Quantity') == has(self.quantity)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"targetRef": {
|
|
"properties": {
|
|
"apiVersion": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"kind",
|
|
"name"
|
|
],
|
|
"type": "object",
|
|
"x-kubernetes-map-type": "atomic"
|
|
},
|
|
"updatePolicy": {
|
|
"properties": {
|
|
"evictAfterOOMSeconds": {
|
|
"format": "int32",
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
"evictionRequirements": {
|
|
"items": {
|
|
"properties": {
|
|
"changeRequirement": {
|
|
"enum": [
|
|
"TargetHigherThanRequests",
|
|
"TargetLowerThanRequests"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"resources": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"changeRequirement",
|
|
"resources"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"minReplicas": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"updateMode": {
|
|
"enum": [
|
|
"Off",
|
|
"Initial",
|
|
"Recreate",
|
|
"InPlaceOrRecreate",
|
|
"InPlace",
|
|
"Auto"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"targetRef"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"status": {
|
|
"properties": {
|
|
"conditions": {
|
|
"items": {
|
|
"properties": {
|
|
"lastTransitionTime": {
|
|
"format": "date-time",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"observedGeneration": {
|
|
"format": "int64",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"status",
|
|
"type"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"observedGeneration": {
|
|
"format": "int64",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"recommendation": {
|
|
"properties": {
|
|
"containerRecommendations": {
|
|
"items": {
|
|
"properties": {
|
|
"containerName": {
|
|
"type": "string"
|
|
},
|
|
"lowerBound": {
|
|
"additionalProperties": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"type": "object"
|
|
},
|
|
"target": {
|
|
"additionalProperties": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"type": "object"
|
|
},
|
|
"uncappedTarget": {
|
|
"additionalProperties": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"type": "object"
|
|
},
|
|
"upperBound": {
|
|
"additionalProperties": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"target"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"spec"
|
|
],
|
|
"type": "object"
|
|
}
|