Skip to content

Commit

Permalink
default, min, assert less
Browse files Browse the repository at this point in the history
  • Loading branch information
matthagenbuch committed May 10, 2024
1 parent 5fa0025 commit a111e27
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5544,6 +5544,7 @@ spec:
configVersions:
format: int32
type: integer
default: 3
configmaps:
items:
properties:
Expand Down
2 changes: 1 addition & 1 deletion controllers/opentelemetrycollector_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (r *OpenTelemetryCollectorReconciler) findOtelOwnedObjects(ctx context.Cont
})
configVersionsToKeep := 3
if params.OtelCol.Spec.ConfigVersions != nil {
configVersionsToKeep = int(*params.OtelCol.Spec.ConfigVersions)
configVersionsToKeep = max(1, int(*params.OtelCol.Spec.ConfigVersions))
}

for i := range configMapList.Items {
Expand Down
9 changes: 0 additions & 9 deletions tests/e2e/versioned-configmaps/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ spec:
- name: otc-internal
configMap:
name: simple-collector-d6f40475
items:
- key: collector.yaml
path: collector.yaml
defaultMode: 420
containers:
- name: otc-container
volumeMounts:
- name: otc-internal
mountPath: /conf
status:
readyReplicas: 1
---
Expand Down
9 changes: 0 additions & 9 deletions tests/e2e/versioned-configmaps/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ spec:
- name: otc-internal
configMap:
name: simple-collector-8cd615bf
items:
- key: collector.yaml
path: collector.yaml
defaultMode: 420
containers:
- name: otc-container
volumeMounts:
- name: otc-internal
mountPath: /conf
status:
readyReplicas: 1
---
Expand Down

0 comments on commit a111e27

Please sign in to comment.