Skip to content

Commit

Permalink
Align management state constant with other constants (#1988)
Browse files Browse the repository at this point in the history
* Align management state constant with other constants

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

---------

Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Aug 4, 2023
1 parent 7962291 commit 76cff59
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions apis/v1alpha1/opentelemetrycollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ import (

// ManagementStateType defines the type for CR management states.
//
// +kubebuilder:validation:Enum=Managed;Unmanaged
// +kubebuilder:validation:Enum=managed;unmanaged
type ManagementStateType string

const (
// ManagementStateManaged when the OpenTelemetryCollector custom resource should be
// reconciled by the operator.
ManagementStateManaged ManagementStateType = "Managed"
ManagementStateManaged ManagementStateType = "managed"

// ManagementStateUnmanaged when the OpenTelemetryCollector custom resource should not be
// reconciled by the operator.
ManagementStateUnmanaged ManagementStateType = "Unmanaged"
ManagementStateUnmanaged ManagementStateType = "unmanaged"
)

// Ingress is used to specify how OpenTelemetry Collector is exposed. This
Expand Down Expand Up @@ -89,7 +89,7 @@ type OpenTelemetryCollectorSpec struct {
//
// +required
// +kubebuilder:validation:Required
// +kubebuilder:default:=Managed
// +kubebuilder:default:=managed
ManagementState ManagementStateType `json:"managementState,omitempty"`
// Resources to set on the OpenTelemetry Collector pods.
// +optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ metadata:
categories: Logging & Tracing
certified: "false"
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
createdAt: "2023-07-05T18:15:51Z"
createdAt: "2023-08-04T13:28:05Z"
description: Provides the OpenTelemetry components, including the Collector
operators.operatorframework.io/builder: operator-sdk-v1.29.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2926,12 +2926,12 @@ spec:
type: integer
type: object
managementState:
default: Managed
default: managed
description: ManagementState defines if the CR should be managed by
the operator or not. Default is managed.
enum:
- Managed
- Unmanaged
- managed
- unmanaged
type: string
maxReplicas:
description: 'MaxReplicas sets an upper bound to the autoscaling feature.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2923,12 +2923,12 @@ spec:
type: integer
type: object
managementState:
default: Managed
default: managed
description: ManagementState defines if the CR should be managed by
the operator or not. Default is managed.
enum:
- Managed
- Unmanaged
- managed
- unmanaged
type: string
maxReplicas:
description: 'MaxReplicas sets an upper bound to the autoscaling feature.
Expand Down
4 changes: 2 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3708,8 +3708,8 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector.
<td>
ManagementState defines if the CR should be managed by the operator or not. Default is managed.<br/>
<br/>
<i>Enum</i>: Managed, Unmanaged<br/>
<i>Default</i>: Managed<br/>
<i>Enum</i>: managed, unmanaged<br/>
<i>Default</i>: managed<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/managed-reconcile/01-disable-reconciliation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: OpenTelemetryCollector
metadata:
name: simplest
spec:
managementState: Unmanaged
managementState: unmanaged
config: |
receivers:
otlp:
Expand Down Expand Up @@ -48,4 +48,4 @@ data:
traces:
receivers: [jaeger, otlp]
processors: []
exporters: [logging]
exporters: [logging]
4 changes: 2 additions & 2 deletions tests/e2e/managed-reconcile/02-enable-reconciliation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: OpenTelemetryCollector
metadata:
name: simplest
spec:
managementState: Managed
managementState: managed
config: |
receivers:
otlp:
Expand All @@ -20,4 +20,4 @@ spec:
traces:
receivers: [otlp]
processors: []
exporters: [logging]
exporters: [logging]

0 comments on commit 76cff59

Please sign in to comment.