mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 19:49:46 +00:00
*: Autogenerate DeepCopy methods
This commit is contained in:
parent
281d3e7d5c
commit
04bee84aec
6 changed files with 754 additions and 9 deletions
2
.header
2
.header
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2016 The prometheus-operator Authors
|
||||
// Copyright 2017 The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
11
Makefile
11
Makefile
|
@ -63,7 +63,16 @@ docs: embedmd po-docgen
|
|||
$(GOPATH)/bin/po-docgen compatibility > Documentation/compatibility.md
|
||||
|
||||
generate: jsonnet-docker
|
||||
docker run --rm -v `pwd`:/go/src/github.com/coreos/prometheus-operator po-jsonnet make jsonnet generate-bundle docs
|
||||
docker run --rm -v `pwd`:/go/src/github.com/coreos/prometheus-operator po-jsonnet make generate-deepcopy jsonnet generate-bundle docs
|
||||
|
||||
deepcopy-gen:
|
||||
go get -u -v -d k8s.io/code-generator/cmd/deepcopy-gen
|
||||
cd $(GOPATH)/src/k8s.io/code-generator; git checkout release-1.8
|
||||
go install k8s.io/code-generator/cmd/deepcopy-gen
|
||||
|
||||
generate-deepcopy: deepcopy-gen
|
||||
deepcopy-gen -i github.com/coreos/prometheus-operator/pkg/client/monitoring/v1 --go-header-file="$(GOPATH)/src/github.com/coreos/prometheus-operator/.header" -v=4 --logtostderr --bounding-dirs "github.com/coreos/prometheus-operator/pkg/client" --output-file-base zz_generated.deepcopy
|
||||
deepcopy-gen -i github.com/coreos/prometheus-operator/pkg/client/monitoring/v1alpha1 --go-header-file="$(GOPATH)/src/github.com/coreos/prometheus-operator/.header" -v=4 --logtostderr --bounding-dirs "github.com/coreos/prometheus-operator/pkg/client" --output-file-base zz_generated.deepcopy
|
||||
|
||||
generate-bundle:
|
||||
hack/generate-bundle.sh
|
||||
|
|
|
@ -16,12 +16,13 @@ package v1
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
"k8s.io/client-go/dynamic"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
"k8s.io/client-go/rest"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -94,6 +95,7 @@ type MonitoringV1Interface interface {
|
|||
ServiceMonitorsGetter
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=false
|
||||
type MonitoringV1Client struct {
|
||||
restClient rest.Interface
|
||||
dynamicClient *dynamic.Client
|
||||
|
|
17
pkg/client/monitoring/v1/doc.go
Normal file
17
pkg/client/monitoring/v1/doc.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2017 The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
|
||||
package v1
|
|
@ -368,25 +368,25 @@ type NamespaceSelector struct {
|
|||
}
|
||||
|
||||
func (l *Alertmanager) DeepCopyObject() runtime.Object {
|
||||
panic("DeepCopyObject not implemented for Alertmanager")
|
||||
return l.DeepCopy()
|
||||
}
|
||||
|
||||
func (l *AlertmanagerList) DeepCopyObject() runtime.Object {
|
||||
panic("DeepCopyObject not implemented for AlertmanagerList")
|
||||
return l.DeepCopy()
|
||||
}
|
||||
|
||||
func (l *Prometheus) DeepCopyObject() runtime.Object {
|
||||
panic("DeepCopyObject not implemented for Prometheus")
|
||||
return l.DeepCopy()
|
||||
}
|
||||
|
||||
func (l *PrometheusList) DeepCopyObject() runtime.Object {
|
||||
panic("DeepCopyObject not implemented for PrometheusList")
|
||||
return l.DeepCopy()
|
||||
}
|
||||
|
||||
func (l *ServiceMonitor) DeepCopyObject() runtime.Object {
|
||||
panic("DeepCopyObject not implemented for ServiceMonitor")
|
||||
return l.DeepCopy()
|
||||
}
|
||||
|
||||
func (l *ServiceMonitorList) DeepCopyObject() runtime.Object {
|
||||
panic("DeepCopyObject not implemented for ServiceMonitorList")
|
||||
return l.DeepCopy()
|
||||
}
|
||||
|
|
717
pkg/client/monitoring/v1/zz_generated.deepcopy.go
Normal file
717
pkg/client/monitoring/v1/zz_generated.deepcopy.go
Normal file
|
@ -0,0 +1,717 @@
|
|||
// +build !ignore_autogenerated
|
||||
|
||||
// Copyright 2017 The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
|
||||
//
|
||||
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
|
||||
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
|
||||
return []conversion.GeneratedDeepCopyFunc{
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AlertingSpec).DeepCopyInto(out.(*AlertingSpec))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AlertingSpec{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*Alertmanager).DeepCopyInto(out.(*Alertmanager))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&Alertmanager{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AlertmanagerEndpoints).DeepCopyInto(out.(*AlertmanagerEndpoints))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AlertmanagerEndpoints{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AlertmanagerList).DeepCopyInto(out.(*AlertmanagerList))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AlertmanagerList{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AlertmanagerSpec).DeepCopyInto(out.(*AlertmanagerSpec))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AlertmanagerSpec{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AlertmanagerStatus).DeepCopyInto(out.(*AlertmanagerStatus))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AlertmanagerStatus{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*BasicAuth).DeepCopyInto(out.(*BasicAuth))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&BasicAuth{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*CrdKind).DeepCopyInto(out.(*CrdKind))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&CrdKind{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*CrdKinds).DeepCopyInto(out.(*CrdKinds))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&CrdKinds{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*Endpoint).DeepCopyInto(out.(*Endpoint))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&Endpoint{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*NamespaceSelector).DeepCopyInto(out.(*NamespaceSelector))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&NamespaceSelector{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*Prometheus).DeepCopyInto(out.(*Prometheus))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&Prometheus{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*PrometheusList).DeepCopyInto(out.(*PrometheusList))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&PrometheusList{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*PrometheusSpec).DeepCopyInto(out.(*PrometheusSpec))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&PrometheusSpec{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*PrometheusStatus).DeepCopyInto(out.(*PrometheusStatus))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&PrometheusStatus{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ServiceMonitor).DeepCopyInto(out.(*ServiceMonitor))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ServiceMonitor{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ServiceMonitorList).DeepCopyInto(out.(*ServiceMonitorList))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ServiceMonitorList{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ServiceMonitorSpec).DeepCopyInto(out.(*ServiceMonitorSpec))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ServiceMonitorSpec{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*StorageSpec).DeepCopyInto(out.(*StorageSpec))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&StorageSpec{})},
|
||||
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*TLSConfig).DeepCopyInto(out.(*TLSConfig))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&TLSConfig{})},
|
||||
}
|
||||
}
|
||||
|
||||
// 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))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 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)
|
||||
if in.Status != nil {
|
||||
in, out := &in.Status, &out.Status
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(AlertmanagerStatus)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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
|
||||
out.Port = in.Port
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Alertmanager, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(meta_v1.ObjectMeta)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.ImagePullSecrets != nil {
|
||||
in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
|
||||
*out = make([]core_v1.LocalObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Replicas != nil {
|
||||
in, out := &in.Replicas, &out.Replicas
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
if in.Storage != nil {
|
||||
in, out := &in.Storage, &out.Storage
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(StorageSpec)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
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
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(core_v1.Affinity)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]core_v1.Toleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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)
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CrdKind) DeepCopyInto(out *CrdKind) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrdKind.
|
||||
func (in *CrdKind) DeepCopy() *CrdKind {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CrdKind)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CrdKinds) DeepCopyInto(out *CrdKinds) {
|
||||
*out = *in
|
||||
out.Prometheus = in.Prometheus
|
||||
out.Alertmanager = in.Alertmanager
|
||||
out.ServiceMonitor = in.ServiceMonitor
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrdKinds.
|
||||
func (in *CrdKinds) DeepCopy() *CrdKinds {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CrdKinds)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// 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
|
||||
out.TargetPort = in.TargetPort
|
||||
if in.Params != nil {
|
||||
in, out := &in.Params, &out.Params
|
||||
*out = make(map[string][]string, len(*in))
|
||||
for key, val := range *in {
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
(*out)[key] = make([]string, len(val))
|
||||
copy((*out)[key], val)
|
||||
}
|
||||
}
|
||||
}
|
||||
if in.TLSConfig != nil {
|
||||
in, out := &in.TLSConfig, &out.TLSConfig
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(TLSConfig)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
if in.BasicAuth != nil {
|
||||
in, out := &in.BasicAuth, &out.BasicAuth
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(BasicAuth)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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)
|
||||
if in.Status != nil {
|
||||
in, out := &in.Status, &out.Status
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(PrometheusStatus)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]*Prometheus, len(*in))
|
||||
for i := range *in {
|
||||
if (*in)[i] == nil {
|
||||
(*out)[i] = nil
|
||||
} else {
|
||||
(*out)[i] = new(Prometheus)
|
||||
(*in)[i].DeepCopyInto((*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 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 *PrometheusSpec) DeepCopyInto(out *PrometheusSpec) {
|
||||
*out = *in
|
||||
if in.PodMetadata != nil {
|
||||
in, out := &in.PodMetadata, &out.PodMetadata
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(meta_v1.ObjectMeta)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.ServiceMonitorSelector != nil {
|
||||
in, out := &in.ServiceMonitorSelector, &out.ServiceMonitorSelector
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(meta_v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.ImagePullSecrets != nil {
|
||||
in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
|
||||
*out = make([]core_v1.LocalObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Replicas != nil {
|
||||
in, out := &in.Replicas, &out.Replicas
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
if in.Storage != nil {
|
||||
in, out := &in.Storage, &out.Storage
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(StorageSpec)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.RuleSelector != nil {
|
||||
in, out := &in.RuleSelector, &out.RuleSelector
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(meta_v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
in.Alerting.DeepCopyInto(&out.Alerting)
|
||||
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
|
||||
}
|
||||
}
|
||||
if in.Secrets != nil {
|
||||
in, out := &in.Secrets, &out.Secrets
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Affinity != nil {
|
||||
in, out := &in.Affinity, &out.Affinity
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(core_v1.Affinity)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]core_v1.Toleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.SecurityContext != nil {
|
||||
in, out := &in.SecurityContext, &out.SecurityContext
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(core_v1.PodSecurityContext)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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)
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]*ServiceMonitor, len(*in))
|
||||
for i := range *in {
|
||||
if (*in)[i] == nil {
|
||||
(*out)[i] = nil
|
||||
} else {
|
||||
(*out)[i] = new(ServiceMonitor)
|
||||
(*in)[i].DeepCopyInto((*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 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.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)
|
||||
return
|
||||
}
|
||||
|
||||
// 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)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *StorageSpec) DeepCopyInto(out *StorageSpec) {
|
||||
*out = *in
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(meta_v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
in.Resources.DeepCopyInto(&out.Resources)
|
||||
in.VolumeClaimTemplate.DeepCopyInto(&out.VolumeClaimTemplate)
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
return
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue