diff --git a/api/observability/v1alpha1/mimir_limit_types.go b/api/observability/v1alpha1/mimir_limit_types.go index 42c4f6d..bfc7dfa 100644 --- a/api/observability/v1alpha1/mimir_limit_types.go +++ b/api/observability/v1alpha1/mimir_limit_types.go @@ -24,7 +24,7 @@ type MimirLimits struct { // +kubebuilder:validation:Optional HAMaxClusters *int `yaml:"ha_max_clusters,omitempty" json:"ha_max_clusters,omitempty"` // +kubebuilder:validation:Optional - DropLabels []*string `yaml:"drop_labels,omitempty" json:"drop_labels,omitempty" category:"advanced"` + DropLabels []string `yaml:"drop_labels,omitempty" json:"drop_labels,omitempty" category:"advanced"` // +kubebuilder:validation:Optional MaxLabelNameLength *int `yaml:"max_label_name_length,omitempty" json:"max_label_name_length,omitempty"` // +kubebuilder:validation:Optional diff --git a/api/observability/v1alpha1/prom_types.go b/api/observability/v1alpha1/prom_types.go index 73c19ae..b18a30e 100644 --- a/api/observability/v1alpha1/prom_types.go +++ b/api/observability/v1alpha1/prom_types.go @@ -19,7 +19,7 @@ type RemoteWriteSpec struct { // +kubebuilder:validation:Optional Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"` // +kubebuilder:validation:Optional - WriteRelabelConfigs []*RelabelConfig `yaml:"write_relabel_configs,omitempty" json:"write_relabel_configs,omitempty"` + WriteRelabelConfigs []RelabelConfig `yaml:"write_relabel_configs,omitempty" json:"write_relabel_configs,omitempty"` // +kubebuilder:validation:Optional Name *string `yaml:"name,omitempty" json:"name,omitempty"` // +kubebuilder:validation:Optional @@ -147,7 +147,7 @@ type OAuth2 struct { // +kubebuilder:validation:Optional ClientSecretFile *string `yaml:"client_secret_file" json:"client_secret_file"` // +kubebuilder:validation:Optional - Scopes []*string `yaml:"scopes,omitempty" json:"scopes,omitempty"` + Scopes []string `yaml:"scopes,omitempty" json:"scopes,omitempty"` // +kubebuilder:validation:Optional TokenURL *string `yaml:"token_url" json:"token_url"` // +kubebuilder:validation:Optional diff --git a/api/observability/v1alpha1/tempo_limit_types.go b/api/observability/v1alpha1/tempo_limit_types.go index 212c69e..86fc147 100644 --- a/api/observability/v1alpha1/tempo_limit_types.go +++ b/api/observability/v1alpha1/tempo_limit_types.go @@ -27,14 +27,14 @@ type TempoLimits struct { // Forwarders // +kubebuilder:validation:Optional - Forwarders []*string `yaml:"forwarders,omitempty" json:"forwarders,omitempty"` + Forwarders []string `yaml:"forwarders,omitempty" json:"forwarders,omitempty"` // Metrics-generator config // +kubebuilder:validation:Optional MetricsGeneratorRingSize *int `yaml:"metrics_generator_ring_size,omitempty" json:"metrics_generator_ring_size,omitempty"` // TODO: ensure the list only contains service-graphs and span-metrics // +kubebuilder:validation:Optional - MetricsGeneratorProcessors []*string `yaml:"metrics_generator_processors,omitempty" json:"metrics_generator_processors,omitempty"` + MetricsGeneratorProcessors []string `yaml:"metrics_generator_processors,omitempty" json:"metrics_generator_processors,omitempty"` // +kubebuilder:validation:Optional MetricsGeneratorMaxActiveSeries *uint32 `yaml:"metrics_generator_max_active_series,omitempty" json:"metrics_generator_max_active_series,omitempty"` // +kubebuilder:validation:Optional @@ -48,23 +48,23 @@ type TempoLimits struct { // +kubebuilder:validation:Optional MetricsGeneratorForwarderWorkers *int `yaml:"metrics_generator_forwarder_workers,omitempty" json:"metrics_generator_forwarder_workers,omitempty"` // +kubebuilder:validation:Optional - MetricsGeneratorProcessorServiceGraphsHistogramBuckets []*float64 `yaml:"metrics_generator_processor_service_graphs_histogram_buckets,omitempty" json:"metrics_generator_processor_service_graphs_histogram_buckets,omitempty"` + MetricsGeneratorProcessorServiceGraphsHistogramBuckets []float64 `yaml:"metrics_generator_processor_service_graphs_histogram_buckets,omitempty" json:"metrics_generator_processor_service_graphs_histogram_buckets,omitempty"` // +kubebuilder:validation:Optional - MetricsGeneratorProcessorServiceGraphsDimensions []*string `yaml:"metrics_generator_processor_service_graphs_dimensions,omitempty" json:"metrics_generator_processor_service_graphs_dimensions,omitempty"` + MetricsGeneratorProcessorServiceGraphsDimensions []string `yaml:"metrics_generator_processor_service_graphs_dimensions,omitempty" json:"metrics_generator_processor_service_graphs_dimensions,omitempty"` // +kubebuilder:validation:Optional - MetricsGeneratorProcessorServiceGraphsPeerAttributes []*string `yaml:"metrics_generator_processor_service_graphs_peer_attributes,omitempty" json:"metrics_generator_processor_service_graphs_peer_attributes,omitempty"` + MetricsGeneratorProcessorServiceGraphsPeerAttributes []string `yaml:"metrics_generator_processor_service_graphs_peer_attributes,omitempty" json:"metrics_generator_processor_service_graphs_peer_attributes,omitempty"` // +kubebuilder:validation:Optional MetricsGeneratorProcessorServiceGraphsEnableClientServerPrefix *bool `yaml:"metrics_generator_processor_service_graphs_enable_client_server_prefix,omitempty" json:"metrics_generator_processor_service_graphs_enable_client_server_prefix,omitempty"` // +kubebuilder:validation:Optional - MetricsGeneratorProcessorSpanMetricsHistogramBuckets []*float64 `yaml:"metrics_generator_processor_span_metrics_histogram_buckets,omitempty" json:"metrics_generator_processor_span_metrics_histogram_buckets,omitempty"` + MetricsGeneratorProcessorSpanMetricsHistogramBuckets []float64 `yaml:"metrics_generator_processor_span_metrics_histogram_buckets,omitempty" json:"metrics_generator_processor_span_metrics_histogram_buckets,omitempty"` // +kubebuilder:validation:Optional - MetricsGeneratorProcessorSpanMetricsDimensions []*string `yaml:"metrics_generator_processor_span_metrics_dimensions,omitempty" json:"metrics_generator_processor_span_metrics_dimensions,omitempty"` + MetricsGeneratorProcessorSpanMetricsDimensions []string `yaml:"metrics_generator_processor_span_metrics_dimensions,omitempty" json:"metrics_generator_processor_span_metrics_dimensions,omitempty"` // +kubebuilder:validation:Optional MetricsGeneratorProcessorSpanMetricsIntrinsicDimensions map[string]bool `yaml:"metrics_generator_processor_span_metrics_intrinsic_dimensions,omitempty" json:"metrics_generator_processor_span_metrics_intrinsic_dimensions,omitempty"` // +kubebuilder:validation:Optional - MetricsGeneratorProcessorSpanMetricsFilterPolicies []*FilterPolicy `yaml:"metrics_generator_processor_span_metrics_filter_policies,omitempty" json:"metrics_generator_processor_span_metrics_filter_policies,omitempty"` + MetricsGeneratorProcessorSpanMetricsFilterPolicies []FilterPolicy `yaml:"metrics_generator_processor_span_metrics_filter_policies,omitempty" json:"metrics_generator_processor_span_metrics_filter_policies,omitempty"` // +kubebuilder:validation:Optional - MetricsGeneratorProcessorSpanMetricsDimensionMappings []*DimensionMappings `yaml:"metrics_generator_processor_span_metrics_dimension_mappings,omitempty" json:"metrics_generator_processor_span_metrics_dimension_mapings,omitempty"` + MetricsGeneratorProcessorSpanMetricsDimensionMappings []DimensionMappings `yaml:"metrics_generator_processor_span_metrics_dimension_mappings,omitempty" json:"metrics_generator_processor_span_metrics_dimension_mapings,omitempty"` // +kubebuilder:validation:Optional MetricsGeneratorProcessorSpanMetricsEnableTargetInfo *bool `yaml:"metrics_generator_processor_span_metrics_enable_target_info,omitempty" json:"metrics_generator_processor_span_metrics_enable_target_info,omitempty"` // +kubebuilder:validation:Optional diff --git a/api/observability/v1alpha1/zz_generated.deepcopy.go b/api/observability/v1alpha1/zz_generated.deepcopy.go index b4ac567..e05e88a 100644 --- a/api/observability/v1alpha1/zz_generated.deepcopy.go +++ b/api/observability/v1alpha1/zz_generated.deepcopy.go @@ -1209,14 +1209,8 @@ func (in *MimirLimits) DeepCopyInto(out *MimirLimits) { } if in.DropLabels != nil { in, out := &in.DropLabels, &out.DropLabels - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MaxLabelNameLength != nil { in, out := &in.MaxLabelNameLength, &out.MaxLabelNameLength @@ -1646,14 +1640,8 @@ func (in *MimirLimitsInput) DeepCopyInto(out *MimirLimitsInput) { } if in.DropLabels != nil { in, out := &in.DropLabels, &out.DropLabels - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MaxLabelNameLength != nil { in, out := &in.MaxLabelNameLength, &out.MaxLabelNameLength @@ -2229,14 +2217,8 @@ func (in *OAuth2) DeepCopyInto(out *OAuth2) { } if in.Scopes != nil { in, out := &in.Scopes, &out.Scopes - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.TokenURL != nil { in, out := &in.TokenURL, &out.TokenURL @@ -2466,13 +2448,9 @@ func (in *RemoteWriteSpec) DeepCopyInto(out *RemoteWriteSpec) { } if in.WriteRelabelConfigs != nil { in, out := &in.WriteRelabelConfigs, &out.WriteRelabelConfigs - *out = make([]*RelabelConfig, len(*in)) + *out = make([]RelabelConfig, len(*in)) for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(RelabelConfig) - (*in).DeepCopyInto(*out) - } + (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Name != nil { @@ -2704,14 +2682,8 @@ func (in *TempoLimits) DeepCopyInto(out *TempoLimits) { } if in.Forwarders != nil { in, out := &in.Forwarders, &out.Forwarders - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorRingSize != nil { in, out := &in.MetricsGeneratorRingSize, &out.MetricsGeneratorRingSize @@ -2720,14 +2692,8 @@ func (in *TempoLimits) DeepCopyInto(out *TempoLimits) { } if in.MetricsGeneratorProcessors != nil { in, out := &in.MetricsGeneratorProcessors, &out.MetricsGeneratorProcessors - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorMaxActiveSeries != nil { in, out := &in.MetricsGeneratorMaxActiveSeries, &out.MetricsGeneratorMaxActiveSeries @@ -2756,36 +2722,18 @@ func (in *TempoLimits) DeepCopyInto(out *TempoLimits) { } if in.MetricsGeneratorProcessorServiceGraphsHistogramBuckets != nil { in, out := &in.MetricsGeneratorProcessorServiceGraphsHistogramBuckets, &out.MetricsGeneratorProcessorServiceGraphsHistogramBuckets - *out = make([]*float64, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(float64) - **out = **in - } - } + *out = make([]float64, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorProcessorServiceGraphsDimensions != nil { in, out := &in.MetricsGeneratorProcessorServiceGraphsDimensions, &out.MetricsGeneratorProcessorServiceGraphsDimensions - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorProcessorServiceGraphsPeerAttributes != nil { in, out := &in.MetricsGeneratorProcessorServiceGraphsPeerAttributes, &out.MetricsGeneratorProcessorServiceGraphsPeerAttributes - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorProcessorServiceGraphsEnableClientServerPrefix != nil { in, out := &in.MetricsGeneratorProcessorServiceGraphsEnableClientServerPrefix, &out.MetricsGeneratorProcessorServiceGraphsEnableClientServerPrefix @@ -2794,25 +2742,13 @@ func (in *TempoLimits) DeepCopyInto(out *TempoLimits) { } if in.MetricsGeneratorProcessorSpanMetricsHistogramBuckets != nil { in, out := &in.MetricsGeneratorProcessorSpanMetricsHistogramBuckets, &out.MetricsGeneratorProcessorSpanMetricsHistogramBuckets - *out = make([]*float64, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(float64) - **out = **in - } - } + *out = make([]float64, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorProcessorSpanMetricsDimensions != nil { in, out := &in.MetricsGeneratorProcessorSpanMetricsDimensions, &out.MetricsGeneratorProcessorSpanMetricsDimensions - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorProcessorSpanMetricsIntrinsicDimensions != nil { in, out := &in.MetricsGeneratorProcessorSpanMetricsIntrinsicDimensions, &out.MetricsGeneratorProcessorSpanMetricsIntrinsicDimensions @@ -2823,24 +2759,16 @@ func (in *TempoLimits) DeepCopyInto(out *TempoLimits) { } if in.MetricsGeneratorProcessorSpanMetricsFilterPolicies != nil { in, out := &in.MetricsGeneratorProcessorSpanMetricsFilterPolicies, &out.MetricsGeneratorProcessorSpanMetricsFilterPolicies - *out = make([]*FilterPolicy, len(*in)) + *out = make([]FilterPolicy, len(*in)) for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(FilterPolicy) - (*in).DeepCopyInto(*out) - } + (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.MetricsGeneratorProcessorSpanMetricsDimensionMappings != nil { in, out := &in.MetricsGeneratorProcessorSpanMetricsDimensionMappings, &out.MetricsGeneratorProcessorSpanMetricsDimensionMappings - *out = make([]*DimensionMappings, len(*in)) + *out = make([]DimensionMappings, len(*in)) for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(DimensionMappings) - (*in).DeepCopyInto(*out) - } + (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.MetricsGeneratorProcessorSpanMetricsEnableTargetInfo != nil { @@ -2945,14 +2873,8 @@ func (in *TempoLimitsInput) DeepCopyInto(out *TempoLimitsInput) { } if in.Forwarders != nil { in, out := &in.Forwarders, &out.Forwarders - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorRingSize != nil { in, out := &in.MetricsGeneratorRingSize, &out.MetricsGeneratorRingSize @@ -2961,14 +2883,8 @@ func (in *TempoLimitsInput) DeepCopyInto(out *TempoLimitsInput) { } if in.MetricsGeneratorProcessors != nil { in, out := &in.MetricsGeneratorProcessors, &out.MetricsGeneratorProcessors - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorMaxActiveSeries != nil { in, out := &in.MetricsGeneratorMaxActiveSeries, &out.MetricsGeneratorMaxActiveSeries @@ -2997,36 +2913,18 @@ func (in *TempoLimitsInput) DeepCopyInto(out *TempoLimitsInput) { } if in.MetricsGeneratorProcessorServiceGraphsHistogramBuckets != nil { in, out := &in.MetricsGeneratorProcessorServiceGraphsHistogramBuckets, &out.MetricsGeneratorProcessorServiceGraphsHistogramBuckets - *out = make([]*float64, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(float64) - **out = **in - } - } + *out = make([]float64, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorProcessorServiceGraphsDimensions != nil { in, out := &in.MetricsGeneratorProcessorServiceGraphsDimensions, &out.MetricsGeneratorProcessorServiceGraphsDimensions - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorProcessorServiceGraphsPeerAttributes != nil { in, out := &in.MetricsGeneratorProcessorServiceGraphsPeerAttributes, &out.MetricsGeneratorProcessorServiceGraphsPeerAttributes - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorProcessorServiceGraphsEnableClientServerPrefix != nil { in, out := &in.MetricsGeneratorProcessorServiceGraphsEnableClientServerPrefix, &out.MetricsGeneratorProcessorServiceGraphsEnableClientServerPrefix @@ -3035,25 +2933,13 @@ func (in *TempoLimitsInput) DeepCopyInto(out *TempoLimitsInput) { } if in.MetricsGeneratorProcessorSpanMetricsHistogramBuckets != nil { in, out := &in.MetricsGeneratorProcessorSpanMetricsHistogramBuckets, &out.MetricsGeneratorProcessorSpanMetricsHistogramBuckets - *out = make([]*float64, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(float64) - **out = **in - } - } + *out = make([]float64, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorProcessorSpanMetricsDimensions != nil { in, out := &in.MetricsGeneratorProcessorSpanMetricsDimensions, &out.MetricsGeneratorProcessorSpanMetricsDimensions - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + *out = make([]string, len(*in)) + copy(*out, *in) } if in.MetricsGeneratorProcessorSpanMetricsIntrinsicDimensions != nil { in, out := &in.MetricsGeneratorProcessorSpanMetricsIntrinsicDimensions, &out.MetricsGeneratorProcessorSpanMetricsIntrinsicDimensions @@ -3064,24 +2950,16 @@ func (in *TempoLimitsInput) DeepCopyInto(out *TempoLimitsInput) { } if in.MetricsGeneratorProcessorSpanMetricsFilterPolicies != nil { in, out := &in.MetricsGeneratorProcessorSpanMetricsFilterPolicies, &out.MetricsGeneratorProcessorSpanMetricsFilterPolicies - *out = make([]*FilterPolicy, len(*in)) + *out = make([]FilterPolicy, len(*in)) for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(FilterPolicy) - (*in).DeepCopyInto(*out) - } + (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.MetricsGeneratorProcessorSpanMetricsDimensionMappings != nil { in, out := &in.MetricsGeneratorProcessorSpanMetricsDimensionMappings, &out.MetricsGeneratorProcessorSpanMetricsDimensionMappings - *out = make([]*DimensionMappings, len(*in)) + *out = make([]DimensionMappings, len(*in)) for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(DimensionMappings) - (*in).DeepCopyInto(*out) - } + (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.MetricsGeneratorProcessorSpanMetricsEnableTargetInfo != nil {