Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align management state constant with other constants #1988

Merged
merged 4 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 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"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use constants with capital letters in the codebase.


// 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
Original file line number Diff line number Diff line change
Expand Up @@ -2930,8 +2930,8 @@ spec:
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 @@ -2927,8 +2927,8 @@ spec:
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
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3708,7 +3708,7 @@ 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>Enum</i>: managed, unmanaged<br/>
<i>Default</i>: Managed<br/>
pavolloffay marked this conversation as resolved.
Show resolved Hide resolved
</td>
<td>false</td>
Expand Down
Loading