Skip to content

Commit

Permalink
Respond to comments
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Earls <kearls@redhat.com>
  • Loading branch information
kevinearls committed Jul 15, 2022
1 parent c733b6e commit 81aa971
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apis/v1alpha1/opentelemetrycollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type OpenTelemetryCollectorSpec struct {
// +optional
Replicas *int32 `json:"replicas,omitempty"`

// MinReplicas sets a lower bound to the autoscaling feature.
// MinReplicas sets a lower bound to the autoscaling feature. It must be at least 1
// +optional
MinReplicas *int32 `json:"minReplicas,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion apis/v1alpha1/opentelemetrycollector_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error {
}

if r.Spec.MinReplicas != nil && *r.Spec.MinReplicas < int32(1) {
return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas should be more than one")
return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas should be one or more")
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ spec:
format: int32
type: integer
minReplicas:
description: MinReplicas sets a lower bound to the autoscaling feature.
description: MinReplicas sets a lower bound to the autoscaling feature. It
must be at least 1

This comment has been minimized.

Copy link
@yuriolisa

yuriolisa Jul 15, 2022

Contributor

Only a small nit here. LGTM.

format: int32
type: integer
mode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ spec:
format: int32
type: integer
minReplicas:
description: MinReplicas sets a lower bound to the autoscaling feature.
description: MinReplicas sets a lower bound to the autoscaling feature. It
must be at least 1

This comment has been minimized.

Copy link
@yuriolisa

yuriolisa Jul 15, 2022

Contributor

Only a small nit here. LGTM.

format: int32
type: integer
mode:
Expand Down
1 change: 0 additions & 1 deletion pkg/collector/reconcile/horizontalpodautoscaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func TestExpectedHPA(t *testing.T) {
maxReplicas := int32(3)
updateParms := paramsWithHPA()
updateParms.Instance.Spec.Replicas = &minReplicas
updateParms.Instance.Spec.Replicas = &minReplicas
updateParms.Instance.Spec.MaxReplicas = &maxReplicas
updatedHPA := collector.HorizontalPodAutoscaler(updateParms.Config, logger, updateParms.Instance)

Expand Down
1 change: 0 additions & 1 deletion tests/e2e/autoscale/00-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ kind: OpenTelemetryCollector
metadata:
name: simplest
spec:
replicas: 1
minReplicas: 1
maxReplicas: 2
resources:
Expand Down

0 comments on commit 81aa971

Please sign in to comment.