1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-15 08:46:44 +00:00
prometheus-operator/pkg/apis/monitoring/v1alpha1/zz_generated.deepcopy.go

2997 lines
79 KiB
Go
Raw Normal View History

2021-10-07 12:30:52 +05:30
//go:build !ignore_autogenerated
// Copyright The prometheus-operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by controller-gen. DO NOT EDIT.
package v1alpha1
import (
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AlertmanagerConfig) DeepCopyInto(out *AlertmanagerConfig) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfig.
func (in *AlertmanagerConfig) DeepCopy() *AlertmanagerConfig {
if in == nil {
return nil
}
out := new(AlertmanagerConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AlertmanagerConfigList) DeepCopyInto(out *AlertmanagerConfigList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]*AlertmanagerConfig, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(AlertmanagerConfig)
(*in).DeepCopyInto(*out)
}
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfigList.
func (in *AlertmanagerConfigList) DeepCopy() *AlertmanagerConfigList {
if in == nil {
return nil
}
out := new(AlertmanagerConfigList)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AlertmanagerConfigSpec) DeepCopyInto(out *AlertmanagerConfigSpec) {
*out = *in
if in.Route != nil {
in, out := &in.Route, &out.Route
*out = new(Route)
(*in).DeepCopyInto(*out)
}
if in.Receivers != nil {
in, out := &in.Receivers, &out.Receivers
*out = make([]Receiver, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.InhibitRules != nil {
in, out := &in.InhibitRules, &out.InhibitRules
*out = make([]InhibitRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.MuteTimeIntervals != nil {
in, out := &in.MuteTimeIntervals, &out.MuteTimeIntervals
*out = make([]MuteTimeInterval, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfigSpec.
func (in *AlertmanagerConfigSpec) DeepCopy() *AlertmanagerConfigSpec {
if in == nil {
return nil
}
out := new(AlertmanagerConfigSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AttachMetadata) DeepCopyInto(out *AttachMetadata) {
*out = *in
if in.Node != nil {
in, out := &in.Node, &out.Node
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttachMetadata.
func (in *AttachMetadata) DeepCopy() *AttachMetadata {
if in == nil {
return nil
}
out := new(AttachMetadata)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AzureSDConfig) DeepCopyInto(out *AzureSDConfig) {
*out = *in
if in.Environment != nil {
in, out := &in.Environment, &out.Environment
*out = new(string)
**out = **in
}
if in.AuthenticationMethod != nil {
in, out := &in.AuthenticationMethod, &out.AuthenticationMethod
*out = new(string)
**out = **in
}
if in.TenantID != nil {
in, out := &in.TenantID, &out.TenantID
*out = new(string)
**out = **in
}
if in.ClientID != nil {
in, out := &in.ClientID, &out.ClientID
*out = new(string)
**out = **in
}
if in.ClientSecret != nil {
in, out := &in.ClientSecret, &out.ClientSecret
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.ResourceGroup != nil {
in, out := &in.ResourceGroup, &out.ResourceGroup
*out = new(string)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureSDConfig.
func (in *AzureSDConfig) DeepCopy() *AzureSDConfig {
if in == nil {
return nil
}
out := new(AzureSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ConsulSDConfig) DeepCopyInto(out *ConsulSDConfig) {
*out = *in
if in.PathPrefix != nil {
in, out := &in.PathPrefix, &out.PathPrefix
*out = new(string)
**out = **in
}
if in.TokenRef != nil {
in, out := &in.TokenRef, &out.TokenRef
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.Datacenter != nil {
in, out := &in.Datacenter, &out.Datacenter
*out = new(string)
**out = **in
}
if in.Namespace != nil {
in, out := &in.Namespace, &out.Namespace
*out = new(string)
**out = **in
}
if in.Partition != nil {
in, out := &in.Partition, &out.Partition
*out = new(string)
**out = **in
}
if in.Scheme != nil {
in, out := &in.Scheme, &out.Scheme
*out = new(string)
**out = **in
}
if in.Services != nil {
in, out := &in.Services, &out.Services
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Tags != nil {
in, out := &in.Tags, &out.Tags
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.TagSeparator != nil {
in, out := &in.TagSeparator, &out.TagSeparator
*out = new(string)
**out = **in
}
if in.NodeMeta != nil {
in, out := &in.NodeMeta, &out.NodeMeta
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Filter != nil {
in, out := &in.Filter, &out.Filter
*out = new(string)
**out = **in
}
if in.AllowStale != nil {
in, out := &in.AllowStale, &out.AllowStale
*out = new(bool)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHttp2 != nil {
in, out := &in.EnableHttp2, &out.EnableHttp2
*out = new(bool)
**out = **in
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsulSDConfig.
func (in *ConsulSDConfig) DeepCopy() *ConsulSDConfig {
if in == nil {
return nil
}
out := new(ConsulSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DNSSDConfig) DeepCopyInto(out *DNSSDConfig) {
*out = *in
if in.Names != nil {
in, out := &in.Names, &out.Names
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.Type != nil {
in, out := &in.Type, &out.Type
*out = new(DNSRecordType)
**out = **in
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int32)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSSDConfig.
func (in *DNSSDConfig) DeepCopy() *DNSSDConfig {
if in == nil {
return nil
}
out := new(DNSSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DayOfMonthRange) DeepCopyInto(out *DayOfMonthRange) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DayOfMonthRange.
func (in *DayOfMonthRange) DeepCopy() *DayOfMonthRange {
if in == nil {
return nil
}
out := new(DayOfMonthRange)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DigitalOceanSDConfig) DeepCopyInto(out *DigitalOceanSDConfig) {
*out = *in
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int32)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DigitalOceanSDConfig.
func (in *DigitalOceanSDConfig) DeepCopy() *DigitalOceanSDConfig {
if in == nil {
return nil
}
out := new(DigitalOceanSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DiscordConfig) DeepCopyInto(out *DiscordConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
in.APIURL.DeepCopyInto(&out.APIURL)
if in.Title != nil {
in, out := &in.Title, &out.Title
*out = new(string)
**out = **in
}
if in.Message != nil {
in, out := &in.Message, &out.Message
*out = new(string)
**out = **in
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscordConfig.
func (in *DiscordConfig) DeepCopy() *DiscordConfig {
if in == nil {
return nil
}
out := new(DiscordConfig)
in.DeepCopyInto(out)
return out
}
Add DockerSD support for ScrapeConfig CRD Add DockerSDConfig struct and array of DockerSDConfig to the ScrapeConfig struct Add code block placeholder to process DockerSDConfig Add Code-gen for the updated scrapeconfig with DockerSDConfig Revert "Add Code-gen for the updated scrapeconfig with DockerSDConfig" This reverts commit f7d2ff99b610e5f88dc816947eb67bbc44aee365. Edit DockerSDConfig struct Add Code-gen for the updated DockerSDConfig Add processing code block for DockerSDConfig in the ScrapeConfig CRD Update processing filters in DockerSDConfig Add tests for DockerSDConfig Add missing host field to DockerSDConfig struct and remove TODOs in promcfg.go Update promcfg.go to append host field to the DockerSDConfiguration Update autogen code and perform formatting fixes Update DockerSD tests to include Host field Add resource_selector validation and tests for Docker SD configs Update tests according to host variable, tests pass Add DockerFilter type for the filters field in DockerSDConfigs Add code-gen for DockerFilter type update Update promcfg test and test data for DockerFilter type Update DockerFilter Format code Update pkg/apis/monitoring/v1alpha1/scrapeconfig_types.go Co-authored-by: Jayapriya Pai <slashpai9@gmail.com> Add validation for host field Add relevant comments and remove unrelated debug code Code-gen and format code Revert "Change git mod file" This reverts commit 232816f20aefc36ab43d22c2a9141f2df3615f90. Change from pointer to ProxyConfig to variable reference Generate Code and Format Format code Refactor test cases for Docker SD One test case each for OAuth, BasicAuth and Authorization fields. Also includes other fields like TLSConfig, hostnetworkinghost etc. Format code
2024-03-11 10:54:14 +05:30
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DockerSDConfig) DeepCopyInto(out *DockerSDConfig) {
*out = *in
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int)
**out = **in
}
if in.HostNetworkingHost != nil {
in, out := &in.HostNetworkingHost, &out.HostNetworkingHost
*out = new(string)
**out = **in
}
if in.MatchFirstNetwork != nil {
in, out := &in.MatchFirstNetwork, &out.MatchFirstNetwork
*out = new(bool)
**out = **in
}
Add DockerSD support for ScrapeConfig CRD Add DockerSDConfig struct and array of DockerSDConfig to the ScrapeConfig struct Add code block placeholder to process DockerSDConfig Add Code-gen for the updated scrapeconfig with DockerSDConfig Revert "Add Code-gen for the updated scrapeconfig with DockerSDConfig" This reverts commit f7d2ff99b610e5f88dc816947eb67bbc44aee365. Edit DockerSDConfig struct Add Code-gen for the updated DockerSDConfig Add processing code block for DockerSDConfig in the ScrapeConfig CRD Update processing filters in DockerSDConfig Add tests for DockerSDConfig Add missing host field to DockerSDConfig struct and remove TODOs in promcfg.go Update promcfg.go to append host field to the DockerSDConfiguration Update autogen code and perform formatting fixes Update DockerSD tests to include Host field Add resource_selector validation and tests for Docker SD configs Update tests according to host variable, tests pass Add DockerFilter type for the filters field in DockerSDConfigs Add code-gen for DockerFilter type update Update promcfg test and test data for DockerFilter type Update DockerFilter Format code Update pkg/apis/monitoring/v1alpha1/scrapeconfig_types.go Co-authored-by: Jayapriya Pai <slashpai9@gmail.com> Add validation for host field Add relevant comments and remove unrelated debug code Code-gen and format code Revert "Change git mod file" This reverts commit 232816f20aefc36ab43d22c2a9141f2df3615f90. Change from pointer to ProxyConfig to variable reference Generate Code and Format Format code Refactor test cases for Docker SD One test case each for OAuth, BasicAuth and Authorization fields. Also includes other fields like TLSConfig, hostnetworkinghost etc. Format code
2024-03-11 10:54:14 +05:30
if in.Filters != nil {
in, out := &in.Filters, &out.Filters
*out = make(Filters, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
Add DockerSD support for ScrapeConfig CRD Add DockerSDConfig struct and array of DockerSDConfig to the ScrapeConfig struct Add code block placeholder to process DockerSDConfig Add Code-gen for the updated scrapeconfig with DockerSDConfig Revert "Add Code-gen for the updated scrapeconfig with DockerSDConfig" This reverts commit f7d2ff99b610e5f88dc816947eb67bbc44aee365. Edit DockerSDConfig struct Add Code-gen for the updated DockerSDConfig Add processing code block for DockerSDConfig in the ScrapeConfig CRD Update processing filters in DockerSDConfig Add tests for DockerSDConfig Add missing host field to DockerSDConfig struct and remove TODOs in promcfg.go Update promcfg.go to append host field to the DockerSDConfiguration Update autogen code and perform formatting fixes Update DockerSD tests to include Host field Add resource_selector validation and tests for Docker SD configs Update tests according to host variable, tests pass Add DockerFilter type for the filters field in DockerSDConfigs Add code-gen for DockerFilter type update Update promcfg test and test data for DockerFilter type Update DockerFilter Format code Update pkg/apis/monitoring/v1alpha1/scrapeconfig_types.go Co-authored-by: Jayapriya Pai <slashpai9@gmail.com> Add validation for host field Add relevant comments and remove unrelated debug code Code-gen and format code Revert "Change git mod file" This reverts commit 232816f20aefc36ab43d22c2a9141f2df3615f90. Change from pointer to ProxyConfig to variable reference Generate Code and Format Format code Refactor test cases for Docker SD One test case each for OAuth, BasicAuth and Authorization fields. Also includes other fields like TLSConfig, hostnetworkinghost etc. Format code
2024-03-11 10:54:14 +05:30
}
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerSDConfig.
func (in *DockerSDConfig) DeepCopy() *DockerSDConfig {
if in == nil {
return nil
}
out := new(DockerSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DockerSwarmSDConfig) DeepCopyInto(out *DockerSwarmSDConfig) {
*out = *in
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int32)
**out = **in
}
if in.Filters != nil {
in, out := &in.Filters, &out.Filters
*out = make(Filters, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerSwarmSDConfig.
func (in *DockerSwarmSDConfig) DeepCopy() *DockerSwarmSDConfig {
if in == nil {
return nil
}
out := new(DockerSwarmSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EC2SDConfig) DeepCopyInto(out *EC2SDConfig) {
*out = *in
if in.Region != nil {
in, out := &in.Region, &out.Region
*out = new(string)
**out = **in
}
if in.AccessKey != nil {
in, out := &in.AccessKey, &out.AccessKey
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.SecretKey != nil {
in, out := &in.SecretKey, &out.SecretKey
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.RoleARN != nil {
in, out := &in.RoleARN, &out.RoleARN
*out = new(string)
**out = **in
}
2024-07-09 10:36:49 +05:30
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int32)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.Filters != nil {
in, out := &in.Filters, &out.Filters
*out = make(Filters, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
2024-07-09 10:36:49 +05:30
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EC2SDConfig.
func (in *EC2SDConfig) DeepCopy() *EC2SDConfig {
if in == nil {
return nil
}
out := new(EC2SDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EmailConfig) DeepCopyInto(out *EmailConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.AuthPassword != nil {
in, out := &in.AuthPassword, &out.AuthPassword
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.AuthSecret != nil {
in, out := &in.AuthSecret, &out.AuthSecret
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.Headers != nil {
in, out := &in.Headers, &out.Headers
*out = make([]KeyValue, len(*in))
copy(*out, *in)
}
if in.HTML != nil {
in, out := &in.HTML, &out.HTML
*out = new(string)
**out = **in
}
if in.Text != nil {
in, out := &in.Text, &out.Text
*out = new(string)
**out = **in
}
if in.RequireTLS != nil {
in, out := &in.RequireTLS, &out.RequireTLS
*out = new(bool)
**out = **in
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmailConfig.
func (in *EmailConfig) DeepCopy() *EmailConfig {
if in == nil {
return nil
}
out := new(EmailConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EurekaSDConfig) DeepCopyInto(out *EurekaSDConfig) {
*out = *in
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EurekaSDConfig.
func (in *EurekaSDConfig) DeepCopy() *EurekaSDConfig {
if in == nil {
return nil
}
out := new(EurekaSDConfig)
in.DeepCopyInto(out)
return out
}
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FileSDConfig) DeepCopyInto(out *FileSDConfig) {
*out = *in
if in.Files != nil {
in, out := &in.Files, &out.Files
*out = make([]SDFile, len(*in))
copy(*out, *in)
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileSDConfig.
func (in *FileSDConfig) DeepCopy() *FileSDConfig {
if in == nil {
return nil
}
out := new(FileSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Filter) DeepCopyInto(out *Filter) {
*out = *in
if in.Values != nil {
in, out := &in.Values, &out.Values
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.
func (in *Filter) DeepCopy() *Filter {
if in == nil {
return nil
}
out := new(Filter)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in Filters) DeepCopyInto(out *Filters) {
{
in := &in
*out = make(Filters, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filters.
func (in Filters) DeepCopy() Filters {
if in == nil {
return nil
}
out := new(Filters)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GCESDConfig) DeepCopyInto(out *GCESDConfig) {
*out = *in
if in.Filter != nil {
in, out := &in.Filter, &out.Filter
*out = new(string)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int)
**out = **in
}
if in.TagSeparator != nil {
in, out := &in.TagSeparator, &out.TagSeparator
*out = new(string)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCESDConfig.
func (in *GCESDConfig) DeepCopy() *GCESDConfig {
if in == nil {
return nil
}
out := new(GCESDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPConfig) DeepCopyInto(out *HTTPConfig) {
*out = *in
2021-07-20 14:18:35 +02:00
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
2021-08-20 11:01:32 +02:00
*out = new(monitoringv1.SafeAuthorization)
2021-07-20 14:18:35 +02:00
(*in).DeepCopyInto(*out)
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
if in.BearerTokenSecret != nil {
in, out := &in.BearerTokenSecret, &out.BearerTokenSecret
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.ProxyURLOriginal != nil {
in, out := &in.ProxyURLOriginal, &out.ProxyURLOriginal
*out = new(string)
**out = **in
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPConfig.
func (in *HTTPConfig) DeepCopy() *HTTPConfig {
if in == nil {
return nil
}
out := new(HTTPConfig)
in.DeepCopyInto(out)
return out
}
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPSDConfig) DeepCopyInto(out *HTTPSDConfig) {
*out = *in
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
2024-08-05 17:14:48 +05:30
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
2024-08-05 17:14:48 +05:30
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSDConfig.
func (in *HTTPSDConfig) DeepCopy() *HTTPSDConfig {
if in == nil {
return nil
}
out := new(HTTPSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HetznerSDConfig) DeepCopyInto(out *HetznerSDConfig) {
*out = *in
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HetznerSDConfig.
func (in *HetznerSDConfig) DeepCopy() *HetznerSDConfig {
if in == nil {
return nil
}
out := new(HetznerSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *InhibitRule) DeepCopyInto(out *InhibitRule) {
*out = *in
if in.TargetMatch != nil {
in, out := &in.TargetMatch, &out.TargetMatch
*out = make([]Matcher, len(*in))
copy(*out, *in)
}
if in.SourceMatch != nil {
in, out := &in.SourceMatch, &out.SourceMatch
*out = make([]Matcher, len(*in))
copy(*out, *in)
}
if in.Equal != nil {
in, out := &in.Equal, &out.Equal
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InhibitRule.
func (in *InhibitRule) DeepCopy() *InhibitRule {
if in == nil {
return nil
}
out := new(InhibitRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IonosSDConfig) DeepCopyInto(out *IonosSDConfig) {
*out = *in
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int32)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
in.Authorization.DeepCopyInto(&out.Authorization)
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IonosSDConfig.
func (in *IonosSDConfig) DeepCopy() *IonosSDConfig {
if in == nil {
return nil
}
out := new(IonosSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *K8SSelectorConfig) DeepCopyInto(out *K8SSelectorConfig) {
*out = *in
if in.Label != nil {
in, out := &in.Label, &out.Label
*out = new(string)
**out = **in
}
if in.Field != nil {
in, out := &in.Field, &out.Field
*out = new(string)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8SSelectorConfig.
func (in *K8SSelectorConfig) DeepCopy() *K8SSelectorConfig {
if in == nil {
return nil
}
out := new(K8SSelectorConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KeyValue) DeepCopyInto(out *KeyValue) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyValue.
func (in *KeyValue) DeepCopy() *KeyValue {
if in == nil {
return nil
}
out := new(KeyValue)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KubernetesSDConfig) DeepCopyInto(out *KubernetesSDConfig) {
*out = *in
if in.APIServer != nil {
in, out := &in.APIServer, &out.APIServer
*out = new(string)
**out = **in
}
if in.Namespaces != nil {
in, out := &in.Namespaces, &out.Namespaces
*out = new(NamespaceDiscovery)
(*in).DeepCopyInto(*out)
}
if in.AttachMetadata != nil {
in, out := &in.AttachMetadata, &out.AttachMetadata
*out = new(AttachMetadata)
(*in).DeepCopyInto(*out)
}
if in.Selectors != nil {
in, out := &in.Selectors, &out.Selectors
*out = make([]K8SSelectorConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesSDConfig.
func (in *KubernetesSDConfig) DeepCopy() *KubernetesSDConfig {
if in == nil {
return nil
}
out := new(KubernetesSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KumaSDConfig) DeepCopyInto(out *KumaSDConfig) {
*out = *in
if in.ClientID != nil {
in, out := &in.ClientID, &out.ClientID
*out = new(string)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.FetchTimeout != nil {
in, out := &in.FetchTimeout, &out.FetchTimeout
*out = new(monitoringv1.Duration)
**out = **in
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KumaSDConfig.
func (in *KumaSDConfig) DeepCopy() *KumaSDConfig {
if in == nil {
return nil
}
out := new(KumaSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LightSailSDConfig) DeepCopyInto(out *LightSailSDConfig) {
*out = *in
if in.Region != nil {
in, out := &in.Region, &out.Region
*out = new(string)
**out = **in
}
if in.AccessKey != nil {
in, out := &in.AccessKey, &out.AccessKey
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.SecretKey != nil {
in, out := &in.SecretKey, &out.SecretKey
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.RoleARN != nil {
in, out := &in.RoleARN, &out.RoleARN
*out = new(string)
**out = **in
}
if in.Endpoint != nil {
in, out := &in.Endpoint, &out.Endpoint
*out = new(string)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int32)
**out = **in
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LightSailSDConfig.
func (in *LightSailSDConfig) DeepCopy() *LightSailSDConfig {
if in == nil {
return nil
}
out := new(LightSailSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LinodeSDConfig) DeepCopyInto(out *LinodeSDConfig) {
*out = *in
if in.Region != nil {
in, out := &in.Region, &out.Region
*out = new(string)
**out = **in
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int32)
**out = **in
}
if in.TagSeparator != nil {
in, out := &in.TagSeparator, &out.TagSeparator
*out = new(string)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LinodeSDConfig.
func (in *LinodeSDConfig) DeepCopy() *LinodeSDConfig {
if in == nil {
return nil
}
out := new(LinodeSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MSTeamsConfig) DeepCopyInto(out *MSTeamsConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
in.WebhookURL.DeepCopyInto(&out.WebhookURL)
if in.Title != nil {
in, out := &in.Title, &out.Title
*out = new(string)
**out = **in
}
2024-03-19 12:06:51 +00:00
if in.Summary != nil {
in, out := &in.Summary, &out.Summary
*out = new(string)
**out = **in
}
if in.Text != nil {
in, out := &in.Text, &out.Text
*out = new(string)
**out = **in
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSTeamsConfig.
func (in *MSTeamsConfig) DeepCopy() *MSTeamsConfig {
if in == nil {
return nil
}
out := new(MSTeamsConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Matcher) DeepCopyInto(out *Matcher) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Matcher.
func (in *Matcher) DeepCopy() *Matcher {
if in == nil {
return nil
}
out := new(Matcher)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MuteTimeInterval) DeepCopyInto(out *MuteTimeInterval) {
*out = *in
if in.TimeIntervals != nil {
in, out := &in.TimeIntervals, &out.TimeIntervals
*out = make([]TimeInterval, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MuteTimeInterval.
func (in *MuteTimeInterval) DeepCopy() *MuteTimeInterval {
if in == nil {
return nil
}
out := new(MuteTimeInterval)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NamespaceDiscovery) DeepCopyInto(out *NamespaceDiscovery) {
*out = *in
if in.IncludeOwnNamespace != nil {
in, out := &in.IncludeOwnNamespace, &out.IncludeOwnNamespace
*out = new(bool)
**out = **in
}
if in.Names != nil {
in, out := &in.Names, &out.Names
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceDiscovery.
func (in *NamespaceDiscovery) DeepCopy() *NamespaceDiscovery {
if in == nil {
return nil
}
out := new(NamespaceDiscovery)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NomadSDConfig) DeepCopyInto(out *NomadSDConfig) {
*out = *in
if in.AllowStale != nil {
in, out := &in.AllowStale, &out.AllowStale
*out = new(bool)
**out = **in
}
if in.Namespace != nil {
in, out := &in.Namespace, &out.Namespace
*out = new(string)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.Region != nil {
in, out := &in.Region, &out.Region
*out = new(string)
**out = **in
}
if in.TagSeparator != nil {
in, out := &in.TagSeparator, &out.TagSeparator
*out = new(string)
**out = **in
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NomadSDConfig.
func (in *NomadSDConfig) DeepCopy() *NomadSDConfig {
if in == nil {
return nil
}
out := new(NomadSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OVHCloudSDConfig) DeepCopyInto(out *OVHCloudSDConfig) {
*out = *in
in.ApplicationSecret.DeepCopyInto(&out.ApplicationSecret)
in.ConsumerKey.DeepCopyInto(&out.ConsumerKey)
if in.Endpoint != nil {
in, out := &in.Endpoint, &out.Endpoint
*out = new(string)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OVHCloudSDConfig.
func (in *OVHCloudSDConfig) DeepCopy() *OVHCloudSDConfig {
if in == nil {
return nil
}
out := new(OVHCloudSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OpenStackSDConfig) DeepCopyInto(out *OpenStackSDConfig) {
*out = *in
if in.IdentityEndpoint != nil {
in, out := &in.IdentityEndpoint, &out.IdentityEndpoint
*out = new(string)
**out = **in
}
if in.Username != nil {
in, out := &in.Username, &out.Username
*out = new(string)
**out = **in
}
if in.UserID != nil {
in, out := &in.UserID, &out.UserID
*out = new(string)
**out = **in
}
if in.Password != nil {
in, out := &in.Password, &out.Password
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.DomainName != nil {
in, out := &in.DomainName, &out.DomainName
*out = new(string)
**out = **in
}
if in.DomainID != nil {
in, out := &in.DomainID, &out.DomainID
*out = new(string)
**out = **in
}
if in.ProjectName != nil {
in, out := &in.ProjectName, &out.ProjectName
*out = new(string)
**out = **in
}
if in.ProjectID != nil {
in, out := &in.ProjectID, &out.ProjectID
*out = new(string)
**out = **in
}
if in.ApplicationCredentialName != nil {
in, out := &in.ApplicationCredentialName, &out.ApplicationCredentialName
*out = new(string)
**out = **in
}
if in.ApplicationCredentialID != nil {
in, out := &in.ApplicationCredentialID, &out.ApplicationCredentialID
*out = new(string)
**out = **in
}
if in.ApplicationCredentialSecret != nil {
in, out := &in.ApplicationCredentialSecret, &out.ApplicationCredentialSecret
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.AllTenants != nil {
in, out := &in.AllTenants, &out.AllTenants
*out = new(bool)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int)
**out = **in
}
if in.Availability != nil {
in, out := &in.Availability, &out.Availability
*out = new(string)
**out = **in
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackSDConfig.
func (in *OpenStackSDConfig) DeepCopy() *OpenStackSDConfig {
if in == nil {
return nil
}
out := new(OpenStackSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OpsGenieConfig) DeepCopyInto(out *OpsGenieConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.APIKey != nil {
in, out := &in.APIKey, &out.APIKey
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.UpdateAlerts != nil {
in, out := &in.UpdateAlerts, &out.UpdateAlerts
*out = new(bool)
**out = **in
}
if in.Details != nil {
in, out := &in.Details, &out.Details
*out = make([]KeyValue, len(*in))
copy(*out, *in)
}
if in.Responders != nil {
in, out := &in.Responders, &out.Responders
*out = make([]OpsGenieConfigResponder, len(*in))
copy(*out, *in)
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsGenieConfig.
func (in *OpsGenieConfig) DeepCopy() *OpsGenieConfig {
if in == nil {
return nil
}
out := new(OpsGenieConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OpsGenieConfigResponder) DeepCopyInto(out *OpsGenieConfigResponder) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsGenieConfigResponder.
func (in *OpsGenieConfigResponder) DeepCopy() *OpsGenieConfigResponder {
if in == nil {
return nil
}
out := new(OpsGenieConfigResponder)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PagerDutyConfig) DeepCopyInto(out *PagerDutyConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.RoutingKey != nil {
in, out := &in.RoutingKey, &out.RoutingKey
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.ServiceKey != nil {
in, out := &in.ServiceKey, &out.ServiceKey
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.Details != nil {
in, out := &in.Details, &out.Details
*out = make([]KeyValue, len(*in))
copy(*out, *in)
}
if in.PagerDutyImageConfigs != nil {
in, out := &in.PagerDutyImageConfigs, &out.PagerDutyImageConfigs
*out = make([]PagerDutyImageConfig, len(*in))
copy(*out, *in)
}
if in.PagerDutyLinkConfigs != nil {
in, out := &in.PagerDutyLinkConfigs, &out.PagerDutyLinkConfigs
*out = make([]PagerDutyLinkConfig, len(*in))
copy(*out, *in)
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
if in.Source != nil {
in, out := &in.Source, &out.Source
*out = new(string)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PagerDutyConfig.
func (in *PagerDutyConfig) DeepCopy() *PagerDutyConfig {
if in == nil {
return nil
}
out := new(PagerDutyConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PagerDutyImageConfig) DeepCopyInto(out *PagerDutyImageConfig) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PagerDutyImageConfig.
func (in *PagerDutyImageConfig) DeepCopy() *PagerDutyImageConfig {
if in == nil {
return nil
}
out := new(PagerDutyImageConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PagerDutyLinkConfig) DeepCopyInto(out *PagerDutyLinkConfig) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PagerDutyLinkConfig.
func (in *PagerDutyLinkConfig) DeepCopy() *PagerDutyLinkConfig {
if in == nil {
return nil
}
out := new(PagerDutyLinkConfig)
in.DeepCopyInto(out)
Prometheus Agent support (#5385) * Introduce PrometheusAgent CRD Operator is able to run with PrometheusAgent resources in the cluster, but doesn't do anything with them yet. This is the first step to implement the Prometheus Agent Operator. Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * Re-enable configmap and secret informers Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 1a71db03db6b41cd0cee9d0193b6ea3884bb5bae) * Implement Resolve for Agent operator Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 49558165b9178b6c1bda833a48f7bfe1468c942a) * Operator is able to create Agent Statefulset Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 7a3826683c92f917312c866a2bb6401dc54b95f2) * Agent Operator creates secret from ServiceMonitors Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 11232669befb4de9d0765dfadfe5fae00b575f11) * Agent Operator creates secret from PodMonitors Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 5ae551734bac2babc056c86443d15729d43d12b0) * Agent Operator creates secret from Probes Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 9637612fbbe9617335fd6188271ebf2cc74a3693) * Agent Operator configures remote-write Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit c4bdf230d527e19f8b77ca5f938b9254ed344f7d) * Agent Operator configures additionalScrapeConfigs Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit d9f28db764641e682bf4fe8963310f791979c387) * Implement UpdateStatus Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit c546ecaf3e8b73916df44a8f48b279c6988e32f5) * Add resource handlers Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 5b83359445e20f88ea5fff80302fce62d58058b9) * make format Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 6507964ba28f4ebf32ce3203db752444e288c45d) * Only start agent operator if there is enough permission Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * Remove node endpoint syncronization from agent operator The server operator already handles it Signed-off-by: ArthurSens <arthursens2005@gmail.com> * Move PrometheusAgent API from v1 to v1alpha1 Signed-off-by: ArthurSens <arthursens2005@gmail.com> * pkg/prometheus/agent/statefulset.go: Fix image concatenation Signed-off-by: ArthurSens <arthursens2005@gmail.com> * Avoid name colisions between Prometheus Agents and Servers Signed-off-by: ArthurSens <arthursens2005@gmail.com> * agent/createOrUpdateConfigurationSecret: Do not handle case where servicemonitor and podmonitor selectors are empty Signed-off-by: ArthurSens <arthursens2005@gmail.com> * make format Signed-off-by: ArthurSens <arthursens2005@gmail.com> * make --always-make format generate Signed-off-by: ArthurSens <arthursens2005@gmail.com> * Remove unused fields from Operator struct Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * Add deployment mode as new selector label for agent/server ssts Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * WIP: Fix OperatorUpgrade e2e test Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * Panic if type casting PrometheusInterface doesn't return Prometheus/Agent Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * Detect whether PrometheusAgent CRD is installed or not If the operator's service account has all permissions on the cluster and the CRD isn't installed then the PrometheusAgent controller will run but fail because of the absence of the CRD. Signed-off-by: Simon Pasquier <spasquie@redhat.com> * Create dedicated governing service for Prometheus agent Signed-off-by: Simon Pasquier <spasquie@redhat.com> --------- Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> Signed-off-by: ArthurSens <arthursens2005@gmail.com> Signed-off-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2023-03-27 07:30:01 -03:00
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PrometheusAgent) DeepCopyInto(out *PrometheusAgent) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusAgent.
func (in *PrometheusAgent) DeepCopy() *PrometheusAgent {
if in == nil {
return nil
}
out := new(PrometheusAgent)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PrometheusAgentList) DeepCopyInto(out *PrometheusAgentList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]*PrometheusAgent, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(PrometheusAgent)
(*in).DeepCopyInto(*out)
}
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusAgentList.
func (in *PrometheusAgentList) DeepCopy() *PrometheusAgentList {
if in == nil {
return nil
}
out := new(PrometheusAgentList)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PrometheusAgentSpec) DeepCopyInto(out *PrometheusAgentSpec) {
*out = *in
if in.Mode != nil {
in, out := &in.Mode, &out.Mode
*out = new(PrometheusAgentMode)
**out = **in
}
Prometheus Agent support (#5385) * Introduce PrometheusAgent CRD Operator is able to run with PrometheusAgent resources in the cluster, but doesn't do anything with them yet. This is the first step to implement the Prometheus Agent Operator. Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * Re-enable configmap and secret informers Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 1a71db03db6b41cd0cee9d0193b6ea3884bb5bae) * Implement Resolve for Agent operator Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 49558165b9178b6c1bda833a48f7bfe1468c942a) * Operator is able to create Agent Statefulset Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 7a3826683c92f917312c866a2bb6401dc54b95f2) * Agent Operator creates secret from ServiceMonitors Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 11232669befb4de9d0765dfadfe5fae00b575f11) * Agent Operator creates secret from PodMonitors Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 5ae551734bac2babc056c86443d15729d43d12b0) * Agent Operator creates secret from Probes Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 9637612fbbe9617335fd6188271ebf2cc74a3693) * Agent Operator configures remote-write Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit c4bdf230d527e19f8b77ca5f938b9254ed344f7d) * Agent Operator configures additionalScrapeConfigs Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit d9f28db764641e682bf4fe8963310f791979c387) * Implement UpdateStatus Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit c546ecaf3e8b73916df44a8f48b279c6988e32f5) * Add resource handlers Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 5b83359445e20f88ea5fff80302fce62d58058b9) * make format Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> (cherry picked from commit 6507964ba28f4ebf32ce3203db752444e288c45d) * Only start agent operator if there is enough permission Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * Remove node endpoint syncronization from agent operator The server operator already handles it Signed-off-by: ArthurSens <arthursens2005@gmail.com> * Move PrometheusAgent API from v1 to v1alpha1 Signed-off-by: ArthurSens <arthursens2005@gmail.com> * pkg/prometheus/agent/statefulset.go: Fix image concatenation Signed-off-by: ArthurSens <arthursens2005@gmail.com> * Avoid name colisions between Prometheus Agents and Servers Signed-off-by: ArthurSens <arthursens2005@gmail.com> * agent/createOrUpdateConfigurationSecret: Do not handle case where servicemonitor and podmonitor selectors are empty Signed-off-by: ArthurSens <arthursens2005@gmail.com> * make format Signed-off-by: ArthurSens <arthursens2005@gmail.com> * make --always-make format generate Signed-off-by: ArthurSens <arthursens2005@gmail.com> * Remove unused fields from Operator struct Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * Add deployment mode as new selector label for agent/server ssts Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * WIP: Fix OperatorUpgrade e2e test Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * Panic if type casting PrometheusInterface doesn't return Prometheus/Agent Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * Detect whether PrometheusAgent CRD is installed or not If the operator's service account has all permissions on the cluster and the CRD isn't installed then the PrometheusAgent controller will run but fail because of the absence of the CRD. Signed-off-by: Simon Pasquier <spasquie@redhat.com> * Create dedicated governing service for Prometheus agent Signed-off-by: Simon Pasquier <spasquie@redhat.com> --------- Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> Signed-off-by: ArthurSens <arthursens2005@gmail.com> Signed-off-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2023-03-27 07:30:01 -03:00
in.CommonPrometheusFields.DeepCopyInto(&out.CommonPrometheusFields)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusAgentSpec.
func (in *PrometheusAgentSpec) DeepCopy() *PrometheusAgentSpec {
if in == nil {
return nil
}
out := new(PrometheusAgentSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PuppetDBSDConfig) DeepCopyInto(out *PuppetDBSDConfig) {
*out = *in
if in.IncludeParameters != nil {
in, out := &in.IncludeParameters, &out.IncludeParameters
*out = new(bool)
**out = **in
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int32)
**out = **in
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PuppetDBSDConfig.
func (in *PuppetDBSDConfig) DeepCopy() *PuppetDBSDConfig {
if in == nil {
return nil
}
out := new(PuppetDBSDConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PushoverConfig) DeepCopyInto(out *PushoverConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.UserKey != nil {
in, out := &in.UserKey, &out.UserKey
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
feat: support `user_key_file` and `token_file` to the pushover (#5886) * dongjiang, add the user_key_file and token_file keys to the pushover config. Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * add PushoverConfig Sanitize Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * add PushoverConfig Sanitize Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * dongjiang, update by code review Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * fix unittest case Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * update unittest case Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * Update pkg/alertmanager/amcfg_test.go fix misspell Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/validation/v1beta1/validation_test.go fix misspell Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * update code review case Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * add tabale unittest Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * add unittest case by code review Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix golint Signed-off-by: dongjiang1989 <dongjiang1989@126.com> --------- Signed-off-by: dongjiang1989 <dongjiang1989@126.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
2023-10-07 02:41:03 +08:00
if in.UserKeyFile != nil {
in, out := &in.UserKeyFile, &out.UserKeyFile
*out = new(string)
**out = **in
}
if in.Token != nil {
in, out := &in.Token, &out.Token
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
feat: support `user_key_file` and `token_file` to the pushover (#5886) * dongjiang, add the user_key_file and token_file keys to the pushover config. Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * add PushoverConfig Sanitize Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * add PushoverConfig Sanitize Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * dongjiang, update by code review Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * fix unittest case Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * update unittest case Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * Update pkg/alertmanager/amcfg_test.go fix misspell Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/validation/v1beta1/validation_test.go fix misspell Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * update code review case Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * add tabale unittest Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * add unittest case by code review Signed-off-by: dongjiang1989 <dongjiang1989@126.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * Update pkg/alertmanager/amcfg_test.go Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix golint Signed-off-by: dongjiang1989 <dongjiang1989@126.com> --------- Signed-off-by: dongjiang1989 <dongjiang1989@126.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
2023-10-07 02:41:03 +08:00
if in.TokenFile != nil {
in, out := &in.TokenFile, &out.TokenFile
*out = new(string)
**out = **in
}
if in.TTL != nil {
in, out := &in.TTL, &out.TTL
*out = new(monitoringv1.Duration)
**out = **in
}
if in.Device != nil {
in, out := &in.Device, &out.Device
*out = new(string)
**out = **in
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PushoverConfig.
func (in *PushoverConfig) DeepCopy() *PushoverConfig {
if in == nil {
return nil
}
out := new(PushoverConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Receiver) DeepCopyInto(out *Receiver) {
*out = *in
if in.OpsGenieConfigs != nil {
in, out := &in.OpsGenieConfigs, &out.OpsGenieConfigs
*out = make([]OpsGenieConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.PagerDutyConfigs != nil {
in, out := &in.PagerDutyConfigs, &out.PagerDutyConfigs
*out = make([]PagerDutyConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.DiscordConfigs != nil {
in, out := &in.DiscordConfigs, &out.DiscordConfigs
*out = make([]DiscordConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.SlackConfigs != nil {
in, out := &in.SlackConfigs, &out.SlackConfigs
*out = make([]SlackConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.WebhookConfigs != nil {
in, out := &in.WebhookConfigs, &out.WebhookConfigs
*out = make([]WebhookConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.WeChatConfigs != nil {
in, out := &in.WeChatConfigs, &out.WeChatConfigs
*out = make([]WeChatConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.EmailConfigs != nil {
in, out := &in.EmailConfigs, &out.EmailConfigs
*out = make([]EmailConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.VictorOpsConfigs != nil {
in, out := &in.VictorOpsConfigs, &out.VictorOpsConfigs
*out = make([]VictorOpsConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.PushoverConfigs != nil {
in, out := &in.PushoverConfigs, &out.PushoverConfigs
*out = make([]PushoverConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.SNSConfigs != nil {
in, out := &in.SNSConfigs, &out.SNSConfigs
*out = make([]SNSConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.TelegramConfigs != nil {
in, out := &in.TelegramConfigs, &out.TelegramConfigs
*out = make([]TelegramConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.WebexConfigs != nil {
in, out := &in.WebexConfigs, &out.WebexConfigs
*out = make([]WebexConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.MSTeamsConfigs != nil {
in, out := &in.MSTeamsConfigs, &out.MSTeamsConfigs
*out = make([]MSTeamsConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Receiver.
func (in *Receiver) DeepCopy() *Receiver {
if in == nil {
return nil
}
out := new(Receiver)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Route) DeepCopyInto(out *Route) {
*out = *in
if in.GroupBy != nil {
in, out := &in.GroupBy, &out.GroupBy
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Matchers != nil {
in, out := &in.Matchers, &out.Matchers
*out = make([]Matcher, len(*in))
copy(*out, *in)
}
if in.Routes != nil {
in, out := &in.Routes, &out.Routes
*out = make([]v1.JSON, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.MuteTimeIntervals != nil {
in, out := &in.MuteTimeIntervals, &out.MuteTimeIntervals
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ActiveTimeIntervals != nil {
in, out := &in.ActiveTimeIntervals, &out.ActiveTimeIntervals
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.
func (in *Route) DeepCopy() *Route {
if in == nil {
return nil
}
out := new(Route)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SNSConfig) DeepCopyInto(out *SNSConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.Sigv4 != nil {
in, out := &in.Sigv4, &out.Sigv4
*out = new(monitoringv1.Sigv4)
(*in).DeepCopyInto(*out)
}
if in.Attributes != nil {
in, out := &in.Attributes, &out.Attributes
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SNSConfig.
func (in *SNSConfig) DeepCopy() *SNSConfig {
if in == nil {
return nil
}
out := new(SNSConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScalewaySDConfig) DeepCopyInto(out *ScalewaySDConfig) {
*out = *in
in.SecretKey.DeepCopyInto(&out.SecretKey)
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int32)
**out = **in
}
if in.ApiURL != nil {
in, out := &in.ApiURL, &out.ApiURL
*out = new(string)
**out = **in
}
if in.Zone != nil {
in, out := &in.Zone, &out.Zone
*out = new(string)
**out = **in
}
if in.NameFilter != nil {
in, out := &in.NameFilter, &out.NameFilter
*out = new(string)
**out = **in
}
if in.TagsFilter != nil {
in, out := &in.TagsFilter, &out.TagsFilter
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.RefreshInterval != nil {
in, out := &in.RefreshInterval, &out.RefreshInterval
*out = new(monitoringv1.Duration)
**out = **in
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScalewaySDConfig.
func (in *ScalewaySDConfig) DeepCopy() *ScalewaySDConfig {
if in == nil {
return nil
}
out := new(ScalewaySDConfig)
in.DeepCopyInto(out)
return out
}
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScrapeConfig) DeepCopyInto(out *ScrapeConfig) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeConfig.
func (in *ScrapeConfig) DeepCopy() *ScrapeConfig {
if in == nil {
return nil
}
out := new(ScrapeConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScrapeConfigList) DeepCopyInto(out *ScrapeConfigList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]*ScrapeConfig, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(ScrapeConfig)
(*in).DeepCopyInto(*out)
}
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeConfigList.
func (in *ScrapeConfigList) DeepCopy() *ScrapeConfigList {
if in == nil {
return nil
}
out := new(ScrapeConfigList)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScrapeConfigSpec) DeepCopyInto(out *ScrapeConfigSpec) {
*out = *in
if in.JobName != nil {
in, out := &in.JobName, &out.JobName
*out = new(string)
**out = **in
}
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
if in.StaticConfigs != nil {
in, out := &in.StaticConfigs, &out.StaticConfigs
*out = make([]StaticConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.FileSDConfigs != nil {
in, out := &in.FileSDConfigs, &out.FileSDConfigs
*out = make([]FileSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.HTTPSDConfigs != nil {
in, out := &in.HTTPSDConfigs, &out.HTTPSDConfigs
*out = make([]HTTPSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.KubernetesSDConfigs != nil {
in, out := &in.KubernetesSDConfigs, &out.KubernetesSDConfigs
*out = make([]KubernetesSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.ConsulSDConfigs != nil {
in, out := &in.ConsulSDConfigs, &out.ConsulSDConfigs
*out = make([]ConsulSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.DNSSDConfigs != nil {
in, out := &in.DNSSDConfigs, &out.DNSSDConfigs
*out = make([]DNSSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.EC2SDConfigs != nil {
in, out := &in.EC2SDConfigs, &out.EC2SDConfigs
*out = make([]EC2SDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.AzureSDConfigs != nil {
in, out := &in.AzureSDConfigs, &out.AzureSDConfigs
*out = make([]AzureSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.GCESDConfigs != nil {
in, out := &in.GCESDConfigs, &out.GCESDConfigs
*out = make([]GCESDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.OpenStackSDConfigs != nil {
in, out := &in.OpenStackSDConfigs, &out.OpenStackSDConfigs
*out = make([]OpenStackSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.DigitalOceanSDConfigs != nil {
in, out := &in.DigitalOceanSDConfigs, &out.DigitalOceanSDConfigs
*out = make([]DigitalOceanSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.KumaSDConfigs != nil {
in, out := &in.KumaSDConfigs, &out.KumaSDConfigs
*out = make([]KumaSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.EurekaSDConfigs != nil {
in, out := &in.EurekaSDConfigs, &out.EurekaSDConfigs
*out = make([]EurekaSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
Add DockerSD support for ScrapeConfig CRD Add DockerSDConfig struct and array of DockerSDConfig to the ScrapeConfig struct Add code block placeholder to process DockerSDConfig Add Code-gen for the updated scrapeconfig with DockerSDConfig Revert "Add Code-gen for the updated scrapeconfig with DockerSDConfig" This reverts commit f7d2ff99b610e5f88dc816947eb67bbc44aee365. Edit DockerSDConfig struct Add Code-gen for the updated DockerSDConfig Add processing code block for DockerSDConfig in the ScrapeConfig CRD Update processing filters in DockerSDConfig Add tests for DockerSDConfig Add missing host field to DockerSDConfig struct and remove TODOs in promcfg.go Update promcfg.go to append host field to the DockerSDConfiguration Update autogen code and perform formatting fixes Update DockerSD tests to include Host field Add resource_selector validation and tests for Docker SD configs Update tests according to host variable, tests pass Add DockerFilter type for the filters field in DockerSDConfigs Add code-gen for DockerFilter type update Update promcfg test and test data for DockerFilter type Update DockerFilter Format code Update pkg/apis/monitoring/v1alpha1/scrapeconfig_types.go Co-authored-by: Jayapriya Pai <slashpai9@gmail.com> Add validation for host field Add relevant comments and remove unrelated debug code Code-gen and format code Revert "Change git mod file" This reverts commit 232816f20aefc36ab43d22c2a9141f2df3615f90. Change from pointer to ProxyConfig to variable reference Generate Code and Format Format code Refactor test cases for Docker SD One test case each for OAuth, BasicAuth and Authorization fields. Also includes other fields like TLSConfig, hostnetworkinghost etc. Format code
2024-03-11 10:54:14 +05:30
if in.DockerSDConfigs != nil {
in, out := &in.DockerSDConfigs, &out.DockerSDConfigs
*out = make([]DockerSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.LinodeSDConfigs != nil {
in, out := &in.LinodeSDConfigs, &out.LinodeSDConfigs
*out = make([]LinodeSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.HetznerSDConfigs != nil {
in, out := &in.HetznerSDConfigs, &out.HetznerSDConfigs
*out = make([]HetznerSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.NomadSDConfigs != nil {
in, out := &in.NomadSDConfigs, &out.NomadSDConfigs
*out = make([]NomadSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.DockerSwarmSDConfigs != nil {
in, out := &in.DockerSwarmSDConfigs, &out.DockerSwarmSDConfigs
*out = make([]DockerSwarmSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.PuppetDBSDConfigs != nil {
in, out := &in.PuppetDBSDConfigs, &out.PuppetDBSDConfigs
*out = make([]PuppetDBSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.LightSailSDConfigs != nil {
in, out := &in.LightSailSDConfigs, &out.LightSailSDConfigs
*out = make([]LightSailSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.OVHCloudSDConfigs != nil {
in, out := &in.OVHCloudSDConfigs, &out.OVHCloudSDConfigs
*out = make([]OVHCloudSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.ScalewaySDConfigs != nil {
in, out := &in.ScalewaySDConfigs, &out.ScalewaySDConfigs
*out = make([]ScalewaySDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.IonosSDConfigs != nil {
in, out := &in.IonosSDConfigs, &out.IonosSDConfigs
*out = make([]IonosSDConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
if in.RelabelConfigs != nil {
in, out := &in.RelabelConfigs, &out.RelabelConfigs
*out = make([]monitoringv1.RelabelConfig, len(*in))
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
}
}
if in.MetricsPath != nil {
in, out := &in.MetricsPath, &out.MetricsPath
*out = new(string)
**out = **in
}
if in.ScrapeInterval != nil {
in, out := &in.ScrapeInterval, &out.ScrapeInterval
*out = new(monitoringv1.Duration)
**out = **in
}
if in.ScrapeTimeout != nil {
in, out := &in.ScrapeTimeout, &out.ScrapeTimeout
*out = new(monitoringv1.Duration)
**out = **in
}
if in.ScrapeProtocols != nil {
in, out := &in.ScrapeProtocols, &out.ScrapeProtocols
*out = make([]monitoringv1.ScrapeProtocol, len(*in))
copy(*out, *in)
}
if in.FallbackScrapeProtocol != nil {
in, out := &in.FallbackScrapeProtocol, &out.FallbackScrapeProtocol
*out = new(monitoringv1.ScrapeProtocol)
**out = **in
}
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
if in.HonorTimestamps != nil {
in, out := &in.HonorTimestamps, &out.HonorTimestamps
*out = new(bool)
**out = **in
}
if in.TrackTimestampsStaleness != nil {
in, out := &in.TrackTimestampsStaleness, &out.TrackTimestampsStaleness
*out = new(bool)
**out = **in
}
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
if in.HonorLabels != nil {
in, out := &in.HonorLabels, &out.HonorLabels
*out = new(bool)
**out = **in
}
if in.Params != nil {
in, out := &in.Params, &out.Params
*out = make(map[string][]string, len(*in))
for key, val := range *in {
var outVal []string
if val == nil {
(*out)[key] = nil
} else {
inVal := (*in)[key]
in, out := &inVal, &outVal
*out = make([]string, len(*in))
copy(*out, *in)
}
(*out)[key] = outVal
}
}
if in.Scheme != nil {
in, out := &in.Scheme, &out.Scheme
*out = new(string)
**out = **in
}
if in.EnableCompression != nil {
in, out := &in.EnableCompression, &out.EnableCompression
*out = new(bool)
**out = **in
}
if in.EnableHTTP2 != nil {
in, out := &in.EnableHTTP2, &out.EnableHTTP2
*out = new(bool)
**out = **in
}
if in.BasicAuth != nil {
in, out := &in.BasicAuth, &out.BasicAuth
*out = new(monitoringv1.BasicAuth)
(*in).DeepCopyInto(*out)
}
if in.Authorization != nil {
in, out := &in.Authorization, &out.Authorization
*out = new(monitoringv1.SafeAuthorization)
(*in).DeepCopyInto(*out)
}
if in.OAuth2 != nil {
in, out := &in.OAuth2, &out.OAuth2
*out = new(monitoringv1.OAuth2)
(*in).DeepCopyInto(*out)
}
if in.TLSConfig != nil {
in, out := &in.TLSConfig, &out.TLSConfig
*out = new(monitoringv1.SafeTLSConfig)
(*in).DeepCopyInto(*out)
}
2023-06-26 21:17:27 +03:00
if in.SampleLimit != nil {
in, out := &in.SampleLimit, &out.SampleLimit
*out = new(uint64)
**out = **in
}
if in.TargetLimit != nil {
in, out := &in.TargetLimit, &out.TargetLimit
*out = new(uint64)
**out = **in
}
if in.LabelLimit != nil {
in, out := &in.LabelLimit, &out.LabelLimit
*out = new(uint64)
**out = **in
}
if in.LabelNameLengthLimit != nil {
in, out := &in.LabelNameLengthLimit, &out.LabelNameLengthLimit
*out = new(uint64)
**out = **in
}
if in.LabelValueLengthLimit != nil {
in, out := &in.LabelValueLengthLimit, &out.LabelValueLengthLimit
*out = new(uint64)
**out = **in
}
in.NativeHistogramConfig.DeepCopyInto(&out.NativeHistogramConfig)
if in.KeepDroppedTargets != nil {
in, out := &in.KeepDroppedTargets, &out.KeepDroppedTargets
*out = new(uint64)
**out = **in
}
if in.MetricRelabelConfigs != nil {
in, out := &in.MetricRelabelConfigs, &out.MetricRelabelConfigs
*out = make([]monitoringv1.RelabelConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
if in.ScrapeClassName != nil {
in, out := &in.ScrapeClassName, &out.ScrapeClassName
*out = new(string)
**out = **in
}
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeConfigSpec.
func (in *ScrapeConfigSpec) DeepCopy() *ScrapeConfigSpec {
if in == nil {
return nil
}
out := new(ScrapeConfigSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SlackAction) DeepCopyInto(out *SlackAction) {
*out = *in
if in.ConfirmField != nil {
in, out := &in.ConfirmField, &out.ConfirmField
*out = new(SlackConfirmationField)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackAction.
func (in *SlackAction) DeepCopy() *SlackAction {
if in == nil {
return nil
}
out := new(SlackAction)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SlackConfig) DeepCopyInto(out *SlackConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.APIURL != nil {
in, out := &in.APIURL, &out.APIURL
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.Fields != nil {
in, out := &in.Fields, &out.Fields
*out = make([]SlackField, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.MrkdwnIn != nil {
in, out := &in.MrkdwnIn, &out.MrkdwnIn
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Actions != nil {
in, out := &in.Actions, &out.Actions
*out = make([]SlackAction, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackConfig.
func (in *SlackConfig) DeepCopy() *SlackConfig {
if in == nil {
return nil
}
out := new(SlackConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SlackConfirmationField) DeepCopyInto(out *SlackConfirmationField) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackConfirmationField.
func (in *SlackConfirmationField) DeepCopy() *SlackConfirmationField {
if in == nil {
return nil
}
out := new(SlackConfirmationField)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SlackField) DeepCopyInto(out *SlackField) {
*out = *in
if in.Short != nil {
in, out := &in.Short, &out.Short
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackField.
func (in *SlackField) DeepCopy() *SlackField {
if in == nil {
return nil
}
out := new(SlackField)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
func (in *StaticConfig) DeepCopyInto(out *StaticConfig) {
*out = *in
if in.Targets != nil {
in, out := &in.Targets, &out.Targets
*out = make([]Target, len(*in))
copy(*out, *in)
}
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(map[string]string, len(*in))
feat: Add ScrapeConfig CRD (#5335) * api/v1alpha1: Add ScrapeConfig CRD Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * api/v1: Add ScrapeConfig selectors to Prometheus Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add ScrapeConfig selection logic Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * prometheus/server/operator: Add static_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Add file_sd_config and http_sd_config generation from ScrapeConfig Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * prometheus/server/operator: Check ScrapeConfig permissions before trying to select them * prometheus/server/operator: Check that the ScrapeConfig CRD is installed * fix: Apply suggestions from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Apply suggestion from mrueg Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: Properly generate scrape configurations for PrometheusAgent Also check that the ScrapeConfig CRD is installed and that the operator has the right permissions. * fix: Address Joao's points Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: ScrapeConfig only needs get,list,watch References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162861091 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Implement ScrapeConfig ResourceEventHandlerFuncs References: - https://github.com/prometheus-operator/prometheus-operator/pull/5335#discussion_r1162901259 Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Missing permissions for prometheus-operator's serviceaccount * fix: Address Arthur's feedback Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * feat: Add ScrapeConfig.HonorTimestamps * feat: Add ScrapeConfig.HonorLabels * fix: Address feedback from Joao Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> * fix: Address Simon's feedback Co-authored-by: Simon Pasquier <spasquie@redhat.com> * chore: Finalize the move to CRDChecker * fix: Include ScrapeConfig in e2e tests * docs: spec.ProbeSelector -> spec.probeSelector * fix: Don't addEventHandler if we don't have a scrape confirm informer * fix: Address feedback from Simon and Philip Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Philip Gough <philip.p.gough@gmail.com> * fix: Wrap error with a better error message * fix: Linting --------- Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Joao Marcal <joao.marcal12@gmail.com> Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu> Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2023-05-03 16:54:31 +02:00
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticConfig.
func (in *StaticConfig) DeepCopy() *StaticConfig {
if in == nil {
return nil
}
out := new(StaticConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TelegramConfig) DeepCopyInto(out *TelegramConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.BotToken != nil {
in, out := &in.BotToken, &out.BotToken
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.BotTokenFile != nil {
in, out := &in.BotTokenFile, &out.BotTokenFile
*out = new(string)
**out = **in
}
if in.MessageThreadID != nil {
in, out := &in.MessageThreadID, &out.MessageThreadID
*out = new(int64)
**out = **in
}
if in.DisableNotifications != nil {
in, out := &in.DisableNotifications, &out.DisableNotifications
*out = new(bool)
**out = **in
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TelegramConfig.
func (in *TelegramConfig) DeepCopy() *TelegramConfig {
if in == nil {
return nil
}
out := new(TelegramConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TimeInterval) DeepCopyInto(out *TimeInterval) {
*out = *in
if in.Times != nil {
in, out := &in.Times, &out.Times
*out = make([]TimeRange, len(*in))
copy(*out, *in)
}
if in.Weekdays != nil {
in, out := &in.Weekdays, &out.Weekdays
*out = make([]WeekdayRange, len(*in))
copy(*out, *in)
}
if in.DaysOfMonth != nil {
in, out := &in.DaysOfMonth, &out.DaysOfMonth
*out = make([]DayOfMonthRange, len(*in))
copy(*out, *in)
}
if in.Months != nil {
in, out := &in.Months, &out.Months
*out = make([]MonthRange, len(*in))
copy(*out, *in)
}
if in.Years != nil {
in, out := &in.Years, &out.Years
*out = make([]YearRange, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeInterval.
func (in *TimeInterval) DeepCopy() *TimeInterval {
if in == nil {
return nil
}
out := new(TimeInterval)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TimeRange) DeepCopyInto(out *TimeRange) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeRange.
func (in *TimeRange) DeepCopy() *TimeRange {
if in == nil {
return nil
}
out := new(TimeRange)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VictorOpsConfig) DeepCopyInto(out *VictorOpsConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.APIKey != nil {
in, out := &in.APIKey, &out.APIKey
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.CustomFields != nil {
in, out := &in.CustomFields, &out.CustomFields
*out = make([]KeyValue, len(*in))
copy(*out, *in)
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VictorOpsConfig.
func (in *VictorOpsConfig) DeepCopy() *VictorOpsConfig {
if in == nil {
return nil
}
out := new(VictorOpsConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WeChatConfig) DeepCopyInto(out *WeChatConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.APISecret != nil {
in, out := &in.APISecret, &out.APISecret
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeChatConfig.
func (in *WeChatConfig) DeepCopy() *WeChatConfig {
if in == nil {
return nil
}
out := new(WeChatConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WebexConfig) DeepCopyInto(out *WebexConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.APIURL != nil {
in, out := &in.APIURL, &out.APIURL
*out = new(URL)
**out = **in
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
if in.Message != nil {
in, out := &in.Message, &out.Message
*out = new(string)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebexConfig.
func (in *WebexConfig) DeepCopy() *WebexConfig {
if in == nil {
return nil
}
out := new(WebexConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WebhookConfig) DeepCopyInto(out *WebhookConfig) {
*out = *in
if in.SendResolved != nil {
in, out := &in.SendResolved, &out.SendResolved
*out = new(bool)
**out = **in
}
if in.URL != nil {
in, out := &in.URL, &out.URL
*out = new(string)
**out = **in
}
if in.URLSecret != nil {
in, out := &in.URLSecret, &out.URLSecret
*out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
if in.HTTPConfig != nil {
in, out := &in.HTTPConfig, &out.HTTPConfig
*out = new(HTTPConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookConfig.
func (in *WebhookConfig) DeepCopy() *WebhookConfig {
if in == nil {
return nil
}
out := new(WebhookConfig)
in.DeepCopyInto(out)
return out
}