2021-10-07 12:30:52 +05:30
|
|
|
//go:build !ignore_autogenerated
|
2018-11-26 15:54:08 +01:00
|
|
|
|
2020-10-06 18:53:05 -07:00
|
|
|
// Copyright The prometheus-operator Authors
|
2018-11-26 15:54:08 +01:00
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
|
2019-11-19 10:44:24 -06:00
|
|
|
// Code generated by controller-gen. DO NOT EDIT.
|
2018-11-26 15:54:08 +01:00
|
|
|
|
|
|
|
package v1
|
|
|
|
|
|
|
|
import (
|
2023-11-14 13:41:40 +01:00
|
|
|
appsv1 "k8s.io/api/apps/v1"
|
2018-12-06 00:22:33 -08:00
|
|
|
corev1 "k8s.io/api/core/v1"
|
|
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
2019-11-19 10:44:24 -06:00
|
|
|
"k8s.io/apimachinery/pkg/util/intstr"
|
2018-11-26 15:54:08 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *APIServerConfig) DeepCopyInto(out *APIServerConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.BasicAuth != nil {
|
|
|
|
in, out := &in.BasicAuth, &out.BasicAuth
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(BasicAuth)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(TLSConfig)
|
pkg/prometheus: Enable users to configure bearer token from secret
To configure a bearer token users could only specify a file path in the
service monitor, pointing to a bearer token file in the Prometheus
container. This enables hostile users, being able to configure a service
monitor and controlling the scrape target, to retrieve arbitrary files
in the Prometheus container.
In cases where users can not be trusted, this patch adds an option to
disallow the above file path specification and replaces it by a secret
reference. This secret has to be in the same namespace as the service
monitor, shrinking the attack vector.
pkg/prometheus: Add option to deny file system access through service monitors
ArbitraryFSAccessThroughSMsConfig enables users to configure, whether
a service monitor selected by the Prometheus instance is allowed to use
arbitrary files on the file system of the Prometheus container. This is
the case when e.g. a service monitor specifies a BearerTokenFile in an
endpoint. A malicious user could create a service monitor
selecting arbitrary secret files in the Prometheus container. Those
secrets would then be send with a scrape request by Prometheus to a
malicious target. Denying the above would prevent the attack, users can
instead use the BearerTokenSecret field.
test/basic-auth-test-app: Add mTLS endpoint
pkg/prometheus: Enable users to configure tls from secret
pkg/prometheus/operator: Validate TLS configs before retrieving assets
Before retrieving TLS assets from Kubernetes secrets for a given service
monitor, make sure the user did not specify both file and secret
reference, e.g. both `CAFile` and `CASecret`.
test: Rename basic-auth-test-app to instrumented-sample-app
Given that the basic-auth-test-app not only supports basic auth, but
also bearer token as well as tls authentication, this patch renames the
app to a more generic name.
test/e2e/prometheus_test: Test ArbitraryFSAccessThroughSM option for tls
The Prometheus custom resource has the option to disable arbitrary
filesystem access configured through service monitors. This commit adds
an end-to-end test for this option in combination with the TLS
configuration via files or secret references in service monitors.
pkg/prometheus/operator: Move check for arbitrary fs access into func
2019-03-18 15:56:38 +01:00
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2021-07-13 09:47:29 +02:00
|
|
|
if in.Authorization != nil {
|
|
|
|
in, out := &in.Authorization, &out.Authorization
|
|
|
|
*out = new(Authorization)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerConfig.
|
|
|
|
func (in *APIServerConfig) DeepCopy() *APIServerConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(APIServerConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AlertingSpec) DeepCopyInto(out *AlertingSpec) {
|
|
|
|
*out = *in
|
|
|
|
if in.Alertmanagers != nil {
|
|
|
|
in, out := &in.Alertmanagers, &out.Alertmanagers
|
|
|
|
*out = make([]AlertmanagerEndpoints, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertingSpec.
|
|
|
|
func (in *AlertingSpec) DeepCopy() *AlertingSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AlertingSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *Alertmanager) DeepCopyInto(out *Alertmanager) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
|
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
2023-01-03 16:08:32 +01:00
|
|
|
in.Status.DeepCopyInto(&out.Status)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alertmanager.
|
|
|
|
func (in *Alertmanager) DeepCopy() *Alertmanager {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Alertmanager)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-11-17 16:26:27 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AlertmanagerConfigMatcherStrategy) DeepCopyInto(out *AlertmanagerConfigMatcherStrategy) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfigMatcherStrategy.
|
|
|
|
func (in *AlertmanagerConfigMatcherStrategy) DeepCopy() *AlertmanagerConfigMatcherStrategy {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AlertmanagerConfigMatcherStrategy)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-02-28 18:12:50 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AlertmanagerConfiguration) DeepCopyInto(out *AlertmanagerConfiguration) {
|
|
|
|
*out = *in
|
2022-07-21 18:33:56 +08:00
|
|
|
if in.Global != nil {
|
|
|
|
in, out := &in.Global, &out.Global
|
|
|
|
*out = new(AlertmanagerGlobalConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2022-09-02 22:58:50 +08:00
|
|
|
if in.Templates != nil {
|
|
|
|
in, out := &in.Templates, &out.Templates
|
|
|
|
*out = make([]SecretOrConfigMap, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2022-02-28 18:12:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfiguration.
|
|
|
|
func (in *AlertmanagerConfiguration) DeepCopy() *AlertmanagerConfiguration {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AlertmanagerConfiguration)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2018-11-26 15:54:08 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AlertmanagerEndpoints) DeepCopyInto(out *AlertmanagerEndpoints) {
|
|
|
|
*out = *in
|
2024-07-31 22:07:04 +05:30
|
|
|
if in.Namespace != nil {
|
|
|
|
in, out := &in.Namespace, &out.Namespace
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
out.Port = in.Port
|
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(TLSConfig)
|
pkg/prometheus: Enable users to configure bearer token from secret
To configure a bearer token users could only specify a file path in the
service monitor, pointing to a bearer token file in the Prometheus
container. This enables hostile users, being able to configure a service
monitor and controlling the scrape target, to retrieve arbitrary files
in the Prometheus container.
In cases where users can not be trusted, this patch adds an option to
disallow the above file path specification and replaces it by a secret
reference. This secret has to be in the same namespace as the service
monitor, shrinking the attack vector.
pkg/prometheus: Add option to deny file system access through service monitors
ArbitraryFSAccessThroughSMsConfig enables users to configure, whether
a service monitor selected by the Prometheus instance is allowed to use
arbitrary files on the file system of the Prometheus container. This is
the case when e.g. a service monitor specifies a BearerTokenFile in an
endpoint. A malicious user could create a service monitor
selecting arbitrary secret files in the Prometheus container. Those
secrets would then be send with a scrape request by Prometheus to a
malicious target. Denying the above would prevent the attack, users can
instead use the BearerTokenSecret field.
test/basic-auth-test-app: Add mTLS endpoint
pkg/prometheus: Enable users to configure tls from secret
pkg/prometheus/operator: Validate TLS configs before retrieving assets
Before retrieving TLS assets from Kubernetes secrets for a given service
monitor, make sure the user did not specify both file and secret
reference, e.g. both `CAFile` and `CASecret`.
test: Rename basic-auth-test-app to instrumented-sample-app
Given that the basic-auth-test-app not only supports basic auth, but
also bearer token as well as tls authentication, this patch renames the
app to a more generic name.
test/e2e/prometheus_test: Test ArbitraryFSAccessThroughSM option for tls
The Prometheus custom resource has the option to disable arbitrary
filesystem access configured through service monitors. This commit adds
an end-to-end test for this option in combination with the TLS
configuration via files or secret references in service monitors.
pkg/prometheus/operator: Move check for arbitrary fs access into func
2019-03-18 15:56:38 +01:00
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2022-11-24 09:09:20 +00:00
|
|
|
if in.BasicAuth != nil {
|
|
|
|
in, out := &in.BasicAuth, &out.BasicAuth
|
|
|
|
*out = new(BasicAuth)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2021-07-13 09:47:29 +02:00
|
|
|
if in.Authorization != nil {
|
|
|
|
in, out := &in.Authorization, &out.Authorization
|
|
|
|
*out = new(SafeAuthorization)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2023-10-22 20:32:46 +08:00
|
|
|
if in.Sigv4 != nil {
|
|
|
|
in, out := &in.Sigv4, &out.Sigv4
|
|
|
|
*out = new(Sigv4)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2020-08-06 16:59:29 +08:00
|
|
|
if in.Timeout != nil {
|
|
|
|
in, out := &in.Timeout, &out.Timeout
|
2022-07-01 15:21:00 +05:30
|
|
|
*out = new(Duration)
|
2020-08-06 16:59:29 +08:00
|
|
|
**out = **in
|
|
|
|
}
|
2022-11-11 03:04:39 +01:00
|
|
|
if in.EnableHttp2 != nil {
|
|
|
|
in, out := &in.EnableHttp2, &out.EnableHttp2
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-05-14 19:06:30 +05:30
|
|
|
if in.RelabelConfigs != nil {
|
|
|
|
in, out := &in.RelabelConfigs, &out.RelabelConfigs
|
|
|
|
*out = make([]RelabelConfig, len(*in))
|
|
|
|
for i := range *in {
|
2024-05-17 14:39:01 +05:30
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.AlertRelabelConfigs != nil {
|
|
|
|
in, out := &in.AlertRelabelConfigs, &out.AlertRelabelConfigs
|
|
|
|
*out = make([]RelabelConfig, len(*in))
|
|
|
|
for i := range *in {
|
2024-05-14 19:06:30 +05:30
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerEndpoints.
|
|
|
|
func (in *AlertmanagerEndpoints) DeepCopy() *AlertmanagerEndpoints {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AlertmanagerEndpoints)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-07-21 18:33:56 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AlertmanagerGlobalConfig) DeepCopyInto(out *AlertmanagerGlobalConfig) {
|
|
|
|
*out = *in
|
2023-06-15 21:05:54 +08:00
|
|
|
if in.SMTPConfig != nil {
|
|
|
|
in, out := &in.SMTPConfig, &out.SMTPConfig
|
|
|
|
*out = new(GlobalSMTPConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2022-07-21 18:33:56 +08:00
|
|
|
if in.HTTPConfig != nil {
|
|
|
|
in, out := &in.HTTPConfig, &out.HTTPConfig
|
|
|
|
*out = new(HTTPConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2023-03-10 10:23:12 +01:00
|
|
|
if in.SlackAPIURL != nil {
|
|
|
|
in, out := &in.SlackAPIURL, &out.SlackAPIURL
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2023-03-21 11:41:19 +01:00
|
|
|
if in.OpsGenieAPIURL != nil {
|
|
|
|
in, out := &in.OpsGenieAPIURL, &out.OpsGenieAPIURL
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.OpsGenieAPIKey != nil {
|
|
|
|
in, out := &in.OpsGenieAPIKey, &out.OpsGenieAPIKey
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2023-03-24 23:35:46 +01:00
|
|
|
if in.PagerdutyURL != nil {
|
|
|
|
in, out := &in.PagerdutyURL, &out.PagerdutyURL
|
2023-03-29 15:05:05 +02:00
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
2023-03-24 23:35:46 +01:00
|
|
|
}
|
2022-07-21 18:33:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerGlobalConfig.
|
|
|
|
func (in *AlertmanagerGlobalConfig) DeepCopy() *AlertmanagerGlobalConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AlertmanagerGlobalConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2018-11-26 15:54:08 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AlertmanagerList) DeepCopyInto(out *AlertmanagerList) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
2019-06-20 15:02:10 -07:00
|
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.Items != nil {
|
|
|
|
in, out := &in.Items, &out.Items
|
|
|
|
*out = make([]Alertmanager, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerList.
|
|
|
|
func (in *AlertmanagerList) DeepCopy() *AlertmanagerList {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AlertmanagerList)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AlertmanagerSpec) DeepCopyInto(out *AlertmanagerSpec) {
|
|
|
|
*out = *in
|
|
|
|
if in.PodMetadata != nil {
|
|
|
|
in, out := &in.PodMetadata, &out.PodMetadata
|
2020-04-07 12:12:28 -05:00
|
|
|
*out = new(EmbeddedObjectMetadata)
|
2018-12-06 00:22:33 -08:00
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2019-01-08 12:38:59 +01:00
|
|
|
if in.Image != nil {
|
|
|
|
in, out := &in.Image, &out.Image
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
2019-01-08 12:38:59 +01:00
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.ImagePullSecrets != nil {
|
|
|
|
in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = make([]corev1.LocalObjectReference, len(*in))
|
2018-11-26 15:54:08 +01:00
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.Secrets != nil {
|
|
|
|
in, out := &in.Secrets, &out.Secrets
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.ConfigMaps != nil {
|
|
|
|
in, out := &in.ConfigMaps, &out.ConfigMaps
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.Replicas != nil {
|
|
|
|
in, out := &in.Replicas, &out.Replicas
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(int32)
|
|
|
|
**out = **in
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
if in.Storage != nil {
|
|
|
|
in, out := &in.Storage, &out.Storage
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(StorageSpec)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2019-08-28 11:53:05 +02:00
|
|
|
if in.Volumes != nil {
|
|
|
|
in, out := &in.Volumes, &out.Volumes
|
|
|
|
*out = make([]corev1.Volume, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2019-09-11 18:06:22 +02:00
|
|
|
if in.VolumeMounts != nil {
|
|
|
|
in, out := &in.VolumeMounts, &out.VolumeMounts
|
|
|
|
*out = make([]corev1.VolumeMount, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.NodeSelector != nil {
|
|
|
|
in, out := &in.NodeSelector, &out.NodeSelector
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
in.Resources.DeepCopyInto(&out.Resources)
|
|
|
|
if in.Affinity != nil {
|
|
|
|
in, out := &in.Affinity, &out.Affinity
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(corev1.Affinity)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
if in.Tolerations != nil {
|
|
|
|
in, out := &in.Tolerations, &out.Tolerations
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = make([]corev1.Toleration, len(*in))
|
2018-11-26 15:54:08 +01:00
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2020-10-16 14:08:48 -04:00
|
|
|
if in.TopologySpreadConstraints != nil {
|
|
|
|
in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints
|
|
|
|
*out = make([]corev1.TopologySpreadConstraint, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.SecurityContext != nil {
|
|
|
|
in, out := &in.SecurityContext, &out.SecurityContext
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(corev1.PodSecurityContext)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2024-10-08 18:00:40 +03:00
|
|
|
if in.DNSPolicy != nil {
|
|
|
|
in, out := &in.DNSPolicy, &out.DNSPolicy
|
|
|
|
*out = new(DNSPolicy)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.DNSConfig != nil {
|
|
|
|
in, out := &in.DNSConfig, &out.DNSConfig
|
|
|
|
*out = new(PodDNSConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.Containers != nil {
|
|
|
|
in, out := &in.Containers, &out.Containers
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = make([]corev1.Container, len(*in))
|
2018-11-26 15:54:08 +01:00
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2019-08-29 10:46:44 +02:00
|
|
|
if in.InitContainers != nil {
|
|
|
|
in, out := &in.InitContainers, &out.InitContainers
|
|
|
|
*out = make([]corev1.Container, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.AdditionalPeers != nil {
|
|
|
|
in, out := &in.AdditionalPeers, &out.AdditionalPeers
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2023-12-20 16:56:20 +01:00
|
|
|
if in.ClusterLabel != nil {
|
|
|
|
in, out := &in.ClusterLabel, &out.ClusterLabel
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2020-05-20 13:05:04 +02:00
|
|
|
if in.AlertmanagerConfigSelector != nil {
|
|
|
|
in, out := &in.AlertmanagerConfigSelector, &out.AlertmanagerConfigSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.AlertmanagerConfigNamespaceSelector != nil {
|
|
|
|
in, out := &in.AlertmanagerConfigNamespaceSelector, &out.AlertmanagerConfigNamespaceSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2024-07-26 09:56:04 +02:00
|
|
|
out.AlertmanagerConfigMatcherStrategy = in.AlertmanagerConfigMatcherStrategy
|
2021-09-06 12:49:17 +01:00
|
|
|
if in.MinReadySeconds != nil {
|
|
|
|
in, out := &in.MinReadySeconds, &out.MinReadySeconds
|
|
|
|
*out = new(uint32)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-06-02 23:49:32 +08:00
|
|
|
if in.HostAliases != nil {
|
|
|
|
in, out := &in.HostAliases, &out.HostAliases
|
|
|
|
*out = make([]HostAlias, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2022-07-05 16:31:59 +08:00
|
|
|
if in.Web != nil {
|
|
|
|
in, out := &in.Web, &out.Web
|
|
|
|
*out = new(AlertmanagerWebSpec)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2022-02-28 18:12:50 +08:00
|
|
|
if in.AlertmanagerConfiguration != nil {
|
|
|
|
in, out := &in.AlertmanagerConfiguration, &out.AlertmanagerConfiguration
|
|
|
|
*out = new(AlertmanagerConfiguration)
|
2022-07-21 18:33:56 +08:00
|
|
|
(*in).DeepCopyInto(*out)
|
2022-02-28 18:12:50 +08:00
|
|
|
}
|
2023-06-05 13:01:50 +02:00
|
|
|
if in.AutomountServiceAccountToken != nil {
|
|
|
|
in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-03-07 17:43:23 +02:00
|
|
|
if in.EnableFeatures != nil {
|
|
|
|
in, out := &in.EnableFeatures, &out.EnableFeatures
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerSpec.
|
|
|
|
func (in *AlertmanagerSpec) DeepCopy() *AlertmanagerSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AlertmanagerSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AlertmanagerStatus) DeepCopyInto(out *AlertmanagerStatus) {
|
|
|
|
*out = *in
|
2023-01-03 16:08:32 +01:00
|
|
|
if in.Conditions != nil {
|
|
|
|
in, out := &in.Conditions, &out.Conditions
|
|
|
|
*out = make([]Condition, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerStatus.
|
|
|
|
func (in *AlertmanagerStatus) DeepCopy() *AlertmanagerStatus {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AlertmanagerStatus)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-07-05 16:31:59 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AlertmanagerWebSpec) DeepCopyInto(out *AlertmanagerWebSpec) {
|
|
|
|
*out = *in
|
2022-07-21 18:16:28 +08:00
|
|
|
in.WebConfigFileFields.DeepCopyInto(&out.WebConfigFileFields)
|
2023-04-24 22:55:16 +10:00
|
|
|
if in.GetConcurrency != nil {
|
|
|
|
in, out := &in.GetConcurrency, &out.GetConcurrency
|
|
|
|
*out = new(uint32)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.Timeout != nil {
|
|
|
|
in, out := &in.Timeout, &out.Timeout
|
|
|
|
*out = new(uint32)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-07-05 16:31:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerWebSpec.
|
|
|
|
func (in *AlertmanagerWebSpec) DeepCopy() *AlertmanagerWebSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AlertmanagerWebSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
pkg/prometheus: Enable users to configure bearer token from secret
To configure a bearer token users could only specify a file path in the
service monitor, pointing to a bearer token file in the Prometheus
container. This enables hostile users, being able to configure a service
monitor and controlling the scrape target, to retrieve arbitrary files
in the Prometheus container.
In cases where users can not be trusted, this patch adds an option to
disallow the above file path specification and replaces it by a secret
reference. This secret has to be in the same namespace as the service
monitor, shrinking the attack vector.
pkg/prometheus: Add option to deny file system access through service monitors
ArbitraryFSAccessThroughSMsConfig enables users to configure, whether
a service monitor selected by the Prometheus instance is allowed to use
arbitrary files on the file system of the Prometheus container. This is
the case when e.g. a service monitor specifies a BearerTokenFile in an
endpoint. A malicious user could create a service monitor
selecting arbitrary secret files in the Prometheus container. Those
secrets would then be send with a scrape request by Prometheus to a
malicious target. Denying the above would prevent the attack, users can
instead use the BearerTokenSecret field.
test/basic-auth-test-app: Add mTLS endpoint
pkg/prometheus: Enable users to configure tls from secret
pkg/prometheus/operator: Validate TLS configs before retrieving assets
Before retrieving TLS assets from Kubernetes secrets for a given service
monitor, make sure the user did not specify both file and secret
reference, e.g. both `CAFile` and `CASecret`.
test: Rename basic-auth-test-app to instrumented-sample-app
Given that the basic-auth-test-app not only supports basic auth, but
also bearer token as well as tls authentication, this patch renames the
app to a more generic name.
test/e2e/prometheus_test: Test ArbitraryFSAccessThroughSM option for tls
The Prometheus custom resource has the option to disable arbitrary
filesystem access configured through service monitors. This commit adds
an end-to-end test for this option in combination with the TLS
configuration via files or secret references in service monitors.
pkg/prometheus/operator: Move check for arbitrary fs access into func
2019-03-18 15:56:38 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ArbitraryFSAccessThroughSMsConfig) DeepCopyInto(out *ArbitraryFSAccessThroughSMsConfig) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArbitraryFSAccessThroughSMsConfig.
|
|
|
|
func (in *ArbitraryFSAccessThroughSMsConfig) DeepCopy() *ArbitraryFSAccessThroughSMsConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ArbitraryFSAccessThroughSMsConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-07-21 12:35:06 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *Argument) DeepCopyInto(out *Argument) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Argument.
|
|
|
|
func (in *Argument) DeepCopy() *Argument {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Argument)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-05-23 17:07:36 +08:00
|
|
|
// 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
|
2023-11-16 16:16:24 +01:00
|
|
|
if in.Node != nil {
|
|
|
|
in, out := &in.Node, &out.Node
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-05-23 17:07:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
}
|
|
|
|
|
2021-07-13 09:47:29 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *Authorization) DeepCopyInto(out *Authorization) {
|
|
|
|
*out = *in
|
|
|
|
in.SafeAuthorization.DeepCopyInto(&out.SafeAuthorization)
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authorization.
|
|
|
|
func (in *Authorization) DeepCopy() *Authorization {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Authorization)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AuthorizationValidationError) DeepCopyInto(out *AuthorizationValidationError) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationValidationError.
|
|
|
|
func (in *AuthorizationValidationError) DeepCopy() *AuthorizationValidationError {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AuthorizationValidationError)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2023-09-22 11:45:13 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AzureAD) DeepCopyInto(out *AzureAD) {
|
|
|
|
*out = *in
|
|
|
|
if in.Cloud != nil {
|
|
|
|
in, out := &in.Cloud, &out.Cloud
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2023-10-22 14:30:43 +02:00
|
|
|
if in.ManagedIdentity != nil {
|
|
|
|
in, out := &in.ManagedIdentity, &out.ManagedIdentity
|
|
|
|
*out = new(ManagedIdentity)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.OAuth != nil {
|
|
|
|
in, out := &in.OAuth, &out.OAuth
|
|
|
|
*out = new(AzureOAuth)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2024-05-15 21:05:10 +05:30
|
|
|
if in.SDK != nil {
|
|
|
|
in, out := &in.SDK, &out.SDK
|
|
|
|
*out = new(AzureSDK)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2023-09-22 11:45:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureAD.
|
|
|
|
func (in *AzureAD) DeepCopy() *AzureAD {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AzureAD)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2018-11-26 15:54:08 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
2023-10-22 14:30:43 +02:00
|
|
|
func (in *AzureOAuth) DeepCopyInto(out *AzureOAuth) {
|
|
|
|
*out = *in
|
|
|
|
in.ClientSecret.DeepCopyInto(&out.ClientSecret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureOAuth.
|
|
|
|
func (in *AzureOAuth) DeepCopy() *AzureOAuth {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AzureOAuth)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2024-05-15 21:05:10 +05:30
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *AzureSDK) DeepCopyInto(out *AzureSDK) {
|
|
|
|
*out = *in
|
|
|
|
if in.TenantID != nil {
|
|
|
|
in, out := &in.TenantID, &out.TenantID
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureSDK.
|
|
|
|
func (in *AzureSDK) DeepCopy() *AzureSDK {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(AzureSDK)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2018-11-26 15:54:08 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *BasicAuth) DeepCopyInto(out *BasicAuth) {
|
|
|
|
*out = *in
|
|
|
|
in.Username.DeepCopyInto(&out.Username)
|
|
|
|
in.Password.DeepCopyInto(&out.Password)
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuth.
|
|
|
|
func (in *BasicAuth) DeepCopy() *BasicAuth {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(BasicAuth)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-01-28 10:47:06 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *CommonPrometheusFields) DeepCopyInto(out *CommonPrometheusFields) {
|
|
|
|
*out = *in
|
|
|
|
if in.PodMetadata != nil {
|
|
|
|
in, out := &in.PodMetadata, &out.PodMetadata
|
|
|
|
*out = new(EmbeddedObjectMetadata)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.ServiceMonitorSelector != nil {
|
|
|
|
in, out := &in.ServiceMonitorSelector, &out.ServiceMonitorSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.ServiceMonitorNamespaceSelector != nil {
|
|
|
|
in, out := &in.ServiceMonitorNamespaceSelector, &out.ServiceMonitorNamespaceSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.PodMonitorSelector != nil {
|
|
|
|
in, out := &in.PodMonitorSelector, &out.PodMonitorSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.PodMonitorNamespaceSelector != nil {
|
|
|
|
in, out := &in.PodMonitorNamespaceSelector, &out.PodMonitorNamespaceSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.ProbeSelector != nil {
|
|
|
|
in, out := &in.ProbeSelector, &out.ProbeSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.ProbeNamespaceSelector != nil {
|
|
|
|
in, out := &in.ProbeNamespaceSelector, &out.ProbeNamespaceSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
2023-05-03 16:54:31 +02:00
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.ScrapeConfigSelector != nil {
|
|
|
|
in, out := &in.ScrapeConfigSelector, &out.ScrapeConfigSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.ScrapeConfigNamespaceSelector != nil {
|
|
|
|
in, out := &in.ScrapeConfigNamespaceSelector, &out.ScrapeConfigNamespaceSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
2022-01-28 10:47:06 +01:00
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.Image != nil {
|
|
|
|
in, out := &in.Image, &out.Image
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.ImagePullSecrets != nil {
|
|
|
|
in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
|
|
|
|
*out = make([]corev1.LocalObjectReference, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.Replicas != nil {
|
|
|
|
in, out := &in.Replicas, &out.Replicas
|
|
|
|
*out = new(int32)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.Shards != nil {
|
|
|
|
in, out := &in.Shards, &out.Shards
|
|
|
|
*out = new(int32)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.ReplicaExternalLabelName != nil {
|
|
|
|
in, out := &in.ReplicaExternalLabelName, &out.ReplicaExternalLabelName
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.PrometheusExternalLabelName != nil {
|
|
|
|
in, out := &in.PrometheusExternalLabelName, &out.PrometheusExternalLabelName
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-01-22 22:09:02 +08:00
|
|
|
if in.ScrapeProtocols != nil {
|
|
|
|
in, out := &in.ScrapeProtocols, &out.ScrapeProtocols
|
|
|
|
*out = make([]ScrapeProtocol, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2022-01-28 10:47:06 +01:00
|
|
|
if in.ExternalLabels != nil {
|
|
|
|
in, out := &in.ExternalLabels, &out.ExternalLabels
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 17:53:12 +02:00
|
|
|
if in.RemoteWriteReceiverMessageVersions != nil {
|
|
|
|
in, out := &in.RemoteWriteReceiverMessageVersions, &out.RemoteWriteReceiverMessageVersions
|
|
|
|
*out = make([]RemoteWriteMessageVersion, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2022-01-28 10:47:06 +01:00
|
|
|
if in.EnableFeatures != nil {
|
|
|
|
in, out := &in.EnableFeatures, &out.EnableFeatures
|
2024-04-04 12:30:08 +02:00
|
|
|
*out = make([]EnableFeature, len(*in))
|
2022-01-28 10:47:06 +01:00
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.Storage != nil {
|
|
|
|
in, out := &in.Storage, &out.Storage
|
|
|
|
*out = new(StorageSpec)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.Volumes != nil {
|
|
|
|
in, out := &in.Volumes, &out.Volumes
|
|
|
|
*out = make([]corev1.Volume, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.VolumeMounts != nil {
|
|
|
|
in, out := &in.VolumeMounts, &out.VolumeMounts
|
|
|
|
*out = make([]corev1.VolumeMount, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2023-11-14 13:41:40 +01:00
|
|
|
if in.PersistentVolumeClaimRetentionPolicy != nil {
|
|
|
|
in, out := &in.PersistentVolumeClaimRetentionPolicy, &out.PersistentVolumeClaimRetentionPolicy
|
|
|
|
*out = new(appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-01-28 10:47:06 +01:00
|
|
|
if in.Web != nil {
|
|
|
|
in, out := &in.Web, &out.Web
|
2022-07-05 16:31:59 +08:00
|
|
|
*out = new(PrometheusWebSpec)
|
2022-01-28 10:47:06 +01:00
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
in.Resources.DeepCopyInto(&out.Resources)
|
|
|
|
if in.NodeSelector != nil {
|
|
|
|
in, out := &in.NodeSelector, &out.NodeSelector
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
2024-04-10 11:49:03 +03:00
|
|
|
if in.AutomountServiceAccountToken != nil {
|
|
|
|
in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-01-28 10:47:06 +01:00
|
|
|
if in.Secrets != nil {
|
|
|
|
in, out := &in.Secrets, &out.Secrets
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.ConfigMaps != nil {
|
|
|
|
in, out := &in.ConfigMaps, &out.ConfigMaps
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.Affinity != nil {
|
|
|
|
in, out := &in.Affinity, &out.Affinity
|
|
|
|
*out = new(corev1.Affinity)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.Tolerations != nil {
|
|
|
|
in, out := &in.Tolerations, &out.Tolerations
|
|
|
|
*out = make([]corev1.Toleration, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.TopologySpreadConstraints != nil {
|
|
|
|
in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints
|
2023-12-07 10:48:27 +00:00
|
|
|
*out = make([]TopologySpreadConstraint, len(*in))
|
2022-01-28 10:47:06 +01:00
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.RemoteWrite != nil {
|
|
|
|
in, out := &in.RemoteWrite, &out.RemoteWrite
|
|
|
|
*out = make([]RemoteWriteSpec, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2024-08-14 22:15:03 +08:00
|
|
|
if in.OTLP != nil {
|
|
|
|
in, out := &in.OTLP, &out.OTLP
|
|
|
|
*out = new(OTLPConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2022-01-28 10:47:06 +01:00
|
|
|
if in.SecurityContext != nil {
|
|
|
|
in, out := &in.SecurityContext, &out.SecurityContext
|
|
|
|
*out = new(corev1.PodSecurityContext)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2024-10-08 18:00:40 +03:00
|
|
|
if in.DNSPolicy != nil {
|
|
|
|
in, out := &in.DNSPolicy, &out.DNSPolicy
|
|
|
|
*out = new(DNSPolicy)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.DNSConfig != nil {
|
|
|
|
in, out := &in.DNSConfig, &out.DNSConfig
|
|
|
|
*out = new(PodDNSConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2022-01-28 10:47:06 +01:00
|
|
|
if in.Containers != nil {
|
|
|
|
in, out := &in.Containers, &out.Containers
|
|
|
|
*out = make([]corev1.Container, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.InitContainers != nil {
|
|
|
|
in, out := &in.InitContainers, &out.InitContainers
|
|
|
|
*out = make([]corev1.Container, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.AdditionalScrapeConfigs != nil {
|
|
|
|
in, out := &in.AdditionalScrapeConfigs, &out.AdditionalScrapeConfigs
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.APIServerConfig != nil {
|
|
|
|
in, out := &in.APIServerConfig, &out.APIServerConfig
|
|
|
|
*out = new(APIServerConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
out.ArbitraryFSAccessThroughSMs = in.ArbitraryFSAccessThroughSMs
|
|
|
|
if in.EnforcedSampleLimit != nil {
|
|
|
|
in, out := &in.EnforcedSampleLimit, &out.EnforcedSampleLimit
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.EnforcedTargetLimit != nil {
|
|
|
|
in, out := &in.EnforcedTargetLimit, &out.EnforcedTargetLimit
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.EnforcedLabelLimit != nil {
|
|
|
|
in, out := &in.EnforcedLabelLimit, &out.EnforcedLabelLimit
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.EnforcedLabelNameLengthLimit != nil {
|
|
|
|
in, out := &in.EnforcedLabelNameLengthLimit, &out.EnforcedLabelNameLengthLimit
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.EnforcedLabelValueLengthLimit != nil {
|
|
|
|
in, out := &in.EnforcedLabelValueLengthLimit, &out.EnforcedLabelValueLengthLimit
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
2023-09-07 22:29:09 +05:30
|
|
|
if in.EnforcedKeepDroppedTargets != nil {
|
|
|
|
in, out := &in.EnforcedKeepDroppedTargets, &out.EnforcedKeepDroppedTargets
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-01-28 10:47:06 +01:00
|
|
|
if in.MinReadySeconds != nil {
|
|
|
|
in, out := &in.MinReadySeconds, &out.MinReadySeconds
|
|
|
|
*out = new(uint32)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-06-02 23:49:32 +08:00
|
|
|
if in.HostAliases != nil {
|
|
|
|
in, out := &in.HostAliases, &out.HostAliases
|
|
|
|
*out = make([]HostAlias, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2022-07-21 12:35:06 +02:00
|
|
|
if in.AdditionalArgs != nil {
|
|
|
|
in, out := &in.AdditionalArgs, &out.AdditionalArgs
|
|
|
|
*out = make([]Argument, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2022-07-25 16:34:57 +02:00
|
|
|
if in.WALCompression != nil {
|
|
|
|
in, out := &in.WALCompression, &out.WALCompression
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.ExcludedFromEnforcement != nil {
|
|
|
|
in, out := &in.ExcludedFromEnforcement, &out.ExcludedFromEnforcement
|
|
|
|
*out = make([]ObjectReference, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2023-01-04 16:52:26 +01:00
|
|
|
if in.PodTargetLabels != nil {
|
|
|
|
in, out := &in.PodTargetLabels, &out.PodTargetLabels
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2023-06-07 15:04:36 +05:30
|
|
|
if in.TracingConfig != nil {
|
|
|
|
in, out := &in.TracingConfig, &out.TracingConfig
|
|
|
|
*out = new(PrometheusTracingConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2023-07-21 23:55:47 +02:00
|
|
|
if in.BodySizeLimit != nil {
|
|
|
|
in, out := &in.BodySizeLimit, &out.BodySizeLimit
|
|
|
|
*out = new(ByteSize)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
2023-09-07 22:29:09 +05:30
|
|
|
if in.KeepDroppedTargets != nil {
|
|
|
|
in, out := &in.KeepDroppedTargets, &out.KeepDroppedTargets
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
2023-06-15 17:39:12 +02:00
|
|
|
if in.ReloadStrategy != nil {
|
|
|
|
in, out := &in.ReloadStrategy, &out.ReloadStrategy
|
|
|
|
*out = new(ReloadStrategyType)
|
|
|
|
**out = **in
|
|
|
|
}
|
2023-12-19 13:12:42 +00:00
|
|
|
if in.MaximumStartupDurationSeconds != nil {
|
|
|
|
in, out := &in.MaximumStartupDurationSeconds, &out.MaximumStartupDurationSeconds
|
|
|
|
*out = new(int32)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-02-23 18:15:16 +00:00
|
|
|
if in.ScrapeClasses != nil {
|
|
|
|
in, out := &in.ScrapeClasses, &out.ScrapeClasses
|
|
|
|
*out = make([]ScrapeClass, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2024-07-25 00:15:52 -07:00
|
|
|
if in.ServiceDiscoveryRole != nil {
|
|
|
|
in, out := &in.ServiceDiscoveryRole, &out.ServiceDiscoveryRole
|
|
|
|
*out = new(ServiceDiscoveryRole)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-08-21 21:46:19 +08:00
|
|
|
if in.TSDB != nil {
|
|
|
|
in, out := &in.TSDB, &out.TSDB
|
|
|
|
*out = new(TSDBSpec)
|
2024-10-09 23:18:18 +08:00
|
|
|
(*in).DeepCopyInto(*out)
|
2024-08-21 21:46:19 +08:00
|
|
|
}
|
2022-01-28 10:47:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonPrometheusFields.
|
|
|
|
func (in *CommonPrometheusFields) DeepCopy() *CommonPrometheusFields {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(CommonPrometheusFields)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2023-01-03 16:08:32 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *Condition) DeepCopyInto(out *Condition) {
|
|
|
|
*out = *in
|
|
|
|
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
|
|
|
|
func (in *Condition) DeepCopy() *Condition {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Condition)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2023-12-07 10:48:27 +00:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *CoreV1TopologySpreadConstraint) DeepCopyInto(out *CoreV1TopologySpreadConstraint) {
|
|
|
|
*out = *in
|
|
|
|
if in.LabelSelector != nil {
|
|
|
|
in, out := &in.LabelSelector, &out.LabelSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.MinDomains != nil {
|
|
|
|
in, out := &in.MinDomains, &out.MinDomains
|
|
|
|
*out = new(int32)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.NodeAffinityPolicy != nil {
|
|
|
|
in, out := &in.NodeAffinityPolicy, &out.NodeAffinityPolicy
|
|
|
|
*out = new(corev1.NodeInclusionPolicy)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.NodeTaintsPolicy != nil {
|
|
|
|
in, out := &in.NodeTaintsPolicy, &out.NodeTaintsPolicy
|
|
|
|
*out = new(corev1.NodeInclusionPolicy)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.MatchLabelKeys != nil {
|
|
|
|
in, out := &in.MatchLabelKeys, &out.MatchLabelKeys
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoreV1TopologySpreadConstraint.
|
|
|
|
func (in *CoreV1TopologySpreadConstraint) DeepCopy() *CoreV1TopologySpreadConstraint {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(CoreV1TopologySpreadConstraint)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2020-04-07 12:12:28 -05:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *EmbeddedObjectMetadata) DeepCopyInto(out *EmbeddedObjectMetadata) {
|
|
|
|
*out = *in
|
|
|
|
if in.Labels != nil {
|
|
|
|
in, out := &in.Labels, &out.Labels
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.Annotations != nil {
|
|
|
|
in, out := &in.Annotations, &out.Annotations
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedObjectMetadata.
|
|
|
|
func (in *EmbeddedObjectMetadata) DeepCopy() *EmbeddedObjectMetadata {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(EmbeddedObjectMetadata)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *EmbeddedPersistentVolumeClaim) DeepCopyInto(out *EmbeddedPersistentVolumeClaim) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
|
|
|
in.EmbeddedObjectMetadata.DeepCopyInto(&out.EmbeddedObjectMetadata)
|
|
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
|
|
|
in.Status.DeepCopyInto(&out.Status)
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedPersistentVolumeClaim.
|
|
|
|
func (in *EmbeddedPersistentVolumeClaim) DeepCopy() *EmbeddedPersistentVolumeClaim {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(EmbeddedPersistentVolumeClaim)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2018-11-26 15:54:08 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *Endpoint) DeepCopyInto(out *Endpoint) {
|
|
|
|
*out = *in
|
|
|
|
if in.TargetPort != nil {
|
|
|
|
in, out := &in.TargetPort, &out.TargetPort
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(intstr.IntOrString)
|
|
|
|
**out = **in
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
if in.Params != nil {
|
|
|
|
in, out := &in.Params, &out.Params
|
|
|
|
*out = make(map[string][]string, len(*in))
|
|
|
|
for key, val := range *in {
|
2018-12-06 00:22:33 -08:00
|
|
|
var outVal []string
|
2018-11-26 15:54:08 +01:00
|
|
|
if val == nil {
|
|
|
|
(*out)[key] = nil
|
|
|
|
} else {
|
2023-11-14 13:44:47 +01:00
|
|
|
inVal := (*in)[key]
|
|
|
|
in, out := &inVal, &outVal
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2018-12-06 00:22:33 -08:00
|
|
|
(*out)[key] = outVal
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(TLSConfig)
|
pkg/prometheus: Enable users to configure bearer token from secret
To configure a bearer token users could only specify a file path in the
service monitor, pointing to a bearer token file in the Prometheus
container. This enables hostile users, being able to configure a service
monitor and controlling the scrape target, to retrieve arbitrary files
in the Prometheus container.
In cases where users can not be trusted, this patch adds an option to
disallow the above file path specification and replaces it by a secret
reference. This secret has to be in the same namespace as the service
monitor, shrinking the attack vector.
pkg/prometheus: Add option to deny file system access through service monitors
ArbitraryFSAccessThroughSMsConfig enables users to configure, whether
a service monitor selected by the Prometheus instance is allowed to use
arbitrary files on the file system of the Prometheus container. This is
the case when e.g. a service monitor specifies a BearerTokenFile in an
endpoint. A malicious user could create a service monitor
selecting arbitrary secret files in the Prometheus container. Those
secrets would then be send with a scrape request by Prometheus to a
malicious target. Denying the above would prevent the attack, users can
instead use the BearerTokenSecret field.
test/basic-auth-test-app: Add mTLS endpoint
pkg/prometheus: Enable users to configure tls from secret
pkg/prometheus/operator: Validate TLS configs before retrieving assets
Before retrieving TLS assets from Kubernetes secrets for a given service
monitor, make sure the user did not specify both file and secret
reference, e.g. both `CAFile` and `CASecret`.
test: Rename basic-auth-test-app to instrumented-sample-app
Given that the basic-auth-test-app not only supports basic auth, but
also bearer token as well as tls authentication, this patch renames the
app to a more generic name.
test/e2e/prometheus_test: Test ArbitraryFSAccessThroughSM option for tls
The Prometheus custom resource has the option to disable arbitrary
filesystem access configured through service monitors. This commit adds
an end-to-end test for this option in combination with the TLS
configuration via files or secret references in service monitors.
pkg/prometheus/operator: Move check for arbitrary fs access into func
2019-03-18 15:56:38 +01:00
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2023-08-20 19:02:44 +01:00
|
|
|
if in.BearerTokenSecret != nil {
|
|
|
|
in, out := &in.BearerTokenSecret, &out.BearerTokenSecret
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2021-07-13 09:47:29 +02:00
|
|
|
if in.Authorization != nil {
|
|
|
|
in, out := &in.Authorization, &out.Authorization
|
|
|
|
*out = new(SafeAuthorization)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2019-10-21 10:46:34 +02:00
|
|
|
if in.HonorTimestamps != nil {
|
|
|
|
in, out := &in.HonorTimestamps, &out.HonorTimestamps
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2023-11-22 21:44:09 +08:00
|
|
|
if in.TrackTimestampsStaleness != nil {
|
|
|
|
in, out := &in.TrackTimestampsStaleness, &out.TrackTimestampsStaleness
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.BasicAuth != nil {
|
|
|
|
in, out := &in.BasicAuth, &out.BasicAuth
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(BasicAuth)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2021-07-16 09:14:07 +02:00
|
|
|
if in.OAuth2 != nil {
|
|
|
|
in, out := &in.OAuth2, &out.OAuth2
|
|
|
|
*out = new(OAuth2)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.MetricRelabelConfigs != nil {
|
|
|
|
in, out := &in.MetricRelabelConfigs, &out.MetricRelabelConfigs
|
2024-04-29 23:17:37 +05:30
|
|
|
*out = make([]RelabelConfig, len(*in))
|
2018-11-26 15:54:08 +01:00
|
|
|
for i := range *in {
|
2024-04-29 23:17:37 +05:30
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.RelabelConfigs != nil {
|
|
|
|
in, out := &in.RelabelConfigs, &out.RelabelConfigs
|
2024-04-29 23:17:37 +05:30
|
|
|
*out = make([]RelabelConfig, len(*in))
|
2018-11-26 15:54:08 +01:00
|
|
|
for i := range *in {
|
2024-04-29 23:17:37 +05:30
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.ProxyURL != nil {
|
|
|
|
in, out := &in.ProxyURL, &out.ProxyURL
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2022-02-10 17:38:12 +01:00
|
|
|
if in.FollowRedirects != nil {
|
|
|
|
in, out := &in.FollowRedirects, &out.FollowRedirects
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-07-07 15:07:44 +02:00
|
|
|
if in.EnableHttp2 != nil {
|
|
|
|
in, out := &in.EnableHttp2, &out.EnableHttp2
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-11-14 15:50:53 +00:00
|
|
|
if in.FilterRunning != nil {
|
|
|
|
in, out := &in.FilterRunning, &out.FilterRunning
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.
|
|
|
|
func (in *Endpoint) DeepCopy() *Endpoint {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Endpoint)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-06-28 15:12:23 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *Exemplars) DeepCopyInto(out *Exemplars) {
|
|
|
|
*out = *in
|
|
|
|
if in.MaxSize != nil {
|
|
|
|
in, out := &in.MaxSize, &out.MaxSize
|
|
|
|
*out = new(int64)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exemplars.
|
|
|
|
func (in *Exemplars) DeepCopy() *Exemplars {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Exemplars)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2023-06-15 21:05:54 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *GlobalSMTPConfig) DeepCopyInto(out *GlobalSMTPConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.From != nil {
|
|
|
|
in, out := &in.From, &out.From
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.SmartHost != nil {
|
|
|
|
in, out := &in.SmartHost, &out.SmartHost
|
|
|
|
*out = new(HostPort)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.Hello != nil {
|
|
|
|
in, out := &in.Hello, &out.Hello
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.AuthUsername != nil {
|
|
|
|
in, out := &in.AuthUsername, &out.AuthUsername
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.AuthPassword != nil {
|
|
|
|
in, out := &in.AuthPassword, &out.AuthPassword
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.AuthIdentity != nil {
|
|
|
|
in, out := &in.AuthIdentity, &out.AuthIdentity
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.AuthSecret != nil {
|
|
|
|
in, out := &in.AuthSecret, &out.AuthSecret
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.RequireTLS != nil {
|
|
|
|
in, out := &in.RequireTLS, &out.RequireTLS
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalSMTPConfig.
|
|
|
|
func (in *GlobalSMTPConfig) DeepCopy() *GlobalSMTPConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(GlobalSMTPConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-07-21 18:33:56 +08:00
|
|
|
// 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
|
|
|
|
if in.Authorization != nil {
|
|
|
|
in, out := &in.Authorization, &out.Authorization
|
|
|
|
*out = new(SafeAuthorization)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.BasicAuth != nil {
|
|
|
|
in, out := &in.BasicAuth, &out.BasicAuth
|
|
|
|
*out = new(BasicAuth)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.OAuth2 != nil {
|
|
|
|
in, out := &in.OAuth2, &out.OAuth2
|
|
|
|
*out = new(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(SafeTLSConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2024-09-10 23:24:21 +08:00
|
|
|
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
|
2022-07-21 18:33:56 +08:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2022-06-02 23:49:32 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *HostAlias) DeepCopyInto(out *HostAlias) {
|
|
|
|
*out = *in
|
|
|
|
if in.Hostnames != nil {
|
|
|
|
in, out := &in.Hostnames, &out.Hostnames
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostAlias.
|
|
|
|
func (in *HostAlias) DeepCopy() *HostAlias {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(HostAlias)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2023-06-15 21:05:54 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *HostPort) DeepCopyInto(out *HostPort) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPort.
|
|
|
|
func (in *HostPort) DeepCopy() *HostPort {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(HostPort)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2023-09-22 11:45:13 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ManagedIdentity) DeepCopyInto(out *ManagedIdentity) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedIdentity.
|
|
|
|
func (in *ManagedIdentity) DeepCopy() *ManagedIdentity {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ManagedIdentity)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2021-03-17 00:59:29 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *MetadataConfig) DeepCopyInto(out *MetadataConfig) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataConfig.
|
|
|
|
func (in *MetadataConfig) DeepCopy() *MetadataConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(MetadataConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2018-11-26 15:54:08 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector) {
|
|
|
|
*out = *in
|
|
|
|
if in.MatchNames != nil {
|
|
|
|
in, out := &in.MatchNames, &out.MatchNames
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelector.
|
|
|
|
func (in *NamespaceSelector) DeepCopy() *NamespaceSelector {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(NamespaceSelector)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2024-10-21 23:38:11 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *NativeHistogramConfig) DeepCopyInto(out *NativeHistogramConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.ScrapeClassicHistograms != nil {
|
|
|
|
in, out := &in.ScrapeClassicHistograms, &out.ScrapeClassicHistograms
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.NativeHistogramBucketLimit != nil {
|
|
|
|
in, out := &in.NativeHistogramBucketLimit, &out.NativeHistogramBucketLimit
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.NativeHistogramMinBucketFactor != nil {
|
|
|
|
in, out := &in.NativeHistogramMinBucketFactor, &out.NativeHistogramMinBucketFactor
|
|
|
|
x := (*in).DeepCopy()
|
|
|
|
*out = &x
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NativeHistogramConfig.
|
|
|
|
func (in *NativeHistogramConfig) DeepCopy() *NativeHistogramConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(NativeHistogramConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2021-06-21 12:09:41 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *OAuth2) DeepCopyInto(out *OAuth2) {
|
|
|
|
*out = *in
|
|
|
|
in.ClientID.DeepCopyInto(&out.ClientID)
|
|
|
|
in.ClientSecret.DeepCopyInto(&out.ClientSecret)
|
|
|
|
if in.Scopes != nil {
|
|
|
|
in, out := &in.Scopes, &out.Scopes
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.EndpointParams != nil {
|
|
|
|
in, out := &in.EndpointParams, &out.EndpointParams
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
2024-08-08 17:15:23 +08:00
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
|
|
|
*out = new(SafeTLSConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
|
2021-06-21 12:09:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2.
|
|
|
|
func (in *OAuth2) DeepCopy() *OAuth2 {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(OAuth2)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *OAuth2ValidationError) DeepCopyInto(out *OAuth2ValidationError) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2ValidationError.
|
|
|
|
func (in *OAuth2ValidationError) DeepCopy() *OAuth2ValidationError {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(OAuth2ValidationError)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2024-08-14 22:15:03 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *OTLPConfig) DeepCopyInto(out *OTLPConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.PromoteResourceAttributes != nil {
|
|
|
|
in, out := &in.PromoteResourceAttributes, &out.PromoteResourceAttributes
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OTLPConfig.
|
|
|
|
func (in *OTLPConfig) DeepCopy() *OTLPConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(OTLPConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-03-24 16:49:54 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ObjectReference) DeepCopyInto(out *ObjectReference) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.
|
|
|
|
func (in *ObjectReference) DeepCopy() *ObjectReference {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ObjectReference)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2024-10-08 18:00:40 +03:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PodDNSConfig) DeepCopyInto(out *PodDNSConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.Nameservers != nil {
|
|
|
|
in, out := &in.Nameservers, &out.Nameservers
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.Searches != nil {
|
|
|
|
in, out := &in.Searches, &out.Searches
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.Options != nil {
|
|
|
|
in, out := &in.Options, &out.Options
|
|
|
|
*out = make([]PodDNSConfigOption, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfig.
|
|
|
|
func (in *PodDNSConfig) DeepCopy() *PodDNSConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PodDNSConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PodDNSConfigOption) DeepCopyInto(out *PodDNSConfigOption) {
|
|
|
|
*out = *in
|
|
|
|
if in.Value != nil {
|
|
|
|
in, out := &in.Value, &out.Value
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfigOption.
|
|
|
|
func (in *PodDNSConfigOption) DeepCopy() *PodDNSConfigOption {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PodDNSConfigOption)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2019-04-30 10:49:04 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PodMetricsEndpoint) DeepCopyInto(out *PodMetricsEndpoint) {
|
|
|
|
*out = *in
|
|
|
|
if in.TargetPort != nil {
|
|
|
|
in, out := &in.TargetPort, &out.TargetPort
|
|
|
|
*out = new(intstr.IntOrString)
|
|
|
|
**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 {
|
2023-11-14 13:44:47 +01:00
|
|
|
inVal := (*in)[key]
|
|
|
|
in, out := &inVal, &outVal
|
2019-04-30 10:49:04 +02:00
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
(*out)[key] = outVal
|
|
|
|
}
|
|
|
|
}
|
2020-07-27 17:54:34 +02:00
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
2024-03-13 21:04:08 +00:00
|
|
|
*out = new(SafeTLSConfig)
|
2020-07-27 17:54:34 +02:00
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
in.BearerTokenSecret.DeepCopyInto(&out.BearerTokenSecret)
|
2019-10-21 10:46:34 +02:00
|
|
|
if in.HonorTimestamps != nil {
|
|
|
|
in, out := &in.HonorTimestamps, &out.HonorTimestamps
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2023-11-22 21:44:09 +08:00
|
|
|
if in.TrackTimestampsStaleness != nil {
|
|
|
|
in, out := &in.TrackTimestampsStaleness, &out.TrackTimestampsStaleness
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2020-07-27 17:54:34 +02:00
|
|
|
if in.BasicAuth != nil {
|
|
|
|
in, out := &in.BasicAuth, &out.BasicAuth
|
|
|
|
*out = new(BasicAuth)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2021-07-16 09:14:07 +02:00
|
|
|
if in.OAuth2 != nil {
|
|
|
|
in, out := &in.OAuth2, &out.OAuth2
|
|
|
|
*out = new(OAuth2)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2021-07-13 09:47:29 +02:00
|
|
|
if in.Authorization != nil {
|
|
|
|
in, out := &in.Authorization, &out.Authorization
|
|
|
|
*out = new(SafeAuthorization)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2019-04-30 10:49:04 +02:00
|
|
|
if in.MetricRelabelConfigs != nil {
|
|
|
|
in, out := &in.MetricRelabelConfigs, &out.MetricRelabelConfigs
|
2024-04-29 23:17:37 +05:30
|
|
|
*out = make([]RelabelConfig, len(*in))
|
2019-04-30 10:49:04 +02:00
|
|
|
for i := range *in {
|
2024-04-29 23:17:37 +05:30
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
2019-04-30 10:49:04 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.RelabelConfigs != nil {
|
|
|
|
in, out := &in.RelabelConfigs, &out.RelabelConfigs
|
2024-04-29 23:17:37 +05:30
|
|
|
*out = make([]RelabelConfig, len(*in))
|
2019-04-30 10:49:04 +02:00
|
|
|
for i := range *in {
|
2024-04-29 23:17:37 +05:30
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
2019-04-30 10:49:04 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.ProxyURL != nil {
|
|
|
|
in, out := &in.ProxyURL, &out.ProxyURL
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-02-10 17:38:12 +01:00
|
|
|
if in.FollowRedirects != nil {
|
|
|
|
in, out := &in.FollowRedirects, &out.FollowRedirects
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-07-07 15:07:44 +02:00
|
|
|
if in.EnableHttp2 != nil {
|
|
|
|
in, out := &in.EnableHttp2, &out.EnableHttp2
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
2022-09-28 18:39:29 +02:00
|
|
|
}
|
|
|
|
if in.FilterRunning != nil {
|
|
|
|
in, out := &in.FilterRunning, &out.FilterRunning
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
2022-07-07 15:07:44 +02:00
|
|
|
}
|
2019-04-30 10:49:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMetricsEndpoint.
|
|
|
|
func (in *PodMetricsEndpoint) DeepCopy() *PodMetricsEndpoint {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PodMetricsEndpoint)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2019-04-15 13:56:27 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PodMonitor) DeepCopyInto(out *PodMonitor) {
|
|
|
|
*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 PodMonitor.
|
|
|
|
func (in *PodMonitor) DeepCopy() *PodMonitor {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PodMonitor)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PodMonitorList) DeepCopyInto(out *PodMonitorList) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
2019-06-20 15:02:10 -07:00
|
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
2019-04-15 13:56:27 +02:00
|
|
|
if in.Items != nil {
|
|
|
|
in, out := &in.Items, &out.Items
|
|
|
|
*out = make([]*PodMonitor, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
if (*in)[i] != nil {
|
|
|
|
in, out := &(*in)[i], &(*out)[i]
|
|
|
|
*out = new(PodMonitor)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitorList.
|
|
|
|
func (in *PodMonitorList) DeepCopy() *PodMonitorList {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PodMonitorList)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PodMonitorSpec) DeepCopyInto(out *PodMonitorSpec) {
|
|
|
|
*out = *in
|
|
|
|
if in.PodTargetLabels != nil {
|
|
|
|
in, out := &in.PodTargetLabels, &out.PodTargetLabels
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2019-04-30 10:49:04 +02:00
|
|
|
if in.PodMetricsEndpoints != nil {
|
|
|
|
in, out := &in.PodMetricsEndpoints, &out.PodMetricsEndpoints
|
|
|
|
*out = make([]PodMetricsEndpoint, len(*in))
|
2019-04-15 13:56:27 +02:00
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
in.Selector.DeepCopyInto(&out.Selector)
|
|
|
|
in.NamespaceSelector.DeepCopyInto(&out.NamespaceSelector)
|
2023-06-15 22:35:06 +09:30
|
|
|
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
|
|
|
|
}
|
2024-01-31 17:04:31 +08:00
|
|
|
if in.ScrapeProtocols != nil {
|
|
|
|
in, out := &in.ScrapeProtocols, &out.ScrapeProtocols
|
|
|
|
*out = make([]ScrapeProtocol, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2023-06-15 22:35:06 +09:30
|
|
|
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
|
|
|
|
}
|
2024-10-21 23:38:11 +08:00
|
|
|
in.NativeHistogramConfig.DeepCopyInto(&out.NativeHistogramConfig)
|
2023-09-07 22:29:09 +05:30
|
|
|
if in.KeepDroppedTargets != nil {
|
|
|
|
in, out := &in.KeepDroppedTargets, &out.KeepDroppedTargets
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-05-23 17:07:36 +08:00
|
|
|
if in.AttachMetadata != nil {
|
|
|
|
in, out := &in.AttachMetadata, &out.AttachMetadata
|
|
|
|
*out = new(AttachMetadata)
|
2023-11-16 16:16:24 +01:00
|
|
|
(*in).DeepCopyInto(*out)
|
2022-05-23 17:07:36 +08:00
|
|
|
}
|
2024-02-23 18:15:16 +00:00
|
|
|
if in.ScrapeClassName != nil {
|
|
|
|
in, out := &in.ScrapeClassName, &out.ScrapeClassName
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-03-12 13:28:31 +03:30
|
|
|
if in.BodySizeLimit != nil {
|
|
|
|
in, out := &in.BodySizeLimit, &out.BodySizeLimit
|
|
|
|
*out = new(ByteSize)
|
|
|
|
**out = **in
|
|
|
|
}
|
2019-04-15 13:56:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitorSpec.
|
|
|
|
func (in *PodMonitorSpec) DeepCopy() *PodMonitorSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PodMonitorSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2020-06-27 20:17:46 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *Probe) DeepCopyInto(out *Probe) {
|
|
|
|
*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 Probe.
|
|
|
|
func (in *Probe) DeepCopy() *Probe {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Probe)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ProbeList) DeepCopyInto(out *ProbeList) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
|
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
|
|
if in.Items != nil {
|
|
|
|
in, out := &in.Items, &out.Items
|
|
|
|
*out = make([]*Probe, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
if (*in)[i] != nil {
|
|
|
|
in, out := &(*in)[i], &(*out)[i]
|
|
|
|
*out = new(Probe)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeList.
|
|
|
|
func (in *ProbeList) DeepCopy() *ProbeList {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ProbeList)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ProbeSpec) DeepCopyInto(out *ProbeSpec) {
|
|
|
|
*out = *in
|
|
|
|
out.ProberSpec = in.ProberSpec
|
|
|
|
in.Targets.DeepCopyInto(&out.Targets)
|
2021-03-11 17:08:52 +08:00
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
2024-03-13 21:04:08 +00:00
|
|
|
*out = new(SafeTLSConfig)
|
2021-03-11 17:08:52 +08:00
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
in.BearerTokenSecret.DeepCopyInto(&out.BearerTokenSecret)
|
|
|
|
if in.BasicAuth != nil {
|
|
|
|
in, out := &in.BasicAuth, &out.BasicAuth
|
|
|
|
*out = new(BasicAuth)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2021-07-16 09:14:07 +02:00
|
|
|
if in.OAuth2 != nil {
|
|
|
|
in, out := &in.OAuth2, &out.OAuth2
|
|
|
|
*out = new(OAuth2)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2021-08-21 12:02:07 +01:00
|
|
|
if in.MetricRelabelConfigs != nil {
|
|
|
|
in, out := &in.MetricRelabelConfigs, &out.MetricRelabelConfigs
|
2024-04-29 23:17:37 +05:30
|
|
|
*out = make([]RelabelConfig, len(*in))
|
2021-08-21 12:02:07 +01:00
|
|
|
for i := range *in {
|
2024-04-29 23:17:37 +05:30
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
2021-08-21 12:02:07 +01:00
|
|
|
}
|
|
|
|
}
|
2021-07-13 09:47:29 +02:00
|
|
|
if in.Authorization != nil {
|
|
|
|
in, out := &in.Authorization, &out.Authorization
|
|
|
|
*out = new(SafeAuthorization)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2023-06-15 22:35:06 +09:30
|
|
|
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
|
|
|
|
}
|
2024-01-31 17:04:31 +08:00
|
|
|
if in.ScrapeProtocols != nil {
|
|
|
|
in, out := &in.ScrapeProtocols, &out.ScrapeProtocols
|
|
|
|
*out = make([]ScrapeProtocol, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2023-06-15 22:35:06 +09:30
|
|
|
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
|
|
|
|
}
|
2024-10-21 23:38:11 +08:00
|
|
|
in.NativeHistogramConfig.DeepCopyInto(&out.NativeHistogramConfig)
|
2023-09-07 22:29:09 +05:30
|
|
|
if in.KeepDroppedTargets != nil {
|
|
|
|
in, out := &in.KeepDroppedTargets, &out.KeepDroppedTargets
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-02-23 18:15:16 +00:00
|
|
|
if in.ScrapeClassName != nil {
|
|
|
|
in, out := &in.ScrapeClassName, &out.ScrapeClassName
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2020-06-27 20:17:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeSpec.
|
|
|
|
func (in *ProbeSpec) DeepCopy() *ProbeSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ProbeSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ProbeTargetIngress) DeepCopyInto(out *ProbeTargetIngress) {
|
|
|
|
*out = *in
|
|
|
|
in.Selector.DeepCopyInto(&out.Selector)
|
|
|
|
in.NamespaceSelector.DeepCopyInto(&out.NamespaceSelector)
|
|
|
|
if in.RelabelConfigs != nil {
|
|
|
|
in, out := &in.RelabelConfigs, &out.RelabelConfigs
|
2024-04-29 23:17:37 +05:30
|
|
|
*out = make([]RelabelConfig, len(*in))
|
2020-06-27 20:17:46 +02:00
|
|
|
for i := range *in {
|
2024-04-29 23:17:37 +05:30
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
2020-06-27 20:17:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeTargetIngress.
|
|
|
|
func (in *ProbeTargetIngress) DeepCopy() *ProbeTargetIngress {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ProbeTargetIngress)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ProbeTargetStaticConfig) DeepCopyInto(out *ProbeTargetStaticConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.Targets != nil {
|
|
|
|
in, out := &in.Targets, &out.Targets
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.Labels != nil {
|
|
|
|
in, out := &in.Labels, &out.Labels
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
2021-01-26 10:46:07 +01:00
|
|
|
if in.RelabelConfigs != nil {
|
|
|
|
in, out := &in.RelabelConfigs, &out.RelabelConfigs
|
2024-04-29 23:17:37 +05:30
|
|
|
*out = make([]RelabelConfig, len(*in))
|
2021-01-26 10:46:07 +01:00
|
|
|
for i := range *in {
|
2024-04-29 23:17:37 +05:30
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
2021-01-26 10:46:07 +01:00
|
|
|
}
|
|
|
|
}
|
2020-06-27 20:17:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeTargetStaticConfig.
|
|
|
|
func (in *ProbeTargetStaticConfig) DeepCopy() *ProbeTargetStaticConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ProbeTargetStaticConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ProbeTargets) DeepCopyInto(out *ProbeTargets) {
|
|
|
|
*out = *in
|
|
|
|
if in.StaticConfig != nil {
|
|
|
|
in, out := &in.StaticConfig, &out.StaticConfig
|
|
|
|
*out = new(ProbeTargetStaticConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.Ingress != nil {
|
|
|
|
in, out := &in.Ingress, &out.Ingress
|
|
|
|
*out = new(ProbeTargetIngress)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeTargets.
|
|
|
|
func (in *ProbeTargets) DeepCopy() *ProbeTargets {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ProbeTargets)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
2022-02-01 17:38:26 +08:00
|
|
|
func (in *ProbeTargetsValidationError) DeepCopyInto(out *ProbeTargetsValidationError) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeTargetsValidationError.
|
|
|
|
func (in *ProbeTargetsValidationError) DeepCopy() *ProbeTargetsValidationError {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ProbeTargetsValidationError)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
2020-06-27 20:17:46 +02:00
|
|
|
func (in *ProberSpec) DeepCopyInto(out *ProberSpec) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProberSpec.
|
|
|
|
func (in *ProberSpec) DeepCopy() *ProberSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ProberSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2018-11-26 15:54:08 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *Prometheus) DeepCopyInto(out *Prometheus) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
|
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
2022-04-13 16:08:56 +02:00
|
|
|
in.Status.DeepCopyInto(&out.Status)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Prometheus.
|
|
|
|
func (in *Prometheus) DeepCopy() *Prometheus {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Prometheus)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PrometheusList) DeepCopyInto(out *PrometheusList) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
2019-06-20 15:02:10 -07:00
|
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.Items != nil {
|
|
|
|
in, out := &in.Items, &out.Items
|
|
|
|
*out = make([]*Prometheus, len(*in))
|
|
|
|
for i := range *in {
|
2018-12-06 00:22:33 -08:00
|
|
|
if (*in)[i] != nil {
|
|
|
|
in, out := &(*in)[i], &(*out)[i]
|
|
|
|
*out = new(Prometheus)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusList.
|
|
|
|
func (in *PrometheusList) DeepCopy() *PrometheusList {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PrometheusList)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PrometheusRule) DeepCopyInto(out *PrometheusRule) {
|
|
|
|
*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 PrometheusRule.
|
|
|
|
func (in *PrometheusRule) DeepCopy() *PrometheusRule {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PrometheusRule)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2020-05-20 15:55:05 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PrometheusRuleExcludeConfig) DeepCopyInto(out *PrometheusRuleExcludeConfig) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRuleExcludeConfig.
|
|
|
|
func (in *PrometheusRuleExcludeConfig) DeepCopy() *PrometheusRuleExcludeConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PrometheusRuleExcludeConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2018-11-26 15:54:08 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PrometheusRuleList) DeepCopyInto(out *PrometheusRuleList) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
2019-06-20 15:02:10 -07:00
|
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.Items != nil {
|
|
|
|
in, out := &in.Items, &out.Items
|
|
|
|
*out = make([]*PrometheusRule, len(*in))
|
|
|
|
for i := range *in {
|
2018-12-06 00:22:33 -08:00
|
|
|
if (*in)[i] != nil {
|
|
|
|
in, out := &(*in)[i], &(*out)[i]
|
|
|
|
*out = new(PrometheusRule)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRuleList.
|
|
|
|
func (in *PrometheusRuleList) DeepCopy() *PrometheusRuleList {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PrometheusRuleList)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PrometheusRuleSpec) DeepCopyInto(out *PrometheusRuleSpec) {
|
|
|
|
*out = *in
|
|
|
|
if in.Groups != nil {
|
|
|
|
in, out := &in.Groups, &out.Groups
|
|
|
|
*out = make([]RuleGroup, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRuleSpec.
|
|
|
|
func (in *PrometheusRuleSpec) DeepCopy() *PrometheusRuleSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PrometheusRuleSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PrometheusSpec) DeepCopyInto(out *PrometheusSpec) {
|
|
|
|
*out = *in
|
2022-01-28 10:47:06 +01:00
|
|
|
in.CommonPrometheusFields.DeepCopyInto(&out.CommonPrometheusFields)
|
2024-10-04 12:20:09 +05:30
|
|
|
if in.Runtime != nil {
|
|
|
|
in, out := &in.Runtime, &out.Runtime
|
|
|
|
*out = new(RuntimeConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2019-01-07 23:43:13 +03:00
|
|
|
out.Rules = in.Rules
|
2022-01-28 10:47:06 +01:00
|
|
|
if in.PrometheusRulesExcludedFromEnforce != nil {
|
|
|
|
in, out := &in.PrometheusRulesExcludedFromEnforce, &out.PrometheusRulesExcludedFromEnforce
|
|
|
|
*out = make([]PrometheusRuleExcludeConfig, len(*in))
|
2021-03-01 12:18:53 +01:00
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.RuleSelector != nil {
|
|
|
|
in, out := &in.RuleSelector, &out.RuleSelector
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
if in.RuleNamespaceSelector != nil {
|
|
|
|
in, out := &in.RuleNamespaceSelector, &out.RuleNamespaceSelector
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2023-06-13 15:48:42 +02:00
|
|
|
if in.Query != nil {
|
|
|
|
in, out := &in.Query, &out.Query
|
|
|
|
*out = new(QuerySpec)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.Alerting != nil {
|
|
|
|
in, out := &in.Alerting, &out.Alerting
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(AlertingSpec)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
if in.AdditionalAlertRelabelConfigs != nil {
|
|
|
|
in, out := &in.AdditionalAlertRelabelConfigs, &out.AdditionalAlertRelabelConfigs
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
if in.AdditionalAlertManagerConfigs != nil {
|
|
|
|
in, out := &in.AdditionalAlertManagerConfigs, &out.AdditionalAlertManagerConfigs
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2023-06-13 15:48:42 +02:00
|
|
|
if in.RemoteRead != nil {
|
|
|
|
in, out := &in.RemoteRead, &out.RemoteRead
|
|
|
|
*out = make([]RemoteReadSpec, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.Thanos != nil {
|
|
|
|
in, out := &in.Thanos, &out.Thanos
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(ThanosSpec)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2022-06-28 15:12:23 +02:00
|
|
|
if in.Exemplars != nil {
|
|
|
|
in, out := &in.Exemplars, &out.Exemplars
|
|
|
|
*out = new(Exemplars)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2024-09-22 19:03:52 +03:00
|
|
|
if in.RuleQueryOffset != nil {
|
|
|
|
in, out := &in.RuleQueryOffset, &out.RuleQueryOffset
|
|
|
|
*out = new(Duration)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusSpec.
|
|
|
|
func (in *PrometheusSpec) DeepCopy() *PrometheusSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PrometheusSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PrometheusStatus) DeepCopyInto(out *PrometheusStatus) {
|
|
|
|
*out = *in
|
2022-04-13 16:08:56 +02:00
|
|
|
if in.Conditions != nil {
|
|
|
|
in, out := &in.Conditions, &out.Conditions
|
2023-01-03 16:08:32 +01:00
|
|
|
*out = make([]Condition, len(*in))
|
2022-04-13 16:08:56 +02:00
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.ShardStatuses != nil {
|
|
|
|
in, out := &in.ShardStatuses, &out.ShardStatuses
|
|
|
|
*out = make([]ShardStatus, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusStatus.
|
|
|
|
func (in *PrometheusStatus) DeepCopy() *PrometheusStatus {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PrometheusStatus)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2023-05-26 13:00:38 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PrometheusTracingConfig) DeepCopyInto(out *PrometheusTracingConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.ClientType != nil {
|
|
|
|
in, out := &in.ClientType, &out.ClientType
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.SamplingFraction != nil {
|
|
|
|
in, out := &in.SamplingFraction, &out.SamplingFraction
|
|
|
|
x := (*in).DeepCopy()
|
|
|
|
*out = &x
|
|
|
|
}
|
|
|
|
if in.Insecure != nil {
|
|
|
|
in, out := &in.Insecure, &out.Insecure
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.Headers != nil {
|
|
|
|
in, out := &in.Headers, &out.Headers
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.Compression != nil {
|
|
|
|
in, out := &in.Compression, &out.Compression
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.Timeout != nil {
|
|
|
|
in, out := &in.Timeout, &out.Timeout
|
|
|
|
*out = new(Duration)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
|
|
|
*out = new(TLSConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusTracingConfig.
|
|
|
|
func (in *PrometheusTracingConfig) DeepCopy() *PrometheusTracingConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PrometheusTracingConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-07-05 16:31:59 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *PrometheusWebSpec) DeepCopyInto(out *PrometheusWebSpec) {
|
|
|
|
*out = *in
|
2022-07-21 18:16:28 +08:00
|
|
|
in.WebConfigFileFields.DeepCopyInto(&out.WebConfigFileFields)
|
2022-07-05 16:31:59 +08:00
|
|
|
if in.PageTitle != nil {
|
|
|
|
in, out := &in.PageTitle, &out.PageTitle
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2023-01-09 16:52:54 +01:00
|
|
|
if in.MaxConnections != nil {
|
|
|
|
in, out := &in.MaxConnections, &out.MaxConnections
|
|
|
|
*out = new(int32)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-07-05 16:31:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusWebSpec.
|
|
|
|
func (in *PrometheusWebSpec) DeepCopy() *PrometheusWebSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(PrometheusWebSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
2024-02-26 10:35:31 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.ProxyURL != nil {
|
|
|
|
in, out := &in.ProxyURL, &out.ProxyURL
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.NoProxy != nil {
|
|
|
|
in, out := &in.NoProxy, &out.NoProxy
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.ProxyFromEnvironment != nil {
|
|
|
|
in, out := &in.ProxyFromEnvironment, &out.ProxyFromEnvironment
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.ProxyConnectHeader != nil {
|
|
|
|
in, out := &in.ProxyConnectHeader, &out.ProxyConnectHeader
|
2024-05-14 20:52:02 +08:00
|
|
|
*out = make(map[string][]corev1.SecretKeySelector, len(*in))
|
2024-02-26 10:35:31 +05:30
|
|
|
for key, val := range *in {
|
2024-05-14 20:52:02 +08:00
|
|
|
var outVal []corev1.SecretKeySelector
|
|
|
|
if val == nil {
|
|
|
|
(*out)[key] = nil
|
|
|
|
} else {
|
|
|
|
inVal := (*in)[key]
|
|
|
|
in, out := &inVal, &outVal
|
|
|
|
*out = make([]corev1.SecretKeySelector, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(*out)[key] = outVal
|
2024-02-26 10:35:31 +05:30
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig.
|
|
|
|
func (in *ProxyConfig) DeepCopy() *ProxyConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ProxyConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
2022-07-05 16:31:59 +08:00
|
|
|
}
|
|
|
|
|
2018-12-04 19:31:43 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *QuerySpec) DeepCopyInto(out *QuerySpec) {
|
|
|
|
*out = *in
|
|
|
|
if in.LookbackDelta != nil {
|
|
|
|
in, out := &in.LookbackDelta, &out.LookbackDelta
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
2018-12-04 19:31:43 +08:00
|
|
|
}
|
|
|
|
if in.MaxConcurrency != nil {
|
|
|
|
in, out := &in.MaxConcurrency, &out.MaxConcurrency
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(int32)
|
|
|
|
**out = **in
|
2018-12-04 19:31:43 +08:00
|
|
|
}
|
2019-03-25 15:00:09 -07:00
|
|
|
if in.MaxSamples != nil {
|
|
|
|
in, out := &in.MaxSamples, &out.MaxSamples
|
|
|
|
*out = new(int32)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-12-04 19:31:43 +08:00
|
|
|
if in.Timeout != nil {
|
|
|
|
in, out := &in.Timeout, &out.Timeout
|
2022-04-15 20:41:45 +05:30
|
|
|
*out = new(Duration)
|
2018-12-06 00:22:33 -08:00
|
|
|
**out = **in
|
2018-12-04 19:31:43 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuerySpec.
|
|
|
|
func (in *QuerySpec) DeepCopy() *QuerySpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(QuerySpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2018-11-26 15:54:08 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *QueueConfig) DeepCopyInto(out *QueueConfig) {
|
|
|
|
*out = *in
|
2024-03-04 23:27:24 +08:00
|
|
|
if in.BatchSendDeadline != nil {
|
|
|
|
in, out := &in.BatchSendDeadline, &out.BatchSendDeadline
|
|
|
|
*out = new(Duration)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.MinBackoff != nil {
|
|
|
|
in, out := &in.MinBackoff, &out.MinBackoff
|
|
|
|
*out = new(Duration)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.MaxBackoff != nil {
|
|
|
|
in, out := &in.MaxBackoff, &out.MaxBackoff
|
|
|
|
*out = new(Duration)
|
2024-03-12 04:38:22 +08:00
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.SampleAgeLimit != nil {
|
|
|
|
in, out := &in.SampleAgeLimit, &out.SampleAgeLimit
|
|
|
|
*out = new(Duration)
|
2024-03-04 23:27:24 +08:00
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueConfig.
|
|
|
|
func (in *QueueConfig) DeepCopy() *QueueConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(QueueConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *RelabelConfig) DeepCopyInto(out *RelabelConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.SourceLabels != nil {
|
|
|
|
in, out := &in.SourceLabels, &out.SourceLabels
|
2022-02-14 20:58:41 +05:30
|
|
|
*out = make([]LabelName, len(*in))
|
2018-11-26 15:54:08 +01:00
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2024-04-03 17:37:47 +07:00
|
|
|
if in.Separator != nil {
|
|
|
|
in, out := &in.Separator, &out.Separator
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-04-15 13:46:15 +05:30
|
|
|
if in.Replacement != nil {
|
|
|
|
in, out := &in.Replacement, &out.Replacement
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RelabelConfig.
|
|
|
|
func (in *RelabelConfig) DeepCopy() *RelabelConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(RelabelConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *RemoteReadSpec) DeepCopyInto(out *RemoteReadSpec) {
|
|
|
|
*out = *in
|
|
|
|
if in.RequiredMatchers != nil {
|
|
|
|
in, out := &in.RequiredMatchers, &out.RequiredMatchers
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
2021-10-08 16:22:04 +02:00
|
|
|
if in.Headers != nil {
|
|
|
|
in, out := &in.Headers, &out.Headers
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
2021-06-21 12:09:41 +02:00
|
|
|
if in.OAuth2 != nil {
|
|
|
|
in, out := &in.OAuth2, &out.OAuth2
|
|
|
|
*out = new(OAuth2)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2023-06-13 15:48:42 +02:00
|
|
|
if in.BasicAuth != nil {
|
|
|
|
in, out := &in.BasicAuth, &out.BasicAuth
|
|
|
|
*out = new(BasicAuth)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2021-07-13 09:47:29 +02:00
|
|
|
if in.Authorization != nil {
|
|
|
|
in, out := &in.Authorization, &out.Authorization
|
|
|
|
*out = new(Authorization)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(TLSConfig)
|
pkg/prometheus: Enable users to configure bearer token from secret
To configure a bearer token users could only specify a file path in the
service monitor, pointing to a bearer token file in the Prometheus
container. This enables hostile users, being able to configure a service
monitor and controlling the scrape target, to retrieve arbitrary files
in the Prometheus container.
In cases where users can not be trusted, this patch adds an option to
disallow the above file path specification and replaces it by a secret
reference. This secret has to be in the same namespace as the service
monitor, shrinking the attack vector.
pkg/prometheus: Add option to deny file system access through service monitors
ArbitraryFSAccessThroughSMsConfig enables users to configure, whether
a service monitor selected by the Prometheus instance is allowed to use
arbitrary files on the file system of the Prometheus container. This is
the case when e.g. a service monitor specifies a BearerTokenFile in an
endpoint. A malicious user could create a service monitor
selecting arbitrary secret files in the Prometheus container. Those
secrets would then be send with a scrape request by Prometheus to a
malicious target. Denying the above would prevent the attack, users can
instead use the BearerTokenSecret field.
test/basic-auth-test-app: Add mTLS endpoint
pkg/prometheus: Enable users to configure tls from secret
pkg/prometheus/operator: Validate TLS configs before retrieving assets
Before retrieving TLS assets from Kubernetes secrets for a given service
monitor, make sure the user did not specify both file and secret
reference, e.g. both `CAFile` and `CASecret`.
test: Rename basic-auth-test-app to instrumented-sample-app
Given that the basic-auth-test-app not only supports basic auth, but
also bearer token as well as tls authentication, this patch renames the
app to a more generic name.
test/e2e/prometheus_test: Test ArbitraryFSAccessThroughSM option for tls
The Prometheus custom resource has the option to disable arbitrary
filesystem access configured through service monitors. This commit adds
an end-to-end test for this option in combination with the TLS
configuration via files or secret references in service monitors.
pkg/prometheus/operator: Move check for arbitrary fs access into func
2019-03-18 15:56:38 +01:00
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2024-06-18 22:02:17 +08:00
|
|
|
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
|
2023-06-01 16:59:04 +04:00
|
|
|
if in.FollowRedirects != nil {
|
|
|
|
in, out := &in.FollowRedirects, &out.FollowRedirects
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-11-10 23:42:06 +02:00
|
|
|
if in.FilterExternalLabels != nil {
|
|
|
|
in, out := &in.FilterExternalLabels, &out.FilterExternalLabels
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteReadSpec.
|
|
|
|
func (in *RemoteReadSpec) DeepCopy() *RemoteReadSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(RemoteReadSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *RemoteWriteSpec) DeepCopyInto(out *RemoteWriteSpec) {
|
|
|
|
*out = *in
|
2024-10-22 17:53:12 +02:00
|
|
|
if in.Name != nil {
|
|
|
|
in, out := &in.Name, &out.Name
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.MessageVersion != nil {
|
|
|
|
in, out := &in.MessageVersion, &out.MessageVersion
|
|
|
|
*out = new(RemoteWriteMessageVersion)
|
|
|
|
**out = **in
|
|
|
|
}
|
2021-07-09 11:58:25 -04:00
|
|
|
if in.SendExemplars != nil {
|
|
|
|
in, out := &in.SendExemplars, &out.SendExemplars
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2023-05-10 15:24:58 +05:30
|
|
|
if in.SendNativeHistograms != nil {
|
|
|
|
in, out := &in.SendNativeHistograms, &out.SendNativeHistograms
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2021-02-19 00:35:14 +01:00
|
|
|
if in.Headers != nil {
|
|
|
|
in, out := &in.Headers, &out.Headers
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.WriteRelabelConfigs != nil {
|
|
|
|
in, out := &in.WriteRelabelConfigs, &out.WriteRelabelConfigs
|
|
|
|
*out = make([]RelabelConfig, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2021-06-21 12:09:41 +02:00
|
|
|
if in.OAuth2 != nil {
|
|
|
|
in, out := &in.OAuth2, &out.OAuth2
|
|
|
|
*out = new(OAuth2)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.BasicAuth != nil {
|
|
|
|
in, out := &in.BasicAuth, &out.BasicAuth
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(BasicAuth)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2021-07-13 09:47:29 +02:00
|
|
|
if in.Authorization != nil {
|
|
|
|
in, out := &in.Authorization, &out.Authorization
|
|
|
|
*out = new(Authorization)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2021-10-11 13:10:33 +02:00
|
|
|
if in.Sigv4 != nil {
|
|
|
|
in, out := &in.Sigv4, &out.Sigv4
|
|
|
|
*out = new(Sigv4)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2023-09-22 11:45:13 +08:00
|
|
|
if in.AzureAD != nil {
|
|
|
|
in, out := &in.AzureAD, &out.AzureAD
|
|
|
|
*out = new(AzureAD)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(TLSConfig)
|
pkg/prometheus: Enable users to configure bearer token from secret
To configure a bearer token users could only specify a file path in the
service monitor, pointing to a bearer token file in the Prometheus
container. This enables hostile users, being able to configure a service
monitor and controlling the scrape target, to retrieve arbitrary files
in the Prometheus container.
In cases where users can not be trusted, this patch adds an option to
disallow the above file path specification and replaces it by a secret
reference. This secret has to be in the same namespace as the service
monitor, shrinking the attack vector.
pkg/prometheus: Add option to deny file system access through service monitors
ArbitraryFSAccessThroughSMsConfig enables users to configure, whether
a service monitor selected by the Prometheus instance is allowed to use
arbitrary files on the file system of the Prometheus container. This is
the case when e.g. a service monitor specifies a BearerTokenFile in an
endpoint. A malicious user could create a service monitor
selecting arbitrary secret files in the Prometheus container. Those
secrets would then be send with a scrape request by Prometheus to a
malicious target. Denying the above would prevent the attack, users can
instead use the BearerTokenSecret field.
test/basic-auth-test-app: Add mTLS endpoint
pkg/prometheus: Enable users to configure tls from secret
pkg/prometheus/operator: Validate TLS configs before retrieving assets
Before retrieving TLS assets from Kubernetes secrets for a given service
monitor, make sure the user did not specify both file and secret
reference, e.g. both `CAFile` and `CASecret`.
test: Rename basic-auth-test-app to instrumented-sample-app
Given that the basic-auth-test-app not only supports basic auth, but
also bearer token as well as tls authentication, this patch renames the
app to a more generic name.
test/e2e/prometheus_test: Test ArbitraryFSAccessThroughSM option for tls
The Prometheus custom resource has the option to disable arbitrary
filesystem access configured through service monitors. This commit adds
an end-to-end test for this option in combination with the TLS
configuration via files or secret references in service monitors.
pkg/prometheus/operator: Move check for arbitrary fs access into func
2019-03-18 15:56:38 +01:00
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2024-06-18 22:02:17 +08:00
|
|
|
in.ProxyConfig.DeepCopyInto(&out.ProxyConfig)
|
|
|
|
if in.FollowRedirects != nil {
|
|
|
|
in, out := &in.FollowRedirects, &out.FollowRedirects
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.QueueConfig != nil {
|
|
|
|
in, out := &in.QueueConfig, &out.QueueConfig
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(QueueConfig)
|
2024-03-04 23:27:24 +08:00
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2021-03-17 00:59:29 +08:00
|
|
|
if in.MetadataConfig != nil {
|
|
|
|
in, out := &in.MetadataConfig, &out.MetadataConfig
|
|
|
|
*out = new(MetadataConfig)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-01-02 14:26:06 +01:00
|
|
|
if in.EnableHttp2 != nil {
|
|
|
|
in, out := &in.EnableHttp2, &out.EnableHttp2
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteWriteSpec.
|
|
|
|
func (in *RemoteWriteSpec) DeepCopy() *RemoteWriteSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(RemoteWriteSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *Rule) DeepCopyInto(out *Rule) {
|
|
|
|
*out = *in
|
|
|
|
out.Expr = in.Expr
|
2023-04-21 14:12:19 +02:00
|
|
|
if in.For != nil {
|
|
|
|
in, out := &in.For, &out.For
|
|
|
|
*out = new(Duration)
|
|
|
|
**out = **in
|
|
|
|
}
|
2023-06-07 21:57:50 +05:30
|
|
|
if in.KeepFiringFor != nil {
|
|
|
|
in, out := &in.KeepFiringFor, &out.KeepFiringFor
|
2023-06-13 16:28:10 +05:30
|
|
|
*out = new(NonEmptyDuration)
|
2023-06-07 21:57:50 +05:30
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.Labels != nil {
|
|
|
|
in, out := &in.Labels, &out.Labels
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.Annotations != nil {
|
|
|
|
in, out := &in.Annotations, &out.Annotations
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
|
|
|
|
func (in *Rule) DeepCopy() *Rule {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Rule)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *RuleGroup) DeepCopyInto(out *RuleGroup) {
|
|
|
|
*out = *in
|
2023-04-21 14:12:19 +02:00
|
|
|
if in.Interval != nil {
|
|
|
|
in, out := &in.Interval, &out.Interval
|
|
|
|
*out = new(Duration)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-09-22 19:03:52 +03:00
|
|
|
if in.QueryOffset != nil {
|
|
|
|
in, out := &in.QueryOffset, &out.QueryOffset
|
|
|
|
*out = new(Duration)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.Rules != nil {
|
|
|
|
in, out := &in.Rules, &out.Rules
|
|
|
|
*out = make([]Rule, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2023-03-14 17:37:59 +05:30
|
|
|
if in.Limit != nil {
|
|
|
|
in, out := &in.Limit, &out.Limit
|
|
|
|
*out = new(int)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleGroup.
|
|
|
|
func (in *RuleGroup) DeepCopy() *RuleGroup {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(RuleGroup)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2019-01-07 23:43:13 +03:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *Rules) DeepCopyInto(out *Rules) {
|
|
|
|
*out = *in
|
|
|
|
out.Alert = in.Alert
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rules.
|
|
|
|
func (in *Rules) DeepCopy() *Rules {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Rules)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *RulesAlert) DeepCopyInto(out *RulesAlert) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RulesAlert.
|
|
|
|
func (in *RulesAlert) DeepCopy() *RulesAlert {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(RulesAlert)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2024-10-04 12:20:09 +05:30
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *RuntimeConfig) DeepCopyInto(out *RuntimeConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.GoGC != nil {
|
|
|
|
in, out := &in.GoGC, &out.GoGC
|
|
|
|
*out = new(int32)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeConfig.
|
|
|
|
func (in *RuntimeConfig) DeepCopy() *RuntimeConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(RuntimeConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2021-07-13 09:47:29 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *SafeAuthorization) DeepCopyInto(out *SafeAuthorization) {
|
|
|
|
*out = *in
|
|
|
|
if in.Credentials != nil {
|
|
|
|
in, out := &in.Credentials, &out.Credentials
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SafeAuthorization.
|
|
|
|
func (in *SafeAuthorization) DeepCopy() *SafeAuthorization {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(SafeAuthorization)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2020-08-13 11:13:32 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *SafeTLSConfig) DeepCopyInto(out *SafeTLSConfig) {
|
|
|
|
*out = *in
|
|
|
|
in.CA.DeepCopyInto(&out.CA)
|
|
|
|
in.Cert.DeepCopyInto(&out.Cert)
|
|
|
|
if in.KeySecret != nil {
|
|
|
|
in, out := &in.KeySecret, &out.KeySecret
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2024-05-07 11:12:55 +02:00
|
|
|
if in.ServerName != nil {
|
|
|
|
in, out := &in.ServerName, &out.ServerName
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.InsecureSkipVerify != nil {
|
|
|
|
in, out := &in.InsecureSkipVerify, &out.InsecureSkipVerify
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-07-29 23:15:57 +08:00
|
|
|
if in.MinVersion != nil {
|
|
|
|
in, out := &in.MinVersion, &out.MinVersion
|
|
|
|
*out = new(TLSVersion)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.MaxVersion != nil {
|
|
|
|
in, out := &in.MaxVersion, &out.MaxVersion
|
|
|
|
*out = new(TLSVersion)
|
|
|
|
**out = **in
|
|
|
|
}
|
2020-08-13 11:13:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SafeTLSConfig.
|
|
|
|
func (in *SafeTLSConfig) DeepCopy() *SafeTLSConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(SafeTLSConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2024-02-23 18:15:16 +00:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ScrapeClass) DeepCopyInto(out *ScrapeClass) {
|
|
|
|
*out = *in
|
|
|
|
if in.Default != nil {
|
|
|
|
in, out := &in.Default, &out.Default
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
|
|
|
*out = new(TLSConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2024-03-19 17:58:53 +01:00
|
|
|
if in.Relabelings != nil {
|
|
|
|
in, out := &in.Relabelings, &out.Relabelings
|
2024-04-29 23:17:37 +05:30
|
|
|
*out = make([]RelabelConfig, len(*in))
|
2024-03-19 17:58:53 +01:00
|
|
|
for i := range *in {
|
2024-04-29 23:17:37 +05:30
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
2024-03-19 17:58:53 +01:00
|
|
|
}
|
|
|
|
}
|
2024-04-09 17:59:53 +02:00
|
|
|
if in.MetricRelabelings != nil {
|
|
|
|
in, out := &in.MetricRelabelings, &out.MetricRelabelings
|
|
|
|
*out = make([]RelabelConfig, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2024-07-18 14:47:09 +12:00
|
|
|
if in.AttachMetadata != nil {
|
|
|
|
in, out := &in.AttachMetadata, &out.AttachMetadata
|
|
|
|
*out = new(AttachMetadata)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2024-02-23 18:15:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeClass.
|
|
|
|
func (in *ScrapeClass) DeepCopy() *ScrapeClass {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ScrapeClass)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2019-10-07 13:00:10 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *SecretOrConfigMap) DeepCopyInto(out *SecretOrConfigMap) {
|
|
|
|
*out = *in
|
|
|
|
if in.Secret != nil {
|
|
|
|
in, out := &in.Secret, &out.Secret
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.ConfigMap != nil {
|
|
|
|
in, out := &in.ConfigMap, &out.ConfigMap
|
|
|
|
*out = new(corev1.ConfigMapKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretOrConfigMap.
|
|
|
|
func (in *SecretOrConfigMap) DeepCopy() *SecretOrConfigMap {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(SecretOrConfigMap)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2018-11-26 15:54:08 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ServiceMonitor) DeepCopyInto(out *ServiceMonitor) {
|
|
|
|
*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 ServiceMonitor.
|
|
|
|
func (in *ServiceMonitor) DeepCopy() *ServiceMonitor {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ServiceMonitor)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ServiceMonitorList) DeepCopyInto(out *ServiceMonitorList) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
2019-06-20 15:02:10 -07:00
|
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.Items != nil {
|
|
|
|
in, out := &in.Items, &out.Items
|
|
|
|
*out = make([]*ServiceMonitor, len(*in))
|
|
|
|
for i := range *in {
|
2018-12-06 00:22:33 -08:00
|
|
|
if (*in)[i] != nil {
|
|
|
|
in, out := &(*in)[i], &(*out)[i]
|
|
|
|
*out = new(ServiceMonitor)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitorList.
|
|
|
|
func (in *ServiceMonitorList) DeepCopy() *ServiceMonitorList {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ServiceMonitorList)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ServiceMonitorSpec) DeepCopyInto(out *ServiceMonitorSpec) {
|
|
|
|
*out = *in
|
|
|
|
if in.TargetLabels != nil {
|
|
|
|
in, out := &in.TargetLabels, &out.TargetLabels
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.PodTargetLabels != nil {
|
|
|
|
in, out := &in.PodTargetLabels, &out.PodTargetLabels
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.Endpoints != nil {
|
|
|
|
in, out := &in.Endpoints, &out.Endpoints
|
|
|
|
*out = make([]Endpoint, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
in.Selector.DeepCopyInto(&out.Selector)
|
|
|
|
in.NamespaceSelector.DeepCopyInto(&out.NamespaceSelector)
|
2023-06-15 22:35:06 +09:30
|
|
|
if in.SampleLimit != nil {
|
|
|
|
in, out := &in.SampleLimit, &out.SampleLimit
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-01-31 17:04:31 +08:00
|
|
|
if in.ScrapeProtocols != nil {
|
|
|
|
in, out := &in.ScrapeProtocols, &out.ScrapeProtocols
|
|
|
|
*out = make([]ScrapeProtocol, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2023-06-15 22:35:06 +09:30
|
|
|
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
|
|
|
|
}
|
2024-10-21 23:38:11 +08:00
|
|
|
in.NativeHistogramConfig.DeepCopyInto(&out.NativeHistogramConfig)
|
2023-09-07 22:29:09 +05:30
|
|
|
if in.KeepDroppedTargets != nil {
|
|
|
|
in, out := &in.KeepDroppedTargets, &out.KeepDroppedTargets
|
|
|
|
*out = new(uint64)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-11-09 15:10:24 +00:00
|
|
|
if in.AttachMetadata != nil {
|
|
|
|
in, out := &in.AttachMetadata, &out.AttachMetadata
|
|
|
|
*out = new(AttachMetadata)
|
2023-11-16 16:16:24 +01:00
|
|
|
(*in).DeepCopyInto(*out)
|
2022-11-09 15:10:24 +00:00
|
|
|
}
|
2024-02-23 18:15:16 +00:00
|
|
|
if in.ScrapeClassName != nil {
|
|
|
|
in, out := &in.ScrapeClassName, &out.ScrapeClassName
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2024-03-12 13:28:31 +03:30
|
|
|
if in.BodySizeLimit != nil {
|
|
|
|
in, out := &in.BodySizeLimit, &out.BodySizeLimit
|
|
|
|
*out = new(ByteSize)
|
|
|
|
**out = **in
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitorSpec.
|
|
|
|
func (in *ServiceMonitorSpec) DeepCopy() *ServiceMonitorSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ServiceMonitorSpec)
|
|
|
|
in.DeepCopyInto(out)
|
2022-04-13 16:08:56 +02:00
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ShardStatus) DeepCopyInto(out *ShardStatus) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardStatus.
|
|
|
|
func (in *ShardStatus) DeepCopy() *ShardStatus {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ShardStatus)
|
|
|
|
in.DeepCopyInto(out)
|
2018-11-26 15:54:08 +01:00
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
2021-10-11 13:10:33 +02:00
|
|
|
func (in *Sigv4) DeepCopyInto(out *Sigv4) {
|
|
|
|
*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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sigv4.
|
|
|
|
func (in *Sigv4) DeepCopy() *Sigv4 {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(Sigv4)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
2018-11-26 15:54:08 +01:00
|
|
|
func (in *StorageSpec) DeepCopyInto(out *StorageSpec) {
|
|
|
|
*out = *in
|
|
|
|
if in.EmptyDir != nil {
|
|
|
|
in, out := &in.EmptyDir, &out.EmptyDir
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(corev1.EmptyDirVolumeSource)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
2021-10-27 17:06:06 +02:00
|
|
|
if in.Ephemeral != nil {
|
|
|
|
in, out := &in.Ephemeral, &out.Ephemeral
|
|
|
|
*out = new(corev1.EphemeralVolumeSource)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
in.VolumeClaimTemplate.DeepCopyInto(&out.VolumeClaimTemplate)
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec.
|
|
|
|
func (in *StorageSpec) DeepCopy() *StorageSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(StorageSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *TLSConfig) DeepCopyInto(out *TLSConfig) {
|
|
|
|
*out = *in
|
2020-08-13 11:13:32 +02:00
|
|
|
in.SafeTLSConfig.DeepCopyInto(&out.SafeTLSConfig)
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.
|
|
|
|
func (in *TLSConfig) DeepCopy() *TLSConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(TLSConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
pkg/prometheus: Enable users to configure bearer token from secret
To configure a bearer token users could only specify a file path in the
service monitor, pointing to a bearer token file in the Prometheus
container. This enables hostile users, being able to configure a service
monitor and controlling the scrape target, to retrieve arbitrary files
in the Prometheus container.
In cases where users can not be trusted, this patch adds an option to
disallow the above file path specification and replaces it by a secret
reference. This secret has to be in the same namespace as the service
monitor, shrinking the attack vector.
pkg/prometheus: Add option to deny file system access through service monitors
ArbitraryFSAccessThroughSMsConfig enables users to configure, whether
a service monitor selected by the Prometheus instance is allowed to use
arbitrary files on the file system of the Prometheus container. This is
the case when e.g. a service monitor specifies a BearerTokenFile in an
endpoint. A malicious user could create a service monitor
selecting arbitrary secret files in the Prometheus container. Those
secrets would then be send with a scrape request by Prometheus to a
malicious target. Denying the above would prevent the attack, users can
instead use the BearerTokenSecret field.
test/basic-auth-test-app: Add mTLS endpoint
pkg/prometheus: Enable users to configure tls from secret
pkg/prometheus/operator: Validate TLS configs before retrieving assets
Before retrieving TLS assets from Kubernetes secrets for a given service
monitor, make sure the user did not specify both file and secret
reference, e.g. both `CAFile` and `CASecret`.
test: Rename basic-auth-test-app to instrumented-sample-app
Given that the basic-auth-test-app not only supports basic auth, but
also bearer token as well as tls authentication, this patch renames the
app to a more generic name.
test/e2e/prometheus_test: Test ArbitraryFSAccessThroughSM option for tls
The Prometheus custom resource has the option to disable arbitrary
filesystem access configured through service monitors. This commit adds
an end-to-end test for this option in combination with the TLS
configuration via files or secret references in service monitors.
pkg/prometheus/operator: Move check for arbitrary fs access into func
2019-03-18 15:56:38 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
2022-10-06 11:51:08 +02:00
|
|
|
func (in *TSDBSpec) DeepCopyInto(out *TSDBSpec) {
|
|
|
|
*out = *in
|
2024-10-09 23:18:18 +08:00
|
|
|
if in.OutOfOrderTimeWindow != nil {
|
|
|
|
in, out := &in.OutOfOrderTimeWindow, &out.OutOfOrderTimeWindow
|
|
|
|
*out = new(Duration)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-10-06 11:51:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TSDBSpec.
|
|
|
|
func (in *TSDBSpec) DeepCopy() *TSDBSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(TSDBSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
2019-12-12 13:18:42 +01:00
|
|
|
func (in *ThanosRuler) DeepCopyInto(out *ThanosRuler) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
|
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
2023-03-31 14:25:24 +02:00
|
|
|
in.Status.DeepCopyInto(&out.Status)
|
2019-12-12 13:18:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRuler.
|
|
|
|
func (in *ThanosRuler) DeepCopy() *ThanosRuler {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ThanosRuler)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ThanosRulerList) DeepCopyInto(out *ThanosRulerList) {
|
|
|
|
*out = *in
|
|
|
|
out.TypeMeta = in.TypeMeta
|
|
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
|
|
if in.Items != nil {
|
|
|
|
in, out := &in.Items, &out.Items
|
|
|
|
*out = make([]*ThanosRuler, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
if (*in)[i] != nil {
|
|
|
|
in, out := &(*in)[i], &(*out)[i]
|
|
|
|
*out = new(ThanosRuler)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRulerList.
|
|
|
|
func (in *ThanosRulerList) DeepCopy() *ThanosRulerList {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ThanosRulerList)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ThanosRulerSpec) DeepCopyInto(out *ThanosRulerSpec) {
|
|
|
|
*out = *in
|
|
|
|
if in.PodMetadata != nil {
|
|
|
|
in, out := &in.PodMetadata, &out.PodMetadata
|
2020-04-07 12:12:28 -05:00
|
|
|
*out = new(EmbeddedObjectMetadata)
|
2019-12-12 13:18:42 +01:00
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.ImagePullSecrets != nil {
|
|
|
|
in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
|
|
|
|
*out = make([]corev1.LocalObjectReference, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.Replicas != nil {
|
|
|
|
in, out := &in.Replicas, &out.Replicas
|
|
|
|
*out = new(int32)
|
|
|
|
**out = **in
|
|
|
|
}
|
2020-02-20 16:50:03 -06:00
|
|
|
if in.NodeSelector != nil {
|
|
|
|
in, out := &in.NodeSelector, &out.NodeSelector
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
2019-12-12 13:18:42 +01:00
|
|
|
in.Resources.DeepCopyInto(&out.Resources)
|
2020-02-20 16:50:03 -06:00
|
|
|
if in.Affinity != nil {
|
|
|
|
in, out := &in.Affinity, &out.Affinity
|
|
|
|
*out = new(corev1.Affinity)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.Tolerations != nil {
|
|
|
|
in, out := &in.Tolerations, &out.Tolerations
|
|
|
|
*out = make([]corev1.Toleration, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2020-10-16 14:08:48 -04:00
|
|
|
if in.TopologySpreadConstraints != nil {
|
|
|
|
in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints
|
|
|
|
*out = make([]corev1.TopologySpreadConstraint, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2020-02-20 16:50:03 -06:00
|
|
|
if in.SecurityContext != nil {
|
|
|
|
in, out := &in.SecurityContext, &out.SecurityContext
|
|
|
|
*out = new(corev1.PodSecurityContext)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2024-10-08 18:00:40 +03:00
|
|
|
if in.DNSPolicy != nil {
|
|
|
|
in, out := &in.DNSPolicy, &out.DNSPolicy
|
|
|
|
*out = new(DNSPolicy)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.DNSConfig != nil {
|
|
|
|
in, out := &in.DNSConfig, &out.DNSConfig
|
|
|
|
*out = new(PodDNSConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2019-12-12 13:18:42 +01:00
|
|
|
if in.Storage != nil {
|
|
|
|
in, out := &in.Storage, &out.Storage
|
|
|
|
*out = new(StorageSpec)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.Volumes != nil {
|
|
|
|
in, out := &in.Volumes, &out.Volumes
|
|
|
|
*out = make([]corev1.Volume, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2023-05-03 12:23:38 +01:00
|
|
|
if in.VolumeMounts != nil {
|
|
|
|
in, out := &in.VolumeMounts, &out.VolumeMounts
|
|
|
|
*out = make([]corev1.VolumeMount, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2019-12-12 13:18:42 +01:00
|
|
|
if in.ObjectStorageConfig != nil {
|
|
|
|
in, out := &in.ObjectStorageConfig, &out.ObjectStorageConfig
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2020-11-16 09:44:24 +00:00
|
|
|
if in.ObjectStorageConfigFile != nil {
|
|
|
|
in, out := &in.ObjectStorageConfigFile, &out.ObjectStorageConfigFile
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2019-12-12 13:18:42 +01:00
|
|
|
if in.QueryEndpoints != nil {
|
|
|
|
in, out := &in.QueryEndpoints, &out.QueryEndpoints
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2020-03-06 16:31:41 -06:00
|
|
|
if in.QueryConfig != nil {
|
|
|
|
in, out := &in.QueryConfig, &out.QueryConfig
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2020-03-07 12:00:26 -06:00
|
|
|
if in.AlertManagersURL != nil {
|
|
|
|
in, out := &in.AlertManagersURL, &out.AlertManagersURL
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2019-12-12 13:18:42 +01:00
|
|
|
if in.AlertManagersConfig != nil {
|
|
|
|
in, out := &in.AlertManagersConfig, &out.AlertManagersConfig
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.RuleSelector != nil {
|
|
|
|
in, out := &in.RuleSelector, &out.RuleSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.RuleNamespaceSelector != nil {
|
|
|
|
in, out := &in.RuleNamespaceSelector, &out.RuleNamespaceSelector
|
|
|
|
*out = new(metav1.LabelSelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2022-03-24 16:49:54 +02:00
|
|
|
if in.ExcludedFromEnforcement != nil {
|
|
|
|
in, out := &in.ExcludedFromEnforcement, &out.ExcludedFromEnforcement
|
|
|
|
*out = make([]ObjectReference, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2020-05-20 15:55:05 +02:00
|
|
|
if in.PrometheusRulesExcludedFromEnforce != nil {
|
|
|
|
in, out := &in.PrometheusRulesExcludedFromEnforce, &out.PrometheusRulesExcludedFromEnforce
|
|
|
|
*out = make([]PrometheusRuleExcludeConfig, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2020-02-03 09:04:54 -06:00
|
|
|
if in.Containers != nil {
|
|
|
|
in, out := &in.Containers, &out.Containers
|
|
|
|
*out = make([]corev1.Container, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.InitContainers != nil {
|
|
|
|
in, out := &in.InitContainers, &out.InitContainers
|
|
|
|
*out = make([]corev1.Container, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2020-01-31 11:10:33 -05:00
|
|
|
if in.TracingConfig != nil {
|
|
|
|
in, out := &in.TracingConfig, &out.TracingConfig
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2020-02-03 10:23:31 -05:00
|
|
|
if in.Labels != nil {
|
|
|
|
in, out := &in.Labels, &out.Labels
|
|
|
|
*out = make(map[string]string, len(*in))
|
|
|
|
for key, val := range *in {
|
|
|
|
(*out)[key] = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.AlertDropLabels != nil {
|
|
|
|
in, out := &in.AlertDropLabels, &out.AlertDropLabels
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2020-03-11 06:16:45 -05:00
|
|
|
if in.GRPCServerTLSConfig != nil {
|
|
|
|
in, out := &in.GRPCServerTLSConfig, &out.GRPCServerTLSConfig
|
|
|
|
*out = new(TLSConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2021-09-06 12:49:17 +01:00
|
|
|
if in.MinReadySeconds != nil {
|
|
|
|
in, out := &in.MinReadySeconds, &out.MinReadySeconds
|
|
|
|
*out = new(uint32)
|
|
|
|
**out = **in
|
|
|
|
}
|
2021-10-05 13:29:54 +02:00
|
|
|
if in.AlertRelabelConfigs != nil {
|
|
|
|
in, out := &in.AlertRelabelConfigs, &out.AlertRelabelConfigs
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.AlertRelabelConfigFile != nil {
|
|
|
|
in, out := &in.AlertRelabelConfigFile, &out.AlertRelabelConfigFile
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2022-06-02 23:49:32 +08:00
|
|
|
if in.HostAliases != nil {
|
|
|
|
in, out := &in.HostAliases, &out.HostAliases
|
|
|
|
*out = make([]HostAlias, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2023-01-20 20:08:15 +01:00
|
|
|
if in.AdditionalArgs != nil {
|
|
|
|
in, out := &in.AdditionalArgs, &out.AdditionalArgs
|
|
|
|
*out = make([]Argument, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2024-03-13 20:01:07 +03:30
|
|
|
if in.Web != nil {
|
|
|
|
in, out := &in.Web, &out.Web
|
|
|
|
*out = new(ThanosRulerWebSpec)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2019-12-12 13:18:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRulerSpec.
|
|
|
|
func (in *ThanosRulerSpec) DeepCopy() *ThanosRulerSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ThanosRulerSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ThanosRulerStatus) DeepCopyInto(out *ThanosRulerStatus) {
|
|
|
|
*out = *in
|
2023-03-31 14:25:24 +02:00
|
|
|
if in.Conditions != nil {
|
|
|
|
in, out := &in.Conditions, &out.Conditions
|
|
|
|
*out = make([]Condition, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2019-12-12 13:18:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRulerStatus.
|
|
|
|
func (in *ThanosRulerStatus) DeepCopy() *ThanosRulerStatus {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ThanosRulerStatus)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2024-03-13 20:01:07 +03:30
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *ThanosRulerWebSpec) DeepCopyInto(out *ThanosRulerWebSpec) {
|
|
|
|
*out = *in
|
|
|
|
in.WebConfigFileFields.DeepCopyInto(&out.WebConfigFileFields)
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRulerWebSpec.
|
|
|
|
func (in *ThanosRulerWebSpec) DeepCopy() *ThanosRulerWebSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ThanosRulerWebSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2019-12-12 13:18:42 +01:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
2018-11-26 15:54:08 +01:00
|
|
|
func (in *ThanosSpec) DeepCopyInto(out *ThanosSpec) {
|
|
|
|
*out = *in
|
2019-01-08 12:38:59 +01:00
|
|
|
if in.Image != nil {
|
|
|
|
in, out := &in.Image, &out.Image
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
2019-01-08 12:38:59 +01:00
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
if in.Version != nil {
|
|
|
|
in, out := &in.Version, &out.Version
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
if in.Tag != nil {
|
|
|
|
in, out := &in.Tag, &out.Tag
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
if in.SHA != nil {
|
|
|
|
in, out := &in.SHA, &out.SHA
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
if in.BaseImage != nil {
|
|
|
|
in, out := &in.BaseImage, &out.BaseImage
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
in.Resources.DeepCopyInto(&out.Resources)
|
2019-01-08 08:06:27 -08:00
|
|
|
if in.ObjectStorageConfig != nil {
|
|
|
|
in, out := &in.ObjectStorageConfig, &out.ObjectStorageConfig
|
2018-12-06 00:22:33 -08:00
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
2019-01-08 08:06:27 -08:00
|
|
|
}
|
2020-11-16 09:44:24 +00:00
|
|
|
if in.ObjectStorageConfigFile != nil {
|
|
|
|
in, out := &in.ObjectStorageConfigFile, &out.ObjectStorageConfigFile
|
|
|
|
*out = new(string)
|
|
|
|
**out = **in
|
|
|
|
}
|
2020-01-31 11:10:33 -05:00
|
|
|
if in.TracingConfig != nil {
|
|
|
|
in, out := &in.TracingConfig, &out.TracingConfig
|
|
|
|
*out = new(corev1.SecretKeySelector)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2020-03-11 06:16:45 -05:00
|
|
|
if in.GRPCServerTLSConfig != nil {
|
|
|
|
in, out := &in.GRPCServerTLSConfig, &out.GRPCServerTLSConfig
|
|
|
|
*out = new(TLSConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
2021-09-01 14:30:57 +02:00
|
|
|
if in.VolumeMounts != nil {
|
|
|
|
in, out := &in.VolumeMounts, &out.VolumeMounts
|
|
|
|
*out = make([]corev1.VolumeMount, len(*in))
|
|
|
|
for i := range *in {
|
|
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
|
|
}
|
|
|
|
}
|
2022-07-21 12:35:06 +02:00
|
|
|
if in.AdditionalArgs != nil {
|
|
|
|
in, out := &in.AdditionalArgs, &out.AdditionalArgs
|
|
|
|
*out = make([]Argument, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
2018-11-26 15:54:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosSpec.
|
|
|
|
func (in *ThanosSpec) DeepCopy() *ThanosSpec {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(ThanosSpec)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
2020-09-22 15:50:31 +02:00
|
|
|
|
2023-12-07 10:48:27 +00:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *TopologySpreadConstraint) DeepCopyInto(out *TopologySpreadConstraint) {
|
|
|
|
*out = *in
|
|
|
|
in.CoreV1TopologySpreadConstraint.DeepCopyInto(&out.CoreV1TopologySpreadConstraint)
|
|
|
|
if in.AdditionalLabelSelectors != nil {
|
|
|
|
in, out := &in.AdditionalLabelSelectors, &out.AdditionalLabelSelectors
|
|
|
|
*out = new(AdditionalLabelSelectors)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologySpreadConstraint.
|
|
|
|
func (in *TopologySpreadConstraint) DeepCopy() *TopologySpreadConstraint {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(TopologySpreadConstraint)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2022-07-21 18:16:28 +08:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *WebConfigFileFields) DeepCopyInto(out *WebConfigFileFields) {
|
|
|
|
*out = *in
|
|
|
|
if in.TLSConfig != nil {
|
|
|
|
in, out := &in.TLSConfig, &out.TLSConfig
|
|
|
|
*out = new(WebTLSConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
if in.HTTPConfig != nil {
|
|
|
|
in, out := &in.HTTPConfig, &out.HTTPConfig
|
|
|
|
*out = new(WebHTTPConfig)
|
|
|
|
(*in).DeepCopyInto(*out)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebConfigFileFields.
|
|
|
|
func (in *WebConfigFileFields) DeepCopy() *WebConfigFileFields {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(WebConfigFileFields)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *WebHTTPConfig) DeepCopyInto(out *WebHTTPConfig) {
|
|
|
|
*out = *in
|
|
|
|
if in.HTTP2 != nil {
|
|
|
|
in, out := &in.HTTP2, &out.HTTP2
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.Headers != nil {
|
|
|
|
in, out := &in.Headers, &out.Headers
|
|
|
|
*out = new(WebHTTPHeaders)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebHTTPConfig.
|
|
|
|
func (in *WebHTTPConfig) DeepCopy() *WebHTTPConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(WebHTTPConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *WebHTTPHeaders) DeepCopyInto(out *WebHTTPHeaders) {
|
|
|
|
*out = *in
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebHTTPHeaders.
|
|
|
|
func (in *WebHTTPHeaders) DeepCopy() *WebHTTPHeaders {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(WebHTTPHeaders)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2021-05-10 17:51:50 +02:00
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
|
|
func (in *WebTLSConfig) DeepCopyInto(out *WebTLSConfig) {
|
|
|
|
*out = *in
|
|
|
|
in.Cert.DeepCopyInto(&out.Cert)
|
|
|
|
in.ClientCA.DeepCopyInto(&out.ClientCA)
|
2024-09-16 18:47:21 +05:30
|
|
|
in.KeySecret.DeepCopyInto(&out.KeySecret)
|
2021-05-10 17:51:50 +02:00
|
|
|
if in.CipherSuites != nil {
|
|
|
|
in, out := &in.CipherSuites, &out.CipherSuites
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
if in.PreferServerCipherSuites != nil {
|
|
|
|
in, out := &in.PreferServerCipherSuites, &out.PreferServerCipherSuites
|
|
|
|
*out = new(bool)
|
|
|
|
**out = **in
|
|
|
|
}
|
|
|
|
if in.CurvePreferences != nil {
|
|
|
|
in, out := &in.CurvePreferences, &out.CurvePreferences
|
|
|
|
*out = make([]string, len(*in))
|
|
|
|
copy(*out, *in)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTLSConfig.
|
|
|
|
func (in *WebTLSConfig) DeepCopy() *WebTLSConfig {
|
|
|
|
if in == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
out := new(WebTLSConfig)
|
|
|
|
in.DeepCopyInto(out)
|
|
|
|
return out
|
|
|
|
}
|