mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-16 01:06:27 +00:00
feature: generate "apply configuration" types
This commit uses the `applyconfiguration-gen` tool to generate the "apply configuration" types for all monitoring types. It enables users to run server-side apply operations from Go code. Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
6e64d7dcc0
commit
b609a8bb6f
155 changed files with 16067 additions and 39 deletions
22
Makefile
22
Makefile
|
@ -39,7 +39,7 @@ API_DOC_GEN_BINARY=$(TOOLS_BIN_DIR)/gen-crd-api-reference-docs
|
|||
TOOLING=$(CONTROLLER_GEN_BINARY) $(GOBINDATA_BINARY) $(JB_BINARY) $(GOJSONTOYAML_BINARY) $(JSONNET_BINARY) $(JSONNETFMT_BINARY) $(SHELLCHECK_BINARY) $(PROMLINTER_BINARY) $(GOLANGCILINTER_BINARY) $(MDOX_BINARY) $(API_DOC_GEN_BINARY)
|
||||
|
||||
|
||||
K8S_GEN_BINARIES:=informer-gen lister-gen client-gen
|
||||
K8S_GEN_BINARIES:=informer-gen lister-gen client-gen applyconfiguration-gen
|
||||
K8S_GEN_ARGS:=--go-header-file $(shell pwd)/.header --v=1 --logtostderr
|
||||
|
||||
K8S_GEN_DEPS:=.header
|
||||
|
@ -124,15 +124,23 @@ $(DEEPCOPY_TARGETS): $(CONTROLLER_GEN_BINARY)
|
|||
|
||||
.PHONY: k8s-client-gen
|
||||
k8s-client-gen: $(K8S_GEN_DEPS)
|
||||
rm -rf pkg/client/{versioned,informers,listers}
|
||||
rm -rf pkg/client/{versioned,informers,listers,applyconfiguration}
|
||||
@echo ">> generating pkg/client/applyconfiguration..."
|
||||
$(APPLYCONFIGURATION_GEN_BINARY) \
|
||||
$(K8S_GEN_ARGS) \
|
||||
--input-dirs "$(GO_PKG)/pkg/apis/monitoring/v1,$(GO_PKG)/pkg/apis/monitoring/v1alpha1,$(GO_PKG)/pkg/apis/monitoring/v1beta1" \
|
||||
--output-package "$(GO_PKG)/pkg/client/applyconfiguration" \
|
||||
--output-base "."
|
||||
mv $(GO_PKG)/pkg/client/applyconfiguration pkg/client
|
||||
@echo ">> generating pkg/client/versioned..."
|
||||
$(CLIENT_GEN_BINARY) \
|
||||
$(K8S_GEN_ARGS) \
|
||||
--input-base "" \
|
||||
--clientset-name "versioned" \
|
||||
--input "$(GO_PKG)/pkg/apis/monitoring/v1,$(GO_PKG)/pkg/apis/monitoring/v1alpha1,$(GO_PKG)/pkg/apis/monitoring/v1beta1" \
|
||||
--output-package "$(GO_PKG)/pkg/client" \
|
||||
--output-base "."
|
||||
--input-base "" \
|
||||
--apply-configuration-package "$(GO_PKG)/pkg/client/applyconfiguration" \
|
||||
--clientset-name "versioned" \
|
||||
--input "$(GO_PKG)/pkg/apis/monitoring/v1,$(GO_PKG)/pkg/apis/monitoring/v1alpha1,$(GO_PKG)/pkg/apis/monitoring/v1beta1" \
|
||||
--output-package "$(GO_PKG)/pkg/client" \
|
||||
--output-base "."
|
||||
@echo ">> generating pkg/client/listers..."
|
||||
$(LISTER_GEN_BINARY) \
|
||||
$(K8S_GEN_ARGS) \
|
||||
|
|
60
pkg/client/applyconfiguration/internal/internal.go
Normal file
60
pkg/client/applyconfiguration/internal/internal.go
Normal file
|
@ -0,0 +1,60 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
typed "sigs.k8s.io/structured-merge-diff/v4/typed"
|
||||
)
|
||||
|
||||
func Parser() *typed.Parser {
|
||||
parserOnce.Do(func() {
|
||||
var err error
|
||||
parser, err = typed.NewParser(schemaYAML)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("Failed to parse schema: %v", err))
|
||||
}
|
||||
})
|
||||
return parser
|
||||
}
|
||||
|
||||
var parserOnce sync.Once
|
||||
var parser *typed.Parser
|
||||
var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: __untyped_atomic_
|
||||
scalar: untyped
|
||||
list:
|
||||
elementType:
|
||||
namedType: __untyped_atomic_
|
||||
elementRelationship: atomic
|
||||
map:
|
||||
elementType:
|
||||
namedType: __untyped_atomic_
|
||||
elementRelationship: atomic
|
||||
- name: __untyped_deduced_
|
||||
scalar: untyped
|
||||
list:
|
||||
elementType:
|
||||
namedType: __untyped_atomic_
|
||||
elementRelationship: atomic
|
||||
map:
|
||||
elementType:
|
||||
namedType: __untyped_deduced_
|
||||
elementRelationship: separable
|
||||
`)
|
42
pkg/client/applyconfiguration/monitoring/v1/alertingspec.go
Normal file
42
pkg/client/applyconfiguration/monitoring/v1/alertingspec.go
Normal file
|
@ -0,0 +1,42 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// AlertingSpecApplyConfiguration represents an declarative configuration of the AlertingSpec type for use
|
||||
// with apply.
|
||||
type AlertingSpecApplyConfiguration struct {
|
||||
Alertmanagers []AlertmanagerEndpointsApplyConfiguration `json:"alertmanagers,omitempty"`
|
||||
}
|
||||
|
||||
// AlertingSpecApplyConfiguration constructs an declarative configuration of the AlertingSpec type for use with
|
||||
// apply.
|
||||
func AlertingSpec() *AlertingSpecApplyConfiguration {
|
||||
return &AlertingSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithAlertmanagers adds the given value to the Alertmanagers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Alertmanagers field.
|
||||
func (b *AlertingSpecApplyConfiguration) WithAlertmanagers(values ...*AlertmanagerEndpointsApplyConfiguration) *AlertingSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithAlertmanagers")
|
||||
}
|
||||
b.Alertmanagers = append(b.Alertmanagers, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
217
pkg/client/applyconfiguration/monitoring/v1/alertmanager.go
Normal file
217
pkg/client/applyconfiguration/monitoring/v1/alertmanager.go
Normal file
|
@ -0,0 +1,217 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// AlertmanagerApplyConfiguration represents an declarative configuration of the Alertmanager type for use
|
||||
// with apply.
|
||||
type AlertmanagerApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *AlertmanagerSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
Status *AlertmanagerStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// Alertmanager constructs an declarative configuration of the Alertmanager type for use with
|
||||
// apply.
|
||||
func Alertmanager(name, namespace string) *AlertmanagerApplyConfiguration {
|
||||
b := &AlertmanagerApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("Alertmanager")
|
||||
b.WithAPIVersion("monitoring.coreos.com/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithKind(value string) *AlertmanagerApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithAPIVersion(value string) *AlertmanagerApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithName(value string) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithGenerateName(value string) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithNamespace(value string) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithUID(value types.UID) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithResourceVersion(value string) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithGeneration(value int64) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *AlertmanagerApplyConfiguration) WithLabels(entries map[string]string) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *AlertmanagerApplyConfiguration) WithAnnotations(entries map[string]string) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *AlertmanagerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *AlertmanagerApplyConfiguration) WithFinalizers(values ...string) *AlertmanagerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *AlertmanagerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithSpec(value *AlertmanagerSpecApplyConfiguration) *AlertmanagerApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Status field is set to the value of the last call.
|
||||
func (b *AlertmanagerApplyConfiguration) WithStatus(value *AlertmanagerStatusApplyConfiguration) *AlertmanagerApplyConfiguration {
|
||||
b.Status = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// AlertmanagerConfigMatcherStrategyApplyConfiguration represents an declarative configuration of the AlertmanagerConfigMatcherStrategy type for use
|
||||
// with apply.
|
||||
type AlertmanagerConfigMatcherStrategyApplyConfiguration struct {
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// AlertmanagerConfigMatcherStrategyApplyConfiguration constructs an declarative configuration of the AlertmanagerConfigMatcherStrategy type for use with
|
||||
// apply.
|
||||
func AlertmanagerConfigMatcherStrategy() *AlertmanagerConfigMatcherStrategyApplyConfiguration {
|
||||
return &AlertmanagerConfigMatcherStrategyApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigMatcherStrategyApplyConfiguration) WithType(value string) *AlertmanagerConfigMatcherStrategyApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// AlertmanagerConfigurationApplyConfiguration represents an declarative configuration of the AlertmanagerConfiguration type for use
|
||||
// with apply.
|
||||
type AlertmanagerConfigurationApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Global *AlertmanagerGlobalConfigApplyConfiguration `json:"global,omitempty"`
|
||||
Templates []SecretOrConfigMapApplyConfiguration `json:"templates,omitempty"`
|
||||
}
|
||||
|
||||
// AlertmanagerConfigurationApplyConfiguration constructs an declarative configuration of the AlertmanagerConfiguration type for use with
|
||||
// apply.
|
||||
func AlertmanagerConfiguration() *AlertmanagerConfigurationApplyConfiguration {
|
||||
return &AlertmanagerConfigurationApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigurationApplyConfiguration) WithName(value string) *AlertmanagerConfigurationApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGlobal sets the Global field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Global field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigurationApplyConfiguration) WithGlobal(value *AlertmanagerGlobalConfigApplyConfiguration) *AlertmanagerConfigurationApplyConfiguration {
|
||||
b.Global = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTemplates adds the given value to the Templates field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Templates field.
|
||||
func (b *AlertmanagerConfigurationApplyConfiguration) WithTemplates(values ...*SecretOrConfigMapApplyConfiguration) *AlertmanagerConfigurationApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTemplates")
|
||||
}
|
||||
b.Templates = append(b.Templates, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,141 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
// AlertmanagerEndpointsApplyConfiguration represents an declarative configuration of the AlertmanagerEndpoints type for use
|
||||
// with apply.
|
||||
type AlertmanagerEndpointsApplyConfiguration struct {
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Port *intstr.IntOrString `json:"port,omitempty"`
|
||||
Scheme *string `json:"scheme,omitempty"`
|
||||
PathPrefix *string `json:"pathPrefix,omitempty"`
|
||||
TLSConfig *TLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
BasicAuth *BasicAuthApplyConfiguration `json:"basicAuth,omitempty"`
|
||||
BearerTokenFile *string `json:"bearerTokenFile,omitempty"`
|
||||
Authorization *SafeAuthorizationApplyConfiguration `json:"authorization,omitempty"`
|
||||
APIVersion *string `json:"apiVersion,omitempty"`
|
||||
Timeout *monitoringv1.Duration `json:"timeout,omitempty"`
|
||||
EnableHttp2 *bool `json:"enableHttp2,omitempty"`
|
||||
}
|
||||
|
||||
// AlertmanagerEndpointsApplyConfiguration constructs an declarative configuration of the AlertmanagerEndpoints type for use with
|
||||
// apply.
|
||||
func AlertmanagerEndpoints() *AlertmanagerEndpointsApplyConfiguration {
|
||||
return &AlertmanagerEndpointsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithNamespace(value string) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithName(value string) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPort sets the Port field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Port field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithPort(value intstr.IntOrString) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.Port = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScheme sets the Scheme field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Scheme field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithScheme(value string) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.Scheme = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPathPrefix sets the PathPrefix field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PathPrefix field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithPathPrefix(value string) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.PathPrefix = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithTLSConfig(value *TLSConfigApplyConfiguration) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BasicAuth field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithBasicAuth(value *BasicAuthApplyConfiguration) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.BasicAuth = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerTokenFile sets the BearerTokenFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerTokenFile field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithBearerTokenFile(value string) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.BearerTokenFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthorization sets the Authorization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Authorization field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithAuthorization(value *SafeAuthorizationApplyConfiguration) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.Authorization = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithAPIVersion(value string) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTimeout sets the Timeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Timeout field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithTimeout(value monitoringv1.Duration) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.Timeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnableHttp2 sets the EnableHttp2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnableHttp2 field is set to the value of the last call.
|
||||
func (b *AlertmanagerEndpointsApplyConfiguration) WithEnableHttp2(value bool) *AlertmanagerEndpointsApplyConfiguration {
|
||||
b.EnableHttp2 = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
)
|
||||
|
||||
// AlertmanagerGlobalConfigApplyConfiguration represents an declarative configuration of the AlertmanagerGlobalConfig type for use
|
||||
// with apply.
|
||||
type AlertmanagerGlobalConfigApplyConfiguration struct {
|
||||
ResolveTimeout *v1.Duration `json:"resolveTimeout,omitempty"`
|
||||
HTTPConfig *HTTPConfigApplyConfiguration `json:"httpConfig,omitempty"`
|
||||
}
|
||||
|
||||
// AlertmanagerGlobalConfigApplyConfiguration constructs an declarative configuration of the AlertmanagerGlobalConfig type for use with
|
||||
// apply.
|
||||
func AlertmanagerGlobalConfig() *AlertmanagerGlobalConfigApplyConfiguration {
|
||||
return &AlertmanagerGlobalConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithResolveTimeout sets the ResolveTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResolveTimeout field is set to the value of the last call.
|
||||
func (b *AlertmanagerGlobalConfigApplyConfiguration) WithResolveTimeout(value v1.Duration) *AlertmanagerGlobalConfigApplyConfiguration {
|
||||
b.ResolveTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *AlertmanagerGlobalConfigApplyConfiguration) WithHTTPConfig(value *HTTPConfigApplyConfiguration) *AlertmanagerGlobalConfigApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
479
pkg/client/applyconfiguration/monitoring/v1/alertmanagerspec.go
Normal file
479
pkg/client/applyconfiguration/monitoring/v1/alertmanagerspec.go
Normal file
|
@ -0,0 +1,479 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// AlertmanagerSpecApplyConfiguration represents an declarative configuration of the AlertmanagerSpec type for use
|
||||
// with apply.
|
||||
type AlertmanagerSpecApplyConfiguration struct {
|
||||
PodMetadata *EmbeddedObjectMetadataApplyConfiguration `json:"podMetadata,omitempty"`
|
||||
Image *string `json:"image,omitempty"`
|
||||
ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
|
||||
Version *string `json:"version,omitempty"`
|
||||
Tag *string `json:"tag,omitempty"`
|
||||
SHA *string `json:"sha,omitempty"`
|
||||
BaseImage *string `json:"baseImage,omitempty"`
|
||||
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
|
||||
Secrets []string `json:"secrets,omitempty"`
|
||||
ConfigMaps []string `json:"configMaps,omitempty"`
|
||||
ConfigSecret *string `json:"configSecret,omitempty"`
|
||||
LogLevel *string `json:"logLevel,omitempty"`
|
||||
LogFormat *string `json:"logFormat,omitempty"`
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
Retention *monitoringv1.GoDuration `json:"retention,omitempty"`
|
||||
Storage *StorageSpecApplyConfiguration `json:"storage,omitempty"`
|
||||
Volumes []corev1.Volume `json:"volumes,omitempty"`
|
||||
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
|
||||
ExternalURL *string `json:"externalUrl,omitempty"`
|
||||
RoutePrefix *string `json:"routePrefix,omitempty"`
|
||||
Paused *bool `json:"paused,omitempty"`
|
||||
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
|
||||
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
|
||||
Affinity *corev1.Affinity `json:"affinity,omitempty"`
|
||||
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
|
||||
TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
|
||||
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
|
||||
ServiceAccountName *string `json:"serviceAccountName,omitempty"`
|
||||
ListenLocal *bool `json:"listenLocal,omitempty"`
|
||||
Containers []corev1.Container `json:"containers,omitempty"`
|
||||
InitContainers []corev1.Container `json:"initContainers,omitempty"`
|
||||
PriorityClassName *string `json:"priorityClassName,omitempty"`
|
||||
AdditionalPeers []string `json:"additionalPeers,omitempty"`
|
||||
ClusterAdvertiseAddress *string `json:"clusterAdvertiseAddress,omitempty"`
|
||||
ClusterGossipInterval *monitoringv1.GoDuration `json:"clusterGossipInterval,omitempty"`
|
||||
ClusterPushpullInterval *monitoringv1.GoDuration `json:"clusterPushpullInterval,omitempty"`
|
||||
ClusterPeerTimeout *monitoringv1.GoDuration `json:"clusterPeerTimeout,omitempty"`
|
||||
PortName *string `json:"portName,omitempty"`
|
||||
ForceEnableClusterMode *bool `json:"forceEnableClusterMode,omitempty"`
|
||||
AlertmanagerConfigSelector *metav1.LabelSelector `json:"alertmanagerConfigSelector,omitempty"`
|
||||
AlertmanagerConfigMatcherStrategy *AlertmanagerConfigMatcherStrategyApplyConfiguration `json:"alertmanagerConfigMatcherStrategy,omitempty"`
|
||||
AlertmanagerConfigNamespaceSelector *metav1.LabelSelector `json:"alertmanagerConfigNamespaceSelector,omitempty"`
|
||||
MinReadySeconds *uint32 `json:"minReadySeconds,omitempty"`
|
||||
HostAliases []HostAliasApplyConfiguration `json:"hostAliases,omitempty"`
|
||||
Web *AlertmanagerWebSpecApplyConfiguration `json:"web,omitempty"`
|
||||
AlertmanagerConfiguration *AlertmanagerConfigurationApplyConfiguration `json:"alertmanagerConfiguration,omitempty"`
|
||||
}
|
||||
|
||||
// AlertmanagerSpecApplyConfiguration constructs an declarative configuration of the AlertmanagerSpec type for use with
|
||||
// apply.
|
||||
func AlertmanagerSpec() *AlertmanagerSpecApplyConfiguration {
|
||||
return &AlertmanagerSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPodMetadata sets the PodMetadata field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodMetadata field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithPodMetadata(value *EmbeddedObjectMetadataApplyConfiguration) *AlertmanagerSpecApplyConfiguration {
|
||||
b.PodMetadata = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImage sets the Image field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Image field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithImage(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.Image = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ImagePullPolicy field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithImagePullPolicy(value corev1.PullPolicy) *AlertmanagerSpecApplyConfiguration {
|
||||
b.ImagePullPolicy = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVersion sets the Version field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Version field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithVersion(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.Version = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTag sets the Tag field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Tag field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithTag(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.Tag = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSHA sets the SHA field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SHA field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithSHA(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.SHA = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBaseImage sets the BaseImage field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BaseImage field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithBaseImage(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.BaseImage = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImagePullSecrets adds the given value to the ImagePullSecrets field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ImagePullSecrets field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithImagePullSecrets(values ...corev1.LocalObjectReference) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ImagePullSecrets = append(b.ImagePullSecrets, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSecrets adds the given value to the Secrets field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Secrets field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithSecrets(values ...string) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Secrets = append(b.Secrets, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConfigMaps adds the given value to the ConfigMaps field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ConfigMaps field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithConfigMaps(values ...string) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ConfigMaps = append(b.ConfigMaps, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConfigSecret sets the ConfigSecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ConfigSecret field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithConfigSecret(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.ConfigSecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLogLevel sets the LogLevel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LogLevel field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithLogLevel(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.LogLevel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLogFormat sets the LogFormat field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LogFormat field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithLogFormat(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.LogFormat = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplicas sets the Replicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Replicas field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithReplicas(value int32) *AlertmanagerSpecApplyConfiguration {
|
||||
b.Replicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRetention sets the Retention field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Retention field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithRetention(value monitoringv1.GoDuration) *AlertmanagerSpecApplyConfiguration {
|
||||
b.Retention = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStorage sets the Storage field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Storage field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithStorage(value *StorageSpecApplyConfiguration) *AlertmanagerSpecApplyConfiguration {
|
||||
b.Storage = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVolumes adds the given value to the Volumes field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Volumes field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithVolumes(values ...corev1.Volume) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Volumes = append(b.Volumes, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the VolumeMounts field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithVolumeMounts(values ...corev1.VolumeMount) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.VolumeMounts = append(b.VolumeMounts, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExternalURL sets the ExternalURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ExternalURL field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithExternalURL(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.ExternalURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRoutePrefix sets the RoutePrefix field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RoutePrefix field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithRoutePrefix(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.RoutePrefix = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPaused sets the Paused field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Paused field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithPaused(value bool) *AlertmanagerSpecApplyConfiguration {
|
||||
b.Paused = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the NodeSelector field,
|
||||
// overwriting an existing map entries in NodeSelector field with the same key.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithNodeSelector(entries map[string]string) *AlertmanagerSpecApplyConfiguration {
|
||||
if b.NodeSelector == nil && len(entries) > 0 {
|
||||
b.NodeSelector = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.NodeSelector[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResources sets the Resources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Resources field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithResources(value corev1.ResourceRequirements) *AlertmanagerSpecApplyConfiguration {
|
||||
b.Resources = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAffinity sets the Affinity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Affinity field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithAffinity(value corev1.Affinity) *AlertmanagerSpecApplyConfiguration {
|
||||
b.Affinity = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Tolerations field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithTolerations(values ...corev1.Toleration) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Tolerations = append(b.Tolerations, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithTopologySpreadConstraints(values ...corev1.TopologySpreadConstraint) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SecurityContext field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithSecurityContext(value corev1.PodSecurityContext) *AlertmanagerSpecApplyConfiguration {
|
||||
b.SecurityContext = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServiceAccountName field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithServiceAccountName(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.ServiceAccountName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithListenLocal sets the ListenLocal field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ListenLocal field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithListenLocal(value bool) *AlertmanagerSpecApplyConfiguration {
|
||||
b.ListenLocal = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContainers adds the given value to the Containers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Containers field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithContainers(values ...corev1.Container) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Containers = append(b.Containers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInitContainers adds the given value to the InitContainers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the InitContainers field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithInitContainers(values ...corev1.Container) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.InitContainers = append(b.InitContainers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPriorityClassName sets the PriorityClassName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PriorityClassName field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithPriorityClassName(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.PriorityClassName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAdditionalPeers adds the given value to the AdditionalPeers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the AdditionalPeers field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithAdditionalPeers(values ...string) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.AdditionalPeers = append(b.AdditionalPeers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithClusterAdvertiseAddress sets the ClusterAdvertiseAddress field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ClusterAdvertiseAddress field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithClusterAdvertiseAddress(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.ClusterAdvertiseAddress = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithClusterGossipInterval sets the ClusterGossipInterval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ClusterGossipInterval field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithClusterGossipInterval(value monitoringv1.GoDuration) *AlertmanagerSpecApplyConfiguration {
|
||||
b.ClusterGossipInterval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithClusterPushpullInterval sets the ClusterPushpullInterval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ClusterPushpullInterval field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithClusterPushpullInterval(value monitoringv1.GoDuration) *AlertmanagerSpecApplyConfiguration {
|
||||
b.ClusterPushpullInterval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithClusterPeerTimeout sets the ClusterPeerTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ClusterPeerTimeout field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithClusterPeerTimeout(value monitoringv1.GoDuration) *AlertmanagerSpecApplyConfiguration {
|
||||
b.ClusterPeerTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPortName sets the PortName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PortName field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithPortName(value string) *AlertmanagerSpecApplyConfiguration {
|
||||
b.PortName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithForceEnableClusterMode sets the ForceEnableClusterMode field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ForceEnableClusterMode field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithForceEnableClusterMode(value bool) *AlertmanagerSpecApplyConfiguration {
|
||||
b.ForceEnableClusterMode = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlertmanagerConfigSelector sets the AlertmanagerConfigSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AlertmanagerConfigSelector field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithAlertmanagerConfigSelector(value metav1.LabelSelector) *AlertmanagerSpecApplyConfiguration {
|
||||
b.AlertmanagerConfigSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlertmanagerConfigMatcherStrategy sets the AlertmanagerConfigMatcherStrategy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AlertmanagerConfigMatcherStrategy field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithAlertmanagerConfigMatcherStrategy(value *AlertmanagerConfigMatcherStrategyApplyConfiguration) *AlertmanagerSpecApplyConfiguration {
|
||||
b.AlertmanagerConfigMatcherStrategy = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlertmanagerConfigNamespaceSelector sets the AlertmanagerConfigNamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AlertmanagerConfigNamespaceSelector field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithAlertmanagerConfigNamespaceSelector(value metav1.LabelSelector) *AlertmanagerSpecApplyConfiguration {
|
||||
b.AlertmanagerConfigNamespaceSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MinReadySeconds field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithMinReadySeconds(value uint32) *AlertmanagerSpecApplyConfiguration {
|
||||
b.MinReadySeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHostAliases adds the given value to the HostAliases field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the HostAliases field.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithHostAliases(values ...*HostAliasApplyConfiguration) *AlertmanagerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithHostAliases")
|
||||
}
|
||||
b.HostAliases = append(b.HostAliases, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWeb sets the Web field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Web field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithWeb(value *AlertmanagerWebSpecApplyConfiguration) *AlertmanagerSpecApplyConfiguration {
|
||||
b.Web = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlertmanagerConfiguration sets the AlertmanagerConfiguration field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AlertmanagerConfiguration field is set to the value of the last call.
|
||||
func (b *AlertmanagerSpecApplyConfiguration) WithAlertmanagerConfiguration(value *AlertmanagerConfigurationApplyConfiguration) *AlertmanagerSpecApplyConfiguration {
|
||||
b.AlertmanagerConfiguration = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// AlertmanagerStatusApplyConfiguration represents an declarative configuration of the AlertmanagerStatus type for use
|
||||
// with apply.
|
||||
type AlertmanagerStatusApplyConfiguration struct {
|
||||
Paused *bool `json:"paused,omitempty"`
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"`
|
||||
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
|
||||
UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"`
|
||||
}
|
||||
|
||||
// AlertmanagerStatusApplyConfiguration constructs an declarative configuration of the AlertmanagerStatus type for use with
|
||||
// apply.
|
||||
func AlertmanagerStatus() *AlertmanagerStatusApplyConfiguration {
|
||||
return &AlertmanagerStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPaused sets the Paused field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Paused field is set to the value of the last call.
|
||||
func (b *AlertmanagerStatusApplyConfiguration) WithPaused(value bool) *AlertmanagerStatusApplyConfiguration {
|
||||
b.Paused = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplicas sets the Replicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Replicas field is set to the value of the last call.
|
||||
func (b *AlertmanagerStatusApplyConfiguration) WithReplicas(value int32) *AlertmanagerStatusApplyConfiguration {
|
||||
b.Replicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUpdatedReplicas sets the UpdatedReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UpdatedReplicas field is set to the value of the last call.
|
||||
func (b *AlertmanagerStatusApplyConfiguration) WithUpdatedReplicas(value int32) *AlertmanagerStatusApplyConfiguration {
|
||||
b.UpdatedReplicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AvailableReplicas field is set to the value of the last call.
|
||||
func (b *AlertmanagerStatusApplyConfiguration) WithAvailableReplicas(value int32) *AlertmanagerStatusApplyConfiguration {
|
||||
b.AvailableReplicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUnavailableReplicas sets the UnavailableReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UnavailableReplicas field is set to the value of the last call.
|
||||
func (b *AlertmanagerStatusApplyConfiguration) WithUnavailableReplicas(value int32) *AlertmanagerStatusApplyConfiguration {
|
||||
b.UnavailableReplicas = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// AlertmanagerWebSpecApplyConfiguration represents an declarative configuration of the AlertmanagerWebSpec type for use
|
||||
// with apply.
|
||||
type AlertmanagerWebSpecApplyConfiguration struct {
|
||||
WebConfigFileFieldsApplyConfiguration `json:",inline"`
|
||||
}
|
||||
|
||||
// AlertmanagerWebSpecApplyConfiguration constructs an declarative configuration of the AlertmanagerWebSpec type for use with
|
||||
// apply.
|
||||
func AlertmanagerWebSpec() *AlertmanagerWebSpecApplyConfiguration {
|
||||
return &AlertmanagerWebSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *AlertmanagerWebSpecApplyConfiguration) WithTLSConfig(value *WebTLSConfigApplyConfiguration) *AlertmanagerWebSpecApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *AlertmanagerWebSpecApplyConfiguration) WithHTTPConfig(value *WebHTTPConfigApplyConfiguration) *AlertmanagerWebSpecApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// APIServerConfigApplyConfiguration represents an declarative configuration of the APIServerConfig type for use
|
||||
// with apply.
|
||||
type APIServerConfigApplyConfiguration struct {
|
||||
Host *string `json:"host,omitempty"`
|
||||
BasicAuth *BasicAuthApplyConfiguration `json:"basicAuth,omitempty"`
|
||||
BearerToken *string `json:"bearerToken,omitempty"`
|
||||
BearerTokenFile *string `json:"bearerTokenFile,omitempty"`
|
||||
TLSConfig *TLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
Authorization *AuthorizationApplyConfiguration `json:"authorization,omitempty"`
|
||||
}
|
||||
|
||||
// APIServerConfigApplyConfiguration constructs an declarative configuration of the APIServerConfig type for use with
|
||||
// apply.
|
||||
func APIServerConfig() *APIServerConfigApplyConfiguration {
|
||||
return &APIServerConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithHost sets the Host field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Host field is set to the value of the last call.
|
||||
func (b *APIServerConfigApplyConfiguration) WithHost(value string) *APIServerConfigApplyConfiguration {
|
||||
b.Host = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BasicAuth field is set to the value of the last call.
|
||||
func (b *APIServerConfigApplyConfiguration) WithBasicAuth(value *BasicAuthApplyConfiguration) *APIServerConfigApplyConfiguration {
|
||||
b.BasicAuth = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerToken sets the BearerToken field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerToken field is set to the value of the last call.
|
||||
func (b *APIServerConfigApplyConfiguration) WithBearerToken(value string) *APIServerConfigApplyConfiguration {
|
||||
b.BearerToken = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerTokenFile sets the BearerTokenFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerTokenFile field is set to the value of the last call.
|
||||
func (b *APIServerConfigApplyConfiguration) WithBearerTokenFile(value string) *APIServerConfigApplyConfiguration {
|
||||
b.BearerTokenFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *APIServerConfigApplyConfiguration) WithTLSConfig(value *TLSConfigApplyConfiguration) *APIServerConfigApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthorization sets the Authorization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Authorization field is set to the value of the last call.
|
||||
func (b *APIServerConfigApplyConfiguration) WithAuthorization(value *AuthorizationApplyConfiguration) *APIServerConfigApplyConfiguration {
|
||||
b.Authorization = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ArbitraryFSAccessThroughSMsConfigApplyConfiguration represents an declarative configuration of the ArbitraryFSAccessThroughSMsConfig type for use
|
||||
// with apply.
|
||||
type ArbitraryFSAccessThroughSMsConfigApplyConfiguration struct {
|
||||
Deny *bool `json:"deny,omitempty"`
|
||||
}
|
||||
|
||||
// ArbitraryFSAccessThroughSMsConfigApplyConfiguration constructs an declarative configuration of the ArbitraryFSAccessThroughSMsConfig type for use with
|
||||
// apply.
|
||||
func ArbitraryFSAccessThroughSMsConfig() *ArbitraryFSAccessThroughSMsConfigApplyConfiguration {
|
||||
return &ArbitraryFSAccessThroughSMsConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithDeny sets the Deny field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Deny field is set to the value of the last call.
|
||||
func (b *ArbitraryFSAccessThroughSMsConfigApplyConfiguration) WithDeny(value bool) *ArbitraryFSAccessThroughSMsConfigApplyConfiguration {
|
||||
b.Deny = &value
|
||||
return b
|
||||
}
|
46
pkg/client/applyconfiguration/monitoring/v1/argument.go
Normal file
46
pkg/client/applyconfiguration/monitoring/v1/argument.go
Normal file
|
@ -0,0 +1,46 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ArgumentApplyConfiguration represents an declarative configuration of the Argument type for use
|
||||
// with apply.
|
||||
type ArgumentApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// ArgumentApplyConfiguration constructs an declarative configuration of the Argument type for use with
|
||||
// apply.
|
||||
func Argument() *ArgumentApplyConfiguration {
|
||||
return &ArgumentApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ArgumentApplyConfiguration) WithName(value string) *ArgumentApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Value field is set to the value of the last call.
|
||||
func (b *ArgumentApplyConfiguration) WithValue(value string) *ArgumentApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// AttachMetadataApplyConfiguration represents an declarative configuration of the AttachMetadata type for use
|
||||
// with apply.
|
||||
type AttachMetadataApplyConfiguration struct {
|
||||
Node *bool `json:"node,omitempty"`
|
||||
}
|
||||
|
||||
// AttachMetadataApplyConfiguration constructs an declarative configuration of the AttachMetadata type for use with
|
||||
// apply.
|
||||
func AttachMetadata() *AttachMetadataApplyConfiguration {
|
||||
return &AttachMetadataApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNode sets the Node field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Node field is set to the value of the last call.
|
||||
func (b *AttachMetadataApplyConfiguration) WithNode(value bool) *AttachMetadataApplyConfiguration {
|
||||
b.Node = &value
|
||||
return b
|
||||
}
|
58
pkg/client/applyconfiguration/monitoring/v1/authorization.go
Normal file
58
pkg/client/applyconfiguration/monitoring/v1/authorization.go
Normal file
|
@ -0,0 +1,58 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// AuthorizationApplyConfiguration represents an declarative configuration of the Authorization type for use
|
||||
// with apply.
|
||||
type AuthorizationApplyConfiguration struct {
|
||||
SafeAuthorizationApplyConfiguration `json:",inline"`
|
||||
CredentialsFile *string `json:"credentialsFile,omitempty"`
|
||||
}
|
||||
|
||||
// AuthorizationApplyConfiguration constructs an declarative configuration of the Authorization type for use with
|
||||
// apply.
|
||||
func Authorization() *AuthorizationApplyConfiguration {
|
||||
return &AuthorizationApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *AuthorizationApplyConfiguration) WithType(value string) *AuthorizationApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCredentials sets the Credentials field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Credentials field is set to the value of the last call.
|
||||
func (b *AuthorizationApplyConfiguration) WithCredentials(value corev1.SecretKeySelector) *AuthorizationApplyConfiguration {
|
||||
b.Credentials = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCredentialsFile sets the CredentialsFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CredentialsFile field is set to the value of the last call.
|
||||
func (b *AuthorizationApplyConfiguration) WithCredentialsFile(value string) *AuthorizationApplyConfiguration {
|
||||
b.CredentialsFile = &value
|
||||
return b
|
||||
}
|
50
pkg/client/applyconfiguration/monitoring/v1/basicauth.go
Normal file
50
pkg/client/applyconfiguration/monitoring/v1/basicauth.go
Normal file
|
@ -0,0 +1,50 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// BasicAuthApplyConfiguration represents an declarative configuration of the BasicAuth type for use
|
||||
// with apply.
|
||||
type BasicAuthApplyConfiguration struct {
|
||||
Username *v1.SecretKeySelector `json:"username,omitempty"`
|
||||
Password *v1.SecretKeySelector `json:"password,omitempty"`
|
||||
}
|
||||
|
||||
// BasicAuthApplyConfiguration constructs an declarative configuration of the BasicAuth type for use with
|
||||
// apply.
|
||||
func BasicAuth() *BasicAuthApplyConfiguration {
|
||||
return &BasicAuthApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithUsername sets the Username field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Username field is set to the value of the last call.
|
||||
func (b *BasicAuthApplyConfiguration) WithUsername(value v1.SecretKeySelector) *BasicAuthApplyConfiguration {
|
||||
b.Username = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPassword sets the Password field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Password field is set to the value of the last call.
|
||||
func (b *BasicAuthApplyConfiguration) WithPassword(value v1.SecretKeySelector) *BasicAuthApplyConfiguration {
|
||||
b.Password = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,653 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// CommonPrometheusFieldsApplyConfiguration represents an declarative configuration of the CommonPrometheusFields type for use
|
||||
// with apply.
|
||||
type CommonPrometheusFieldsApplyConfiguration struct {
|
||||
PodMetadata *EmbeddedObjectMetadataApplyConfiguration `json:"podMetadata,omitempty"`
|
||||
ServiceMonitorSelector *metav1.LabelSelector `json:"serviceMonitorSelector,omitempty"`
|
||||
ServiceMonitorNamespaceSelector *metav1.LabelSelector `json:"serviceMonitorNamespaceSelector,omitempty"`
|
||||
PodMonitorSelector *metav1.LabelSelector `json:"podMonitorSelector,omitempty"`
|
||||
PodMonitorNamespaceSelector *metav1.LabelSelector `json:"podMonitorNamespaceSelector,omitempty"`
|
||||
ProbeSelector *metav1.LabelSelector `json:"probeSelector,omitempty"`
|
||||
ProbeNamespaceSelector *metav1.LabelSelector `json:"probeNamespaceSelector,omitempty"`
|
||||
Version *string `json:"version,omitempty"`
|
||||
Paused *bool `json:"paused,omitempty"`
|
||||
Image *string `json:"image,omitempty"`
|
||||
ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
|
||||
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
Shards *int32 `json:"shards,omitempty"`
|
||||
ReplicaExternalLabelName *string `json:"replicaExternalLabelName,omitempty"`
|
||||
PrometheusExternalLabelName *string `json:"prometheusExternalLabelName,omitempty"`
|
||||
LogLevel *string `json:"logLevel,omitempty"`
|
||||
LogFormat *string `json:"logFormat,omitempty"`
|
||||
ScrapeInterval *monitoringv1.Duration `json:"scrapeInterval,omitempty"`
|
||||
ScrapeTimeout *monitoringv1.Duration `json:"scrapeTimeout,omitempty"`
|
||||
ExternalLabels map[string]string `json:"externalLabels,omitempty"`
|
||||
EnableRemoteWriteReceiver *bool `json:"enableRemoteWriteReceiver,omitempty"`
|
||||
EnableFeatures []string `json:"enableFeatures,omitempty"`
|
||||
ExternalURL *string `json:"externalUrl,omitempty"`
|
||||
RoutePrefix *string `json:"routePrefix,omitempty"`
|
||||
Storage *StorageSpecApplyConfiguration `json:"storage,omitempty"`
|
||||
Volumes []corev1.Volume `json:"volumes,omitempty"`
|
||||
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
|
||||
Web *PrometheusWebSpecApplyConfiguration `json:"web,omitempty"`
|
||||
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
|
||||
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
|
||||
ServiceAccountName *string `json:"serviceAccountName,omitempty"`
|
||||
Secrets []string `json:"secrets,omitempty"`
|
||||
ConfigMaps []string `json:"configMaps,omitempty"`
|
||||
Affinity *corev1.Affinity `json:"affinity,omitempty"`
|
||||
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
|
||||
TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
|
||||
RemoteWrite []RemoteWriteSpecApplyConfiguration `json:"remoteWrite,omitempty"`
|
||||
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
|
||||
ListenLocal *bool `json:"listenLocal,omitempty"`
|
||||
Containers []corev1.Container `json:"containers,omitempty"`
|
||||
InitContainers []corev1.Container `json:"initContainers,omitempty"`
|
||||
AdditionalScrapeConfigs *corev1.SecretKeySelector `json:"additionalScrapeConfigs,omitempty"`
|
||||
APIServerConfig *APIServerConfigApplyConfiguration `json:"apiserverConfig,omitempty"`
|
||||
PriorityClassName *string `json:"priorityClassName,omitempty"`
|
||||
PortName *string `json:"portName,omitempty"`
|
||||
ArbitraryFSAccessThroughSMs *ArbitraryFSAccessThroughSMsConfigApplyConfiguration `json:"arbitraryFSAccessThroughSMs,omitempty"`
|
||||
OverrideHonorLabels *bool `json:"overrideHonorLabels,omitempty"`
|
||||
OverrideHonorTimestamps *bool `json:"overrideHonorTimestamps,omitempty"`
|
||||
IgnoreNamespaceSelectors *bool `json:"ignoreNamespaceSelectors,omitempty"`
|
||||
EnforcedNamespaceLabel *string `json:"enforcedNamespaceLabel,omitempty"`
|
||||
EnforcedSampleLimit *uint64 `json:"enforcedSampleLimit,omitempty"`
|
||||
EnforcedTargetLimit *uint64 `json:"enforcedTargetLimit,omitempty"`
|
||||
EnforcedLabelLimit *uint64 `json:"enforcedLabelLimit,omitempty"`
|
||||
EnforcedLabelNameLengthLimit *uint64 `json:"enforcedLabelNameLengthLimit,omitempty"`
|
||||
EnforcedLabelValueLengthLimit *uint64 `json:"enforcedLabelValueLengthLimit,omitempty"`
|
||||
EnforcedBodySizeLimit *monitoringv1.ByteSize `json:"enforcedBodySizeLimit,omitempty"`
|
||||
MinReadySeconds *uint32 `json:"minReadySeconds,omitempty"`
|
||||
HostAliases []HostAliasApplyConfiguration `json:"hostAliases,omitempty"`
|
||||
AdditionalArgs []ArgumentApplyConfiguration `json:"additionalArgs,omitempty"`
|
||||
WALCompression *bool `json:"walCompression,omitempty"`
|
||||
ExcludedFromEnforcement []ObjectReferenceApplyConfiguration `json:"excludedFromEnforcement,omitempty"`
|
||||
HostNetwork *bool `json:"hostNetwork,omitempty"`
|
||||
}
|
||||
|
||||
// CommonPrometheusFieldsApplyConfiguration constructs an declarative configuration of the CommonPrometheusFields type for use with
|
||||
// apply.
|
||||
func CommonPrometheusFields() *CommonPrometheusFieldsApplyConfiguration {
|
||||
return &CommonPrometheusFieldsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPodMetadata sets the PodMetadata field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodMetadata field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithPodMetadata(value *EmbeddedObjectMetadataApplyConfiguration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.PodMetadata = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceMonitorSelector sets the ServiceMonitorSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServiceMonitorSelector field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithServiceMonitorSelector(value metav1.LabelSelector) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ServiceMonitorSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceMonitorNamespaceSelector sets the ServiceMonitorNamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServiceMonitorNamespaceSelector field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithServiceMonitorNamespaceSelector(value metav1.LabelSelector) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ServiceMonitorNamespaceSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodMonitorSelector sets the PodMonitorSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodMonitorSelector field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithPodMonitorSelector(value metav1.LabelSelector) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.PodMonitorSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodMonitorNamespaceSelector sets the PodMonitorNamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodMonitorNamespaceSelector field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithPodMonitorNamespaceSelector(value metav1.LabelSelector) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.PodMonitorNamespaceSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProbeSelector sets the ProbeSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProbeSelector field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithProbeSelector(value metav1.LabelSelector) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ProbeSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProbeNamespaceSelector sets the ProbeNamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProbeNamespaceSelector field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithProbeNamespaceSelector(value metav1.LabelSelector) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ProbeNamespaceSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVersion sets the Version field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Version field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithVersion(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.Version = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPaused sets the Paused field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Paused field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithPaused(value bool) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.Paused = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImage sets the Image field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Image field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithImage(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.Image = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ImagePullPolicy field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithImagePullPolicy(value corev1.PullPolicy) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ImagePullPolicy = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImagePullSecrets adds the given value to the ImagePullSecrets field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ImagePullSecrets field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithImagePullSecrets(values ...corev1.LocalObjectReference) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ImagePullSecrets = append(b.ImagePullSecrets, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplicas sets the Replicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Replicas field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithReplicas(value int32) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.Replicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShards sets the Shards field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Shards field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithShards(value int32) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.Shards = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplicaExternalLabelName sets the ReplicaExternalLabelName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ReplicaExternalLabelName field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithReplicaExternalLabelName(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ReplicaExternalLabelName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPrometheusExternalLabelName sets the PrometheusExternalLabelName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PrometheusExternalLabelName field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithPrometheusExternalLabelName(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.PrometheusExternalLabelName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLogLevel sets the LogLevel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LogLevel field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithLogLevel(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.LogLevel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLogFormat sets the LogFormat field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LogFormat field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithLogFormat(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.LogFormat = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScrapeInterval sets the ScrapeInterval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ScrapeInterval field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithScrapeInterval(value monitoringv1.Duration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ScrapeInterval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScrapeTimeout sets the ScrapeTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ScrapeTimeout field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithScrapeTimeout(value monitoringv1.Duration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ScrapeTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExternalLabels puts the entries into the ExternalLabels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the ExternalLabels field,
|
||||
// overwriting an existing map entries in ExternalLabels field with the same key.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithExternalLabels(entries map[string]string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
if b.ExternalLabels == nil && len(entries) > 0 {
|
||||
b.ExternalLabels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ExternalLabels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnableRemoteWriteReceiver sets the EnableRemoteWriteReceiver field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnableRemoteWriteReceiver field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithEnableRemoteWriteReceiver(value bool) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.EnableRemoteWriteReceiver = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnableFeatures adds the given value to the EnableFeatures field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the EnableFeatures field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithEnableFeatures(values ...string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
b.EnableFeatures = append(b.EnableFeatures, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExternalURL sets the ExternalURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ExternalURL field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithExternalURL(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ExternalURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRoutePrefix sets the RoutePrefix field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RoutePrefix field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithRoutePrefix(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.RoutePrefix = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStorage sets the Storage field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Storage field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithStorage(value *StorageSpecApplyConfiguration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.Storage = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVolumes adds the given value to the Volumes field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Volumes field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithVolumes(values ...corev1.Volume) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Volumes = append(b.Volumes, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the VolumeMounts field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithVolumeMounts(values ...corev1.VolumeMount) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
b.VolumeMounts = append(b.VolumeMounts, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWeb sets the Web field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Web field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithWeb(value *PrometheusWebSpecApplyConfiguration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.Web = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResources sets the Resources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Resources field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithResources(value corev1.ResourceRequirements) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.Resources = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the NodeSelector field,
|
||||
// overwriting an existing map entries in NodeSelector field with the same key.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithNodeSelector(entries map[string]string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
if b.NodeSelector == nil && len(entries) > 0 {
|
||||
b.NodeSelector = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.NodeSelector[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServiceAccountName field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithServiceAccountName(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ServiceAccountName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSecrets adds the given value to the Secrets field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Secrets field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithSecrets(values ...string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Secrets = append(b.Secrets, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConfigMaps adds the given value to the ConfigMaps field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ConfigMaps field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithConfigMaps(values ...string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ConfigMaps = append(b.ConfigMaps, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAffinity sets the Affinity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Affinity field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithAffinity(value corev1.Affinity) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.Affinity = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Tolerations field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithTolerations(values ...corev1.Toleration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Tolerations = append(b.Tolerations, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithTopologySpreadConstraints(values ...corev1.TopologySpreadConstraint) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRemoteWrite adds the given value to the RemoteWrite field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the RemoteWrite field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithRemoteWrite(values ...*RemoteWriteSpecApplyConfiguration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRemoteWrite")
|
||||
}
|
||||
b.RemoteWrite = append(b.RemoteWrite, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SecurityContext field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithSecurityContext(value corev1.PodSecurityContext) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.SecurityContext = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithListenLocal sets the ListenLocal field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ListenLocal field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithListenLocal(value bool) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ListenLocal = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContainers adds the given value to the Containers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Containers field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithContainers(values ...corev1.Container) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Containers = append(b.Containers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInitContainers adds the given value to the InitContainers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the InitContainers field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithInitContainers(values ...corev1.Container) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
b.InitContainers = append(b.InitContainers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAdditionalScrapeConfigs sets the AdditionalScrapeConfigs field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AdditionalScrapeConfigs field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithAdditionalScrapeConfigs(value corev1.SecretKeySelector) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.AdditionalScrapeConfigs = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIServerConfig sets the APIServerConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIServerConfig field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithAPIServerConfig(value *APIServerConfigApplyConfiguration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.APIServerConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPriorityClassName sets the PriorityClassName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PriorityClassName field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithPriorityClassName(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.PriorityClassName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPortName sets the PortName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PortName field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithPortName(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.PortName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithArbitraryFSAccessThroughSMs sets the ArbitraryFSAccessThroughSMs field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ArbitraryFSAccessThroughSMs field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithArbitraryFSAccessThroughSMs(value *ArbitraryFSAccessThroughSMsConfigApplyConfiguration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.ArbitraryFSAccessThroughSMs = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOverrideHonorLabels sets the OverrideHonorLabels field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OverrideHonorLabels field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithOverrideHonorLabels(value bool) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.OverrideHonorLabels = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOverrideHonorTimestamps sets the OverrideHonorTimestamps field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OverrideHonorTimestamps field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithOverrideHonorTimestamps(value bool) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.OverrideHonorTimestamps = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIgnoreNamespaceSelectors sets the IgnoreNamespaceSelectors field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IgnoreNamespaceSelectors field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithIgnoreNamespaceSelectors(value bool) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.IgnoreNamespaceSelectors = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedNamespaceLabel sets the EnforcedNamespaceLabel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedNamespaceLabel field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithEnforcedNamespaceLabel(value string) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.EnforcedNamespaceLabel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedSampleLimit sets the EnforcedSampleLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedSampleLimit field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithEnforcedSampleLimit(value uint64) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.EnforcedSampleLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedTargetLimit sets the EnforcedTargetLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedTargetLimit field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithEnforcedTargetLimit(value uint64) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.EnforcedTargetLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedLabelLimit sets the EnforcedLabelLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedLabelLimit field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithEnforcedLabelLimit(value uint64) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.EnforcedLabelLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedLabelNameLengthLimit sets the EnforcedLabelNameLengthLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedLabelNameLengthLimit field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithEnforcedLabelNameLengthLimit(value uint64) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.EnforcedLabelNameLengthLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedLabelValueLengthLimit sets the EnforcedLabelValueLengthLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedLabelValueLengthLimit field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithEnforcedLabelValueLengthLimit(value uint64) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.EnforcedLabelValueLengthLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedBodySizeLimit sets the EnforcedBodySizeLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedBodySizeLimit field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithEnforcedBodySizeLimit(value monitoringv1.ByteSize) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.EnforcedBodySizeLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MinReadySeconds field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithMinReadySeconds(value uint32) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.MinReadySeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHostAliases adds the given value to the HostAliases field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the HostAliases field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithHostAliases(values ...*HostAliasApplyConfiguration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithHostAliases")
|
||||
}
|
||||
b.HostAliases = append(b.HostAliases, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAdditionalArgs adds the given value to the AdditionalArgs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the AdditionalArgs field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithAdditionalArgs(values ...*ArgumentApplyConfiguration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithAdditionalArgs")
|
||||
}
|
||||
b.AdditionalArgs = append(b.AdditionalArgs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWALCompression sets the WALCompression field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the WALCompression field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithWALCompression(value bool) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.WALCompression = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExcludedFromEnforcement adds the given value to the ExcludedFromEnforcement field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ExcludedFromEnforcement field.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithExcludedFromEnforcement(values ...*ObjectReferenceApplyConfiguration) *CommonPrometheusFieldsApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithExcludedFromEnforcement")
|
||||
}
|
||||
b.ExcludedFromEnforcement = append(b.ExcludedFromEnforcement, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHostNetwork sets the HostNetwork field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HostNetwork field is set to the value of the last call.
|
||||
func (b *CommonPrometheusFieldsApplyConfiguration) WithHostNetwork(value bool) *CommonPrometheusFieldsApplyConfiguration {
|
||||
b.HostNetwork = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// EmbeddedObjectMetadataApplyConfiguration represents an declarative configuration of the EmbeddedObjectMetadata type for use
|
||||
// with apply.
|
||||
type EmbeddedObjectMetadataApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
}
|
||||
|
||||
// EmbeddedObjectMetadataApplyConfiguration constructs an declarative configuration of the EmbeddedObjectMetadata type for use with
|
||||
// apply.
|
||||
func EmbeddedObjectMetadata() *EmbeddedObjectMetadataApplyConfiguration {
|
||||
return &EmbeddedObjectMetadataApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *EmbeddedObjectMetadataApplyConfiguration) WithName(value string) *EmbeddedObjectMetadataApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *EmbeddedObjectMetadataApplyConfiguration) WithLabels(entries map[string]string) *EmbeddedObjectMetadataApplyConfiguration {
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *EmbeddedObjectMetadataApplyConfiguration) WithAnnotations(entries map[string]string) *EmbeddedObjectMetadataApplyConfiguration {
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// EmbeddedPersistentVolumeClaimApplyConfiguration represents an declarative configuration of the EmbeddedPersistentVolumeClaim type for use
|
||||
// with apply.
|
||||
type EmbeddedPersistentVolumeClaimApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*EmbeddedObjectMetadataApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *corev1.PersistentVolumeClaimSpec `json:"spec,omitempty"`
|
||||
Status *corev1.PersistentVolumeClaimStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// EmbeddedPersistentVolumeClaimApplyConfiguration constructs an declarative configuration of the EmbeddedPersistentVolumeClaim type for use with
|
||||
// apply.
|
||||
func EmbeddedPersistentVolumeClaim() *EmbeddedPersistentVolumeClaimApplyConfiguration {
|
||||
b := &EmbeddedPersistentVolumeClaimApplyConfiguration{}
|
||||
b.WithKind("EmbeddedPersistentVolumeClaim")
|
||||
b.WithAPIVersion("monitoring.coreos.com/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *EmbeddedPersistentVolumeClaimApplyConfiguration) WithKind(value string) *EmbeddedPersistentVolumeClaimApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *EmbeddedPersistentVolumeClaimApplyConfiguration) WithAPIVersion(value string) *EmbeddedPersistentVolumeClaimApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *EmbeddedPersistentVolumeClaimApplyConfiguration) WithName(value string) *EmbeddedPersistentVolumeClaimApplyConfiguration {
|
||||
b.ensureEmbeddedObjectMetadataApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *EmbeddedPersistentVolumeClaimApplyConfiguration) WithLabels(entries map[string]string) *EmbeddedPersistentVolumeClaimApplyConfiguration {
|
||||
b.ensureEmbeddedObjectMetadataApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *EmbeddedPersistentVolumeClaimApplyConfiguration) WithAnnotations(entries map[string]string) *EmbeddedPersistentVolumeClaimApplyConfiguration {
|
||||
b.ensureEmbeddedObjectMetadataApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *EmbeddedPersistentVolumeClaimApplyConfiguration) ensureEmbeddedObjectMetadataApplyConfigurationExists() {
|
||||
if b.EmbeddedObjectMetadataApplyConfiguration == nil {
|
||||
b.EmbeddedObjectMetadataApplyConfiguration = &EmbeddedObjectMetadataApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *EmbeddedPersistentVolumeClaimApplyConfiguration) WithSpec(value corev1.PersistentVolumeClaimSpec) *EmbeddedPersistentVolumeClaimApplyConfiguration {
|
||||
b.Spec = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Status field is set to the value of the last call.
|
||||
func (b *EmbeddedPersistentVolumeClaimApplyConfiguration) WithStatus(value corev1.PersistentVolumeClaimStatus) *EmbeddedPersistentVolumeClaimApplyConfiguration {
|
||||
b.Status = &value
|
||||
return b
|
||||
}
|
239
pkg/client/applyconfiguration/monitoring/v1/endpoint.go
Normal file
239
pkg/client/applyconfiguration/monitoring/v1/endpoint.go
Normal file
|
@ -0,0 +1,239 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
// EndpointApplyConfiguration represents an declarative configuration of the Endpoint type for use
|
||||
// with apply.
|
||||
type EndpointApplyConfiguration struct {
|
||||
Port *string `json:"port,omitempty"`
|
||||
TargetPort *intstr.IntOrString `json:"targetPort,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
Scheme *string `json:"scheme,omitempty"`
|
||||
Params map[string][]string `json:"params,omitempty"`
|
||||
Interval *v1.Duration `json:"interval,omitempty"`
|
||||
ScrapeTimeout *v1.Duration `json:"scrapeTimeout,omitempty"`
|
||||
TLSConfig *TLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
BearerTokenFile *string `json:"bearerTokenFile,omitempty"`
|
||||
BearerTokenSecret *corev1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
|
||||
Authorization *SafeAuthorizationApplyConfiguration `json:"authorization,omitempty"`
|
||||
HonorLabels *bool `json:"honorLabels,omitempty"`
|
||||
HonorTimestamps *bool `json:"honorTimestamps,omitempty"`
|
||||
BasicAuth *BasicAuthApplyConfiguration `json:"basicAuth,omitempty"`
|
||||
OAuth2 *OAuth2ApplyConfiguration `json:"oauth2,omitempty"`
|
||||
MetricRelabelConfigs []*v1.RelabelConfig `json:"metricRelabelings,omitempty"`
|
||||
RelabelConfigs []*v1.RelabelConfig `json:"relabelings,omitempty"`
|
||||
ProxyURL *string `json:"proxyUrl,omitempty"`
|
||||
FollowRedirects *bool `json:"followRedirects,omitempty"`
|
||||
EnableHttp2 *bool `json:"enableHttp2,omitempty"`
|
||||
FilterRunning *bool `json:"filterRunning,omitempty"`
|
||||
}
|
||||
|
||||
// EndpointApplyConfiguration constructs an declarative configuration of the Endpoint type for use with
|
||||
// apply.
|
||||
func Endpoint() *EndpointApplyConfiguration {
|
||||
return &EndpointApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPort sets the Port field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Port field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithPort(value string) *EndpointApplyConfiguration {
|
||||
b.Port = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetPort sets the TargetPort field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetPort field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithTargetPort(value intstr.IntOrString) *EndpointApplyConfiguration {
|
||||
b.TargetPort = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPath sets the Path field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Path field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithPath(value string) *EndpointApplyConfiguration {
|
||||
b.Path = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScheme sets the Scheme field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Scheme field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithScheme(value string) *EndpointApplyConfiguration {
|
||||
b.Scheme = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithParams puts the entries into the Params field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Params field,
|
||||
// overwriting an existing map entries in Params field with the same key.
|
||||
func (b *EndpointApplyConfiguration) WithParams(entries map[string][]string) *EndpointApplyConfiguration {
|
||||
if b.Params == nil && len(entries) > 0 {
|
||||
b.Params = make(map[string][]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Params[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInterval sets the Interval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Interval field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithInterval(value v1.Duration) *EndpointApplyConfiguration {
|
||||
b.Interval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScrapeTimeout sets the ScrapeTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ScrapeTimeout field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithScrapeTimeout(value v1.Duration) *EndpointApplyConfiguration {
|
||||
b.ScrapeTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithTLSConfig(value *TLSConfigApplyConfiguration) *EndpointApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerTokenFile sets the BearerTokenFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerTokenFile field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithBearerTokenFile(value string) *EndpointApplyConfiguration {
|
||||
b.BearerTokenFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerTokenSecret sets the BearerTokenSecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerTokenSecret field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithBearerTokenSecret(value corev1.SecretKeySelector) *EndpointApplyConfiguration {
|
||||
b.BearerTokenSecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthorization sets the Authorization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Authorization field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithAuthorization(value *SafeAuthorizationApplyConfiguration) *EndpointApplyConfiguration {
|
||||
b.Authorization = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHonorLabels sets the HonorLabels field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HonorLabels field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithHonorLabels(value bool) *EndpointApplyConfiguration {
|
||||
b.HonorLabels = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHonorTimestamps sets the HonorTimestamps field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HonorTimestamps field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithHonorTimestamps(value bool) *EndpointApplyConfiguration {
|
||||
b.HonorTimestamps = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BasicAuth field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithBasicAuth(value *BasicAuthApplyConfiguration) *EndpointApplyConfiguration {
|
||||
b.BasicAuth = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOAuth2 sets the OAuth2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OAuth2 field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithOAuth2(value *OAuth2ApplyConfiguration) *EndpointApplyConfiguration {
|
||||
b.OAuth2 = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMetricRelabelConfigs adds the given value to the MetricRelabelConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the MetricRelabelConfigs field.
|
||||
func (b *EndpointApplyConfiguration) WithMetricRelabelConfigs(values ...**v1.RelabelConfig) *EndpointApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithMetricRelabelConfigs")
|
||||
}
|
||||
b.MetricRelabelConfigs = append(b.MetricRelabelConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRelabelConfigs adds the given value to the RelabelConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the RelabelConfigs field.
|
||||
func (b *EndpointApplyConfiguration) WithRelabelConfigs(values ...**v1.RelabelConfig) *EndpointApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRelabelConfigs")
|
||||
}
|
||||
b.RelabelConfigs = append(b.RelabelConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProxyURL sets the ProxyURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProxyURL field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithProxyURL(value string) *EndpointApplyConfiguration {
|
||||
b.ProxyURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFollowRedirects sets the FollowRedirects field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FollowRedirects field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithFollowRedirects(value bool) *EndpointApplyConfiguration {
|
||||
b.FollowRedirects = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnableHttp2 sets the EnableHttp2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnableHttp2 field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithEnableHttp2(value bool) *EndpointApplyConfiguration {
|
||||
b.EnableHttp2 = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFilterRunning sets the FilterRunning field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FilterRunning field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithFilterRunning(value bool) *EndpointApplyConfiguration {
|
||||
b.FilterRunning = &value
|
||||
return b
|
||||
}
|
37
pkg/client/applyconfiguration/monitoring/v1/exemplars.go
Normal file
37
pkg/client/applyconfiguration/monitoring/v1/exemplars.go
Normal file
|
@ -0,0 +1,37 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ExemplarsApplyConfiguration represents an declarative configuration of the Exemplars type for use
|
||||
// with apply.
|
||||
type ExemplarsApplyConfiguration struct {
|
||||
MaxSize *int64 `json:"maxSize,omitempty"`
|
||||
}
|
||||
|
||||
// ExemplarsApplyConfiguration constructs an declarative configuration of the Exemplars type for use with
|
||||
// apply.
|
||||
func Exemplars() *ExemplarsApplyConfiguration {
|
||||
return &ExemplarsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithMaxSize sets the MaxSize field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxSize field is set to the value of the last call.
|
||||
func (b *ExemplarsApplyConfiguration) WithMaxSize(value int64) *ExemplarsApplyConfiguration {
|
||||
b.MaxSize = &value
|
||||
return b
|
||||
}
|
48
pkg/client/applyconfiguration/monitoring/v1/hostalias.go
Normal file
48
pkg/client/applyconfiguration/monitoring/v1/hostalias.go
Normal file
|
@ -0,0 +1,48 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// HostAliasApplyConfiguration represents an declarative configuration of the HostAlias type for use
|
||||
// with apply.
|
||||
type HostAliasApplyConfiguration struct {
|
||||
IP *string `json:"ip,omitempty"`
|
||||
Hostnames []string `json:"hostnames,omitempty"`
|
||||
}
|
||||
|
||||
// HostAliasApplyConfiguration constructs an declarative configuration of the HostAlias type for use with
|
||||
// apply.
|
||||
func HostAlias() *HostAliasApplyConfiguration {
|
||||
return &HostAliasApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithIP sets the IP field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IP field is set to the value of the last call.
|
||||
func (b *HostAliasApplyConfiguration) WithIP(value string) *HostAliasApplyConfiguration {
|
||||
b.IP = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHostnames adds the given value to the Hostnames field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Hostnames field.
|
||||
func (b *HostAliasApplyConfiguration) WithHostnames(values ...string) *HostAliasApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Hostnames = append(b.Hostnames, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
95
pkg/client/applyconfiguration/monitoring/v1/httpconfig.go
Normal file
95
pkg/client/applyconfiguration/monitoring/v1/httpconfig.go
Normal file
|
@ -0,0 +1,95 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// HTTPConfigApplyConfiguration represents an declarative configuration of the HTTPConfig type for use
|
||||
// with apply.
|
||||
type HTTPConfigApplyConfiguration struct {
|
||||
Authorization *SafeAuthorizationApplyConfiguration `json:"authorization,omitempty"`
|
||||
BasicAuth *BasicAuthApplyConfiguration `json:"basicAuth,omitempty"`
|
||||
OAuth2 *OAuth2ApplyConfiguration `json:"oauth2,omitempty"`
|
||||
BearerTokenSecret *corev1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
|
||||
TLSConfig *SafeTLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
ProxyURL *string `json:"proxyURL,omitempty"`
|
||||
FollowRedirects *bool `json:"followRedirects,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPConfigApplyConfiguration constructs an declarative configuration of the HTTPConfig type for use with
|
||||
// apply.
|
||||
func HTTPConfig() *HTTPConfigApplyConfiguration {
|
||||
return &HTTPConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithAuthorization sets the Authorization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Authorization field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithAuthorization(value *SafeAuthorizationApplyConfiguration) *HTTPConfigApplyConfiguration {
|
||||
b.Authorization = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BasicAuth field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithBasicAuth(value *BasicAuthApplyConfiguration) *HTTPConfigApplyConfiguration {
|
||||
b.BasicAuth = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOAuth2 sets the OAuth2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OAuth2 field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithOAuth2(value *OAuth2ApplyConfiguration) *HTTPConfigApplyConfiguration {
|
||||
b.OAuth2 = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerTokenSecret sets the BearerTokenSecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerTokenSecret field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithBearerTokenSecret(value corev1.SecretKeySelector) *HTTPConfigApplyConfiguration {
|
||||
b.BearerTokenSecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithTLSConfig(value *SafeTLSConfigApplyConfiguration) *HTTPConfigApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProxyURL sets the ProxyURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProxyURL field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithProxyURL(value string) *HTTPConfigApplyConfiguration {
|
||||
b.ProxyURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFollowRedirects sets the FollowRedirects field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FollowRedirects field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithFollowRedirects(value bool) *HTTPConfigApplyConfiguration {
|
||||
b.FollowRedirects = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
)
|
||||
|
||||
// MetadataConfigApplyConfiguration represents an declarative configuration of the MetadataConfig type for use
|
||||
// with apply.
|
||||
type MetadataConfigApplyConfiguration struct {
|
||||
Send *bool `json:"send,omitempty"`
|
||||
SendInterval *v1.Duration `json:"sendInterval,omitempty"`
|
||||
}
|
||||
|
||||
// MetadataConfigApplyConfiguration constructs an declarative configuration of the MetadataConfig type for use with
|
||||
// apply.
|
||||
func MetadataConfig() *MetadataConfigApplyConfiguration {
|
||||
return &MetadataConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSend sets the Send field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Send field is set to the value of the last call.
|
||||
func (b *MetadataConfigApplyConfiguration) WithSend(value bool) *MetadataConfigApplyConfiguration {
|
||||
b.Send = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSendInterval sets the SendInterval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SendInterval field is set to the value of the last call.
|
||||
func (b *MetadataConfigApplyConfiguration) WithSendInterval(value v1.Duration) *MetadataConfigApplyConfiguration {
|
||||
b.SendInterval = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// NamespaceSelectorApplyConfiguration represents an declarative configuration of the NamespaceSelector type for use
|
||||
// with apply.
|
||||
type NamespaceSelectorApplyConfiguration struct {
|
||||
Any *bool `json:"any,omitempty"`
|
||||
MatchNames []string `json:"matchNames,omitempty"`
|
||||
}
|
||||
|
||||
// NamespaceSelectorApplyConfiguration constructs an declarative configuration of the NamespaceSelector type for use with
|
||||
// apply.
|
||||
func NamespaceSelector() *NamespaceSelectorApplyConfiguration {
|
||||
return &NamespaceSelectorApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithAny sets the Any field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Any field is set to the value of the last call.
|
||||
func (b *NamespaceSelectorApplyConfiguration) WithAny(value bool) *NamespaceSelectorApplyConfiguration {
|
||||
b.Any = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMatchNames adds the given value to the MatchNames field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the MatchNames field.
|
||||
func (b *NamespaceSelectorApplyConfiguration) WithMatchNames(values ...string) *NamespaceSelectorApplyConfiguration {
|
||||
for i := range values {
|
||||
b.MatchNames = append(b.MatchNames, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
85
pkg/client/applyconfiguration/monitoring/v1/oauth2.go
Normal file
85
pkg/client/applyconfiguration/monitoring/v1/oauth2.go
Normal file
|
@ -0,0 +1,85 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// OAuth2ApplyConfiguration represents an declarative configuration of the OAuth2 type for use
|
||||
// with apply.
|
||||
type OAuth2ApplyConfiguration struct {
|
||||
ClientID *SecretOrConfigMapApplyConfiguration `json:"clientId,omitempty"`
|
||||
ClientSecret *corev1.SecretKeySelector `json:"clientSecret,omitempty"`
|
||||
TokenURL *string `json:"tokenUrl,omitempty"`
|
||||
Scopes []string `json:"scopes,omitempty"`
|
||||
EndpointParams map[string]string `json:"endpointParams,omitempty"`
|
||||
}
|
||||
|
||||
// OAuth2ApplyConfiguration constructs an declarative configuration of the OAuth2 type for use with
|
||||
// apply.
|
||||
func OAuth2() *OAuth2ApplyConfiguration {
|
||||
return &OAuth2ApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithClientID sets the ClientID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ClientID field is set to the value of the last call.
|
||||
func (b *OAuth2ApplyConfiguration) WithClientID(value *SecretOrConfigMapApplyConfiguration) *OAuth2ApplyConfiguration {
|
||||
b.ClientID = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithClientSecret sets the ClientSecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ClientSecret field is set to the value of the last call.
|
||||
func (b *OAuth2ApplyConfiguration) WithClientSecret(value corev1.SecretKeySelector) *OAuth2ApplyConfiguration {
|
||||
b.ClientSecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTokenURL sets the TokenURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TokenURL field is set to the value of the last call.
|
||||
func (b *OAuth2ApplyConfiguration) WithTokenURL(value string) *OAuth2ApplyConfiguration {
|
||||
b.TokenURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScopes adds the given value to the Scopes field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Scopes field.
|
||||
func (b *OAuth2ApplyConfiguration) WithScopes(values ...string) *OAuth2ApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Scopes = append(b.Scopes, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEndpointParams puts the entries into the EndpointParams field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the EndpointParams field,
|
||||
// overwriting an existing map entries in EndpointParams field with the same key.
|
||||
func (b *OAuth2ApplyConfiguration) WithEndpointParams(entries map[string]string) *OAuth2ApplyConfiguration {
|
||||
if b.EndpointParams == nil && len(entries) > 0 {
|
||||
b.EndpointParams = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.EndpointParams[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ObjectReferenceApplyConfiguration represents an declarative configuration of the ObjectReference type for use
|
||||
// with apply.
|
||||
type ObjectReferenceApplyConfiguration struct {
|
||||
Group *string `json:"group,omitempty"`
|
||||
Resource *string `json:"resource,omitempty"`
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// ObjectReferenceApplyConfiguration constructs an declarative configuration of the ObjectReference type for use with
|
||||
// apply.
|
||||
func ObjectReference() *ObjectReferenceApplyConfiguration {
|
||||
return &ObjectReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithGroup sets the Group field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Group field is set to the value of the last call.
|
||||
func (b *ObjectReferenceApplyConfiguration) WithGroup(value string) *ObjectReferenceApplyConfiguration {
|
||||
b.Group = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResource sets the Resource field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Resource field is set to the value of the last call.
|
||||
func (b *ObjectReferenceApplyConfiguration) WithResource(value string) *ObjectReferenceApplyConfiguration {
|
||||
b.Resource = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *ObjectReferenceApplyConfiguration) WithNamespace(value string) *ObjectReferenceApplyConfiguration {
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ObjectReferenceApplyConfiguration) WithName(value string) *ObjectReferenceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,230 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
// PodMetricsEndpointApplyConfiguration represents an declarative configuration of the PodMetricsEndpoint type for use
|
||||
// with apply.
|
||||
type PodMetricsEndpointApplyConfiguration struct {
|
||||
Port *string `json:"port,omitempty"`
|
||||
TargetPort *intstr.IntOrString `json:"targetPort,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
Scheme *string `json:"scheme,omitempty"`
|
||||
Params map[string][]string `json:"params,omitempty"`
|
||||
Interval *v1.Duration `json:"interval,omitempty"`
|
||||
ScrapeTimeout *v1.Duration `json:"scrapeTimeout,omitempty"`
|
||||
TLSConfig *PodMetricsEndpointTLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
BearerTokenSecret *corev1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
|
||||
HonorLabels *bool `json:"honorLabels,omitempty"`
|
||||
HonorTimestamps *bool `json:"honorTimestamps,omitempty"`
|
||||
BasicAuth *BasicAuthApplyConfiguration `json:"basicAuth,omitempty"`
|
||||
OAuth2 *OAuth2ApplyConfiguration `json:"oauth2,omitempty"`
|
||||
Authorization *SafeAuthorizationApplyConfiguration `json:"authorization,omitempty"`
|
||||
MetricRelabelConfigs []*v1.RelabelConfig `json:"metricRelabelings,omitempty"`
|
||||
RelabelConfigs []*v1.RelabelConfig `json:"relabelings,omitempty"`
|
||||
ProxyURL *string `json:"proxyUrl,omitempty"`
|
||||
FollowRedirects *bool `json:"followRedirects,omitempty"`
|
||||
EnableHttp2 *bool `json:"enableHttp2,omitempty"`
|
||||
FilterRunning *bool `json:"filterRunning,omitempty"`
|
||||
}
|
||||
|
||||
// PodMetricsEndpointApplyConfiguration constructs an declarative configuration of the PodMetricsEndpoint type for use with
|
||||
// apply.
|
||||
func PodMetricsEndpoint() *PodMetricsEndpointApplyConfiguration {
|
||||
return &PodMetricsEndpointApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPort sets the Port field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Port field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithPort(value string) *PodMetricsEndpointApplyConfiguration {
|
||||
b.Port = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetPort sets the TargetPort field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetPort field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithTargetPort(value intstr.IntOrString) *PodMetricsEndpointApplyConfiguration {
|
||||
b.TargetPort = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPath sets the Path field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Path field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithPath(value string) *PodMetricsEndpointApplyConfiguration {
|
||||
b.Path = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScheme sets the Scheme field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Scheme field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithScheme(value string) *PodMetricsEndpointApplyConfiguration {
|
||||
b.Scheme = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithParams puts the entries into the Params field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Params field,
|
||||
// overwriting an existing map entries in Params field with the same key.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithParams(entries map[string][]string) *PodMetricsEndpointApplyConfiguration {
|
||||
if b.Params == nil && len(entries) > 0 {
|
||||
b.Params = make(map[string][]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Params[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInterval sets the Interval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Interval field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithInterval(value v1.Duration) *PodMetricsEndpointApplyConfiguration {
|
||||
b.Interval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScrapeTimeout sets the ScrapeTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ScrapeTimeout field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithScrapeTimeout(value v1.Duration) *PodMetricsEndpointApplyConfiguration {
|
||||
b.ScrapeTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithTLSConfig(value *PodMetricsEndpointTLSConfigApplyConfiguration) *PodMetricsEndpointApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerTokenSecret sets the BearerTokenSecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerTokenSecret field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithBearerTokenSecret(value corev1.SecretKeySelector) *PodMetricsEndpointApplyConfiguration {
|
||||
b.BearerTokenSecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHonorLabels sets the HonorLabels field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HonorLabels field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithHonorLabels(value bool) *PodMetricsEndpointApplyConfiguration {
|
||||
b.HonorLabels = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHonorTimestamps sets the HonorTimestamps field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HonorTimestamps field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithHonorTimestamps(value bool) *PodMetricsEndpointApplyConfiguration {
|
||||
b.HonorTimestamps = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BasicAuth field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithBasicAuth(value *BasicAuthApplyConfiguration) *PodMetricsEndpointApplyConfiguration {
|
||||
b.BasicAuth = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOAuth2 sets the OAuth2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OAuth2 field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithOAuth2(value *OAuth2ApplyConfiguration) *PodMetricsEndpointApplyConfiguration {
|
||||
b.OAuth2 = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthorization sets the Authorization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Authorization field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithAuthorization(value *SafeAuthorizationApplyConfiguration) *PodMetricsEndpointApplyConfiguration {
|
||||
b.Authorization = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMetricRelabelConfigs adds the given value to the MetricRelabelConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the MetricRelabelConfigs field.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithMetricRelabelConfigs(values ...**v1.RelabelConfig) *PodMetricsEndpointApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithMetricRelabelConfigs")
|
||||
}
|
||||
b.MetricRelabelConfigs = append(b.MetricRelabelConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRelabelConfigs adds the given value to the RelabelConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the RelabelConfigs field.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithRelabelConfigs(values ...**v1.RelabelConfig) *PodMetricsEndpointApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRelabelConfigs")
|
||||
}
|
||||
b.RelabelConfigs = append(b.RelabelConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProxyURL sets the ProxyURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProxyURL field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithProxyURL(value string) *PodMetricsEndpointApplyConfiguration {
|
||||
b.ProxyURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFollowRedirects sets the FollowRedirects field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FollowRedirects field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithFollowRedirects(value bool) *PodMetricsEndpointApplyConfiguration {
|
||||
b.FollowRedirects = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnableHttp2 sets the EnableHttp2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnableHttp2 field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithEnableHttp2(value bool) *PodMetricsEndpointApplyConfiguration {
|
||||
b.EnableHttp2 = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFilterRunning sets the FilterRunning field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FilterRunning field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointApplyConfiguration) WithFilterRunning(value bool) *PodMetricsEndpointApplyConfiguration {
|
||||
b.FilterRunning = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// PodMetricsEndpointTLSConfigApplyConfiguration represents an declarative configuration of the PodMetricsEndpointTLSConfig type for use
|
||||
// with apply.
|
||||
type PodMetricsEndpointTLSConfigApplyConfiguration struct {
|
||||
SafeTLSConfigApplyConfiguration `json:",inline"`
|
||||
}
|
||||
|
||||
// PodMetricsEndpointTLSConfigApplyConfiguration constructs an declarative configuration of the PodMetricsEndpointTLSConfig type for use with
|
||||
// apply.
|
||||
func PodMetricsEndpointTLSConfig() *PodMetricsEndpointTLSConfigApplyConfiguration {
|
||||
return &PodMetricsEndpointTLSConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithCA sets the CA field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CA field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointTLSConfigApplyConfiguration) WithCA(value *SecretOrConfigMapApplyConfiguration) *PodMetricsEndpointTLSConfigApplyConfiguration {
|
||||
b.CA = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCert sets the Cert field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Cert field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointTLSConfigApplyConfiguration) WithCert(value *SecretOrConfigMapApplyConfiguration) *PodMetricsEndpointTLSConfigApplyConfiguration {
|
||||
b.Cert = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKeySecret sets the KeySecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the KeySecret field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointTLSConfigApplyConfiguration) WithKeySecret(value corev1.SecretKeySelector) *PodMetricsEndpointTLSConfigApplyConfiguration {
|
||||
b.KeySecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServerName sets the ServerName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServerName field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointTLSConfigApplyConfiguration) WithServerName(value string) *PodMetricsEndpointTLSConfigApplyConfiguration {
|
||||
b.ServerName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInsecureSkipVerify sets the InsecureSkipVerify field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the InsecureSkipVerify field is set to the value of the last call.
|
||||
func (b *PodMetricsEndpointTLSConfigApplyConfiguration) WithInsecureSkipVerify(value bool) *PodMetricsEndpointTLSConfigApplyConfiguration {
|
||||
b.InsecureSkipVerify = &value
|
||||
return b
|
||||
}
|
208
pkg/client/applyconfiguration/monitoring/v1/podmonitor.go
Normal file
208
pkg/client/applyconfiguration/monitoring/v1/podmonitor.go
Normal file
|
@ -0,0 +1,208 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// PodMonitorApplyConfiguration represents an declarative configuration of the PodMonitor type for use
|
||||
// with apply.
|
||||
type PodMonitorApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *PodMonitorSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// PodMonitor constructs an declarative configuration of the PodMonitor type for use with
|
||||
// apply.
|
||||
func PodMonitor(name, namespace string) *PodMonitorApplyConfiguration {
|
||||
b := &PodMonitorApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("PodMonitor")
|
||||
b.WithAPIVersion("monitoring.coreos.com/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithKind(value string) *PodMonitorApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithAPIVersion(value string) *PodMonitorApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithName(value string) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithGenerateName(value string) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithNamespace(value string) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithUID(value types.UID) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithResourceVersion(value string) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithGeneration(value int64) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *PodMonitorApplyConfiguration) WithLabels(entries map[string]string) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *PodMonitorApplyConfiguration) WithAnnotations(entries map[string]string) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *PodMonitorApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *PodMonitorApplyConfiguration) WithFinalizers(values ...string) *PodMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *PodMonitorApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *PodMonitorApplyConfiguration) WithSpec(value *PodMonitorSpecApplyConfiguration) *PodMonitorApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
138
pkg/client/applyconfiguration/monitoring/v1/podmonitorspec.go
Normal file
138
pkg/client/applyconfiguration/monitoring/v1/podmonitorspec.go
Normal file
|
@ -0,0 +1,138 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// PodMonitorSpecApplyConfiguration represents an declarative configuration of the PodMonitorSpec type for use
|
||||
// with apply.
|
||||
type PodMonitorSpecApplyConfiguration struct {
|
||||
JobLabel *string `json:"jobLabel,omitempty"`
|
||||
PodTargetLabels []string `json:"podTargetLabels,omitempty"`
|
||||
PodMetricsEndpoints []PodMetricsEndpointApplyConfiguration `json:"podMetricsEndpoints,omitempty"`
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
||||
NamespaceSelector *NamespaceSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
|
||||
SampleLimit *uint64 `json:"sampleLimit,omitempty"`
|
||||
TargetLimit *uint64 `json:"targetLimit,omitempty"`
|
||||
LabelLimit *uint64 `json:"labelLimit,omitempty"`
|
||||
LabelNameLengthLimit *uint64 `json:"labelNameLengthLimit,omitempty"`
|
||||
LabelValueLengthLimit *uint64 `json:"labelValueLengthLimit,omitempty"`
|
||||
AttachMetadata *AttachMetadataApplyConfiguration `json:"attachMetadata,omitempty"`
|
||||
}
|
||||
|
||||
// PodMonitorSpecApplyConfiguration constructs an declarative configuration of the PodMonitorSpec type for use with
|
||||
// apply.
|
||||
func PodMonitorSpec() *PodMonitorSpecApplyConfiguration {
|
||||
return &PodMonitorSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithJobLabel sets the JobLabel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the JobLabel field is set to the value of the last call.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithJobLabel(value string) *PodMonitorSpecApplyConfiguration {
|
||||
b.JobLabel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodTargetLabels adds the given value to the PodTargetLabels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the PodTargetLabels field.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithPodTargetLabels(values ...string) *PodMonitorSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.PodTargetLabels = append(b.PodTargetLabels, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodMetricsEndpoints adds the given value to the PodMetricsEndpoints field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the PodMetricsEndpoints field.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithPodMetricsEndpoints(values ...*PodMetricsEndpointApplyConfiguration) *PodMonitorSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithPodMetricsEndpoints")
|
||||
}
|
||||
b.PodMetricsEndpoints = append(b.PodMetricsEndpoints, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSelector sets the Selector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Selector field is set to the value of the last call.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithSelector(value metav1.LabelSelector) *PodMonitorSpecApplyConfiguration {
|
||||
b.Selector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamespaceSelector field is set to the value of the last call.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithNamespaceSelector(value *NamespaceSelectorApplyConfiguration) *PodMonitorSpecApplyConfiguration {
|
||||
b.NamespaceSelector = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSampleLimit sets the SampleLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SampleLimit field is set to the value of the last call.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithSampleLimit(value uint64) *PodMonitorSpecApplyConfiguration {
|
||||
b.SampleLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetLimit sets the TargetLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetLimit field is set to the value of the last call.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithTargetLimit(value uint64) *PodMonitorSpecApplyConfiguration {
|
||||
b.TargetLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabelLimit sets the LabelLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LabelLimit field is set to the value of the last call.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithLabelLimit(value uint64) *PodMonitorSpecApplyConfiguration {
|
||||
b.LabelLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabelNameLengthLimit sets the LabelNameLengthLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LabelNameLengthLimit field is set to the value of the last call.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithLabelNameLengthLimit(value uint64) *PodMonitorSpecApplyConfiguration {
|
||||
b.LabelNameLengthLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabelValueLengthLimit sets the LabelValueLengthLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LabelValueLengthLimit field is set to the value of the last call.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithLabelValueLengthLimit(value uint64) *PodMonitorSpecApplyConfiguration {
|
||||
b.LabelValueLengthLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAttachMetadata sets the AttachMetadata field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AttachMetadata field is set to the value of the last call.
|
||||
func (b *PodMonitorSpecApplyConfiguration) WithAttachMetadata(value *AttachMetadataApplyConfiguration) *PodMonitorSpecApplyConfiguration {
|
||||
b.AttachMetadata = value
|
||||
return b
|
||||
}
|
208
pkg/client/applyconfiguration/monitoring/v1/probe.go
Normal file
208
pkg/client/applyconfiguration/monitoring/v1/probe.go
Normal file
|
@ -0,0 +1,208 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// ProbeApplyConfiguration represents an declarative configuration of the Probe type for use
|
||||
// with apply.
|
||||
type ProbeApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *ProbeSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// Probe constructs an declarative configuration of the Probe type for use with
|
||||
// apply.
|
||||
func Probe(name, namespace string) *ProbeApplyConfiguration {
|
||||
b := &ProbeApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("Probe")
|
||||
b.WithAPIVersion("monitoring.coreos.com/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithKind(value string) *ProbeApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithAPIVersion(value string) *ProbeApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithName(value string) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithGenerateName(value string) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithNamespace(value string) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithUID(value types.UID) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithResourceVersion(value string) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithGeneration(value int64) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *ProbeApplyConfiguration) WithLabels(entries map[string]string) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *ProbeApplyConfiguration) WithAnnotations(entries map[string]string) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *ProbeApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *ProbeApplyConfiguration) WithFinalizers(values ...string) *ProbeApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *ProbeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *ProbeApplyConfiguration) WithSpec(value *ProbeSpecApplyConfiguration) *ProbeApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
64
pkg/client/applyconfiguration/monitoring/v1/proberspec.go
Normal file
64
pkg/client/applyconfiguration/monitoring/v1/proberspec.go
Normal file
|
@ -0,0 +1,64 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ProberSpecApplyConfiguration represents an declarative configuration of the ProberSpec type for use
|
||||
// with apply.
|
||||
type ProberSpecApplyConfiguration struct {
|
||||
URL *string `json:"url,omitempty"`
|
||||
Scheme *string `json:"scheme,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
ProxyURL *string `json:"proxyUrl,omitempty"`
|
||||
}
|
||||
|
||||
// ProberSpecApplyConfiguration constructs an declarative configuration of the ProberSpec type for use with
|
||||
// apply.
|
||||
func ProberSpec() *ProberSpecApplyConfiguration {
|
||||
return &ProberSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithURL sets the URL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the URL field is set to the value of the last call.
|
||||
func (b *ProberSpecApplyConfiguration) WithURL(value string) *ProberSpecApplyConfiguration {
|
||||
b.URL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScheme sets the Scheme field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Scheme field is set to the value of the last call.
|
||||
func (b *ProberSpecApplyConfiguration) WithScheme(value string) *ProberSpecApplyConfiguration {
|
||||
b.Scheme = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPath sets the Path field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Path field is set to the value of the last call.
|
||||
func (b *ProberSpecApplyConfiguration) WithPath(value string) *ProberSpecApplyConfiguration {
|
||||
b.Path = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProxyURL sets the ProxyURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProxyURL field is set to the value of the last call.
|
||||
func (b *ProberSpecApplyConfiguration) WithProxyURL(value string) *ProberSpecApplyConfiguration {
|
||||
b.ProxyURL = &value
|
||||
return b
|
||||
}
|
191
pkg/client/applyconfiguration/monitoring/v1/probespec.go
Normal file
191
pkg/client/applyconfiguration/monitoring/v1/probespec.go
Normal file
|
@ -0,0 +1,191 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// ProbeSpecApplyConfiguration represents an declarative configuration of the ProbeSpec type for use
|
||||
// with apply.
|
||||
type ProbeSpecApplyConfiguration struct {
|
||||
JobName *string `json:"jobName,omitempty"`
|
||||
ProberSpec *ProberSpecApplyConfiguration `json:"prober,omitempty"`
|
||||
Module *string `json:"module,omitempty"`
|
||||
Targets *ProbeTargetsApplyConfiguration `json:"targets,omitempty"`
|
||||
Interval *monitoringv1.Duration `json:"interval,omitempty"`
|
||||
ScrapeTimeout *monitoringv1.Duration `json:"scrapeTimeout,omitempty"`
|
||||
TLSConfig *ProbeTLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
BearerTokenSecret *corev1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
|
||||
BasicAuth *BasicAuthApplyConfiguration `json:"basicAuth,omitempty"`
|
||||
OAuth2 *OAuth2ApplyConfiguration `json:"oauth2,omitempty"`
|
||||
MetricRelabelConfigs []*monitoringv1.RelabelConfig `json:"metricRelabelings,omitempty"`
|
||||
Authorization *SafeAuthorizationApplyConfiguration `json:"authorization,omitempty"`
|
||||
SampleLimit *uint64 `json:"sampleLimit,omitempty"`
|
||||
TargetLimit *uint64 `json:"targetLimit,omitempty"`
|
||||
LabelLimit *uint64 `json:"labelLimit,omitempty"`
|
||||
LabelNameLengthLimit *uint64 `json:"labelNameLengthLimit,omitempty"`
|
||||
LabelValueLengthLimit *uint64 `json:"labelValueLengthLimit,omitempty"`
|
||||
}
|
||||
|
||||
// ProbeSpecApplyConfiguration constructs an declarative configuration of the ProbeSpec type for use with
|
||||
// apply.
|
||||
func ProbeSpec() *ProbeSpecApplyConfiguration {
|
||||
return &ProbeSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithJobName sets the JobName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the JobName field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithJobName(value string) *ProbeSpecApplyConfiguration {
|
||||
b.JobName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProberSpec sets the ProberSpec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProberSpec field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithProberSpec(value *ProberSpecApplyConfiguration) *ProbeSpecApplyConfiguration {
|
||||
b.ProberSpec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithModule sets the Module field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Module field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithModule(value string) *ProbeSpecApplyConfiguration {
|
||||
b.Module = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargets sets the Targets field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Targets field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithTargets(value *ProbeTargetsApplyConfiguration) *ProbeSpecApplyConfiguration {
|
||||
b.Targets = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInterval sets the Interval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Interval field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithInterval(value monitoringv1.Duration) *ProbeSpecApplyConfiguration {
|
||||
b.Interval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScrapeTimeout sets the ScrapeTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ScrapeTimeout field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithScrapeTimeout(value monitoringv1.Duration) *ProbeSpecApplyConfiguration {
|
||||
b.ScrapeTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithTLSConfig(value *ProbeTLSConfigApplyConfiguration) *ProbeSpecApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerTokenSecret sets the BearerTokenSecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerTokenSecret field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithBearerTokenSecret(value corev1.SecretKeySelector) *ProbeSpecApplyConfiguration {
|
||||
b.BearerTokenSecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BasicAuth field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithBasicAuth(value *BasicAuthApplyConfiguration) *ProbeSpecApplyConfiguration {
|
||||
b.BasicAuth = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOAuth2 sets the OAuth2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OAuth2 field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithOAuth2(value *OAuth2ApplyConfiguration) *ProbeSpecApplyConfiguration {
|
||||
b.OAuth2 = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMetricRelabelConfigs adds the given value to the MetricRelabelConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the MetricRelabelConfigs field.
|
||||
func (b *ProbeSpecApplyConfiguration) WithMetricRelabelConfigs(values ...**monitoringv1.RelabelConfig) *ProbeSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithMetricRelabelConfigs")
|
||||
}
|
||||
b.MetricRelabelConfigs = append(b.MetricRelabelConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthorization sets the Authorization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Authorization field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithAuthorization(value *SafeAuthorizationApplyConfiguration) *ProbeSpecApplyConfiguration {
|
||||
b.Authorization = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSampleLimit sets the SampleLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SampleLimit field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithSampleLimit(value uint64) *ProbeSpecApplyConfiguration {
|
||||
b.SampleLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetLimit sets the TargetLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetLimit field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithTargetLimit(value uint64) *ProbeSpecApplyConfiguration {
|
||||
b.TargetLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabelLimit sets the LabelLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LabelLimit field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithLabelLimit(value uint64) *ProbeSpecApplyConfiguration {
|
||||
b.LabelLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabelNameLengthLimit sets the LabelNameLengthLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LabelNameLengthLimit field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithLabelNameLengthLimit(value uint64) *ProbeSpecApplyConfiguration {
|
||||
b.LabelNameLengthLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabelValueLengthLimit sets the LabelValueLengthLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LabelValueLengthLimit field is set to the value of the last call.
|
||||
func (b *ProbeSpecApplyConfiguration) WithLabelValueLengthLimit(value uint64) *ProbeSpecApplyConfiguration {
|
||||
b.LabelValueLengthLimit = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
apismonitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// ProbeTargetIngressApplyConfiguration represents an declarative configuration of the ProbeTargetIngress type for use
|
||||
// with apply.
|
||||
type ProbeTargetIngressApplyConfiguration struct {
|
||||
Selector *v1.LabelSelector `json:"selector,omitempty"`
|
||||
NamespaceSelector *NamespaceSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
|
||||
RelabelConfigs []*apismonitoringv1.RelabelConfig `json:"relabelingConfigs,omitempty"`
|
||||
}
|
||||
|
||||
// ProbeTargetIngressApplyConfiguration constructs an declarative configuration of the ProbeTargetIngress type for use with
|
||||
// apply.
|
||||
func ProbeTargetIngress() *ProbeTargetIngressApplyConfiguration {
|
||||
return &ProbeTargetIngressApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSelector sets the Selector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Selector field is set to the value of the last call.
|
||||
func (b *ProbeTargetIngressApplyConfiguration) WithSelector(value v1.LabelSelector) *ProbeTargetIngressApplyConfiguration {
|
||||
b.Selector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamespaceSelector field is set to the value of the last call.
|
||||
func (b *ProbeTargetIngressApplyConfiguration) WithNamespaceSelector(value *NamespaceSelectorApplyConfiguration) *ProbeTargetIngressApplyConfiguration {
|
||||
b.NamespaceSelector = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRelabelConfigs adds the given value to the RelabelConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the RelabelConfigs field.
|
||||
func (b *ProbeTargetIngressApplyConfiguration) WithRelabelConfigs(values ...**apismonitoringv1.RelabelConfig) *ProbeTargetIngressApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRelabelConfigs")
|
||||
}
|
||||
b.RelabelConfigs = append(b.RelabelConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
46
pkg/client/applyconfiguration/monitoring/v1/probetargets.go
Normal file
46
pkg/client/applyconfiguration/monitoring/v1/probetargets.go
Normal file
|
@ -0,0 +1,46 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ProbeTargetsApplyConfiguration represents an declarative configuration of the ProbeTargets type for use
|
||||
// with apply.
|
||||
type ProbeTargetsApplyConfiguration struct {
|
||||
StaticConfig *ProbeTargetStaticConfigApplyConfiguration `json:"staticConfig,omitempty"`
|
||||
Ingress *ProbeTargetIngressApplyConfiguration `json:"ingress,omitempty"`
|
||||
}
|
||||
|
||||
// ProbeTargetsApplyConfiguration constructs an declarative configuration of the ProbeTargets type for use with
|
||||
// apply.
|
||||
func ProbeTargets() *ProbeTargetsApplyConfiguration {
|
||||
return &ProbeTargetsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithStaticConfig sets the StaticConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StaticConfig field is set to the value of the last call.
|
||||
func (b *ProbeTargetsApplyConfiguration) WithStaticConfig(value *ProbeTargetStaticConfigApplyConfiguration) *ProbeTargetsApplyConfiguration {
|
||||
b.StaticConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIngress sets the Ingress field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Ingress field is set to the value of the last call.
|
||||
func (b *ProbeTargetsApplyConfiguration) WithIngress(value *ProbeTargetIngressApplyConfiguration) *ProbeTargetsApplyConfiguration {
|
||||
b.Ingress = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
)
|
||||
|
||||
// ProbeTargetStaticConfigApplyConfiguration represents an declarative configuration of the ProbeTargetStaticConfig type for use
|
||||
// with apply.
|
||||
type ProbeTargetStaticConfigApplyConfiguration struct {
|
||||
Targets []string `json:"static,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
RelabelConfigs []*v1.RelabelConfig `json:"relabelingConfigs,omitempty"`
|
||||
}
|
||||
|
||||
// ProbeTargetStaticConfigApplyConfiguration constructs an declarative configuration of the ProbeTargetStaticConfig type for use with
|
||||
// apply.
|
||||
func ProbeTargetStaticConfig() *ProbeTargetStaticConfigApplyConfiguration {
|
||||
return &ProbeTargetStaticConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithTargets adds the given value to the Targets field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Targets field.
|
||||
func (b *ProbeTargetStaticConfigApplyConfiguration) WithTargets(values ...string) *ProbeTargetStaticConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Targets = append(b.Targets, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *ProbeTargetStaticConfigApplyConfiguration) WithLabels(entries map[string]string) *ProbeTargetStaticConfigApplyConfiguration {
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRelabelConfigs adds the given value to the RelabelConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the RelabelConfigs field.
|
||||
func (b *ProbeTargetStaticConfigApplyConfiguration) WithRelabelConfigs(values ...**v1.RelabelConfig) *ProbeTargetStaticConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRelabelConfigs")
|
||||
}
|
||||
b.RelabelConfigs = append(b.RelabelConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// ProbeTLSConfigApplyConfiguration represents an declarative configuration of the ProbeTLSConfig type for use
|
||||
// with apply.
|
||||
type ProbeTLSConfigApplyConfiguration struct {
|
||||
SafeTLSConfigApplyConfiguration `json:",inline"`
|
||||
}
|
||||
|
||||
// ProbeTLSConfigApplyConfiguration constructs an declarative configuration of the ProbeTLSConfig type for use with
|
||||
// apply.
|
||||
func ProbeTLSConfig() *ProbeTLSConfigApplyConfiguration {
|
||||
return &ProbeTLSConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithCA sets the CA field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CA field is set to the value of the last call.
|
||||
func (b *ProbeTLSConfigApplyConfiguration) WithCA(value *SecretOrConfigMapApplyConfiguration) *ProbeTLSConfigApplyConfiguration {
|
||||
b.CA = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCert sets the Cert field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Cert field is set to the value of the last call.
|
||||
func (b *ProbeTLSConfigApplyConfiguration) WithCert(value *SecretOrConfigMapApplyConfiguration) *ProbeTLSConfigApplyConfiguration {
|
||||
b.Cert = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKeySecret sets the KeySecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the KeySecret field is set to the value of the last call.
|
||||
func (b *ProbeTLSConfigApplyConfiguration) WithKeySecret(value corev1.SecretKeySelector) *ProbeTLSConfigApplyConfiguration {
|
||||
b.KeySecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServerName sets the ServerName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServerName field is set to the value of the last call.
|
||||
func (b *ProbeTLSConfigApplyConfiguration) WithServerName(value string) *ProbeTLSConfigApplyConfiguration {
|
||||
b.ServerName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInsecureSkipVerify sets the InsecureSkipVerify field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the InsecureSkipVerify field is set to the value of the last call.
|
||||
func (b *ProbeTLSConfigApplyConfiguration) WithInsecureSkipVerify(value bool) *ProbeTLSConfigApplyConfiguration {
|
||||
b.InsecureSkipVerify = &value
|
||||
return b
|
||||
}
|
217
pkg/client/applyconfiguration/monitoring/v1/prometheus.go
Normal file
217
pkg/client/applyconfiguration/monitoring/v1/prometheus.go
Normal file
|
@ -0,0 +1,217 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// PrometheusApplyConfiguration represents an declarative configuration of the Prometheus type for use
|
||||
// with apply.
|
||||
type PrometheusApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *PrometheusSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
Status *PrometheusStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// Prometheus constructs an declarative configuration of the Prometheus type for use with
|
||||
// apply.
|
||||
func Prometheus(name, namespace string) *PrometheusApplyConfiguration {
|
||||
b := &PrometheusApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("Prometheus")
|
||||
b.WithAPIVersion("monitoring.coreos.com/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithKind(value string) *PrometheusApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithAPIVersion(value string) *PrometheusApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithName(value string) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithGenerateName(value string) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithNamespace(value string) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithUID(value types.UID) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithResourceVersion(value string) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithGeneration(value int64) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *PrometheusApplyConfiguration) WithLabels(entries map[string]string) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *PrometheusApplyConfiguration) WithAnnotations(entries map[string]string) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *PrometheusApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *PrometheusApplyConfiguration) WithFinalizers(values ...string) *PrometheusApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *PrometheusApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithSpec(value *PrometheusSpecApplyConfiguration) *PrometheusApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Status field is set to the value of the last call.
|
||||
func (b *PrometheusApplyConfiguration) WithStatus(value *PrometheusStatusApplyConfiguration) *PrometheusApplyConfiguration {
|
||||
b.Status = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// PrometheusConditionApplyConfiguration represents an declarative configuration of the PrometheusCondition type for use
|
||||
// with apply.
|
||||
type PrometheusConditionApplyConfiguration struct {
|
||||
Type *v1.PrometheusConditionType `json:"type,omitempty"`
|
||||
Status *v1.PrometheusConditionStatus `json:"status,omitempty"`
|
||||
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
}
|
||||
|
||||
// PrometheusConditionApplyConfiguration constructs an declarative configuration of the PrometheusCondition type for use with
|
||||
// apply.
|
||||
func PrometheusCondition() *PrometheusConditionApplyConfiguration {
|
||||
return &PrometheusConditionApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *PrometheusConditionApplyConfiguration) WithType(value v1.PrometheusConditionType) *PrometheusConditionApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Status field is set to the value of the last call.
|
||||
func (b *PrometheusConditionApplyConfiguration) WithStatus(value v1.PrometheusConditionStatus) *PrometheusConditionApplyConfiguration {
|
||||
b.Status = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
|
||||
func (b *PrometheusConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *PrometheusConditionApplyConfiguration {
|
||||
b.LastTransitionTime = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReason sets the Reason field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Reason field is set to the value of the last call.
|
||||
func (b *PrometheusConditionApplyConfiguration) WithReason(value string) *PrometheusConditionApplyConfiguration {
|
||||
b.Reason = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessage sets the Message field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Message field is set to the value of the last call.
|
||||
func (b *PrometheusConditionApplyConfiguration) WithMessage(value string) *PrometheusConditionApplyConfiguration {
|
||||
b.Message = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
|
||||
func (b *PrometheusConditionApplyConfiguration) WithObservedGeneration(value int64) *PrometheusConditionApplyConfiguration {
|
||||
b.ObservedGeneration = &value
|
||||
return b
|
||||
}
|
208
pkg/client/applyconfiguration/monitoring/v1/prometheusrule.go
Normal file
208
pkg/client/applyconfiguration/monitoring/v1/prometheusrule.go
Normal file
|
@ -0,0 +1,208 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// PrometheusRuleApplyConfiguration represents an declarative configuration of the PrometheusRule type for use
|
||||
// with apply.
|
||||
type PrometheusRuleApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *PrometheusRuleSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// PrometheusRule constructs an declarative configuration of the PrometheusRule type for use with
|
||||
// apply.
|
||||
func PrometheusRule(name, namespace string) *PrometheusRuleApplyConfiguration {
|
||||
b := &PrometheusRuleApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("PrometheusRule")
|
||||
b.WithAPIVersion("monitoring.coreos.com/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithKind(value string) *PrometheusRuleApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithAPIVersion(value string) *PrometheusRuleApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithName(value string) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithGenerateName(value string) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithNamespace(value string) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithUID(value types.UID) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithResourceVersion(value string) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithGeneration(value int64) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithLabels(entries map[string]string) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithAnnotations(entries map[string]string) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithFinalizers(values ...string) *PrometheusRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *PrometheusRuleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *PrometheusRuleApplyConfiguration) WithSpec(value *PrometheusRuleSpecApplyConfiguration) *PrometheusRuleApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// PrometheusRuleExcludeConfigApplyConfiguration represents an declarative configuration of the PrometheusRuleExcludeConfig type for use
|
||||
// with apply.
|
||||
type PrometheusRuleExcludeConfigApplyConfiguration struct {
|
||||
RuleNamespace *string `json:"ruleNamespace,omitempty"`
|
||||
RuleName *string `json:"ruleName,omitempty"`
|
||||
}
|
||||
|
||||
// PrometheusRuleExcludeConfigApplyConfiguration constructs an declarative configuration of the PrometheusRuleExcludeConfig type for use with
|
||||
// apply.
|
||||
func PrometheusRuleExcludeConfig() *PrometheusRuleExcludeConfigApplyConfiguration {
|
||||
return &PrometheusRuleExcludeConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithRuleNamespace sets the RuleNamespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RuleNamespace field is set to the value of the last call.
|
||||
func (b *PrometheusRuleExcludeConfigApplyConfiguration) WithRuleNamespace(value string) *PrometheusRuleExcludeConfigApplyConfiguration {
|
||||
b.RuleNamespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRuleName sets the RuleName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RuleName field is set to the value of the last call.
|
||||
func (b *PrometheusRuleExcludeConfigApplyConfiguration) WithRuleName(value string) *PrometheusRuleExcludeConfigApplyConfiguration {
|
||||
b.RuleName = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// PrometheusRuleSpecApplyConfiguration represents an declarative configuration of the PrometheusRuleSpec type for use
|
||||
// with apply.
|
||||
type PrometheusRuleSpecApplyConfiguration struct {
|
||||
Groups []RuleGroupApplyConfiguration `json:"groups,omitempty"`
|
||||
}
|
||||
|
||||
// PrometheusRuleSpecApplyConfiguration constructs an declarative configuration of the PrometheusRuleSpec type for use with
|
||||
// apply.
|
||||
func PrometheusRuleSpec() *PrometheusRuleSpecApplyConfiguration {
|
||||
return &PrometheusRuleSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithGroups adds the given value to the Groups field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Groups field.
|
||||
func (b *PrometheusRuleSpecApplyConfiguration) WithGroups(values ...*RuleGroupApplyConfiguration) *PrometheusRuleSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithGroups")
|
||||
}
|
||||
b.Groups = append(b.Groups, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
799
pkg/client/applyconfiguration/monitoring/v1/prometheusspec.go
Normal file
799
pkg/client/applyconfiguration/monitoring/v1/prometheusspec.go
Normal file
|
@ -0,0 +1,799 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// PrometheusSpecApplyConfiguration represents an declarative configuration of the PrometheusSpec type for use
|
||||
// with apply.
|
||||
type PrometheusSpecApplyConfiguration struct {
|
||||
CommonPrometheusFieldsApplyConfiguration `json:",inline"`
|
||||
BaseImage *string `json:"baseImage,omitempty"`
|
||||
Tag *string `json:"tag,omitempty"`
|
||||
SHA *string `json:"sha,omitempty"`
|
||||
Retention *monitoringv1.Duration `json:"retention,omitempty"`
|
||||
RetentionSize *monitoringv1.ByteSize `json:"retentionSize,omitempty"`
|
||||
DisableCompaction *bool `json:"disableCompaction,omitempty"`
|
||||
Rules *RulesApplyConfiguration `json:"rules,omitempty"`
|
||||
PrometheusRulesExcludedFromEnforce []PrometheusRuleExcludeConfigApplyConfiguration `json:"prometheusRulesExcludedFromEnforce,omitempty"`
|
||||
Query *QuerySpecApplyConfiguration `json:"query,omitempty"`
|
||||
RuleSelector *metav1.LabelSelector `json:"ruleSelector,omitempty"`
|
||||
RuleNamespaceSelector *metav1.LabelSelector `json:"ruleNamespaceSelector,omitempty"`
|
||||
Alerting *AlertingSpecApplyConfiguration `json:"alerting,omitempty"`
|
||||
RemoteRead []RemoteReadSpecApplyConfiguration `json:"remoteRead,omitempty"`
|
||||
AdditionalAlertRelabelConfigs *corev1.SecretKeySelector `json:"additionalAlertRelabelConfigs,omitempty"`
|
||||
AdditionalAlertManagerConfigs *corev1.SecretKeySelector `json:"additionalAlertManagerConfigs,omitempty"`
|
||||
Thanos *ThanosSpecApplyConfiguration `json:"thanos,omitempty"`
|
||||
QueryLogFile *string `json:"queryLogFile,omitempty"`
|
||||
AllowOverlappingBlocks *bool `json:"allowOverlappingBlocks,omitempty"`
|
||||
Exemplars *ExemplarsApplyConfiguration `json:"exemplars,omitempty"`
|
||||
EvaluationInterval *monitoringv1.Duration `json:"evaluationInterval,omitempty"`
|
||||
EnableAdminAPI *bool `json:"enableAdminAPI,omitempty"`
|
||||
TSDB *TSDBSpecApplyConfiguration `json:"tsdb,omitempty"`
|
||||
}
|
||||
|
||||
// PrometheusSpecApplyConfiguration constructs an declarative configuration of the PrometheusSpec type for use with
|
||||
// apply.
|
||||
func PrometheusSpec() *PrometheusSpecApplyConfiguration {
|
||||
return &PrometheusSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPodMetadata sets the PodMetadata field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodMetadata field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithPodMetadata(value *EmbeddedObjectMetadataApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.PodMetadata = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceMonitorSelector sets the ServiceMonitorSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServiceMonitorSelector field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithServiceMonitorSelector(value metav1.LabelSelector) *PrometheusSpecApplyConfiguration {
|
||||
b.ServiceMonitorSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceMonitorNamespaceSelector sets the ServiceMonitorNamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServiceMonitorNamespaceSelector field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithServiceMonitorNamespaceSelector(value metav1.LabelSelector) *PrometheusSpecApplyConfiguration {
|
||||
b.ServiceMonitorNamespaceSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodMonitorSelector sets the PodMonitorSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodMonitorSelector field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithPodMonitorSelector(value metav1.LabelSelector) *PrometheusSpecApplyConfiguration {
|
||||
b.PodMonitorSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodMonitorNamespaceSelector sets the PodMonitorNamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodMonitorNamespaceSelector field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithPodMonitorNamespaceSelector(value metav1.LabelSelector) *PrometheusSpecApplyConfiguration {
|
||||
b.PodMonitorNamespaceSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProbeSelector sets the ProbeSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProbeSelector field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithProbeSelector(value metav1.LabelSelector) *PrometheusSpecApplyConfiguration {
|
||||
b.ProbeSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProbeNamespaceSelector sets the ProbeNamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProbeNamespaceSelector field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithProbeNamespaceSelector(value metav1.LabelSelector) *PrometheusSpecApplyConfiguration {
|
||||
b.ProbeNamespaceSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVersion sets the Version field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Version field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithVersion(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.Version = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPaused sets the Paused field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Paused field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithPaused(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.Paused = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImage sets the Image field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Image field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithImage(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.Image = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ImagePullPolicy field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithImagePullPolicy(value corev1.PullPolicy) *PrometheusSpecApplyConfiguration {
|
||||
b.ImagePullPolicy = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImagePullSecrets adds the given value to the ImagePullSecrets field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ImagePullSecrets field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithImagePullSecrets(values ...corev1.LocalObjectReference) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ImagePullSecrets = append(b.ImagePullSecrets, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplicas sets the Replicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Replicas field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithReplicas(value int32) *PrometheusSpecApplyConfiguration {
|
||||
b.Replicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShards sets the Shards field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Shards field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithShards(value int32) *PrometheusSpecApplyConfiguration {
|
||||
b.Shards = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplicaExternalLabelName sets the ReplicaExternalLabelName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ReplicaExternalLabelName field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithReplicaExternalLabelName(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.ReplicaExternalLabelName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPrometheusExternalLabelName sets the PrometheusExternalLabelName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PrometheusExternalLabelName field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithPrometheusExternalLabelName(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.PrometheusExternalLabelName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLogLevel sets the LogLevel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LogLevel field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithLogLevel(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.LogLevel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLogFormat sets the LogFormat field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LogFormat field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithLogFormat(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.LogFormat = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScrapeInterval sets the ScrapeInterval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ScrapeInterval field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithScrapeInterval(value monitoringv1.Duration) *PrometheusSpecApplyConfiguration {
|
||||
b.ScrapeInterval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithScrapeTimeout sets the ScrapeTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ScrapeTimeout field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithScrapeTimeout(value monitoringv1.Duration) *PrometheusSpecApplyConfiguration {
|
||||
b.ScrapeTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExternalLabels puts the entries into the ExternalLabels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the ExternalLabels field,
|
||||
// overwriting an existing map entries in ExternalLabels field with the same key.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithExternalLabels(entries map[string]string) *PrometheusSpecApplyConfiguration {
|
||||
if b.ExternalLabels == nil && len(entries) > 0 {
|
||||
b.ExternalLabels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ExternalLabels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnableRemoteWriteReceiver sets the EnableRemoteWriteReceiver field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnableRemoteWriteReceiver field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEnableRemoteWriteReceiver(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.EnableRemoteWriteReceiver = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnableFeatures adds the given value to the EnableFeatures field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the EnableFeatures field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEnableFeatures(values ...string) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.EnableFeatures = append(b.EnableFeatures, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExternalURL sets the ExternalURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ExternalURL field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithExternalURL(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.ExternalURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRoutePrefix sets the RoutePrefix field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RoutePrefix field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithRoutePrefix(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.RoutePrefix = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStorage sets the Storage field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Storage field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithStorage(value *StorageSpecApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.Storage = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVolumes adds the given value to the Volumes field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Volumes field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithVolumes(values ...corev1.Volume) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Volumes = append(b.Volumes, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the VolumeMounts field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithVolumeMounts(values ...corev1.VolumeMount) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.VolumeMounts = append(b.VolumeMounts, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWeb sets the Web field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Web field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithWeb(value *PrometheusWebSpecApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.Web = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResources sets the Resources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Resources field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithResources(value corev1.ResourceRequirements) *PrometheusSpecApplyConfiguration {
|
||||
b.Resources = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the NodeSelector field,
|
||||
// overwriting an existing map entries in NodeSelector field with the same key.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithNodeSelector(entries map[string]string) *PrometheusSpecApplyConfiguration {
|
||||
if b.NodeSelector == nil && len(entries) > 0 {
|
||||
b.NodeSelector = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.NodeSelector[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServiceAccountName field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithServiceAccountName(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.ServiceAccountName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSecrets adds the given value to the Secrets field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Secrets field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithSecrets(values ...string) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Secrets = append(b.Secrets, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConfigMaps adds the given value to the ConfigMaps field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ConfigMaps field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithConfigMaps(values ...string) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ConfigMaps = append(b.ConfigMaps, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAffinity sets the Affinity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Affinity field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithAffinity(value corev1.Affinity) *PrometheusSpecApplyConfiguration {
|
||||
b.Affinity = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Tolerations field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithTolerations(values ...corev1.Toleration) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Tolerations = append(b.Tolerations, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithTopologySpreadConstraints(values ...corev1.TopologySpreadConstraint) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRemoteWrite adds the given value to the RemoteWrite field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the RemoteWrite field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithRemoteWrite(values ...*RemoteWriteSpecApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRemoteWrite")
|
||||
}
|
||||
b.RemoteWrite = append(b.RemoteWrite, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SecurityContext field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithSecurityContext(value corev1.PodSecurityContext) *PrometheusSpecApplyConfiguration {
|
||||
b.SecurityContext = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithListenLocal sets the ListenLocal field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ListenLocal field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithListenLocal(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.ListenLocal = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContainers adds the given value to the Containers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Containers field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithContainers(values ...corev1.Container) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Containers = append(b.Containers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInitContainers adds the given value to the InitContainers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the InitContainers field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithInitContainers(values ...corev1.Container) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.InitContainers = append(b.InitContainers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAdditionalScrapeConfigs sets the AdditionalScrapeConfigs field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AdditionalScrapeConfigs field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithAdditionalScrapeConfigs(value corev1.SecretKeySelector) *PrometheusSpecApplyConfiguration {
|
||||
b.AdditionalScrapeConfigs = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIServerConfig sets the APIServerConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIServerConfig field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithAPIServerConfig(value *APIServerConfigApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.APIServerConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPriorityClassName sets the PriorityClassName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PriorityClassName field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithPriorityClassName(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.PriorityClassName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPortName sets the PortName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PortName field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithPortName(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.PortName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithArbitraryFSAccessThroughSMs sets the ArbitraryFSAccessThroughSMs field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ArbitraryFSAccessThroughSMs field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithArbitraryFSAccessThroughSMs(value *ArbitraryFSAccessThroughSMsConfigApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.ArbitraryFSAccessThroughSMs = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOverrideHonorLabels sets the OverrideHonorLabels field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OverrideHonorLabels field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithOverrideHonorLabels(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.OverrideHonorLabels = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOverrideHonorTimestamps sets the OverrideHonorTimestamps field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OverrideHonorTimestamps field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithOverrideHonorTimestamps(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.OverrideHonorTimestamps = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIgnoreNamespaceSelectors sets the IgnoreNamespaceSelectors field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IgnoreNamespaceSelectors field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithIgnoreNamespaceSelectors(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.IgnoreNamespaceSelectors = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedNamespaceLabel sets the EnforcedNamespaceLabel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedNamespaceLabel field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEnforcedNamespaceLabel(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.EnforcedNamespaceLabel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedSampleLimit sets the EnforcedSampleLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedSampleLimit field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEnforcedSampleLimit(value uint64) *PrometheusSpecApplyConfiguration {
|
||||
b.EnforcedSampleLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedTargetLimit sets the EnforcedTargetLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedTargetLimit field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEnforcedTargetLimit(value uint64) *PrometheusSpecApplyConfiguration {
|
||||
b.EnforcedTargetLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedLabelLimit sets the EnforcedLabelLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedLabelLimit field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEnforcedLabelLimit(value uint64) *PrometheusSpecApplyConfiguration {
|
||||
b.EnforcedLabelLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedLabelNameLengthLimit sets the EnforcedLabelNameLengthLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedLabelNameLengthLimit field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEnforcedLabelNameLengthLimit(value uint64) *PrometheusSpecApplyConfiguration {
|
||||
b.EnforcedLabelNameLengthLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedLabelValueLengthLimit sets the EnforcedLabelValueLengthLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedLabelValueLengthLimit field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEnforcedLabelValueLengthLimit(value uint64) *PrometheusSpecApplyConfiguration {
|
||||
b.EnforcedLabelValueLengthLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedBodySizeLimit sets the EnforcedBodySizeLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedBodySizeLimit field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEnforcedBodySizeLimit(value monitoringv1.ByteSize) *PrometheusSpecApplyConfiguration {
|
||||
b.EnforcedBodySizeLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MinReadySeconds field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithMinReadySeconds(value uint32) *PrometheusSpecApplyConfiguration {
|
||||
b.MinReadySeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHostAliases adds the given value to the HostAliases field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the HostAliases field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithHostAliases(values ...*HostAliasApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithHostAliases")
|
||||
}
|
||||
b.HostAliases = append(b.HostAliases, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAdditionalArgs adds the given value to the AdditionalArgs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the AdditionalArgs field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithAdditionalArgs(values ...*ArgumentApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithAdditionalArgs")
|
||||
}
|
||||
b.AdditionalArgs = append(b.AdditionalArgs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWALCompression sets the WALCompression field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the WALCompression field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithWALCompression(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.WALCompression = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExcludedFromEnforcement adds the given value to the ExcludedFromEnforcement field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ExcludedFromEnforcement field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithExcludedFromEnforcement(values ...*ObjectReferenceApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithExcludedFromEnforcement")
|
||||
}
|
||||
b.ExcludedFromEnforcement = append(b.ExcludedFromEnforcement, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHostNetwork sets the HostNetwork field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HostNetwork field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithHostNetwork(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.HostNetwork = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBaseImage sets the BaseImage field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BaseImage field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithBaseImage(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.BaseImage = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTag sets the Tag field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Tag field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithTag(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.Tag = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSHA sets the SHA field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SHA field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithSHA(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.SHA = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRetention sets the Retention field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Retention field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithRetention(value monitoringv1.Duration) *PrometheusSpecApplyConfiguration {
|
||||
b.Retention = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRetentionSize sets the RetentionSize field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RetentionSize field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithRetentionSize(value monitoringv1.ByteSize) *PrometheusSpecApplyConfiguration {
|
||||
b.RetentionSize = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDisableCompaction sets the DisableCompaction field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DisableCompaction field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithDisableCompaction(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.DisableCompaction = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRules sets the Rules field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Rules field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithRules(value *RulesApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.Rules = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPrometheusRulesExcludedFromEnforce adds the given value to the PrometheusRulesExcludedFromEnforce field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the PrometheusRulesExcludedFromEnforce field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithPrometheusRulesExcludedFromEnforce(values ...*PrometheusRuleExcludeConfigApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithPrometheusRulesExcludedFromEnforce")
|
||||
}
|
||||
b.PrometheusRulesExcludedFromEnforce = append(b.PrometheusRulesExcludedFromEnforce, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithQuery sets the Query field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Query field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithQuery(value *QuerySpecApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.Query = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRuleSelector sets the RuleSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RuleSelector field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithRuleSelector(value metav1.LabelSelector) *PrometheusSpecApplyConfiguration {
|
||||
b.RuleSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRuleNamespaceSelector sets the RuleNamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RuleNamespaceSelector field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithRuleNamespaceSelector(value metav1.LabelSelector) *PrometheusSpecApplyConfiguration {
|
||||
b.RuleNamespaceSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlerting sets the Alerting field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Alerting field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithAlerting(value *AlertingSpecApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.Alerting = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRemoteRead adds the given value to the RemoteRead field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the RemoteRead field.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithRemoteRead(values ...*RemoteReadSpecApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRemoteRead")
|
||||
}
|
||||
b.RemoteRead = append(b.RemoteRead, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAdditionalAlertRelabelConfigs sets the AdditionalAlertRelabelConfigs field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AdditionalAlertRelabelConfigs field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithAdditionalAlertRelabelConfigs(value corev1.SecretKeySelector) *PrometheusSpecApplyConfiguration {
|
||||
b.AdditionalAlertRelabelConfigs = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAdditionalAlertManagerConfigs sets the AdditionalAlertManagerConfigs field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AdditionalAlertManagerConfigs field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithAdditionalAlertManagerConfigs(value corev1.SecretKeySelector) *PrometheusSpecApplyConfiguration {
|
||||
b.AdditionalAlertManagerConfigs = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithThanos sets the Thanos field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Thanos field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithThanos(value *ThanosSpecApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.Thanos = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithQueryLogFile sets the QueryLogFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the QueryLogFile field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithQueryLogFile(value string) *PrometheusSpecApplyConfiguration {
|
||||
b.QueryLogFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAllowOverlappingBlocks sets the AllowOverlappingBlocks field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AllowOverlappingBlocks field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithAllowOverlappingBlocks(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.AllowOverlappingBlocks = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExemplars sets the Exemplars field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Exemplars field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithExemplars(value *ExemplarsApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.Exemplars = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEvaluationInterval sets the EvaluationInterval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EvaluationInterval field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEvaluationInterval(value monitoringv1.Duration) *PrometheusSpecApplyConfiguration {
|
||||
b.EvaluationInterval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnableAdminAPI sets the EnableAdminAPI field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnableAdminAPI field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithEnableAdminAPI(value bool) *PrometheusSpecApplyConfiguration {
|
||||
b.EnableAdminAPI = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTSDB sets the TSDB field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TSDB field is set to the value of the last call.
|
||||
func (b *PrometheusSpecApplyConfiguration) WithTSDB(value *TSDBSpecApplyConfiguration) *PrometheusSpecApplyConfiguration {
|
||||
b.TSDB = value
|
||||
return b
|
||||
}
|
101
pkg/client/applyconfiguration/monitoring/v1/prometheusstatus.go
Normal file
101
pkg/client/applyconfiguration/monitoring/v1/prometheusstatus.go
Normal file
|
@ -0,0 +1,101 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// PrometheusStatusApplyConfiguration represents an declarative configuration of the PrometheusStatus type for use
|
||||
// with apply.
|
||||
type PrometheusStatusApplyConfiguration struct {
|
||||
Paused *bool `json:"paused,omitempty"`
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"`
|
||||
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
|
||||
UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"`
|
||||
Conditions []PrometheusConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
ShardStatuses []ShardStatusApplyConfiguration `json:"shardStatuses,omitempty"`
|
||||
}
|
||||
|
||||
// PrometheusStatusApplyConfiguration constructs an declarative configuration of the PrometheusStatus type for use with
|
||||
// apply.
|
||||
func PrometheusStatus() *PrometheusStatusApplyConfiguration {
|
||||
return &PrometheusStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPaused sets the Paused field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Paused field is set to the value of the last call.
|
||||
func (b *PrometheusStatusApplyConfiguration) WithPaused(value bool) *PrometheusStatusApplyConfiguration {
|
||||
b.Paused = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplicas sets the Replicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Replicas field is set to the value of the last call.
|
||||
func (b *PrometheusStatusApplyConfiguration) WithReplicas(value int32) *PrometheusStatusApplyConfiguration {
|
||||
b.Replicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUpdatedReplicas sets the UpdatedReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UpdatedReplicas field is set to the value of the last call.
|
||||
func (b *PrometheusStatusApplyConfiguration) WithUpdatedReplicas(value int32) *PrometheusStatusApplyConfiguration {
|
||||
b.UpdatedReplicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AvailableReplicas field is set to the value of the last call.
|
||||
func (b *PrometheusStatusApplyConfiguration) WithAvailableReplicas(value int32) *PrometheusStatusApplyConfiguration {
|
||||
b.AvailableReplicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUnavailableReplicas sets the UnavailableReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UnavailableReplicas field is set to the value of the last call.
|
||||
func (b *PrometheusStatusApplyConfiguration) WithUnavailableReplicas(value int32) *PrometheusStatusApplyConfiguration {
|
||||
b.UnavailableReplicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConditions adds the given value to the Conditions field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Conditions field.
|
||||
func (b *PrometheusStatusApplyConfiguration) WithConditions(values ...*PrometheusConditionApplyConfiguration) *PrometheusStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithConditions")
|
||||
}
|
||||
b.Conditions = append(b.Conditions, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShardStatuses adds the given value to the ShardStatuses field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ShardStatuses field.
|
||||
func (b *PrometheusStatusApplyConfiguration) WithShardStatuses(values ...*ShardStatusApplyConfiguration) *PrometheusStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithShardStatuses")
|
||||
}
|
||||
b.ShardStatuses = append(b.ShardStatuses, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// PrometheusWebSpecApplyConfiguration represents an declarative configuration of the PrometheusWebSpec type for use
|
||||
// with apply.
|
||||
type PrometheusWebSpecApplyConfiguration struct {
|
||||
WebConfigFileFieldsApplyConfiguration `json:",inline"`
|
||||
PageTitle *string `json:"pageTitle,omitempty"`
|
||||
}
|
||||
|
||||
// PrometheusWebSpecApplyConfiguration constructs an declarative configuration of the PrometheusWebSpec type for use with
|
||||
// apply.
|
||||
func PrometheusWebSpec() *PrometheusWebSpecApplyConfiguration {
|
||||
return &PrometheusWebSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *PrometheusWebSpecApplyConfiguration) WithTLSConfig(value *WebTLSConfigApplyConfiguration) *PrometheusWebSpecApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *PrometheusWebSpecApplyConfiguration) WithHTTPConfig(value *WebHTTPConfigApplyConfiguration) *PrometheusWebSpecApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPageTitle sets the PageTitle field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PageTitle field is set to the value of the last call.
|
||||
func (b *PrometheusWebSpecApplyConfiguration) WithPageTitle(value string) *PrometheusWebSpecApplyConfiguration {
|
||||
b.PageTitle = &value
|
||||
return b
|
||||
}
|
68
pkg/client/applyconfiguration/monitoring/v1/queryspec.go
Normal file
68
pkg/client/applyconfiguration/monitoring/v1/queryspec.go
Normal file
|
@ -0,0 +1,68 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
)
|
||||
|
||||
// QuerySpecApplyConfiguration represents an declarative configuration of the QuerySpec type for use
|
||||
// with apply.
|
||||
type QuerySpecApplyConfiguration struct {
|
||||
LookbackDelta *string `json:"lookbackDelta,omitempty"`
|
||||
MaxConcurrency *int32 `json:"maxConcurrency,omitempty"`
|
||||
MaxSamples *int32 `json:"maxSamples,omitempty"`
|
||||
Timeout *v1.Duration `json:"timeout,omitempty"`
|
||||
}
|
||||
|
||||
// QuerySpecApplyConfiguration constructs an declarative configuration of the QuerySpec type for use with
|
||||
// apply.
|
||||
func QuerySpec() *QuerySpecApplyConfiguration {
|
||||
return &QuerySpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithLookbackDelta sets the LookbackDelta field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LookbackDelta field is set to the value of the last call.
|
||||
func (b *QuerySpecApplyConfiguration) WithLookbackDelta(value string) *QuerySpecApplyConfiguration {
|
||||
b.LookbackDelta = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMaxConcurrency sets the MaxConcurrency field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxConcurrency field is set to the value of the last call.
|
||||
func (b *QuerySpecApplyConfiguration) WithMaxConcurrency(value int32) *QuerySpecApplyConfiguration {
|
||||
b.MaxConcurrency = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMaxSamples sets the MaxSamples field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxSamples field is set to the value of the last call.
|
||||
func (b *QuerySpecApplyConfiguration) WithMaxSamples(value int32) *QuerySpecApplyConfiguration {
|
||||
b.MaxSamples = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTimeout sets the Timeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Timeout field is set to the value of the last call.
|
||||
func (b *QuerySpecApplyConfiguration) WithTimeout(value v1.Duration) *QuerySpecApplyConfiguration {
|
||||
b.Timeout = &value
|
||||
return b
|
||||
}
|
109
pkg/client/applyconfiguration/monitoring/v1/queueconfig.go
Normal file
109
pkg/client/applyconfiguration/monitoring/v1/queueconfig.go
Normal file
|
@ -0,0 +1,109 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// QueueConfigApplyConfiguration represents an declarative configuration of the QueueConfig type for use
|
||||
// with apply.
|
||||
type QueueConfigApplyConfiguration struct {
|
||||
Capacity *int `json:"capacity,omitempty"`
|
||||
MinShards *int `json:"minShards,omitempty"`
|
||||
MaxShards *int `json:"maxShards,omitempty"`
|
||||
MaxSamplesPerSend *int `json:"maxSamplesPerSend,omitempty"`
|
||||
BatchSendDeadline *string `json:"batchSendDeadline,omitempty"`
|
||||
MaxRetries *int `json:"maxRetries,omitempty"`
|
||||
MinBackoff *string `json:"minBackoff,omitempty"`
|
||||
MaxBackoff *string `json:"maxBackoff,omitempty"`
|
||||
RetryOnRateLimit *bool `json:"retryOnRateLimit,omitempty"`
|
||||
}
|
||||
|
||||
// QueueConfigApplyConfiguration constructs an declarative configuration of the QueueConfig type for use with
|
||||
// apply.
|
||||
func QueueConfig() *QueueConfigApplyConfiguration {
|
||||
return &QueueConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithCapacity sets the Capacity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Capacity field is set to the value of the last call.
|
||||
func (b *QueueConfigApplyConfiguration) WithCapacity(value int) *QueueConfigApplyConfiguration {
|
||||
b.Capacity = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMinShards sets the MinShards field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MinShards field is set to the value of the last call.
|
||||
func (b *QueueConfigApplyConfiguration) WithMinShards(value int) *QueueConfigApplyConfiguration {
|
||||
b.MinShards = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMaxShards sets the MaxShards field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxShards field is set to the value of the last call.
|
||||
func (b *QueueConfigApplyConfiguration) WithMaxShards(value int) *QueueConfigApplyConfiguration {
|
||||
b.MaxShards = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMaxSamplesPerSend sets the MaxSamplesPerSend field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxSamplesPerSend field is set to the value of the last call.
|
||||
func (b *QueueConfigApplyConfiguration) WithMaxSamplesPerSend(value int) *QueueConfigApplyConfiguration {
|
||||
b.MaxSamplesPerSend = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBatchSendDeadline sets the BatchSendDeadline field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BatchSendDeadline field is set to the value of the last call.
|
||||
func (b *QueueConfigApplyConfiguration) WithBatchSendDeadline(value string) *QueueConfigApplyConfiguration {
|
||||
b.BatchSendDeadline = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMaxRetries sets the MaxRetries field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxRetries field is set to the value of the last call.
|
||||
func (b *QueueConfigApplyConfiguration) WithMaxRetries(value int) *QueueConfigApplyConfiguration {
|
||||
b.MaxRetries = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMinBackoff sets the MinBackoff field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MinBackoff field is set to the value of the last call.
|
||||
func (b *QueueConfigApplyConfiguration) WithMinBackoff(value string) *QueueConfigApplyConfiguration {
|
||||
b.MinBackoff = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMaxBackoff sets the MaxBackoff field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxBackoff field is set to the value of the last call.
|
||||
func (b *QueueConfigApplyConfiguration) WithMaxBackoff(value string) *QueueConfigApplyConfiguration {
|
||||
b.MaxBackoff = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRetryOnRateLimit sets the RetryOnRateLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RetryOnRateLimit field is set to the value of the last call.
|
||||
func (b *QueueConfigApplyConfiguration) WithRetryOnRateLimit(value bool) *QueueConfigApplyConfiguration {
|
||||
b.RetryOnRateLimit = &value
|
||||
return b
|
||||
}
|
97
pkg/client/applyconfiguration/monitoring/v1/relabelconfig.go
Normal file
97
pkg/client/applyconfiguration/monitoring/v1/relabelconfig.go
Normal file
|
@ -0,0 +1,97 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
)
|
||||
|
||||
// RelabelConfigApplyConfiguration represents an declarative configuration of the RelabelConfig type for use
|
||||
// with apply.
|
||||
type RelabelConfigApplyConfiguration struct {
|
||||
SourceLabels []v1.LabelName `json:"sourceLabels,omitempty"`
|
||||
Separator *string `json:"separator,omitempty"`
|
||||
TargetLabel *string `json:"targetLabel,omitempty"`
|
||||
Regex *string `json:"regex,omitempty"`
|
||||
Modulus *uint64 `json:"modulus,omitempty"`
|
||||
Replacement *string `json:"replacement,omitempty"`
|
||||
Action *string `json:"action,omitempty"`
|
||||
}
|
||||
|
||||
// RelabelConfigApplyConfiguration constructs an declarative configuration of the RelabelConfig type for use with
|
||||
// apply.
|
||||
func RelabelConfig() *RelabelConfigApplyConfiguration {
|
||||
return &RelabelConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSourceLabels adds the given value to the SourceLabels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the SourceLabels field.
|
||||
func (b *RelabelConfigApplyConfiguration) WithSourceLabels(values ...v1.LabelName) *RelabelConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
b.SourceLabels = append(b.SourceLabels, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSeparator sets the Separator field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Separator field is set to the value of the last call.
|
||||
func (b *RelabelConfigApplyConfiguration) WithSeparator(value string) *RelabelConfigApplyConfiguration {
|
||||
b.Separator = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetLabel sets the TargetLabel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetLabel field is set to the value of the last call.
|
||||
func (b *RelabelConfigApplyConfiguration) WithTargetLabel(value string) *RelabelConfigApplyConfiguration {
|
||||
b.TargetLabel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRegex sets the Regex field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Regex field is set to the value of the last call.
|
||||
func (b *RelabelConfigApplyConfiguration) WithRegex(value string) *RelabelConfigApplyConfiguration {
|
||||
b.Regex = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithModulus sets the Modulus field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Modulus field is set to the value of the last call.
|
||||
func (b *RelabelConfigApplyConfiguration) WithModulus(value uint64) *RelabelConfigApplyConfiguration {
|
||||
b.Modulus = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplacement sets the Replacement field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Replacement field is set to the value of the last call.
|
||||
func (b *RelabelConfigApplyConfiguration) WithReplacement(value string) *RelabelConfigApplyConfiguration {
|
||||
b.Replacement = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAction sets the Action field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Action field is set to the value of the last call.
|
||||
func (b *RelabelConfigApplyConfiguration) WithAction(value string) *RelabelConfigApplyConfiguration {
|
||||
b.Action = &value
|
||||
return b
|
||||
}
|
170
pkg/client/applyconfiguration/monitoring/v1/remotereadspec.go
Normal file
170
pkg/client/applyconfiguration/monitoring/v1/remotereadspec.go
Normal file
|
@ -0,0 +1,170 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
)
|
||||
|
||||
// RemoteReadSpecApplyConfiguration represents an declarative configuration of the RemoteReadSpec type for use
|
||||
// with apply.
|
||||
type RemoteReadSpecApplyConfiguration struct {
|
||||
URL *string `json:"url,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
RequiredMatchers map[string]string `json:"requiredMatchers,omitempty"`
|
||||
RemoteTimeout *v1.Duration `json:"remoteTimeout,omitempty"`
|
||||
Headers map[string]string `json:"headers,omitempty"`
|
||||
ReadRecent *bool `json:"readRecent,omitempty"`
|
||||
BasicAuth *BasicAuthApplyConfiguration `json:"basicAuth,omitempty"`
|
||||
OAuth2 *OAuth2ApplyConfiguration `json:"oauth2,omitempty"`
|
||||
BearerToken *string `json:"bearerToken,omitempty"`
|
||||
BearerTokenFile *string `json:"bearerTokenFile,omitempty"`
|
||||
Authorization *AuthorizationApplyConfiguration `json:"authorization,omitempty"`
|
||||
TLSConfig *TLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
ProxyURL *string `json:"proxyUrl,omitempty"`
|
||||
FilterExternalLabels *bool `json:"filterExternalLabels,omitempty"`
|
||||
}
|
||||
|
||||
// RemoteReadSpecApplyConfiguration constructs an declarative configuration of the RemoteReadSpec type for use with
|
||||
// apply.
|
||||
func RemoteReadSpec() *RemoteReadSpecApplyConfiguration {
|
||||
return &RemoteReadSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithURL sets the URL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the URL field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithURL(value string) *RemoteReadSpecApplyConfiguration {
|
||||
b.URL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithName(value string) *RemoteReadSpecApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRequiredMatchers puts the entries into the RequiredMatchers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the RequiredMatchers field,
|
||||
// overwriting an existing map entries in RequiredMatchers field with the same key.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithRequiredMatchers(entries map[string]string) *RemoteReadSpecApplyConfiguration {
|
||||
if b.RequiredMatchers == nil && len(entries) > 0 {
|
||||
b.RequiredMatchers = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.RequiredMatchers[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRemoteTimeout sets the RemoteTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RemoteTimeout field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithRemoteTimeout(value v1.Duration) *RemoteReadSpecApplyConfiguration {
|
||||
b.RemoteTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHeaders puts the entries into the Headers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Headers field,
|
||||
// overwriting an existing map entries in Headers field with the same key.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithHeaders(entries map[string]string) *RemoteReadSpecApplyConfiguration {
|
||||
if b.Headers == nil && len(entries) > 0 {
|
||||
b.Headers = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Headers[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReadRecent sets the ReadRecent field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ReadRecent field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithReadRecent(value bool) *RemoteReadSpecApplyConfiguration {
|
||||
b.ReadRecent = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BasicAuth field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithBasicAuth(value *BasicAuthApplyConfiguration) *RemoteReadSpecApplyConfiguration {
|
||||
b.BasicAuth = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOAuth2 sets the OAuth2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OAuth2 field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithOAuth2(value *OAuth2ApplyConfiguration) *RemoteReadSpecApplyConfiguration {
|
||||
b.OAuth2 = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerToken sets the BearerToken field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerToken field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithBearerToken(value string) *RemoteReadSpecApplyConfiguration {
|
||||
b.BearerToken = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerTokenFile sets the BearerTokenFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerTokenFile field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithBearerTokenFile(value string) *RemoteReadSpecApplyConfiguration {
|
||||
b.BearerTokenFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthorization sets the Authorization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Authorization field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithAuthorization(value *AuthorizationApplyConfiguration) *RemoteReadSpecApplyConfiguration {
|
||||
b.Authorization = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithTLSConfig(value *TLSConfigApplyConfiguration) *RemoteReadSpecApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProxyURL sets the ProxyURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProxyURL field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithProxyURL(value string) *RemoteReadSpecApplyConfiguration {
|
||||
b.ProxyURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFilterExternalLabels sets the FilterExternalLabels field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FilterExternalLabels field is set to the value of the last call.
|
||||
func (b *RemoteReadSpecApplyConfiguration) WithFilterExternalLabels(value bool) *RemoteReadSpecApplyConfiguration {
|
||||
b.FilterExternalLabels = &value
|
||||
return b
|
||||
}
|
187
pkg/client/applyconfiguration/monitoring/v1/remotewritespec.go
Normal file
187
pkg/client/applyconfiguration/monitoring/v1/remotewritespec.go
Normal file
|
@ -0,0 +1,187 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
)
|
||||
|
||||
// RemoteWriteSpecApplyConfiguration represents an declarative configuration of the RemoteWriteSpec type for use
|
||||
// with apply.
|
||||
type RemoteWriteSpecApplyConfiguration struct {
|
||||
URL *string `json:"url,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
SendExemplars *bool `json:"sendExemplars,omitempty"`
|
||||
RemoteTimeout *v1.Duration `json:"remoteTimeout,omitempty"`
|
||||
Headers map[string]string `json:"headers,omitempty"`
|
||||
WriteRelabelConfigs []RelabelConfigApplyConfiguration `json:"writeRelabelConfigs,omitempty"`
|
||||
OAuth2 *OAuth2ApplyConfiguration `json:"oauth2,omitempty"`
|
||||
BasicAuth *BasicAuthApplyConfiguration `json:"basicAuth,omitempty"`
|
||||
BearerToken *string `json:"bearerToken,omitempty"`
|
||||
BearerTokenFile *string `json:"bearerTokenFile,omitempty"`
|
||||
Authorization *AuthorizationApplyConfiguration `json:"authorization,omitempty"`
|
||||
Sigv4 *Sigv4ApplyConfiguration `json:"sigv4,omitempty"`
|
||||
TLSConfig *TLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
ProxyURL *string `json:"proxyUrl,omitempty"`
|
||||
QueueConfig *QueueConfigApplyConfiguration `json:"queueConfig,omitempty"`
|
||||
MetadataConfig *MetadataConfigApplyConfiguration `json:"metadataConfig,omitempty"`
|
||||
}
|
||||
|
||||
// RemoteWriteSpecApplyConfiguration constructs an declarative configuration of the RemoteWriteSpec type for use with
|
||||
// apply.
|
||||
func RemoteWriteSpec() *RemoteWriteSpecApplyConfiguration {
|
||||
return &RemoteWriteSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithURL sets the URL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the URL field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithURL(value string) *RemoteWriteSpecApplyConfiguration {
|
||||
b.URL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithName(value string) *RemoteWriteSpecApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSendExemplars sets the SendExemplars field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SendExemplars field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithSendExemplars(value bool) *RemoteWriteSpecApplyConfiguration {
|
||||
b.SendExemplars = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRemoteTimeout sets the RemoteTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RemoteTimeout field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithRemoteTimeout(value v1.Duration) *RemoteWriteSpecApplyConfiguration {
|
||||
b.RemoteTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHeaders puts the entries into the Headers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Headers field,
|
||||
// overwriting an existing map entries in Headers field with the same key.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithHeaders(entries map[string]string) *RemoteWriteSpecApplyConfiguration {
|
||||
if b.Headers == nil && len(entries) > 0 {
|
||||
b.Headers = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Headers[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWriteRelabelConfigs adds the given value to the WriteRelabelConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the WriteRelabelConfigs field.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithWriteRelabelConfigs(values ...*RelabelConfigApplyConfiguration) *RemoteWriteSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithWriteRelabelConfigs")
|
||||
}
|
||||
b.WriteRelabelConfigs = append(b.WriteRelabelConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOAuth2 sets the OAuth2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OAuth2 field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithOAuth2(value *OAuth2ApplyConfiguration) *RemoteWriteSpecApplyConfiguration {
|
||||
b.OAuth2 = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BasicAuth field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithBasicAuth(value *BasicAuthApplyConfiguration) *RemoteWriteSpecApplyConfiguration {
|
||||
b.BasicAuth = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerToken sets the BearerToken field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerToken field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithBearerToken(value string) *RemoteWriteSpecApplyConfiguration {
|
||||
b.BearerToken = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerTokenFile sets the BearerTokenFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerTokenFile field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithBearerTokenFile(value string) *RemoteWriteSpecApplyConfiguration {
|
||||
b.BearerTokenFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthorization sets the Authorization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Authorization field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithAuthorization(value *AuthorizationApplyConfiguration) *RemoteWriteSpecApplyConfiguration {
|
||||
b.Authorization = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSigv4 sets the Sigv4 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Sigv4 field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithSigv4(value *Sigv4ApplyConfiguration) *RemoteWriteSpecApplyConfiguration {
|
||||
b.Sigv4 = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithTLSConfig(value *TLSConfigApplyConfiguration) *RemoteWriteSpecApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProxyURL sets the ProxyURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProxyURL field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithProxyURL(value string) *RemoteWriteSpecApplyConfiguration {
|
||||
b.ProxyURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithQueueConfig sets the QueueConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the QueueConfig field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithQueueConfig(value *QueueConfigApplyConfiguration) *RemoteWriteSpecApplyConfiguration {
|
||||
b.QueueConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMetadataConfig sets the MetadataConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MetadataConfig field is set to the value of the last call.
|
||||
func (b *RemoteWriteSpecApplyConfiguration) WithMetadataConfig(value *MetadataConfigApplyConfiguration) *RemoteWriteSpecApplyConfiguration {
|
||||
b.MetadataConfig = value
|
||||
return b
|
||||
}
|
99
pkg/client/applyconfiguration/monitoring/v1/rule.go
Normal file
99
pkg/client/applyconfiguration/monitoring/v1/rule.go
Normal file
|
@ -0,0 +1,99 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
// RuleApplyConfiguration represents an declarative configuration of the Rule type for use
|
||||
// with apply.
|
||||
type RuleApplyConfiguration struct {
|
||||
Record *string `json:"record,omitempty"`
|
||||
Alert *string `json:"alert,omitempty"`
|
||||
Expr *intstr.IntOrString `json:"expr,omitempty"`
|
||||
For *v1.Duration `json:"for,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
}
|
||||
|
||||
// RuleApplyConfiguration constructs an declarative configuration of the Rule type for use with
|
||||
// apply.
|
||||
func Rule() *RuleApplyConfiguration {
|
||||
return &RuleApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithRecord sets the Record field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Record field is set to the value of the last call.
|
||||
func (b *RuleApplyConfiguration) WithRecord(value string) *RuleApplyConfiguration {
|
||||
b.Record = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlert sets the Alert field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Alert field is set to the value of the last call.
|
||||
func (b *RuleApplyConfiguration) WithAlert(value string) *RuleApplyConfiguration {
|
||||
b.Alert = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExpr sets the Expr field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Expr field is set to the value of the last call.
|
||||
func (b *RuleApplyConfiguration) WithExpr(value intstr.IntOrString) *RuleApplyConfiguration {
|
||||
b.Expr = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFor sets the For field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the For field is set to the value of the last call.
|
||||
func (b *RuleApplyConfiguration) WithFor(value v1.Duration) *RuleApplyConfiguration {
|
||||
b.For = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *RuleApplyConfiguration) WithLabels(entries map[string]string) *RuleApplyConfiguration {
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *RuleApplyConfiguration) WithAnnotations(entries map[string]string) *RuleApplyConfiguration {
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
73
pkg/client/applyconfiguration/monitoring/v1/rulegroup.go
Normal file
73
pkg/client/applyconfiguration/monitoring/v1/rulegroup.go
Normal file
|
@ -0,0 +1,73 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
)
|
||||
|
||||
// RuleGroupApplyConfiguration represents an declarative configuration of the RuleGroup type for use
|
||||
// with apply.
|
||||
type RuleGroupApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Interval *v1.Duration `json:"interval,omitempty"`
|
||||
Rules []RuleApplyConfiguration `json:"rules,omitempty"`
|
||||
PartialResponseStrategy *string `json:"partial_response_strategy,omitempty"`
|
||||
}
|
||||
|
||||
// RuleGroupApplyConfiguration constructs an declarative configuration of the RuleGroup type for use with
|
||||
// apply.
|
||||
func RuleGroup() *RuleGroupApplyConfiguration {
|
||||
return &RuleGroupApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *RuleGroupApplyConfiguration) WithName(value string) *RuleGroupApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInterval sets the Interval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Interval field is set to the value of the last call.
|
||||
func (b *RuleGroupApplyConfiguration) WithInterval(value v1.Duration) *RuleGroupApplyConfiguration {
|
||||
b.Interval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRules adds the given value to the Rules field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Rules field.
|
||||
func (b *RuleGroupApplyConfiguration) WithRules(values ...*RuleApplyConfiguration) *RuleGroupApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRules")
|
||||
}
|
||||
b.Rules = append(b.Rules, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPartialResponseStrategy sets the PartialResponseStrategy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PartialResponseStrategy field is set to the value of the last call.
|
||||
func (b *RuleGroupApplyConfiguration) WithPartialResponseStrategy(value string) *RuleGroupApplyConfiguration {
|
||||
b.PartialResponseStrategy = &value
|
||||
return b
|
||||
}
|
37
pkg/client/applyconfiguration/monitoring/v1/rules.go
Normal file
37
pkg/client/applyconfiguration/monitoring/v1/rules.go
Normal file
|
@ -0,0 +1,37 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// RulesApplyConfiguration represents an declarative configuration of the Rules type for use
|
||||
// with apply.
|
||||
type RulesApplyConfiguration struct {
|
||||
Alert *RulesAlertApplyConfiguration `json:"alert,omitempty"`
|
||||
}
|
||||
|
||||
// RulesApplyConfiguration constructs an declarative configuration of the Rules type for use with
|
||||
// apply.
|
||||
func Rules() *RulesApplyConfiguration {
|
||||
return &RulesApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithAlert sets the Alert field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Alert field is set to the value of the last call.
|
||||
func (b *RulesApplyConfiguration) WithAlert(value *RulesAlertApplyConfiguration) *RulesApplyConfiguration {
|
||||
b.Alert = value
|
||||
return b
|
||||
}
|
55
pkg/client/applyconfiguration/monitoring/v1/rulesalert.go
Normal file
55
pkg/client/applyconfiguration/monitoring/v1/rulesalert.go
Normal file
|
@ -0,0 +1,55 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// RulesAlertApplyConfiguration represents an declarative configuration of the RulesAlert type for use
|
||||
// with apply.
|
||||
type RulesAlertApplyConfiguration struct {
|
||||
ForOutageTolerance *string `json:"forOutageTolerance,omitempty"`
|
||||
ForGracePeriod *string `json:"forGracePeriod,omitempty"`
|
||||
ResendDelay *string `json:"resendDelay,omitempty"`
|
||||
}
|
||||
|
||||
// RulesAlertApplyConfiguration constructs an declarative configuration of the RulesAlert type for use with
|
||||
// apply.
|
||||
func RulesAlert() *RulesAlertApplyConfiguration {
|
||||
return &RulesAlertApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithForOutageTolerance sets the ForOutageTolerance field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ForOutageTolerance field is set to the value of the last call.
|
||||
func (b *RulesAlertApplyConfiguration) WithForOutageTolerance(value string) *RulesAlertApplyConfiguration {
|
||||
b.ForOutageTolerance = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithForGracePeriod sets the ForGracePeriod field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ForGracePeriod field is set to the value of the last call.
|
||||
func (b *RulesAlertApplyConfiguration) WithForGracePeriod(value string) *RulesAlertApplyConfiguration {
|
||||
b.ForGracePeriod = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResendDelay sets the ResendDelay field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResendDelay field is set to the value of the last call.
|
||||
func (b *RulesAlertApplyConfiguration) WithResendDelay(value string) *RulesAlertApplyConfiguration {
|
||||
b.ResendDelay = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// SafeAuthorizationApplyConfiguration represents an declarative configuration of the SafeAuthorization type for use
|
||||
// with apply.
|
||||
type SafeAuthorizationApplyConfiguration struct {
|
||||
Type *string `json:"type,omitempty"`
|
||||
Credentials *v1.SecretKeySelector `json:"credentials,omitempty"`
|
||||
}
|
||||
|
||||
// SafeAuthorizationApplyConfiguration constructs an declarative configuration of the SafeAuthorization type for use with
|
||||
// apply.
|
||||
func SafeAuthorization() *SafeAuthorizationApplyConfiguration {
|
||||
return &SafeAuthorizationApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *SafeAuthorizationApplyConfiguration) WithType(value string) *SafeAuthorizationApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCredentials sets the Credentials field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Credentials field is set to the value of the last call.
|
||||
func (b *SafeAuthorizationApplyConfiguration) WithCredentials(value v1.SecretKeySelector) *SafeAuthorizationApplyConfiguration {
|
||||
b.Credentials = &value
|
||||
return b
|
||||
}
|
77
pkg/client/applyconfiguration/monitoring/v1/safetlsconfig.go
Normal file
77
pkg/client/applyconfiguration/monitoring/v1/safetlsconfig.go
Normal file
|
@ -0,0 +1,77 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// SafeTLSConfigApplyConfiguration represents an declarative configuration of the SafeTLSConfig type for use
|
||||
// with apply.
|
||||
type SafeTLSConfigApplyConfiguration struct {
|
||||
CA *SecretOrConfigMapApplyConfiguration `json:"ca,omitempty"`
|
||||
Cert *SecretOrConfigMapApplyConfiguration `json:"cert,omitempty"`
|
||||
KeySecret *corev1.SecretKeySelector `json:"keySecret,omitempty"`
|
||||
ServerName *string `json:"serverName,omitempty"`
|
||||
InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"`
|
||||
}
|
||||
|
||||
// SafeTLSConfigApplyConfiguration constructs an declarative configuration of the SafeTLSConfig type for use with
|
||||
// apply.
|
||||
func SafeTLSConfig() *SafeTLSConfigApplyConfiguration {
|
||||
return &SafeTLSConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithCA sets the CA field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CA field is set to the value of the last call.
|
||||
func (b *SafeTLSConfigApplyConfiguration) WithCA(value *SecretOrConfigMapApplyConfiguration) *SafeTLSConfigApplyConfiguration {
|
||||
b.CA = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCert sets the Cert field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Cert field is set to the value of the last call.
|
||||
func (b *SafeTLSConfigApplyConfiguration) WithCert(value *SecretOrConfigMapApplyConfiguration) *SafeTLSConfigApplyConfiguration {
|
||||
b.Cert = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKeySecret sets the KeySecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the KeySecret field is set to the value of the last call.
|
||||
func (b *SafeTLSConfigApplyConfiguration) WithKeySecret(value corev1.SecretKeySelector) *SafeTLSConfigApplyConfiguration {
|
||||
b.KeySecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServerName sets the ServerName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServerName field is set to the value of the last call.
|
||||
func (b *SafeTLSConfigApplyConfiguration) WithServerName(value string) *SafeTLSConfigApplyConfiguration {
|
||||
b.ServerName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInsecureSkipVerify sets the InsecureSkipVerify field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the InsecureSkipVerify field is set to the value of the last call.
|
||||
func (b *SafeTLSConfigApplyConfiguration) WithInsecureSkipVerify(value bool) *SafeTLSConfigApplyConfiguration {
|
||||
b.InsecureSkipVerify = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// SecretOrConfigMapApplyConfiguration represents an declarative configuration of the SecretOrConfigMap type for use
|
||||
// with apply.
|
||||
type SecretOrConfigMapApplyConfiguration struct {
|
||||
Secret *v1.SecretKeySelector `json:"secret,omitempty"`
|
||||
ConfigMap *v1.ConfigMapKeySelector `json:"configMap,omitempty"`
|
||||
}
|
||||
|
||||
// SecretOrConfigMapApplyConfiguration constructs an declarative configuration of the SecretOrConfigMap type for use with
|
||||
// apply.
|
||||
func SecretOrConfigMap() *SecretOrConfigMapApplyConfiguration {
|
||||
return &SecretOrConfigMapApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSecret sets the Secret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Secret field is set to the value of the last call.
|
||||
func (b *SecretOrConfigMapApplyConfiguration) WithSecret(value v1.SecretKeySelector) *SecretOrConfigMapApplyConfiguration {
|
||||
b.Secret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConfigMap sets the ConfigMap field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ConfigMap field is set to the value of the last call.
|
||||
func (b *SecretOrConfigMapApplyConfiguration) WithConfigMap(value v1.ConfigMapKeySelector) *SecretOrConfigMapApplyConfiguration {
|
||||
b.ConfigMap = &value
|
||||
return b
|
||||
}
|
208
pkg/client/applyconfiguration/monitoring/v1/servicemonitor.go
Normal file
208
pkg/client/applyconfiguration/monitoring/v1/servicemonitor.go
Normal file
|
@ -0,0 +1,208 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// ServiceMonitorApplyConfiguration represents an declarative configuration of the ServiceMonitor type for use
|
||||
// with apply.
|
||||
type ServiceMonitorApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *ServiceMonitorSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// ServiceMonitor constructs an declarative configuration of the ServiceMonitor type for use with
|
||||
// apply.
|
||||
func ServiceMonitor(name, namespace string) *ServiceMonitorApplyConfiguration {
|
||||
b := &ServiceMonitorApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("ServiceMonitor")
|
||||
b.WithAPIVersion("monitoring.coreos.com/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithKind(value string) *ServiceMonitorApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithAPIVersion(value string) *ServiceMonitorApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithName(value string) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithGenerateName(value string) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithNamespace(value string) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithUID(value types.UID) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithResourceVersion(value string) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithGeneration(value int64) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithLabels(entries map[string]string) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithFinalizers(values ...string) *ServiceMonitorApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *ServiceMonitorApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *ServiceMonitorApplyConfiguration) WithSpec(value *ServiceMonitorSpecApplyConfiguration) *ServiceMonitorApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// ServiceMonitorSpecApplyConfiguration represents an declarative configuration of the ServiceMonitorSpec type for use
|
||||
// with apply.
|
||||
type ServiceMonitorSpecApplyConfiguration struct {
|
||||
JobLabel *string `json:"jobLabel,omitempty"`
|
||||
TargetLabels []string `json:"targetLabels,omitempty"`
|
||||
PodTargetLabels []string `json:"podTargetLabels,omitempty"`
|
||||
Endpoints []EndpointApplyConfiguration `json:"endpoints,omitempty"`
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
||||
NamespaceSelector *NamespaceSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
|
||||
SampleLimit *uint64 `json:"sampleLimit,omitempty"`
|
||||
TargetLimit *uint64 `json:"targetLimit,omitempty"`
|
||||
LabelLimit *uint64 `json:"labelLimit,omitempty"`
|
||||
LabelNameLengthLimit *uint64 `json:"labelNameLengthLimit,omitempty"`
|
||||
LabelValueLengthLimit *uint64 `json:"labelValueLengthLimit,omitempty"`
|
||||
AttachMetadata *AttachMetadataApplyConfiguration `json:"attachMetadata,omitempty"`
|
||||
}
|
||||
|
||||
// ServiceMonitorSpecApplyConfiguration constructs an declarative configuration of the ServiceMonitorSpec type for use with
|
||||
// apply.
|
||||
func ServiceMonitorSpec() *ServiceMonitorSpecApplyConfiguration {
|
||||
return &ServiceMonitorSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithJobLabel sets the JobLabel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the JobLabel field is set to the value of the last call.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithJobLabel(value string) *ServiceMonitorSpecApplyConfiguration {
|
||||
b.JobLabel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetLabels adds the given value to the TargetLabels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the TargetLabels field.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithTargetLabels(values ...string) *ServiceMonitorSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.TargetLabels = append(b.TargetLabels, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodTargetLabels adds the given value to the PodTargetLabels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the PodTargetLabels field.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithPodTargetLabels(values ...string) *ServiceMonitorSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.PodTargetLabels = append(b.PodTargetLabels, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEndpoints adds the given value to the Endpoints field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Endpoints field.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithEndpoints(values ...*EndpointApplyConfiguration) *ServiceMonitorSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithEndpoints")
|
||||
}
|
||||
b.Endpoints = append(b.Endpoints, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSelector sets the Selector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Selector field is set to the value of the last call.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithSelector(value metav1.LabelSelector) *ServiceMonitorSpecApplyConfiguration {
|
||||
b.Selector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamespaceSelector field is set to the value of the last call.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithNamespaceSelector(value *NamespaceSelectorApplyConfiguration) *ServiceMonitorSpecApplyConfiguration {
|
||||
b.NamespaceSelector = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSampleLimit sets the SampleLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SampleLimit field is set to the value of the last call.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithSampleLimit(value uint64) *ServiceMonitorSpecApplyConfiguration {
|
||||
b.SampleLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetLimit sets the TargetLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetLimit field is set to the value of the last call.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithTargetLimit(value uint64) *ServiceMonitorSpecApplyConfiguration {
|
||||
b.TargetLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabelLimit sets the LabelLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LabelLimit field is set to the value of the last call.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithLabelLimit(value uint64) *ServiceMonitorSpecApplyConfiguration {
|
||||
b.LabelLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabelNameLengthLimit sets the LabelNameLengthLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LabelNameLengthLimit field is set to the value of the last call.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithLabelNameLengthLimit(value uint64) *ServiceMonitorSpecApplyConfiguration {
|
||||
b.LabelNameLengthLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabelValueLengthLimit sets the LabelValueLengthLimit field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LabelValueLengthLimit field is set to the value of the last call.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithLabelValueLengthLimit(value uint64) *ServiceMonitorSpecApplyConfiguration {
|
||||
b.LabelValueLengthLimit = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAttachMetadata sets the AttachMetadata field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AttachMetadata field is set to the value of the last call.
|
||||
func (b *ServiceMonitorSpecApplyConfiguration) WithAttachMetadata(value *AttachMetadataApplyConfiguration) *ServiceMonitorSpecApplyConfiguration {
|
||||
b.AttachMetadata = value
|
||||
return b
|
||||
}
|
73
pkg/client/applyconfiguration/monitoring/v1/shardstatus.go
Normal file
73
pkg/client/applyconfiguration/monitoring/v1/shardstatus.go
Normal file
|
@ -0,0 +1,73 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ShardStatusApplyConfiguration represents an declarative configuration of the ShardStatus type for use
|
||||
// with apply.
|
||||
type ShardStatusApplyConfiguration struct {
|
||||
ShardID *string `json:"shardID,omitempty"`
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"`
|
||||
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
|
||||
UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"`
|
||||
}
|
||||
|
||||
// ShardStatusApplyConfiguration constructs an declarative configuration of the ShardStatus type for use with
|
||||
// apply.
|
||||
func ShardStatus() *ShardStatusApplyConfiguration {
|
||||
return &ShardStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithShardID sets the ShardID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ShardID field is set to the value of the last call.
|
||||
func (b *ShardStatusApplyConfiguration) WithShardID(value string) *ShardStatusApplyConfiguration {
|
||||
b.ShardID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplicas sets the Replicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Replicas field is set to the value of the last call.
|
||||
func (b *ShardStatusApplyConfiguration) WithReplicas(value int32) *ShardStatusApplyConfiguration {
|
||||
b.Replicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUpdatedReplicas sets the UpdatedReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UpdatedReplicas field is set to the value of the last call.
|
||||
func (b *ShardStatusApplyConfiguration) WithUpdatedReplicas(value int32) *ShardStatusApplyConfiguration {
|
||||
b.UpdatedReplicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AvailableReplicas field is set to the value of the last call.
|
||||
func (b *ShardStatusApplyConfiguration) WithAvailableReplicas(value int32) *ShardStatusApplyConfiguration {
|
||||
b.AvailableReplicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUnavailableReplicas sets the UnavailableReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UnavailableReplicas field is set to the value of the last call.
|
||||
func (b *ShardStatusApplyConfiguration) WithUnavailableReplicas(value int32) *ShardStatusApplyConfiguration {
|
||||
b.UnavailableReplicas = &value
|
||||
return b
|
||||
}
|
77
pkg/client/applyconfiguration/monitoring/v1/sigv4.go
Normal file
77
pkg/client/applyconfiguration/monitoring/v1/sigv4.go
Normal file
|
@ -0,0 +1,77 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// Sigv4ApplyConfiguration represents an declarative configuration of the Sigv4 type for use
|
||||
// with apply.
|
||||
type Sigv4ApplyConfiguration struct {
|
||||
Region *string `json:"region,omitempty"`
|
||||
AccessKey *v1.SecretKeySelector `json:"accessKey,omitempty"`
|
||||
SecretKey *v1.SecretKeySelector `json:"secretKey,omitempty"`
|
||||
Profile *string `json:"profile,omitempty"`
|
||||
RoleArn *string `json:"roleArn,omitempty"`
|
||||
}
|
||||
|
||||
// Sigv4ApplyConfiguration constructs an declarative configuration of the Sigv4 type for use with
|
||||
// apply.
|
||||
func Sigv4() *Sigv4ApplyConfiguration {
|
||||
return &Sigv4ApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithRegion sets the Region field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Region field is set to the value of the last call.
|
||||
func (b *Sigv4ApplyConfiguration) WithRegion(value string) *Sigv4ApplyConfiguration {
|
||||
b.Region = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAccessKey sets the AccessKey field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AccessKey field is set to the value of the last call.
|
||||
func (b *Sigv4ApplyConfiguration) WithAccessKey(value v1.SecretKeySelector) *Sigv4ApplyConfiguration {
|
||||
b.AccessKey = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSecretKey sets the SecretKey field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SecretKey field is set to the value of the last call.
|
||||
func (b *Sigv4ApplyConfiguration) WithSecretKey(value v1.SecretKeySelector) *Sigv4ApplyConfiguration {
|
||||
b.SecretKey = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProfile sets the Profile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Profile field is set to the value of the last call.
|
||||
func (b *Sigv4ApplyConfiguration) WithProfile(value string) *Sigv4ApplyConfiguration {
|
||||
b.Profile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRoleArn sets the RoleArn field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RoleArn field is set to the value of the last call.
|
||||
func (b *Sigv4ApplyConfiguration) WithRoleArn(value string) *Sigv4ApplyConfiguration {
|
||||
b.RoleArn = &value
|
||||
return b
|
||||
}
|
68
pkg/client/applyconfiguration/monitoring/v1/storagespec.go
Normal file
68
pkg/client/applyconfiguration/monitoring/v1/storagespec.go
Normal file
|
@ -0,0 +1,68 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// StorageSpecApplyConfiguration represents an declarative configuration of the StorageSpec type for use
|
||||
// with apply.
|
||||
type StorageSpecApplyConfiguration struct {
|
||||
DisableMountSubPath *bool `json:"disableMountSubPath,omitempty"`
|
||||
EmptyDir *v1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`
|
||||
Ephemeral *v1.EphemeralVolumeSource `json:"ephemeral,omitempty"`
|
||||
VolumeClaimTemplate *EmbeddedPersistentVolumeClaimApplyConfiguration `json:"volumeClaimTemplate,omitempty"`
|
||||
}
|
||||
|
||||
// StorageSpecApplyConfiguration constructs an declarative configuration of the StorageSpec type for use with
|
||||
// apply.
|
||||
func StorageSpec() *StorageSpecApplyConfiguration {
|
||||
return &StorageSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithDisableMountSubPath sets the DisableMountSubPath field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DisableMountSubPath field is set to the value of the last call.
|
||||
func (b *StorageSpecApplyConfiguration) WithDisableMountSubPath(value bool) *StorageSpecApplyConfiguration {
|
||||
b.DisableMountSubPath = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEmptyDir sets the EmptyDir field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EmptyDir field is set to the value of the last call.
|
||||
func (b *StorageSpecApplyConfiguration) WithEmptyDir(value v1.EmptyDirVolumeSource) *StorageSpecApplyConfiguration {
|
||||
b.EmptyDir = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEphemeral sets the Ephemeral field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Ephemeral field is set to the value of the last call.
|
||||
func (b *StorageSpecApplyConfiguration) WithEphemeral(value v1.EphemeralVolumeSource) *StorageSpecApplyConfiguration {
|
||||
b.Ephemeral = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVolumeClaimTemplate sets the VolumeClaimTemplate field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the VolumeClaimTemplate field is set to the value of the last call.
|
||||
func (b *StorageSpecApplyConfiguration) WithVolumeClaimTemplate(value *EmbeddedPersistentVolumeClaimApplyConfiguration) *StorageSpecApplyConfiguration {
|
||||
b.VolumeClaimTemplate = value
|
||||
return b
|
||||
}
|
217
pkg/client/applyconfiguration/monitoring/v1/thanosruler.go
Normal file
217
pkg/client/applyconfiguration/monitoring/v1/thanosruler.go
Normal file
|
@ -0,0 +1,217 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// ThanosRulerApplyConfiguration represents an declarative configuration of the ThanosRuler type for use
|
||||
// with apply.
|
||||
type ThanosRulerApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *ThanosRulerSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
Status *ThanosRulerStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// ThanosRuler constructs an declarative configuration of the ThanosRuler type for use with
|
||||
// apply.
|
||||
func ThanosRuler(name, namespace string) *ThanosRulerApplyConfiguration {
|
||||
b := &ThanosRulerApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("ThanosRuler")
|
||||
b.WithAPIVersion("monitoring.coreos.com/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithKind(value string) *ThanosRulerApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithAPIVersion(value string) *ThanosRulerApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithName(value string) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithGenerateName(value string) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithNamespace(value string) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithUID(value types.UID) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithResourceVersion(value string) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithGeneration(value int64) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *ThanosRulerApplyConfiguration) WithLabels(entries map[string]string) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *ThanosRulerApplyConfiguration) WithAnnotations(entries map[string]string) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *ThanosRulerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *ThanosRulerApplyConfiguration) WithFinalizers(values ...string) *ThanosRulerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *ThanosRulerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithSpec(value *ThanosRulerSpecApplyConfiguration) *ThanosRulerApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Status field is set to the value of the last call.
|
||||
func (b *ThanosRulerApplyConfiguration) WithStatus(value *ThanosRulerStatusApplyConfiguration) *ThanosRulerApplyConfiguration {
|
||||
b.Status = value
|
||||
return b
|
||||
}
|
511
pkg/client/applyconfiguration/monitoring/v1/thanosrulerspec.go
Normal file
511
pkg/client/applyconfiguration/monitoring/v1/thanosrulerspec.go
Normal file
|
@ -0,0 +1,511 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// ThanosRulerSpecApplyConfiguration represents an declarative configuration of the ThanosRulerSpec type for use
|
||||
// with apply.
|
||||
type ThanosRulerSpecApplyConfiguration struct {
|
||||
Version *string `json:"version,omitempty"`
|
||||
PodMetadata *EmbeddedObjectMetadataApplyConfiguration `json:"podMetadata,omitempty"`
|
||||
Image *string `json:"image,omitempty"`
|
||||
ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
|
||||
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
|
||||
Paused *bool `json:"paused,omitempty"`
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
|
||||
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
|
||||
Affinity *corev1.Affinity `json:"affinity,omitempty"`
|
||||
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
|
||||
TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
|
||||
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
|
||||
PriorityClassName *string `json:"priorityClassName,omitempty"`
|
||||
ServiceAccountName *string `json:"serviceAccountName,omitempty"`
|
||||
Storage *StorageSpecApplyConfiguration `json:"storage,omitempty"`
|
||||
Volumes []corev1.Volume `json:"volumes,omitempty"`
|
||||
ObjectStorageConfig *corev1.SecretKeySelector `json:"objectStorageConfig,omitempty"`
|
||||
ObjectStorageConfigFile *string `json:"objectStorageConfigFile,omitempty"`
|
||||
ListenLocal *bool `json:"listenLocal,omitempty"`
|
||||
QueryEndpoints []string `json:"queryEndpoints,omitempty"`
|
||||
QueryConfig *corev1.SecretKeySelector `json:"queryConfig,omitempty"`
|
||||
AlertManagersURL []string `json:"alertmanagersUrl,omitempty"`
|
||||
AlertManagersConfig *corev1.SecretKeySelector `json:"alertmanagersConfig,omitempty"`
|
||||
RuleSelector *metav1.LabelSelector `json:"ruleSelector,omitempty"`
|
||||
RuleNamespaceSelector *metav1.LabelSelector `json:"ruleNamespaceSelector,omitempty"`
|
||||
EnforcedNamespaceLabel *string `json:"enforcedNamespaceLabel,omitempty"`
|
||||
ExcludedFromEnforcement []ObjectReferenceApplyConfiguration `json:"excludedFromEnforcement,omitempty"`
|
||||
PrometheusRulesExcludedFromEnforce []PrometheusRuleExcludeConfigApplyConfiguration `json:"prometheusRulesExcludedFromEnforce,omitempty"`
|
||||
LogLevel *string `json:"logLevel,omitempty"`
|
||||
LogFormat *string `json:"logFormat,omitempty"`
|
||||
PortName *string `json:"portName,omitempty"`
|
||||
EvaluationInterval *monitoringv1.Duration `json:"evaluationInterval,omitempty"`
|
||||
Retention *monitoringv1.Duration `json:"retention,omitempty"`
|
||||
Containers []corev1.Container `json:"containers,omitempty"`
|
||||
InitContainers []corev1.Container `json:"initContainers,omitempty"`
|
||||
TracingConfig *corev1.SecretKeySelector `json:"tracingConfig,omitempty"`
|
||||
TracingConfigFile *string `json:"tracingConfigFile,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
AlertDropLabels []string `json:"alertDropLabels,omitempty"`
|
||||
ExternalPrefix *string `json:"externalPrefix,omitempty"`
|
||||
RoutePrefix *string `json:"routePrefix,omitempty"`
|
||||
GRPCServerTLSConfig *TLSConfigApplyConfiguration `json:"grpcServerTlsConfig,omitempty"`
|
||||
AlertQueryURL *string `json:"alertQueryUrl,omitempty"`
|
||||
MinReadySeconds *uint32 `json:"minReadySeconds,omitempty"`
|
||||
AlertRelabelConfigs *corev1.SecretKeySelector `json:"alertRelabelConfigs,omitempty"`
|
||||
AlertRelabelConfigFile *string `json:"alertRelabelConfigFile,omitempty"`
|
||||
HostAliases []HostAliasApplyConfiguration `json:"hostAliases,omitempty"`
|
||||
}
|
||||
|
||||
// ThanosRulerSpecApplyConfiguration constructs an declarative configuration of the ThanosRulerSpec type for use with
|
||||
// apply.
|
||||
func ThanosRulerSpec() *ThanosRulerSpecApplyConfiguration {
|
||||
return &ThanosRulerSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithVersion sets the Version field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Version field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithVersion(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.Version = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodMetadata sets the PodMetadata field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodMetadata field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithPodMetadata(value *EmbeddedObjectMetadataApplyConfiguration) *ThanosRulerSpecApplyConfiguration {
|
||||
b.PodMetadata = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImage sets the Image field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Image field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithImage(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.Image = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ImagePullPolicy field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithImagePullPolicy(value corev1.PullPolicy) *ThanosRulerSpecApplyConfiguration {
|
||||
b.ImagePullPolicy = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImagePullSecrets adds the given value to the ImagePullSecrets field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ImagePullSecrets field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithImagePullSecrets(values ...corev1.LocalObjectReference) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ImagePullSecrets = append(b.ImagePullSecrets, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPaused sets the Paused field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Paused field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithPaused(value bool) *ThanosRulerSpecApplyConfiguration {
|
||||
b.Paused = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplicas sets the Replicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Replicas field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithReplicas(value int32) *ThanosRulerSpecApplyConfiguration {
|
||||
b.Replicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the NodeSelector field,
|
||||
// overwriting an existing map entries in NodeSelector field with the same key.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithNodeSelector(entries map[string]string) *ThanosRulerSpecApplyConfiguration {
|
||||
if b.NodeSelector == nil && len(entries) > 0 {
|
||||
b.NodeSelector = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.NodeSelector[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResources sets the Resources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Resources field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithResources(value corev1.ResourceRequirements) *ThanosRulerSpecApplyConfiguration {
|
||||
b.Resources = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAffinity sets the Affinity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Affinity field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithAffinity(value corev1.Affinity) *ThanosRulerSpecApplyConfiguration {
|
||||
b.Affinity = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Tolerations field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithTolerations(values ...corev1.Toleration) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Tolerations = append(b.Tolerations, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithTopologySpreadConstraints(values ...corev1.TopologySpreadConstraint) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SecurityContext field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithSecurityContext(value corev1.PodSecurityContext) *ThanosRulerSpecApplyConfiguration {
|
||||
b.SecurityContext = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPriorityClassName sets the PriorityClassName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PriorityClassName field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithPriorityClassName(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.PriorityClassName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServiceAccountName field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithServiceAccountName(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.ServiceAccountName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStorage sets the Storage field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Storage field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithStorage(value *StorageSpecApplyConfiguration) *ThanosRulerSpecApplyConfiguration {
|
||||
b.Storage = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVolumes adds the given value to the Volumes field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Volumes field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithVolumes(values ...corev1.Volume) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Volumes = append(b.Volumes, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithObjectStorageConfig sets the ObjectStorageConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ObjectStorageConfig field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithObjectStorageConfig(value corev1.SecretKeySelector) *ThanosRulerSpecApplyConfiguration {
|
||||
b.ObjectStorageConfig = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithObjectStorageConfigFile sets the ObjectStorageConfigFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ObjectStorageConfigFile field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithObjectStorageConfigFile(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.ObjectStorageConfigFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithListenLocal sets the ListenLocal field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ListenLocal field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithListenLocal(value bool) *ThanosRulerSpecApplyConfiguration {
|
||||
b.ListenLocal = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithQueryEndpoints adds the given value to the QueryEndpoints field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the QueryEndpoints field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithQueryEndpoints(values ...string) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.QueryEndpoints = append(b.QueryEndpoints, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithQueryConfig sets the QueryConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the QueryConfig field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithQueryConfig(value corev1.SecretKeySelector) *ThanosRulerSpecApplyConfiguration {
|
||||
b.QueryConfig = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlertManagersURL adds the given value to the AlertManagersURL field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the AlertManagersURL field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithAlertManagersURL(values ...string) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.AlertManagersURL = append(b.AlertManagersURL, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlertManagersConfig sets the AlertManagersConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AlertManagersConfig field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithAlertManagersConfig(value corev1.SecretKeySelector) *ThanosRulerSpecApplyConfiguration {
|
||||
b.AlertManagersConfig = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRuleSelector sets the RuleSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RuleSelector field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithRuleSelector(value metav1.LabelSelector) *ThanosRulerSpecApplyConfiguration {
|
||||
b.RuleSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRuleNamespaceSelector sets the RuleNamespaceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RuleNamespaceSelector field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithRuleNamespaceSelector(value metav1.LabelSelector) *ThanosRulerSpecApplyConfiguration {
|
||||
b.RuleNamespaceSelector = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnforcedNamespaceLabel sets the EnforcedNamespaceLabel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EnforcedNamespaceLabel field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithEnforcedNamespaceLabel(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.EnforcedNamespaceLabel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExcludedFromEnforcement adds the given value to the ExcludedFromEnforcement field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ExcludedFromEnforcement field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithExcludedFromEnforcement(values ...*ObjectReferenceApplyConfiguration) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithExcludedFromEnforcement")
|
||||
}
|
||||
b.ExcludedFromEnforcement = append(b.ExcludedFromEnforcement, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPrometheusRulesExcludedFromEnforce adds the given value to the PrometheusRulesExcludedFromEnforce field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the PrometheusRulesExcludedFromEnforce field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithPrometheusRulesExcludedFromEnforce(values ...*PrometheusRuleExcludeConfigApplyConfiguration) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithPrometheusRulesExcludedFromEnforce")
|
||||
}
|
||||
b.PrometheusRulesExcludedFromEnforce = append(b.PrometheusRulesExcludedFromEnforce, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLogLevel sets the LogLevel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LogLevel field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithLogLevel(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.LogLevel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLogFormat sets the LogFormat field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LogFormat field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithLogFormat(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.LogFormat = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPortName sets the PortName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PortName field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithPortName(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.PortName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEvaluationInterval sets the EvaluationInterval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EvaluationInterval field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithEvaluationInterval(value monitoringv1.Duration) *ThanosRulerSpecApplyConfiguration {
|
||||
b.EvaluationInterval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRetention sets the Retention field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Retention field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithRetention(value monitoringv1.Duration) *ThanosRulerSpecApplyConfiguration {
|
||||
b.Retention = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContainers adds the given value to the Containers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Containers field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithContainers(values ...corev1.Container) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Containers = append(b.Containers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInitContainers adds the given value to the InitContainers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the InitContainers field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithInitContainers(values ...corev1.Container) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.InitContainers = append(b.InitContainers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTracingConfig sets the TracingConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TracingConfig field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithTracingConfig(value corev1.SecretKeySelector) *ThanosRulerSpecApplyConfiguration {
|
||||
b.TracingConfig = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTracingConfigFile sets the TracingConfigFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TracingConfigFile field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithTracingConfigFile(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.TracingConfigFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithLabels(entries map[string]string) *ThanosRulerSpecApplyConfiguration {
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlertDropLabels adds the given value to the AlertDropLabels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the AlertDropLabels field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithAlertDropLabels(values ...string) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.AlertDropLabels = append(b.AlertDropLabels, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExternalPrefix sets the ExternalPrefix field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ExternalPrefix field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithExternalPrefix(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.ExternalPrefix = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRoutePrefix sets the RoutePrefix field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RoutePrefix field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithRoutePrefix(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.RoutePrefix = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGRPCServerTLSConfig sets the GRPCServerTLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GRPCServerTLSConfig field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithGRPCServerTLSConfig(value *TLSConfigApplyConfiguration) *ThanosRulerSpecApplyConfiguration {
|
||||
b.GRPCServerTLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlertQueryURL sets the AlertQueryURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AlertQueryURL field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithAlertQueryURL(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.AlertQueryURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MinReadySeconds field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithMinReadySeconds(value uint32) *ThanosRulerSpecApplyConfiguration {
|
||||
b.MinReadySeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlertRelabelConfigs sets the AlertRelabelConfigs field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AlertRelabelConfigs field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithAlertRelabelConfigs(value corev1.SecretKeySelector) *ThanosRulerSpecApplyConfiguration {
|
||||
b.AlertRelabelConfigs = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlertRelabelConfigFile sets the AlertRelabelConfigFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AlertRelabelConfigFile field is set to the value of the last call.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithAlertRelabelConfigFile(value string) *ThanosRulerSpecApplyConfiguration {
|
||||
b.AlertRelabelConfigFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHostAliases adds the given value to the HostAliases field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the HostAliases field.
|
||||
func (b *ThanosRulerSpecApplyConfiguration) WithHostAliases(values ...*HostAliasApplyConfiguration) *ThanosRulerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithHostAliases")
|
||||
}
|
||||
b.HostAliases = append(b.HostAliases, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ThanosRulerStatusApplyConfiguration represents an declarative configuration of the ThanosRulerStatus type for use
|
||||
// with apply.
|
||||
type ThanosRulerStatusApplyConfiguration struct {
|
||||
Paused *bool `json:"paused,omitempty"`
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"`
|
||||
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
|
||||
UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"`
|
||||
}
|
||||
|
||||
// ThanosRulerStatusApplyConfiguration constructs an declarative configuration of the ThanosRulerStatus type for use with
|
||||
// apply.
|
||||
func ThanosRulerStatus() *ThanosRulerStatusApplyConfiguration {
|
||||
return &ThanosRulerStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPaused sets the Paused field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Paused field is set to the value of the last call.
|
||||
func (b *ThanosRulerStatusApplyConfiguration) WithPaused(value bool) *ThanosRulerStatusApplyConfiguration {
|
||||
b.Paused = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReplicas sets the Replicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Replicas field is set to the value of the last call.
|
||||
func (b *ThanosRulerStatusApplyConfiguration) WithReplicas(value int32) *ThanosRulerStatusApplyConfiguration {
|
||||
b.Replicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUpdatedReplicas sets the UpdatedReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UpdatedReplicas field is set to the value of the last call.
|
||||
func (b *ThanosRulerStatusApplyConfiguration) WithUpdatedReplicas(value int32) *ThanosRulerStatusApplyConfiguration {
|
||||
b.UpdatedReplicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AvailableReplicas field is set to the value of the last call.
|
||||
func (b *ThanosRulerStatusApplyConfiguration) WithAvailableReplicas(value int32) *ThanosRulerStatusApplyConfiguration {
|
||||
b.AvailableReplicas = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUnavailableReplicas sets the UnavailableReplicas field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UnavailableReplicas field is set to the value of the last call.
|
||||
func (b *ThanosRulerStatusApplyConfiguration) WithUnavailableReplicas(value int32) *ThanosRulerStatusApplyConfiguration {
|
||||
b.UnavailableReplicas = &value
|
||||
return b
|
||||
}
|
220
pkg/client/applyconfiguration/monitoring/v1/thanosspec.go
Normal file
220
pkg/client/applyconfiguration/monitoring/v1/thanosspec.go
Normal file
|
@ -0,0 +1,220 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
apismonitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// ThanosSpecApplyConfiguration represents an declarative configuration of the ThanosSpec type for use
|
||||
// with apply.
|
||||
type ThanosSpecApplyConfiguration struct {
|
||||
Image *string `json:"image,omitempty"`
|
||||
Version *string `json:"version,omitempty"`
|
||||
Tag *string `json:"tag,omitempty"`
|
||||
SHA *string `json:"sha,omitempty"`
|
||||
BaseImage *string `json:"baseImage,omitempty"`
|
||||
Resources *v1.ResourceRequirements `json:"resources,omitempty"`
|
||||
ObjectStorageConfig *v1.SecretKeySelector `json:"objectStorageConfig,omitempty"`
|
||||
ObjectStorageConfigFile *string `json:"objectStorageConfigFile,omitempty"`
|
||||
ListenLocal *bool `json:"listenLocal,omitempty"`
|
||||
GRPCListenLocal *bool `json:"grpcListenLocal,omitempty"`
|
||||
HTTPListenLocal *bool `json:"httpListenLocal,omitempty"`
|
||||
TracingConfig *v1.SecretKeySelector `json:"tracingConfig,omitempty"`
|
||||
TracingConfigFile *string `json:"tracingConfigFile,omitempty"`
|
||||
GRPCServerTLSConfig *TLSConfigApplyConfiguration `json:"grpcServerTlsConfig,omitempty"`
|
||||
LogLevel *string `json:"logLevel,omitempty"`
|
||||
LogFormat *string `json:"logFormat,omitempty"`
|
||||
MinTime *string `json:"minTime,omitempty"`
|
||||
ReadyTimeout *apismonitoringv1.Duration `json:"readyTimeout,omitempty"`
|
||||
VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
|
||||
AdditionalArgs []ArgumentApplyConfiguration `json:"additionalArgs,omitempty"`
|
||||
}
|
||||
|
||||
// ThanosSpecApplyConfiguration constructs an declarative configuration of the ThanosSpec type for use with
|
||||
// apply.
|
||||
func ThanosSpec() *ThanosSpecApplyConfiguration {
|
||||
return &ThanosSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithImage sets the Image field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Image field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithImage(value string) *ThanosSpecApplyConfiguration {
|
||||
b.Image = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVersion sets the Version field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Version field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithVersion(value string) *ThanosSpecApplyConfiguration {
|
||||
b.Version = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTag sets the Tag field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Tag field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithTag(value string) *ThanosSpecApplyConfiguration {
|
||||
b.Tag = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSHA sets the SHA field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SHA field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithSHA(value string) *ThanosSpecApplyConfiguration {
|
||||
b.SHA = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBaseImage sets the BaseImage field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BaseImage field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithBaseImage(value string) *ThanosSpecApplyConfiguration {
|
||||
b.BaseImage = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResources sets the Resources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Resources field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithResources(value v1.ResourceRequirements) *ThanosSpecApplyConfiguration {
|
||||
b.Resources = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithObjectStorageConfig sets the ObjectStorageConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ObjectStorageConfig field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithObjectStorageConfig(value v1.SecretKeySelector) *ThanosSpecApplyConfiguration {
|
||||
b.ObjectStorageConfig = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithObjectStorageConfigFile sets the ObjectStorageConfigFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ObjectStorageConfigFile field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithObjectStorageConfigFile(value string) *ThanosSpecApplyConfiguration {
|
||||
b.ObjectStorageConfigFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithListenLocal sets the ListenLocal field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ListenLocal field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithListenLocal(value bool) *ThanosSpecApplyConfiguration {
|
||||
b.ListenLocal = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGRPCListenLocal sets the GRPCListenLocal field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GRPCListenLocal field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithGRPCListenLocal(value bool) *ThanosSpecApplyConfiguration {
|
||||
b.GRPCListenLocal = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPListenLocal sets the HTTPListenLocal field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPListenLocal field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithHTTPListenLocal(value bool) *ThanosSpecApplyConfiguration {
|
||||
b.HTTPListenLocal = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTracingConfig sets the TracingConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TracingConfig field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithTracingConfig(value v1.SecretKeySelector) *ThanosSpecApplyConfiguration {
|
||||
b.TracingConfig = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTracingConfigFile sets the TracingConfigFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TracingConfigFile field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithTracingConfigFile(value string) *ThanosSpecApplyConfiguration {
|
||||
b.TracingConfigFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGRPCServerTLSConfig sets the GRPCServerTLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GRPCServerTLSConfig field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithGRPCServerTLSConfig(value *TLSConfigApplyConfiguration) *ThanosSpecApplyConfiguration {
|
||||
b.GRPCServerTLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLogLevel sets the LogLevel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LogLevel field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithLogLevel(value string) *ThanosSpecApplyConfiguration {
|
||||
b.LogLevel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLogFormat sets the LogFormat field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LogFormat field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithLogFormat(value string) *ThanosSpecApplyConfiguration {
|
||||
b.LogFormat = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMinTime sets the MinTime field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MinTime field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithMinTime(value string) *ThanosSpecApplyConfiguration {
|
||||
b.MinTime = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReadyTimeout sets the ReadyTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ReadyTimeout field is set to the value of the last call.
|
||||
func (b *ThanosSpecApplyConfiguration) WithReadyTimeout(value apismonitoringv1.Duration) *ThanosSpecApplyConfiguration {
|
||||
b.ReadyTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the VolumeMounts field.
|
||||
func (b *ThanosSpecApplyConfiguration) WithVolumeMounts(values ...v1.VolumeMount) *ThanosSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.VolumeMounts = append(b.VolumeMounts, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAdditionalArgs adds the given value to the AdditionalArgs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the AdditionalArgs field.
|
||||
func (b *ThanosSpecApplyConfiguration) WithAdditionalArgs(values ...*ArgumentApplyConfiguration) *ThanosSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithAdditionalArgs")
|
||||
}
|
||||
b.AdditionalArgs = append(b.AdditionalArgs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
100
pkg/client/applyconfiguration/monitoring/v1/tlsconfig.go
Normal file
100
pkg/client/applyconfiguration/monitoring/v1/tlsconfig.go
Normal file
|
@ -0,0 +1,100 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// TLSConfigApplyConfiguration represents an declarative configuration of the TLSConfig type for use
|
||||
// with apply.
|
||||
type TLSConfigApplyConfiguration struct {
|
||||
SafeTLSConfigApplyConfiguration `json:",inline"`
|
||||
CAFile *string `json:"caFile,omitempty"`
|
||||
CertFile *string `json:"certFile,omitempty"`
|
||||
KeyFile *string `json:"keyFile,omitempty"`
|
||||
}
|
||||
|
||||
// TLSConfigApplyConfiguration constructs an declarative configuration of the TLSConfig type for use with
|
||||
// apply.
|
||||
func TLSConfig() *TLSConfigApplyConfiguration {
|
||||
return &TLSConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithCA sets the CA field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CA field is set to the value of the last call.
|
||||
func (b *TLSConfigApplyConfiguration) WithCA(value *SecretOrConfigMapApplyConfiguration) *TLSConfigApplyConfiguration {
|
||||
b.CA = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCert sets the Cert field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Cert field is set to the value of the last call.
|
||||
func (b *TLSConfigApplyConfiguration) WithCert(value *SecretOrConfigMapApplyConfiguration) *TLSConfigApplyConfiguration {
|
||||
b.Cert = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKeySecret sets the KeySecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the KeySecret field is set to the value of the last call.
|
||||
func (b *TLSConfigApplyConfiguration) WithKeySecret(value corev1.SecretKeySelector) *TLSConfigApplyConfiguration {
|
||||
b.KeySecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServerName sets the ServerName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServerName field is set to the value of the last call.
|
||||
func (b *TLSConfigApplyConfiguration) WithServerName(value string) *TLSConfigApplyConfiguration {
|
||||
b.ServerName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInsecureSkipVerify sets the InsecureSkipVerify field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the InsecureSkipVerify field is set to the value of the last call.
|
||||
func (b *TLSConfigApplyConfiguration) WithInsecureSkipVerify(value bool) *TLSConfigApplyConfiguration {
|
||||
b.InsecureSkipVerify = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCAFile sets the CAFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CAFile field is set to the value of the last call.
|
||||
func (b *TLSConfigApplyConfiguration) WithCAFile(value string) *TLSConfigApplyConfiguration {
|
||||
b.CAFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCertFile sets the CertFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CertFile field is set to the value of the last call.
|
||||
func (b *TLSConfigApplyConfiguration) WithCertFile(value string) *TLSConfigApplyConfiguration {
|
||||
b.CertFile = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKeyFile sets the KeyFile field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the KeyFile field is set to the value of the last call.
|
||||
func (b *TLSConfigApplyConfiguration) WithKeyFile(value string) *TLSConfigApplyConfiguration {
|
||||
b.KeyFile = &value
|
||||
return b
|
||||
}
|
41
pkg/client/applyconfiguration/monitoring/v1/tsdbspec.go
Normal file
41
pkg/client/applyconfiguration/monitoring/v1/tsdbspec.go
Normal file
|
@ -0,0 +1,41 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
)
|
||||
|
||||
// TSDBSpecApplyConfiguration represents an declarative configuration of the TSDBSpec type for use
|
||||
// with apply.
|
||||
type TSDBSpecApplyConfiguration struct {
|
||||
OutOfOrderTimeWindow *v1.Duration `json:"outOfOrderTimeWindow,omitempty"`
|
||||
}
|
||||
|
||||
// TSDBSpecApplyConfiguration constructs an declarative configuration of the TSDBSpec type for use with
|
||||
// apply.
|
||||
func TSDBSpec() *TSDBSpecApplyConfiguration {
|
||||
return &TSDBSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithOutOfOrderTimeWindow sets the OutOfOrderTimeWindow field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OutOfOrderTimeWindow field is set to the value of the last call.
|
||||
func (b *TSDBSpecApplyConfiguration) WithOutOfOrderTimeWindow(value v1.Duration) *TSDBSpecApplyConfiguration {
|
||||
b.OutOfOrderTimeWindow = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// WebConfigFileFieldsApplyConfiguration represents an declarative configuration of the WebConfigFileFields type for use
|
||||
// with apply.
|
||||
type WebConfigFileFieldsApplyConfiguration struct {
|
||||
TLSConfig *WebTLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
HTTPConfig *WebHTTPConfigApplyConfiguration `json:"httpConfig,omitempty"`
|
||||
}
|
||||
|
||||
// WebConfigFileFieldsApplyConfiguration constructs an declarative configuration of the WebConfigFileFields type for use with
|
||||
// apply.
|
||||
func WebConfigFileFields() *WebConfigFileFieldsApplyConfiguration {
|
||||
return &WebConfigFileFieldsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *WebConfigFileFieldsApplyConfiguration) WithTLSConfig(value *WebTLSConfigApplyConfiguration) *WebConfigFileFieldsApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *WebConfigFileFieldsApplyConfiguration) WithHTTPConfig(value *WebHTTPConfigApplyConfiguration) *WebConfigFileFieldsApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
46
pkg/client/applyconfiguration/monitoring/v1/webhttpconfig.go
Normal file
46
pkg/client/applyconfiguration/monitoring/v1/webhttpconfig.go
Normal file
|
@ -0,0 +1,46 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// WebHTTPConfigApplyConfiguration represents an declarative configuration of the WebHTTPConfig type for use
|
||||
// with apply.
|
||||
type WebHTTPConfigApplyConfiguration struct {
|
||||
HTTP2 *bool `json:"http2,omitempty"`
|
||||
Headers *WebHTTPHeadersApplyConfiguration `json:"headers,omitempty"`
|
||||
}
|
||||
|
||||
// WebHTTPConfigApplyConfiguration constructs an declarative configuration of the WebHTTPConfig type for use with
|
||||
// apply.
|
||||
func WebHTTPConfig() *WebHTTPConfigApplyConfiguration {
|
||||
return &WebHTTPConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithHTTP2 sets the HTTP2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTP2 field is set to the value of the last call.
|
||||
func (b *WebHTTPConfigApplyConfiguration) WithHTTP2(value bool) *WebHTTPConfigApplyConfiguration {
|
||||
b.HTTP2 = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHeaders sets the Headers field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Headers field is set to the value of the last call.
|
||||
func (b *WebHTTPConfigApplyConfiguration) WithHeaders(value *WebHTTPHeadersApplyConfiguration) *WebHTTPConfigApplyConfiguration {
|
||||
b.Headers = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// WebHTTPHeadersApplyConfiguration represents an declarative configuration of the WebHTTPHeaders type for use
|
||||
// with apply.
|
||||
type WebHTTPHeadersApplyConfiguration struct {
|
||||
ContentSecurityPolicy *string `json:"contentSecurityPolicy,omitempty"`
|
||||
XFrameOptions *string `json:"xFrameOptions,omitempty"`
|
||||
XContentTypeOptions *string `json:"xContentTypeOptions,omitempty"`
|
||||
XXSSProtection *string `json:"xXSSProtection,omitempty"`
|
||||
StrictTransportSecurity *string `json:"strictTransportSecurity,omitempty"`
|
||||
}
|
||||
|
||||
// WebHTTPHeadersApplyConfiguration constructs an declarative configuration of the WebHTTPHeaders type for use with
|
||||
// apply.
|
||||
func WebHTTPHeaders() *WebHTTPHeadersApplyConfiguration {
|
||||
return &WebHTTPHeadersApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithContentSecurityPolicy sets the ContentSecurityPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ContentSecurityPolicy field is set to the value of the last call.
|
||||
func (b *WebHTTPHeadersApplyConfiguration) WithContentSecurityPolicy(value string) *WebHTTPHeadersApplyConfiguration {
|
||||
b.ContentSecurityPolicy = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithXFrameOptions sets the XFrameOptions field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the XFrameOptions field is set to the value of the last call.
|
||||
func (b *WebHTTPHeadersApplyConfiguration) WithXFrameOptions(value string) *WebHTTPHeadersApplyConfiguration {
|
||||
b.XFrameOptions = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithXContentTypeOptions sets the XContentTypeOptions field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the XContentTypeOptions field is set to the value of the last call.
|
||||
func (b *WebHTTPHeadersApplyConfiguration) WithXContentTypeOptions(value string) *WebHTTPHeadersApplyConfiguration {
|
||||
b.XContentTypeOptions = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithXXSSProtection sets the XXSSProtection field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the XXSSProtection field is set to the value of the last call.
|
||||
func (b *WebHTTPHeadersApplyConfiguration) WithXXSSProtection(value string) *WebHTTPHeadersApplyConfiguration {
|
||||
b.XXSSProtection = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStrictTransportSecurity sets the StrictTransportSecurity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StrictTransportSecurity field is set to the value of the last call.
|
||||
func (b *WebHTTPHeadersApplyConfiguration) WithStrictTransportSecurity(value string) *WebHTTPHeadersApplyConfiguration {
|
||||
b.StrictTransportSecurity = &value
|
||||
return b
|
||||
}
|
117
pkg/client/applyconfiguration/monitoring/v1/webtlsconfig.go
Normal file
117
pkg/client/applyconfiguration/monitoring/v1/webtlsconfig.go
Normal file
|
@ -0,0 +1,117 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// WebTLSConfigApplyConfiguration represents an declarative configuration of the WebTLSConfig type for use
|
||||
// with apply.
|
||||
type WebTLSConfigApplyConfiguration struct {
|
||||
KeySecret *v1.SecretKeySelector `json:"keySecret,omitempty"`
|
||||
Cert *SecretOrConfigMapApplyConfiguration `json:"cert,omitempty"`
|
||||
ClientAuthType *string `json:"clientAuthType,omitempty"`
|
||||
ClientCA *SecretOrConfigMapApplyConfiguration `json:"client_ca,omitempty"`
|
||||
MinVersion *string `json:"minVersion,omitempty"`
|
||||
MaxVersion *string `json:"maxVersion,omitempty"`
|
||||
CipherSuites []string `json:"cipherSuites,omitempty"`
|
||||
PreferServerCipherSuites *bool `json:"preferServerCipherSuites,omitempty"`
|
||||
CurvePreferences []string `json:"curvePreferences,omitempty"`
|
||||
}
|
||||
|
||||
// WebTLSConfigApplyConfiguration constructs an declarative configuration of the WebTLSConfig type for use with
|
||||
// apply.
|
||||
func WebTLSConfig() *WebTLSConfigApplyConfiguration {
|
||||
return &WebTLSConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKeySecret sets the KeySecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the KeySecret field is set to the value of the last call.
|
||||
func (b *WebTLSConfigApplyConfiguration) WithKeySecret(value v1.SecretKeySelector) *WebTLSConfigApplyConfiguration {
|
||||
b.KeySecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCert sets the Cert field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Cert field is set to the value of the last call.
|
||||
func (b *WebTLSConfigApplyConfiguration) WithCert(value *SecretOrConfigMapApplyConfiguration) *WebTLSConfigApplyConfiguration {
|
||||
b.Cert = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithClientAuthType sets the ClientAuthType field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ClientAuthType field is set to the value of the last call.
|
||||
func (b *WebTLSConfigApplyConfiguration) WithClientAuthType(value string) *WebTLSConfigApplyConfiguration {
|
||||
b.ClientAuthType = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithClientCA sets the ClientCA field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ClientCA field is set to the value of the last call.
|
||||
func (b *WebTLSConfigApplyConfiguration) WithClientCA(value *SecretOrConfigMapApplyConfiguration) *WebTLSConfigApplyConfiguration {
|
||||
b.ClientCA = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMinVersion sets the MinVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MinVersion field is set to the value of the last call.
|
||||
func (b *WebTLSConfigApplyConfiguration) WithMinVersion(value string) *WebTLSConfigApplyConfiguration {
|
||||
b.MinVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMaxVersion sets the MaxVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxVersion field is set to the value of the last call.
|
||||
func (b *WebTLSConfigApplyConfiguration) WithMaxVersion(value string) *WebTLSConfigApplyConfiguration {
|
||||
b.MaxVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCipherSuites adds the given value to the CipherSuites field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the CipherSuites field.
|
||||
func (b *WebTLSConfigApplyConfiguration) WithCipherSuites(values ...string) *WebTLSConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
b.CipherSuites = append(b.CipherSuites, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPreferServerCipherSuites sets the PreferServerCipherSuites field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PreferServerCipherSuites field is set to the value of the last call.
|
||||
func (b *WebTLSConfigApplyConfiguration) WithPreferServerCipherSuites(value bool) *WebTLSConfigApplyConfiguration {
|
||||
b.PreferServerCipherSuites = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCurvePreferences adds the given value to the CurvePreferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the CurvePreferences field.
|
||||
func (b *WebTLSConfigApplyConfiguration) WithCurvePreferences(values ...string) *WebTLSConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
b.CurvePreferences = append(b.CurvePreferences, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,208 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// AlertmanagerConfigApplyConfiguration represents an declarative configuration of the AlertmanagerConfig type for use
|
||||
// with apply.
|
||||
type AlertmanagerConfigApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *AlertmanagerConfigSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// AlertmanagerConfig constructs an declarative configuration of the AlertmanagerConfig type for use with
|
||||
// apply.
|
||||
func AlertmanagerConfig(name, namespace string) *AlertmanagerConfigApplyConfiguration {
|
||||
b := &AlertmanagerConfigApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("AlertmanagerConfig")
|
||||
b.WithAPIVersion("monitoring.coreos.com/v1alpha1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithKind(value string) *AlertmanagerConfigApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithAPIVersion(value string) *AlertmanagerConfigApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithName(value string) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithGenerateName(value string) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithNamespace(value string) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithUID(value types.UID) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithResourceVersion(value string) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithGeneration(value int64) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithLabels(entries map[string]string) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithAnnotations(entries map[string]string) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithFinalizers(values ...string) *AlertmanagerConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *AlertmanagerConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigApplyConfiguration) WithSpec(value *AlertmanagerConfigSpecApplyConfiguration) *AlertmanagerConfigApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// AlertmanagerConfigSpecApplyConfiguration represents an declarative configuration of the AlertmanagerConfigSpec type for use
|
||||
// with apply.
|
||||
type AlertmanagerConfigSpecApplyConfiguration struct {
|
||||
Route *RouteApplyConfiguration `json:"route,omitempty"`
|
||||
Receivers []ReceiverApplyConfiguration `json:"receivers,omitempty"`
|
||||
InhibitRules []InhibitRuleApplyConfiguration `json:"inhibitRules,omitempty"`
|
||||
MuteTimeIntervals []MuteTimeIntervalApplyConfiguration `json:"muteTimeIntervals,omitempty"`
|
||||
}
|
||||
|
||||
// AlertmanagerConfigSpecApplyConfiguration constructs an declarative configuration of the AlertmanagerConfigSpec type for use with
|
||||
// apply.
|
||||
func AlertmanagerConfigSpec() *AlertmanagerConfigSpecApplyConfiguration {
|
||||
return &AlertmanagerConfigSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithRoute sets the Route field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Route field is set to the value of the last call.
|
||||
func (b *AlertmanagerConfigSpecApplyConfiguration) WithRoute(value *RouteApplyConfiguration) *AlertmanagerConfigSpecApplyConfiguration {
|
||||
b.Route = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReceivers adds the given value to the Receivers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Receivers field.
|
||||
func (b *AlertmanagerConfigSpecApplyConfiguration) WithReceivers(values ...*ReceiverApplyConfiguration) *AlertmanagerConfigSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithReceivers")
|
||||
}
|
||||
b.Receivers = append(b.Receivers, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInhibitRules adds the given value to the InhibitRules field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the InhibitRules field.
|
||||
func (b *AlertmanagerConfigSpecApplyConfiguration) WithInhibitRules(values ...*InhibitRuleApplyConfiguration) *AlertmanagerConfigSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithInhibitRules")
|
||||
}
|
||||
b.InhibitRules = append(b.InhibitRules, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMuteTimeIntervals adds the given value to the MuteTimeIntervals field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the MuteTimeIntervals field.
|
||||
func (b *AlertmanagerConfigSpecApplyConfiguration) WithMuteTimeIntervals(values ...*MuteTimeIntervalApplyConfiguration) *AlertmanagerConfigSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithMuteTimeIntervals")
|
||||
}
|
||||
b.MuteTimeIntervals = append(b.MuteTimeIntervals, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// DayOfMonthRangeApplyConfiguration represents an declarative configuration of the DayOfMonthRange type for use
|
||||
// with apply.
|
||||
type DayOfMonthRangeApplyConfiguration struct {
|
||||
Start *int `json:"start,omitempty"`
|
||||
End *int `json:"end,omitempty"`
|
||||
}
|
||||
|
||||
// DayOfMonthRangeApplyConfiguration constructs an declarative configuration of the DayOfMonthRange type for use with
|
||||
// apply.
|
||||
func DayOfMonthRange() *DayOfMonthRangeApplyConfiguration {
|
||||
return &DayOfMonthRangeApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithStart sets the Start field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Start field is set to the value of the last call.
|
||||
func (b *DayOfMonthRangeApplyConfiguration) WithStart(value int) *DayOfMonthRangeApplyConfiguration {
|
||||
b.Start = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnd sets the End field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the End field is set to the value of the last call.
|
||||
func (b *DayOfMonthRangeApplyConfiguration) WithEnd(value int) *DayOfMonthRangeApplyConfiguration {
|
||||
b.End = &value
|
||||
return b
|
||||
}
|
164
pkg/client/applyconfiguration/monitoring/v1alpha1/emailconfig.go
Normal file
164
pkg/client/applyconfiguration/monitoring/v1alpha1/emailconfig.go
Normal file
|
@ -0,0 +1,164 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/client/applyconfiguration/monitoring/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// EmailConfigApplyConfiguration represents an declarative configuration of the EmailConfig type for use
|
||||
// with apply.
|
||||
type EmailConfigApplyConfiguration struct {
|
||||
SendResolved *bool `json:"sendResolved,omitempty"`
|
||||
To *string `json:"to,omitempty"`
|
||||
From *string `json:"from,omitempty"`
|
||||
Hello *string `json:"hello,omitempty"`
|
||||
Smarthost *string `json:"smarthost,omitempty"`
|
||||
AuthUsername *string `json:"authUsername,omitempty"`
|
||||
AuthPassword *v1.SecretKeySelector `json:"authPassword,omitempty"`
|
||||
AuthSecret *v1.SecretKeySelector `json:"authSecret,omitempty"`
|
||||
AuthIdentity *string `json:"authIdentity,omitempty"`
|
||||
Headers []KeyValueApplyConfiguration `json:"headers,omitempty"`
|
||||
HTML *string `json:"html,omitempty"`
|
||||
Text *string `json:"text,omitempty"`
|
||||
RequireTLS *bool `json:"requireTLS,omitempty"`
|
||||
TLSConfig *monitoringv1.SafeTLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
}
|
||||
|
||||
// EmailConfigApplyConfiguration constructs an declarative configuration of the EmailConfig type for use with
|
||||
// apply.
|
||||
func EmailConfig() *EmailConfigApplyConfiguration {
|
||||
return &EmailConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSendResolved sets the SendResolved field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SendResolved field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithSendResolved(value bool) *EmailConfigApplyConfiguration {
|
||||
b.SendResolved = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTo sets the To field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the To field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithTo(value string) *EmailConfigApplyConfiguration {
|
||||
b.To = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFrom sets the From field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the From field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithFrom(value string) *EmailConfigApplyConfiguration {
|
||||
b.From = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHello sets the Hello field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Hello field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithHello(value string) *EmailConfigApplyConfiguration {
|
||||
b.Hello = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSmarthost sets the Smarthost field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Smarthost field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithSmarthost(value string) *EmailConfigApplyConfiguration {
|
||||
b.Smarthost = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthUsername sets the AuthUsername field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AuthUsername field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithAuthUsername(value string) *EmailConfigApplyConfiguration {
|
||||
b.AuthUsername = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthPassword sets the AuthPassword field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AuthPassword field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithAuthPassword(value v1.SecretKeySelector) *EmailConfigApplyConfiguration {
|
||||
b.AuthPassword = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthSecret sets the AuthSecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AuthSecret field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithAuthSecret(value v1.SecretKeySelector) *EmailConfigApplyConfiguration {
|
||||
b.AuthSecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAuthIdentity sets the AuthIdentity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AuthIdentity field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithAuthIdentity(value string) *EmailConfigApplyConfiguration {
|
||||
b.AuthIdentity = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHeaders adds the given value to the Headers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Headers field.
|
||||
func (b *EmailConfigApplyConfiguration) WithHeaders(values ...*KeyValueApplyConfiguration) *EmailConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithHeaders")
|
||||
}
|
||||
b.Headers = append(b.Headers, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTML sets the HTML field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTML field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithHTML(value string) *EmailConfigApplyConfiguration {
|
||||
b.HTML = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithText sets the Text field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Text field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithText(value string) *EmailConfigApplyConfiguration {
|
||||
b.Text = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRequireTLS sets the RequireTLS field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RequireTLS field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithRequireTLS(value bool) *EmailConfigApplyConfiguration {
|
||||
b.RequireTLS = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *EmailConfigApplyConfiguration) WithTLSConfig(value *monitoringv1.SafeTLSConfigApplyConfiguration) *EmailConfigApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/client/applyconfiguration/monitoring/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// HTTPConfigApplyConfiguration represents an declarative configuration of the HTTPConfig type for use
|
||||
// with apply.
|
||||
type HTTPConfigApplyConfiguration struct {
|
||||
Authorization *v1.SafeAuthorizationApplyConfiguration `json:"authorization,omitempty"`
|
||||
BasicAuth *v1.BasicAuthApplyConfiguration `json:"basicAuth,omitempty"`
|
||||
OAuth2 *v1.OAuth2ApplyConfiguration `json:"oauth2,omitempty"`
|
||||
BearerTokenSecret *corev1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
|
||||
TLSConfig *v1.SafeTLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
|
||||
ProxyURL *string `json:"proxyURL,omitempty"`
|
||||
FollowRedirects *bool `json:"followRedirects,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPConfigApplyConfiguration constructs an declarative configuration of the HTTPConfig type for use with
|
||||
// apply.
|
||||
func HTTPConfig() *HTTPConfigApplyConfiguration {
|
||||
return &HTTPConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithAuthorization sets the Authorization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Authorization field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithAuthorization(value *v1.SafeAuthorizationApplyConfiguration) *HTTPConfigApplyConfiguration {
|
||||
b.Authorization = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BasicAuth field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithBasicAuth(value *v1.BasicAuthApplyConfiguration) *HTTPConfigApplyConfiguration {
|
||||
b.BasicAuth = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOAuth2 sets the OAuth2 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OAuth2 field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithOAuth2(value *v1.OAuth2ApplyConfiguration) *HTTPConfigApplyConfiguration {
|
||||
b.OAuth2 = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBearerTokenSecret sets the BearerTokenSecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BearerTokenSecret field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithBearerTokenSecret(value corev1.SecretKeySelector) *HTTPConfigApplyConfiguration {
|
||||
b.BearerTokenSecret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLSConfig field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithTLSConfig(value *v1.SafeTLSConfigApplyConfiguration) *HTTPConfigApplyConfiguration {
|
||||
b.TLSConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithProxyURL sets the ProxyURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ProxyURL field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithProxyURL(value string) *HTTPConfigApplyConfiguration {
|
||||
b.ProxyURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFollowRedirects sets the FollowRedirects field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FollowRedirects field is set to the value of the last call.
|
||||
func (b *HTTPConfigApplyConfiguration) WithFollowRedirects(value bool) *HTTPConfigApplyConfiguration {
|
||||
b.FollowRedirects = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// InhibitRuleApplyConfiguration represents an declarative configuration of the InhibitRule type for use
|
||||
// with apply.
|
||||
type InhibitRuleApplyConfiguration struct {
|
||||
TargetMatch []MatcherApplyConfiguration `json:"targetMatch,omitempty"`
|
||||
SourceMatch []MatcherApplyConfiguration `json:"sourceMatch,omitempty"`
|
||||
Equal []string `json:"equal,omitempty"`
|
||||
}
|
||||
|
||||
// InhibitRuleApplyConfiguration constructs an declarative configuration of the InhibitRule type for use with
|
||||
// apply.
|
||||
func InhibitRule() *InhibitRuleApplyConfiguration {
|
||||
return &InhibitRuleApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithTargetMatch adds the given value to the TargetMatch field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the TargetMatch field.
|
||||
func (b *InhibitRuleApplyConfiguration) WithTargetMatch(values ...*MatcherApplyConfiguration) *InhibitRuleApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTargetMatch")
|
||||
}
|
||||
b.TargetMatch = append(b.TargetMatch, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSourceMatch adds the given value to the SourceMatch field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the SourceMatch field.
|
||||
func (b *InhibitRuleApplyConfiguration) WithSourceMatch(values ...*MatcherApplyConfiguration) *InhibitRuleApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithSourceMatch")
|
||||
}
|
||||
b.SourceMatch = append(b.SourceMatch, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEqual adds the given value to the Equal field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Equal field.
|
||||
func (b *InhibitRuleApplyConfiguration) WithEqual(values ...string) *InhibitRuleApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Equal = append(b.Equal, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// KeyValueApplyConfiguration represents an declarative configuration of the KeyValue type for use
|
||||
// with apply.
|
||||
type KeyValueApplyConfiguration struct {
|
||||
Key *string `json:"key,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// KeyValueApplyConfiguration constructs an declarative configuration of the KeyValue type for use with
|
||||
// apply.
|
||||
func KeyValue() *KeyValueApplyConfiguration {
|
||||
return &KeyValueApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKey sets the Key field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Key field is set to the value of the last call.
|
||||
func (b *KeyValueApplyConfiguration) WithKey(value string) *KeyValueApplyConfiguration {
|
||||
b.Key = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Value field is set to the value of the last call.
|
||||
func (b *KeyValueApplyConfiguration) WithValue(value string) *KeyValueApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
68
pkg/client/applyconfiguration/monitoring/v1alpha1/matcher.go
Normal file
68
pkg/client/applyconfiguration/monitoring/v1alpha1/matcher.go
Normal file
|
@ -0,0 +1,68 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1"
|
||||
)
|
||||
|
||||
// MatcherApplyConfiguration represents an declarative configuration of the Matcher type for use
|
||||
// with apply.
|
||||
type MatcherApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
MatchType *v1alpha1.MatchType `json:"matchType,omitempty"`
|
||||
Regex *bool `json:"regex,omitempty"`
|
||||
}
|
||||
|
||||
// MatcherApplyConfiguration constructs an declarative configuration of the Matcher type for use with
|
||||
// apply.
|
||||
func Matcher() *MatcherApplyConfiguration {
|
||||
return &MatcherApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *MatcherApplyConfiguration) WithName(value string) *MatcherApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Value field is set to the value of the last call.
|
||||
func (b *MatcherApplyConfiguration) WithValue(value string) *MatcherApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMatchType sets the MatchType field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MatchType field is set to the value of the last call.
|
||||
func (b *MatcherApplyConfiguration) WithMatchType(value v1alpha1.MatchType) *MatcherApplyConfiguration {
|
||||
b.MatchType = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRegex sets the Regex field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Regex field is set to the value of the last call.
|
||||
func (b *MatcherApplyConfiguration) WithRegex(value bool) *MatcherApplyConfiguration {
|
||||
b.Regex = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// MuteTimeIntervalApplyConfiguration represents an declarative configuration of the MuteTimeInterval type for use
|
||||
// with apply.
|
||||
type MuteTimeIntervalApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
TimeIntervals []TimeIntervalApplyConfiguration `json:"timeIntervals,omitempty"`
|
||||
}
|
||||
|
||||
// MuteTimeIntervalApplyConfiguration constructs an declarative configuration of the MuteTimeInterval type for use with
|
||||
// apply.
|
||||
func MuteTimeInterval() *MuteTimeIntervalApplyConfiguration {
|
||||
return &MuteTimeIntervalApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *MuteTimeIntervalApplyConfiguration) WithName(value string) *MuteTimeIntervalApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTimeIntervals adds the given value to the TimeIntervals field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the TimeIntervals field.
|
||||
func (b *MuteTimeIntervalApplyConfiguration) WithTimeIntervals(values ...*TimeIntervalApplyConfiguration) *MuteTimeIntervalApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTimeIntervals")
|
||||
}
|
||||
b.TimeIntervals = append(b.TimeIntervals, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// OpsGenieConfigApplyConfiguration represents an declarative configuration of the OpsGenieConfig type for use
|
||||
// with apply.
|
||||
type OpsGenieConfigApplyConfiguration struct {
|
||||
SendResolved *bool `json:"sendResolved,omitempty"`
|
||||
APIKey *v1.SecretKeySelector `json:"apiKey,omitempty"`
|
||||
APIURL *string `json:"apiURL,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Source *string `json:"source,omitempty"`
|
||||
Tags *string `json:"tags,omitempty"`
|
||||
Note *string `json:"note,omitempty"`
|
||||
Priority *string `json:"priority,omitempty"`
|
||||
UpdateAlerts *bool `json:"updateAlerts,omitempty"`
|
||||
Details []KeyValueApplyConfiguration `json:"details,omitempty"`
|
||||
Responders []OpsGenieConfigResponderApplyConfiguration `json:"responders,omitempty"`
|
||||
HTTPConfig *HTTPConfigApplyConfiguration `json:"httpConfig,omitempty"`
|
||||
Entity *string `json:"entity,omitempty"`
|
||||
Actions *string `json:"actions,omitempty"`
|
||||
}
|
||||
|
||||
// OpsGenieConfigApplyConfiguration constructs an declarative configuration of the OpsGenieConfig type for use with
|
||||
// apply.
|
||||
func OpsGenieConfig() *OpsGenieConfigApplyConfiguration {
|
||||
return &OpsGenieConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSendResolved sets the SendResolved field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SendResolved field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithSendResolved(value bool) *OpsGenieConfigApplyConfiguration {
|
||||
b.SendResolved = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIKey sets the APIKey field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIKey field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithAPIKey(value v1.SecretKeySelector) *OpsGenieConfigApplyConfiguration {
|
||||
b.APIKey = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIURL sets the APIURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIURL field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithAPIURL(value string) *OpsGenieConfigApplyConfiguration {
|
||||
b.APIURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessage sets the Message field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Message field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithMessage(value string) *OpsGenieConfigApplyConfiguration {
|
||||
b.Message = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDescription sets the Description field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Description field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithDescription(value string) *OpsGenieConfigApplyConfiguration {
|
||||
b.Description = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSource sets the Source field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Source field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithSource(value string) *OpsGenieConfigApplyConfiguration {
|
||||
b.Source = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTags sets the Tags field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Tags field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithTags(value string) *OpsGenieConfigApplyConfiguration {
|
||||
b.Tags = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNote sets the Note field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Note field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithNote(value string) *OpsGenieConfigApplyConfiguration {
|
||||
b.Note = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPriority sets the Priority field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Priority field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithPriority(value string) *OpsGenieConfigApplyConfiguration {
|
||||
b.Priority = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUpdateAlerts sets the UpdateAlerts field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UpdateAlerts field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithUpdateAlerts(value bool) *OpsGenieConfigApplyConfiguration {
|
||||
b.UpdateAlerts = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDetails adds the given value to the Details field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Details field.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithDetails(values ...*KeyValueApplyConfiguration) *OpsGenieConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithDetails")
|
||||
}
|
||||
b.Details = append(b.Details, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResponders adds the given value to the Responders field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Responders field.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithResponders(values ...*OpsGenieConfigResponderApplyConfiguration) *OpsGenieConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithResponders")
|
||||
}
|
||||
b.Responders = append(b.Responders, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithHTTPConfig(value *HTTPConfigApplyConfiguration) *OpsGenieConfigApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEntity sets the Entity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Entity field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithEntity(value string) *OpsGenieConfigApplyConfiguration {
|
||||
b.Entity = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithActions sets the Actions field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Actions field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigApplyConfiguration) WithActions(value string) *OpsGenieConfigApplyConfiguration {
|
||||
b.Actions = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// OpsGenieConfigResponderApplyConfiguration represents an declarative configuration of the OpsGenieConfigResponder type for use
|
||||
// with apply.
|
||||
type OpsGenieConfigResponderApplyConfiguration struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Username *string `json:"username,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// OpsGenieConfigResponderApplyConfiguration constructs an declarative configuration of the OpsGenieConfigResponder type for use with
|
||||
// apply.
|
||||
func OpsGenieConfigResponder() *OpsGenieConfigResponderApplyConfiguration {
|
||||
return &OpsGenieConfigResponderApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithID sets the ID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ID field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigResponderApplyConfiguration) WithID(value string) *OpsGenieConfigResponderApplyConfiguration {
|
||||
b.ID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigResponderApplyConfiguration) WithName(value string) *OpsGenieConfigResponderApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUsername sets the Username field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Username field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigResponderApplyConfiguration) WithUsername(value string) *OpsGenieConfigResponderApplyConfiguration {
|
||||
b.Username = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *OpsGenieConfigResponderApplyConfiguration) WithType(value string) *OpsGenieConfigResponderApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,182 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// PagerDutyConfigApplyConfiguration represents an declarative configuration of the PagerDutyConfig type for use
|
||||
// with apply.
|
||||
type PagerDutyConfigApplyConfiguration struct {
|
||||
SendResolved *bool `json:"sendResolved,omitempty"`
|
||||
RoutingKey *v1.SecretKeySelector `json:"routingKey,omitempty"`
|
||||
ServiceKey *v1.SecretKeySelector `json:"serviceKey,omitempty"`
|
||||
URL *string `json:"url,omitempty"`
|
||||
Client *string `json:"client,omitempty"`
|
||||
ClientURL *string `json:"clientURL,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Severity *string `json:"severity,omitempty"`
|
||||
Class *string `json:"class,omitempty"`
|
||||
Group *string `json:"group,omitempty"`
|
||||
Component *string `json:"component,omitempty"`
|
||||
Details []KeyValueApplyConfiguration `json:"details,omitempty"`
|
||||
PagerDutyImageConfigs []PagerDutyImageConfigApplyConfiguration `json:"pagerDutyImageConfigs,omitempty"`
|
||||
PagerDutyLinkConfigs []PagerDutyLinkConfigApplyConfiguration `json:"pagerDutyLinkConfigs,omitempty"`
|
||||
HTTPConfig *HTTPConfigApplyConfiguration `json:"httpConfig,omitempty"`
|
||||
}
|
||||
|
||||
// PagerDutyConfigApplyConfiguration constructs an declarative configuration of the PagerDutyConfig type for use with
|
||||
// apply.
|
||||
func PagerDutyConfig() *PagerDutyConfigApplyConfiguration {
|
||||
return &PagerDutyConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSendResolved sets the SendResolved field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SendResolved field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithSendResolved(value bool) *PagerDutyConfigApplyConfiguration {
|
||||
b.SendResolved = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRoutingKey sets the RoutingKey field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RoutingKey field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithRoutingKey(value v1.SecretKeySelector) *PagerDutyConfigApplyConfiguration {
|
||||
b.RoutingKey = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceKey sets the ServiceKey field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ServiceKey field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithServiceKey(value v1.SecretKeySelector) *PagerDutyConfigApplyConfiguration {
|
||||
b.ServiceKey = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithURL sets the URL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the URL field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithURL(value string) *PagerDutyConfigApplyConfiguration {
|
||||
b.URL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithClient sets the Client field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Client field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithClient(value string) *PagerDutyConfigApplyConfiguration {
|
||||
b.Client = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithClientURL sets the ClientURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ClientURL field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithClientURL(value string) *PagerDutyConfigApplyConfiguration {
|
||||
b.ClientURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDescription sets the Description field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Description field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithDescription(value string) *PagerDutyConfigApplyConfiguration {
|
||||
b.Description = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSeverity sets the Severity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Severity field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithSeverity(value string) *PagerDutyConfigApplyConfiguration {
|
||||
b.Severity = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithClass sets the Class field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Class field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithClass(value string) *PagerDutyConfigApplyConfiguration {
|
||||
b.Class = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGroup sets the Group field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Group field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithGroup(value string) *PagerDutyConfigApplyConfiguration {
|
||||
b.Group = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithComponent sets the Component field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Component field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithComponent(value string) *PagerDutyConfigApplyConfiguration {
|
||||
b.Component = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDetails adds the given value to the Details field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Details field.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithDetails(values ...*KeyValueApplyConfiguration) *PagerDutyConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithDetails")
|
||||
}
|
||||
b.Details = append(b.Details, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPagerDutyImageConfigs adds the given value to the PagerDutyImageConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the PagerDutyImageConfigs field.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithPagerDutyImageConfigs(values ...*PagerDutyImageConfigApplyConfiguration) *PagerDutyConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithPagerDutyImageConfigs")
|
||||
}
|
||||
b.PagerDutyImageConfigs = append(b.PagerDutyImageConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPagerDutyLinkConfigs adds the given value to the PagerDutyLinkConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the PagerDutyLinkConfigs field.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithPagerDutyLinkConfigs(values ...*PagerDutyLinkConfigApplyConfiguration) *PagerDutyConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithPagerDutyLinkConfigs")
|
||||
}
|
||||
b.PagerDutyLinkConfigs = append(b.PagerDutyLinkConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *PagerDutyConfigApplyConfiguration) WithHTTPConfig(value *HTTPConfigApplyConfiguration) *PagerDutyConfigApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// PagerDutyImageConfigApplyConfiguration represents an declarative configuration of the PagerDutyImageConfig type for use
|
||||
// with apply.
|
||||
type PagerDutyImageConfigApplyConfiguration struct {
|
||||
Src *string `json:"src,omitempty"`
|
||||
Href *string `json:"href,omitempty"`
|
||||
Alt *string `json:"alt,omitempty"`
|
||||
}
|
||||
|
||||
// PagerDutyImageConfigApplyConfiguration constructs an declarative configuration of the PagerDutyImageConfig type for use with
|
||||
// apply.
|
||||
func PagerDutyImageConfig() *PagerDutyImageConfigApplyConfiguration {
|
||||
return &PagerDutyImageConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSrc sets the Src field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Src field is set to the value of the last call.
|
||||
func (b *PagerDutyImageConfigApplyConfiguration) WithSrc(value string) *PagerDutyImageConfigApplyConfiguration {
|
||||
b.Src = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHref sets the Href field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Href field is set to the value of the last call.
|
||||
func (b *PagerDutyImageConfigApplyConfiguration) WithHref(value string) *PagerDutyImageConfigApplyConfiguration {
|
||||
b.Href = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAlt sets the Alt field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Alt field is set to the value of the last call.
|
||||
func (b *PagerDutyImageConfigApplyConfiguration) WithAlt(value string) *PagerDutyImageConfigApplyConfiguration {
|
||||
b.Alt = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// PagerDutyLinkConfigApplyConfiguration represents an declarative configuration of the PagerDutyLinkConfig type for use
|
||||
// with apply.
|
||||
type PagerDutyLinkConfigApplyConfiguration struct {
|
||||
Href *string `json:"href,omitempty"`
|
||||
Text *string `json:"alt,omitempty"`
|
||||
}
|
||||
|
||||
// PagerDutyLinkConfigApplyConfiguration constructs an declarative configuration of the PagerDutyLinkConfig type for use with
|
||||
// apply.
|
||||
func PagerDutyLinkConfig() *PagerDutyLinkConfigApplyConfiguration {
|
||||
return &PagerDutyLinkConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithHref sets the Href field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Href field is set to the value of the last call.
|
||||
func (b *PagerDutyLinkConfigApplyConfiguration) WithHref(value string) *PagerDutyLinkConfigApplyConfiguration {
|
||||
b.Href = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithText sets the Text field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Text field is set to the value of the last call.
|
||||
func (b *PagerDutyLinkConfigApplyConfiguration) WithText(value string) *PagerDutyLinkConfigApplyConfiguration {
|
||||
b.Text = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// PushoverConfigApplyConfiguration represents an declarative configuration of the PushoverConfig type for use
|
||||
// with apply.
|
||||
type PushoverConfigApplyConfiguration struct {
|
||||
SendResolved *bool `json:"sendResolved,omitempty"`
|
||||
UserKey *v1.SecretKeySelector `json:"userKey,omitempty"`
|
||||
Token *v1.SecretKeySelector `json:"token,omitempty"`
|
||||
Title *string `json:"title,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
URL *string `json:"url,omitempty"`
|
||||
URLTitle *string `json:"urlTitle,omitempty"`
|
||||
Sound *string `json:"sound,omitempty"`
|
||||
Priority *string `json:"priority,omitempty"`
|
||||
Retry *string `json:"retry,omitempty"`
|
||||
Expire *string `json:"expire,omitempty"`
|
||||
HTML *bool `json:"html,omitempty"`
|
||||
HTTPConfig *HTTPConfigApplyConfiguration `json:"httpConfig,omitempty"`
|
||||
}
|
||||
|
||||
// PushoverConfigApplyConfiguration constructs an declarative configuration of the PushoverConfig type for use with
|
||||
// apply.
|
||||
func PushoverConfig() *PushoverConfigApplyConfiguration {
|
||||
return &PushoverConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSendResolved sets the SendResolved field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SendResolved field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithSendResolved(value bool) *PushoverConfigApplyConfiguration {
|
||||
b.SendResolved = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUserKey sets the UserKey field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UserKey field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithUserKey(value v1.SecretKeySelector) *PushoverConfigApplyConfiguration {
|
||||
b.UserKey = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithToken sets the Token field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Token field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithToken(value v1.SecretKeySelector) *PushoverConfigApplyConfiguration {
|
||||
b.Token = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTitle sets the Title field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Title field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithTitle(value string) *PushoverConfigApplyConfiguration {
|
||||
b.Title = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessage sets the Message field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Message field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithMessage(value string) *PushoverConfigApplyConfiguration {
|
||||
b.Message = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithURL sets the URL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the URL field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithURL(value string) *PushoverConfigApplyConfiguration {
|
||||
b.URL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithURLTitle sets the URLTitle field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the URLTitle field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithURLTitle(value string) *PushoverConfigApplyConfiguration {
|
||||
b.URLTitle = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSound sets the Sound field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Sound field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithSound(value string) *PushoverConfigApplyConfiguration {
|
||||
b.Sound = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPriority sets the Priority field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Priority field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithPriority(value string) *PushoverConfigApplyConfiguration {
|
||||
b.Priority = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRetry sets the Retry field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Retry field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithRetry(value string) *PushoverConfigApplyConfiguration {
|
||||
b.Retry = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExpire sets the Expire field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Expire field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithExpire(value string) *PushoverConfigApplyConfiguration {
|
||||
b.Expire = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTML sets the HTML field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTML field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithHTML(value bool) *PushoverConfigApplyConfiguration {
|
||||
b.HTML = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *PushoverConfigApplyConfiguration) WithHTTPConfig(value *HTTPConfigApplyConfiguration) *PushoverConfigApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
177
pkg/client/applyconfiguration/monitoring/v1alpha1/receiver.go
Normal file
177
pkg/client/applyconfiguration/monitoring/v1alpha1/receiver.go
Normal file
|
@ -0,0 +1,177 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// ReceiverApplyConfiguration represents an declarative configuration of the Receiver type for use
|
||||
// with apply.
|
||||
type ReceiverApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
OpsGenieConfigs []OpsGenieConfigApplyConfiguration `json:"opsgenieConfigs,omitempty"`
|
||||
PagerDutyConfigs []PagerDutyConfigApplyConfiguration `json:"pagerdutyConfigs,omitempty"`
|
||||
SlackConfigs []SlackConfigApplyConfiguration `json:"slackConfigs,omitempty"`
|
||||
WebhookConfigs []WebhookConfigApplyConfiguration `json:"webhookConfigs,omitempty"`
|
||||
WeChatConfigs []WeChatConfigApplyConfiguration `json:"wechatConfigs,omitempty"`
|
||||
EmailConfigs []EmailConfigApplyConfiguration `json:"emailConfigs,omitempty"`
|
||||
VictorOpsConfigs []VictorOpsConfigApplyConfiguration `json:"victoropsConfigs,omitempty"`
|
||||
PushoverConfigs []PushoverConfigApplyConfiguration `json:"pushoverConfigs,omitempty"`
|
||||
SNSConfigs []SNSConfigApplyConfiguration `json:"snsConfigs,omitempty"`
|
||||
TelegramConfigs []TelegramConfigApplyConfiguration `json:"telegramConfigs,omitempty"`
|
||||
}
|
||||
|
||||
// ReceiverApplyConfiguration constructs an declarative configuration of the Receiver type for use with
|
||||
// apply.
|
||||
func Receiver() *ReceiverApplyConfiguration {
|
||||
return &ReceiverApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ReceiverApplyConfiguration) WithName(value string) *ReceiverApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOpsGenieConfigs adds the given value to the OpsGenieConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OpsGenieConfigs field.
|
||||
func (b *ReceiverApplyConfiguration) WithOpsGenieConfigs(values ...*OpsGenieConfigApplyConfiguration) *ReceiverApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOpsGenieConfigs")
|
||||
}
|
||||
b.OpsGenieConfigs = append(b.OpsGenieConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPagerDutyConfigs adds the given value to the PagerDutyConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the PagerDutyConfigs field.
|
||||
func (b *ReceiverApplyConfiguration) WithPagerDutyConfigs(values ...*PagerDutyConfigApplyConfiguration) *ReceiverApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithPagerDutyConfigs")
|
||||
}
|
||||
b.PagerDutyConfigs = append(b.PagerDutyConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSlackConfigs adds the given value to the SlackConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the SlackConfigs field.
|
||||
func (b *ReceiverApplyConfiguration) WithSlackConfigs(values ...*SlackConfigApplyConfiguration) *ReceiverApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithSlackConfigs")
|
||||
}
|
||||
b.SlackConfigs = append(b.SlackConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWebhookConfigs adds the given value to the WebhookConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the WebhookConfigs field.
|
||||
func (b *ReceiverApplyConfiguration) WithWebhookConfigs(values ...*WebhookConfigApplyConfiguration) *ReceiverApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithWebhookConfigs")
|
||||
}
|
||||
b.WebhookConfigs = append(b.WebhookConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWeChatConfigs adds the given value to the WeChatConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the WeChatConfigs field.
|
||||
func (b *ReceiverApplyConfiguration) WithWeChatConfigs(values ...*WeChatConfigApplyConfiguration) *ReceiverApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithWeChatConfigs")
|
||||
}
|
||||
b.WeChatConfigs = append(b.WeChatConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEmailConfigs adds the given value to the EmailConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the EmailConfigs field.
|
||||
func (b *ReceiverApplyConfiguration) WithEmailConfigs(values ...*EmailConfigApplyConfiguration) *ReceiverApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithEmailConfigs")
|
||||
}
|
||||
b.EmailConfigs = append(b.EmailConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVictorOpsConfigs adds the given value to the VictorOpsConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the VictorOpsConfigs field.
|
||||
func (b *ReceiverApplyConfiguration) WithVictorOpsConfigs(values ...*VictorOpsConfigApplyConfiguration) *ReceiverApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithVictorOpsConfigs")
|
||||
}
|
||||
b.VictorOpsConfigs = append(b.VictorOpsConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPushoverConfigs adds the given value to the PushoverConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the PushoverConfigs field.
|
||||
func (b *ReceiverApplyConfiguration) WithPushoverConfigs(values ...*PushoverConfigApplyConfiguration) *ReceiverApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithPushoverConfigs")
|
||||
}
|
||||
b.PushoverConfigs = append(b.PushoverConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSNSConfigs adds the given value to the SNSConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the SNSConfigs field.
|
||||
func (b *ReceiverApplyConfiguration) WithSNSConfigs(values ...*SNSConfigApplyConfiguration) *ReceiverApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithSNSConfigs")
|
||||
}
|
||||
b.SNSConfigs = append(b.SNSConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTelegramConfigs adds the given value to the TelegramConfigs field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the TelegramConfigs field.
|
||||
func (b *ReceiverApplyConfiguration) WithTelegramConfigs(values ...*TelegramConfigApplyConfiguration) *ReceiverApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTelegramConfigs")
|
||||
}
|
||||
b.TelegramConfigs = append(b.TelegramConfigs, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
135
pkg/client/applyconfiguration/monitoring/v1alpha1/route.go
Normal file
135
pkg/client/applyconfiguration/monitoring/v1alpha1/route.go
Normal file
|
@ -0,0 +1,135 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||
)
|
||||
|
||||
// RouteApplyConfiguration represents an declarative configuration of the Route type for use
|
||||
// with apply.
|
||||
type RouteApplyConfiguration struct {
|
||||
Receiver *string `json:"receiver,omitempty"`
|
||||
GroupBy []string `json:"groupBy,omitempty"`
|
||||
GroupWait *string `json:"groupWait,omitempty"`
|
||||
GroupInterval *string `json:"groupInterval,omitempty"`
|
||||
RepeatInterval *string `json:"repeatInterval,omitempty"`
|
||||
Matchers []MatcherApplyConfiguration `json:"matchers,omitempty"`
|
||||
Continue *bool `json:"continue,omitempty"`
|
||||
Routes []v1.JSON `json:"routes,omitempty"`
|
||||
MuteTimeIntervals []string `json:"muteTimeIntervals,omitempty"`
|
||||
ActiveTimeIntervals []string `json:"activeTimeIntervals,omitempty"`
|
||||
}
|
||||
|
||||
// RouteApplyConfiguration constructs an declarative configuration of the Route type for use with
|
||||
// apply.
|
||||
func Route() *RouteApplyConfiguration {
|
||||
return &RouteApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithReceiver sets the Receiver field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Receiver field is set to the value of the last call.
|
||||
func (b *RouteApplyConfiguration) WithReceiver(value string) *RouteApplyConfiguration {
|
||||
b.Receiver = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGroupBy adds the given value to the GroupBy field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the GroupBy field.
|
||||
func (b *RouteApplyConfiguration) WithGroupBy(values ...string) *RouteApplyConfiguration {
|
||||
for i := range values {
|
||||
b.GroupBy = append(b.GroupBy, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGroupWait sets the GroupWait field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GroupWait field is set to the value of the last call.
|
||||
func (b *RouteApplyConfiguration) WithGroupWait(value string) *RouteApplyConfiguration {
|
||||
b.GroupWait = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGroupInterval sets the GroupInterval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GroupInterval field is set to the value of the last call.
|
||||
func (b *RouteApplyConfiguration) WithGroupInterval(value string) *RouteApplyConfiguration {
|
||||
b.GroupInterval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRepeatInterval sets the RepeatInterval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RepeatInterval field is set to the value of the last call.
|
||||
func (b *RouteApplyConfiguration) WithRepeatInterval(value string) *RouteApplyConfiguration {
|
||||
b.RepeatInterval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMatchers adds the given value to the Matchers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Matchers field.
|
||||
func (b *RouteApplyConfiguration) WithMatchers(values ...*MatcherApplyConfiguration) *RouteApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithMatchers")
|
||||
}
|
||||
b.Matchers = append(b.Matchers, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContinue sets the Continue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Continue field is set to the value of the last call.
|
||||
func (b *RouteApplyConfiguration) WithContinue(value bool) *RouteApplyConfiguration {
|
||||
b.Continue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRoutes adds the given value to the Routes field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Routes field.
|
||||
func (b *RouteApplyConfiguration) WithRoutes(values ...v1.JSON) *RouteApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Routes = append(b.Routes, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMuteTimeIntervals adds the given value to the MuteTimeIntervals field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the MuteTimeIntervals field.
|
||||
func (b *RouteApplyConfiguration) WithMuteTimeIntervals(values ...string) *RouteApplyConfiguration {
|
||||
for i := range values {
|
||||
b.MuteTimeIntervals = append(b.MuteTimeIntervals, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithActiveTimeIntervals adds the given value to the ActiveTimeIntervals field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ActiveTimeIntervals field.
|
||||
func (b *RouteApplyConfiguration) WithActiveTimeIntervals(values ...string) *RouteApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ActiveTimeIntervals = append(b.ActiveTimeIntervals, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// SlackActionApplyConfiguration represents an declarative configuration of the SlackAction type for use
|
||||
// with apply.
|
||||
type SlackActionApplyConfiguration struct {
|
||||
Type *string `json:"type,omitempty"`
|
||||
Text *string `json:"text,omitempty"`
|
||||
URL *string `json:"url,omitempty"`
|
||||
Style *string `json:"style,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
ConfirmField *SlackConfirmationFieldApplyConfiguration `json:"confirm,omitempty"`
|
||||
}
|
||||
|
||||
// SlackActionApplyConfiguration constructs an declarative configuration of the SlackAction type for use with
|
||||
// apply.
|
||||
func SlackAction() *SlackActionApplyConfiguration {
|
||||
return &SlackActionApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *SlackActionApplyConfiguration) WithType(value string) *SlackActionApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithText sets the Text field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Text field is set to the value of the last call.
|
||||
func (b *SlackActionApplyConfiguration) WithText(value string) *SlackActionApplyConfiguration {
|
||||
b.Text = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithURL sets the URL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the URL field is set to the value of the last call.
|
||||
func (b *SlackActionApplyConfiguration) WithURL(value string) *SlackActionApplyConfiguration {
|
||||
b.URL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStyle sets the Style field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Style field is set to the value of the last call.
|
||||
func (b *SlackActionApplyConfiguration) WithStyle(value string) *SlackActionApplyConfiguration {
|
||||
b.Style = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *SlackActionApplyConfiguration) WithName(value string) *SlackActionApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Value field is set to the value of the last call.
|
||||
func (b *SlackActionApplyConfiguration) WithValue(value string) *SlackActionApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConfirmField sets the ConfirmField field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ConfirmField field is set to the value of the last call.
|
||||
func (b *SlackActionApplyConfiguration) WithConfirmField(value *SlackConfirmationFieldApplyConfiguration) *SlackActionApplyConfiguration {
|
||||
b.ConfirmField = value
|
||||
return b
|
||||
}
|
242
pkg/client/applyconfiguration/monitoring/v1alpha1/slackconfig.go
Normal file
242
pkg/client/applyconfiguration/monitoring/v1alpha1/slackconfig.go
Normal file
|
@ -0,0 +1,242 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// SlackConfigApplyConfiguration represents an declarative configuration of the SlackConfig type for use
|
||||
// with apply.
|
||||
type SlackConfigApplyConfiguration struct {
|
||||
SendResolved *bool `json:"sendResolved,omitempty"`
|
||||
APIURL *v1.SecretKeySelector `json:"apiURL,omitempty"`
|
||||
Channel *string `json:"channel,omitempty"`
|
||||
Username *string `json:"username,omitempty"`
|
||||
Color *string `json:"color,omitempty"`
|
||||
Title *string `json:"title,omitempty"`
|
||||
TitleLink *string `json:"titleLink,omitempty"`
|
||||
Pretext *string `json:"pretext,omitempty"`
|
||||
Text *string `json:"text,omitempty"`
|
||||
Fields []SlackFieldApplyConfiguration `json:"fields,omitempty"`
|
||||
ShortFields *bool `json:"shortFields,omitempty"`
|
||||
Footer *string `json:"footer,omitempty"`
|
||||
Fallback *string `json:"fallback,omitempty"`
|
||||
CallbackID *string `json:"callbackId,omitempty"`
|
||||
IconEmoji *string `json:"iconEmoji,omitempty"`
|
||||
IconURL *string `json:"iconURL,omitempty"`
|
||||
ImageURL *string `json:"imageURL,omitempty"`
|
||||
ThumbURL *string `json:"thumbURL,omitempty"`
|
||||
LinkNames *bool `json:"linkNames,omitempty"`
|
||||
MrkdwnIn []string `json:"mrkdwnIn,omitempty"`
|
||||
Actions []SlackActionApplyConfiguration `json:"actions,omitempty"`
|
||||
HTTPConfig *HTTPConfigApplyConfiguration `json:"httpConfig,omitempty"`
|
||||
}
|
||||
|
||||
// SlackConfigApplyConfiguration constructs an declarative configuration of the SlackConfig type for use with
|
||||
// apply.
|
||||
func SlackConfig() *SlackConfigApplyConfiguration {
|
||||
return &SlackConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSendResolved sets the SendResolved field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SendResolved field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithSendResolved(value bool) *SlackConfigApplyConfiguration {
|
||||
b.SendResolved = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIURL sets the APIURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIURL field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithAPIURL(value v1.SecretKeySelector) *SlackConfigApplyConfiguration {
|
||||
b.APIURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithChannel sets the Channel field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Channel field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithChannel(value string) *SlackConfigApplyConfiguration {
|
||||
b.Channel = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUsername sets the Username field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Username field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithUsername(value string) *SlackConfigApplyConfiguration {
|
||||
b.Username = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithColor sets the Color field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Color field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithColor(value string) *SlackConfigApplyConfiguration {
|
||||
b.Color = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTitle sets the Title field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Title field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithTitle(value string) *SlackConfigApplyConfiguration {
|
||||
b.Title = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTitleLink sets the TitleLink field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TitleLink field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithTitleLink(value string) *SlackConfigApplyConfiguration {
|
||||
b.TitleLink = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPretext sets the Pretext field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Pretext field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithPretext(value string) *SlackConfigApplyConfiguration {
|
||||
b.Pretext = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithText sets the Text field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Text field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithText(value string) *SlackConfigApplyConfiguration {
|
||||
b.Text = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFields adds the given value to the Fields field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Fields field.
|
||||
func (b *SlackConfigApplyConfiguration) WithFields(values ...*SlackFieldApplyConfiguration) *SlackConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithFields")
|
||||
}
|
||||
b.Fields = append(b.Fields, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShortFields sets the ShortFields field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ShortFields field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithShortFields(value bool) *SlackConfigApplyConfiguration {
|
||||
b.ShortFields = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFooter sets the Footer field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Footer field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithFooter(value string) *SlackConfigApplyConfiguration {
|
||||
b.Footer = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFallback sets the Fallback field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Fallback field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithFallback(value string) *SlackConfigApplyConfiguration {
|
||||
b.Fallback = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCallbackID sets the CallbackID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CallbackID field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithCallbackID(value string) *SlackConfigApplyConfiguration {
|
||||
b.CallbackID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIconEmoji sets the IconEmoji field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IconEmoji field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithIconEmoji(value string) *SlackConfigApplyConfiguration {
|
||||
b.IconEmoji = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIconURL sets the IconURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IconURL field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithIconURL(value string) *SlackConfigApplyConfiguration {
|
||||
b.IconURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImageURL sets the ImageURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ImageURL field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithImageURL(value string) *SlackConfigApplyConfiguration {
|
||||
b.ImageURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithThumbURL sets the ThumbURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ThumbURL field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithThumbURL(value string) *SlackConfigApplyConfiguration {
|
||||
b.ThumbURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLinkNames sets the LinkNames field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LinkNames field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithLinkNames(value bool) *SlackConfigApplyConfiguration {
|
||||
b.LinkNames = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMrkdwnIn adds the given value to the MrkdwnIn field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the MrkdwnIn field.
|
||||
func (b *SlackConfigApplyConfiguration) WithMrkdwnIn(values ...string) *SlackConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
b.MrkdwnIn = append(b.MrkdwnIn, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithActions adds the given value to the Actions field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Actions field.
|
||||
func (b *SlackConfigApplyConfiguration) WithActions(values ...*SlackActionApplyConfiguration) *SlackConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithActions")
|
||||
}
|
||||
b.Actions = append(b.Actions, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *SlackConfigApplyConfiguration) WithHTTPConfig(value *HTTPConfigApplyConfiguration) *SlackConfigApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// SlackConfirmationFieldApplyConfiguration represents an declarative configuration of the SlackConfirmationField type for use
|
||||
// with apply.
|
||||
type SlackConfirmationFieldApplyConfiguration struct {
|
||||
Text *string `json:"text,omitempty"`
|
||||
Title *string `json:"title,omitempty"`
|
||||
OkText *string `json:"okText,omitempty"`
|
||||
DismissText *string `json:"dismissText,omitempty"`
|
||||
}
|
||||
|
||||
// SlackConfirmationFieldApplyConfiguration constructs an declarative configuration of the SlackConfirmationField type for use with
|
||||
// apply.
|
||||
func SlackConfirmationField() *SlackConfirmationFieldApplyConfiguration {
|
||||
return &SlackConfirmationFieldApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithText sets the Text field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Text field is set to the value of the last call.
|
||||
func (b *SlackConfirmationFieldApplyConfiguration) WithText(value string) *SlackConfirmationFieldApplyConfiguration {
|
||||
b.Text = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTitle sets the Title field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Title field is set to the value of the last call.
|
||||
func (b *SlackConfirmationFieldApplyConfiguration) WithTitle(value string) *SlackConfirmationFieldApplyConfiguration {
|
||||
b.Title = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOkText sets the OkText field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OkText field is set to the value of the last call.
|
||||
func (b *SlackConfirmationFieldApplyConfiguration) WithOkText(value string) *SlackConfirmationFieldApplyConfiguration {
|
||||
b.OkText = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDismissText sets the DismissText field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DismissText field is set to the value of the last call.
|
||||
func (b *SlackConfirmationFieldApplyConfiguration) WithDismissText(value string) *SlackConfirmationFieldApplyConfiguration {
|
||||
b.DismissText = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// SlackFieldApplyConfiguration represents an declarative configuration of the SlackField type for use
|
||||
// with apply.
|
||||
type SlackFieldApplyConfiguration struct {
|
||||
Title *string `json:"title,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
Short *bool `json:"short,omitempty"`
|
||||
}
|
||||
|
||||
// SlackFieldApplyConfiguration constructs an declarative configuration of the SlackField type for use with
|
||||
// apply.
|
||||
func SlackField() *SlackFieldApplyConfiguration {
|
||||
return &SlackFieldApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithTitle sets the Title field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Title field is set to the value of the last call.
|
||||
func (b *SlackFieldApplyConfiguration) WithTitle(value string) *SlackFieldApplyConfiguration {
|
||||
b.Title = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Value field is set to the value of the last call.
|
||||
func (b *SlackFieldApplyConfiguration) WithValue(value string) *SlackFieldApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShort sets the Short field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Short field is set to the value of the last call.
|
||||
func (b *SlackFieldApplyConfiguration) WithShort(value bool) *SlackFieldApplyConfiguration {
|
||||
b.Short = &value
|
||||
return b
|
||||
}
|
128
pkg/client/applyconfiguration/monitoring/v1alpha1/snsconfig.go
Normal file
128
pkg/client/applyconfiguration/monitoring/v1alpha1/snsconfig.go
Normal file
|
@ -0,0 +1,128 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "github.com/prometheus-operator/prometheus-operator/pkg/client/applyconfiguration/monitoring/v1"
|
||||
)
|
||||
|
||||
// SNSConfigApplyConfiguration represents an declarative configuration of the SNSConfig type for use
|
||||
// with apply.
|
||||
type SNSConfigApplyConfiguration struct {
|
||||
SendResolved *bool `json:"sendResolved,omitempty"`
|
||||
ApiURL *string `json:"apiURL,omitempty"`
|
||||
Sigv4 *v1.Sigv4ApplyConfiguration `json:"sigv4,omitempty"`
|
||||
TopicARN *string `json:"topicARN,omitempty"`
|
||||
Subject *string `json:"subject,omitempty"`
|
||||
PhoneNumber *string `json:"phoneNumber,omitempty"`
|
||||
TargetARN *string `json:"targetARN,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Attributes map[string]string `json:"attributes,omitempty"`
|
||||
HTTPConfig *HTTPConfigApplyConfiguration `json:"httpConfig,omitempty"`
|
||||
}
|
||||
|
||||
// SNSConfigApplyConfiguration constructs an declarative configuration of the SNSConfig type for use with
|
||||
// apply.
|
||||
func SNSConfig() *SNSConfigApplyConfiguration {
|
||||
return &SNSConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSendResolved sets the SendResolved field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SendResolved field is set to the value of the last call.
|
||||
func (b *SNSConfigApplyConfiguration) WithSendResolved(value bool) *SNSConfigApplyConfiguration {
|
||||
b.SendResolved = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithApiURL sets the ApiURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ApiURL field is set to the value of the last call.
|
||||
func (b *SNSConfigApplyConfiguration) WithApiURL(value string) *SNSConfigApplyConfiguration {
|
||||
b.ApiURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSigv4 sets the Sigv4 field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Sigv4 field is set to the value of the last call.
|
||||
func (b *SNSConfigApplyConfiguration) WithSigv4(value *v1.Sigv4ApplyConfiguration) *SNSConfigApplyConfiguration {
|
||||
b.Sigv4 = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTopicARN sets the TopicARN field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TopicARN field is set to the value of the last call.
|
||||
func (b *SNSConfigApplyConfiguration) WithTopicARN(value string) *SNSConfigApplyConfiguration {
|
||||
b.TopicARN = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSubject sets the Subject field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Subject field is set to the value of the last call.
|
||||
func (b *SNSConfigApplyConfiguration) WithSubject(value string) *SNSConfigApplyConfiguration {
|
||||
b.Subject = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPhoneNumber sets the PhoneNumber field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PhoneNumber field is set to the value of the last call.
|
||||
func (b *SNSConfigApplyConfiguration) WithPhoneNumber(value string) *SNSConfigApplyConfiguration {
|
||||
b.PhoneNumber = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetARN sets the TargetARN field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetARN field is set to the value of the last call.
|
||||
func (b *SNSConfigApplyConfiguration) WithTargetARN(value string) *SNSConfigApplyConfiguration {
|
||||
b.TargetARN = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessage sets the Message field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Message field is set to the value of the last call.
|
||||
func (b *SNSConfigApplyConfiguration) WithMessage(value string) *SNSConfigApplyConfiguration {
|
||||
b.Message = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAttributes puts the entries into the Attributes field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Attributes field,
|
||||
// overwriting an existing map entries in Attributes field with the same key.
|
||||
func (b *SNSConfigApplyConfiguration) WithAttributes(entries map[string]string) *SNSConfigApplyConfiguration {
|
||||
if b.Attributes == nil && len(entries) > 0 {
|
||||
b.Attributes = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Attributes[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *SNSConfigApplyConfiguration) WithHTTPConfig(value *HTTPConfigApplyConfiguration) *SNSConfigApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// TelegramConfigApplyConfiguration represents an declarative configuration of the TelegramConfig type for use
|
||||
// with apply.
|
||||
type TelegramConfigApplyConfiguration struct {
|
||||
SendResolved *bool `json:"sendResolved,omitempty"`
|
||||
APIURL *string `json:"apiURL,omitempty"`
|
||||
BotToken *v1.SecretKeySelector `json:"botToken,omitempty"`
|
||||
ChatID *int64 `json:"chatID,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
DisableNotifications *bool `json:"disableNotifications,omitempty"`
|
||||
ParseMode *string `json:"parseMode,omitempty"`
|
||||
HTTPConfig *HTTPConfigApplyConfiguration `json:"httpConfig,omitempty"`
|
||||
}
|
||||
|
||||
// TelegramConfigApplyConfiguration constructs an declarative configuration of the TelegramConfig type for use with
|
||||
// apply.
|
||||
func TelegramConfig() *TelegramConfigApplyConfiguration {
|
||||
return &TelegramConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSendResolved sets the SendResolved field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SendResolved field is set to the value of the last call.
|
||||
func (b *TelegramConfigApplyConfiguration) WithSendResolved(value bool) *TelegramConfigApplyConfiguration {
|
||||
b.SendResolved = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIURL sets the APIURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIURL field is set to the value of the last call.
|
||||
func (b *TelegramConfigApplyConfiguration) WithAPIURL(value string) *TelegramConfigApplyConfiguration {
|
||||
b.APIURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBotToken sets the BotToken field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BotToken field is set to the value of the last call.
|
||||
func (b *TelegramConfigApplyConfiguration) WithBotToken(value v1.SecretKeySelector) *TelegramConfigApplyConfiguration {
|
||||
b.BotToken = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithChatID sets the ChatID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ChatID field is set to the value of the last call.
|
||||
func (b *TelegramConfigApplyConfiguration) WithChatID(value int64) *TelegramConfigApplyConfiguration {
|
||||
b.ChatID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessage sets the Message field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Message field is set to the value of the last call.
|
||||
func (b *TelegramConfigApplyConfiguration) WithMessage(value string) *TelegramConfigApplyConfiguration {
|
||||
b.Message = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDisableNotifications sets the DisableNotifications field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DisableNotifications field is set to the value of the last call.
|
||||
func (b *TelegramConfigApplyConfiguration) WithDisableNotifications(value bool) *TelegramConfigApplyConfiguration {
|
||||
b.DisableNotifications = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithParseMode sets the ParseMode field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ParseMode field is set to the value of the last call.
|
||||
func (b *TelegramConfigApplyConfiguration) WithParseMode(value string) *TelegramConfigApplyConfiguration {
|
||||
b.ParseMode = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *TelegramConfigApplyConfiguration) WithHTTPConfig(value *HTTPConfigApplyConfiguration) *TelegramConfigApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
monitoringv1alpha1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1"
|
||||
)
|
||||
|
||||
// TimeIntervalApplyConfiguration represents an declarative configuration of the TimeInterval type for use
|
||||
// with apply.
|
||||
type TimeIntervalApplyConfiguration struct {
|
||||
Times []TimeRangeApplyConfiguration `json:"times,omitempty"`
|
||||
Weekdays []monitoringv1alpha1.WeekdayRange `json:"weekdays,omitempty"`
|
||||
DaysOfMonth []DayOfMonthRangeApplyConfiguration `json:"daysOfMonth,omitempty"`
|
||||
Months []monitoringv1alpha1.MonthRange `json:"months,omitempty"`
|
||||
Years []monitoringv1alpha1.YearRange `json:"years,omitempty"`
|
||||
}
|
||||
|
||||
// TimeIntervalApplyConfiguration constructs an declarative configuration of the TimeInterval type for use with
|
||||
// apply.
|
||||
func TimeInterval() *TimeIntervalApplyConfiguration {
|
||||
return &TimeIntervalApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithTimes adds the given value to the Times field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Times field.
|
||||
func (b *TimeIntervalApplyConfiguration) WithTimes(values ...*TimeRangeApplyConfiguration) *TimeIntervalApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTimes")
|
||||
}
|
||||
b.Times = append(b.Times, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWeekdays adds the given value to the Weekdays field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Weekdays field.
|
||||
func (b *TimeIntervalApplyConfiguration) WithWeekdays(values ...monitoringv1alpha1.WeekdayRange) *TimeIntervalApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Weekdays = append(b.Weekdays, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDaysOfMonth adds the given value to the DaysOfMonth field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the DaysOfMonth field.
|
||||
func (b *TimeIntervalApplyConfiguration) WithDaysOfMonth(values ...*DayOfMonthRangeApplyConfiguration) *TimeIntervalApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithDaysOfMonth")
|
||||
}
|
||||
b.DaysOfMonth = append(b.DaysOfMonth, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMonths adds the given value to the Months field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Months field.
|
||||
func (b *TimeIntervalApplyConfiguration) WithMonths(values ...monitoringv1alpha1.MonthRange) *TimeIntervalApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Months = append(b.Months, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithYears adds the given value to the Years field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Years field.
|
||||
func (b *TimeIntervalApplyConfiguration) WithYears(values ...monitoringv1alpha1.YearRange) *TimeIntervalApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Years = append(b.Years, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1"
|
||||
)
|
||||
|
||||
// TimeRangeApplyConfiguration represents an declarative configuration of the TimeRange type for use
|
||||
// with apply.
|
||||
type TimeRangeApplyConfiguration struct {
|
||||
StartTime *v1alpha1.Time `json:"startTime,omitempty"`
|
||||
EndTime *v1alpha1.Time `json:"endTime,omitempty"`
|
||||
}
|
||||
|
||||
// TimeRangeApplyConfiguration constructs an declarative configuration of the TimeRange type for use with
|
||||
// apply.
|
||||
func TimeRange() *TimeRangeApplyConfiguration {
|
||||
return &TimeRangeApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithStartTime sets the StartTime field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StartTime field is set to the value of the last call.
|
||||
func (b *TimeRangeApplyConfiguration) WithStartTime(value v1alpha1.Time) *TimeRangeApplyConfiguration {
|
||||
b.StartTime = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEndTime sets the EndTime field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EndTime field is set to the value of the last call.
|
||||
func (b *TimeRangeApplyConfiguration) WithEndTime(value v1alpha1.Time) *TimeRangeApplyConfiguration {
|
||||
b.EndTime = &value
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
// Copyright The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// VictorOpsConfigApplyConfiguration represents an declarative configuration of the VictorOpsConfig type for use
|
||||
// with apply.
|
||||
type VictorOpsConfigApplyConfiguration struct {
|
||||
SendResolved *bool `json:"sendResolved,omitempty"`
|
||||
APIKey *v1.SecretKeySelector `json:"apiKey,omitempty"`
|
||||
APIURL *string `json:"apiUrl,omitempty"`
|
||||
RoutingKey *string `json:"routingKey,omitempty"`
|
||||
MessageType *string `json:"messageType,omitempty"`
|
||||
EntityDisplayName *string `json:"entityDisplayName,omitempty"`
|
||||
StateMessage *string `json:"stateMessage,omitempty"`
|
||||
MonitoringTool *string `json:"monitoringTool,omitempty"`
|
||||
CustomFields []KeyValueApplyConfiguration `json:"customFields,omitempty"`
|
||||
HTTPConfig *HTTPConfigApplyConfiguration `json:"httpConfig,omitempty"`
|
||||
}
|
||||
|
||||
// VictorOpsConfigApplyConfiguration constructs an declarative configuration of the VictorOpsConfig type for use with
|
||||
// apply.
|
||||
func VictorOpsConfig() *VictorOpsConfigApplyConfiguration {
|
||||
return &VictorOpsConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSendResolved sets the SendResolved field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SendResolved field is set to the value of the last call.
|
||||
func (b *VictorOpsConfigApplyConfiguration) WithSendResolved(value bool) *VictorOpsConfigApplyConfiguration {
|
||||
b.SendResolved = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIKey sets the APIKey field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIKey field is set to the value of the last call.
|
||||
func (b *VictorOpsConfigApplyConfiguration) WithAPIKey(value v1.SecretKeySelector) *VictorOpsConfigApplyConfiguration {
|
||||
b.APIKey = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIURL sets the APIURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIURL field is set to the value of the last call.
|
||||
func (b *VictorOpsConfigApplyConfiguration) WithAPIURL(value string) *VictorOpsConfigApplyConfiguration {
|
||||
b.APIURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRoutingKey sets the RoutingKey field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RoutingKey field is set to the value of the last call.
|
||||
func (b *VictorOpsConfigApplyConfiguration) WithRoutingKey(value string) *VictorOpsConfigApplyConfiguration {
|
||||
b.RoutingKey = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessageType sets the MessageType field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MessageType field is set to the value of the last call.
|
||||
func (b *VictorOpsConfigApplyConfiguration) WithMessageType(value string) *VictorOpsConfigApplyConfiguration {
|
||||
b.MessageType = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEntityDisplayName sets the EntityDisplayName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the EntityDisplayName field is set to the value of the last call.
|
||||
func (b *VictorOpsConfigApplyConfiguration) WithEntityDisplayName(value string) *VictorOpsConfigApplyConfiguration {
|
||||
b.EntityDisplayName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStateMessage sets the StateMessage field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StateMessage field is set to the value of the last call.
|
||||
func (b *VictorOpsConfigApplyConfiguration) WithStateMessage(value string) *VictorOpsConfigApplyConfiguration {
|
||||
b.StateMessage = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMonitoringTool sets the MonitoringTool field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MonitoringTool field is set to the value of the last call.
|
||||
func (b *VictorOpsConfigApplyConfiguration) WithMonitoringTool(value string) *VictorOpsConfigApplyConfiguration {
|
||||
b.MonitoringTool = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCustomFields adds the given value to the CustomFields field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the CustomFields field.
|
||||
func (b *VictorOpsConfigApplyConfiguration) WithCustomFields(values ...*KeyValueApplyConfiguration) *VictorOpsConfigApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithCustomFields")
|
||||
}
|
||||
b.CustomFields = append(b.CustomFields, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHTTPConfig sets the HTTPConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the HTTPConfig field is set to the value of the last call.
|
||||
func (b *VictorOpsConfigApplyConfiguration) WithHTTPConfig(value *HTTPConfigApplyConfiguration) *VictorOpsConfigApplyConfiguration {
|
||||
b.HTTPConfig = value
|
||||
return b
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue