diff --git a/.golangci.yaml b/.golangci.yaml index 609d4552a8..d40c861222 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -28,7 +28,6 @@ linters: - builtinShadow - commentedOutCode - deferInLoop - - deprecatedComment - elseif - emptyFallthrough - emptyStringTest @@ -202,6 +201,9 @@ linters: - legacy - std-error-handling rules: + - linters: + - staticcheck + text: ".*.VolumeSizeLimit is deprecated:" - linters: - gosec path: _test\.go diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 35a2f7552d..9cc887fe1e 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -163,6 +163,7 @@ type Java struct { // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. // The default size is 200Mi. + // // Deprecated: use spec..volume.size instead. This field will be inactive in a future release. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` @@ -202,6 +203,7 @@ type NodeJS struct { // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. // The default size is 200Mi. + // // Deprecated: use spec..volume.size instead. This field will be inactive in a future release. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` @@ -228,6 +230,7 @@ type Python struct { // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. // The default size is 200Mi. + // // Deprecated: use spec..volume.size instead. This field will be inactive in a future release. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` @@ -254,6 +257,7 @@ type DotNet struct { // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. // The default size is 200Mi. + // // Deprecated: use spec..volume.size instead. This field will be inactive in a future release. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` @@ -278,6 +282,7 @@ type Go struct { // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. // The default size is 200Mi. + // // Deprecated: use spec..volume.size instead. This field will be inactive in a future release. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` @@ -304,6 +309,7 @@ type ApacheHttpd struct { // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. // The default size is 200Mi. + // // Deprecated: use spec..volume.size instead. This field will be inactive in a future release. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` @@ -345,6 +351,7 @@ type Nginx struct { // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. // The default size is 200Mi. + // // Deprecated: use spec..volume.size instead. This field will be inactive in a future release. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 8b5e124350..56d0395b5f 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -106,10 +106,12 @@ type OpenTelemetryCollectorSpec struct { Replicas *int32 `json:"replicas,omitempty"` // MinReplicas sets a lower bound to the autoscaling feature. Set this if you are using autoscaling. It must be at least 1 // +optional + // // Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead. MinReplicas *int32 `json:"minReplicas,omitempty"` // MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. // +optional + // // Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" instead. MaxReplicas *int32 `json:"maxReplicas,omitempty"` // Autoscaler specifies the pod autoscaling configuration to use @@ -448,11 +450,13 @@ type OpenTelemetryCollectorStatus struct { // Messages about actions performed by the operator on this resource. // +optional // +listType=atomic + // // Deprecated: use Kubernetes events instead. Messages []string `json:"messages,omitempty"` // Replicas is currently not being set and might be removed in the next version. // +optional + // // Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead. Replicas int32 `json:"replicas,omitempty"` } diff --git a/docs/api/instrumentations.md b/docs/api/instrumentations.md index df7cfac25b..bc1e724883 100644 --- a/docs/api/instrumentations.md +++ b/docs/api/instrumentations.md @@ -271,6 +271,7 @@ If omitted, an emptyDir is used with size limit VolumeSizeLimit
VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi. + Deprecated: use spec..volume.size instead. This field will be inactive in a future release.
false @@ -1591,6 +1592,7 @@ If omitted, an emptyDir is used with size limit VolumeSizeLimit
VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi. + Deprecated: use spec..volume.size instead. This field will be inactive in a future release.
false @@ -2983,6 +2985,7 @@ If omitted, an emptyDir is used with size limit VolumeSizeLimit
VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi. + Deprecated: use spec..volume.size instead. This field will be inactive in a future release.
false @@ -3941,6 +3944,7 @@ If omitted, an emptyDir is used with size limit VolumeSizeLimit
VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi. + Deprecated: use spec..volume.size instead. This field will be inactive in a future release.
false @@ -4942,6 +4946,7 @@ If omitted, an emptyDir is used with size limit VolumeSizeLimit
VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi. + Deprecated: use spec..volume.size instead. This field will be inactive in a future release.
false @@ -6231,6 +6236,7 @@ If omitted, an emptyDir is used with size limit VolumeSizeLimit
VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi. + Deprecated: use spec..volume.size instead. This field will be inactive in a future release.
false @@ -7181,6 +7187,7 @@ If omitted, an emptyDir is used with size limit VolumeSizeLimit
VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi. + Deprecated: use spec..volume.size instead. This field will be inactive in a future release.
false diff --git a/docs/api/opentelemetrycollectors.md b/docs/api/opentelemetrycollectors.md index 5344906855..5b871ffea6 100644 --- a/docs/api/opentelemetrycollectors.md +++ b/docs/api/opentelemetrycollectors.md @@ -237,6 +237,7 @@ It is only effective when healthcheckextension is configured in the OpenTelemetr integer MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. + Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" instead.

Format: int32
@@ -247,6 +248,7 @@ Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" instead.
integer MinReplicas sets a lower bound to the autoscaling feature. Set this if you are using autoscaling. It must be at least 1 + Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.

Format: int32
@@ -19955,6 +19957,7 @@ OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollecto []string Messages about actions performed by the operator on this resource. + Deprecated: use Kubernetes events instead.
false @@ -19963,6 +19966,7 @@ Deprecated: use Kubernetes events instead.
integer Replicas is currently not being set and might be removed in the next version. + Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead.

Format: int32
diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 8484a18e5d..4f104ca025 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -11,13 +11,13 @@ import ( ) type ( - // Deprecated use upgradeFuncV1beta1. + // Deprecated: use upgradeFuncV1beta1. upgradeFunc func(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) upgradeFuncV1beta1 func(u VersionUpgrade, otelcol *v1beta1.OpenTelemetryCollector) (*v1beta1.OpenTelemetryCollector, error) ) type otelcolVersion struct { - // deprecated use upgradeV1beta1. + // Deprecated: use upgradeV1beta1. upgrade upgradeFunc upgradeV1beta1 upgradeFuncV1beta1 semver.Version