Skip to content

Commit 2e97544

Browse files
committed
[autoscaling] Make objectives required CRD v1alpha2
1 parent 5da4377 commit 2e97544

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

api/datadoghq/v1alpha2/datadogpodautoscaler_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ type DatadogPodAutoscalerSpec struct {
8080
// Objectives are the objectives to reach and maintain for the target resource.
8181
// Default to a single objective to maintain 80% POD CPU utilization.
8282
// +listType=atomic
83-
// +optional
83+
// +kubebuilder:validation:MinItems=1
8484
Objectives []common.DatadogPodAutoscalerObjective `json:"objectives,omitempty"`
8585

8686
// Constraints defines constraints that should always be respected.

config/crd/bases/v1/datadoghq.com_datadogpodautoscalers.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,7 @@ spec:
893893
required:
894894
- type
895895
type: object
896+
minItems: 1
896897
type: array
897898
x-kubernetes-list-type: atomic
898899
owner:

config/crd/bases/v1/datadoghq.com_datadogpodautoscalers_v1alpha2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@
382382
],
383383
"type": "object"
384384
},
385+
"minItems": 1,
385386
"type": "array",
386387
"x-kubernetes-list-type": "atomic"
387388
},

0 commit comments

Comments
 (0)